000088b8 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 88b8: e5903000 ldr r3, [r0] 88bc: e593304c ldr r3, [r3, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 88c0: e5902010 ldr r2, [r0, #16] switch( node->type ) { 88c4: e2433001 sub r3, r3, #1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 88c8: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { 88cc: e3530006 cmp r3, #6 88d0: 979ff103 ldrls pc, [pc, r3, lsl #2] 88d4: ea000008 b 88fc <== NOT EXECUTED 88d8: 00008924 .word 0x00008924 <== NOT EXECUTED 88dc: 00008934 .word 0x00008934 <== NOT EXECUTED 88e0: 00008914 .word 0x00008914 <== NOT EXECUTED 88e4: 00008914 .word 0x00008914 <== NOT EXECUTED 88e8: 00008904 .word 0x00008904 <== NOT EXECUTED 88ec: 00008904 .word 0x00008904 <== NOT EXECUTED 88f0: 000088f4 .word 0x000088f4 <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 88f4: e59f3048 ldr r3, [pc, #72] ; 8944 88f8: e5803008 str r3, [r0, #8] break; } return 0; } 88fc: e3a00000 mov r0, #0 8900: e12fff1e bx lr break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 8904: e5923008 ldr r3, [r2, #8] 8908: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 890c: e3a00000 mov r0, #0 8910: e12fff1e bx lr case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 8914: e59f302c ldr r3, [pc, #44] ; 8948 8918: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 891c: e3a00000 mov r0, #0 8920: e12fff1e bx lr IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 8924: e592300c ldr r3, [r2, #12] 8928: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 892c: e3a00000 mov r0, #0 8930: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 8934: e59f3010 ldr r3, [pc, #16] ; 894c 8938: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 893c: e3a00000 mov r0, #0 8940: e12fff1e bx lr 0000ba50 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ba50: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ba54: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ba58: e1a05001 mov r5, r1 ba5c: e59d6014 ldr r6, [sp, #20] ba60: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ba64: 01a07004 moveq r7, r4 ba68: 1a000001 bne ba74 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ba6c: e1a00007 mov r0, r7 <== NOT EXECUTED ba70: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ba74: e59f210c ldr r2, [pc, #268] ; bb88 ba78: e5922000 ldr r2, [r2] ba7c: e592202c ldr r2, [r2, #44] ; 0x2c ba80: e1a00005 mov r0, r5 ba84: e1c32002 bic r2, r3, r2 ba88: ebffffc1 bl b994 if ( !node ) ba8c: e2507000 subs r7, r0, #0 ba90: 0afffff5 beq ba6c return NULL; /* * Set the type specific information */ switch (type) { ba94: e2455001 sub r5, r5, #1 ba98: e3550006 cmp r5, #6 ba9c: 979ff105 ldrls pc, [pc, r5, lsl #2] baa0: ea000033 b bb74 <== NOT EXECUTED baa4: 0000bb58 .word 0x0000bb58 <== NOT EXECUTED baa8: 0000bb44 .word 0x0000bb44 <== NOT EXECUTED baac: 0000bac0 .word 0x0000bac0 <== NOT EXECUTED bab0: 0000bac0 .word 0x0000bac0 <== NOT EXECUTED bab4: 0000bb14 .word 0x0000bb14 <== NOT EXECUTED bab8: 0000bafc .word 0x0000bafc <== NOT EXECUTED babc: 0000bb38 .word 0x0000bb38 <== NOT EXECUTED 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; bac0: e5963000 ldr r3, [r6] bac4: e5873050 str r3, [r7, #80] ; 0x50 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; bac8: e5943010 ldr r3, [r4, #16] bacc: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; bad0: e5923004 ldr r3, [r2, #4] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; bad4: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; bad8: e2833001 add r3, r3, #1 badc: e5823004 str r3, [r2, #4] * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; bae0: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; bae4: e5873038 str r3, [r7, #56] ; 0x38 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); bae8: e2800050 add r0, r0, #80 ; 0x50 baec: e1a01007 mov r1, r7 baf0: ebffe7a0 bl 5978 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } baf4: e1a00007 mov r0, r7 baf8: e8bd80f0 pop {r4, r5, r6, r7, pc} node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; bafc: e3a03000 mov r3, #0 <== NOT EXECUTED bb00: e3a02000 mov r2, #0 <== NOT EXECUTED bb04: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED bb08: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; bb0c: e3a03000 mov r3, #0 <== NOT EXECUTED bb10: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; bb14: e3a03000 mov r3, #0 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; bb18: e3a01000 mov r1, #0 bb1c: e3a02000 mov r2, #0 bb20: e5871050 str r1, [r7, #80] ; 0x50 bb24: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; bb28: e5873060 str r3, [r7, #96] ; 0x60 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; bb2c: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; bb30: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; bb34: eaffffe3 b bac8 case IMFS_FIFO: node->info.fifo.pipe = NULL; bb38: e3a03000 mov r3, #0 bb3c: e5873050 str r3, [r7, #80] ; 0x50 break; bb40: eaffffe0 b bac8 node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; bb44: e5962004 ldr r2, [r6, #4] case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; bb48: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; bb4c: e5872054 str r2, [r7, #84] ; 0x54 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; bb50: e5873050 str r3, [r7, #80] ; 0x50 node->info.device.minor = info->device.minor; break; bb54: eaffffdb b bac8 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); bb58: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); bb5c: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); bb60: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; bb64: e3a02000 mov r2, #0 bb68: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); bb6c: e5873058 str r3, [r7, #88] ; 0x58 bb70: eaffffd4 b bac8 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); bb74: e59f0010 ldr r0, [pc, #16] ; bb8c <== NOT EXECUTED bb78: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED bb7c: e59f200c ldr r2, [pc, #12] ; bb90 <== NOT EXECUTED bb80: e59f300c ldr r3, [pc, #12] ; bb94 <== NOT EXECUTED bb84: ebfff731 bl 9850 <__assert_func> <== NOT EXECUTED 00003ebc : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3ebc: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 3ec0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3ec4: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3ec8: 0a000021 beq 3f54 assert( level >= 0 ); 3ecc: e3510000 cmp r1, #0 3ed0: ba000029 blt 3f7c assert( the_directory->type == IMFS_DIRECTORY ); 3ed4: e590304c ldr r3, [r0, #76] ; 0x4c 3ed8: e3530001 cmp r3, #1 3edc: 1a000021 bne 3f68 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 3ee0: e5907050 ldr r7, [r0, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3ee4: e2808054 add r8, r0, #84 ; 0x54 3ee8: e1570008 cmp r7, r8 3eec: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} 3ef0: e59f6098 ldr r6, [pc, #152] ; 3f90 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 3ef4: e281a001 add sl, r1, #1 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 3ef8: e3a04000 mov r4, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 3efc: e5963000 ldr r3, [r6] !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 3f00: e2844001 add r4, r4, #1 fprintf(stdout, "...." ); 3f04: e5933008 ldr r3, [r3, #8] 3f08: e59f0084 ldr r0, [pc, #132] ; 3f94 3f0c: e3a01001 mov r1, #1 3f10: e3a02004 mov r2, #4 3f14: eb003d52 bl 13464 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 3f18: e1550004 cmp r5, r4 3f1c: aafffff6 bge 3efc fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 3f20: e1a00007 mov r0, r7 3f24: ebffff7a bl 3d14 if ( the_jnode->type == IMFS_DIRECTORY ) 3f28: e597304c ldr r3, [r7, #76] ; 0x4c 3f2c: e3530001 cmp r3, #1 3f30: 0a000003 beq 3f44 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 3f34: e5977000 ldr r7, [r7] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 3f38: e1570008 cmp r7, r8 3f3c: 1affffed bne 3ef8 3f40: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 3f44: e1a00007 mov r0, r7 3f48: e1a0100a mov r1, sl 3f4c: ebffffda bl 3ebc 3f50: eafffff7 b 3f34 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3f54: e59f003c ldr r0, [pc, #60] ; 3f98 <== NOT EXECUTED 3f58: e3a01084 mov r1, #132 ; 0x84 <== NOT EXECUTED 3f5c: e59f2038 ldr r2, [pc, #56] ; 3f9c <== NOT EXECUTED 3f60: e59f3038 ldr r3, [pc, #56] ; 3fa0 <== NOT EXECUTED 3f64: eb000221 bl 47f0 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 3f68: e59f0028 ldr r0, [pc, #40] ; 3f98 <== NOT EXECUTED 3f6c: e3a01088 mov r1, #136 ; 0x88 <== NOT EXECUTED 3f70: e59f2024 ldr r2, [pc, #36] ; 3f9c <== NOT EXECUTED 3f74: e59f3028 ldr r3, [pc, #40] ; 3fa4 <== NOT EXECUTED 3f78: eb00021c bl 47f0 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 3f7c: e59f0014 ldr r0, [pc, #20] ; 3f98 <== NOT EXECUTED 3f80: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 3f84: e59f2010 ldr r2, [pc, #16] ; 3f9c <== NOT EXECUTED 3f88: e59f3018 ldr r3, [pc, #24] ; 3fa8 <== NOT EXECUTED 3f8c: eb000217 bl 47f0 <__assert_func> <== NOT EXECUTED 00008acc : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8acc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8ad0: e24dd044 sub sp, sp, #68 ; 0x44 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8ad4: e5936000 ldr r6, [r3] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8ad8: e59fb29c ldr fp, [pc, #668] ; 8d7c const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8adc: e58d2004 str r2, [sp, #4] 8ae0: e1a07003 mov r7, r3 8ae4: e1a0a000 mov sl, r0 8ae8: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8aec: e3a05000 mov r5, #0 8af0: e28d8008 add r8, sp, #8 8af4: e28d9040 add r9, sp, #64 ; 0x40 * 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 ); 8af8: e1a02008 mov r2, r8 8afc: e1a03009 mov r3, r9 8b00: e08a0005 add r0, sl, r5 8b04: e1a01004 mov r1, r4 8b08: eb00023c bl 9400 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 8b0c: e5972000 ldr r2, [r7] 8b10: e3520000 cmp r2, #0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 8b14: e1a03000 mov r3, r0 pathnamelen -= len; 8b18: e59dc040 ldr ip, [sp, #64] ; 0x40 i += len; if ( !pathloc->node_access ) 8b1c: 0a00004e beq 8c5c rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8b20: e3500000 cmp r0, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 8b24: e06c4004 rsb r4, ip, r4 i += len; 8b28: e085500c add r5, r5, ip rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8b2c: 1a00000c bne 8b64 * 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 ) { 8b30: e592304c ldr r3, [r2, #76] ; 0x4c 8b34: e3530001 cmp r3, #1 8b38: 0a000054 beq 8c90 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8b3c: e1a00007 mov r0, r7 8b40: ebffff5c bl 88b8 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8b44: e5973000 ldr r3, [r7] /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8b48: e59d1004 ldr r1, [sp, #4] if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8b4c: e5932030 ldr r2, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8b50: e1a03301 lsl r3, r1, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8b54: e0032002 and r2, r3, r2 8b58: e1530002 cmp r3, r2 8b5c: 1a000039 bne 8c48 8b60: ea000032 b 8c30 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8b64: e596104c ldr r1, [r6, #76] ; 0x4c 8b68: e3510001 cmp r1, #1 8b6c: 11a06002 movne r6, r2 8b70: 0a000030 beq 8c38 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8b74: e3530003 cmp r3, #3 8b78: 0a000006 beq 8b98 8b7c: e3530004 cmp r3, #4 8b80: 0a000026 beq 8c20 8b84: e3530002 cmp r3, #2 8b88: 0a000013 beq 8bdc /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8b8c: e3530004 cmp r3, #4 8b90: 1affffd8 bne 8af8 8b94: eaffffe5 b 8b30 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8b98: e592304c ldr r3, [r2, #76] ; 0x4c 8b9c: e3530003 cmp r3, #3 8ba0: 0a000032 beq 8c70 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 8ba4: e3530004 cmp r3, #4 8ba8: 0a000069 beq 8d54 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8bac: e3530001 cmp r3, #1 8bb0: 1a00004d bne 8cec /* * 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 ) { 8bb4: e596305c ldr r3, [r6, #92] ; 0x5c 8bb8: e3530000 cmp r3, #0 8bbc: 1a00004f bne 8d00 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8bc0: e1a00006 mov r0, r6 8bc4: e1a01008 mov r1, r8 8bc8: eb0001dd bl 9344 if ( !node ) 8bcc: e2506000 subs r6, r0, #0 8bd0: 0a000021 beq 8c5c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 8bd4: e5876000 str r6, [r7] break; 8bd8: eaffffc6 b 8af8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8bdc: e59b1000 ldr r1, [fp] 8be0: e5911018 ldr r1, [r1, #24] 8be4: e1520001 cmp r2, r1 8be8: 0affffc2 beq 8af8 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 8bec: e5971010 ldr r1, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 8bf0: e591001c ldr r0, [r1, #28] 8bf4: e1520000 cmp r2, r0 8bf8: 0a00005d beq 8d74 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 8bfc: e5926008 ldr r6, [r2, #8] 8c00: e3560000 cmp r6, #0 8c04: 1afffff2 bne 8bd4 rtems_set_errno_and_return_minus_one( ENOENT ); 8c08: e58d3000 str r3, [sp] 8c0c: eb000f4b bl c940 <__errno> 8c10: e59d3000 ldr r3, [sp] 8c14: e5803000 str r3, [r0] 8c18: e3e00000 mvn r0, #0 8c1c: ea000003 b 8c30 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8c20: eb000f46 bl c940 <__errno> 8c24: e3a0305b mov r3, #91 ; 0x5b 8c28: e5803000 str r3, [r0] 8c2c: e3e00000 mvn r0, #0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8c30: e28dd044 add sp, sp, #68 ; 0x44 8c34: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8c38: e5921030 ldr r1, [r2, #48] ; 0x30 8c3c: e3110040 tst r1, #64 ; 0x40 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8c40: e1a06002 mov r6, r2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8c44: 1affffca bne 8b74 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8c48: eb000f3c bl c940 <__errno> 8c4c: e3a0300d mov r3, #13 8c50: e5803000 str r3, [r0] 8c54: e3e00000 mvn r0, #0 8c58: eafffff4 b 8c30 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 8c5c: eb000f37 bl c940 <__errno> 8c60: e3a03002 mov r3, #2 8c64: e5803000 str r3, [r0] 8c68: e3e00000 mvn r0, #0 8c6c: eaffffef b 8c30 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 8c70: e1a00007 mov r0, r7 8c74: e3a01000 mov r1, #0 8c78: ebffff3c bl 8970 node = pathloc->node_access; 8c7c: e5976000 ldr r6, [r7] if ( !node ) 8c80: e3560000 cmp r6, #0 8c84: 0a000018 beq 8cec } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8c88: e596304c ldr r3, [r6, #76] ; 0x4c 8c8c: eaffffc6 b 8bac * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 8c90: e592805c ldr r8, [r2, #92] ; 0x5c 8c94: e3580000 cmp r8, #0 8c98: 0affffa7 beq 8b3c newloc = node->info.directory.mt_fs->mt_fs_root; 8c9c: e288801c add r8, r8, #28 8ca0: e8b8000f ldm r8!, {r0, r1, r2, r3} 8ca4: e28d602c add r6, sp, #44 ; 0x2c 8ca8: e8a6000f stmia r6!, {r0, r1, r2, r3} *pathloc = newloc; 8cac: e28de02c add lr, sp, #44 ; 0x2c 8cb0: e8be000f ldm lr!, {r0, r1, r2, r3} * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8cb4: e598e000 ldr lr, [r8] *pathloc = newloc; 8cb8: e1a08007 mov r8, r7 8cbc: e8a8000f stmia r8!, {r0, r1, r2, r3} 8cc0: e588e000 str lr, [r8] * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8cc4: e586e000 str lr, [r6] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8cc8: e06c0005 rsb r0, ip, r5 8ccc: e084100c add r1, r4, ip 8cd0: e08a0000 add r0, sl, r0 8cd4: e59d2004 ldr r2, [sp, #4] 8cd8: e1a03007 mov r3, r7 8cdc: e597c00c ldr ip, [r7, #12] 8ce0: e1a0e00f mov lr, pc 8ce4: e59cf000 ldr pc, [ip] 8ce8: eaffffd0 b 8c30 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8cec: eb000f13 bl c940 <__errno> 8cf0: e3a03014 mov r3, #20 8cf4: e5803000 str r3, [r0] 8cf8: e3e00000 mvn r0, #0 8cfc: eaffffcb b 8c30 * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8d00: e283601c add r6, r3, #28 8d04: e8b6000f ldm r6!, {r0, r1, r2, r3} 8d08: e28de02c add lr, sp, #44 ; 0x2c 8d0c: e8ae000f stmia lr!, {r0, r1, r2, r3} *pathloc = newloc; 8d10: e28dc02c add ip, sp, #44 ; 0x2c 8d14: e8bc000f ldm ip!, {r0, r1, r2, r3} * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8d18: e596c000 ldr ip, [r6] *pathloc = newloc; 8d1c: e1a06007 mov r6, r7 8d20: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8d24: e59d1040 ldr r1, [sp, #64] ; 0x40 * 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; 8d28: e586c000 str ip, [r6] * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8d2c: e58ec000 str ip, [lr] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8d30: e0610005 rsb r0, r1, r5 8d34: e08a0000 add r0, sl, r0 8d38: e0841001 add r1, r4, r1 8d3c: e59d2004 ldr r2, [sp, #4] 8d40: e1a03007 mov r3, r7 8d44: e597c00c ldr ip, [r7, #12] 8d48: e1a0e00f mov lr, pc 8d4c: e59cf000 ldr pc, [ip] 8d50: eaffffb6 b 8c30 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 8d54: e1a00007 mov r0, r7 8d58: e3a01000 mov r1, #0 8d5c: ebffff1d bl 89d8 node = pathloc->node_access; if ( result == -1 ) 8d60: e3700001 cmn r0, #1 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8d64: e5976000 ldr r6, [r7] if ( result == -1 ) 8d68: 0affffb0 beq 8c30 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8d6c: e596304c ldr r3, [r6, #76] ; 0x4c 8d70: eaffff8d b 8bac */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8d74: e2818008 add r8, r1, #8 8d78: eaffffc8 b 8ca0 00008e54 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8e54: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8e58: e24dd040 sub sp, sp, #64 ; 0x40 8e5c: e1a07001 mov r7, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8e60: e5915000 ldr r5, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8e64: e58d2000 str r2, [sp] 8e68: e1a0a000 mov sl, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8e6c: eb0012a4 bl d904 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8e70: e59fb290 ldr fp, [pc, #656] ; 9108 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8e74: e3a06000 mov r6, #0 8e78: e28d8004 add r8, sp, #4 8e7c: e28d903c add r9, sp, #60 ; 0x3c 8e80: e1a04000 mov r4, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8e84: e1a01004 mov r1, r4 8e88: e1a03009 mov r3, r9 8e8c: e08a0006 add r0, sl, r6 8e90: e1a02008 mov r2, r8 8e94: eb000159 bl 9400 pathlen -= len; i += len; if ( !pathloc->node_access ) 8e98: e5973000 ldr r3, [r7] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 8e9c: e59dc03c ldr ip, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 8ea0: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 8ea4: e06c4004 rsb r4, ip, r4 i += len; if ( !pathloc->node_access ) 8ea8: 0a000038 beq 8f90 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8eac: e3500000 cmp r0, #0 8eb0: 1a000005 bne 8ecc pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8eb4: eb000ea1 bl c940 <__errno> 8eb8: e3a03011 mov r3, #17 8ebc: e5803000 str r3, [r0] 8ec0: e3e00000 mvn r0, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8ec4: e28dd040 add sp, sp, #64 ; 0x40 8ec8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8ecc: e595204c ldr r2, [r5, #76] ; 0x4c 8ed0: e3520001 cmp r2, #1 8ed4: 11a05003 movne r5, r3 8ed8: 0a000031 beq 8fa4 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 8edc: e086600c add r6, r6, ip if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8ee0: e3500004 cmp r0, #4 8ee4: 979ff100 ldrls pc, [pc, r0, lsl #2] 8ee8: eaffffe5 b 8e84 <== NOT EXECUTED 8eec: 00008eb4 .word 0x00008eb4 <== NOT EXECUTED 8ef0: 00008e84 .word 0x00008e84 <== NOT EXECUTED 8ef4: 00008f64 .word 0x00008f64 <== NOT EXECUTED 8ef8: 00008f14 .word 0x00008f14 <== NOT EXECUTED 8efc: 00008f00 .word 0x00008f00 <== NOT EXECUTED case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8f00: eb000e8e bl c940 <__errno> 8f04: e3a0305b mov r3, #91 ; 0x5b 8f08: e5803000 str r3, [r0] 8f0c: e3e00000 mvn r0, #0 8f10: eaffffeb b 8ec4 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8f14: e593304c ldr r3, [r3, #76] ; 0x4c 8f18: e3530003 cmp r3, #3 8f1c: 0a000065 beq 90b8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8f20: e3530004 cmp r3, #4 8f24: 0a000063 beq 90b8 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 8f28: e3550000 cmp r5, #0 8f2c: 0a000048 beq 9054 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8f30: e595304c ldr r3, [r5, #76] ; 0x4c 8f34: e3530001 cmp r3, #1 8f38: 1a000045 bne 9054 /* * 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 ) { 8f3c: e595305c ldr r3, [r5, #92] ; 0x5c 8f40: e3530000 cmp r3, #0 8f44: 1a000047 bne 9068 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8f48: e1a00005 mov r0, r5 8f4c: e1a01008 mov r1, r8 8f50: eb0000fb bl 9344 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 8f54: e2505000 subs r5, r0, #0 8f58: 0a00001a beq 8fc8 done = true; else pathloc->node_access = node; 8f5c: e5875000 str r5, [r7] 8f60: eaffffc7 b 8e84 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8f64: e59b2000 ldr r2, [fp] 8f68: e5922018 ldr r2, [r2, #24] 8f6c: e1530002 cmp r3, r2 8f70: 0affffc3 beq 8e84 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8f74: e5975010 ldr r5, [r7, #16] 8f78: e595201c ldr r2, [r5, #28] 8f7c: e1530002 cmp r3, r2 8f80: 0a000053 beq 90d4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8f84: e5935008 ldr r5, [r3, #8] 8f88: e3550000 cmp r5, #0 8f8c: 1afffff2 bne 8f5c * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 8f90: eb000e6a bl c940 <__errno> 8f94: e3a03002 mov r3, #2 8f98: e5803000 str r3, [r0] 8f9c: e3e00000 mvn r0, #0 8fa0: eaffffc7 b 8ec4 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8fa4: e5932030 ldr r2, [r3, #48] ; 0x30 8fa8: e3120040 tst r2, #64 ; 0x40 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8fac: e1a05003 mov r5, r3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8fb0: 1affffc9 bne 8edc /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8fb4: eb000e61 bl c940 <__errno> 8fb8: e3a0300d mov r3, #13 8fbc: e5803000 str r3, [r0] 8fc0: e3e00000 mvn r0, #0 8fc4: eaffffbe b 8ec4 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8fc8: e59d303c ldr r3, [sp, #60] ; 0x3c 8fcc: e59d5000 ldr r5, [sp] 8fd0: e0633006 rsb r3, r3, r6 8fd4: e08a3003 add r3, sl, r3 8fd8: e5853000 str r3, [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++) { 8fdc: e7da3006 ldrb r3, [sl, r6] 8fe0: e3530000 cmp r3, #0 8fe4: 0a00000f beq 9028 if ( !IMFS_is_separator( path[ i ] ) ) 8fe8: e353002f cmp r3, #47 ; 0x2f 8fec: 1353005c cmpne r3, #92 ; 0x5c 8ff0: 1affffe6 bne 8f90 rtems_set_errno_and_return_minus_one( ENOENT ); 8ff4: e08a6006 add r6, sl, r6 /* * 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++) { 8ff8: e5d63001 ldrb r3, [r6, #1] 8ffc: e3530000 cmp r3, #0 9000: 0a000008 beq 9028 if ( !IMFS_is_separator( path[ i ] ) ) 9004: e353005c cmp r3, #92 ; 0x5c 9008: 1353002f cmpne r3, #47 ; 0x2f 900c: e2866001 add r6, r6, #1 9010: 0afffff8 beq 8ff8 rtems_set_errno_and_return_minus_one( ENOENT ); 9014: eb000e49 bl c940 <__errno> 9018: e3a03002 mov r3, #2 901c: e5803000 str r3, [r0] 9020: e3e00000 mvn r0, #0 9024: eaffffa6 b 8ec4 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 9028: e1a00007 mov r0, r7 902c: ebfffe21 bl 88b8 /* * The returned node must be a directory */ node = pathloc->node_access; 9030: e5973000 ldr r3, [r7] if ( node->type != IMFS_DIRECTORY ) 9034: e593204c ldr r2, [r3, #76] ; 0x4c 9038: e3520001 cmp r2, #1 903c: 1a000004 bne 9054 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 9040: e5933030 ldr r3, [r3, #48] ; 0x30 9044: e20330c0 and r3, r3, #192 ; 0xc0 9048: e35300c0 cmp r3, #192 ; 0xc0 904c: 1affffd8 bne 8fb4 9050: eaffff9b b 8ec4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 9054: eb000e39 bl c940 <__errno> 9058: e3a03014 mov r3, #20 905c: e5803000 str r3, [r0] 9060: e3e00000 mvn r0, #0 9064: eaffff96 b 8ec4 * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9068: e283401c add r4, r3, #28 906c: e8b4000f ldm r4!, {r0, r1, r2, r3} 9070: e28dc028 add ip, sp, #40 ; 0x28 9074: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 9078: e28de028 add lr, sp, #40 ; 0x28 907c: e8be000f ldm lr!, {r0, r1, r2, r3} * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9080: e594e000 ldr lr, [r4] *pathloc = newloc; 9084: e1a04007 mov r4, r7 9088: e8a4000f stmia r4!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 908c: e59d003c ldr r0, [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; 9090: e584e000 str lr, [r4] * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9094: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 9098: e0600006 rsb r0, r0, r6 909c: e08a0000 add r0, sl, r0 90a0: e1a01007 mov r1, r7 90a4: e59d2000 ldr r2, [sp] 90a8: e597300c ldr r3, [r7, #12] 90ac: e1a0e00f mov lr, pc 90b0: e593f004 ldr pc, [r3, #4] 90b4: eaffff82 b 8ec4 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 90b8: e1a00007 mov r0, r7 90bc: e3a01000 mov r1, #0 90c0: ebffff2e bl 8d80 if ( result == -1 ) 90c4: e3700001 cmn r0, #1 90c8: 0affff7d beq 8ec4 90cc: e5975000 ldr r5, [r7] 90d0: eaffff94 b 8f28 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 90d4: e2855008 add r5, r5, #8 90d8: e8b5000f ldm r5!, {r0, r1, r2, r3} 90dc: e28d4028 add r4, sp, #40 ; 0x28 90e0: e8a4000f stmia r4!, {r0, r1, r2, r3} *pathloc = newloc; 90e4: e28de028 add lr, sp, #40 ; 0x28 90e8: e8be000f ldm lr!, {r0, r1, r2, r3} if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 90ec: e595e000 ldr lr, [r5] *pathloc = newloc; 90f0: e1a05007 mov r5, r7 90f4: e8a5000f stmia r5!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 90f8: e06c0006 rsb r0, ip, r6 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 90fc: e585e000 str lr, [r5] if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 9100: e584e000 str lr, [r4] 9104: eaffffe4 b 909c 00008970 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 8970: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8974: e593204c ldr r2, [r3, #76] ; 0x4c 8978: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 897c: e92d4030 push {r4, r5, lr} 8980: e1a04000 mov r4, r0 8984: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8988: 1a00000f bne 89cc /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 898c: e5933050 ldr r3, [r3, #80] ; 0x50 8990: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 8994: ebffffc7 bl 88b8 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8998: e5943000 ldr r3, [r4] 899c: e5933030 ldr r3, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 89a0: e1a05305 lsl r5, r5, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 89a4: e0053003 and r3, r5, r3 89a8: e1550003 cmp r5, r3 89ac: 0a000004 beq 89c4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 89b0: eb000fe2 bl c940 <__errno> <== NOT EXECUTED 89b4: e3a0300d mov r3, #13 <== NOT EXECUTED 89b8: e5803000 str r3, [r0] <== NOT EXECUTED 89bc: e3e00000 mvn r0, #0 <== NOT EXECUTED 89c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 89c4: e3a00000 mov r0, #0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 89c8: e8bd8030 pop {r4, r5, pc} /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 89cc: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 89d0: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 89d4: ebfff330 bl 569c <== NOT EXECUTED 00008950 : /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8950: e5903000 ldr r3, [r0] <== NOT EXECUTED 8954: e5933030 ldr r3, [r3, #48] ; 0x30 <== NOT EXECUTED 8958: e1a01301 lsl r1, r1, #6 <== NOT EXECUTED 895c: e0013003 and r3, r1, r3 <== NOT EXECUTED return 1; return 0; } 8960: e1510003 cmp r1, r3 <== NOT EXECUTED 8964: 13a00000 movne r0, #0 <== NOT EXECUTED 8968: 03a00001 moveq r0, #1 <== NOT EXECUTED 896c: e12fff1e bx lr <== NOT EXECUTED 000089d8 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 89d8: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 89dc: e590e000 ldr lr, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 89e0: e59e304c ldr r3, [lr, #76] ; 0x4c 89e4: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 89e8: e1a04000 mov r4, r0 89ec: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 89f0: 1a000031 bne 8abc rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 89f4: e59e3008 ldr r3, [lr, #8] 89f8: e3530000 cmp r3, #0 89fc: 0a00002b beq 8ab0 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 8a00: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( 8a04: e59e2050 ldr r2, [lr, #80] ; 0x50 8a08: e5d23000 ldrb r3, [r2] 8a0c: e353002f cmp r3, #47 ; 0x2f 8a10: 1353005c cmpne r3, #92 ; 0x5c 8a14: 13a06000 movne r6, #0 8a18: 03a06001 moveq r6, #1 8a1c: 1a000020 bne 8aa4 8a20: e59f30a0 ldr r3, [pc, #160] ; 8ac8 8a24: e593c000 ldr ip, [r3] 8a28: e28cc018 add ip, ip, #24 8a2c: e8bc000f ldm ip!, {r0, r1, r2, r3} 8a30: e1a06004 mov r6, r4 8a34: e8a6000f stmia r6!, {r0, r1, r2, r3} 8a38: e59c2000 ldr r2, [ip] 8a3c: e5862000 str r2, [r6] 8a40: e59e2050 ldr r2, [lr, #80] ; 0x50 8a44: e3a06001 mov r6, #1 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 8a48: e0826006 add r6, r2, r6 8a4c: e1a00006 mov r0, r6 8a50: eb0013ab bl d904 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 8a54: e1a02005 mov r2, r5 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 8a58: e1a01000 mov r1, r0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 8a5c: e1a03004 mov r3, r4 8a60: e1a00006 mov r0, r6 8a64: eb000018 bl 8acc 8a68: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 8a6c: e1a00004 mov r0, r4 8a70: ebffff90 bl 88b8 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8a74: e5943000 ldr r3, [r4] 8a78: e5933030 ldr r3, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8a7c: e1a05305 lsl r5, r5, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8a80: e0053003 and r3, r5, r3 8a84: e1550003 cmp r5, r3 8a88: 0a000003 beq 8a9c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8a8c: eb000fab bl c940 <__errno> <== NOT EXECUTED 8a90: e3a0300d mov r3, #13 <== NOT EXECUTED 8a94: e5803000 str r3, [r0] <== NOT EXECUTED 8a98: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 8a9c: e1a00006 mov r0, r6 8aa0: e8bd8070 pop {r4, r5, r6, pc} * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 8aa4: e3530000 cmp r3, #0 8aa8: 1affffe6 bne 8a48 8aac: eaffffdb b 8a20 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 8ab0: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED 8ab4: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED 8ab8: ebfff2f7 bl 569c <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8abc: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 8ac0: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 8ac4: ebfff2f4 bl 569c <== NOT EXECUTED 00009298 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 9298: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 929c: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 92a0: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 92a4: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 92a8: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED 92ac: eb00087c bl b4a4 <== NOT EXECUTED if (! err) { 92b0: e2506000 subs r6, r0, #0 <== NOT EXECUTED 92b4: 0a000002 beq 92c4 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 92b8: ba00000e blt 92f8 <== NOT EXECUTED } 92bc: e1a00006 mov r0, r6 <== NOT EXECUTED 92c0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 92c4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 92c8: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 92cc: e5843014 str r3, [r4, #20] <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 92d0: e1a00005 mov r0, r5 <== NOT EXECUTED 92d4: eb00021b bl 9b48 <== NOT EXECUTED 92d8: e3500000 cmp r0, #0 <== NOT EXECUTED 92dc: 1afffff6 bne 92bc <== NOT EXECUTED 92e0: e1d533b4 ldrh r3, [r5, #52] ; 0x34 <== NOT EXECUTED 92e4: e3530000 cmp r3, #0 <== NOT EXECUTED 92e8: 1afffff3 bne 92bc <== NOT EXECUTED free(jnode); 92ec: e1a00005 mov r0, r5 <== NOT EXECUTED 92f0: ebffe1fa bl 1ae0 <== NOT EXECUTED 92f4: eafffff0 b 92bc <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 92f8: eb000d90 bl c940 <__errno> <== NOT EXECUTED 92fc: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 9300: e5806000 str r6, [r0] <== NOT EXECUTED 9304: e3e06000 mvn r6, #0 <== NOT EXECUTED 9308: eaffffeb b 92bc <== NOT EXECUTED 00009164 : void *buffer ) { int err; if (command == FIONBIO) { 9164: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED 9168: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED 916c: e283313a add r3, r3, #-2147483634 ; 0x8000000e <== NOT EXECUTED 9170: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 9174: e92d4010 push {r4, lr} <== NOT EXECUTED 9178: e1a03002 mov r3, r2 <== NOT EXECUTED int err; if (command == FIONBIO) { 917c: 0a00000a beq 91ac <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 9180: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED 9184: e1a03000 mov r3, r0 <== NOT EXECUTED 9188: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED 918c: eb0007bd bl b088 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9190: e3500000 cmp r0, #0 <== NOT EXECUTED 9194: a8bd8010 popge {r4, pc} <== NOT EXECUTED 9198: e2604000 rsb r4, r0, #0 <== NOT EXECUTED 919c: eb000de7 bl c940 <__errno> <== NOT EXECUTED 91a0: e5804000 str r4, [r0] <== NOT EXECUTED 91a4: e3e00000 mvn r0, #0 <== NOT EXECUTED } 91a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 91ac: e3520000 cmp r2, #0 <== NOT EXECUTED 91b0: 03a0400e moveq r4, #14 <== NOT EXECUTED 91b4: 0afffff8 beq 919c <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 91b8: e5924000 ldr r4, [r2] <== NOT EXECUTED 91bc: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 91c0: 15903014 ldrne r3, [r0, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 91c4: 05903014 ldreq r3, [r0, #20] <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 91c8: 13833001 orrne r3, r3, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 91cc: 03c33001 biceq r3, r3, #1 <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 91d0: 15803014 strne r3, [r0, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 91d4: 05803014 streq r3, [r0, #20] <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 91d8: 13a00000 movne r0, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 91dc: 01a00004 moveq r0, r4 <== NOT EXECUTED 91e0: e8bd8010 pop {r4, pc} <== NOT EXECUTED 0000910c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 910c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 9110: e1a0c000 mov ip, r0 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 9114: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 9118: e24dd004 sub sp, sp, #4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 911c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 9120: e58dc000 str ip, [sp] <== NOT EXECUTED 9124: eb0007b9 bl b010 <== NOT EXECUTED 9128: e1a03000 mov r3, r0 <== NOT EXECUTED 912c: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9130: e3540000 cmp r4, #0 <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 9134: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9138: ba000003 blt 914c <== NOT EXECUTED } 913c: e1a01004 mov r1, r4 <== NOT EXECUTED 9140: e1a00003 mov r0, r3 <== NOT EXECUTED 9144: e28dd004 add sp, sp, #4 <== NOT EXECUTED 9148: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 914c: eb000dfb bl c940 <__errno> <== NOT EXECUTED 9150: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9154: e5805000 str r5, [r0] <== NOT EXECUTED 9158: e3e03000 mvn r3, #0 <== NOT EXECUTED 915c: e3e04000 mvn r4, #0 <== NOT EXECUTED 9160: eafffff5 b 913c <== NOT EXECUTED 00009240 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 9240: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 9244: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 9248: e1a03000 mov r3, r0 <== NOT EXECUTED 924c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 9250: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 9254: eb000824 bl b2ec <== NOT EXECUTED if (err > 0) 9258: e2505000 subs r5, r0, #0 <== NOT EXECUTED 925c: da000007 ble 9280 <== NOT EXECUTED IMFS_update_atime(jnode); 9260: e1a0000d mov r0, sp <== NOT EXECUTED 9264: e3a01000 mov r1, #0 <== NOT EXECUTED 9268: eb000208 bl 9a90 <== NOT EXECUTED 926c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 9270: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 9274: e1a00005 mov r0, r5 <== NOT EXECUTED 9278: e28dd008 add sp, sp, #8 <== NOT EXECUTED 927c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 9280: 0afffffb beq 9274 <== NOT EXECUTED 9284: eb000dad bl c940 <__errno> <== NOT EXECUTED 9288: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 928c: e5805000 str r5, [r0] <== NOT EXECUTED 9290: e3e05000 mvn r5, #0 <== NOT EXECUTED 9294: eafffff6 b 9274 <== NOT EXECUTED 000091e4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 91e4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 91e8: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 91ec: e1a03000 mov r3, r0 <== NOT EXECUTED 91f0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 91f4: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 91f8: eb0007bb bl b0ec <== NOT EXECUTED if (err > 0) { 91fc: e2505000 subs r5, r0, #0 <== NOT EXECUTED 9200: da000008 ble 9228 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 9204: e1a0000d mov r0, sp <== NOT EXECUTED 9208: e3a01000 mov r1, #0 <== NOT EXECUTED 920c: eb00021f bl 9a90 <== NOT EXECUTED 9210: e59d3000 ldr r3, [sp] <== NOT EXECUTED 9214: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 9218: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 921c: e1a00005 mov r0, r5 <== NOT EXECUTED 9220: e28dd008 add sp, sp, #8 <== NOT EXECUTED 9224: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 9228: 0afffffb beq 921c <== NOT EXECUTED 922c: eb000dc3 bl c940 <__errno> <== NOT EXECUTED 9230: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9234: e5805000 str r5, [r0] <== NOT EXECUTED 9238: e3e05000 mvn r5, #0 <== NOT EXECUTED 923c: eafffff6 b 921c <== NOT EXECUTED 00009344 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 9344: e92d4070 push {r4, r5, r6, lr} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 9348: e2505000 subs r5, r0, #0 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 934c: e1a04001 mov r4, r1 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 9350: 0a000020 beq 93d8 if ( !name ) 9354: e3510000 cmp r1, #0 9358: 0a00000c beq 9390 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 935c: e1a00001 mov r0, r1 9360: e59f1084 ldr r1, [pc, #132] ; 93ec 9364: eb00109e bl d5e4 9368: e3500000 cmp r0, #0 936c: 0a000005 beq 9388 return directory; if ( !strcmp( name, dotdotname ) ) 9370: e1a00004 mov r0, r4 9374: e59f1074 ldr r1, [pc, #116] ; 93f0 9378: eb001099 bl d5e4 937c: e3500000 cmp r0, #0 return directory->Parent; 9380: 05955008 ldreq r5, [r5, #8] */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 9384: 1a000004 bne 939c if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 9388: e1a00005 mov r0, r5 938c: e8bd8070 pop {r4, r5, r6, pc} if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 9390: e3a05000 mov r5, #0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 9394: e1a00005 mov r0, r5 9398: e8bd8070 pop {r4, r5, r6, pc} if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 939c: e5956050 ldr r6, [r5, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 93a0: e2855054 add r5, r5, #84 ; 0x54 93a4: e1560005 cmp r6, r5 93a8: 1a000003 bne 93bc 93ac: eafffff7 b 9390 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 93b0: e5966000 ldr r6, [r6] if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 93b4: e1560005 cmp r6, r5 93b8: 0afffff4 beq 9390 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 93bc: e1a00004 mov r0, r4 93c0: e286100c add r1, r6, #12 93c4: eb001086 bl d5e4 93c8: e3500000 cmp r0, #0 93cc: 1afffff7 bne 93b0 93d0: e1a05006 mov r5, r6 93d4: eaffffeb b 9388 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 93d8: e59f0014 ldr r0, [pc, #20] ; 93f4 <== NOT EXECUTED 93dc: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED 93e0: e59f2010 ldr r2, [pc, #16] ; 93f8 <== NOT EXECUTED 93e4: e59f3010 ldr r3, [pc, #16] ; 93fc <== NOT EXECUTED 93e8: eb000118 bl 9850 <__assert_func> <== NOT EXECUTED 0000e564 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { e564: 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; e568: e1a0c000 mov ip, r0 e56c: 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 ) { e570: e24dd014 sub sp, sp, #20 e574: e1a0e000 mov lr, 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; e578: e8bc000f ldm ip!, {r0, r1, r2, r3} e57c: e1a0600d mov r6, sp e580: e8a6000f stmia r6!, {r0, r1, r2, r3} e584: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; e588: e3a03000 mov r3, #0 * 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; e58c: e5862000 str r2, [r6] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; e590: e58e301c str r3, [lr, #28] * 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; e594: e1a0500d mov r5, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); e598: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; e59c: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; e5a0: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); e5a4: ebfffd49 bl dad0 if ( jnode->type != IMFS_DIRECTORY ) { e5a8: e594304c ldr r3, [r4, #76] ; 0x4c e5ac: e3530001 cmp r3, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; e5b0: e2842054 add r2, r4, #84 ; 0x54 e5b4: 1a000010 bne e5fc e5b8: e5943050 ldr r3, [r4, #80] ; 0x50 e5bc: e1530002 cmp r3, r2 e5c0: 0a00000d beq e5fc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { e5c4: e3540000 cmp r4, #0 e5c8: 0a000008 beq e5f0 if ( jnode->type == IMFS_DIRECTORY ) { e5cc: e594304c ldr r3, [r4, #76] ; 0x4c e5d0: e3530001 cmp r3, #1 e5d4: 1affffef bne e598 e5d8: e5943050 ldr r3, [r4, #80] ; 0x50 e5dc: e2842054 add r2, r4, #84 ; 0x54 e5e0: e1530002 cmp r3, r2 e5e4: 0affffeb beq e598 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); e5e8: e2534000 subs r4, r3, #0 e5ec: 1affffe9 bne e598 e5f0: e3a00000 mov r0, #0 return 0; } e5f4: e28dd014 add sp, sp, #20 e5f8: e8bd8070 pop {r4, r5, r6, pc} result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); e5fc: e3a00000 mov r0, #0 e600: e1a0100d mov r1, sp e604: ebffd11e bl 2a84 if (result != 0) e608: e3500000 cmp r0, #0 e60c: 01a04006 moveq r4, r6 e610: 0affffeb beq e5c4 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); e614: e3e00000 mvn r0, #0 <== NOT EXECUTED e618: eafffff5 b e5f4 <== NOT EXECUTED 000094ec : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 94ec: e59fc0dc ldr ip, [pc, #220] ; 95d0 94f0: e59cc000 ldr ip, [ip] int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 94f4: e35c0010 cmp ip, #16 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 94f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 94fc: e1a04000 mov r4, r0 9500: e1a07001 mov r7, r1 9504: e1a08002 mov r8, r2 9508: e1a06003 mov r6, r3 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 950c: 0a000008 beq 9534 9510: e3a03000 mov r3, #0 9514: e3a02020 mov r2, #32 9518: e15c0002 cmp ip, r2 951c: e2833001 add r3, r3, #1 9520: 0a000003 beq 9534 9524: e3530005 cmp r3, #5 9528: e1a02082 lsl r2, r2, #1 952c: 1afffff9 bne 9518 9530: e3a0c080 mov ip, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 9534: e59f5098 ldr r5, [pc, #152] ; 95d4 9538: e585c000 str ip, [r5] /* * 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(); 953c: eb000933 bl ba10 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; 9540: e59fe090 ldr lr, [pc, #144] ; 95d8 /* * 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(); 9544: e584001c str r0, [r4, #28] 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; 9548: e8be000f ldm lr!, {r0, r1, r2, r3} 954c: e284c038 add ip, r4, #56 ; 0x38 9550: e8ac000f stmia ip!, {r0, r1, r2, r3} 9554: e8be000f ldm lr!, {r0, r1, r2, r3} 9558: e8ac000f stmia ip!, {r0, r1, r2, r3} 955c: e89e000f ldm lr, {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; 9560: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 9564: e88c000f stm ip, {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; 9568: e5846024 str r6, [r4, #36] ; 0x24 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 ) ); 956c: e3a00001 mov r0, #1 9570: e3a01010 mov r1, #16 9574: eb0000c8 bl 989c if ( !fs_info ) { 9578: e3500000 cmp r0, #0 957c: 0a00000c beq 95b4 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 9580: e5952004 ldr r2, [r5, #4] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 9584: e594101c ldr r1, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 9588: e3a03001 mov r3, #1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 958c: e880000c stm r0, {r2, r3} fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 9590: e580600c str r6, [r0, #12] * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 9594: e5808008 str r8, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 9598: e0822003 add r2, r2, r3 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; 959c: e5840034 str r0, [r4, #52] ; 0x34 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 95a0: e5813038 str r3, [r1, #56] ; 0x38 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 95a4: e5852004 str r2, [r5, #4] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 95a8: eb00069a bl b018 95ac: e3a00000 mov r0, #0 return 0; } 95b0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 95b4: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 95b8: ebffe148 bl 1ae0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 95bc: eb000cdf bl c940 <__errno> <== NOT EXECUTED 95c0: e3a0300c mov r3, #12 <== NOT EXECUTED 95c4: e5803000 str r3, [r0] <== NOT EXECUTED 95c8: e3e00000 mvn r0, #0 <== NOT EXECUTED 95cc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 0000273c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 273c: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 2740: 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 */ ) { 2744: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 2748: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 274c: e1d333b4 ldrh r3, [r3, #52] ; 0x34 2750: e3530007 cmp r3, #7 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 2754: e1a05001 mov r5, r1 2758: 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 ) 275c: 8a00001e bhi 27dc rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 2760: e1a00002 mov r0, r2 2764: eb004209 bl 12f90 2768: e28d4004 add r4, sp, #4 276c: e1a01000 mov r1, r0 2770: e1a02004 mov r2, r4 2774: e28d3044 add r3, sp, #68 ; 0x44 2778: e1a00006 mov r0, r6 277c: eb002fd5 bl e6d8 * 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( 2780: e3a03ca2 mov r3, #41472 ; 0xa200 2784: e28dc028 add ip, sp, #40 ; 0x28 2788: e1a00005 mov r0, r5 278c: e1a02004 mov r2, r4 2790: e2433001 sub r3, r3, #1 2794: e3a01003 mov r1, #3 2798: e58dc000 str ip, [sp] 279c: eb002c79 bl d988 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 27a0: e3500000 cmp r0, #0 27a4: 0a000011 beq 27f0 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++; 27a8: e59d3028 ldr r3, [sp, #40] ; 0x28 27ac: e1d323b4 ldrh r2, [r3, #52] ; 0x34 27b0: e2822001 add r2, r2, #1 27b4: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 27b8: e28d003c add r0, sp, #60 ; 0x3c 27bc: e3a01000 mov r1, #0 27c0: eb00027e bl 31c0 27c4: e59d203c ldr r2, [sp, #60] ; 0x3c 27c8: e59d3028 ldr r3, [sp, #40] ; 0x28 27cc: e5832048 str r2, [r3, #72] ; 0x48 27d0: e3a00000 mov r0, #0 return 0; } 27d4: e28dd048 add sp, sp, #72 ; 0x48 27d8: e8bd8070 pop {r4, r5, r6, pc} /* * 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 ) rtems_set_errno_and_return_minus_one( EMLINK ); 27dc: eb003e12 bl 1202c <__errno> 27e0: e3a0301f mov r3, #31 27e4: e5803000 str r3, [r0] 27e8: e3e00000 mvn r0, #0 27ec: eafffff8 b 27d4 ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 27f0: eb003e0d bl 1202c <__errno> <== NOT EXECUTED 27f4: e3a0300c mov r3, #12 <== NOT EXECUTED 27f8: e5803000 str r3, [r0] <== NOT EXECUTED 27fc: e3e00000 mvn r0, #0 <== NOT EXECUTED 2800: eafffff3 b 27d4 <== NOT EXECUTED 00010b04 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 10b04: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 10b08: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 10b0c: 0a00000f beq 10b50 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 10b10: e593304c ldr r3, [r3, #76] ; 0x4c 10b14: e3530005 cmp r3, #5 10b18: 1a000012 bne 10b68 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 10b1c: e3a02001 mov r2, #1 10b20: ebfffe94 bl 10578 if ( *block_entry_ptr ) 10b24: e5904000 ldr r4, [r0] 10b28: e3540000 cmp r4, #0 assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 10b2c: e1a05000 mov r5, r0 if ( *block_entry_ptr ) 10b30: 13a00000 movne r0, #0 10b34: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 10b38: ebfffe81 bl 10544 if ( !memory ) 10b3c: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; 10b40: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 10b44: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; 10b48: 11a00004 movne r0, r4 return 0; } 10b4c: e8bd8030 pop {r4, r5, pc} ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 10b50: e3a01f5a mov r1, #360 ; 0x168 <== NOT EXECUTED 10b54: e2811001 add r1, r1, #1 <== NOT EXECUTED 10b58: e59f0020 ldr r0, [pc, #32] ; 10b80 <== NOT EXECUTED 10b5c: e59f2020 ldr r2, [pc, #32] ; 10b84 <== NOT EXECUTED 10b60: e59f3020 ldr r3, [pc, #32] ; 10b88 <== NOT EXECUTED 10b64: ebfff77d bl e960 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 10b68: e3a01f5b mov r1, #364 ; 0x16c <== NOT EXECUTED 10b6c: e2811001 add r1, r1, #1 <== NOT EXECUTED 10b70: e59f0008 ldr r0, [pc, #8] ; 10b80 <== NOT EXECUTED 10b74: e59f2008 ldr r2, [pc, #8] ; 10b84 <== NOT EXECUTED 10b78: e59f300c ldr r3, [pc, #12] ; 10b8c <== NOT EXECUTED 10b7c: ebfff777 bl e960 <__assert_func> <== NOT EXECUTED 00010b90 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 10b90: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 10b94: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 10b98: e24dd004 sub sp, sp, #4 10b9c: e1a08001 mov r8, r1 10ba0: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 10ba4: 0a00004f beq 10ce8 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 10ba8: e594304c ldr r3, [r4, #76] ; 0x4c 10bac: e3530005 cmp r3, #5 10bb0: 1a000046 bne 10cd0 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 10bb4: e59f3144 ldr r3, [pc, #324] ; 10d00 10bb8: e593b000 ldr fp, [r3] 10bbc: e1a0312b lsr r3, fp, #2 10bc0: e0213393 mla r1, r3, r3, r3 10bc4: e0223391 mla r2, r1, r3, r3 10bc8: e3a03000 mov r3, #0 10bcc: e1530006 cmp r3, r6 10bd0: e2423001 sub r3, r2, #1 10bd4: e002039b mul r2, fp, r3 10bd8: da000034 ble 10cb0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 10bdc: e5947054 ldr r7, [r4, #84] ; 0x54 10be0: e1560007 cmp r6, r7 10be4: e594a050 ldr sl, [r4, #80] ; 0x50 10be8: da000027 ble 10c8c /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 10bec: e1a0cfcb asr ip, fp, #31 10bf0: e1a0300c mov r3, ip 10bf4: e1a0200b mov r2, fp 10bf8: e1a00008 mov r0, r8 10bfc: e1a01006 mov r1, r6 10c00: e58dc000 str ip, [sp] 10c04: eb002d26 bl 1c0a4 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 10c08: e59dc000 ldr ip, [sp] /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 10c0c: e1a05000 mov r5, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 10c10: e1a01007 mov r1, r7 10c14: e1a0000a mov r0, sl 10c18: e1a0200b mov r2, fp 10c1c: e1a0300c mov r3, ip 10c20: eb002d1f bl 1c0a4 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10c24: e1550000 cmp r5, r0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 10c28: e1a0a000 mov sl, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10c2c: 3a00001b bcc 10ca0 10c30: e1a07000 mov r7, r0 10c34: ea000002 b 10c44 10c38: e2877001 add r7, r7, #1 10c3c: e1550007 cmp r5, r7 10c40: 3a000016 bcc 10ca0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 10c44: e1a00004 mov r0, r4 10c48: e1a01007 mov r1, r7 10c4c: ebffffac bl 10b04 10c50: e3500000 cmp r0, #0 10c54: 0afffff7 beq 10c38 10c58: ea000003 b 10c6c <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 10c5c: e1a01007 mov r1, r7 <== NOT EXECUTED 10c60: e1a00004 mov r0, r4 <== 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-- ) { 10c64: e2477001 sub r7, r7, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 10c68: ebfffef5 bl 10844 <== 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-- ) { 10c6c: e15a0007 cmp sl, r7 <== NOT EXECUTED 10c70: 9afffff9 bls 10c5c <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 10c74: eb0004ec bl 1202c <__errno> <== NOT EXECUTED 10c78: e3a0301c mov r3, #28 <== NOT EXECUTED 10c7c: e5803000 str r3, [r0] <== NOT EXECUTED 10c80: e3e00000 mvn r0, #0 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 10c84: e28dd004 add sp, sp, #4 10c88: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc} rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 10c8c: 1a000001 bne 10c98 10c90: e158000a cmp r8, sl 10c94: 8affffd4 bhi 10bec /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 10c98: e3a00000 mov r0, #0 return 0; 10c9c: eafffff8 b 10c84 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 10ca0: e5846054 str r6, [r4, #84] ; 0x54 10ca4: e5848050 str r8, [r4, #80] ; 0x50 10ca8: e3a00000 mov r0, #0 10cac: eafffff4 b 10c84 assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 10cb0: 1a000001 bne 10cbc 10cb4: e1520008 cmp r2, r8 10cb8: 8affffc7 bhi 10bdc rtems_set_errno_and_return_minus_one( EINVAL ); 10cbc: eb0004da bl 1202c <__errno> <== NOT EXECUTED 10cc0: e3a03016 mov r3, #22 <== NOT EXECUTED 10cc4: e5803000 str r3, [r0] <== NOT EXECUTED 10cc8: e3e00000 mvn r0, #0 <== NOT EXECUTED 10ccc: eaffffec b 10c84 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 10cd0: e3a01f4d mov r1, #308 ; 0x134 <== NOT EXECUTED 10cd4: e2811001 add r1, r1, #1 <== NOT EXECUTED 10cd8: e59f0024 ldr r0, [pc, #36] ; 10d04 <== NOT EXECUTED 10cdc: e59f2024 ldr r2, [pc, #36] ; 10d08 <== NOT EXECUTED 10ce0: e59f3024 ldr r3, [pc, #36] ; 10d0c <== NOT EXECUTED 10ce4: ebfff71d bl e960 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 10ce8: e3a01e13 mov r1, #304 ; 0x130 <== NOT EXECUTED 10cec: e2811001 add r1, r1, #1 <== NOT EXECUTED 10cf0: e59f000c ldr r0, [pc, #12] ; 10d04 <== NOT EXECUTED 10cf4: e59f200c ldr r2, [pc, #12] ; 10d08 <== NOT EXECUTED 10cf8: e59f3010 ldr r3, [pc, #16] ; 10d10 <== NOT EXECUTED 10cfc: ebfff717 bl e960 <__assert_func> <== NOT EXECUTED 00010578 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 10578: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 1057c: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 10580: e24dd004 sub sp, sp, #4 /* * Perform internal consistency checks */ assert( the_jnode ); 10584: 0a000078 beq 1076c if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 10588: e594304c ldr r3, [r4, #76] ; 0x4c 1058c: e3530005 cmp r3, #5 10590: 1a000070 bne 10758 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 10594: e59f320c ldr r3, [pc, #524] ; 107a8 10598: e5935000 ldr r5, [r3] 1059c: e1a05125 lsr r5, r5, #2 105a0: e2453001 sub r3, r5, #1 105a4: e1510003 cmp r1, r3 105a8: 9a000019 bls 10614 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 105ac: e0265595 mla r6, r5, r5, r5 <== NOT EXECUTED 105b0: e2463001 sub r3, r6, #1 <== NOT EXECUTED 105b4: e1510003 cmp r1, r3 <== NOT EXECUTED 105b8: 8a000025 bhi 10654 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 105bc: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 105c0: e1a00006 mov r0, r6 <== NOT EXECUTED 105c4: e1a01005 mov r1, r5 <== NOT EXECUTED 105c8: e58d2000 str r2, [sp] <== NOT EXECUTED 105cc: eb002c07 bl 1b5f0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 105d0: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 105d4: e1a07000 mov r7, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 105d8: e1a00006 mov r0, r6 <== NOT EXECUTED 105dc: eb002bbf bl 1b4e0 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 105e0: e59d2000 ldr r2, [sp] <== NOT EXECUTED 105e4: e3520000 cmp r2, #0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 105e8: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; 105ec: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { 105f0: 0a000044 beq 10708 <== NOT EXECUTED if ( !p ) { 105f4: e3530000 cmp r3, #0 <== NOT EXECUTED 105f8: 0a000049 beq 10724 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 105fc: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p1 ) { 10600: e3500000 cmp r0, #0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 10604: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { 10608: 0a000034 beq 106e0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 1060c: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 10610: ea000005 b 1062c <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 10614: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 10618: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { 1061c: 0a000035 beq 106f8 if ( !p ) { 10620: e3500000 cmp r0, #0 10624: 0a000002 beq 10634 } if ( !p ) return 0; return &info->indirect[ my_block ]; 10628: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } 1062c: e28dd004 add sp, sp, #4 10630: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 10634: e58d1000 str r1, [sp] 10638: ebffffc1 bl 10544 if ( !p ) 1063c: e3500000 cmp r0, #0 10640: e59d1000 ldr r1, [sp] return 0; info->indirect = p; 10644: 15840058 strne r0, [r4, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 10648: 1afffff6 bne 10628 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 1064c: e3a00000 mov r0, #0 <== NOT EXECUTED 10650: eafffff5 b 1062c <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 10654: e0235596 mla r3, r6, r5, r5 <== NOT EXECUTED 10658: e2433001 sub r3, r3, #1 <== NOT EXECUTED 1065c: e1510003 cmp r1, r3 <== NOT EXECUTED 10660: 8afffff9 bhi 1064c <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 10664: e0666001 rsb r6, r6, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 10668: e1a00006 mov r0, r6 <== NOT EXECUTED 1066c: e1a01005 mov r1, r5 <== NOT EXECUTED 10670: e58d2000 str r2, [sp] <== NOT EXECUTED 10674: eb002bdd bl 1b5f0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 10678: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1067c: e1a07000 mov r7, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 10680: e1a00006 mov r0, r6 <== NOT EXECUTED 10684: eb002b95 bl 1b4e0 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 10688: e1a01005 mov r1, r5 <== NOT EXECUTED 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; 1068c: e1a08000 mov r8, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 10690: eb002b92 bl 1b4e0 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 10694: e1a01005 mov r1, r5 <== NOT EXECUTED 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; 10698: e1a06000 mov r6, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 1069c: e1a00008 mov r0, r8 <== NOT EXECUTED 106a0: eb002bd2 bl 1b5f0 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 106a4: e59d2000 ldr r2, [sp] <== NOT EXECUTED 106a8: e3520000 cmp r2, #0 <== NOT EXECUTED 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; 106ac: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; 106b0: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { 106b4: 0a00001f beq 10738 <== NOT EXECUTED if ( !p ) { 106b8: e3530000 cmp r3, #0 <== NOT EXECUTED 106bc: 0a000034 beq 10794 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 106c0: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) { 106c4: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 106c8: e0836106 add r6, r3, r6, lsl #2 <== NOT EXECUTED if ( !p1 ) { 106cc: 0a00002b beq 10780 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 106d0: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { 106d4: e3500000 cmp r0, #0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 106d8: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { 106dc: 1affffca bne 1060c <== NOT EXECUTED p2 = memfile_alloc_block(); 106e0: ebffff97 bl 10544 <== NOT EXECUTED if ( !p2 ) 106e4: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 106e8: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 106ec: 0affffd6 beq 1064c <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 106f0: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 106f4: eaffffcc b 1062c <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 106f8: e3500000 cmp r0, #0 106fc: 1affffc9 bne 10628 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 10700: e3a00000 mov r0, #0 <== NOT EXECUTED 10704: eaffffc8 b 1062c <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 10708: e3530000 cmp r3, #0 <== NOT EXECUTED 1070c: 0affffce beq 1064c <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 10710: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED if ( !p ) 10714: e3500000 cmp r0, #0 <== NOT EXECUTED 10718: 0affffcb beq 1064c <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 1071c: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 10720: eaffffc1 b 1062c <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 10724: ebffff86 bl 10544 <== NOT EXECUTED if ( !p ) 10728: e2503000 subs r3, r0, #0 <== NOT EXECUTED 1072c: 0affffc6 beq 1064c <== NOT EXECUTED return 0; info->doubly_indirect = p; 10730: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED 10734: eaffffb0 b 105fc <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 10738: e3530000 cmp r3, #0 <== NOT EXECUTED 1073c: 0affffc2 beq 1064c <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 10740: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) 10744: e3530000 cmp r3, #0 <== NOT EXECUTED 10748: 0affffbf beq 1064c <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 1074c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED 10750: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 10754: eaffffb4 b 1062c <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 10758: e59f004c ldr r0, [pc, #76] ; 107ac <== NOT EXECUTED 1075c: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED 10760: e59f2048 ldr r2, [pc, #72] ; 107b0 <== NOT EXECUTED 10764: e59f3048 ldr r3, [pc, #72] ; 107b4 <== NOT EXECUTED 10768: ebfff87c bl e960 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 1076c: e59f0038 ldr r0, [pc, #56] ; 107ac <== NOT EXECUTED 10770: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED 10774: e59f2034 ldr r2, [pc, #52] ; 107b0 <== NOT EXECUTED 10778: e59f3038 ldr r3, [pc, #56] ; 107b8 <== NOT EXECUTED 1077c: ebfff877 bl e960 <__assert_func> <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 10780: ebffff6f bl 10544 <== NOT EXECUTED if ( !p1 ) 10784: e2502000 subs r2, r0, #0 <== NOT EXECUTED 10788: 0affffaf beq 1064c <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 1078c: e5862000 str r2, [r6] <== NOT EXECUTED 10790: eaffffce b 106d0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 10794: ebffff6a bl 10544 <== NOT EXECUTED if ( !p ) 10798: e2503000 subs r3, r0, #0 <== NOT EXECUTED 1079c: 0affffaa beq 1064c <== NOT EXECUTED return 0; info->triply_indirect = p; 107a0: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED 107a4: eaffffc5 b 106c0 <== NOT EXECUTED 000111ac : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 111ac: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 111b0: e2509000 subs r9, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 111b4: e24dd014 sub sp, sp, #20 111b8: e1a08003 mov r8, r3 111bc: e1a0a001 mov sl, r1 111c0: e1a0b002 mov fp, r2 111c4: e59d5038 ldr r5, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); 111c8: 0a000089 beq 113f4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 111cc: e599304c ldr r3, [r9, #76] ; 0x4c 111d0: e2432005 sub r2, r3, #5 111d4: e3520001 cmp r2, #1 111d8: 8a000096 bhi 11438 /* * Error checks on arguments */ assert( dest ); 111dc: e3580000 cmp r8, #0 111e0: 0a00008e beq 11420 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 111e4: e3550000 cmp r5, #0 111e8: 0a000076 beq 113c8 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 111ec: e3530006 cmp r3, #6 111f0: 0a00005a beq 11360 * 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 ) 111f4: e5993054 ldr r3, [r9, #84] ; 0x54 111f8: e3a02000 mov r2, #0 111fc: e1520003 cmp r2, r3 /* * 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; 11200: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 11204: e5992050 ldr r2, [r9, #80] ; 0x50 11208: e0851001 add r1, r5, r1 1120c: da00004f ble 11350 my_length = the_jnode->info.file.size - start; 11210: e0635002 rsb r5, r3, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 11214: e59f624c ldr r6, [pc, #588] ; 11468 11218: e5964000 ldr r4, [r6] 1121c: e1a0000a mov r0, sl 11220: e1a02004 mov r2, r4 11224: e1a03fc2 asr r3, r2, #31 11228: e1a0100b mov r1, fp 1122c: e98d000c stmib sp, {r2, r3} 11230: eb002cc5 bl 1c54c <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 11234: e1a0100b mov r1, fp /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 11238: e1a0c000 mov ip, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1123c: e99d000c ldmib sp, {r2, r3} 11240: e1a0000a mov r0, sl 11244: e58dc000 str ip, [sp] 11248: eb002b95 bl 1c0a4 <__divdi3> if ( start_offset ) { 1124c: e59dc000 ldr ip, [sp] 11250: e35c0000 cmp ip, #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; 11254: e1a07000 mov r7, r0 if ( start_offset ) { 11258: 01a0a00c moveq sl, ip 1125c: 0a000013 beq 112b0 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 ); 11260: e1a00009 mov r0, r9 11264: e1a01007 mov r1, r7 11268: e3a02000 mov r2, #0 1126c: e58dc000 str ip, [sp] 11270: ebfffcc0 bl 10578 assert( block_ptr ); 11274: e3500000 cmp r0, #0 11278: e59dc000 ldr ip, [sp] 1127c: 0a000073 beq 11450 */ 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; 11280: e06ca004 rsb sl, ip, r4 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 11284: 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; 11288: e155000a cmp r5, sl 1128c: 31a0a005 movcc sl, r5 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 11290: e1a00008 mov r0, r8 11294: e081100c add r1, r1, ip 11298: e1a0200a mov r2, sl 1129c: eb000570 bl 12864 dest += to_copy; block++; my_length -= to_copy; 112a0: e5964000 ldr r4, [r6] block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; 112a4: e088800a add r8, r8, sl block++; 112a8: e2877001 add r7, r7, #1 my_length -= to_copy; 112ac: e06a5005 rsb r5, sl, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112b0: e1550004 cmp r5, r4 112b4: 3a000010 bcc 112fc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112b8: e1a00009 mov r0, r9 112bc: e1a01007 mov r1, r7 112c0: e3a02000 mov r2, #0 112c4: ebfffcab bl 10578 assert( block_ptr ); 112c8: e3500000 cmp r0, #0 112cc: 0a000042 beq 113dc if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 112d0: e5901000 ldr r1, [r0] 112d4: e1a02004 mov r2, r4 112d8: e1a00008 mov r0, r8 112dc: eb000560 bl 12864 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112e0: e5963000 ldr r3, [r6] if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 112e4: e0645005 rsb r5, r4, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112e8: e1530005 cmp r3, r5 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 112ec: e0888004 add r8, r8, r4 block++; 112f0: e2877001 add r7, r7, #1 my_length -= to_copy; copied += to_copy; 112f4: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112f8: 9affffee bls 112b8 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 112fc: e3550000 cmp r5, #0 11300: 0a00000a beq 11330 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11304: e1a01007 mov r1, r7 11308: e1a00009 mov r0, r9 1130c: e3a02000 mov r2, #0 11310: ebfffc98 bl 10578 assert( block_ptr ); 11314: e2503000 subs r3, r0, #0 11318: 0a00003a beq 11408 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 1131c: e1a00008 mov r0, r8 11320: e5931000 ldr r1, [r3] 11324: e1a02005 mov r2, r5 11328: eb00054d bl 12864 copied += my_length; 1132c: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); 11330: e28d000c add r0, sp, #12 11334: e3a01000 mov r1, #0 11338: ebffc7a0 bl 31c0 1133c: e59d300c ldr r3, [sp, #12] 11340: e5893040 str r3, [r9, #64] ; 0x40 return copied; 11344: e1a0000a mov r0, sl } 11348: e28dd014 add sp, sp, #20 1134c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * 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 ) 11350: 1affffaf bne 11214 11354: e1510002 cmp r1, r2 11358: 9affffad bls 11214 1135c: eaffffab b 11210 if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 11360: e2894050 add r4, r9, #80 ; 0x50 <== NOT EXECUTED 11364: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED 11368: e1a00003 mov r0, r3 <== NOT EXECUTED 1136c: e1a01004 mov r1, r4 <== NOT EXECUTED 11370: e3a02000 mov r2, #0 <== NOT EXECUTED 11374: e050000a subs r0, r0, sl <== NOT EXECUTED 11378: e0c1100b sbc r1, r1, fp <== NOT EXECUTED 1137c: e1520001 cmp r2, r1 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 11380: e5992058 ldr r2, [r9, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 11384: da00000b ble 113b8 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 11388: e06a5003 rsb r5, sl, r3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 1138c: e082100a add r1, r2, sl <== NOT EXECUTED 11390: e1a00008 mov r0, r8 <== NOT EXECUTED 11394: e1a02005 mov r2, r5 <== NOT EXECUTED 11398: eb000531 bl 12864 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 1139c: e28d000c add r0, sp, #12 <== NOT EXECUTED 113a0: e3a01000 mov r1, #0 <== NOT EXECUTED 113a4: ebffc785 bl 31c0 <== NOT EXECUTED 113a8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED return my_length; 113ac: e1a00005 mov r0, r5 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); IMFS_update_atime( the_jnode ); 113b0: e5893040 str r3, [r9, #64] ; 0x40 <== NOT EXECUTED return my_length; 113b4: eaffffe3 b 11348 <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 113b8: 1afffff3 bne 1138c <== NOT EXECUTED 113bc: e1550000 cmp r5, r0 <== NOT EXECUTED 113c0: 8afffff0 bhi 11388 <== NOT EXECUTED 113c4: eafffff0 b 1138c <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 113c8: eb000317 bl 1202c <__errno> <== NOT EXECUTED 113cc: e3a03016 mov r3, #22 <== NOT EXECUTED 113d0: e5803000 str r3, [r0] <== NOT EXECUTED 113d4: e3e00000 mvn r0, #0 <== NOT EXECUTED 113d8: eaffffda b 11348 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 113dc: e3a01fa9 mov r1, #676 ; 0x2a4 <== NOT EXECUTED 113e0: e2811003 add r1, r1, #3 <== NOT EXECUTED 113e4: e59f0080 ldr r0, [pc, #128] ; 1146c <== NOT EXECUTED 113e8: e59f2080 ldr r2, [pc, #128] ; 11470 <== NOT EXECUTED 113ec: e59f3080 ldr r3, [pc, #128] ; 11474 <== NOT EXECUTED 113f0: ebfff55a bl e960 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 113f4: e59f0070 ldr r0, [pc, #112] ; 1146c <== NOT EXECUTED 113f8: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED 113fc: e59f206c ldr r2, [pc, #108] ; 11470 <== NOT EXECUTED 11400: e59f3070 ldr r3, [pc, #112] ; 11478 <== NOT EXECUTED 11404: ebfff555 bl e960 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 11408: e3a01fae mov r1, #696 ; 0x2b8 <== NOT EXECUTED 1140c: e2811001 add r1, r1, #1 <== NOT EXECUTED 11410: e59f0054 ldr r0, [pc, #84] ; 1146c <== NOT EXECUTED 11414: e59f2054 ldr r2, [pc, #84] ; 11470 <== NOT EXECUTED 11418: e59f3054 ldr r3, [pc, #84] ; 11474 <== NOT EXECUTED 1141c: ebfff54f bl e960 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 11420: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED 11424: e2811002 add r1, r1, #2 <== NOT EXECUTED 11428: e59f003c ldr r0, [pc, #60] ; 1146c <== NOT EXECUTED 1142c: e59f203c ldr r2, [pc, #60] ; 11470 <== NOT EXECUTED 11430: e59f3044 ldr r3, [pc, #68] ; 1147c <== NOT EXECUTED 11434: ebfff549 bl e960 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 11438: e3a01e25 mov r1, #592 ; 0x250 <== NOT EXECUTED 1143c: e2811001 add r1, r1, #1 <== NOT EXECUTED 11440: e59f0024 ldr r0, [pc, #36] ; 1146c <== NOT EXECUTED 11444: e59f2024 ldr r2, [pc, #36] ; 11470 <== NOT EXECUTED 11448: e59f3030 ldr r3, [pc, #48] ; 11480 <== NOT EXECUTED 1144c: ebfff543 bl e960 <__assert_func> <== NOT EXECUTED 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 ); assert( block_ptr ); 11450: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED 11454: e2811002 add r1, r1, #2 <== NOT EXECUTED 11458: e59f000c ldr r0, [pc, #12] ; 1146c <== NOT EXECUTED 1145c: e59f200c ldr r2, [pc, #12] ; 11470 <== NOT EXECUTED 11460: e59f300c ldr r3, [pc, #12] ; 11474 <== NOT EXECUTED 11464: ebfff53d bl e960 <__assert_func> <== NOT EXECUTED 00010894 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 10894: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 10898: e250a000 subs sl, r0, #0 1089c: 0a00004f beq 109e0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 108a0: e59a304c ldr r3, [sl, #76] ; 0x4c 108a4: e3530005 cmp r3, #5 108a8: 1a000052 bne 109f8 /* * 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; 108ac: e59f615c ldr r6, [pc, #348] ; 10a10 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 108b0: e59a3058 ldr r3, [sl, #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; 108b4: e5967000 ldr r7, [r6] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 108b8: e3530000 cmp r3, #0 /* * 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; 108bc: e1a07127 lsr r7, r7, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 108c0: 128a0058 addne r0, sl, #88 ; 0x58 108c4: 11a01007 movne r1, r7 108c8: 1bffffbb blne 107bc } if ( info->doubly_indirect ) { 108cc: e59a305c ldr r3, [sl, #92] ; 0x5c 108d0: e3530000 cmp r3, #0 108d4: 0a000014 beq 1092c for ( i=0 ; i <== NOT EXECUTED 108e4: e3a02000 mov r2, #0 <== NOT EXECUTED 108e8: e1a04002 mov r4, r2 <== NOT EXECUTED 108ec: ea000000 b 108f4 <== NOT EXECUTED 108f0: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 108f4: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED 108f8: e3510000 cmp r1, #0 <== NOT EXECUTED 108fc: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED memfile_free_blocks_in_table( 10900: 10830002 addne r0, r3, r2 <== NOT EXECUTED 10904: 11a01007 movne r1, r7 <== NOT EXECUTED 10908: 1bffffab blne 107bc <== 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 ); 10920: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED 10924: e1a01007 mov r1, r7 <== NOT EXECUTED 10928: ebffffa3 bl 107bc <== NOT EXECUTED } if ( info->triply_indirect ) { 1092c: e59a0060 ldr r0, [sl, #96] ; 0x60 10930: e3500000 cmp r0, #0 10934: 0a000027 beq 109d8 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 10944: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 10948: e3550000 cmp r5, #0 <== NOT EXECUTED 1094c: 13a09000 movne r9, #0 <== NOT EXECUTED 10950: 11a08009 movne r8, r9 <== NOT EXECUTED 10954: 0a00001c beq 109cc <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 10960: e3a00000 mov r0, #0 <== NOT EXECUTED 10964: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { 10968: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED 1096c: e3530000 cmp r3, #0 <== NOT EXECUTED 10970: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 10974: 10850000 addne r0, r5, r0 <== NOT EXECUTED 10978: 11a01007 movne r1, r7 <== NOT EXECUTED 1097c: 1bffff8e blne 107bc <== 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 10994: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 10998: e0800009 add r0, r0, r9 <== NOT EXECUTED 1099c: e1a01007 mov r1, r7 <== NOT EXECUTED 109a0: ebffff85 bl 107bc <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 109b8: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED 109bc: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 109c0: e3550000 cmp r5, #0 <== NOT EXECUTED 109c4: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED 109c8: 1affffe2 bne 10958 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 109cc: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED 109d0: e1a01007 mov r1, r7 <== NOT EXECUTED 109d4: ebffff78 bl 107bc <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 109d8: e3a00000 mov r0, #0 109dc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Perform internal consistency checks */ assert( the_jnode ); 109e0: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED 109e4: e2811002 add r1, r1, #2 <== NOT EXECUTED 109e8: e59f0024 ldr r0, [pc, #36] ; 10a14 <== NOT EXECUTED 109ec: e59f2024 ldr r2, [pc, #36] ; 10a18 <== NOT EXECUTED 109f0: e59f3024 ldr r3, [pc, #36] ; 10a1c <== NOT EXECUTED 109f4: ebfff7d9 bl e960 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 109f8: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED 109fc: e2811002 add r1, r1, #2 <== NOT EXECUTED 10a00: e59f000c ldr r0, [pc, #12] ; 10a14 <== NOT EXECUTED 10a04: e59f200c ldr r2, [pc, #12] ; 10a18 <== NOT EXECUTED 10a08: e59f3010 ldr r3, [pc, #16] ; 10a20 <== NOT EXECUTED 10a0c: ebfff7d3 bl e960 <__assert_func> <== NOT EXECUTED 00010844 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 10844: 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 ); 10848: e3a02000 mov r2, #0 <== NOT EXECUTED 1084c: ebffff49 bl 10578 <== NOT EXECUTED assert( block_ptr ); 10850: e2503000 subs r3, r0, #0 <== NOT EXECUTED 10854: 0a000005 beq 10870 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; 10858: e3a02000 mov r2, #0 <== NOT EXECUTED block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( block_ptr ) { ptr = *block_ptr; 1085c: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; 10860: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 10864: ebffff2e bl 10524 <== NOT EXECUTED } return 1; } 10868: e3a00001 mov r0, #1 <== NOT EXECUTED 1086c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 10870: e3a01f65 mov r1, #404 ; 0x194 <== NOT EXECUTED 10874: e2811002 add r1, r1, #2 <== NOT EXECUTED 10878: e59f0008 ldr r0, [pc, #8] ; 10888 <== NOT EXECUTED 1087c: e59f2008 ldr r2, [pc, #8] ; 1088c <== NOT EXECUTED 10880: e59f3008 ldr r3, [pc, #8] ; 10890 <== NOT EXECUTED 10884: ebfff835 bl e960 <__assert_func> <== NOT EXECUTED 00010e28 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 10e28: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 10e2c: e2509000 subs r9, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 10e30: e24dd014 sub sp, sp, #20 10e34: e1a06001 mov r6, r1 10e38: e1a07002 mov r7, r2 10e3c: e1a08003 mov r8, r3 10e40: e59da038 ldr sl, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); 10e44: 0a000079 beq 11030 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 10e48: e599304c ldr r3, [r9, #76] ; 0x4c 10e4c: e3530005 cmp r3, #5 10e50: 1a000070 bne 11018 /* * Error check arguments */ assert( source ); 10e54: e3580000 cmp r8, #0 10e58: 0a000085 beq 11074 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 10e5c: e35a0000 cmp sl, #0 10e60: 0a000062 beq 10ff0 * 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 ) { 10e64: e5993054 ldr r3, [r9, #84] ; 0x54 10e68: e3530000 cmp r3, #0 10e6c: e08a1001 add r1, sl, r1 10e70: ba000054 blt 10fc8 10e74: 0a000050 beq 10fbc /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10e78: e59f520c ldr r5, [pc, #524] ; 1108c 10e7c: e5954000 ldr r4, [r5] 10e80: e1a00006 mov r0, r6 10e84: e1a02004 mov r2, r4 10e88: e1a03fc2 asr r3, r2, #31 10e8c: e1a01007 mov r1, r7 10e90: e98d000c stmib sp, {r2, r3} 10e94: eb002dac bl 1c54c <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10e98: e1a01007 mov r1, r7 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10e9c: e1a0b000 mov fp, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10ea0: e99d000c ldmib sp, {r2, r3} 10ea4: e1a00006 mov r0, r6 10ea8: eb002c7d bl 1c0a4 <__divdi3> if ( start_offset ) { 10eac: e35b0000 cmp fp, #0 10eb0: 01a0700a moveq r7, sl /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10eb4: e1a06000 mov r6, r0 if ( start_offset ) { 10eb8: 01a0a00b moveq sl, fp 10ebc: 1a000028 bne 10f64 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10ec0: e1570004 cmp r7, r4 10ec4: 3a000010 bcc 10f0c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10ec8: e1a00009 mov r0, r9 10ecc: e1a01006 mov r1, r6 10ed0: e3a02000 mov r2, #0 10ed4: ebfffda7 bl 10578 assert( block_ptr ); 10ed8: e3500000 cmp r0, #0 10edc: 0a000048 beq 11004 if ( !block_ptr ) 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 ); 10ee0: e1a01008 mov r1, r8 10ee4: e5900000 ldr r0, [r0] 10ee8: e1a02004 mov r2, r4 10eec: eb00065c bl 12864 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10ef0: e5953000 ldr r3, [r5] fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 10ef4: e0647007 rsb r7, r4, r7 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10ef8: e1530007 cmp r3, r7 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 ); src += to_copy; 10efc: e0888004 add r8, r8, r4 block++; 10f00: e2866001 add r6, r6, #1 * * 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( 10f04: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10f08: 9affffee bls 10ec8 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 10f0c: e3570000 cmp r7, #0 10f10: 0a00000a beq 10f40 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10f14: e1a01006 mov r1, r6 10f18: e1a00009 mov r0, r9 10f1c: e3a02000 mov r2, #0 10f20: ebfffd94 bl 10578 assert( block_ptr ); 10f24: e3500000 cmp r0, #0 10f28: 0a00004b beq 1105c if ( !block_ptr ) 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 ); 10f2c: e5900000 ldr r0, [r0] 10f30: e1a01008 mov r1, r8 10f34: e1a02007 mov r2, r7 10f38: eb000649 bl 12864 my_length = 0; copied += to_copy; 10f3c: e08aa007 add sl, sl, r7 } IMFS_mtime_ctime_update( the_jnode ); 10f40: e28d000c add r0, sp, #12 10f44: e3a01000 mov r1, #0 10f48: ebffc89c bl 31c0 10f4c: e59d300c ldr r3, [sp, #12] 10f50: e5893048 str r3, [r9, #72] ; 0x48 10f54: e5893044 str r3, [r9, #68] ; 0x44 return copied; } 10f58: e1a0000a mov r0, sl 10f5c: e28dd014 add sp, sp, #20 10f60: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 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 ); 10f64: e1a00009 mov r0, r9 10f68: e1a01006 mov r1, r6 10f6c: e3a02000 mov r2, #0 10f70: ebfffd80 bl 10578 assert( block_ptr ); 10f74: e3500000 cmp r0, #0 10f78: 0a000032 beq 11048 */ 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; 10f7c: e06b3004 rsb r3, fp, r4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 10f80: 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; 10f84: e153000a cmp r3, sl 10f88: 21a0300a movcs r3, sl if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 10f8c: e1a01008 mov r1, r8 10f90: e1a02003 mov r2, r3 10f94: e080000b add r0, r0, fp 10f98: e58d3000 str r3, [sp] 10f9c: eb000630 bl 12864 src += to_copy; 10fa0: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; copied += to_copy; 10fa4: e5954000 ldr r4, [r5] fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 10fa8: e063700a rsb r7, r3, sl return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; 10fac: e0888003 add r8, r8, r3 block++; 10fb0: e2866001 add r6, r6, #1 my_length -= to_copy; copied += to_copy; 10fb4: e1a0a003 mov sl, r3 10fb8: eaffffc0 b 10ec0 * 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 ) { 10fbc: e5993050 ldr r3, [r9, #80] ; 0x50 10fc0: e1530001 cmp r3, r1 10fc4: 2affffab bcs 10e78 status = IMFS_memfile_extend( the_jnode, last_byte ); 10fc8: e1a00009 mov r0, r9 10fcc: e3a02000 mov r2, #0 10fd0: ebfffeee bl 10b90 if ( status ) 10fd4: e3500000 cmp r0, #0 10fd8: 0affffa6 beq 10e78 rtems_set_errno_and_return_minus_one( ENOSPC ); 10fdc: eb000412 bl 1202c <__errno> <== NOT EXECUTED 10fe0: e3a0301c mov r3, #28 <== NOT EXECUTED 10fe4: e5803000 str r3, [r0] <== NOT EXECUTED 10fe8: e3e0a000 mvn sl, #0 <== NOT EXECUTED 10fec: eaffffd9 b 10f58 <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 10ff0: eb00040d bl 1202c <__errno> <== NOT EXECUTED 10ff4: e3a03016 mov r3, #22 <== NOT EXECUTED 10ff8: e5803000 str r3, [r0] <== NOT EXECUTED 10ffc: e3e0a000 mvn sl, #0 <== NOT EXECUTED 11000: eaffffd4 b 10f58 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 11004: e59f0084 ldr r0, [pc, #132] ; 11090 <== NOT EXECUTED 11008: e3a01e33 mov r1, #816 ; 0x330 <== NOT EXECUTED 1100c: e59f2080 ldr r2, [pc, #128] ; 11094 <== NOT EXECUTED 11010: e59f3080 ldr r3, [pc, #128] ; 11098 <== NOT EXECUTED 11014: ebfff651 bl e960 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11018: e3a01fb9 mov r1, #740 ; 0x2e4 <== NOT EXECUTED 1101c: e2811003 add r1, r1, #3 <== NOT EXECUTED 11020: e59f0068 ldr r0, [pc, #104] ; 11090 <== NOT EXECUTED 11024: e59f2068 ldr r2, [pc, #104] ; 11094 <== NOT EXECUTED 11028: e59f306c ldr r3, [pc, #108] ; 1109c <== NOT EXECUTED 1102c: ebfff64b bl e960 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 11030: e3a01e2e mov r1, #736 ; 0x2e0 <== NOT EXECUTED 11034: e2811003 add r1, r1, #3 <== NOT EXECUTED 11038: e59f0050 ldr r0, [pc, #80] ; 11090 <== NOT EXECUTED 1103c: e59f2050 ldr r2, [pc, #80] ; 11094 <== NOT EXECUTED 11040: e59f3058 ldr r3, [pc, #88] ; 110a0 <== NOT EXECUTED 11044: ebfff645 bl e960 <__assert_func> <== NOT EXECUTED 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 ); assert( block_ptr ); 11048: e59f0040 ldr r0, [pc, #64] ; 11090 <== NOT EXECUTED 1104c: e3a01fc7 mov r1, #796 ; 0x31c <== NOT EXECUTED 11050: e59f203c ldr r2, [pc, #60] ; 11094 <== NOT EXECUTED 11054: e59f303c ldr r3, [pc, #60] ; 11098 <== NOT EXECUTED 11058: ebfff640 bl e960 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 1105c: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED 11060: e2811002 add r1, r1, #2 <== NOT EXECUTED 11064: e59f0024 ldr r0, [pc, #36] ; 11090 <== NOT EXECUTED 11068: e59f2024 ldr r2, [pc, #36] ; 11094 <== NOT EXECUTED 1106c: e59f3024 ldr r3, [pc, #36] ; 11098 <== NOT EXECUTED 11070: ebfff63a bl e960 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 11074: e3a01fbb mov r1, #748 ; 0x2ec <== NOT EXECUTED 11078: e2811003 add r1, r1, #3 <== NOT EXECUTED 1107c: e59f000c ldr r0, [pc, #12] ; 11090 <== NOT EXECUTED 11080: e59f200c ldr r2, [pc, #12] ; 11094 <== NOT EXECUTED 11084: e59f3018 ldr r3, [pc, #24] ; 110a4 <== NOT EXECUTED 11088: ebfff634 bl e960 <__assert_func> <== NOT EXECUTED 000095dc : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 95dc: e92d41f0 push {r4, r5, r6, r7, r8, lr} 95e0: e24dd040 sub sp, sp, #64 ; 0x40 95e4: e1a04001 mov r4, r1 95e8: e1a07002 mov r7, r2 95ec: e1a06003 mov r6, r3 95f0: e1a08000 mov r8, r0 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 ); 95f4: eb0010c2 bl d904 95f8: e28d5004 add r5, sp, #4 95fc: e1a01000 mov r1, r0 9600: e28d303c add r3, sp, #60 ; 0x3c 9604: e1a00008 mov r0, r8 9608: e1a02005 mov r2, r5 960c: ebffff7b bl 9400 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 9610: e2043a0f and r3, r4, #61440 ; 0xf000 9614: e3530901 cmp r3, #16384 ; 0x4000 9618: 0a00001b beq 968c type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 961c: e3530902 cmp r3, #32768 ; 0x8000 9620: 03a01005 moveq r1, #5 9624: 0a000005 beq 9640 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 9628: e3530a06 cmp r3, #24576 ; 0x6000 962c: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 9630: 058d7028 streq r7, [sp, #40] ; 0x28 9634: 058d602c streq r6, [sp, #44] ; 0x2c 9638: 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) ) { 963c: 1a00000a bne 966c * 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( 9640: e28dc028 add ip, sp, #40 ; 0x28 9644: e59d0058 ldr r0, [sp, #88] ; 0x58 9648: e1a02005 mov r2, r5 964c: e1a03004 mov r3, r4 9650: e58dc000 str ip, [sp] 9654: eb0008fd bl ba50 new_name, mode, &info ); if ( !new_node ) 9658: e3500000 cmp r0, #0 965c: 13a00000 movne r0, #0 9660: 0a00000b beq 9694 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 9664: e28dd040 add sp, sp, #64 ; 0x40 9668: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 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)) 966c: e3530a01 cmp r3, #4096 ; 0x1000 9670: 03a01007 moveq r1, #7 9674: 0afffff1 beq 9640 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 9678: eb000cb0 bl c940 <__errno> <== NOT EXECUTED 967c: e3a03016 mov r3, #22 <== NOT EXECUTED 9680: e5803000 str r3, [r0] <== NOT EXECUTED 9684: e3e00000 mvn r0, #0 <== NOT EXECUTED 9688: eafffff5 b 9664 <== NOT EXECUTED 968c: e3a01001 mov r1, #1 9690: eaffffea b 9640 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 9694: eb000ca9 bl c940 <__errno> <== NOT EXECUTED 9698: e3a0300c mov r3, #12 <== NOT EXECUTED 969c: e5803000 str r3, [r0] <== NOT EXECUTED 96a0: e3e00000 mvn r0, #0 <== NOT EXECUTED 96a4: eaffffee b 9664 <== NOT EXECUTED 000028d0 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 28d0: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 28d4: e593204c ldr r2, [r3, #76] ; 0x4c 28d8: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 28dc: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 28e0: 1a000002 bne 28f0 /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 28e4: e583005c str r0, [r3, #92] ; 0x5c 28e8: e3a00000 mov r0, #0 return 0; } 28ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 28f0: eb003dcd bl 1202c <__errno> <== NOT EXECUTED 28f4: e3a03014 mov r3, #20 <== NOT EXECUTED 28f8: e5803000 str r3, [r0] <== NOT EXECUTED 28fc: e3e00000 mvn r0, #0 <== NOT EXECUTED 2900: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00003d14 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 3d14: e92d4030 push {r4, r5, lr} assert( the_jnode ); 3d18: e2504000 subs r4, r0, #0 3d1c: 0a000055 beq 3e78 fprintf(stdout, "%s", the_jnode->name ); 3d20: e59f5164 ldr r5, [pc, #356] ; 3e8c 3d24: e5953000 ldr r3, [r5] 3d28: e284000c add r0, r4, #12 3d2c: e5931008 ldr r1, [r3, #8] 3d30: eb003ab6 bl 12810 switch( the_jnode->type ) { 3d34: e594204c ldr r2, [r4, #76] ; 0x4c 3d38: e2423001 sub r3, r2, #1 3d3c: e3530006 cmp r3, #6 3d40: 979ff103 ldrls pc, [pc, r3, lsl #2] 3d44: ea000011 b 3d90 <== NOT EXECUTED 3d48: 00003db4 .word 0x00003db4 <== NOT EXECUTED 3d4c: 00003dd0 .word 0x00003dd0 <== NOT EXECUTED 3d50: 00003dec .word 0x00003dec <== NOT EXECUTED 3d54: 00003e18 .word 0x00003e18 <== NOT EXECUTED 3d58: 00003e44 .word 0x00003e44 <== NOT EXECUTED 3d5c: 00003e5c .word 0x00003e5c <== NOT EXECUTED 3d60: 00003d64 .word 0x00003d64 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 3d64: e5953000 ldr r3, [r5] <== NOT EXECUTED 3d68: e3a01001 mov r1, #1 <== NOT EXECUTED 3d6c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3d70: e3a02012 mov r2, #18 <== NOT EXECUTED 3d74: e59f0114 ldr r0, [pc, #276] ; 3e90 <== NOT EXECUTED 3d78: eb003db9 bl 13464 <== NOT EXECUTED assert(0); 3d7c: e59f0110 ldr r0, [pc, #272] ; 3e94 <== NOT EXECUTED 3d80: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 3d84: e59f210c ldr r2, [pc, #268] ; 3e98 <== NOT EXECUTED 3d88: e59f310c ldr r3, [pc, #268] ; 3e9c <== NOT EXECUTED 3d8c: eb000297 bl 47f0 <__assert_func> <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 3d90: e5953000 ldr r3, [r5] <== NOT EXECUTED 3d94: e59f1104 ldr r1, [pc, #260] ; 3ea0 <== NOT EXECUTED 3d98: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3d9c: eb003a3a bl 1268c <== NOT EXECUTED assert(0); 3da0: e59f00ec ldr r0, [pc, #236] ; 3e94 <== NOT EXECUTED 3da4: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 3da8: e59f20e8 ldr r2, [pc, #232] ; 3e98 <== NOT EXECUTED 3dac: e59f30e8 ldr r3, [pc, #232] ; 3e9c <== NOT EXECUTED 3db0: eb00028e bl 47f0 <__assert_func> <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 3db4: e5953000 ldr r3, [r5] 3db8: e3a0002f mov r0, #47 ; 0x2f 3dbc: e5931008 ldr r1, [r3, #8] 3dc0: eb003a4d bl 126fc default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 3dc4: e59f00d8 ldr r0, [pc, #216] ; 3ea4 } 3dc8: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 3dcc: ea004194 b 14424 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 3dd0: e5952000 ldr r2, [r5] 3dd4: e5943054 ldr r3, [r4, #84] ; 0x54 3dd8: e5920008 ldr r0, [r2, #8] 3ddc: e59f10c4 ldr r1, [pc, #196] ; 3ea8 3de0: e5942050 ldr r2, [r4, #80] ; 0x50 3de4: eb003a28 bl 1268c the_jnode->info.device.major, the_jnode->info.device.minor ); break; 3de8: eafffff5 b 3dc4 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 3dec: e5953000 ldr r3, [r5] <== NOT EXECUTED 3df0: e3a01001 mov r1, #1 <== NOT EXECUTED 3df4: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3df8: e3a02013 mov r2, #19 <== NOT EXECUTED 3dfc: e59f00a8 ldr r0, [pc, #168] ; 3eac <== NOT EXECUTED 3e00: eb003d97 bl 13464 <== NOT EXECUTED assert(0); 3e04: e59f0088 ldr r0, [pc, #136] ; 3e94 <== NOT EXECUTED 3e08: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 3e0c: e59f2084 ldr r2, [pc, #132] ; 3e98 <== NOT EXECUTED 3e10: e59f3084 ldr r3, [pc, #132] ; 3e9c <== NOT EXECUTED 3e14: eb000275 bl 47f0 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 3e18: e5953000 ldr r3, [r5] <== NOT EXECUTED 3e1c: e3a01001 mov r1, #1 <== NOT EXECUTED 3e20: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3e24: e3a02013 mov r2, #19 <== NOT EXECUTED 3e28: e59f007c ldr r0, [pc, #124] ; 3eac <== NOT EXECUTED 3e2c: eb003d8c bl 13464 <== NOT EXECUTED assert(0); 3e30: e59f005c ldr r0, [pc, #92] ; 3e94 <== NOT EXECUTED 3e34: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 3e38: e59f2058 ldr r2, [pc, #88] ; 3e98 <== NOT EXECUTED 3e3c: e59f3058 ldr r3, [pc, #88] ; 3e9c <== NOT EXECUTED 3e40: eb00026a bl 47f0 <__assert_func> <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 3e44: e5953000 ldr r3, [r5] 3e48: e5942050 ldr r2, [r4, #80] ; 0x50 3e4c: e5930008 ldr r0, [r3, #8] 3e50: e59f1058 ldr r1, [pc, #88] ; 3eb0 3e54: eb003a0c bl 1268c (uint32_t)the_jnode->info.file.size ); #endif break; 3e58: eaffffd9 b 3dc4 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 3e5c: e5952000 ldr r2, [r5] <== NOT EXECUTED 3e60: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 3e64: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 3e68: e59f1044 ldr r1, [pc, #68] ; 3eb4 <== NOT EXECUTED 3e6c: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 3e70: eb003a05 bl 1268c <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 3e74: eaffffd2 b 3dc4 <== NOT EXECUTED void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 3e78: e59f0014 ldr r0, [pc, #20] ; 3e94 <== NOT EXECUTED 3e7c: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED 3e80: e59f2010 ldr r2, [pc, #16] ; 3e98 <== NOT EXECUTED 3e84: e59f302c ldr r3, [pc, #44] ; 3eb8 <== NOT EXECUTED 3e88: eb000258 bl 47f0 <__assert_func> <== NOT EXECUTED 00002910 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 2910: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 2914: e593004c ldr r0, [r3, #76] ; 0x4c 2918: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 291c: e92d4010 push {r4, lr} IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 2920: 1a000013 bne 2974 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2924: e3520000 cmp r2, #0 2928: 0a00000f beq 296c 292c: e5930050 ldr r0, [r3, #80] ; 0x50 2930: e5d0c000 ldrb ip, [r0] 2934: e35c0000 cmp ip, #0 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 2938: 13a04000 movne r4, #0 293c: 11a00004 movne r0, r4 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2940: 0a000009 beq 296c 2944: e2800001 add r0, r0, #1 2948: e1520000 cmp r2, r0 buf[i] = node->info.sym_link.name[i]; 294c: e7c1c004 strb ip, [r1, r4] 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++ ) 2950: e1a04000 mov r4, r0 2954: 98bd8010 popls {r4, pc} 2958: e593c050 ldr ip, [r3, #80] ; 0x50 295c: e7dcc000 ldrb ip, [ip, r0] 2960: e35c0000 cmp ip, #0 2964: 1afffff6 bne 2944 2968: e8bd8010 pop {r4, pc} 296c: e3a00000 mov r0, #0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 2970: e8bd8010 pop {r4, pc} <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 2974: eb003dac bl 1202c <__errno> <== NOT EXECUTED 2978: e3a03016 mov r3, #22 <== NOT EXECUTED 297c: e5803000 str r3, [r0] <== NOT EXECUTED 2980: e3e00000 mvn r0, #0 <== NOT EXECUTED 2984: e8bd8010 pop {r4, pc} <== NOT EXECUTED 0000976c : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 976c: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 9770: e593204c ldr r2, [r3, #76] ; 0x4c 9774: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 9778: e92d4810 push {r4, fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 977c: e3520005 cmp r2, #5 9780: 979ff102 ldrls pc, [pc, r2, lsl #2] 9784: ea000027 b 9828 <== NOT EXECUTED 9788: 00009814 .word 0x00009814 <== NOT EXECUTED 978c: 00009828 .word 0x00009828 <== NOT EXECUTED 9790: 000097a0 .word 0x000097a0 <== NOT EXECUTED 9794: 0000983c .word 0x0000983c <== NOT EXECUTED 9798: 0000983c .word 0x0000983c <== NOT EXECUTED 979c: 000097a0 .word 0x000097a0 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 97a0: e3a0b000 mov fp, #0 <== NOT EXECUTED 97a4: e3a0c000 mov ip, #0 <== NOT EXECUTED 97a8: e581b020 str fp, [r1, #32] <== NOT EXECUTED 97ac: e581c024 str ip, [r1, #36] ; 0x24 <== NOT EXECUTED */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 97b0: e5932030 ldr r2, [r3, #48] ; 0x30 97b4: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 97b8: e5932038 ldr r2, [r3, #56] ; 0x38 97bc: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 97c0: e5932040 ldr r2, [r3, #64] ; 0x40 97c4: e5812028 str r2, [r1, #40] ; 0x28 * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 97c8: e5902010 ldr r2, [r0, #16] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 97cc: e1d343b4 ldrh r4, [r3, #52] ; 0x34 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; 97d0: e5930044 ldr r0, [r3, #68] ; 0x44 * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 97d4: e5922034 ldr r2, [r2, #52] ; 0x34 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; 97d8: e5810030 str r0, [r1, #48] ; 0x30 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 97dc: e1c141b0 strh r4, [r1, #16] * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 97e0: e5920000 ldr r0, [r2] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 97e4: e3a02cff mov r2, #65280 ; 0xff00 97e8: e28220fe add r2, r2, #254 ; 0xfe /* * 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 = 97ec: e5812000 str r2, [r1] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 97f0: e1d323bc ldrh r2, [r3, #60] ; 0x3c 97f4: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 97f8: e593c048 ldr ip, [r3, #72] ; 0x48 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 97fc: e1d333be ldrh r3, [r3, #62] ; 0x3e /* * 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 = 9800: e5810004 str r0, [r1, #4] 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; buf->st_ctime = the_jnode->stat_ctime; 9804: e581c038 str ip, [r1, #56] ; 0x38 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 9808: e1c131b4 strh r3, [r1, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 980c: e3a00000 mov r0, #0 return 0; } 9810: e8bd8810 pop {r4, fp, pc} switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 9814: e2832050 add r2, r3, #80 ; 0x50 9818: e8921004 ldm r2, {r2, ip} 981c: e581c01c str ip, [r1, #28] 9820: e5812018 str r2, [r1, #24] break; 9824: eaffffe1 b 97b0 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 9828: eb000c44 bl c940 <__errno> <== NOT EXECUTED 982c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9830: e5803000 str r3, [r0] <== NOT EXECUTED 9834: e3e00000 mvn r0, #0 <== NOT EXECUTED 9838: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 983c: e283c050 add ip, r3, #80 ; 0x50 9840: e89c1800 ldm ip, {fp, ip} 9844: e581b020 str fp, [r1, #32] 9848: e581c024 str ip, [r1, #36] ; 0x24 break; 984c: eaffffd7 b 97b0 000029ec : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 29ec: e92d40f0 push {r4, r5, r6, r7, lr} 29f0: e1a06000 mov r6, r0 29f4: 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 ); 29f8: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 29fc: e1a07002 mov r7, r2 2a00: e1a05001 mov r5, r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 2a04: eb004161 bl 12f90 2a08: e28d4004 add r4, sp, #4 2a0c: e1a01000 mov r1, r0 2a10: e1a02004 mov r2, r4 2a14: e28d303c add r3, sp, #60 ; 0x3c 2a18: e1a00007 mov r0, r7 2a1c: eb002f2d bl e6d8 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 2a20: e1a00005 mov r0, r5 2a24: eb004145 bl 12f40 if (info.sym_link.name == NULL) { 2a28: 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); 2a2c: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 2a30: 0a00000e beq 2a70 * 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( 2a34: e3a03ca2 mov r3, #41472 ; 0xa200 2a38: e28dc028 add ip, sp, #40 ; 0x28 2a3c: e1a00006 mov r0, r6 2a40: e1a02004 mov r2, r4 2a44: e2433001 sub r3, r3, #1 2a48: e3a01004 mov r1, #4 2a4c: e58dc000 str ip, [sp] 2a50: eb002bcc bl d988 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2a54: e3500000 cmp r0, #0 2a58: 13a00000 movne r0, #0 2a5c: 0a000001 beq 2a68 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 2a60: e28dd040 add sp, sp, #64 ; 0x40 2a64: e8bd80f0 pop {r4, r5, r6, r7, pc} ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 2a68: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 2a6c: eb0001aa bl 311c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2a70: eb003d6d bl 1202c <__errno> <== NOT EXECUTED 2a74: e3a0300c mov r3, #12 <== NOT EXECUTED 2a78: e5803000 str r3, [r0] <== NOT EXECUTED 2a7c: e3e00000 mvn r0, #0 <== NOT EXECUTED 2a80: eafffff6 b 2a60 <== NOT EXECUTED 00002a84 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2a84: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 2a88: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2a8c: e595304c ldr r3, [r5, #76] ; 0x4c 2a90: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2a94: e24dd01c sub sp, sp, #28 2a98: e1a04001 mov r4, r1 2a9c: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2aa0: 0a000006 beq 2ac0 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2aa4: e1a00006 mov r0, r6 2aa8: e1a01004 mov r1, r4 2aac: e5943008 ldr r3, [r4, #8] 2ab0: e1a0e00f mov lr, pc 2ab4: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 2ab8: e28dd01c add sp, sp, #28 2abc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 2ac0: e595e050 ldr lr, [r5, #80] ; 0x50 2ac4: e35e0000 cmp lr, #0 2ac8: 0a00001f beq 2b4c rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 2acc: e1a07001 mov r7, r1 2ad0: e8b7000f ldm r7!, {r0, r1, r2, r3} 2ad4: e1a0c00d mov ip, sp 2ad8: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 2adc: e28d801c add r8, sp, #28 2ae0: e528e01c str lr, [r8, #-28]! if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 2ae4: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 2ae8: 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; 2aec: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 2af0: eb002bf6 bl dad0 /* * 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) 2af4: e5953050 ldr r3, [r5, #80] ; 0x50 2af8: e1d323b4 ldrh r2, [r3, #52] ; 0x34 2afc: e3520001 cmp r2, #1 2b00: 0a000008 beq 2b28 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 2b04: e2422001 sub r2, r2, #1 2b08: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 2b0c: e28d0014 add r0, sp, #20 2b10: e3a01000 mov r1, #0 2b14: eb0001a9 bl 31c0 2b18: e5953050 ldr r3, [r5, #80] ; 0x50 2b1c: e59d2014 ldr r2, [sp, #20] 2b20: e5832048 str r2, [r3, #72] ; 0x48 2b24: eaffffde b 2aa4 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 2b28: e1a0100d mov r1, sp 2b2c: e1a00006 mov r0, r6 2b30: e59d3008 ldr r3, [sp, #8] 2b34: e1a0e00f mov lr, pc 2b38: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 2b3c: e3500000 cmp r0, #0 2b40: 13e00000 mvnne r0, #0 2b44: 0affffd6 beq 2aa4 2b48: eaffffda b 2ab8 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 2b4c: eb003d36 bl 1202c <__errno> <== NOT EXECUTED 2b50: e3a03016 mov r3, #22 <== NOT EXECUTED 2b54: e5803000 str r3, [r0] <== NOT EXECUTED 2b58: e3e00000 mvn r0, #0 <== NOT EXECUTED 2b5c: eaffffd5 b 2ab8 <== NOT EXECUTED 00002b60 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2b60: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2b64: e593204c ldr r2, [r3, #76] ; 0x4c 2b68: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2b6c: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2b70: 1a000005 bne 2b8c /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 2b74: e593205c ldr r2, [r3, #92] ; 0x5c 2b78: e3520000 cmp r2, #0 2b7c: 0a000007 beq 2ba0 /* * 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; 2b80: e3a00000 mov r0, #0 2b84: e583005c str r0, [r3, #92] ; 0x5c return 0; } 2b88: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 2b8c: eb003d26 bl 1202c <__errno> <== NOT EXECUTED 2b90: e3a03014 mov r3, #20 <== NOT EXECUTED 2b94: e5803000 str r3, [r0] <== NOT EXECUTED 2b98: e3e00000 mvn r0, #0 <== NOT EXECUTED 2b9c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 2ba0: eb003d21 bl 1202c <__errno> <== NOT EXECUTED 2ba4: e3a03016 mov r3, #22 <== NOT EXECUTED 2ba8: e5803000 str r3, [r0] <== NOT EXECUTED 2bac: e3e00000 mvn r0, #0 <== NOT EXECUTED 2bb0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00001cdc : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1cdc: e59f30d0 ldr r3, [pc, #208] ; 1db4 1ce0: e5933000 ldr r3, [r3] 1ce4: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1ce8: e92d4070 push {r4, r5, r6, lr} 1cec: e1a05000 mov r5, r0 1cf0: e1a06001 mov r6, r1 1cf4: e1a04002 mov r4, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 1cf8: 11a0e00f movne lr, pc 1cfc: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1d00: ebffffe1 bl 1c8c /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1d04: e59f30ac ldr r3, [pc, #172] ; 1db8 1d08: e5933000 ldr r3, [r3] 1d0c: e3530000 cmp r3, #0 1d10: 0a000006 beq 1d30 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1d14: e1a00005 mov r0, r5 <== NOT EXECUTED 1d18: e1a01004 mov r1, r4 <== NOT EXECUTED 1d1c: e1a0e00f mov lr, pc <== NOT EXECUTED 1d20: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1d24: e0856006 add r6, r5, r6 <== NOT EXECUTED 1d28: e0606006 rsb r6, r0, r6 <== NOT EXECUTED 1d2c: e1a05000 mov r5, r0 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 1d30: e59f4084 ldr r4, [pc, #132] ; 1dbc 1d34: e5d41000 ldrb r1, [r4] 1d38: e3510000 cmp r1, #0 1d3c: 1a000018 bne 1da4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1d40: e59f3078 ldr r3, [pc, #120] ; 1dc0 1d44: e5d33028 ldrb r3, [r3, #40] ; 0x28 1d48: e3530000 cmp r3, #0 1d4c: 1a00000e bne 1d8c void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1d50: e59f406c ldr r4, [pc, #108] ; 1dc4 1d54: e1a01005 mov r1, r5 1d58: e1a02006 mov r2, r6 1d5c: e5940000 ldr r0, [r4] 1d60: e3a03004 mov r3, #4 1d64: eb001039 bl 5e50 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 1d68: e3500000 cmp r0, #0 1d6c: 0a00000e beq 1dac rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 1d70: e59f5050 ldr r5, [pc, #80] ; 1dc8 1d74: e5940000 ldr r0, [r4] 1d78: e5954000 ldr r4, [r5] 1d7c: eb00133b bl 6a70 <_Protected_heap_Get_size> 1d80: e0800004 add r0, r0, r4 1d84: e5850000 str r0, [r5] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 1d88: e8bd8070 pop {r4, r5, r6, pc} if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 1d8c: e1a00005 mov r0, r5 1d90: e1a02006 mov r2, r6 1d94: eb002d33 bl d268 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 1d98: e5d43000 ldrb r3, [r4] 1d9c: e3530000 cmp r3, #0 1da0: 0affffea beq 1d50 1da4: e59f4018 ldr r4, [pc, #24] ; 1dc4 1da8: eafffff0 b 1d70 heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 1dac: e280001a add r0, r0, #26 <== NOT EXECUTED 1db0: eb000e39 bl 569c <== NOT EXECUTED 00001444 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 1444: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 1448: e250a000 subs sl, r0, #0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 144c: e24dd010 sub sp, sp, #16 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 1450: 0a000031 beq 151c <== NOT EXECUTED return; if ( !print_handler ) 1454: e59f4110 ldr r4, [pc, #272] ; 156c <== NOT EXECUTED 1458: e5947004 ldr r7, [r4, #4] <== NOT EXECUTED 145c: e3570000 cmp r7, #0 <== NOT EXECUTED 1460: 0a00002d beq 151c <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 1464: e37a0001 cmn sl, #1 <== NOT EXECUTED 1468: 0a000032 beq 1538 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 146c: e59a80f0 ldr r8, [sl, #240] ; 0xf0 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 1470: e28a50c0 add r5, sl, #192 ; 0xc0 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 1474: e8950240 ldm r5, {r6, r9} <== NOT EXECUTED 1478: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 147c: e2466010 sub r6, r6, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 1480: e1a00009 mov r0, r9 <== NOT EXECUTED 1484: e1a01006 mov r1, r6 <== NOT EXECUTED 1488: ebffffd7 bl 13ec <== NOT EXECUTED if ( high_water_mark ) 148c: e250b000 subs fp, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 1490: 10899006 addne r9, r9, r6 <== NOT EXECUTED 1494: 106bb009 rsbne fp, fp, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 1498: e35a0000 cmp sl, #0 <== NOT EXECUTED 149c: 0a00002c beq 1554 <== NOT EXECUTED (*print_handler)( 14a0: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 14a4: e28d2008 add r2, sp, #8 <== NOT EXECUTED 14a8: e3a01005 mov r1, #5 <== NOT EXECUTED 14ac: e1a0000a mov r0, sl <== NOT EXECUTED 14b0: e5949008 ldr r9, [r4, #8] <== NOT EXECUTED 14b4: eb000eaf bl 4f78 <== NOT EXECUTED 14b8: e1a0200a mov r2, sl <== NOT EXECUTED 14bc: e1a03000 mov r3, r0 <== NOT EXECUTED 14c0: e59f10a8 ldr r1, [pc, #168] ; 1570 <== NOT EXECUTED 14c4: e1a00009 mov r0, r9 <== NOT EXECUTED 14c8: e1a0e00f mov lr, pc <== NOT EXECUTED 14cc: e12fff17 bx r7 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 14d0: e5953000 ldr r3, [r5] <== NOT EXECUTED 14d4: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 14d8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 14dc: e0823003 add r3, r2, r3 <== NOT EXECUTED 14e0: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 14e4: e58d8000 str r8, [sp] <== NOT EXECUTED 14e8: e58d6004 str r6, [sp, #4] <== NOT EXECUTED 14ec: e59f1080 ldr r1, [pc, #128] ; 1574 <== NOT EXECUTED 14f0: e1a0e00f mov lr, pc <== NOT EXECUTED 14f4: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 14f8: e5943000 ldr r3, [r4] <== NOT EXECUTED 14fc: e3530000 cmp r3, #0 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 1500: e59f3064 ldr r3, [pc, #100] ; 156c <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 1504: 0a000006 beq 1524 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 1508: e1a0200b mov r2, fp <== NOT EXECUTED 150c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 1510: e59f1060 ldr r1, [pc, #96] ; 1578 <== NOT EXECUTED 1514: e1a0e00f mov lr, pc <== NOT EXECUTED 1518: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED } } 151c: e28dd010 add sp, sp, #16 <== NOT EXECUTED 1520: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 1524: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 1528: e59f104c ldr r1, [pc, #76] ; 157c <== NOT EXECUTED 152c: e1a0e00f mov lr, pc <== NOT EXECUTED 1530: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED 1534: eafffff8 b 151c <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 1538: e59f5040 ldr r5, [pc, #64] ; 1580 <== NOT EXECUTED 153c: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 1540: e3530000 cmp r3, #0 <== NOT EXECUTED 1544: 13a08000 movne r8, #0 <== NOT EXECUTED 1548: 11a0a008 movne sl, r8 <== NOT EXECUTED 154c: 1affffc8 bne 1474 <== NOT EXECUTED 1550: eafffff1 b 151c <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 1554: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 1558: e59f1024 ldr r1, [pc, #36] ; 1584 <== NOT EXECUTED 155c: e3e02000 mvn r2, #0 <== NOT EXECUTED 1560: e1a0e00f mov lr, pc <== NOT EXECUTED 1564: e12fff17 bx r7 <== NOT EXECUTED 1568: eaffffd8 b 14d0 <== NOT EXECUTED 000013ec : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 13ec: e2803010 add r3, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 13f0: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 13f4: e0831001 add r1, r3, r1 <== NOT EXECUTED 13f8: e1530001 cmp r3, r1 <== NOT EXECUTED 13fc: 2a00000c bcs 1434 <== NOT EXECUTED if (*base != U32_PATTERN) 1400: e3a02ca6 mov r2, #42496 ; 0xa600 <== NOT EXECUTED 1404: e242205b sub r2, r2, #91 ; 0x5b <== NOT EXECUTED 1408: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 140c: e1822802 orr r2, r2, r2, lsl #16 <== NOT EXECUTED 1410: e1500002 cmp r0, r2 <== NOT EXECUTED 1414: 0a000003 beq 1428 <== NOT EXECUTED 1418: ea000007 b 143c <== NOT EXECUTED 141c: e5932000 ldr r2, [r3] <== NOT EXECUTED 1420: e1520000 cmp r2, r0 <== NOT EXECUTED 1424: 1a000004 bne 143c <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 1428: e2833004 add r3, r3, #4 <== NOT EXECUTED 142c: e1510003 cmp r1, r3 <== NOT EXECUTED 1430: 8afffff9 bhi 141c <== NOT EXECUTED 1434: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 1438: e12fff1e bx lr <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 143c: e1a00003 mov r0, r3 <== NOT EXECUTED 1440: e12fff1e bx lr <== NOT EXECUTED 0000a3bc <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a3bc: e59f3154 ldr r3, [pc, #340] ; a518 <_CORE_mutex_Seize_interrupt_trylock+0x15c> a3c0: e5933000 ldr r3, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a3c4: e3a02000 mov r2, #0 a3c8: e5832034 str r2, [r3, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a3cc: e590c050 ldr ip, [r0, #80] ; 0x50 a3d0: e15c0002 cmp ip, r2 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { a3d4: e92d4070 push {r4, r5, r6, lr} a3d8: 0a00000e beq a418 <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; a3dc: e5802050 str r2, [r0, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; a3e0: e590c048 ldr ip, [r0, #72] ; 0x48 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; the_mutex->holder_id = executing->Object.id; a3e4: e5935008 ldr r5, [r3, #8] the_mutex->nest_count = 1; a3e8: e3a04001 mov r4, #1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a3ec: e35c0002 cmp ip, #2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; a3f0: e5805060 str r5, [r0, #96] ; 0x60 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; a3f4: e580305c str r3, [r0, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; a3f8: e5804054 str r4, [r0, #84] ; 0x54 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a3fc: 0a00000a beq a42c <_CORE_mutex_Seize_interrupt_trylock+0x70> a400: e35c0003 cmp ip, #3 a404: 0a000019 beq a470 <_CORE_mutex_Seize_interrupt_trylock+0xb4> a408: e5913000 ldr r3, [r1] a40c: e129f003 msr CPSR_fc, r3 a410: e3a00000 mov r0, #0 a414: e8bd8070 pop {r4, r5, r6, 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 ) ) { a418: e590205c ldr r2, [r0, #92] ; 0x5c a41c: e1530002 cmp r3, r2 a420: 0a000008 beq a448 <_CORE_mutex_Seize_interrupt_trylock+0x8c> a424: e3a00001 mov r0, #1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } a428: e8bd8070 pop {r4, r5, r6, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a42c: e593201c ldr r2, [r3, #28] a430: e2822001 add r2, r2, #1 a434: e583201c str r2, [r3, #28] a438: e5913000 ldr r3, [r1] a43c: e129f003 msr CPSR_fc, r3 a440: e3a00000 mov r0, #0 a444: e8bd8070 pop {r4, r5, r6, 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { a448: e5902040 ldr r2, [r0, #64] ; 0x40 a44c: e3520000 cmp r2, #0 a450: 1a000017 bne a4b4 <_CORE_mutex_Seize_interrupt_trylock+0xf8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; a454: e5903054 ldr r3, [r0, #84] ; 0x54 a458: e2833001 add r3, r3, #1 a45c: e5803054 str r3, [r0, #84] ; 0x54 a460: e5913000 ldr r3, [r1] a464: e129f003 msr CPSR_fc, r3 a468: e3a00000 mov r0, #0 a46c: e8bd8070 pop {r4, r5, r6, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a470: e593c01c ldr ip, [r3, #28] a474: e08c5004 add r5, ip, r4 a478: e583501c str r5, [r3, #28] { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; a47c: e5935014 ldr r5, [r3, #20] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; a480: e590604c ldr r6, [r0, #76] ; 0x4c current = executing->current_priority; if ( current == ceiling ) { a484: e1560005 cmp r6, r5 a488: 0a00001e beq a508 <_CORE_mutex_Seize_interrupt_trylock+0x14c> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { a48c: 3a000010 bcc a4d4 <_CORE_mutex_Seize_interrupt_trylock+0x118> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a490: e3a05006 mov r5, #6 a494: e5835034 str r5, [r3, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ a498: e5802054 str r2, [r0, #84] ; 0x54 _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; a49c: e5804050 str r4, [r0, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ a4a0: e583c01c str ip, [r3, #28] a4a4: e5913000 ldr r3, [r1] a4a8: e129f003 msr CPSR_fc, r3 a4ac: e3a00000 mov r0, #0 a4b0: e8bd8070 pop {r4, r5, r6, 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { a4b4: e3520001 cmp r2, #1 a4b8: 1affffd9 bne a424 <_CORE_mutex_Seize_interrupt_trylock+0x68> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; a4bc: e3a02002 mov r2, #2 <== NOT EXECUTED a4c0: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED a4c4: e5913000 ldr r3, [r1] <== NOT EXECUTED a4c8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED a4cc: e3a00000 mov r0, #0 <== NOT EXECUTED a4d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a4d4: e59f3040 ldr r3, [pc, #64] ; a51c <_CORE_mutex_Seize_interrupt_trylock+0x160> a4d8: e5932000 ldr r2, [r3] a4dc: e2822001 add r2, r2, #1 a4e0: e5832000 str r2, [r3] a4e4: e5913000 ldr r3, [r1] a4e8: e129f003 msr CPSR_fc, r3 } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( a4ec: e3a02000 mov r2, #0 a4f0: e590104c ldr r1, [r0, #76] ; 0x4c a4f4: e590005c ldr r0, [r0, #92] ; 0x5c a4f8: ebfff172 bl 6ac8 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); a4fc: ebfff2dc bl 7074 <_Thread_Enable_dispatch> a500: e3a00000 mov r0, #0 a504: e8bd8070 pop {r4, r5, r6, pc} a508: e5913000 ldr r3, [r1] a50c: e129f003 msr CPSR_fc, r3 a510: e3a00000 mov r0, #0 a514: e8bd8070 pop {r4, r5, r6, pc} 0000a608 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a608: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a60c: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; a610: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a614: e24dd01c sub sp, sp, #28 a618: e1a05001 mov r5, r1 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { a61c: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a620: e1a07000 mov r7, r0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { a624: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a628: e1a0b003 mov fp, r3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; a62c: e590a008 ldr sl, [r0, #8] Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; a630: e58d200c str r2, [sp, #12] uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { a634: 2a000076 bcs a814 <_Heap_Allocate_aligned_with_boundary+0x20c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { a638: e3530000 cmp r3, #0 a63c: 1a000072 bne a80c <_Heap_Allocate_aligned_with_boundary+0x204> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a640: e157000a cmp r7, sl a644: 03a06000 moveq r6, #0 a648: 0a000074 beq a820 <_Heap_Allocate_aligned_with_boundary+0x218> uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; a64c: e59d300c ldr r3, [sp, #12] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; a650: e2651004 rsb r1, r5, #4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; a654: e2833007 add r3, r3, #7 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a658: e3a06000 mov r6, #0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; a65c: e58d3010 str r3, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; a660: e58d1014 str r1, [sp, #20] a664: ea000004 b a67c <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { a668: e3540000 cmp r4, #0 a66c: 1a000059 bne a7d8 <_Heap_Allocate_aligned_with_boundary+0x1d0> break; } block = block->next; a670: e59aa008 ldr sl, [sl, #8] if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a674: e157000a cmp r7, sl a678: 0a000068 beq a820 <_Heap_Allocate_aligned_with_boundary+0x218> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { a67c: e59a9004 ldr r9, [sl, #4] a680: e59d2000 ldr r2, [sp] a684: e1520009 cmp r2, r9 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; a688: e2866001 add r6, r6, #1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { a68c: 2afffff7 bcs a670 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { a690: e3580000 cmp r8, #0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; a694: 028a4008 addeq r4, sl, #8 a698: 0afffff2 beq a668 <_Heap_Allocate_aligned_with_boundary+0x60> uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; a69c: e59d1014 ldr r1, [sp, #20] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; a6a0: e3c99001 bic r9, r9, #1 a6a4: e08a9009 add r9, sl, r9 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a6a8: e5973014 ldr r3, [r7, #20] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; a6ac: e59d2010 ldr r2, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; a6b0: e0814009 add r4, r1, r9 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a6b4: e58d3004 str r3, [sp, #4] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a6b8: e1a00004 mov r0, r4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; a6bc: e0633002 rsb r3, r3, r2 a6c0: e1a01008 mov r1, r8 a6c4: e0839009 add r9, r3, r9 a6c8: eb002e63 bl 1605c <__umodsi3> a6cc: e0604004 rsb r4, r0, r4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; a6d0: e28a3008 add r3, sl, #8 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { a6d4: e1590004 cmp r9, r4 a6d8: e58d3008 str r3, [sp, #8] a6dc: 2a000003 bcs a6f0 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a6e0: e1a00009 mov r0, r9 a6e4: e1a01008 mov r1, r8 a6e8: eb002e5b bl 1605c <__umodsi3> a6ec: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { a6f0: e35b0000 cmp fp, #0 a6f4: 0a000025 beq a790 <_Heap_Allocate_aligned_with_boundary+0x188> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; a6f8: e0849005 add r9, r4, r5 a6fc: e1a00009 mov r0, r9 a700: e1a0100b mov r1, fp a704: eb002e54 bl 1605c <__umodsi3> a708: e0600009 rsb r0, r0, r9 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { a70c: e1590000 cmp r9, r0 a710: 93a03000 movls r3, #0 a714: 83a03001 movhi r3, #1 a718: e1540000 cmp r4, r0 a71c: 23a03000 movcs r3, #0 a720: e3530000 cmp r3, #0 a724: 0a000019 beq a790 <_Heap_Allocate_aligned_with_boundary+0x188> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; a728: e59d1008 ldr r1, [sp, #8] a72c: e0819005 add r9, r1, r5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { a730: e1590000 cmp r9, r0 a734: 958d6018 strls r6, [sp, #24] a738: 9a000002 bls a748 <_Heap_Allocate_aligned_with_boundary+0x140> a73c: eaffffcb b a670 <_Heap_Allocate_aligned_with_boundary+0x68> a740: e1590000 cmp r9, r0 a744: 8a000037 bhi a828 <_Heap_Allocate_aligned_with_boundary+0x220> return 0; } alloc_begin = boundary_line - alloc_size; a748: e0654000 rsb r4, r5, r0 a74c: e1a01008 mov r1, r8 a750: e1a00004 mov r0, r4 a754: eb002e40 bl 1605c <__umodsi3> a758: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; a75c: e0846005 add r6, r4, r5 a760: e1a00006 mov r0, r6 a764: e1a0100b mov r1, fp a768: eb002e3b bl 1605c <__umodsi3> a76c: e0600006 rsb r0, r0, r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { a770: e1560000 cmp r6, r0 a774: 93a03000 movls r3, #0 a778: 83a03001 movhi r3, #1 a77c: e1540000 cmp r4, r0 a780: 23a03000 movcs r3, #0 a784: e3530000 cmp r3, #0 a788: 1affffec bne a740 <_Heap_Allocate_aligned_with_boundary+0x138> a78c: e59d6018 ldr r6, [sp, #24] boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { a790: e59d2008 ldr r2, [sp, #8] a794: e1520004 cmp r2, r4 a798: 8affffb4 bhi a670 <_Heap_Allocate_aligned_with_boundary+0x68> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; a79c: e59d100c ldr r1, [sp, #12] a7a0: e1a00004 mov r0, r4 a7a4: eb002e2c bl 1605c <__umodsi3> a7a8: e26a94ff rsb r9, sl, #-16777216 ; 0xff000000 a7ac: e28998ff add r9, r9, #16711680 ; 0xff0000 a7b0: e2899cff add r9, r9, #65280 ; 0xff00 a7b4: e28990f8 add r9, r9, #248 ; 0xf8 a7b8: e0899004 add r9, r9, r4 if ( free_size >= min_block_size || free_size == 0 ) { a7bc: e59d1004 ldr r1, [sp, #4] a7c0: e0603009 rsb r3, r0, r9 a7c4: e1590000 cmp r9, r0 a7c8: 11510003 cmpne r1, r3 a7cc: 8affffa7 bhi a670 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { a7d0: e3540000 cmp r4, #0 a7d4: 0affffa5 beq a670 <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; a7d8: e597304c ldr r3, [r7, #76] ; 0x4c a7dc: e0833006 add r3, r3, r6 a7e0: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a7e4: e1a0100a mov r1, sl a7e8: e1a03005 mov r3, r5 a7ec: e1a00007 mov r0, r7 a7f0: e1a02004 mov r2, r4 a7f4: ebffee2d bl 60b0 <_Heap_Block_allocate> a7f8: e1a00004 mov r0, r4 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; a7fc: e5973044 ldr r3, [r7, #68] ; 0x44 a800: e1530006 cmp r3, r6 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; a804: 35876044 strcc r6, [r7, #68] ; 0x44 a808: ea000002 b a818 <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { a80c: e1550003 cmp r5, r3 a810: 9a000006 bls a830 <_Heap_Allocate_aligned_with_boundary+0x228> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; a814: e3a00000 mov r0, #0 } return (void *) alloc_begin; } a818: e28dd01c add sp, sp, #28 a81c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a820: e3a00000 mov r0, #0 a824: eafffff4 b a7fc <_Heap_Allocate_aligned_with_boundary+0x1f4> a828: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED a82c: eaffff8f b a670 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { a830: e3580000 cmp r8, #0 a834: 01a08002 moveq r8, r2 a838: eaffff80 b a640 <_Heap_Allocate_aligned_with_boundary+0x38> 00006e40 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6e40: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 6e44: e59f35d0 ldr r3, [pc, #1488] ; 741c <_Heap_Walk+0x5dc> uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6e48: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 6e4c: e5933000 ldr r3, [r3] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6e50: e59f25c8 ldr r2, [pc, #1480] ; 7420 <_Heap_Walk+0x5e0> 6e54: e59fa5c8 ldr sl, [pc, #1480] ; 7424 <_Heap_Walk+0x5e4> 6e58: 01a0a002 moveq sl, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 6e5c: e3530003 cmp r3, #3 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 6e60: e5902010 ldr r2, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; 6e64: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6e68: e24dd038 sub sp, sp, #56 ; 0x38 6e6c: e1a04000 mov r4, r0 6e70: e1a08001 mov r8, r1 uintptr_t const page_size = heap->page_size; 6e74: e58d2020 str r2, [sp, #32] uintptr_t const min_block_size = heap->min_block_size; 6e78: e590b014 ldr fp, [r0, #20] Heap_Block *const last_block = heap->last_block; 6e7c: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *block = heap->first_block; 6e80: e5905020 ldr r5, [r0, #32] Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 6e84: 0a000002 beq 6e94 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 6e88: e3a00001 mov r0, #1 block = next_block; } return true; } 6e8c: e28dd038 add sp, sp, #56 ; 0x38 6e90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 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)( 6e94: e5900018 ldr r0, [r0, #24] 6e98: e594101c ldr r1, [r4, #28] 6e9c: e2842008 add r2, r4, #8 6ea0: e892000c ldm r2, {r2, r3} 6ea4: e59dc024 ldr ip, [sp, #36] ; 0x24 6ea8: e98d0003 stmib sp, {r0, r1} 6eac: e58d2014 str r2, [sp, #20] 6eb0: e58d3018 str r3, [sp, #24] 6eb4: e59f256c ldr r2, [pc, #1388] ; 7428 <_Heap_Walk+0x5e8> 6eb8: e58db000 str fp, [sp] 6ebc: e58d500c str r5, [sp, #12] 6ec0: e58dc010 str ip, [sp, #16] 6ec4: e1a00008 mov r0, r8 6ec8: e3a01000 mov r1, #0 6ecc: e59d3020 ldr r3, [sp, #32] 6ed0: e1a0e00f mov lr, pc 6ed4: e12fff1a bx sl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 6ed8: e59d2020 ldr r2, [sp, #32] 6edc: e3520000 cmp r2, #0 6ee0: 0a000032 beq 6fb0 <_Heap_Walk+0x170> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 6ee4: e59d3020 ldr r3, [sp, #32] 6ee8: e2139003 ands r9, r3, #3 6eec: 1a000036 bne 6fcc <_Heap_Walk+0x18c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 6ef0: e1a0000b mov r0, fp 6ef4: e59d1020 ldr r1, [sp, #32] 6ef8: ebffe746 bl c18 <__umodsi3> 6efc: e2506000 subs r6, r0, #0 6f00: 1a000038 bne 6fe8 <_Heap_Walk+0x1a8> ); return false; } if ( 6f04: e2850008 add r0, r5, #8 6f08: e59d1020 ldr r1, [sp, #32] 6f0c: ebffe741 bl c18 <__umodsi3> 6f10: e2509000 subs r9, r0, #0 6f14: 1a00003b bne 7008 <_Heap_Walk+0x1c8> 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; 6f18: e5957004 ldr r7, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 6f1c: e2176001 ands r6, r7, #1 6f20: 0a000040 beq 7028 <_Heap_Walk+0x1e8> ); return false; } if ( first_block->prev_size != page_size ) { 6f24: e5953000 ldr r3, [r5] 6f28: e59dc020 ldr ip, [sp, #32] 6f2c: e15c0003 cmp ip, r3 6f30: 1a000016 bne 6f90 <_Heap_Walk+0x150> ); return false; } if ( _Heap_Is_free( last_block ) ) { 6f34: e59d2024 ldr r2, [sp, #36] ; 0x24 6f38: e5923004 ldr r3, [r2, #4] 6f3c: e3c33001 bic r3, r3, #1 6f40: e0823003 add r3, r2, r3 6f44: e5939004 ldr r9, [r3, #4] 6f48: e2199001 ands r9, r9, #1 6f4c: 0a000112 beq 739c <_Heap_Walk+0x55c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 6f50: e5949008 ldr r9, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6f54: e5943010 ldr r3, [r4, #16] 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 ) { 6f58: e1540009 cmp r4, r9 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6f5c: e58d3028 str r3, [sp, #40] ; 0x28 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 ) { 6f60: 0a00006c beq 7118 <_Heap_Walk+0x2d8> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 6f64: e594c020 ldr ip, [r4, #32] RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 6f68: e15c0009 cmp ip, r9 6f6c: 9a000034 bls 7044 <_Heap_Walk+0x204> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 6f70: e1a00008 mov r0, r8 6f74: e1a03009 mov r3, r9 6f78: e3a01001 mov r1, #1 6f7c: e59f24a8 ldr r2, [pc, #1192] ; 742c <_Heap_Walk+0x5ec> 6f80: e1a0e00f mov lr, pc 6f84: e12fff1a bx sl 6f88: e3a00000 mov r0, #0 6f8c: eaffffbe b 6e8c <_Heap_Walk+0x4c> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 6f90: e1a00008 mov r0, r8 6f94: e58dc000 str ip, [sp] 6f98: e3a01001 mov r1, #1 6f9c: e59f248c ldr r2, [pc, #1164] ; 7430 <_Heap_Walk+0x5f0> 6fa0: e1a0e00f mov lr, pc 6fa4: e12fff1a bx sl 6fa8: e1a00009 mov r0, r9 6fac: eaffffb6 b 6e8c <_Heap_Walk+0x4c> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 6fb0: e1a00008 mov r0, r8 6fb4: e3a01001 mov r1, #1 6fb8: e59f2474 ldr r2, [pc, #1140] ; 7434 <_Heap_Walk+0x5f4> 6fbc: e1a0e00f mov lr, pc 6fc0: e12fff1a bx sl 6fc4: e59d0020 ldr r0, [sp, #32] 6fc8: eaffffaf b 6e8c <_Heap_Walk+0x4c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 6fcc: e1a00008 mov r0, r8 6fd0: e3a01001 mov r1, #1 6fd4: e59f245c ldr r2, [pc, #1116] ; 7438 <_Heap_Walk+0x5f8> 6fd8: e1a0e00f mov lr, pc 6fdc: e12fff1a bx sl 6fe0: e3a00000 mov r0, #0 6fe4: eaffffa8 b 6e8c <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 6fe8: e1a00008 mov r0, r8 6fec: e1a0300b mov r3, fp 6ff0: e3a01001 mov r1, #1 6ff4: e59f2440 ldr r2, [pc, #1088] ; 743c <_Heap_Walk+0x5fc> 6ff8: e1a0e00f mov lr, pc 6ffc: e12fff1a bx sl 7000: e1a00009 mov r0, r9 7004: eaffffa0 b 6e8c <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 7008: e1a00008 mov r0, r8 700c: e1a03005 mov r3, r5 7010: e3a01001 mov r1, #1 7014: e59f2424 ldr r2, [pc, #1060] ; 7440 <_Heap_Walk+0x600> 7018: e1a0e00f mov lr, pc 701c: e12fff1a bx sl 7020: e1a00006 mov r0, r6 7024: eaffff98 b 6e8c <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 7028: e1a00008 mov r0, r8 702c: e3a01001 mov r1, #1 7030: e59f240c ldr r2, [pc, #1036] ; 7444 <_Heap_Walk+0x604> 7034: e1a0e00f mov lr, pc 7038: e12fff1a bx sl 703c: e1a00006 mov r0, r6 7040: eaffff91 b 6e8c <_Heap_Walk+0x4c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 7044: e5942024 ldr r2, [r4, #36] ; 0x24 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 7048: e1520009 cmp r2, r9 && (uintptr_t) block <= (uintptr_t) heap->last_block; 704c: e58d202c str r2, [sp, #44] ; 0x2c RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 7050: 3affffc6 bcc 6f70 <_Heap_Walk+0x130> ); return false; } if ( 7054: e2890008 add r0, r9, #8 7058: e1a01003 mov r1, r3 705c: e58dc01c str ip, [sp, #28] 7060: ebffe6ec bl c18 <__umodsi3> 7064: e3500000 cmp r0, #0 7068: e59dc01c ldr ip, [sp, #28] 706c: 1a0000d1 bne 73b8 <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) { 7070: e5993004 ldr r3, [r9, #4] 7074: e3c33001 bic r3, r3, #1 7078: e0893003 add r3, r9, r3 707c: e5933004 ldr r3, [r3, #4] 7080: e3130001 tst r3, #1 7084: 1a0000dc bne 73fc <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) { 7088: e599200c ldr r2, [r9, #12] 708c: e1540002 cmp r4, r2 7090: 1a0000d0 bne 73d8 <_Heap_Walk+0x598> 7094: e58d7030 str r7, [sp, #48] ; 0x30 7098: e58db034 str fp, [sp, #52] ; 0x34 709c: e59d702c ldr r7, [sp, #44] ; 0x2c 70a0: e59db028 ldr fp, [sp, #40] ; 0x28 70a4: e58d502c str r5, [sp, #44] ; 0x2c 70a8: e58d6028 str r6, [sp, #40] ; 0x28 70ac: e1a0600c mov r6, ip 70b0: ea000011 b 70fc <_Heap_Walk+0x2bc> 70b4: e1590006 cmp r9, r6 70b8: 3affffac bcc 6f70 <_Heap_Walk+0x130> 70bc: e1570009 cmp r7, r9 ); return false; } if ( 70c0: e2890008 add r0, r9, #8 70c4: e1a0100b mov r1, fp 70c8: 3affffa8 bcc 6f70 <_Heap_Walk+0x130> 70cc: ebffe6d1 bl c18 <__umodsi3> 70d0: e3500000 cmp r0, #0 70d4: 1a0000b7 bne 73b8 <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) { 70d8: e5993004 ldr r3, [r9, #4] 70dc: e3c33001 bic r3, r3, #1 70e0: e0833009 add r3, r3, r9 70e4: e5933004 ldr r3, [r3, #4] 70e8: e3130001 tst r3, #1 70ec: 1a0000c2 bne 73fc <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) { 70f0: e599200c ldr r2, [r9, #12] 70f4: e1520005 cmp r2, r5 70f8: 1a0000b6 bne 73d8 <_Heap_Walk+0x598> (*printer)( 70fc: e1a05009 mov r5, r9 return false; } prev_block = free_block; free_block = free_block->next; 7100: e5999008 ldr r9, [r9, #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 ) { 7104: e1540009 cmp r4, r9 7108: 1affffe9 bne 70b4 <_Heap_Walk+0x274> 710c: e28d502c add r5, sp, #44 ; 0x2c 7110: e89508a0 ldm r5, {r5, r7, fp} 7114: e59d6028 ldr r6, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7118: e59d3024 ldr r3, [sp, #36] ; 0x24 711c: e1530005 cmp r3, r5 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 7120: 158db028 strne fp, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7124: 0affff57 beq 6e88 <_Heap_Walk+0x48> - 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; 7128: e3c77001 bic r7, r7, #1 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; if ( prev_used ) { 712c: e21610ff ands r1, r6, #255 ; 0xff RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7130: e0876005 add r6, r7, r5 7134: 0a000012 beq 7184 <_Heap_Walk+0x344> (*printer)( 7138: e1a03005 mov r3, r5 713c: e58d7000 str r7, [sp] 7140: e1a00008 mov r0, r8 7144: e3a01000 mov r1, #0 7148: e59f22f8 ldr r2, [pc, #760] ; 7448 <_Heap_Walk+0x608> 714c: e1a0e00f mov lr, pc 7150: e12fff1a bx sl RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 7154: e5943020 ldr r3, [r4, #32] 7158: e1530006 cmp r3, r6 715c: 9a000013 bls 71b0 <_Heap_Walk+0x370> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 7160: e1a00008 mov r0, r8 7164: e58d6000 str r6, [sp] 7168: e1a03005 mov r3, r5 716c: e3a01001 mov r1, #1 7170: e59f22d4 ldr r2, [pc, #724] ; 744c <_Heap_Walk+0x60c> 7174: e1a0e00f mov lr, pc 7178: e12fff1a bx sl 717c: e3a00000 mov r0, #0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 7180: eaffff41 b 6e8c <_Heap_Walk+0x4c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 7184: e58d7000 str r7, [sp] 7188: e5953000 ldr r3, [r5] 718c: e1a00008 mov r0, r8 7190: e58d3004 str r3, [sp, #4] 7194: e59f22b4 ldr r2, [pc, #692] ; 7450 <_Heap_Walk+0x610> 7198: e1a03005 mov r3, r5 719c: e1a0e00f mov lr, pc 71a0: e12fff1a bx sl 71a4: e5943020 ldr r3, [r4, #32] 71a8: e1530006 cmp r3, r6 71ac: 8affffeb bhi 7160 <_Heap_Walk+0x320> 71b0: e5943024 ldr r3, [r4, #36] ; 0x24 71b4: e1530006 cmp r3, r6 71b8: 3affffe8 bcc 7160 <_Heap_Walk+0x320> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 71bc: e1a00007 mov r0, r7 71c0: e59d1020 ldr r1, [sp, #32] 71c4: ebffe693 bl c18 <__umodsi3> 71c8: e2509000 subs r9, r0, #0 71cc: 1a000055 bne 7328 <_Heap_Walk+0x4e8> ); return false; } if ( block_size < min_block_size ) { 71d0: e59d3028 ldr r3, [sp, #40] ; 0x28 71d4: e1530007 cmp r3, r7 71d8: 8a00005b bhi 734c <_Heap_Walk+0x50c> ); return false; } if ( next_block_begin <= block_begin ) { 71dc: e1550006 cmp r5, r6 71e0: 2a000064 bcs 7378 <_Heap_Walk+0x538> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 71e4: e5963004 ldr r3, [r6, #4] 71e8: e3130001 tst r3, #1 71ec: 1a000036 bne 72cc <_Heap_Walk+0x48c> 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; 71f0: e595b004 ldr fp, [r5, #4] 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)( 71f4: e595200c ldr r2, [r5, #12] return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 71f8: e5943008 ldr r3, [r4, #8] - 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; 71fc: e3cb7001 bic r7, fp, #1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 7200: e1530002 cmp r3, r2 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 7204: e594100c ldr r1, [r4, #12] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7208: e0859007 add r9, r5, r7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 720c: 059f0240 ldreq r0, [pc, #576] ; 7454 <_Heap_Walk+0x614> 7210: 0a000003 beq 7224 <_Heap_Walk+0x3e4> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 7214: e59fc23c ldr ip, [pc, #572] ; 7458 <_Heap_Walk+0x618> 7218: e1520004 cmp r2, r4 721c: e59f0238 ldr r0, [pc, #568] ; 745c <_Heap_Walk+0x61c> 7220: 11a0000c movne r0, 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)( 7224: e5953008 ldr r3, [r5, #8] 7228: e1510003 cmp r1, r3 722c: 059f122c ldreq r1, [pc, #556] ; 7460 <_Heap_Walk+0x620> 7230: 0a000003 beq 7244 <_Heap_Walk+0x404> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 7234: e59fc21c ldr ip, [pc, #540] ; 7458 <_Heap_Walk+0x618> 7238: e1530004 cmp r3, r4 723c: e59f1220 ldr r1, [pc, #544] ; 7464 <_Heap_Walk+0x624> 7240: 11a0100c movne 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)( 7244: e58d2000 str r2, [sp] 7248: e98d0009 stmib sp, {r0, r3} 724c: e58d100c str r1, [sp, #12] 7250: e1a03005 mov r3, r5 7254: e1a00008 mov r0, r8 7258: e3a01000 mov r1, #0 725c: e59f2204 ldr r2, [pc, #516] ; 7468 <_Heap_Walk+0x628> 7260: e1a0e00f mov lr, pc 7264: e12fff1a bx sl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 7268: e5993000 ldr r3, [r9] 726c: e1570003 cmp r7, r3 7270: 0a00000a beq 72a0 <_Heap_Walk+0x460> (*printer)( 7274: e58d3004 str r3, [sp, #4] 7278: e1a00008 mov r0, r8 727c: e58d7000 str r7, [sp] 7280: e58d9008 str r9, [sp, #8] 7284: e1a03005 mov r3, r5 7288: e3a01001 mov r1, #1 728c: e59f21d8 ldr r2, [pc, #472] ; 746c <_Heap_Walk+0x62c> 7290: e1a0e00f mov lr, pc 7294: e12fff1a bx sl 7298: e3a00000 mov r0, #0 729c: eafffefa b 6e8c <_Heap_Walk+0x4c> ); return false; } if ( !prev_used ) { 72a0: e21b9001 ands r9, fp, #1 72a4: 0a000017 beq 7308 <_Heap_Walk+0x4c8> 72a8: e5943008 ldr r3, [r4, #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 ) { 72ac: e1530004 cmp r3, r4 72b0: 1a000003 bne 72c4 <_Heap_Walk+0x484> 72b4: ea00000b b 72e8 <_Heap_Walk+0x4a8> <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 72b8: 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 ) { 72bc: e1530004 cmp r3, r4 72c0: 0a000008 beq 72e8 <_Heap_Walk+0x4a8> if ( free_block == block ) { 72c4: e1530005 cmp r3, r5 72c8: 1afffffa bne 72b8 <_Heap_Walk+0x478> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 72cc: e59d2024 ldr r2, [sp, #36] ; 0x24 72d0: e1520006 cmp r2, r6 72d4: 0afffeeb beq 6e88 <_Heap_Walk+0x48> 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 ) { 72d8: e5967004 ldr r7, [r6, #4] 72dc: e1a05006 mov r5, r6 72e0: e2076001 and r6, r7, #1 72e4: eaffff8f b 7128 <_Heap_Walk+0x2e8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 72e8: e1a00008 mov r0, r8 72ec: e1a03005 mov r3, r5 72f0: e3a01001 mov r1, #1 72f4: e59f2174 ldr r2, [pc, #372] ; 7470 <_Heap_Walk+0x630> 72f8: e1a0e00f mov lr, pc 72fc: e12fff1a bx sl 7300: e3a00000 mov r0, #0 7304: eafffee0 b 6e8c <_Heap_Walk+0x4c> return false; } if ( !prev_used ) { (*printer)( 7308: e1a00008 mov r0, r8 730c: e1a03005 mov r3, r5 7310: e3a01001 mov r1, #1 7314: e59f2158 ldr r2, [pc, #344] ; 7474 <_Heap_Walk+0x634> 7318: e1a0e00f mov lr, pc 731c: e12fff1a bx sl 7320: e1a00009 mov r0, r9 7324: eafffed8 b 6e8c <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 7328: e1a00008 mov r0, r8 732c: e58d7000 str r7, [sp] 7330: e1a03005 mov r3, r5 7334: e3a01001 mov r1, #1 7338: e59f2138 ldr r2, [pc, #312] ; 7478 <_Heap_Walk+0x638> 733c: e1a0e00f mov lr, pc 7340: e12fff1a bx sl 7344: e3a00000 mov r0, #0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 7348: eafffecf b 6e8c <_Heap_Walk+0x4c> } if ( block_size < min_block_size ) { (*printer)( 734c: e58d3004 str r3, [sp, #4] 7350: e1a00008 mov r0, r8 7354: e1a0b003 mov fp, r3 7358: e58d7000 str r7, [sp] 735c: e1a03005 mov r3, r5 7360: e3a01001 mov r1, #1 7364: e59f2110 ldr r2, [pc, #272] ; 747c <_Heap_Walk+0x63c> 7368: e1a0e00f mov lr, pc 736c: e12fff1a bx sl 7370: e1a00009 mov r0, r9 block, block_size, min_block_size ); return false; 7374: eafffec4 b 6e8c <_Heap_Walk+0x4c> } if ( next_block_begin <= block_begin ) { (*printer)( 7378: e1a00008 mov r0, r8 737c: e58d6000 str r6, [sp] 7380: e1a03005 mov r3, r5 7384: e3a01001 mov r1, #1 7388: e59f20f0 ldr r2, [pc, #240] ; 7480 <_Heap_Walk+0x640> 738c: e1a0e00f mov lr, pc 7390: e12fff1a bx sl 7394: e1a00009 mov r0, r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 7398: eafffebb b 6e8c <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 739c: e1a00008 mov r0, r8 73a0: e3a01001 mov r1, #1 73a4: e59f20d8 ldr r2, [pc, #216] ; 7484 <_Heap_Walk+0x644> 73a8: e1a0e00f mov lr, pc 73ac: e12fff1a bx sl 73b0: e1a00009 mov r0, r9 73b4: eafffeb4 b 6e8c <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 73b8: e1a00008 mov r0, r8 73bc: e1a03009 mov r3, r9 73c0: e3a01001 mov r1, #1 73c4: e59f20bc ldr r2, [pc, #188] ; 7488 <_Heap_Walk+0x648> 73c8: e1a0e00f mov lr, pc 73cc: e12fff1a bx sl 73d0: e3a00000 mov r0, #0 73d4: eafffeac b 6e8c <_Heap_Walk+0x4c> return false; } if ( free_block->prev != prev_block ) { (*printer)( 73d8: e58d2000 str r2, [sp] 73dc: e1a00008 mov r0, r8 73e0: e1a03009 mov r3, r9 73e4: e3a01001 mov r1, #1 73e8: e59f209c ldr r2, [pc, #156] ; 748c <_Heap_Walk+0x64c> 73ec: e1a0e00f mov lr, pc 73f0: e12fff1a bx sl 73f4: e3a00000 mov r0, #0 73f8: eafffea3 b 6e8c <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 73fc: e1a00008 mov r0, r8 7400: e1a03009 mov r3, r9 7404: e3a01001 mov r1, #1 7408: e59f2080 ldr r2, [pc, #128] ; 7490 <_Heap_Walk+0x650> 740c: e1a0e00f mov lr, pc 7410: e12fff1a bx sl 7414: e3a00000 mov r0, #0 7418: eafffe9b b 6e8c <_Heap_Walk+0x4c> 00006320 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 6320: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6324: e5908034 ldr r8, [r0, #52] ; 0x34 6328: e3580000 cmp r8, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 632c: e24dd014 sub sp, sp, #20 6330: e1a05000 mov r5, r0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 6334: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6338: 0a00009c beq 65b0 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 633c: e1d091b4 ldrh r9, [r0, #20] 6340: e1d0a1b0 ldrh sl, [r0, #16] 6344: e1a01009 mov r1, r9 6348: e1a0000a mov r0, sl 634c: eb003efe bl 15f4c <__aeabi_uidiv> 6350: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 6354: e1b03823 lsrs r3, r3, #16 6358: 01a01009 moveq r1, r9 635c: 01a06007 moveq r6, r7 6360: 01a04003 moveq r4, r3 6364: 0a00000f beq 63a8 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) 6368: e5984000 ldr r4, [r8] 636c: e3540000 cmp r4, #0 6370: 11a01009 movne r1, r9 6374: 11a06007 movne r6, r7 6378: 13a04000 movne r4, #0 637c: 01a01009 moveq r1, r9 6380: 01a06007 moveq r6, r7 6384: 1a000003 bne 6398 <_Objects_Extend_information+0x78> 6388: ea000006 b 63a8 <_Objects_Extend_information+0x88> <== NOT EXECUTED 638c: e7982104 ldr r2, [r8, r4, lsl #2] 6390: e3520000 cmp r2, #0 6394: 0a000003 beq 63a8 <_Objects_Extend_information+0x88> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 6398: e2844001 add r4, r4, #1 639c: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 63a0: e0866009 add r6, r6, r9 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 63a4: 8afffff8 bhi 638c <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 63a8: e08aa001 add sl, sl, r1 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 63ac: e35a0801 cmp sl, #65536 ; 0x10000 63b0: 2a000064 bcs 6548 <_Objects_Extend_information+0x228> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { 63b4: e5d50012 ldrb r0, [r5, #18] /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 63b8: e5952018 ldr r2, [r5, #24] if ( information->auto_extend ) { 63bc: e3500000 cmp r0, #0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 63c0: e0000192 mul r0, r2, r1 if ( information->auto_extend ) { 63c4: 1a000061 bne 6550 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 63c8: e58d3000 str r3, [sp] 63cc: eb00080b bl 8400 <_Workspace_Allocate_or_fatal_error> 63d0: e59d3000 ldr r3, [sp] 63d4: e1a09000 mov r9, r0 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 63d8: e1d521b0 ldrh r2, [r5, #16] 63dc: e1560002 cmp r6, r2 63e0: 3a000038 bcc 64c8 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 63e4: e283c001 add ip, r3, #1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 63e8: e08c008c add r0, ip, ip, lsl #1 63ec: e08a0000 add r0, sl, r0 63f0: e0800007 add r0, r0, r7 63f4: e1a00100 lsl r0, r0, #2 63f8: e88d1008 stm sp, {r3, ip} 63fc: eb00080b bl 8430 <_Workspace_Allocate> if ( !object_blocks ) { 6400: e250b000 subs fp, r0, #0 6404: e89d1008 ldm sp, {r3, ip} 6408: 0a00006e beq 65c8 <_Objects_Extend_information+0x2a8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 640c: e1d521b0 ldrh r2, [r5, #16] 6410: e1570002 cmp r7, r2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 6414: e08b818c add r8, fp, ip, lsl #3 6418: e08bc10c add ip, fp, ip, lsl #2 641c: 3a000051 bcc 6568 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6420: e3570000 cmp r7, #0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 6424: 13a02000 movne r2, #0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 6428: 11a01002 movne r1, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 642c: 0a000003 beq 6440 <_Objects_Extend_information+0x120> local_table[ index ] = NULL; 6430: e7881102 str r1, [r8, r2, lsl #2] } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6434: e2822001 add r2, r2, #1 6438: e1570002 cmp r7, r2 643c: 8afffffb bhi 6430 <_Objects_Extend_information+0x110> 6440: e1a03103 lsl r3, r3, #2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 6444: e1d511b4 ldrh r1, [r5, #20] 6448: e0861001 add r1, r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 644c: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; 6450: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 6454: e78c0003 str r0, [ip, r3] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6458: e78b0003 str r0, [fp, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; 645c: 2a000005 bcs 6478 <_Objects_Extend_information+0x158> 6460: e0882106 add r2, r8, r6, lsl #2 6464: e1a03006 mov r3, r6 index < ( information->allocation_size + index_base ); index++ ) { 6468: e2833001 add r3, r3, #1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 646c: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 6470: e4820004 str r0, [r2], #4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 6474: 3afffffb bcc 6468 <_Objects_Extend_information+0x148> 6478: e10f3000 mrs r3, CPSR 647c: e3832080 orr r2, r3, #128 ; 0x80 6480: e129f002 msr CPSR_fc, r2 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 6484: e5952000 ldr r2, [r5] 6488: e1d510b4 ldrh r1, [r5, #4] 648c: e1a02c02 lsl r2, r2, #24 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6490: e1a0a80a lsl sl, sl, #16 information->maximum_id = _Objects_Build_id( 6494: e3822801 orr r2, r2, #65536 ; 0x10000 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6498: e1a0a82a lsr sl, sl, #16 information->maximum_id = _Objects_Build_id( 649c: e1822d81 orr r2, r2, r1, lsl #27 64a0: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 64a4: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 64a8: e585c030 str ip, [r5, #48] ; 0x30 information->local_table = local_table; 64ac: e585801c str r8, [r5, #28] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 64b0: e585200c str r2, [r5, #12] old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 64b4: e1c5a1b0 strh sl, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 64b8: e585b034 str fp, [r5, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 64bc: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 64c0: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 64c4: 1b0007df blne 8448 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 64c8: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 64cc: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 64d0: e7839104 str r9, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 64d4: e1a01009 mov r1, r9 64d8: e1a00007 mov r0, r7 64dc: e1d521b4 ldrh r2, [r5, #20] 64e0: e5953018 ldr r3, [r5, #24] 64e4: eb000fa5 bl a380 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 64e8: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 64ec: e2858020 add r8, r5, #32 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 64f0: ea000008 b 6518 <_Objects_Extend_information+0x1f8> the_object->id = _Objects_Build_id( 64f4: e5952000 ldr r2, [r5] 64f8: e1d5c0b4 ldrh ip, [r5, #4] 64fc: e1a02c02 lsl r2, r2, #24 6500: e3822801 orr r2, r2, #65536 ; 0x10000 6504: e1822d8c orr r2, r2, ip, lsl #27 6508: e1822006 orr r2, r2, r6 650c: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6510: ebfffd18 bl 5978 <_Chain_Append> index++; 6514: e2866001 add r6, r6, #1 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 6518: e1a00007 mov r0, r7 651c: ebfffd20 bl 59a4 <_Chain_Get> 6520: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6524: e1a01003 mov r1, r3 6528: e1a00008 mov r0, r8 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 652c: 1afffff0 bne 64f4 <_Objects_Extend_information+0x1d4> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6530: e1d531b4 ldrh r3, [r5, #20] information->inactive = 6534: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6538: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = 653c: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6540: e7813004 str r3, [r1, r4] information->inactive = 6544: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 6548: e28dd014 add sp, sp, #20 654c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 6550: e58d3000 str r3, [sp] 6554: eb0007b5 bl 8430 <_Workspace_Allocate> if ( !new_object_block ) 6558: e2509000 subs r9, r0, #0 655c: e59d3000 ldr r3, [sp] 6560: 1affff9c bne 63d8 <_Objects_Extend_information+0xb8> 6564: eafffff7 b 6548 <_Objects_Extend_information+0x228> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 6568: e1a03103 lsl r3, r3, #2 656c: e1a02003 mov r2, r3 6570: e5951034 ldr r1, [r5, #52] ; 0x34 6574: e88d1008 stm sp, {r3, ip} 6578: eb001afe bl d178 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 657c: e89d1008 ldm sp, {r3, ip} 6580: e1a0000c mov r0, ip 6584: e1a02003 mov r2, r3 6588: e5951030 ldr r1, [r5, #48] ; 0x30 658c: eb001af9 bl d178 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 6590: e1d521b0 ldrh r2, [r5, #16] 6594: e0872002 add r2, r7, r2 6598: e1a02102 lsl r2, r2, #2 659c: e1a00008 mov r0, r8 65a0: e595101c ldr r1, [r5, #28] 65a4: eb001af3 bl d178 65a8: e89d1008 ldm sp, {r3, ip} 65ac: eaffffa4 b 6444 <_Objects_Extend_information+0x124> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 65b0: e1a04008 mov r4, r8 65b4: e1d0a1b0 ldrh sl, [r0, #16] 65b8: e1d011b4 ldrh r1, [r0, #20] 65bc: e1a06007 mov r6, r7 65c0: e1a03008 mov r3, r8 65c4: eaffff77 b 63a8 <_Objects_Extend_information+0x88> (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 65c8: e1a00009 mov r0, r9 65cc: eb00079d bl 8448 <_Workspace_Free> return; 65d0: eaffffdc b 6548 <_Objects_Extend_information+0x228> 000075f8 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 75f8: e5913014 ldr r3, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 75fc: e92d05f0 push {r4, r5, r6, r7, r8, sl} _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 7600: e1a0c323 lsr ip, r3, #6 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7604: e281503c add r5, r1, #60 ; 0x3c 7608: e08cc08c add ip, ip, ip, lsl #1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 760c: e3130020 tst r3, #32 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 7610: e2814038 add r4, r1, #56 ; 0x38 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7614: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 7618: e3a05000 mov r5, #0 761c: e581503c str r5, [r1, #60] ; 0x3c the_chain->last = _Chain_Head(the_chain); 7620: e5814040 str r4, [r1, #64] ; 0x40 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 7624: e080c10c add ip, r0, ip, lsl #2 block_state = the_thread_queue->state; 7628: e5906038 ldr r6, [r0, #56] ; 0x38 762c: 159fa178 ldrne sl, [pc, #376] ; 77ac <_Thread_queue_Enqueue_priority+0x1b4> if ( _Thread_queue_Is_reverse_search( priority ) ) 7630: 1a00001c bne 76a8 <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 7634: e28ca004 add sl, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7638: e10f8000 mrs r8, CPSR 763c: e3884080 orr r4, r8, #128 ; 0x80 7640: e129f004 msr CPSR_fc, r4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 7644: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7648: e154000a cmp r4, sl 764c: 1a000009 bne 7678 <_Thread_queue_Enqueue_priority+0x80> 7650: ea000052 b 77a0 <_Thread_queue_Enqueue_priority+0x1a8> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7654: e10f7000 mrs r7, CPSR 7658: e129f008 msr CPSR_fc, r8 765c: e129f007 msr CPSR_fc, r7 search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 7660: e5947010 ldr r7, [r4, #16] 7664: e1160007 tst r6, r7 7668: 0a000033 beq 773c <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 766c: e5944000 ldr r4, [r4] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7670: e154000a cmp r4, sl 7674: 0a000002 beq 7684 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; 7678: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) 767c: e1530005 cmp r3, r5 7680: 8afffff3 bhi 7654 <_Thread_queue_Enqueue_priority+0x5c> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7684: e1a06008 mov r6, r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 7688: e590c030 ldr ip, [r0, #48] ; 0x30 768c: e35c0001 cmp ip, #1 7690: 0a00002b beq 7744 <_Thread_queue_Enqueue_priority+0x14c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 7694: e5826000 str r6, [r2] return the_thread_queue->sync_state; 7698: e1a0000c mov r0, ip } 769c: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} 76a0: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 76a4: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 76a8: e5da5000 ldrb r5, [sl] 76ac: e2855001 add r5, r5, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 76b0: e10f8000 mrs r8, CPSR 76b4: e3884080 orr r4, r8, #128 ; 0x80 76b8: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 76bc: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 76c0: e154000c cmp r4, ip 76c4: 1a000009 bne 76f0 <_Thread_queue_Enqueue_priority+0xf8> 76c8: ea00000b b 76fc <_Thread_queue_Enqueue_priority+0x104> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 76cc: e10f7000 mrs r7, CPSR 76d0: e129f008 msr CPSR_fc, r8 76d4: e129f007 msr CPSR_fc, r7 search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 76d8: e5947010 ldr r7, [r4, #16] 76dc: e1160007 tst r6, r7 76e0: 0affffef beq 76a4 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 76e4: e5944004 ldr r4, [r4, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 76e8: e154000c cmp r4, ip 76ec: 0a000002 beq 76fc <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority; 76f0: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) 76f4: e1530005 cmp r3, r5 76f8: 3afffff3 bcc 76cc <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 76fc: e590c030 ldr ip, [r0, #48] ; 0x30 7700: e35c0001 cmp ip, #1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7704: e1a06008 mov r6, r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7708: 1affffe1 bne 7694 <_Thread_queue_Enqueue_priority+0x9c> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 770c: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7710: e3a03000 mov r3, #0 7714: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7718: 0a000016 beq 7778 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 771c: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7720: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7724: e5810044 str r0, [r1, #68] ; 0x44 next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 7728: e5841000 str r1, [r4] next_node->previous = the_node; 772c: e5831004 str r1, [r3, #4] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7730: e129f008 msr CPSR_fc, r8 7734: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7738: eaffffd7 b 769c <_Thread_queue_Enqueue_priority+0xa4> 773c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 7740: eaffffbc b 7638 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 7744: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7748: e3a03000 mov r3, #0 774c: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7750: 0a000008 beq 7778 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 7754: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7758: e5814000 str r4, [r1] the_node->previous = previous_node; 775c: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7760: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 7764: e5831000 str r1, [r3] search_node->previous = the_node; 7768: e5841004 str r1, [r4, #4] 776c: e129f008 msr CPSR_fc, r8 7770: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7774: eaffffc8 b 769c <_Thread_queue_Enqueue_priority+0xa4> 7778: e284403c add r4, r4, #60 ; 0x3c _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 777c: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7780: e5814000 str r4, [r1] the_node->previous = previous_node; 7784: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7788: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 778c: e5831000 str r1, [r3] search_node->previous = the_node; 7790: e5841004 str r1, [r4, #4] 7794: e129f006 msr CPSR_fc, r6 7798: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 779c: eaffffbe b 769c <_Thread_queue_Enqueue_priority+0xa4> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 77a0: e1a06008 mov r6, r8 77a4: e3e05000 mvn r5, #0 77a8: eaffffb6 b 7688 <_Thread_queue_Enqueue_priority+0x90> 000162d0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 162d0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 162d4: e24dd024 sub sp, sp, #36 ; 0x24 162d8: e28d700c add r7, sp, #12 162dc: e28d2018 add r2, sp, #24 162e0: e1a04000 mov r4, r0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 162e4: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 162e8: e282a004 add sl, r2, #4 162ec: e2872004 add r2, r7, #4 162f0: e58d2000 str r2, [sp] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 162f4: e58d301c str r3, [sp, #28] the_chain->last = _Chain_Head(the_chain); 162f8: e28d0018 add r0, sp, #24 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 162fc: e58d200c str r2, [sp, #12] the_chain->permanent_null = NULL; 16300: e58d3010 str r3, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 16304: e2842008 add r2, r4, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 16308: e2843040 add r3, r4, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1630c: e58da018 str sl, [sp, #24] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 16310: e58d0020 str r0, [sp, #32] 16314: e58d7014 str r7, [sp, #20] 16318: e59f91a0 ldr r9, [pc, #416] ; 164c0 <_Timer_server_Body+0x1f0> 1631c: e59fb1a0 ldr fp, [pc, #416] ; 164c4 <_Timer_server_Body+0x1f4> static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 16320: e58d2008 str r2, [sp, #8] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 16324: e58d3004 str r3, [sp, #4] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16328: e2846030 add r6, r4, #48 ; 0x30 /* * 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 ); 1632c: e2848068 add r8, r4, #104 ; 0x68 { /* * 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; 16330: e28d0018 add r0, sp, #24 16334: e5840078 str r0, [r4, #120] ; 0x78 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 16338: e5993000 ldr r3, [r9] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1633c: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16340: e1a00006 mov r0, r6 16344: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 16348: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1634c: e1a02007 mov r2, r7 16350: eb0010a8 bl 1a5f8 <_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(); 16354: e59b5000 ldr r5, [fp] Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 16358: e5941074 ldr r1, [r4, #116] ; 0x74 /* * 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 ) { 1635c: e1550001 cmp r5, r1 16360: 8a000022 bhi 163f0 <_Timer_server_Body+0x120> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 16364: 3a000018 bcc 163cc <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 16368: e5845074 str r5, [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 ); 1636c: e5940078 ldr r0, [r4, #120] ; 0x78 16370: eb000249 bl 16c9c <_Chain_Get> if ( timer == NULL ) { 16374: e3500000 cmp r0, #0 16378: 0a00000b beq 163ac <_Timer_server_Body+0xdc> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1637c: e5903038 ldr r3, [r0, #56] ; 0x38 16380: e3530001 cmp r3, #1 16384: 0a000015 beq 163e0 <_Timer_server_Body+0x110> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 16388: e3530003 cmp r3, #3 1638c: 1afffff6 bne 1636c <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 16390: e2801010 add r1, r0, #16 16394: e1a00008 mov r0, r8 16398: eb0010c5 bl 1a6b4 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1639c: e5940078 ldr r0, [r4, #120] ; 0x78 163a0: eb00023d bl 16c9c <_Chain_Get> if ( timer == NULL ) { 163a4: e3500000 cmp r0, #0 163a8: 1afffff3 bne 1637c <_Timer_server_Body+0xac> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 163ac: e10f2000 mrs r2, CPSR 163b0: e3823080 orr r3, r2, #128 ; 0x80 163b4: e129f003 msr CPSR_fc, r3 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 163b8: e59d3018 ldr r3, [sp, #24] 163bc: e15a0003 cmp sl, r3 163c0: 0a00000f beq 16404 <_Timer_server_Body+0x134> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 163c4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 163c8: eaffffda b 16338 <_Timer_server_Body+0x68> <== NOT EXECUTED /* * 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 ); 163cc: e0652001 rsb r2, r5, r1 163d0: e1a00008 mov r0, r8 163d4: e3a01001 mov r1, #1 163d8: eb001057 bl 1a53c <_Watchdog_Adjust> 163dc: eaffffe1 b 16368 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 163e0: e2801010 add r1, r0, #16 163e4: e1a00006 mov r0, r6 163e8: eb0010b1 bl 1a6b4 <_Watchdog_Insert> 163ec: eaffffde b 1636c <_Timer_server_Body+0x9c> /* * 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 ); 163f0: e0611005 rsb r1, r1, r5 163f4: e1a00008 mov r0, r8 163f8: e1a02007 mov r2, r7 163fc: eb00107d bl 1a5f8 <_Watchdog_Adjust_to_chain> 16400: eaffffd8 b 16368 <_Timer_server_Body+0x98> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 16404: e5840078 str r0, [r4, #120] ; 0x78 16408: e129f002 msr CPSR_fc, r2 _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 ) ) { 1640c: e59d300c ldr r3, [sp, #12] 16410: e59d2000 ldr r2, [sp] 16414: e1520003 cmp r2, r3 16418: 159d5000 ldrne r5, [sp] 1641c: 1a00000a bne 1644c <_Timer_server_Body+0x17c> 16420: ea000011 b 1646c <_Timer_server_Body+0x19c> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 16424: e5932000 ldr r2, [r3] * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 16428: e3a00000 mov r0, #0 the_chain->first = new_first; 1642c: e58d200c str r2, [sp, #12] 16430: e5830008 str r0, [r3, #8] new_first->previous = _Chain_Head(the_chain); 16434: e5827004 str r7, [r2, #4] 16438: e129f001 msr CPSR_fc, r1 /* * 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 ); 1643c: e2830020 add r0, r3, #32 16440: e8900003 ldm r0, {r0, r1} 16444: e1a0e00f mov lr, pc 16448: e593f01c ldr pc, [r3, #28] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1644c: e10f1000 mrs r1, CPSR 16450: e3813080 orr r3, r1, #128 ; 0x80 16454: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 16458: e59d300c ldr r3, [sp, #12] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 1645c: e1550003 cmp r5, r3 16460: 1affffef bne 16424 <_Timer_server_Body+0x154> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 16464: e129f001 msr CPSR_fc, r1 16468: eaffffb0 b 16330 <_Timer_server_Body+0x60> } } else { ts->active = false; 1646c: e3a02000 mov r2, #0 16470: e5c4207c strb r2, [r4, #124] ; 0x7c 16474: e59f004c ldr r0, [pc, #76] ; 164c8 <_Timer_server_Body+0x1f8> 16478: e5903000 ldr r3, [r0] 1647c: e2833001 add r3, r3, #1 16480: e5803000 str r3, [r0] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 16484: e3a01008 mov r1, #8 16488: e5940000 ldr r0, [r4] 1648c: eb000dbe bl 19b8c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 16490: e1a00004 mov r0, r4 16494: ebffff61 bl 16220 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 16498: e1a00004 mov r0, r4 1649c: ebffff75 bl 16278 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 164a0: eb000b0b bl 190d4 <_Thread_Enable_dispatch> ts->active = true; 164a4: e3a02001 mov r2, #1 164a8: e5c4207c strb r2, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 164ac: e59d0008 ldr r0, [sp, #8] 164b0: eb0010e2 bl 1a840 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 164b4: e59d0004 ldr r0, [sp, #4] 164b8: eb0010e0 bl 1a840 <_Watchdog_Remove> 164bc: eaffff9b b 16330 <_Timer_server_Body+0x60> 0000a0b0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a0b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} a0b4: e1a04000 mov r4, r0 a0b8: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0bc: e10f3000 mrs r3, CPSR a0c0: e3832080 orr r2, r3, #128 ; 0x80 a0c4: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a0c8: e1a07000 mov r7, r0 a0cc: e4972004 ldr r2, [r7], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { a0d0: e1520007 cmp r2, r7 a0d4: 0a000018 beq a13c <_Watchdog_Adjust+0x8c> switch ( direction ) { a0d8: e3510000 cmp r1, #0 a0dc: 1a000018 bne a144 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a0e0: e3550000 cmp r5, #0 a0e4: 0a000014 beq a13c <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a0e8: e5926010 ldr r6, [r2, #16] a0ec: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a0f0: 23a08001 movcs r8, #1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { a0f4: 2a000005 bcs a110 <_Watchdog_Adjust+0x60> a0f8: ea000018 b a160 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a0fc: e0555006 subs r5, r5, r6 a100: 0a00000d beq a13c <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a104: e5926010 ldr r6, [r2, #16] a108: e1560005 cmp r6, r5 a10c: 8a000013 bhi a160 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a110: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a114: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); a118: e1a00004 mov r0, r4 a11c: eb0000a0 bl a3a4 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a120: e10f3000 mrs r3, CPSR a124: e3832080 orr r2, r3, #128 ; 0x80 a128: e129f002 msr CPSR_fc, r2 a12c: e5941000 ldr r1, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a130: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); a134: e1a02001 mov r2, r1 a138: 1affffef bne a0fc <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a13c: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a140: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { a144: e3510001 cmp r1, #1 a148: 1afffffb bne a13c <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; a14c: e5921010 ldr r1, [r2, #16] a150: e0815005 add r5, r1, r5 a154: e5825010 str r5, [r2, #16] a158: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a15c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; a160: e0655006 rsb r5, r5, r6 a164: e5825010 str r5, [r2, #16] break; a168: eafffff3 b a13c <_Watchdog_Adjust+0x8c> 00021f0c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 21f0c: e3a00000 mov r0, #0 <== NOT EXECUTED 21f10: e12fff1e bx lr <== NOT EXECUTED 00017a2c <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 17a2c: e24dd004 sub sp, sp, #4 17a30: e58d0000 str r0, [sp] 17a34: eb0001f1 bl 18200 <___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(); 17a38: ebffffe1 bl 179c4 rtems_shutdown_executive(status); 17a3c: e59d0000 ldr r0, [sp] 17a40: eb00003e bl 17b40 17a44: eafffffe b 17a44 <_exit+0x18> <== NOT EXECUTED 00002c38 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 2c38: e1a00001 mov r0, r1 <== NOT EXECUTED 2c3c: e1a01002 mov r1, r2 <== NOT EXECUTED 2c40: e1a02003 mov r2, r3 <== NOT EXECUTED 2c44: eaffff81 b 2a50 <== NOT EXECUTED 00021eec <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 21eec: e3a00001 mov r0, #1 <== NOT EXECUTED 21ef0: e12fff1e bx lr <== NOT EXECUTED 00009af8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 9af8: eaffffe4 b 9a90 <== NOT EXECUTED 00021f04 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 21f04: e3a00000 mov r0, #0 <== NOT EXECUTED 21f08: e12fff1e bx lr <== NOT EXECUTED 000036bc <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 36bc: e1a00001 mov r0, r1 <== NOT EXECUTED 36c0: e1a01002 mov r1, r2 <== NOT EXECUTED 36c4: eaffff60 b 344c <== NOT EXECUTED 00017b24 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 17b24: e1a00001 mov r0, r1 <== NOT EXECUTED 17b28: e1a01002 mov r1, r2 <== NOT EXECUTED 17b2c: ea00000e b 17b6c <== NOT EXECUTED 00006140 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 6140: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 6144: e1a00001 mov r0, r1 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 6148: e24dd044 sub sp, sp, #68 ; 0x44 614c: e1a05001 mov r5, r1 6150: e1a06002 mov r6, r2 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 6154: ebfffaa0 bl 4bdc if ( old_parent_pathlen == 0 ) 6158: e2507000 subs r7, r0, #0 615c: 1a0000f1 bne 6528 <_rename_r+0x3e8> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 6160: e5d53000 ldrb r3, [r5] 6164: e353002f cmp r3, #47 ; 0x2f 6168: 1353005c cmpne r3, #92 ; 0x5c 616c: 1a000063 bne 6300 <_rename_r+0x1c0> 6170: e59f33e0 ldr r3, [pc, #992] ; 6558 <_rename_r+0x418> <== NOT EXECUTED 6174: e593c000 ldr ip, [r3] <== NOT EXECUTED 6178: e28cc018 add ip, ip, #24 <== NOT EXECUTED 617c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 6180: e28d4018 add r4, sp, #24 <== NOT EXECUTED 6184: e1a0a004 mov sl, r4 <== NOT EXECUTED 6188: e8aa000f stmia sl!, {r0, r1, r2, r3} <== NOT EXECUTED 618c: e59c2000 ldr r2, [ip] <== NOT EXECUTED 6190: e58a2000 str r2, [sl] <== NOT EXECUTED 6194: e3a08000 mov r8, #0 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 6198: e1a0e004 mov lr, r4 619c: e8be000f ldm lr!, {r0, r1, r2, r3} 61a0: e28dc02c add ip, sp, #44 ; 0x2c 61a4: e8ac000f stmia ip!, {r0, r1, r2, r3} 61a8: e59e3000 ldr r3, [lr] name = old + old_parent_pathlen; 61ac: e0855007 add r5, r5, r7 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 61b0: e58c3000 str r3, [ip] name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 61b4: e1a00005 mov r0, r5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 61b8: e58d5040 str r5, [sp, #64] ; 0x40 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 61bc: eb003be2 bl 1514c 61c0: e1a01000 mov r1, r0 61c4: e1a00005 mov r0, r5 61c8: ebfffa6f bl 4b8c 61cc: e0855000 add r5, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 61d0: e1a00005 mov r0, r5 * 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 ) ); 61d4: e58d5040 str r5, [sp, #64] ; 0x40 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 61d8: eb003bdb bl 1514c 61dc: e28d702c add r7, sp, #44 ; 0x2c 61e0: e3a0c000 mov ip, #0 61e4: e1a01000 mov r1, r0 61e8: e1a0200c mov r2, ip 61ec: e1a00005 mov r0, r5 61f0: e1a03007 mov r3, r7 61f4: e58dc000 str ip, [sp] 61f8: ebfffa91 bl 4c44 0, &old_loc, false ); if ( result != 0 ) { 61fc: e3500000 cmp r0, #0 6200: 1a000080 bne 6408 <_rename_r+0x2c8> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 6204: e5d63000 ldrb r3, [r6] 6208: e353002f cmp r3, #47 ; 0x2f 620c: 1353005c cmpne r3, #92 ; 0x5c 6210: 13a0c000 movne ip, #0 6214: 03a0c001 moveq ip, #1 6218: 1a000045 bne 6334 <_rename_r+0x1f4> 621c: e59f3334 ldr r3, [pc, #820] ; 6558 <_rename_r+0x418> 6220: e593c000 ldr ip, [r3] 6224: e28cc018 add ip, ip, #24 6228: e8bc000f ldm ip!, {r0, r1, r2, r3} 622c: e28d5004 add r5, sp, #4 6230: e1a0a005 mov sl, r5 6234: e8aa000f stmia sl!, {r0, r1, r2, r3} 6238: e59c2000 ldr r2, [ip] 623c: e58a2000 str r2, [sl] 6240: e3a0c001 mov ip, #1 if ( !new_parent_loc.ops->evalformake_h ) { 6244: e59d3010 ldr r3, [sp, #16] 6248: e5933004 ldr r3, [r3, #4] 624c: e3530000 cmp r3, #0 6250: 0a00009d beq 64cc <_rename_r+0x38c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 6254: e086000c add r0, r6, ip 6258: e1a01005 mov r1, r5 625c: e28d2040 add r2, sp, #64 ; 0x40 6260: e1a0e00f mov lr, pc 6264: e12fff13 bx r3 if ( result != 0 ) { 6268: e3500000 cmp r0, #0 626c: 1a000074 bne 6444 <_rename_r+0x304> /* * 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 ) { 6270: e59d3014 ldr r3, [sp, #20] 6274: e59d2028 ldr r2, [sp, #40] ; 0x28 6278: e1520003 cmp r2, r3 627c: 1a000042 bne 638c <_rename_r+0x24c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 6280: e59d3010 ldr r3, [sp, #16] 6284: e593c040 ldr ip, [r3, #64] ; 0x40 6288: e35c0000 cmp ip, #0 628c: 0a000089 beq 64b8 <_rename_r+0x378> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 6290: e59d3040 ldr r3, [sp, #64] ; 0x40 6294: e1a00004 mov r0, r4 6298: e1a01007 mov r1, r7 629c: e1a02005 mov r2, r5 62a0: e1a0e00f mov lr, pc 62a4: e12fff1c bx ip rtems_filesystem_freenode( &new_parent_loc ); 62a8: e59d3010 ldr r3, [sp, #16] 62ac: e3530000 cmp r3, #0 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 62b0: e1a06000 mov r6, r0 rtems_filesystem_freenode( &new_parent_loc ); 62b4: 0a000004 beq 62cc <_rename_r+0x18c> 62b8: e593301c ldr r3, [r3, #28] 62bc: e3530000 cmp r3, #0 62c0: 11a00005 movne r0, r5 62c4: 11a0e00f movne lr, pc 62c8: 112fff13 bxne r3 if ( free_old_parentloc ) 62cc: e3580000 cmp r8, #0 62d0: 1a000023 bne 6364 <_rename_r+0x224> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 62d4: e59d3038 ldr r3, [sp, #56] ; 0x38 62d8: e3530000 cmp r3, #0 62dc: 0a000004 beq 62f4 <_rename_r+0x1b4> 62e0: e593301c ldr r3, [r3, #28] 62e4: e3530000 cmp r3, #0 62e8: 11a00007 movne r0, r7 62ec: 11a0e00f movne lr, pc 62f0: 112fff13 bxne r3 return result; } 62f4: e1a00006 mov r0, r6 62f8: e28dd044 add sp, sp, #68 ; 0x44 62fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 6300: e3530000 cmp r3, #0 6304: 0affff99 beq 6170 <_rename_r+0x30> 6308: e59f3248 ldr r3, [pc, #584] ; 6558 <_rename_r+0x418> 630c: e593c000 ldr ip, [r3] 6310: e28cc004 add ip, ip, #4 6314: e8bc000f ldm ip!, {r0, r1, r2, r3} 6318: e28d4018 add r4, sp, #24 631c: e1a0e004 mov lr, r4 6320: e8ae000f stmia lr!, {r0, r1, r2, r3} 6324: e59c2000 ldr r2, [ip] 6328: e1a08007 mov r8, r7 632c: e58e2000 str r2, [lr] 6330: eaffff98 b 6198 <_rename_r+0x58> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 6334: e3530000 cmp r3, #0 6338: 0affffb7 beq 621c <_rename_r+0xdc> 633c: e59f3214 ldr r3, [pc, #532] ; 6558 <_rename_r+0x418> 6340: e593e000 ldr lr, [r3] 6344: e28ee004 add lr, lr, #4 6348: e8be000f ldm lr!, {r0, r1, r2, r3} 634c: e28d5004 add r5, sp, #4 6350: e1a0a005 mov sl, r5 6354: e8aa000f stmia sl!, {r0, r1, r2, r3} 6358: e59e2000 ldr r2, [lr] 635c: e58a2000 str r2, [sl] 6360: eaffffb7 b 6244 <_rename_r+0x104> result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 6364: e59d3024 ldr r3, [sp, #36] ; 0x24 6368: e3530000 cmp r3, #0 636c: 0affffd8 beq 62d4 <_rename_r+0x194> 6370: e593301c ldr r3, [r3, #28] 6374: e3530000 cmp r3, #0 6378: 0affffd5 beq 62d4 <_rename_r+0x194> 637c: e1a00004 mov r0, r4 6380: e1a0e00f mov lr, pc 6384: e12fff13 bx r3 6388: eaffffd1 b 62d4 <_rename_r+0x194> * 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 ) { rtems_filesystem_freenode( &new_parent_loc ); 638c: e59d3010 ldr r3, [sp, #16] 6390: e3530000 cmp r3, #0 6394: 0a000004 beq 63ac <_rename_r+0x26c> 6398: e593301c ldr r3, [r3, #28] 639c: e3530000 cmp r3, #0 63a0: 11a00005 movne r0, r5 63a4: 11a0e00f movne lr, pc 63a8: 112fff13 bxne r3 if ( free_old_parentloc ) 63ac: e3580000 cmp r8, #0 63b0: 0a000007 beq 63d4 <_rename_r+0x294> rtems_filesystem_freenode( &old_parent_loc ); 63b4: e59d3024 ldr r3, [sp, #36] ; 0x24 63b8: e3530000 cmp r3, #0 63bc: 0a000004 beq 63d4 <_rename_r+0x294> 63c0: e593301c ldr r3, [r3, #28] 63c4: e3530000 cmp r3, #0 63c8: 11a00004 movne r0, r4 63cc: 11a0e00f movne lr, pc 63d0: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 63d4: e59d3038 ldr r3, [sp, #56] ; 0x38 63d8: e3530000 cmp r3, #0 63dc: 0a000004 beq 63f4 <_rename_r+0x2b4> 63e0: e593301c ldr r3, [r3, #28] 63e4: e3530000 cmp r3, #0 63e8: 11a00007 movne r0, r7 63ec: 11a0e00f movne lr, pc 63f0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 63f4: eb002e45 bl 11d10 <__errno> 63f8: e3a03012 mov r3, #18 63fc: e5803000 str r3, [r0] 6400: e3e06000 mvn r6, #0 6404: eaffffba b 62f4 <_rename_r+0x1b4> 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 ) 6408: e3580000 cmp r8, #0 640c: 1a000001 bne 6418 <_rename_r+0x2d8> result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 6410: e3e06000 mvn r6, #0 <== NOT EXECUTED 6414: eaffffb6 b 62f4 <_rename_r+0x1b4> <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 6418: e59d3024 ldr r3, [sp, #36] ; 0x24 641c: e3530000 cmp r3, #0 6420: 0afffffa beq 6410 <_rename_r+0x2d0> 6424: e593301c ldr r3, [r3, #28] 6428: e3530000 cmp r3, #0 642c: 0afffff7 beq 6410 <_rename_r+0x2d0> 6430: e1a00004 mov r0, r4 6434: e1a0e00f mov lr, pc 6438: e12fff13 bx r3 643c: e3e06000 mvn r6, #0 6440: eaffffab b 62f4 <_rename_r+0x1b4> rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 6444: e59d3010 ldr r3, [sp, #16] 6448: e3530000 cmp r3, #0 644c: 0a000004 beq 6464 <_rename_r+0x324> 6450: e593301c ldr r3, [r3, #28] 6454: e3530000 cmp r3, #0 6458: 11a00005 movne r0, r5 645c: 11a0e00f movne lr, pc 6460: 112fff13 bxne r3 if ( free_old_parentloc ) 6464: e3580000 cmp r8, #0 6468: 0a000007 beq 648c <_rename_r+0x34c> rtems_filesystem_freenode( &old_parent_loc ); 646c: e59d3024 ldr r3, [sp, #36] ; 0x24 6470: e3530000 cmp r3, #0 6474: 0a000004 beq 648c <_rename_r+0x34c> 6478: e593301c ldr r3, [r3, #28] 647c: e3530000 cmp r3, #0 6480: 11a00004 movne r0, r4 6484: 11a0e00f movne lr, pc 6488: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 648c: e59d3038 ldr r3, [sp, #56] ; 0x38 6490: e3530000 cmp r3, #0 6494: 0affffdd beq 6410 <_rename_r+0x2d0> 6498: e593301c ldr r3, [r3, #28] 649c: e3530000 cmp r3, #0 64a0: 0affffda beq 6410 <_rename_r+0x2d0> 64a4: e1a00007 mov r0, r7 64a8: e1a0e00f mov lr, pc 64ac: e12fff13 bx r3 64b0: e3e06000 mvn r6, #0 64b4: eaffff8e b 62f4 <_rename_r+0x1b4> rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 64b8: e593301c ldr r3, [r3, #28] 64bc: e3530000 cmp r3, #0 64c0: 11a00005 movne r0, r5 64c4: 11a0e00f movne lr, pc 64c8: 112fff13 bxne r3 if ( free_old_parentloc ) 64cc: e3580000 cmp r8, #0 64d0: 0a000007 beq 64f4 <_rename_r+0x3b4> rtems_filesystem_freenode( &old_parent_loc ); 64d4: e59d3024 ldr r3, [sp, #36] ; 0x24 64d8: e3530000 cmp r3, #0 64dc: 0a000004 beq 64f4 <_rename_r+0x3b4> 64e0: e593301c ldr r3, [r3, #28] 64e4: e3530000 cmp r3, #0 64e8: 11a00004 movne r0, r4 64ec: 11a0e00f movne lr, pc 64f0: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 64f4: e59d3038 ldr r3, [sp, #56] ; 0x38 64f8: e3530000 cmp r3, #0 64fc: 0a000004 beq 6514 <_rename_r+0x3d4> 6500: e593301c ldr r3, [r3, #28] 6504: e3530000 cmp r3, #0 6508: 11a00007 movne r0, r7 650c: 11a0e00f movne lr, pc 6510: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 6514: eb002dfd bl 11d10 <__errno> 6518: e3a03086 mov r3, #134 ; 0x86 651c: e5803000 str r3, [r0] 6520: e3e06000 mvn r6, #0 6524: eaffff72 b 62f4 <_rename_r+0x1b4> 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, 6528: e28d4018 add r4, sp, #24 652c: e3a0c000 mov ip, #0 6530: e1a00005 mov r0, r5 6534: e1a01007 mov r1, r7 6538: e3a02002 mov r2, #2 653c: e1a03004 mov r3, r4 6540: e58dc000 str ip, [sp] 6544: ebfff9fa bl 4d34 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 6548: e3500000 cmp r0, #0 654c: 1affffaf bne 6410 <_rename_r+0x2d0> 6550: e3a08001 mov r8, #1 6554: eaffff0f b 6198 <_rename_r+0x58> 000042e8 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 42e8: e1a00001 mov r0, r1 <== NOT EXECUTED 42ec: e1a01002 mov r1, r2 <== NOT EXECUTED 42f0: eaffffc2 b 4200 <== NOT EXECUTED 0000c890 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); c890: e1a00001 mov r0, r1 <== NOT EXECUTED c894: eaffff55 b c5f0 <== NOT EXECUTED 0000b30c : #include int chdir( const char *pathname ) { b30c: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t loc; int result; if ( !pathname ) b310: e2505000 subs r5, r0, #0 #include int chdir( const char *pathname ) { b314: e24dd018 sub sp, sp, #24 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) b318: 0a000031 beq b3e4 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); b31c: eb001089 bl f548 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( b320: e28d4004 add r4, sp, #4 b324: e3a0c001 mov ip, #1 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); b328: e1a01000 mov r1, r0 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( b32c: e1a0200c mov r2, ip b330: e1a00005 mov r0, r5 b334: e1a03004 mov r3, r4 b338: e58dc000 str ip, [sp] b33c: ebffdb9f bl 21c0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) b340: e3500000 cmp r0, #0 b344: 1a000024 bne b3dc return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { b348: e59d2010 ldr r2, [sp, #16] b34c: e5923010 ldr r3, [r2, #16] b350: e3530000 cmp r3, #0 b354: 0a000018 beq b3bc rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { b358: e1a00004 mov r0, r4 b35c: e1a0e00f mov lr, pc b360: e12fff13 bx r3 b364: e3500001 cmp r0, #1 b368: 1a000022 bne b3f8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); b36c: e59f50b8 ldr r5, [pc, #184] ; b42c b370: e595c000 ldr ip, [r5] b374: e59c3010 ldr r3, [ip, #16] b378: e3530000 cmp r3, #0 b37c: 0a000006 beq b39c b380: e593301c ldr r3, [r3, #28] b384: e3530000 cmp r3, #0 b388: 0a000003 beq b39c b38c: e28c0004 add r0, ip, #4 b390: e1a0e00f mov lr, pc b394: e12fff13 bx r3 b398: e595c000 ldr ip, [r5] rtems_filesystem_current = loc; b39c: e8b4000f ldm r4!, {r0, r1, r2, r3} b3a0: e28cc004 add ip, ip, #4 b3a4: e8ac000f stmia ip!, {r0, r1, r2, r3} b3a8: e5943000 ldr r3, [r4] b3ac: e58c3000 str r3, [ip] b3b0: e3a00000 mov r0, #0 return 0; } b3b4: e28dd018 add sp, sp, #24 b3b8: e8bd8030 pop {r4, r5, pc} /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); b3bc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED b3c0: e3530000 cmp r3, #0 <== NOT EXECUTED b3c4: 11a00004 movne r0, r4 <== NOT EXECUTED b3c8: 11a0e00f movne lr, pc <== NOT EXECUTED b3cc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); b3d0: eb000c83 bl e5e4 <__errno> <== NOT EXECUTED b3d4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED b3d8: e5803000 str r3, [r0] <== NOT EXECUTED b3dc: e3e00000 mvn r0, #0 b3e0: eafffff3 b b3b4 { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); b3e4: eb000c7e bl e5e4 <__errno> b3e8: e3a0300e mov r3, #14 b3ec: e5803000 str r3, [r0] b3f0: e3e00000 mvn r0, #0 b3f4: eaffffee b b3b4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); b3f8: e59d3010 ldr r3, [sp, #16] b3fc: e3530000 cmp r3, #0 b400: 0a000004 beq b418 b404: e593301c ldr r3, [r3, #28] b408: e3530000 cmp r3, #0 b40c: 11a00004 movne r0, r4 b410: 11a0e00f movne lr, pc b414: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); b418: eb000c71 bl e5e4 <__errno> b41c: e3a03014 mov r3, #20 b420: e5803000 str r3, [r0] b424: e3e00000 mvn r0, #0 b428: eaffffe1 b b3b4 00003d8c : int chmod( const char *path, mode_t mode ) { 3d8c: e92d4070 push {r4, r5, r6, lr} 3d90: e24dd018 sub sp, sp, #24 3d94: e1a05001 mov r5, r1 3d98: e1a06000 mov r6, r0 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 3d9c: eb003c2f bl 12e60 3da0: e28d4004 add r4, sp, #4 3da4: e1a01000 mov r1, r0 3da8: e3a0c001 mov ip, #1 3dac: e1a00006 mov r0, r6 3db0: e3a02000 mov r2, #0 3db4: e1a03004 mov r3, r4 3db8: e58dc000 str ip, [sp] 3dbc: eb0000cc bl 40f4 if ( status != 0 ) 3dc0: e3500000 cmp r0, #0 3dc4: 1a000020 bne 3e4c return -1; if ( !loc.handlers ){ 3dc8: e59d300c ldr r3, [sp, #12] 3dcc: e3530000 cmp r3, #0 3dd0: 0a000012 beq 3e20 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 3dd4: e593301c ldr r3, [r3, #28] 3dd8: e3530000 cmp r3, #0 3ddc: 0a00001c beq 3e54 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 3de0: e1a01005 mov r1, r5 3de4: e1a00004 mov r0, r4 3de8: e1a0e00f mov lr, pc 3dec: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3df0: e59d3010 ldr r3, [sp, #16] 3df4: e3530000 cmp r3, #0 if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 3df8: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 3dfc: 0a000004 beq 3e14 3e00: e593301c ldr r3, [r3, #28] 3e04: e3530000 cmp r3, #0 3e08: 11a00004 movne r0, r4 3e0c: 11a0e00f movne lr, pc 3e10: 112fff13 bxne r3 return result; } 3e14: e1a00005 mov r0, r5 3e18: e28dd018 add sp, sp, #24 3e1c: e8bd8070 pop {r4, r5, r6, pc} status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 3e20: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3e24: e3530000 cmp r3, #0 <== NOT EXECUTED 3e28: 0a000004 beq 3e40 <== NOT EXECUTED 3e2c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3e30: e3530000 cmp r3, #0 <== NOT EXECUTED 3e34: 11a00004 movne r0, r4 <== NOT EXECUTED 3e38: 11a0e00f movne lr, pc <== NOT EXECUTED 3e3c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 3e40: eb0034c7 bl 11164 <__errno> <== NOT EXECUTED 3e44: e3a03009 mov r3, #9 <== NOT EXECUTED 3e48: e5803000 str r3, [r0] <== NOT EXECUTED 3e4c: e3e05000 mvn r5, #0 3e50: eaffffef b 3e14 } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 3e54: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3e58: e3530000 cmp r3, #0 <== NOT EXECUTED 3e5c: 0a000004 beq 3e74 <== NOT EXECUTED 3e60: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3e64: e3530000 cmp r3, #0 <== NOT EXECUTED 3e68: 11a00004 movne r0, r4 <== NOT EXECUTED 3e6c: 11a0e00f movne lr, pc <== NOT EXECUTED 3e70: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3e74: eb0034ba bl 11164 <__errno> <== NOT EXECUTED 3e78: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3e7c: e5803000 str r3, [r0] <== NOT EXECUTED 3e80: e3e05000 mvn r5, #0 <== NOT EXECUTED 3e84: eaffffe2 b 3e14 <== NOT EXECUTED 00003e88 : int chown( const char *path, uid_t owner, gid_t group ) { 3e88: e92d40f0 push {r4, r5, r6, r7, lr} 3e8c: e1a01801 lsl r1, r1, #16 3e90: e24dd018 sub sp, sp, #24 3e94: e1a02802 lsl r2, r2, #16 3e98: e1a06821 lsr r6, r1, #16 3e9c: e1a05822 lsr r5, r2, #16 3ea0: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 3ea4: eb003bed bl 12e60 3ea8: e28d4004 add r4, sp, #4 3eac: e1a01000 mov r1, r0 3eb0: e3a0c001 mov ip, #1 3eb4: e1a00007 mov r0, r7 3eb8: e3a02000 mov r2, #0 3ebc: e1a03004 mov r3, r4 3ec0: e58dc000 str ip, [sp] 3ec4: eb00008a bl 40f4 3ec8: e3500000 cmp r0, #0 3ecc: 1a00001c bne 3f44 return -1; if ( !loc.ops->chown_h ) { 3ed0: e59d2010 ldr r2, [sp, #16] 3ed4: e5923018 ldr r3, [r2, #24] 3ed8: e3530000 cmp r3, #0 3edc: 0a000010 beq 3f24 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 3ee0: e1a02005 mov r2, r5 3ee4: e1a01006 mov r1, r6 3ee8: e1a00004 mov r0, r4 3eec: e1a0e00f mov lr, pc 3ef0: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3ef4: e59d3010 ldr r3, [sp, #16] 3ef8: e3530000 cmp r3, #0 if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 3efc: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 3f00: 0a000004 beq 3f18 3f04: e593301c ldr r3, [r3, #28] 3f08: e3530000 cmp r3, #0 3f0c: 11a00004 movne r0, r4 3f10: 11a0e00f movne lr, pc 3f14: 112fff13 bxne r3 return result; } 3f18: e1a00005 mov r0, r5 3f1c: e28dd018 add sp, sp, #24 3f20: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 3f24: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3f28: e3530000 cmp r3, #0 <== NOT EXECUTED 3f2c: 11a00004 movne r0, r4 <== NOT EXECUTED 3f30: 11a0e00f movne lr, pc <== NOT EXECUTED 3f34: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3f38: eb003489 bl 11164 <__errno> <== NOT EXECUTED 3f3c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3f40: e5803000 str r3, [r0] <== NOT EXECUTED 3f44: e3e05000 mvn r5, #0 3f48: eafffff2 b 3f18 00001e84 : #include int chroot( const char *pathname ) { 1e84: 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) { 1e88: e59f50d8 ldr r5, [pc, #216] ; 1f68 1e8c: e59f30d8 ldr r3, [pc, #216] ; 1f6c 1e90: e5954000 ldr r4, [r5] 1e94: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 1e98: e24dd018 sub sp, sp, #24 1e9c: 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) { 1ea0: 0a000020 beq 1f28 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 1ea4: e1a00006 mov r0, r6 1ea8: eb002517 bl b30c if (result) { 1eac: e250c000 subs ip, r0, #0 1eb0: 1a000025 bne 1f4c rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 1eb4: e28d4004 add r4, sp, #4 1eb8: e1a0200c mov r2, ip 1ebc: e59f00ac ldr r0, [pc, #172] ; 1f70 1ec0: e3a01001 mov r1, #1 1ec4: e1a03004 mov r3, r4 1ec8: e58dc000 str ip, [sp] 1ecc: eb0000bb bl 21c0 1ed0: e3500000 cmp r0, #0 1ed4: 1a00001c bne 1f4c /* 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); 1ed8: e595c000 ldr ip, [r5] 1edc: e59c3024 ldr r3, [ip, #36] ; 0x24 1ee0: e3530000 cmp r3, #0 1ee4: 0a000007 beq 1f08 1ee8: e593301c ldr r3, [r3, #28] 1eec: e3530000 cmp r3, #0 1ef0: 0a000004 beq 1f08 1ef4: e28c0018 add r0, ip, #24 1ef8: e1a0e00f mov lr, pc 1efc: e12fff13 bx r3 1f00: e59f3060 ldr r3, [pc, #96] ; 1f68 1f04: e593c000 ldr ip, [r3] rtems_filesystem_root = loc; 1f08: e8b4000f ldm r4!, {r0, r1, r2, r3} 1f0c: e28cc018 add ip, ip, #24 1f10: e8ac000f stmia ip!, {r0, r1, r2, r3} 1f14: e5943000 ldr r3, [r4] 1f18: e58c3000 str r3, [ip] 1f1c: e3a00000 mov r0, #0 return 0; } 1f20: e28dd018 add sp, sp, #24 1f24: e8bd8070 pop {r4, r5, r6, pc} 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) { rtems_libio_set_private_env(); /* try to set a new private env*/ 1f28: eb00055b bl 349c if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 1f2c: e5953000 ldr r3, [r5] 1f30: e1530004 cmp r3, r4 1f34: 1affffda bne 1ea4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1f38: eb0031a9 bl e5e4 <__errno> <== NOT EXECUTED 1f3c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1f40: e5803000 str r3, [r0] <== NOT EXECUTED 1f44: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f48: eafffff4 b 1f20 <== NOT EXECUTED } /* clone the new root location */ 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 ); 1f4c: eb0031a4 bl e5e4 <__errno> <== NOT EXECUTED 1f50: e1a04000 mov r4, r0 <== NOT EXECUTED 1f54: eb0031a2 bl e5e4 <__errno> <== NOT EXECUTED 1f58: e5903000 ldr r3, [r0] <== NOT EXECUTED 1f5c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f60: e5843000 str r3, [r4] <== NOT EXECUTED 1f64: eaffffed b 1f20 <== NOT EXECUTED 00008808 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8808: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, 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; 880c: e5936000 ldr r6, [r3] if (!device_name_table) 8810: e3560000 cmp r6, #0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8814: e1a0b003 mov fp, r3 8818: e1a0a000 mov sl, r0 881c: e1a07001 mov r7, 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) 8820: 0a000026 beq 88c0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8824: e59f30a8 ldr r3, [pc, #168] ; 88d4 8828: e5938000 ldr r8, [r3] 882c: e3580000 cmp r8, #0 } /* 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 ); 8830: 13a09000 movne r9, #0 8834: 11a04009 movne r4, r9 for (i = 0; i < rtems_device_table_size; i++) { 8838: 0a000011 beq 8884 if (!device_name_table[i].device_name) 883c: e0899109 add r9, r9, r9, lsl #2 8840: e7965109 ldr r5, [r6, r9, lsl #2] 8844: e3550000 cmp r5, #0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8848: e1a0000a mov r0, sl 884c: e1a02007 mov r2, r7 8850: e1a01005 mov r1, r5 /* 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++) { 8854: e2844001 add r4, r4, #1 if (!device_name_table[i].device_name) 8858: e0869109 add r9, r6, r9, lsl #2 885c: 0a000005 beq 8878 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8860: eb000a23 bl b0f4 8864: e3500000 cmp r0, #0 8868: 1a000002 bne 8878 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 886c: e7d50007 ldrb r0, [r5, r7] 8870: e3500000 cmp r0, #0 8874: 0a000007 beq 8898 /* 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++) { 8878: e1580004 cmp r8, r4 887c: e1a09004 mov r9, r4 8880: 8affffed bhi 883c pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8884: eb000664 bl a21c <__errno> 8888: e3a03002 mov r3, #2 888c: e5803000 str r3, [r0] 8890: e3e00000 mvn r0, #0 } 8894: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8898: e59f3038 ldr r3, [pc, #56] ; 88d8 889c: e5933000 ldr r3, [r3] 88a0: e5933028 ldr r3, [r3, #40] ; 0x28 88a4: e58b3010 str r3, [fp, #16] if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 88a8: e59f302c ldr r3, [pc, #44] ; 88dc 88ac: e58b3008 str r3, [fp, #8] pathloc->ops = &devFS_ops; 88b0: e59f3028 ldr r3, [pc, #40] ; 88e0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 88b4: e58b9000 str r9, [fp] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 88b8: e58b300c str r3, [fp, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 88bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, 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 ); 88c0: eb000655 bl a21c <__errno> <== NOT EXECUTED 88c4: e3a0300e mov r3, #14 <== NOT EXECUTED 88c8: e5803000 str r3, [r0] <== NOT EXECUTED 88cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 88d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 0000130c : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 130c: e92d4070 push {r4, r5, r6, lr} rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 1310: e59f605c ldr r6, [pc, #92] ; 1374 1314: e5963000 ldr r3, [r6] 1318: e0833103 add r3, r3, r3, lsl #2 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 131c: 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( 1320: e1a00103 lsl r0, r3, #2 1324: eb001c07 bl 8348 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 1328: e2505000 subs r5, r0, #0 132c: 0a00000b beq 1360 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 1330: e5962000 ldr r2, [r6] 1334: e0822102 add r2, r2, r2, lsl #2 1338: e1a02102 lsl r2, r2, #2 133c: e3a01000 mov r1, #0 1340: eb0025e3 bl aad4 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; 1344: e59f302c ldr r3, [pc, #44] ; 1378 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 1348: e2832038 add r2, r3, #56 ; 0x38 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 134c: e584501c str r5, [r4, #28] sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 1350: e5842028 str r2, [r4, #40] ; 0x28 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; 1354: e5843024 str r3, [r4, #36] ; 0x24 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; 1358: e3a00000 mov r0, #0 return 0; } 135c: e8bd8070 pop {r4, r5, r6, pc} sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 1360: eb0023ad bl a21c <__errno> <== NOT EXECUTED 1364: e3a0300c mov r3, #12 <== NOT EXECUTED 1368: e5803000 str r3, [r0] <== NOT EXECUTED 136c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1370: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 000014e4 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 14e4: e52de004 push {lr} ; (str lr, [sp, #-4]!) 14e8: e24dd010 sub sp, sp, #16 14ec: e1a03000 mov r3, r0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; 14f0: e58d1004 str r1, [sp, #4] { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 14f4: e5900038 ldr r0, [r0, #56] ; 0x38 args.iop = iop; args.command = command; args.buffer = buffer; 14f8: e58d2008 str r2, [sp, #8] status = rtems_io_control( 14fc: e590100c ldr r1, [r0, #12] 1500: e1a0200d mov r2, sp 1504: e5900008 ldr r0, [r0, #8] rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 1508: e58d3000 str r3, [sp] args.command = command; args.buffer = buffer; status = rtems_io_control( 150c: eb00105e bl 568c np->major, np->minor, (void *) &args ); if ( status ) 1510: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; 1514: 059d000c ldreq r0, [sp, #12] np->major, np->minor, (void *) &args ); if ( status ) 1518: 1a000001 bne 1524 return rtems_deviceio_errno(status); return args.ioctl_return; } 151c: e28dd010 add sp, sp, #16 1520: e8bd8000 pop {pc} np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1524: eb001cee bl 88e4 <== NOT EXECUTED 1528: eafffffb b 151c <== NOT EXECUTED 0000137c : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 137c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1380: e1a04000 mov r4, r0 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 1384: e5d00000 ldrb r0, [r0] 1388: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 138c: e1a05001 mov r5, r1 1390: e1a06002 mov r6, r2 1394: e1a0b003 mov fp, 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') && 1398: 0a000035 beq 1474 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 139c: e2053a0f and r3, r5, #61440 ; 0xf000 13a0: e3530a02 cmp r3, #8192 ; 0x2000 13a4: 13530a06 cmpne r3, #24576 ; 0x6000 13a8: 03a03000 moveq r3, #0 13ac: 13a03001 movne r3, #1 13b0: 1a000039 bne 149c rtems_set_errno_and_return_minus_one( EINVAL ); 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; 13b4: e59d2024 ldr r2, [sp, #36] ; 0x24 13b8: e5928000 ldr r8, [r2] if (!device_name_table) 13bc: e3580000 cmp r8, #0 13c0: 0a00003f beq 14c4 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 13c4: e59f210c ldr r2, [pc, #268] ; 14d8 13c8: e592a000 ldr sl, [r2] 13cc: e35a0000 cmp sl, #0 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 ); 13d0: 13e09000 mvnne r9, #0 13d4: 11a07003 movne r7, r3 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 13d8: 1a000007 bne 13fc 13dc: ea000033 b 14b0 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 13e0: eb002663 bl ad74 <== NOT EXECUTED 13e4: e3500000 cmp r0, #0 <== NOT EXECUTED 13e8: 0a00001c beq 1460 <== NOT EXECUTED /* 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++){ 13ec: e2877001 add r7, r7, #1 <== NOT EXECUTED 13f0: e157000a cmp r7, sl <== NOT EXECUTED 13f4: e1a03007 mov r3, r7 <== NOT EXECUTED 13f8: 2a000009 bcs 1424 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 13fc: e0833103 add r3, r3, r3, lsl #2 1400: e7983103 ldr r3, [r8, r3, lsl #2] 1404: e2531000 subs r1, r3, #0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 1408: e1a00004 mov r0, r4 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++){ if (device_name_table[i].device_name == NULL) 140c: 1afffff3 bne 13e0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 1410: e1a09007 mov r9, r7 /* 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++){ 1414: e2877001 add r7, r7, #1 1418: e157000a cmp r7, sl 141c: e1a03007 mov r3, r7 1420: 3afffff5 bcc 13fc else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 1424: e3790001 cmn r9, #1 1428: 0a000020 beq 14b0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 142c: e10f7000 mrs r7, CPSR 1430: e3873080 orr r3, r7, #128 ; 0x80 1434: e129f003 msr CPSR_fc, r3 rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 1438: e0899109 add r9, r9, r9, lsl #2 143c: e7884109 str r4, [r8, r9, lsl #2] device_name_table[slot].device_name_length = strlen(path); 1440: e1a00004 mov r0, r4 1444: eb002712 bl b094 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 1448: e0888109 add r8, r8, r9, lsl #2 device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 144c: e5885010 str r5, [r8, #16] if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 1450: e9880841 stmib r8, {r0, r6, fp} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1454: e129f007 msr CPSR_fc, r7 1458: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 145c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 1460: eb00236d bl a21c <__errno> <== NOT EXECUTED 1464: e3a03011 mov r3, #17 <== NOT EXECUTED 1468: e5803000 str r3, [r0] <== NOT EXECUTED 146c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1470: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED * 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') && 1474: e5d43001 ldrb r3, [r4, #1] 1478: e3530065 cmp r3, #101 ; 0x65 147c: 1affffc6 bne 139c (path[2] == 'v') && (path[3] == '\0')) 1480: e5d43002 ldrb r3, [r4, #2] 1484: e3530076 cmp r3, #118 ; 0x76 1488: 1affffc3 bne 139c 148c: e5d40003 ldrb r0, [r4, #3] 1490: e3500000 cmp r0, #0 1494: 1affffc0 bne 139c 1498: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 149c: eb00235e bl a21c <__errno> <== NOT EXECUTED 14a0: e3a03016 mov r3, #22 <== NOT EXECUTED 14a4: e5803000 str r3, [r0] <== NOT EXECUTED 14a8: e3e00000 mvn r0, #0 <== NOT EXECUTED 14ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 14b0: eb002359 bl a21c <__errno> <== NOT EXECUTED 14b4: e3a0300c mov r3, #12 <== NOT EXECUTED 14b8: e5803000 str r3, [r0] <== NOT EXECUTED 14bc: e3e00000 mvn r0, #0 <== NOT EXECUTED 14c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 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 ); 14c4: eb002354 bl a21c <__errno> <== NOT EXECUTED 14c8: e3a0300e mov r3, #14 <== NOT EXECUTED 14cc: e5803000 str r3, [r0] <== NOT EXECUTED 14d0: e3e00000 mvn r0, #0 <== NOT EXECUTED 14d4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 0000156c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 156c: e92d4800 push {fp, lr} <== NOT EXECUTED 1570: e1a03000 mov r3, r0 <== NOT EXECUTED 1574: e24dd01c sub sp, sp, #28 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 1578: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 157c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 1580: e3a02000 mov r2, #0 <== NOT EXECUTED 1584: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 1588: e58d0014 str r0, [sp, #20] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 158c: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 1590: e283c00c add ip, r3, #12 <== NOT EXECUTED 1594: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; 1598: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 159c: e2820008 add r0, r2, #8 <== NOT EXECUTED 15a0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 15a4: e1a0200d mov r2, sp <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 15a8: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 15ac: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 15b0: eb001097 bl 5814 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 15b4: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 15b8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 15bc: 1a000001 bne 15c8 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } 15c0: e28dd01c add sp, sp, #28 <== NOT EXECUTED 15c4: e8bd8800 pop {fp, pc} <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 15c8: eb001cc5 bl 88e4 <== NOT EXECUTED 15cc: eafffffb b 15c0 <== NOT EXECUTED 000015d0 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 15d0: e5903000 ldr r3, [r0] if (!the_dev) 15d4: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 15d8: 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) 15dc: 0a000007 beq 1600 rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 15e0: e5930010 ldr r0, [r3, #16] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 15e4: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 15e8: e5933008 ldr r3, [r3, #8] 15ec: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; 15f0: e581000c str r0, [r1, #12] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 15f4: e5813018 str r3, [r1, #24] buf->st_mode = the_dev->mode; 15f8: e3a00000 mov r0, #0 return 0; } 15fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 1600: eb002305 bl a21c <__errno> <== NOT EXECUTED 1604: e3a0300e mov r3, #14 <== NOT EXECUTED 1608: e5803000 str r3, [r0] <== NOT EXECUTED 160c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1610: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00001614 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 1614: e92d4800 push {fp, lr} 1618: e1a03000 mov r3, r0 161c: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 1620: e5900014 ldr r0, [r0, #20] np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 1624: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; 1628: e3a02000 mov r2, #0 162c: e58d2018 str r2, [sp, #24] args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 1630: e58d0014 str r0, [sp, #20] { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 1634: e5932038 ldr r2, [r3, #56] ; 0x38 args.iop = iop; args.offset = iop->offset; 1638: e283c00c add ip, r3, #12 163c: e89c1800 ldm ip, {fp, ip} args.buffer = (void *) buffer; 1640: e58d100c str r1, [sp, #12] args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 1644: e2820008 add r0, r2, #8 1648: e8900003 ldm r0, {r0, r1} 164c: e1a0200d mov r2, sp rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 1650: e98d1800 stmib sp, {fp, ip} rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 1654: e58d3000 str r3, [sp] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 1658: eb001081 bl 5864 np->major, np->minor, (void *) &args ); if ( status ) 165c: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 1660: 059d0018 ldreq r0, [sp, #24] np->major, np->minor, (void *) &args ); if ( status ) 1664: 1a000001 bne 1670 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } 1668: e28dd01c add sp, sp, #28 166c: e8bd8800 pop {fp, pc} np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1670: eb001c9b bl 88e4 <== NOT EXECUTED 1674: eafffffb b 1668 <== NOT EXECUTED 0000ae9c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ae9c: e52de004 push {lr} ; (str lr, [sp, #-4]!) aea0: e24dd010 sub sp, sp, #16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; aea4: e88d0007 stm sp, {r0, r1, r2} the_jnode = iop->file_info; aea8: e5903038 ldr r3, [r0, #56] ; 0x38 status = rtems_io_control( aeac: e1a0200d mov r2, sp aeb0: e2830050 add r0, r3, #80 ; 0x50 aeb4: e8900003 ldm r0, {r0, r1} aeb8: eb000472 bl c088 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) aebc: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; aec0: 059d000c ldreq r0, [sp, #12] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) aec4: 1a000001 bne aed0 return rtems_deviceio_errno(status); return args.ioctl_return; } aec8: e28dd010 add sp, sp, #16 aecc: e8bd8000 pop {pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); aed0: eb0005b2 bl c5a0 <== NOT EXECUTED aed4: eafffffb b aec8 <== NOT EXECUTED 0000af38 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { af38: e92d4800 push {fp, lr} <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; af3c: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; af40: e280c00c add ip, r0, #12 <== NOT EXECUTED af44: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { af48: e24dd01c sub sp, sp, #28 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; af4c: e58d3014 str r3, [sp, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; af50: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; af54: e3a03000 mov r3, #0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; af58: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; af5c: e58d3018 str r3, [sp, #24] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; af60: e58d100c str r1, [sp, #12] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; af64: e58d0000 str r0, [sp] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; af68: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( af6c: e1a0200d mov r2, sp <== NOT EXECUTED af70: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED af74: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED af78: eb00046a bl c128 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) af7c: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; af80: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) af84: 1a000001 bne af90 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } af88: e28dd01c add sp, sp, #28 <== NOT EXECUTED af8c: e8bd8800 pop {fp, pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); af90: eb000582 bl c5a0 <== NOT EXECUTED af94: eafffffb b af88 <== NOT EXECUTED 0000aed8 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { aed8: e92d4800 push {fp, lr} args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; aedc: e5903014 ldr r3, [r0, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; aee0: e280c00c add ip, r0, #12 aee4: e89c1800 ldm ip, {fp, ip} ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { aee8: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; aeec: e58d3014 str r3, [sp, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; aef0: e98d1800 stmib sp, {fp, ip} args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; aef4: e3a03000 mov r3, #0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; aef8: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; aefc: e58d3018 str r3, [sp, #24] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; af00: e58d100c str r1, [sp, #12] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; af04: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; af08: e5903038 ldr r3, [r0, #56] ; 0x38 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( af0c: e1a0200d mov r2, sp af10: e2830050 add r0, r3, #80 ; 0x50 af14: e8900003 ldm r0, {r0, r1} af18: eb000496 bl c178 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) af1c: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; af20: 059d0018 ldreq r0, [sp, #24] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) af24: 1a000001 bne af30 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } af28: e28dd01c add sp, sp, #28 af2c: e8bd8800 pop {fp, pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); af30: eb00059a bl c5a0 <== NOT EXECUTED af34: eafffffb b af28 <== NOT EXECUTED 000036a8 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 36a8: e59030b4 ldr r3, [r0, #180] ; 0xb4 36ac: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 36b0: e92d4030 push {r4, r5, lr} 36b4: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 36b8: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 36bc: e10f3000 mrs r3, CPSR <== NOT EXECUTED 36c0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 36c4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 36c8: e5901084 ldr r1, [r0, #132] ; 0x84 <== NOT EXECUTED 36cc: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 36d0: e1510002 cmp r1, r2 <== NOT EXECUTED 36d4: 0a00000f beq 3718 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 36d8: e3a05002 mov r5, #2 <== NOT EXECUTED 36dc: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 36e0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 36e4: e3a01000 mov r1, #0 <== NOT EXECUTED 36e8: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 36ec: e1a02001 mov r2, r1 <== NOT EXECUTED 36f0: eb00064a bl 5020 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 36f4: e3500000 cmp r0, #0 <== NOT EXECUTED 36f8: 1a000008 bne 3720 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 36fc: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3700: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3704: e129f002 msr CPSR_fc, r2 <== 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) { 3708: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 370c: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 3710: e1510002 cmp r1, r2 <== NOT EXECUTED 3714: 1afffff0 bne 36dc <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3718: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 371c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3720: eb0007dd bl 569c <== NOT EXECUTED 0000276c : int dup2( int fildes, int fildes2 ) { 276c: e92d4070 push {r4, r5, r6, lr} 2770: e24dd048 sub sp, sp, #72 ; 0x48 2774: e1a05001 mov r5, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2778: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 277c: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2780: eb0001c4 bl 2e98 if ( status == -1 ) 2784: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2788: e1a0400d mov r4, sp if ( status == -1 ) 278c: 1a000002 bne 279c /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2790: e3e00000 mvn r0, #0 } 2794: e28dd048 add sp, sp, #72 ; 0x48 2798: e8bd8070 pop {r4, r5, r6, pc} /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 279c: e1a0100d mov r1, sp 27a0: e1a00005 mov r0, r5 27a4: eb0001bb bl 2e98 if ( status == -1 ) 27a8: e3700001 cmn r0, #1 27ac: 0afffff7 beq 2790 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 27b0: e1a00006 mov r0, r6 <== NOT EXECUTED 27b4: e1a02005 mov r2, r5 <== NOT EXECUTED 27b8: e3a01000 mov r1, #0 <== NOT EXECUTED 27bc: eb0000a3 bl 2a50 <== NOT EXECUTED 27c0: eafffff3 b 2794 <== NOT EXECUTED 00003118 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 3118: e92d4010 push {r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 311c: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 3120: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 3124: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 3128: e1a04001 mov r4, r1 <== NOT EXECUTED 312c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 3130: 0a000007 beq 3154 <== NOT EXECUTED 3134: e59f3060 ldr r3, [pc, #96] ; 319c <== NOT EXECUTED 3138: e5933000 ldr r3, [r3] <== NOT EXECUTED 313c: e0833000 add r3, r3, r0 <== NOT EXECUTED 3140: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 3144: e2503009 subs r3, r0, #9 <== NOT EXECUTED 3148: 13a03001 movne r3, #1 <== NOT EXECUTED 314c: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 3150: 1a000003 bne 3164 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 3154: e1a01004 mov r1, r4 <== NOT EXECUTED 3158: ebffff92 bl 2fa8 <== NOT EXECUTED } } 315c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 3160: e8bd8010 pop {r4, pc} <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 3164: e350000a cmp r0, #10 <== NOT EXECUTED 3168: 0afffff9 beq 3154 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 316c: e2203040 eor r3, r0, #64 ; 0x40 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 3170: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 3174: e1a0000d mov r0, sp <== NOT EXECUTED 3178: e3a01002 mov r1, #2 <== NOT EXECUTED 317c: e1a02004 mov r2, r4 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 3180: e5cd3001 strb r3, [sp, #1] <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 3184: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 3188: ebffff3e bl 2e88 <== NOT EXECUTED tty->column += 2; 318c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3190: e2833002 add r3, r3, #2 <== NOT EXECUTED 3194: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 3198: eaffffef b 315c <== NOT EXECUTED 000022d4 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 22d4: e59f300c ldr r3, [pc, #12] ; 22e8 <== NOT EXECUTED 22d8: e5930000 ldr r0, [r3] <== NOT EXECUTED 22dc: e3500000 cmp r0, #0 <== NOT EXECUTED 22e0: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 22e4: ea003278 b eccc <== NOT EXECUTED 000022ec : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 22ec: e59f300c ldr r3, [pc, #12] ; 2300 <== NOT EXECUTED 22f0: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 22f4: e3500000 cmp r0, #0 <== NOT EXECUTED 22f8: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 22fc: ea003272 b eccc <== NOT EXECUTED 000031a0 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 31a0: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 31a4: e3530000 cmp r3, #0 <== NOT EXECUTED * 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) { 31a8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 31ac: e1a04000 mov r4, r0 <== NOT EXECUTED 31b0: e1a06001 mov r6, r1 <== NOT EXECUTED if (tty->ccount == 0) 31b4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return; if (lineFlag) { 31b8: e3510000 cmp r1, #0 <== NOT EXECUTED 31bc: 0590203c ldreq r2, [r0, #60] ; 0x3c <== NOT EXECUTED 31c0: 1a000025 bne 325c <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 31c4: e59f71d4 ldr r7, [pc, #468] ; 33a0 <== NOT EXECUTED 31c8: ea000007 b 31ec <== NOT EXECUTED 31cc: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 31d0: 1a00005a bne 3340 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 31d4: e3560000 cmp r6, #0 <== NOT EXECUTED 31d8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 31dc: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 31e0: e3530000 cmp r3, #0 <== NOT EXECUTED 31e4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 31e8: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 31ec: e2433001 sub r3, r3, #1 <== NOT EXECUTED 31f0: e5843020 str r3, [r4, #32] <== NOT EXECUTED 31f4: e594001c ldr r0, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 31f8: e3120008 tst r2, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 31fc: e7d05003 ldrb r5, [r0, r3] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 3200: 0afffff3 beq 31d4 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 3204: e3560000 cmp r6, #0 <== NOT EXECUTED 3208: 1a000001 bne 3214 <== NOT EXECUTED 320c: e3120010 tst r2, #16 <== NOT EXECUTED 3210: 0a000046 beq 3330 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 3214: e3550009 cmp r5, #9 <== NOT EXECUTED 3218: 0a000020 beq 32a0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 321c: e5973000 ldr r3, [r7] <== NOT EXECUTED 3220: e2855001 add r5, r5, #1 <== NOT EXECUTED 3224: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 3228: e3130020 tst r3, #32 <== NOT EXECUTED 322c: 1affffe6 bne 31cc <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 3230: e59f016c ldr r0, [pc, #364] ; 33a4 <== NOT EXECUTED 3234: e3a01003 mov r1, #3 <== NOT EXECUTED 3238: e1a02004 mov r2, r4 <== NOT EXECUTED 323c: ebffff11 bl 2e88 <== NOT EXECUTED if (tty->column) 3240: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3244: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3248: 12433001 subne r3, r3, #1 <== NOT EXECUTED 324c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 3250: e3560000 cmp r6, #0 <== NOT EXECUTED 3254: 1affffe0 bne 31dc <== NOT EXECUTED 3258: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 325c: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED 3260: e2121008 ands r1, r2, #8 <== NOT EXECUTED tty->ccount = 0; 3264: 05801020 streq r1, [r0, #32] <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 3268: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 326c: e2121010 ands r1, r2, #16 <== NOT EXECUTED 3270: 1affffd3 bne 31c4 <== NOT EXECUTED tty->ccount = 0; 3274: e5801020 str r1, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 3278: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 327c: e1a01004 mov r1, r4 <== NOT EXECUTED 3280: ebffffa4 bl 3118 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 3284: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3288: e3130020 tst r3, #32 <== NOT EXECUTED 328c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED echo ('\n', tty); 3290: e1a01004 mov r1, r4 <== NOT EXECUTED 3294: e3a0000a mov r0, #10 <== NOT EXECUTED } } if (!lineFlag) break; } } 3298: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 329c: eaffff9d b 3118 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 32a0: e3530000 cmp r3, #0 <== NOT EXECUTED 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; 32a4: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 32a8: 0a000011 beq 32f4 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 32ac: e5978000 ldr r8, [r7] <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 32b0: e202ac02 and sl, r2, #512 ; 0x200 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 32b4: e3a02000 mov r2, #0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 32b8: e7d01002 ldrb r1, [r0, r2] <== NOT EXECUTED if (c == '\t') { 32bc: e3510009 cmp r1, #9 <== NOT EXECUTED col = (col | 7) + 1; 32c0: 03855007 orreq r5, r5, #7 <== NOT EXECUTED } else if (iscntrl (c)) { 32c4: e088c001 add ip, r8, r1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 32c8: e2822001 add r2, r2, #1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; 32cc: 02855001 addeq r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 32d0: 0a000005 beq 32ec <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 32d4: e5dc1001 ldrb r1, [ip, #1] <== NOT EXECUTED 32d8: e3110020 tst r1, #32 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 32dc: 02855001 addeq r5, r5, #1 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 32e0: 0a000001 beq 32ec <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 32e4: e35a0000 cmp sl, #0 <== NOT EXECUTED col += 2; 32e8: 12855002 addne r5, r5, #2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 32ec: e1530002 cmp r3, r2 <== NOT EXECUTED 32f0: 1afffff0 bne 32b8 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 32f4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 32f8: e1550003 cmp r5, r3 <== NOT EXECUTED 32fc: aaffffb4 bge 31d4 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 3300: e59f00a0 ldr r0, [pc, #160] ; 33a8 <== NOT EXECUTED 3304: e3a01001 mov r1, #1 <== NOT EXECUTED 3308: e1a02004 mov r2, r4 <== NOT EXECUTED 330c: ebfffedd bl 2e88 <== NOT EXECUTED tty->column--; 3310: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3314: e2433001 sub r3, r3, #1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 3318: e1550003 cmp r5, r3 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 331c: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 3320: bafffff6 blt 3300 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 3324: e3560000 cmp r6, #0 <== NOT EXECUTED 3328: 1affffab bne 31dc <== NOT EXECUTED 332c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== 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); 3330: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 3334: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 3338: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, 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); 333c: eaffff75 b 3118 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 3340: e59f005c ldr r0, [pc, #92] ; 33a4 <== NOT EXECUTED 3344: e3a01003 mov r1, #3 <== NOT EXECUTED 3348: e1a02004 mov r2, r4 <== NOT EXECUTED 334c: ebfffecd bl 2e88 <== NOT EXECUTED if (tty->column) 3350: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3354: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3358: 12433001 subne r3, r3, #1 <== NOT EXECUTED 335c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 3360: e5973000 ldr r3, [r7] <== NOT EXECUTED 3364: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 3368: e3130020 tst r3, #32 <== NOT EXECUTED 336c: 0affffaf beq 3230 <== NOT EXECUTED 3370: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 3374: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 3378: 0affff95 beq 31d4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 337c: e59f0020 ldr r0, [pc, #32] ; 33a4 <== NOT EXECUTED 3380: e3a01003 mov r1, #3 <== NOT EXECUTED 3384: e1a02004 mov r2, r4 <== NOT EXECUTED 3388: ebfffebe bl 2e88 <== NOT EXECUTED if (tty->column) 338c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3390: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3394: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3398: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 339c: eaffffab b 3250 <== NOT EXECUTED 00002a50 : int fcntl( int fd, int cmd, ... ) { 2a50: e92d000e push {r1, r2, r3} 2a54: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2a58: e59f31d0 ldr r3, [pc, #464] ; 2c30 2a5c: e5933000 ldr r3, [r3] int fcntl( int fd, int cmd, ... ) { 2a60: e24dd004 sub sp, sp, #4 int ret; va_list ap; va_start( ap, cmd ); 2a64: e28d2028 add r2, sp, #40 ; 0x28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2a68: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 2a6c: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 2a70: e59d4024 ldr r4, [sp, #36] ; 0x24 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2a74: 2a000061 bcs 2c00 iop = rtems_libio_iop( fd ); 2a78: e59f81b4 ldr r8, [pc, #436] ; 2c34 2a7c: e5986000 ldr r6, [r8] 2a80: e0865300 add r5, r6, r0, lsl #6 rtems_libio_check_is_open(iop); 2a84: e595c014 ldr ip, [r5, #20] 2a88: e31c0c01 tst ip, #256 ; 0x100 2a8c: 0a00005b beq 2c00 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2a90: e3540009 cmp r4, #9 2a94: 979ff104 ldrls pc, [pc, r4, lsl #2] 2a98: ea00002c b 2b50 2a9c: 00002b64 .word 0x00002b64 <== NOT EXECUTED 2aa0: 00002bc4 .word 0x00002bc4 <== NOT EXECUTED 2aa4: 00002bd0 .word 0x00002bd0 <== NOT EXECUTED 2aa8: 00002bf0 .word 0x00002bf0 <== NOT EXECUTED 2aac: 00002ae8 .word 0x00002ae8 <== NOT EXECUTED 2ab0: 00002ac4 .word 0x00002ac4 <== NOT EXECUTED 2ab4: 00002ac4 .word 0x00002ac4 <== NOT EXECUTED 2ab8: 00002ac4 .word 0x00002ac4 <== NOT EXECUTED 2abc: 00002ac4 .word 0x00002ac4 <== NOT EXECUTED 2ac0: 00002ac4 .word 0x00002ac4 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2ac4: eb0031f9 bl f2b0 <__errno> 2ac8: e3a03086 mov r3, #134 ; 0x86 2acc: e5803000 str r3, [r0] 2ad0: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2ad4: e1a00006 mov r0, r6 2ad8: e28dd004 add sp, sp, #4 2adc: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 2ae0: e28dd00c add sp, sp, #12 2ae4: e12fff1e bx lr case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 2ae8: e5920000 ldr r0, [r2] 2aec: eb000235 bl 33c8 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 2af0: e5953014 ldr r3, [r5, #20] 2af4: e3c00f7f bic r0, r0, #508 ; 0x1fc 2af8: e3c00002 bic r0, r0, #2 2afc: e1a00b00 lsl r0, r0, #22 2b00: e3c33c02 bic r3, r3, #512 ; 0x200 2b04: e1a00b20 lsr r0, r0, #22 2b08: e3c33001 bic r3, r3, #1 2b0c: e1800003 orr r0, r0, r3 2b10: e5850014 str r0, [r5, #20] 2b14: e3a06000 mov r6, #0 * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 2b18: e595303c ldr r3, [r5, #60] ; 0x3c 2b1c: e5933030 ldr r3, [r3, #48] ; 0x30 2b20: e3530000 cmp r3, #0 2b24: 0affffea beq 2ad4 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 2b28: e1a00004 mov r0, r4 2b2c: e1a01005 mov r1, r5 2b30: e1a0e00f mov lr, pc 2b34: e12fff13 bx r3 if (err) { 2b38: e2504000 subs r4, r0, #0 2b3c: 0affffe4 beq 2ad4 errno = err; 2b40: eb0031da bl f2b0 <__errno> <== NOT EXECUTED 2b44: e5804000 str r4, [r0] <== NOT EXECUTED 2b48: e3e06000 mvn r6, #0 <== NOT EXECUTED 2b4c: eaffffe0 b 2ad4 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 2b50: eb0031d6 bl f2b0 <__errno> 2b54: e3a03016 mov r3, #22 2b58: e5803000 str r3, [r0] 2b5c: e3e06000 mvn r6, #0 2b60: eaffffdb b 2ad4 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 2b64: e5927000 ldr r7, [r2] if ( fd2 ) 2b68: e3570000 cmp r7, #0 2b6c: 0a000028 beq 2c14 diop = rtems_libio_iop( fd2 ); 2b70: e1530007 cmp r3, r7 <== NOT EXECUTED 2b74: 93a09000 movls r9, #0 <== NOT EXECUTED 2b78: 80867307 addhi r7, r6, r7, lsl #6 <== NOT EXECUTED 2b7c: 91a07009 movls r7, r9 <== NOT EXECUTED 2b80: 81a09007 movhi r9, r7 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2b84: e2858018 add r8, r5, #24 2b88: e8b8000f ldm r8!, {r0, r1, r2, r3} 2b8c: e287a018 add sl, r7, #24 2b90: e8aa000f stmia sl!, {r0, r1, r2, r3} ret = -1; break; } } diop->handlers = iop->handlers; 2b94: e595203c ldr r2, [r5, #60] ; 0x3c diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2b98: e5981000 ldr r1, [r8] break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 2b9c: e5953038 ldr r3, [r5, #56] ; 0x38 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 2ba0: e0666009 rsb r6, r6, r9 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2ba4: e58a1000 str r1, [sl] ret = -1; break; } } diop->handlers = iop->handlers; 2ba8: e587203c str r2, [r7, #60] ; 0x3c diop->file_info = iop->file_info; 2bac: e5873038 str r3, [r7, #56] ; 0x38 diop->flags = iop->flags; 2bb0: e587c014 str ip, [r7, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 2bb4: e1a06346 asr r6, r6, #6 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2bb8: e3560000 cmp r6, #0 2bbc: aaffffd5 bge 2b18 2bc0: eaffffc3 b 2ad4 <== NOT EXECUTED diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 2bc4: e1a0c5ac lsr ip, ip, #11 2bc8: e20c6001 and r6, ip, #1 2bcc: eaffffd1 b 2b18 * 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 ) ) 2bd0: e5926000 ldr r6, [r2] 2bd4: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2bd8: 138ccb02 orrne ip, ip, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2bdc: 03cccb02 biceq ip, ip, #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; 2be0: 1585c014 strne ip, [r5, #20] 2be4: 13a06000 movne r6, #0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2be8: 0585c014 streq ip, [r5, #20] 2bec: eaffffc9 b 2b18 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 2bf0: e1a0000c mov r0, ip 2bf4: eb000153 bl 3148 2bf8: e1a06000 mov r6, r0 2bfc: eaffffed b 2bb8 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 2c00: eb0031aa bl f2b0 <__errno> <== NOT EXECUTED 2c04: e3a03009 mov r3, #9 <== NOT EXECUTED 2c08: e5803000 str r3, [r0] <== NOT EXECUTED 2c0c: e3e06000 mvn r6, #0 <== NOT EXECUTED 2c10: eaffffaf b 2ad4 <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 2c14: eb0001bd bl 3310 if ( diop == 0 ) { 2c18: e2507000 subs r7, r0, #0 2c1c: 0affffc9 beq 2b48 2c20: e5986000 ldr r6, [r8] 2c24: e595c014 ldr ip, [r5, #20] 2c28: e1a09007 mov r9, r7 2c2c: eaffffd4 b 2b84 0000b5bc : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b5bc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, b5c0: e59f53c4 ldr r5, [pc, #964] ; b98c */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b5c4: e1a06001 mov r6, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, b5c8: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b5cc: e24dd008 sub sp, sp, #8 b5d0: e1a04000 mov r4, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, b5d4: e1a02001 mov r2, r1 b5d8: e5950000 ldr r0, [r5] b5dc: ebffe68f bl 5020 b5e0: e2509000 subs r9, r0, #0 b5e4: 13e0a003 mvnne sl, #3 b5e8: 1a00001c bne b660 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; b5ec: e5947000 ldr r7, [r4] <== NOT EXECUTED if (pipe == NULL) { b5f0: e3570000 cmp r7, #0 <== NOT EXECUTED b5f4: 0a00001c beq b66c <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) b5f8: e3a01000 mov r1, #0 <== NOT EXECUTED b5fc: e5970028 ldr r0, [r7, #40] ; 0x28 <== NOT EXECUTED b600: e1a02001 mov r2, r1 <== NOT EXECUTED b604: ebffe685 bl 5020 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { b608: e5943000 ldr r3, [r4] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) b60c: e3500000 cmp r0, #0 <== NOT EXECUTED b610: 01a0a000 moveq sl, r0 <== NOT EXECUTED b614: 13e0a003 mvnne sl, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { b618: e3530000 cmp r3, #0 <== NOT EXECUTED b61c: 0a0000b0 beq b8e4 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); b620: e5950000 ldr r0, [r5] <== NOT EXECUTED b624: ebffe6c5 bl 5140 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) b628: e35a0000 cmp sl, #0 <== NOT EXECUTED b62c: 1a00000b bne b660 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { b630: e5962014 ldr r2, [r6, #20] <== NOT EXECUTED b634: e2023006 and r3, r2, #6 <== NOT EXECUTED b638: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; b63c: e5945000 ldr r5, [r4] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { b640: 0a000084 beq b858 <== NOT EXECUTED b644: e3530006 cmp r3, #6 <== NOT EXECUTED b648: 0a00006e beq b808 <== NOT EXECUTED b64c: e3530002 cmp r3, #2 <== NOT EXECUTED b650: 0a000048 beq b778 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); b654: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b658: ebffe6b8 bl 5140 <== NOT EXECUTED b65c: e3a0a000 mov sl, #0 <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } b660: e1a0000a mov r0, sl b664: e28dd008 add sp, sp, #8 b668: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b66c: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED b670: ebffd9d5 bl 1dcc <== NOT EXECUTED if (pipe == NULL) b674: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b678: e1a08000 mov r8, r0 <== NOT EXECUTED b67c: e1a07000 mov r7, r0 <== NOT EXECUTED if (pipe == NULL) b680: 03e0a00b mvneq sl, #11 <== NOT EXECUTED b684: 0affffe5 beq b620 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); b688: e1a03000 mov r3, r0 <== NOT EXECUTED b68c: e4839004 str r9, [r3], #4 <== NOT EXECUTED b690: e2833004 add r3, r3, #4 <== NOT EXECUTED b694: e4839004 str r9, [r3], #4 <== NOT EXECUTED b698: e4839004 str r9, [r3], #4 <== NOT EXECUTED b69c: e4839004 str r9, [r3], #4 <== NOT EXECUTED b6a0: e4839004 str r9, [r3], #4 <== NOT EXECUTED b6a4: e4839004 str r9, [r3], #4 <== NOT EXECUTED b6a8: e4839004 str r9, [r3], #4 <== NOT EXECUTED b6ac: e4839004 str r9, [r3], #4 <== NOT EXECUTED b6b0: e4839004 str r9, [r3], #4 <== NOT EXECUTED b6b4: e4839004 str r9, [r3], #4 <== NOT EXECUTED b6b8: e4839004 str r9, [r3], #4 <== NOT EXECUTED pipe->Size = PIPE_BUF; b6bc: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); b6c0: e5839000 str r9, [r3] <== NOT EXECUTED pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); b6c4: e1a00002 mov r0, r2 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; b6c8: e5882004 str r2, [r8, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); b6cc: ebffd9be bl 1dcc <== NOT EXECUTED if (! pipe->Buffer) b6d0: e3500000 cmp r0, #0 <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); b6d4: e5880000 str r0, [r8] <== NOT EXECUTED if (! pipe->Buffer) b6d8: 03e0a00b mvneq sl, #11 <== NOT EXECUTED b6dc: 0a00008d beq b918 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( b6e0: e59fa2a8 ldr sl, [pc, #680] ; b990 <== NOT EXECUTED b6e4: e5da0000 ldrb r0, [sl] <== NOT EXECUTED b6e8: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED b6ec: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED b6f0: e1a01009 mov r1, r9 <== NOT EXECUTED b6f4: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED b6f8: e1a02009 mov r2, r9 <== NOT EXECUTED b6fc: e288302c add r3, r8, #44 ; 0x2c <== NOT EXECUTED b700: eb000174 bl bcd8 <== NOT EXECUTED b704: e2501000 subs r1, r0, #0 <== NOT EXECUTED b708: 1a00007f bne b90c <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( b70c: e5da0000 ldrb r0, [sl] <== NOT EXECUTED b710: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED b714: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED b718: e2883030 add r3, r8, #48 ; 0x30 <== NOT EXECUTED b71c: e3800c77 orr r0, r0, #30464 ; 0x7700 <== NOT EXECUTED b720: e1a02001 mov r2, r1 <== NOT EXECUTED b724: eb00016b bl bcd8 <== NOT EXECUTED b728: e2503000 subs r3, r0, #0 <== NOT EXECUTED b72c: 1a000074 bne b904 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( b730: e5da0000 ldrb r0, [sl] <== NOT EXECUTED b734: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED b738: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED b73c: e288c028 add ip, r8, #40 ; 0x28 <== NOT EXECUTED b740: e3800c73 orr r0, r0, #29440 ; 0x7300 <== NOT EXECUTED b744: e3a01001 mov r1, #1 <== NOT EXECUTED b748: e3a02010 mov r2, #16 <== NOT EXECUTED b74c: e58dc000 str ip, [sp] <== NOT EXECUTED b750: ebffe597 bl 4db4 <== NOT EXECUTED b754: e3500000 cmp r0, #0 <== NOT EXECUTED b758: 1a000067 bne b8fc <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b75c: e5da3000 ldrb r3, [sl] <== NOT EXECUTED b760: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED b764: e2833001 add r3, r3, #1 <== NOT EXECUTED b768: e5ca3000 strb r3, [sl] <== NOT EXECUTED c = 'a'; b76c: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED b770: 05ca3000 strbeq r3, [sl] <== NOT EXECUTED b774: eaffff9f b b5f8 <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) b778: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b77c: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b780: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b784: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) b788: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b78c: e5852020 str r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b790: e5853010 str r3, [r5, #16] <== NOT EXECUTED b794: 0a000073 beq b968 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { b798: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED b79c: e3530000 cmp r3, #0 <== NOT EXECUTED b7a0: 1affffab bne b654 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) b7a4: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED b7a8: e3130001 tst r3, #1 <== NOT EXECUTED b7ac: 1affffa8 bne b654 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; b7b0: e5957024 ldr r7, [r5, #36] ; 0x24 <== NOT EXECUTED b7b4: ea000006 b b7d4 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) b7b8: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b7bc: ebffe617 bl 5020 <== NOT EXECUTED b7c0: e3500000 cmp r0, #0 <== NOT EXECUTED b7c4: 1a00000a bne b7f4 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); b7c8: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED b7cc: e1530007 cmp r3, r7 <== NOT EXECUTED b7d0: 1affff9f bne b654 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); b7d4: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b7d8: ebffe658 bl 5140 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) b7dc: e3a01000 mov r1, #0 <== NOT EXECUTED b7e0: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b7e4: eb00019f bl be68 <== NOT EXECUTED b7e8: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b7ec: e1a02001 mov r2, r1 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) b7f0: 0afffff0 beq b7b8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; b7f4: e3e0a003 mvn sl, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); b7f8: e1a00004 mov r0, r4 <== NOT EXECUTED b7fc: e1a01006 mov r1, r6 <== NOT EXECUTED b800: ebffff27 bl b4a4 <== NOT EXECUTED return err; b804: eaffff95 b b660 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) b808: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b80c: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b810: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b814: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) b818: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b81c: e5852020 str r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b820: e5853010 str r3, [r5, #16] <== NOT EXECUTED b824: 0a00004b beq b958 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) b828: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b82c: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b830: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b834: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b838: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b83c: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b840: e5853014 str r3, [r5, #20] <== NOT EXECUTED b844: 1affff82 bne b654 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b848: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b84c: e28d1004 add r1, sp, #4 <== NOT EXECUTED b850: eb00016b bl be04 <== NOT EXECUTED b854: eaffff7e b b654 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { b858: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED b85c: e3530000 cmp r3, #0 <== NOT EXECUTED b860: 1a000002 bne b870 <== NOT EXECUTED b864: e3120001 tst r2, #1 <== NOT EXECUTED b868: 13e0a005 mvnne sl, #5 <== NOT EXECUTED b86c: 1affffe1 bne b7f8 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) b870: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b874: e5951024 ldr r1, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b878: e3520000 cmp r2, #0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b87c: e2811001 add r1, r1, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b880: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b884: e5851024 str r1, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b888: e5852014 str r2, [r5, #20] <== NOT EXECUTED b88c: 0a000039 beq b978 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { b890: e3530000 cmp r3, #0 <== NOT EXECUTED b894: 1affff6e bne b654 <== NOT EXECUTED prevCounter = pipe->readerCounter; b898: e5957020 ldr r7, [r5, #32] <== NOT EXECUTED b89c: ea000006 b b8bc <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) b8a0: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b8a4: ebffe5dd bl 5020 <== NOT EXECUTED b8a8: e3500000 cmp r0, #0 <== NOT EXECUTED b8ac: 1affffd0 bne b7f4 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); b8b0: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED b8b4: e1530007 cmp r3, r7 <== NOT EXECUTED b8b8: 1affff65 bne b654 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); b8bc: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b8c0: ebffe61e bl 5140 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) b8c4: e3a01000 mov r1, #0 <== NOT EXECUTED b8c8: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b8cc: eb000165 bl be68 <== NOT EXECUTED b8d0: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b8d4: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) b8d8: 0afffff0 beq b8a0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; b8dc: e3e0a003 mvn sl, #3 <== NOT EXECUTED b8e0: eaffffc4 b b7f8 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) b8e4: e35a0000 cmp sl, #0 <== NOT EXECUTED b8e8: 1a00000d bne b924 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; b8ec: e5847000 str r7, [r4] <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); b8f0: e5950000 ldr r0, [r5] <== NOT EXECUTED b8f4: ebffe611 bl 5140 <== NOT EXECUTED b8f8: eaffff4c b b630 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); b8fc: e5980030 ldr r0, [r8, #48] ; 0x30 <== NOT EXECUTED b900: eb000125 bl bd9c <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); b904: e598002c ldr r0, [r8, #44] ; 0x2c <== NOT EXECUTED b908: eb000123 bl bd9c <== NOT EXECUTED err_rbar: free(pipe->Buffer); b90c: e5980000 ldr r0, [r8] <== NOT EXECUTED b910: ebffd872 bl 1ae0 <== NOT EXECUTED b914: e3e0a003 mvn sl, #3 <== NOT EXECUTED err_buf: free(pipe); b918: e1a00008 mov r0, r8 <== NOT EXECUTED b91c: ebffd86f bl 1ae0 <== NOT EXECUTED b920: eaffff3e b b620 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); b924: e597002c ldr r0, [r7, #44] ; 0x2c <== NOT EXECUTED b928: eb00011b bl bd9c <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); b92c: e5970030 ldr r0, [r7, #48] ; 0x30 <== NOT EXECUTED b930: eb000119 bl bd9c <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); b934: e5970028 ldr r0, [r7, #40] ; 0x28 <== NOT EXECUTED b938: ebffe58f bl 4f7c <== NOT EXECUTED free(pipe->Buffer); b93c: e5970000 ldr r0, [r7] <== NOT EXECUTED b940: ebffd866 bl 1ae0 <== NOT EXECUTED free(pipe); b944: e1a00007 mov r0, r7 <== NOT EXECUTED b948: ebffd864 bl 1ae0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); b94c: e5950000 ldr r0, [r5] <== NOT EXECUTED b950: ebffe5fa bl 5140 <== NOT EXECUTED b954: eaffff41 b b660 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); b958: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b95c: e28d1004 add r1, sp, #4 <== NOT EXECUTED b960: eb000127 bl be04 <== NOT EXECUTED b964: eaffffaf b b828 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); b968: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b96c: e28d1004 add r1, sp, #4 <== NOT EXECUTED b970: eb000123 bl be04 <== NOT EXECUTED b974: eaffff87 b b798 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); b978: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b97c: e28d1004 add r1, sp, #4 <== NOT EXECUTED b980: eb00011f bl be04 <== NOT EXECUTED b984: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED b988: eaffffc0 b b890 <== NOT EXECUTED 00008998 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8998: e59f2044 ldr r2, [pc, #68] ; 89e4 <== NOT EXECUTED 899c: e4923004 ldr r3, [r2], #4 <== NOT EXECUTED 89a0: e1530002 cmp r3, r2 <== NOT EXECUTED 89a4: 0a00000a beq 89d4 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 89a8: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 89ac: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED 89b0: e1510000 cmp r1, r0 <== NOT EXECUTED 89b4: 1a000003 bne 89c8 <== NOT EXECUTED 89b8: ea000007 b 89dc <== NOT EXECUTED 89bc: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED 89c0: e1510000 cmp r1, r0 <== NOT EXECUTED 89c4: 0a000004 beq 89dc <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 89c8: e5933000 ldr r3, [r3] <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 89cc: e1530002 cmp r3, r2 <== NOT EXECUTED 89d0: 1afffff9 bne 89bc <== NOT EXECUTED 89d4: e3a00000 mov r0, #0 <== NOT EXECUTED return true; } } return false; } 89d8: e12fff1e bx lr <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 89dc: e3a00001 mov r0, #1 <== NOT EXECUTED 89e0: e12fff1e bx lr <== NOT EXECUTED 00002cdc : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2cdc: e59f3108 ldr r3, [pc, #264] ; 2dec 2ce0: e5933000 ldr r3, [r3] 2ce4: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2ce8: 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); 2cec: 2a000034 bcs 2dc4 iop = rtems_libio_iop(fd); 2cf0: e59f30f8 ldr r3, [pc, #248] ; 2df0 2cf4: e5933000 ldr r3, [r3] 2cf8: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2cfc: e5903014 ldr r3, [r0, #20] 2d00: e3130c01 tst r3, #256 ; 0x100 2d04: 0a00002e beq 2dc4 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2d08: e3130002 tst r3, #2 2d0c: 0a000031 beq 2dd8 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2d10: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2d14: e351000b cmp r1, #11 2d18: 979ff101 ldrls pc, [pc, r1, lsl #2] 2d1c: ea00000d b 2d58 2d20: 00002d6c .word 0x00002d6c <== NOT EXECUTED 2d24: 00002d74 .word 0x00002d74 <== NOT EXECUTED 2d28: 00002d7c .word 0x00002d7c <== NOT EXECUTED 2d2c: 00002d84 .word 0x00002d84 <== NOT EXECUTED 2d30: 00002d8c .word 0x00002d8c <== NOT EXECUTED 2d34: 00002d94 .word 0x00002d94 <== NOT EXECUTED 2d38: 00002d9c .word 0x00002d9c <== NOT EXECUTED 2d3c: 00002da4 .word 0x00002da4 <== NOT EXECUTED 2d40: 00002dac .word 0x00002dac <== NOT EXECUTED 2d44: 00002db4 .word 0x00002db4 <== NOT EXECUTED 2d48: 00002dbc .word 0x00002dbc <== NOT EXECUTED 2d4c: 00002d50 .word 0x00002d50 <== NOT EXECUTED break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2d50: e5930060 ldr r0, [r3, #96] ; 0x60 break; 2d54: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2d58: eb003154 bl f2b0 <__errno> 2d5c: e3a03016 mov r3, #22 2d60: e5803000 str r3, [r0] 2d64: e3e00000 mvn r0, #0 break; } return return_value; } 2d68: e49df004 pop {pc} ; (ldr pc, [sp], #4) the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 2d6c: e5930038 ldr r0, [r3, #56] ; 0x38 break; 2d70: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 2d74: e593003c ldr r0, [r3, #60] ; 0x3c break; 2d78: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 2d7c: e5930040 ldr r0, [r3, #64] ; 0x40 break; 2d80: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 2d84: e5930044 ldr r0, [r3, #68] ; 0x44 break; 2d88: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 2d8c: e5930048 ldr r0, [r3, #72] ; 0x48 break; 2d90: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2d94: e593004c ldr r0, [r3, #76] ; 0x4c break; 2d98: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2d9c: e5930054 ldr r0, [r3, #84] ; 0x54 break; 2da0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2da4: e5930058 ldr r0, [r3, #88] ; 0x58 break; 2da8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2dac: e5930064 ldr r0, [r3, #100] ; 0x64 break; 2db0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2db4: e5930050 ldr r0, [r3, #80] ; 0x50 break; 2db8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2dbc: e593005c ldr r0, [r3, #92] ; 0x5c break; 2dc0: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 2dc4: eb003139 bl f2b0 <__errno> 2dc8: e3a03009 mov r3, #9 2dcc: e5803000 str r3, [r0] 2dd0: e3e00000 mvn r0, #0 2dd4: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2dd8: eb003134 bl f2b0 <__errno> <== NOT EXECUTED 2ddc: e3a03016 mov r3, #22 <== NOT EXECUTED 2de0: e5803000 str r3, [r0] <== NOT EXECUTED 2de4: e3e00000 mvn r0, #0 <== NOT EXECUTED 2de8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00001ae0 : void free( void *ptr ) { MSBUMP(free_calls, 1); 1ae0: e59f3088 ldr r3, [pc, #136] ; 1b70 1ae4: e593200c ldr r2, [r3, #12] 1ae8: e92d4030 push {r4, r5, lr} 1aec: e2822001 add r2, r2, #1 if ( !ptr ) 1af0: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 1af4: e583200c str r2, [r3, #12] if ( !ptr ) 1af8: 08bd8030 popeq {r4, r5, pc} /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1afc: e59f3070 ldr r3, [pc, #112] ; 1b74 1b00: e5933000 ldr r3, [r3] 1b04: e3530003 cmp r3, #3 1b08: 0a000012 beq 1b58 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1b0c: e59f3064 ldr r3, [pc, #100] ; 1b78 1b10: e5933000 ldr r3, [r3] 1b14: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 1b18: 11a00004 movne r0, r4 1b1c: 11a0e00f movne lr, pc 1b20: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1b24: e59f5050 ldr r5, [pc, #80] ; 1b7c 1b28: e1a01004 mov r1, r4 1b2c: e5950000 ldr r0, [r5] 1b30: eb0013bf bl 6a34 <_Protected_heap_Free> 1b34: e3500000 cmp r0, #0 1b38: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 1b3c: e5952000 ldr r2, [r5] <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1b40: e59f0038 ldr r0, [pc, #56] ; 1b80 <== NOT EXECUTED 1b44: e2822018 add r2, r2, #24 <== NOT EXECUTED 1b48: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 1b4c: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1b50: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1b54: ea000346 b 2874 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1b58: eb00003f bl 1c5c 1b5c: e3500000 cmp r0, #0 1b60: 1affffe9 bne 1b0c !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1b64: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1b68: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1b6c: ea00004d b 1ca8 <== NOT EXECUTED 00003388 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3388: e59f3058 ldr r3, [pc, #88] ; 33e8 <== NOT EXECUTED 338c: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 3390: e92d4010 push {r4, lr} <== NOT EXECUTED 3394: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3398: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 339c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 33a0: e3530000 cmp r3, #0 <== NOT EXECUTED 33a4: 0a000004 beq 33bc <== NOT EXECUTED 33a8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 33ac: e3530000 cmp r3, #0 <== NOT EXECUTED 33b0: 12800004 addne r0, r0, #4 <== NOT EXECUTED 33b4: 11a0e00f movne lr, pc <== NOT EXECUTED 33b8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 33bc: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 33c0: e3530000 cmp r3, #0 <== NOT EXECUTED 33c4: 0a000004 beq 33dc <== NOT EXECUTED 33c8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 33cc: e3530000 cmp r3, #0 <== NOT EXECUTED 33d0: 12840018 addne r0, r4, #24 <== NOT EXECUTED 33d4: 11a0e00f movne lr, pc <== NOT EXECUTED 33d8: 112fff13 bxne r3 <== NOT EXECUTED free(env); 33dc: e1a00004 mov r0, r4 <== NOT EXECUTED } } 33e0: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 33e4: eafffbab b 2298 <== NOT EXECUTED 00017798 : int fstat( int fd, struct stat *sbuf ) { 17798: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 1779c: e2515000 subs r5, r1, #0 177a0: 0a000023 beq 17834 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 177a4: e59f309c ldr r3, [pc, #156] ; 17848 177a8: e5933000 ldr r3, [r3] 177ac: e1500003 cmp r0, r3 177b0: 2a000015 bcs 1780c 177b4: e59f3090 ldr r3, [pc, #144] ; 1784c 177b8: e5934000 ldr r4, [r3] 177bc: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 177c0: e5943014 ldr r3, [r4, #20] 177c4: e3130c01 tst r3, #256 ; 0x100 177c8: 0a00000f beq 1780c if ( !iop->handlers ) 177cc: e594303c ldr r3, [r4, #60] ; 0x3c 177d0: e3530000 cmp r3, #0 177d4: 0a00000c beq 1780c rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 177d8: e5933018 ldr r3, [r3, #24] 177dc: e3530000 cmp r3, #0 177e0: 0a00000e beq 17820 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 177e4: e3a01000 mov r1, #0 177e8: e3a02048 mov r2, #72 ; 0x48 177ec: e1a00005 mov r0, r5 177f0: ebffd69c bl d268 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 177f4: e2840018 add r0, r4, #24 177f8: e1a01005 mov r1, r5 177fc: e594303c ldr r3, [r4, #60] ; 0x3c 17800: e1a0e00f mov lr, pc 17804: e593f018 ldr pc, [r3, #24] } 17808: e8bd8030 pop {r4, r5, pc} iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 1780c: ebffd44b bl c940 <__errno> 17810: e3a03009 mov r3, #9 17814: e5803000 str r3, [r0] 17818: e3e00000 mvn r0, #0 1781c: e8bd8030 pop {r4, r5, pc} if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 17820: ebffd446 bl c940 <__errno> <== NOT EXECUTED 17824: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17828: e5803000 str r3, [r0] <== NOT EXECUTED 1782c: e3e00000 mvn r0, #0 <== NOT EXECUTED 17830: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 17834: ebffd441 bl c940 <__errno> 17838: e3a0300e mov r3, #14 1783c: e5803000 str r3, [r0] 17840: e3e00000 mvn r0, #0 17844: e8bd8030 pop {r4, r5, pc} 00002f5c : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2f5c: e59f308c ldr r3, [pc, #140] ; 2ff0 2f60: e5933000 ldr r3, [r3] 2f64: e1500003 cmp r0, r3 #include int fsync( int fd ) { 2f68: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2f6c: 2a000010 bcs 2fb4 iop = rtems_libio_iop( fd ); 2f70: e59f307c ldr r3, [pc, #124] ; 2ff4 2f74: e5933000 ldr r3, [r3] 2f78: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2f7c: e5903014 ldr r3, [r0, #20] 2f80: e3130c01 tst r3, #256 ; 0x100 2f84: 0a00000a beq 2fb4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2f88: e3130004 tst r3, #4 2f8c: 0a00000d beq 2fc8 /* * Now process the fsync(). */ if ( !iop->handlers ) 2f90: e590303c ldr r3, [r0, #60] ; 0x3c 2f94: e3530000 cmp r3, #0 2f98: 0a000005 beq 2fb4 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 2f9c: e5933028 ldr r3, [r3, #40] ; 0x28 2fa0: e3530000 cmp r3, #0 2fa4: 0a00000c beq 2fdc rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 2fa8: e1a0e00f mov lr, pc 2fac: e12fff13 bx r3 } 2fb0: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 2fb4: eb0030bd bl f2b0 <__errno> <== NOT EXECUTED 2fb8: e3a03009 mov r3, #9 <== NOT EXECUTED 2fbc: e5803000 str r3, [r0] <== NOT EXECUTED 2fc0: e3e00000 mvn r0, #0 <== NOT EXECUTED 2fc4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2fc8: eb0030b8 bl f2b0 <__errno> 2fcc: e3a03016 mov r3, #22 2fd0: e5803000 str r3, [r0] 2fd4: e3e00000 mvn r0, #0 2fd8: e49df004 pop {pc} ; (ldr pc, [sp], #4) if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2fdc: eb0030b3 bl f2b0 <__errno> 2fe0: e3a03086 mov r3, #134 ; 0x86 2fe4: e5803000 str r3, [r0] 2fe8: e3e00000 mvn r0, #0 2fec: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00009988 : int ftruncate( int fd, off_t length ) { 9988: e92d40f0 push {r4, r5, r6, r7, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 998c: e59f30f4 ldr r3, [pc, #244] ; 9a88 9990: e5933000 ldr r3, [r3] 9994: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 9998: e24dd014 sub sp, sp, #20 999c: e1a05001 mov r5, r1 99a0: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 99a4: 2a000023 bcs 9a38 iop = rtems_libio_iop( fd ); 99a8: e59f30dc ldr r3, [pc, #220] ; 9a8c 99ac: e5934000 ldr r4, [r3] 99b0: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 99b4: e5943014 ldr r3, [r4, #20] 99b8: e3130c01 tst r3, #256 ; 0x100 99bc: 0a00001d beq 9a38 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 99c0: e284c018 add ip, r4, #24 99c4: e8bc000f ldm ip!, {r0, r1, r2, r3} 99c8: e1a0700d mov r7, sp 99cc: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 99d0: e59d200c ldr r2, [sp, #12] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 99d4: e1a03007 mov r3, r7 if ( !loc.ops->node_type_h ) 99d8: e5927010 ldr r7, [r2, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 99dc: e59c2000 ldr r2, [ip] if ( !loc.ops->node_type_h ) 99e0: e3570000 cmp r7, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 99e4: e5832000 str r2, [r3] if ( !loc.ops->node_type_h ) 99e8: 0a00001c beq 9a60 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 99ec: e1a0000d mov r0, sp 99f0: e1a0e00f mov lr, pc 99f4: e12fff17 bx r7 99f8: e3500001 cmp r0, #1 99fc: 0a00001c beq 9a74 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 9a00: e5943014 ldr r3, [r4, #20] 9a04: e3130004 tst r3, #4 9a08: 0a00000f beq 9a4c if ( !iop->handlers->ftruncate_h ) 9a0c: e594303c ldr r3, [r4, #60] ; 0x3c 9a10: e5933020 ldr r3, [r3, #32] 9a14: e3530000 cmp r3, #0 9a18: 0a000010 beq 9a60 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 9a1c: e1a00004 mov r0, r4 9a20: e1a01005 mov r1, r5 9a24: e1a02006 mov r2, r6 9a28: e1a0e00f mov lr, pc 9a2c: e12fff13 bx r3 } 9a30: e28dd014 add sp, sp, #20 9a34: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 9a38: eb000bc0 bl c940 <__errno> <== NOT EXECUTED 9a3c: e3a03009 mov r3, #9 <== NOT EXECUTED 9a40: e5803000 str r3, [r0] <== NOT EXECUTED 9a44: e3e00000 mvn r0, #0 <== NOT EXECUTED 9a48: eafffff8 b 9a30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 9a4c: eb000bbb bl c940 <__errno> <== NOT EXECUTED 9a50: e3a03016 mov r3, #22 <== NOT EXECUTED 9a54: e5803000 str r3, [r0] <== NOT EXECUTED 9a58: e3e00000 mvn r0, #0 <== NOT EXECUTED 9a5c: eafffff3 b 9a30 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 9a60: eb000bb6 bl c940 <__errno> <== NOT EXECUTED 9a64: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9a68: e5803000 str r3, [r0] <== NOT EXECUTED 9a6c: e3e00000 mvn r0, #0 <== NOT EXECUTED 9a70: eaffffee b 9a30 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 9a74: eb000bb1 bl c940 <__errno> 9a78: e3a03015 mov r3, #21 9a7c: e5803000 str r3, [r0] 9a80: e3e00000 mvn r0, #0 9a84: eaffffe9 b 9a30 0001b888 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 1b888: e59f30b8 ldr r3, [pc, #184] ; 1b948 1b88c: e5933000 ldr r3, [r3] 1b890: e1500003 cmp r0, r3 1b894: 359f30b0 ldrcc r3, [pc, #176] ; 1b94c int getdents( int dd_fd, char *dd_buf, int dd_len ) { 1b898: e92d40f0 push {r4, r5, r6, r7, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 1b89c: 35934000 ldrcc r4, [r3] 1b8a0: 23a04000 movcs r4, #0 1b8a4: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 1b8a8: e284c018 add ip, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 1b8ac: e24dd014 sub sp, sp, #20 1b8b0: e1a06001 mov r6, r1 1b8b4: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 1b8b8: e8bc000f ldm ip!, {r0, r1, r2, r3} 1b8bc: e1a0700d mov r7, sp 1b8c0: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 1b8c4: e59d200c ldr r2, [sp, #12] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 1b8c8: e1a03007 mov r3, r7 if ( !loc.ops->node_type_h ) 1b8cc: e5927010 ldr r7, [r2, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 1b8d0: e59c2000 ldr r2, [ip] if ( !loc.ops->node_type_h ) 1b8d4: e3570000 cmp r7, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 1b8d8: e5832000 str r2, [r3] if ( !loc.ops->node_type_h ) 1b8dc: 0a000014 beq 1b934 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 1b8e0: e1a0000d mov r0, sp 1b8e4: e1a0e00f mov lr, pc 1b8e8: e12fff17 bx r7 1b8ec: e3500001 cmp r0, #1 1b8f0: 1a00000a bne 1b920 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 1b8f4: e594303c ldr r3, [r4, #60] ; 0x3c 1b8f8: e5933008 ldr r3, [r3, #8] 1b8fc: e3530000 cmp r3, #0 1b900: 0a00000b beq 1b934 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 1b904: e1a00004 mov r0, r4 1b908: e1a01006 mov r1, r6 1b90c: e1a02005 mov r2, r5 1b910: e1a0e00f mov lr, pc 1b914: e12fff13 bx r3 } 1b918: e28dd014 add sp, sp, #20 1b91c: e8bd80f0 pop {r4, r5, r6, r7, pc} loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1b920: ebffce82 bl f330 <__errno> 1b924: e3a03014 mov r3, #20 1b928: e5803000 str r3, [r0] 1b92c: e3e00000 mvn r0, #0 1b930: eafffff8 b 1b918 * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1b934: ebffce7d bl f330 <__errno> <== NOT EXECUTED 1b938: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1b93c: e5803000 str r3, [r0] <== NOT EXECUTED 1b940: e3e00000 mvn r0, #0 <== NOT EXECUTED 1b944: eafffff3 b 1b918 <== NOT EXECUTED 00002904 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2904: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2908: e59d801c ldr r8, [sp, #28] 290c: e1a05000 mov r5, r0 2910: e1a0a001 mov sl, r1 2914: e1a04002 mov r4, r2 2918: e1a07003 mov r7, r3 FILE *fp; int match; init_etc_passwd_group(); 291c: ebffffb2 bl 27ec if ((fp = fopen("/etc/group", "r")) == NULL) { 2920: e59f00b0 ldr r0, [pc, #176] ; 29d8 2924: e59f10b0 ldr r1, [pc, #176] ; 29dc 2928: eb00329f bl f3ac 292c: e2506000 subs r6, r0, #0 2930: 1a000006 bne 2950 2934: ea000022 b 29c4 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 2938: e5940000 ldr r0, [r4] 293c: eb00366f bl 10300 2940: e2700001 rsbs r0, r0, #1 2944: 33a00000 movcc r0, #0 } else { match = (grp->gr_gid == gid); } if (match) { 2948: e3500000 cmp r0, #0 294c: 1a00000f bne 2990 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 2950: e1a01004 mov r1, r4 2954: e1a02007 mov r2, r7 2958: e1a03008 mov r3, r8 295c: e1a00006 mov r0, r6 2960: ebfffee1 bl 24ec 2964: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 2968: e1a01005 mov r1, r5 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 296c: 0a00000d beq 29a8 errno = EINVAL; fclose(fp); return -1; } if (name) { 2970: e3550000 cmp r5, #0 2974: 1affffef bne 2938 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 2978: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 297c: e150000a cmp r0, sl <== NOT EXECUTED 2980: 13a00000 movne r0, #0 <== NOT EXECUTED 2984: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 2988: e3500000 cmp r0, #0 <== NOT EXECUTED 298c: 0affffef beq 2950 <== NOT EXECUTED fclose(fp); 2990: e1a00006 mov r0, r6 2994: eb0030cc bl eccc *result = grp; 2998: e59d3020 ldr r3, [sp, #32] 299c: e3a00000 mov r0, #0 29a0: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 29a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 29a8: eb00307a bl eb98 <__errno> <== NOT EXECUTED 29ac: e3a03016 mov r3, #22 <== NOT EXECUTED 29b0: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 29b4: e1a00006 mov r0, r6 <== NOT EXECUTED 29b8: eb0030c3 bl eccc <== NOT EXECUTED 29bc: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 29c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 29c4: eb003073 bl eb98 <__errno> <== NOT EXECUTED 29c8: e3a03016 mov r3, #22 <== NOT EXECUTED 29cc: e5803000 str r3, [r0] <== NOT EXECUTED 29d0: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 29d4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 00002640 : return NULL; return p; } struct group *getgrent(void) { 2640: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 2644: e59f4030 ldr r4, [pc, #48] ; 267c <== NOT EXECUTED 2648: e5940000 ldr r0, [r4] <== NOT EXECUTED 264c: e3500000 cmp r0, #0 <== NOT EXECUTED 2650: 1a000001 bne 265c <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 2654: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 2658: e8bd8010 pop {r4, pc} <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 265c: e2841008 add r1, r4, #8 <== NOT EXECUTED 2660: e2842018 add r2, r4, #24 <== NOT EXECUTED 2664: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2668: ebffff9f bl 24ec <== NOT EXECUTED 266c: e3500000 cmp r0, #0 <== NOT EXECUTED 2670: 12840008 addne r0, r4, #8 <== NOT EXECUTED 2674: 18bd8010 popne {r4, pc} <== NOT EXECUTED 2678: eafffff5 b 2654 <== NOT EXECUTED 00002a1c : struct group *getgrgid( gid_t gid ) { 2a1c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 2a20: e59f1030 ldr r1, [pc, #48] ; 2a58 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 2a24: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 2a28: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 2a2c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 2a30: e2812010 add r2, r1, #16 <== NOT EXECUTED 2a34: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2a38: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 2a3c: e58dc000 str ip, [sp] <== NOT EXECUTED 2a40: ebffffe6 bl 29e0 <== NOT EXECUTED 2a44: e3500000 cmp r0, #0 <== NOT EXECUTED 2a48: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 2a4c: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 2a50: e28dd008 add sp, sp, #8 <== NOT EXECUTED 2a54: e8bd8000 pop {pc} <== NOT EXECUTED 000029e0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 29e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 29e4: e1a0c002 mov ip, r2 <== NOT EXECUTED 29e8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 29ec: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 29f0: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 29f4: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 29f8: e1a0300c mov r3, ip <== NOT EXECUTED 29fc: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 2a00: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 2a04: e1a0200e mov r2, lr <== NOT EXECUTED 2a08: e3a00000 mov r0, #0 <== NOT EXECUTED 2a0c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 2a10: ebffffbb bl 2904 <== NOT EXECUTED } 2a14: e28dd008 add sp, sp, #8 <== NOT EXECUTED 2a18: e8bd8000 pop {pc} <== NOT EXECUTED 00021ee4 : */ pid_t getpid( void ) { return _Objects_Local_node; } 21ee4: e3a00001 mov r0, #1 <== NOT EXECUTED 21ee8: e12fff1e bx lr <== NOT EXECUTED 00002afc : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2afc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2b00: e59d801c ldr r8, [sp, #28] 2b04: e1a05000 mov r5, r0 2b08: e1a0a001 mov sl, r1 2b0c: e1a04002 mov r4, r2 2b10: e1a07003 mov r7, r3 FILE *fp; int match; init_etc_passwd_group(); 2b14: ebffff34 bl 27ec if ((fp = fopen("/etc/passwd", "r")) == NULL) { 2b18: e59f00b0 ldr r0, [pc, #176] ; 2bd0 2b1c: e59f10b0 ldr r1, [pc, #176] ; 2bd4 2b20: eb003221 bl f3ac 2b24: e2506000 subs r6, r0, #0 2b28: 1a000006 bne 2b48 2b2c: ea000022 b 2bbc <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 2b30: e5940000 ldr r0, [r4] 2b34: eb0035f1 bl 10300 2b38: e2700001 rsbs r0, r0, #1 2b3c: 33a00000 movcc r0, #0 } else { match = (pwd->pw_uid == uid); } if (match) { 2b40: e3500000 cmp r0, #0 2b44: 1a00000f bne 2b88 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 2b48: e1a01004 mov r1, r4 2b4c: e1a02007 mov r2, r7 2b50: e1a03008 mov r3, r8 2b54: e1a00006 mov r0, r6 2b58: ebfffec8 bl 2680 2b5c: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 2b60: e1a01005 mov r1, r5 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 2b64: 0a00000d beq 2ba0 errno = EINVAL; fclose(fp); return -1; } if (name) { 2b68: e3550000 cmp r5, #0 2b6c: 1affffef bne 2b30 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 2b70: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 2b74: e150000a cmp r0, sl <== NOT EXECUTED 2b78: 13a00000 movne r0, #0 <== NOT EXECUTED 2b7c: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 2b80: e3500000 cmp r0, #0 <== NOT EXECUTED 2b84: 0affffef beq 2b48 <== NOT EXECUTED fclose(fp); 2b88: e1a00006 mov r0, r6 2b8c: eb00304e bl eccc *result = pwd; 2b90: e59d3020 ldr r3, [sp, #32] 2b94: e3a00000 mov r0, #0 2b98: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 2b9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 2ba0: eb002ffc bl eb98 <__errno> <== NOT EXECUTED 2ba4: e3a03016 mov r3, #22 <== NOT EXECUTED 2ba8: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 2bac: e1a00006 mov r0, r6 <== NOT EXECUTED 2bb0: eb003045 bl eccc <== NOT EXECUTED 2bb4: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 2bb8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 2bbc: eb002ff5 bl eb98 <__errno> <== NOT EXECUTED 2bc0: e3a03016 mov r3, #22 <== NOT EXECUTED 2bc4: e5803000 str r3, [r0] <== NOT EXECUTED 2bc8: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 2bcc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 000027ac : return NULL; return p; } struct passwd *getpwent(void) { 27ac: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 27b0: e59f4030 ldr r4, [pc, #48] ; 27e8 <== NOT EXECUTED 27b4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 27b8: e3500000 cmp r0, #0 <== NOT EXECUTED 27bc: 1a000001 bne 27c8 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 27c0: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 27c4: e8bd8010 pop {r4, pc} <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 27c8: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 27cc: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 27d0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 27d4: ebffffa9 bl 2680 <== NOT EXECUTED 27d8: e3500000 cmp r0, #0 <== NOT EXECUTED 27dc: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 27e0: 18bd8010 popne {r4, pc} <== NOT EXECUTED 27e4: eafffff5 b 27c0 <== NOT EXECUTED 00002c14 : struct passwd *getpwuid( uid_t uid ) { 2c14: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 2c18: e59f1030 ldr r1, [pc, #48] ; 2c50 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 2c1c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 2c20: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 2c24: e28dc004 add ip, sp, #4 <== NOT EXECUTED 2c28: e281201c add r2, r1, #28 <== NOT EXECUTED 2c2c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2c30: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 2c34: e58dc000 str ip, [sp] <== NOT EXECUTED 2c38: ebffffe6 bl 2bd8 <== NOT EXECUTED 2c3c: e3500000 cmp r0, #0 <== NOT EXECUTED 2c40: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 2c44: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 2c48: e28dd008 add sp, sp, #8 <== NOT EXECUTED 2c4c: e8bd8000 pop {pc} <== NOT EXECUTED 00002bd8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2bd8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 2bdc: e1a0c002 mov ip, r2 <== NOT EXECUTED 2be0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 2be4: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 2be8: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2bec: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 2bf0: e1a0300c mov r3, ip <== NOT EXECUTED 2bf4: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 2bf8: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 2bfc: e1a0200e mov r2, lr <== NOT EXECUTED 2c00: e3a00000 mov r0, #0 <== NOT EXECUTED 2c04: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 2c08: ebffffbb bl 2afc <== NOT EXECUTED } 2c0c: e28dd008 add sp, sp, #8 <== NOT EXECUTED 2c10: e8bd8000 pop {pc} <== NOT EXECUTED 00009a90 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 9a90: e92d4030 push {r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 9a94: e2504000 subs r4, r0, #0 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 9a98: e24dd008 sub sp, sp, #8 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 9a9c: 0a00000f beq 9ae0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 9aa0: e10f5000 mrs r5, CPSR 9aa4: e3853080 orr r3, r5, #128 ; 0x80 9aa8: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 9aac: e1a0000d mov r0, sp 9ab0: eb00029a bl a520 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 9ab4: e129f005 msr CPSR_fc, r5 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 9ab8: e59f2034 ldr r2, [pc, #52] ; 9af4 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 9abc: e59d3004 ldr r3, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 9ac0: e0c10392 smull r0, r1, r2, r3 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 9ac4: e59d2000 ldr r2, [sp] time->tv_usec = useconds; 9ac8: e1a03fc3 asr r3, r3, #31 9acc: e0633341 rsb r3, r3, r1, asr #6 9ad0: e884000c stm r4, {r2, r3} 9ad4: e3a00000 mov r0, #0 * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 9ad8: e28dd008 add sp, sp, #8 9adc: e8bd8030 pop {r4, r5, pc} void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 9ae0: eb000b96 bl c940 <__errno> <== NOT EXECUTED 9ae4: e3a0300e mov r3, #14 <== NOT EXECUTED 9ae8: e5803000 str r3, [r0] <== NOT EXECUTED 9aec: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 9af0: eafffff8 b 9ad8 <== NOT EXECUTED 000057ac : int ioctl( int fd, ioctl_command_t command, ... ) { 57ac: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 57b0: e59f3090 ldr r3, [pc, #144] ; 5848 int ioctl( int fd, ioctl_command_t command, ... ) { 57b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 57b8: e5933000 ldr r3, [r3] 57bc: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 57c0: e24dd004 sub sp, sp, #4 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 57c4: 2a000015 bcs 5820 iop = rtems_libio_iop( fd ); 57c8: e59f307c ldr r3, [pc, #124] ; 584c 57cc: e5933000 ldr r3, [r3] 57d0: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 57d4: e5903014 ldr r3, [r0, #20] 57d8: e3130c01 tst r3, #256 ; 0x100 57dc: 0a00000f beq 5820 /* * Now process the ioctl(). */ if ( !iop->handlers ) 57e0: e590303c ldr r3, [r0, #60] ; 0x3c iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 57e4: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 57e8: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 57ec: e58d2000 str r2, [sp] 57f0: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 57f4: 0a000009 beq 5820 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 57f8: e5933010 ldr r3, [r3, #16] 57fc: e3530000 cmp r3, #0 5800: 0a00000b beq 5834 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 5804: e59d1008 ldr r1, [sp, #8] 5808: e1a0e00f mov lr, pc 580c: e12fff13 bx r3 return rc; } 5810: e28dd004 add sp, sp, #4 5814: e49de004 pop {lr} ; (ldr lr, [sp], #4) 5818: e28dd00c add sp, sp, #12 581c: e12fff1e bx lr /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5820: eb0032f9 bl 1240c <__errno> 5824: e3a03009 mov r3, #9 5828: e5803000 str r3, [r0] 582c: e3e00000 mvn r0, #0 5830: eafffff6 b 5810 if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5834: eb0032f4 bl 1240c <__errno> <== NOT EXECUTED 5838: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 583c: e5803000 str r3, [r0] <== NOT EXECUTED 5840: e3e00000 mvn r0, #0 <== NOT EXECUTED 5844: eafffff1 b 5810 <== NOT EXECUTED 000033ac : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 33ac: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 33b0: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 33b4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 33b8: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 33bc: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 33c0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 33c4: e1a05001 mov r5, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 33c8: 0a000007 beq 33ec <== NOT EXECUTED c = tolower (c); 33cc: e59f2198 ldr r2, [pc, #408] ; 356c <== NOT EXECUTED 33d0: e5922000 ldr r2, [r2] <== NOT EXECUTED 33d4: e0822004 add r2, r2, r4 <== NOT EXECUTED 33d8: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 33dc: e2022003 and r2, r2, #3 <== NOT EXECUTED 33e0: e3520001 cmp r2, #1 <== NOT EXECUTED 33e4: 02844020 addeq r4, r4, #32 <== NOT EXECUTED 33e8: e20440ff and r4, r4, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 33ec: e354000d cmp r4, #13 <== NOT EXECUTED 33f0: 0a000012 beq 3440 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 33f4: e354000a cmp r4, #10 <== NOT EXECUTED 33f8: 0a000034 beq 34d0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 33fc: e3540000 cmp r4, #0 <== NOT EXECUTED 3400: 1a000015 bne 345c <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 3404: e59f3164 ldr r3, [pc, #356] ; 3570 <== NOT EXECUTED 3408: e5932000 ldr r2, [r3] <== NOT EXECUTED 340c: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 3410: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3414: e1530002 cmp r3, r2 <== NOT EXECUTED 3418: aa00000a bge 3448 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 341c: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED 3420: e3120008 tst r2, #8 <== NOT EXECUTED 3424: 1a00002c bne 34dc <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 3428: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 342c: e2832001 add r2, r3, #1 <== NOT EXECUTED 3430: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 3434: e3a00000 mov r0, #0 <== NOT EXECUTED 3438: e5852020 str r2, [r5, #32] <== NOT EXECUTED 343c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 3440: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 3444: 0a000001 beq 3450 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 3448: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 344c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 3450: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3454: 03a0400d moveq r4, #13 <== NOT EXECUTED 3458: 13a0400a movne r4, #10 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 345c: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED 3460: e3130002 tst r3, #2 <== NOT EXECUTED 3464: 0affffe6 beq 3404 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 3468: e5d52043 ldrb r2, [r5, #67] ; 0x43 <== NOT EXECUTED 346c: e1520004 cmp r2, r4 <== NOT EXECUTED 3470: 0a000038 beq 3558 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 3474: e5d52044 ldrb r2, [r5, #68] ; 0x44 <== NOT EXECUTED 3478: e1520004 cmp r2, r4 <== NOT EXECUTED 347c: 0a000030 beq 3544 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 3480: e5d52045 ldrb r2, [r5, #69] ; 0x45 <== NOT EXECUTED 3484: e1520004 cmp r2, r4 <== NOT EXECUTED 3488: 0a000027 beq 352c <== NOT EXECUTED return 1; } else if (c == '\n') { 348c: e354000a cmp r4, #10 <== NOT EXECUTED 3490: 0a00001b beq 3504 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 3494: e5d5204c ldrb r2, [r5, #76] ; 0x4c <== NOT EXECUTED 3498: e1520004 cmp r2, r4 <== NOT EXECUTED 349c: 0a000002 beq 34ac <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 34a0: e5d52051 ldrb r2, [r5, #81] ; 0x51 <== NOT EXECUTED 34a4: e1520004 cmp r2, r4 <== NOT EXECUTED 34a8: 1affffd5 bne 3404 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 34ac: e3130008 tst r3, #8 <== NOT EXECUTED 34b0: 1a00001f bne 3534 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 34b4: e285101c add r1, r5, #28 <== NOT EXECUTED 34b8: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 34bc: e2832001 add r2, r3, #1 <== NOT EXECUTED 34c0: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 34c4: e3a00001 mov r0, #1 <== NOT EXECUTED 34c8: e5852020 str r2, [r5, #32] <== NOT EXECUTED return 1; 34cc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 34d0: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 34d4: 13a0400d movne r4, #13 <== NOT EXECUTED 34d8: eaffffdf b 345c <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 34dc: e1a00004 mov r0, r4 <== NOT EXECUTED 34e0: e1a01005 mov r1, r5 <== NOT EXECUTED 34e4: ebffff0b bl 3118 <== NOT EXECUTED 34e8: e285101c add r1, r5, #28 <== NOT EXECUTED 34ec: e891000a ldm r1, {r1, r3} <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 34f0: e2832001 add r2, r3, #1 <== NOT EXECUTED 34f4: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 34f8: e3a00000 mov r0, #0 <== NOT EXECUTED 34fc: e5852020 str r2, [r5, #32] <== NOT EXECUTED 3500: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 3504: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 3508: 11a00004 movne r0, r4 <== NOT EXECUTED 350c: 11a01005 movne r1, r5 <== NOT EXECUTED 3510: 1bffff00 blne 3118 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3514: e285101c add r1, r5, #28 <== NOT EXECUTED 3518: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 351c: e2832001 add r2, r3, #1 <== NOT EXECUTED 3520: e3a0000a mov r0, #10 <== NOT EXECUTED 3524: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 3528: e5852020 str r2, [r5, #32] <== NOT EXECUTED 352c: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 3530: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 3534: e1a00004 mov r0, r4 <== NOT EXECUTED 3538: e1a01005 mov r1, r5 <== NOT EXECUTED 353c: ebfffef5 bl 3118 <== NOT EXECUTED 3540: eaffffdb b 34b4 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 3544: e1a00005 mov r0, r5 <== NOT EXECUTED 3548: e3a01001 mov r1, #1 <== NOT EXECUTED 354c: ebffff13 bl 31a0 <== NOT EXECUTED 3550: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; 3554: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 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]) { erase (tty, 0); 3558: e1a00005 mov r0, r5 <== NOT EXECUTED 355c: e3a01000 mov r1, #0 <== NOT EXECUTED 3560: ebffff0e bl 31a0 <== NOT EXECUTED 3564: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; 3568: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00021efc : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 21efc: e3a00000 mov r0, #0 <== NOT EXECUTED 21f00: e12fff1e bx lr <== NOT EXECUTED 0000344c : int link( const char *existing, const char *new ) { 344c: e92d40f0 push {r4, r5, r6, r7, lr} 3450: e24dd030 sub sp, sp, #48 ; 0x30 3454: e1a06001 mov r6, r1 3458: e1a04000 mov r4, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 345c: eb003543 bl 10970 3460: e28d5018 add r5, sp, #24 3464: e1a01000 mov r1, r0 3468: e3a0c001 mov ip, #1 346c: e1a00004 mov r0, r4 3470: e3a02000 mov r2, #0 3474: e1a03005 mov r3, r5 3478: e58dc000 str ip, [sp] 347c: ebfffe92 bl 2ecc 0, &existing_loc, true ); if ( result != 0 ) 3480: e3500000 cmp r0, #0 3484: 1a000052 bne 35d4 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 3488: e5d63000 ldrb r3, [r6] 348c: e353002f cmp r3, #47 ; 0x2f 3490: 1353005c cmpne r3, #92 ; 0x5c 3494: 13a0e000 movne lr, #0 3498: 03a0e001 moveq lr, #1 349c: 1a000035 bne 3578 34a0: e59f3210 ldr r3, [pc, #528] ; 36b8 34a4: e593c000 ldr ip, [r3] 34a8: e28cc018 add ip, ip, #24 34ac: e8bc000f ldm ip!, {r0, r1, r2, r3} 34b0: e28d4004 add r4, sp, #4 34b4: e1a07004 mov r7, r4 34b8: e8a7000f stmia r7!, {r0, r1, r2, r3} 34bc: e59c2000 ldr r2, [ip] 34c0: e5872000 str r2, [r7] 34c4: e3a0e001 mov lr, #1 if ( !parent_loc.ops->evalformake_h ) { 34c8: e59d3010 ldr r3, [sp, #16] 34cc: e5933004 ldr r3, [r3, #4] 34d0: e3530000 cmp r3, #0 34d4: 0a000033 beq 35a8 rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 34d8: e086000e add r0, r6, lr 34dc: e1a01004 mov r1, r4 34e0: e28d202c add r2, sp, #44 ; 0x2c 34e4: e1a0e00f mov lr, pc 34e8: e12fff13 bx r3 if ( result != 0 ) { 34ec: e2506000 subs r6, r0, #0 34f0: 1a00004e bne 3630 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 34f4: e59d3028 ldr r3, [sp, #40] ; 0x28 34f8: e59d2014 ldr r2, [sp, #20] 34fc: e1520003 cmp r2, r3 3500: 1a000035 bne 35dc rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 3504: e59d2010 ldr r2, [sp, #16] 3508: e5923008 ldr r3, [r2, #8] 350c: e3530000 cmp r3, #0 3510: 0a000052 beq 3660 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 3514: e1a00005 mov r0, r5 3518: e1a01004 mov r1, r4 351c: e59d202c ldr r2, [sp, #44] ; 0x2c 3520: e1a0e00f mov lr, pc 3524: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 3528: e59d3024 ldr r3, [sp, #36] ; 0x24 352c: e3530000 cmp r3, #0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 3530: e1a06000 mov r6, r0 rtems_filesystem_freenode( &existing_loc ); 3534: 0a000004 beq 354c 3538: e593301c ldr r3, [r3, #28] 353c: e3530000 cmp r3, #0 3540: 11a00005 movne r0, r5 3544: 11a0e00f movne lr, pc 3548: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 354c: e59d3010 ldr r3, [sp, #16] 3550: e3530000 cmp r3, #0 3554: 0a000004 beq 356c 3558: e593301c ldr r3, [r3, #28] 355c: e3530000 cmp r3, #0 3560: 11a00004 movne r0, r4 3564: 11a0e00f movne lr, pc 3568: 112fff13 bxne r3 return result; } 356c: e1a00006 mov r0, r6 3570: e28dd030 add sp, sp, #48 ; 0x30 3574: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 3578: e3530000 cmp r3, #0 357c: 0affffc7 beq 34a0 3580: e59f3130 ldr r3, [pc, #304] ; 36b8 3584: e593c000 ldr ip, [r3] 3588: e28cc004 add ip, ip, #4 358c: e8bc000f ldm ip!, {r0, r1, r2, r3} 3590: e28d4004 add r4, sp, #4 3594: e1a07004 mov r7, r4 3598: e8a7000f stmia r7!, {r0, r1, r2, r3} 359c: e59c2000 ldr r2, [ip] 35a0: e5872000 str r2, [r7] 35a4: eaffffc7 b 34c8 if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 35a8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 35ac: e3530000 cmp r3, #0 <== NOT EXECUTED 35b0: 0a000004 beq 35c8 <== NOT EXECUTED 35b4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 35b8: e3530000 cmp r3, #0 <== NOT EXECUTED 35bc: 11a00005 movne r0, r5 <== NOT EXECUTED 35c0: 11a0e00f movne lr, pc <== NOT EXECUTED 35c4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 35c8: eb002f58 bl f330 <__errno> <== NOT EXECUTED 35cc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 35d0: e5803000 str r3, [r0] <== NOT EXECUTED 35d4: e3e06000 mvn r6, #0 35d8: eaffffe3 b 356c * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 35dc: e59d3024 ldr r3, [sp, #36] ; 0x24 35e0: e3530000 cmp r3, #0 35e4: 0a000004 beq 35fc 35e8: e593301c ldr r3, [r3, #28] 35ec: e3530000 cmp r3, #0 35f0: 11a00005 movne r0, r5 35f4: 11a0e00f movne lr, pc 35f8: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 35fc: e59d3010 ldr r3, [sp, #16] 3600: e3530000 cmp r3, #0 3604: 0a000004 beq 361c 3608: e593301c ldr r3, [r3, #28] 360c: e3530000 cmp r3, #0 3610: 11a00004 movne r0, r4 3614: 11a0e00f movne lr, pc 3618: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 361c: eb002f43 bl f330 <__errno> 3620: e3a03012 mov r3, #18 3624: e5803000 str r3, [r0] 3628: e3e06000 mvn r6, #0 362c: eaffffce b 356c rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 3630: e59d3024 ldr r3, [sp, #36] ; 0x24 3634: e3530000 cmp r3, #0 3638: 0a000004 beq 3650 363c: e593301c ldr r3, [r3, #28] 3640: e3530000 cmp r3, #0 3644: 11a00005 movne r0, r5 3648: 11a0e00f movne lr, pc 364c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 3650: eb002f36 bl f330 <__errno> 3654: e5806000 str r6, [r0] 3658: e3e06000 mvn r6, #0 365c: eaffffc2 b 356c rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 3660: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 3664: e3530000 cmp r3, #0 <== NOT EXECUTED 3668: 0a000006 beq 3688 <== NOT EXECUTED 366c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3670: e3530000 cmp r3, #0 <== NOT EXECUTED 3674: 0a000003 beq 3688 <== NOT EXECUTED 3678: e1a00005 mov r0, r5 <== NOT EXECUTED 367c: e1a0e00f mov lr, pc <== NOT EXECUTED 3680: e12fff13 bx r3 <== NOT EXECUTED 3684: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 3688: e3520000 cmp r2, #0 <== NOT EXECUTED 368c: 0a000004 beq 36a4 <== NOT EXECUTED 3690: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3694: e3530000 cmp r3, #0 <== NOT EXECUTED 3698: 11a00004 movne r0, r4 <== NOT EXECUTED 369c: 11a0e00f movne lr, pc <== NOT EXECUTED 36a0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 36a4: eb002f21 bl f330 <__errno> <== NOT EXECUTED 36a8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 36ac: e5803000 str r3, [r0] <== NOT EXECUTED 36b0: e3e06000 mvn r6, #0 <== NOT EXECUTED 36b4: eaffffac b 356c <== NOT EXECUTED 00017864 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17864: e59fc134 ldr ip, [pc, #308] ; 179a0 17868: e59cc000 ldr ip, [ip] 1786c: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 17870: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17874: 2a00003d bcs 17970 iop = rtems_libio_iop( fd ); 17878: e59fc124 ldr ip, [pc, #292] ; 179a4 1787c: e59c4000 ldr r4, [ip] 17880: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 17884: e5940014 ldr r0, [r4, #20] 17888: e3100c01 tst r0, #256 ; 0x100 1788c: 0a000037 beq 17970 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 17890: e594c03c ldr ip, [r4, #60] ; 0x3c 17894: e59c0014 ldr r0, [ip, #20] 17898: e3500000 cmp r0, #0 1789c: 0a000039 beq 17988 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 178a0: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 178a4: e284600c add r6, r4, #12 178a8: e8960060 ldm r6, {r5, r6} switch ( whence ) { 178ac: 0a00002a beq 1795c 178b0: e3530002 cmp r3, #2 178b4: 0a00000d beq 178f0 178b8: e3530000 cmp r3, #0 178bc: 1a00001e bne 1793c case SEEK_SET: iop->offset = offset; 178c0: e584100c str r1, [r4, #12] 178c4: e5842010 str r2, [r4, #16] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 178c8: e1a00004 mov r0, r4 178cc: e1a0e00f mov lr, pc 178d0: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 178d4: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 178d8: e1a02000 mov r2, r0 178dc: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 178e0: 0a00000e beq 17920 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 178e4: e1a01003 mov r1, r3 178e8: e1a00002 mov r0, r2 178ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 178f0: e9940180 ldmib r4, {r7, r8} 178f4: e0977001 adds r7, r7, r1 178f8: e0a88002 adc r8, r8, r2 178fc: e584700c str r7, [r4, #12] 17900: e5848010 str r8, [r4, #16] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 17904: e1a00004 mov r0, r4 17908: e1a0e00f mov lr, pc 1790c: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 17910: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 17914: e1a02000 mov r2, r0 17918: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 1791c: 1afffff0 bne 178e4 17920: e3710001 cmn r1, #1 17924: 1affffee bne 178e4 iop->offset = old_offset; 17928: e584500c str r5, [r4, #12] 1792c: e5846010 str r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 17930: e1a01003 mov r1, r3 17934: e1a00002 mov r0, r2 17938: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1793c: ebffd3ff bl c940 <__errno> 17940: e3a03016 mov r3, #22 17944: e5803000 str r3, [r0] 17948: e3e02000 mvn r2, #0 1794c: e3e03000 mvn r3, #0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 17950: e1a01003 mov r1, r3 17954: e1a00002 mov r0, r2 17958: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 1795c: e0917005 adds r7, r1, r5 17960: e0a28006 adc r8, r2, r6 17964: e584700c str r7, [r4, #12] 17968: e5848010 str r8, [r4, #16] break; 1796c: eaffffd5 b 178c8 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 17970: ebffd3f2 bl c940 <__errno> <== NOT EXECUTED 17974: e3a03009 mov r3, #9 <== NOT EXECUTED 17978: e5803000 str r3, [r0] <== NOT EXECUTED 1797c: e3e02000 mvn r2, #0 <== NOT EXECUTED 17980: e3e03000 mvn r3, #0 <== NOT EXECUTED 17984: eaffffd6 b 178e4 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 17988: ebffd3ec bl c940 <__errno> <== NOT EXECUTED 1798c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17990: e5803000 str r3, [r0] <== NOT EXECUTED 17994: e3e02000 mvn r2, #0 <== NOT EXECUTED 17998: e3e03000 mvn r3, #0 <== NOT EXECUTED 1799c: eaffffd0 b 178e4 <== NOT EXECUTED 00001dcc : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 1dcc: e59f30dc ldr r3, [pc, #220] ; 1eb0 1dd0: e5932004 ldr r2, [r3, #4] 1dd4: e2822001 add r2, r2, #1 1dd8: e92d4070 push {r4, r5, r6, lr} 1ddc: e5832004 str r2, [r3, #4] 1de0: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 1de4: ebffffb3 bl 1cb8 /* * Validate the parameters */ if ( !size ) 1de8: e3540000 cmp r4, #0 1dec: 0a00001f beq 1e70 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1df0: e59f30bc ldr r3, [pc, #188] ; 1eb4 1df4: e5933000 ldr r3, [r3] 1df8: e3530003 cmp r3, #3 1dfc: 0a000018 beq 1e64 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 1e00: e59f30b0 ldr r3, [pc, #176] ; 1eb8 1e04: e3a02000 mov r2, #0 1e08: e5930000 ldr r0, [r3] 1e0c: e1a01004 mov r1, r4 1e10: e1a03002 mov r3, r2 1e14: eb0012f3 bl 69e8 <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1e18: e2506000 subs r6, r0, #0 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 1e1c: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1e20: 0a000015 beq 1e7c } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1e24: e59f3090 ldr r3, [pc, #144] ; 1ebc 1e28: e5933000 ldr r3, [r3] 1e2c: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 1e30: 11a01004 movne r1, r4 1e34: 11a00005 movne r0, r5 1e38: 11a0e00f movne lr, pc 1e3c: 1593f000 ldrne pc, [r3] /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1e40: e59f3078 ldr r3, [pc, #120] ; 1ec0 1e44: e5933000 ldr r3, [r3] 1e48: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1e4c: 11a00005 movne r0, r5 1e50: 11a0e00f movne lr, pc 1e54: 1593f004 ldrne pc, [r3, #4] 1e58: e1a06005 mov r6, r5 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1e5c: e1a00006 mov r0, r6 1e60: e8bd8070 pop {r4, r5, r6, pc} return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1e64: ebffff7c bl 1c5c 1e68: e3500000 cmp r0, #0 1e6c: 1affffe3 bne 1e00 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1e70: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1e74: e1a00006 mov r0, r6 <== NOT EXECUTED 1e78: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 1e7c: e59f3040 ldr r3, [pc, #64] ; 1ec4 1e80: e5933000 ldr r3, [r3] 1e84: e3530000 cmp r3, #0 1e88: 0a000004 beq 1ea0 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1e8c: e1a00004 mov r0, r4 <== NOT EXECUTED 1e90: e1a0e00f mov lr, pc <== NOT EXECUTED 1e94: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 1e98: e2505000 subs r5, r0, #0 <== NOT EXECUTED 1e9c: 1affffe0 bne 1e24 <== NOT EXECUTED errno = ENOMEM; 1ea0: eb002aa6 bl c940 <__errno> 1ea4: e3a0300c mov r3, #12 1ea8: e5803000 str r3, [r0] return (void *) 0; 1eac: eaffffea b 1e5c 00001ca8 : } void malloc_deferred_free( void *pointer ) { 1ca8: e1a01000 mov r1, r0 <== 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 ); 1cac: e59f0000 ldr r0, [pc, #0] ; 1cb4 <== NOT EXECUTED 1cb0: ea000f30 b 5978 <_Chain_Append> <== NOT EXECUTED 00001cb8 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 1cb8: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 1cbc: ea000000 b 1cc4 free(to_be_freed); 1cc0: ebffff86 bl 1ae0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 1cc4: e59f000c ldr r0, [pc, #12] ; 1cd8 1cc8: eb000f35 bl 59a4 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 1ccc: e3500000 cmp r0, #0 1cd0: 1afffffa bne 1cc0 free(to_be_freed); } 1cd4: e49df004 pop {pc} ; (ldr pc, [sp], #4) 000107bc : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 107bc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( block_table ); 107c0: e2504000 subs r4, r0, #0 void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 107c4: e1a08001 mov r8, r1 /* * Perform internal consistency checks */ assert( block_table ); 107c8: 0a000014 beq 10820 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 107d8: e3a05000 mov r5, #0 107dc: e1a06005 mov r6, r5 if ( b[i] ) { memfile_free_block( b[i] ); b[i] = 0; 107e0: e1a0a005 mov sl, r5 */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 107f0: ebffff4b bl 10524 b[i] = 0; 107f4: e787a005 str sl, [r7, r5] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 10808: e5947000 ldr r7, [r4] /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 1080c: e1a00007 mov r0, r7 10810: ebffff43 bl 10524 *block_table = 0; 10814: e3a03000 mov r3, #0 10818: e5843000 str r3, [r4] } 1081c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Perform internal consistency checks */ assert( block_table ); 10820: e3a01e1b mov r1, #432 ; 0x1b0 <== NOT EXECUTED 10824: e2811003 add r1, r1, #3 <== NOT EXECUTED 10828: e59f0008 ldr r0, [pc, #8] ; 10838 <== NOT EXECUTED 1082c: e59f2008 ldr r2, [pc, #8] ; 1083c <== NOT EXECUTED 10830: e59f3008 ldr r3, [pc, #8] ; 10840 <== NOT EXECUTED 10834: ebfff849 bl e960 <__assert_func> <== NOT EXECUTED 00010d14 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 10d14: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10d18: e5904038 ldr r4, [r0, #56] ; 0x38 * 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 ) 10d1c: e5943054 ldr r3, [r4, #84] ; 0x54 10d20: e1530002 cmp r3, r2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 10d24: e24dd008 sub sp, sp, #8 * 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 ) 10d28: ba00000e blt 10d68 10d2c: 0a00000a beq 10d5c * 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; 10d30: e5841050 str r1, [r4, #80] ; 0x50 10d34: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; 10d38: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); 10d3c: e3a01000 mov r1, #0 10d40: e1a0000d mov r0, sp 10d44: ebffc91d bl 31c0 10d48: e59d3000 ldr r3, [sp] 10d4c: e5843040 str r3, [r4, #64] ; 0x40 10d50: e3a00000 mov r0, #0 return 0; } 10d54: e28dd008 add sp, sp, #8 10d58: e8bd8010 pop {r4, pc} * 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 ) 10d5c: e5943050 ldr r3, [r4, #80] ; 0x50 10d60: e1530001 cmp r3, r1 10d64: 2afffff1 bcs 10d30 return IMFS_memfile_extend( the_jnode, length ); 10d68: e1a00004 mov r0, r4 <== NOT EXECUTED 10d6c: ebffff87 bl 10b90 <== NOT EXECUTED 10d70: eafffff7 b 10d54 <== NOT EXECUTED 00010d74 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10d74: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10d78: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { 10d7c: e595304c ldr r3, [r5, #76] ; 0x4c 10d80: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10d84: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 10d88: 0a00000d beq 10dc4 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 10d8c: e1a00005 mov r0, r5 10d90: e284200c add r2, r4, #12 10d94: e8920006 ldm r2, {r1, r2} 10d98: ebffff7c bl 10b90 10d9c: e3500000 cmp r0, #0 10da0: 1a00001a bne 10e10 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 10da4: e2853050 add r3, r5, #80 ; 0x50 10da8: e893000c ldm r3, {r2, r3} 10dac: e984000c stmib r4, {r2, r3} 10db0: e284300c add r3, r4, #12 10db4: e893000c ldm r3, {r2, r3} } return iop->offset; } 10db8: e1a01003 mov r1, r3 10dbc: e1a00002 mov r0, r2 10dc0: e8bd8030 pop {r4, r5, pc} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 10dc4: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED 10dc8: e2853050 add r3, r5, #80 ; 0x50 <== NOT EXECUTED 10dcc: e893000c ldm r3, {r2, r3} <== NOT EXECUTED 10dd0: e1510003 cmp r1, r3 <== NOT EXECUTED 10dd4: e590000c ldr r0, [r0, #12] <== NOT EXECUTED 10dd8: ca000007 bgt 10dfc <== NOT EXECUTED 10ddc: 0a000004 beq 10df4 <== NOT EXECUTED 10de0: e1a02000 mov r2, r0 <== NOT EXECUTED 10de4: e1a03001 mov r3, r1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 10de8: e1a01003 mov r1, r3 <== NOT EXECUTED 10dec: e1a00002 mov r0, r2 <== NOT EXECUTED 10df0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 10df4: e1500002 cmp r0, r2 <== NOT EXECUTED 10df8: 9afffff8 bls 10de0 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 10dfc: e584200c str r2, [r4, #12] <== NOT EXECUTED 10e00: e5843010 str r3, [r4, #16] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 10e04: e1a01003 mov r1, r3 <== NOT EXECUTED 10e08: e1a00002 mov r0, r2 <== NOT EXECUTED 10e0c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 10e10: eb000485 bl 1202c <__errno> <== NOT EXECUTED 10e14: e3a0301c mov r3, #28 <== NOT EXECUTED 10e18: e5803000 str r3, [r0] <== NOT EXECUTED 10e1c: e3e02000 mvn r2, #0 <== NOT EXECUTED 10e20: e3e03000 mvn r3, #0 <== NOT EXECUTED 10e24: eaffffe3 b 10db8 <== NOT EXECUTED 000110ec : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 110ec: e92d4830 push {r4, r5, fp, lr} the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 110f0: e5903014 ldr r3, [r0, #20] 110f4: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 110f8: e24dd004 sub sp, sp, #4 110fc: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 11100: e5905038 ldr r5, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 11104: 0a000002 beq 11114 && (the_jnode->type == IMFS_LINEAR_FILE)) { 11108: e595204c ldr r2, [r5, #76] ; 0x4c 1110c: e3520006 cmp r2, #6 11110: 0a00000b beq 11144 the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 11114: e5952050 ldr r2, [r5, #80] ; 0x50 11118: e5951054 ldr r1, [r5, #84] ; 0x54 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1111c: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 11120: 1584200c strne r2, [r4, #12] 11124: 15841010 strne r1, [r4, #16] 11128: 15951054 ldrne r1, [r5, #84] ; 0x54 1112c: 15952050 ldrne r2, [r5, #80] ; 0x50 iop->size = the_jnode->info.file.size; 11130: e5841008 str r1, [r4, #8] 11134: e5842004 str r2, [r4, #4] 11138: e3a00000 mov r0, #0 return 0; } 1113c: e28dd004 add sp, sp, #4 11140: e8bd8830 pop {r4, r5, fp, pc} /* * 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; 11144: e595c050 ldr ip, [r5, #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; 11148: 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; 1114c: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; 11150: e3a01000 mov r1, #0 <== NOT EXECUTED 11154: 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) 11158: e35c0000 cmp ip, #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; 1115c: e585304c str r3, [r5, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; 11160: e5850060 str r0, [r5, #96] ; 0x60 <== 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; 11164: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 11168: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED 1116c: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 11170: e585005c str r0, [r5, #92] ; 0x5c <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; 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; 11174: e5850058 str r0, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 11178: 1a000004 bne 11190 <== NOT EXECUTED 1117c: e1a0b001 mov fp, r1 <== NOT EXECUTED 11180: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 11184: e1a01002 mov r1, r2 <== NOT EXECUTED 11188: e1a0200b mov r2, fp <== NOT EXECUTED 1118c: eaffffe2 b 1111c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 11190: e1a00005 mov r0, r5 <== NOT EXECUTED 11194: e58dc000 str ip, [sp] <== NOT EXECUTED 11198: ebffff22 bl 10e28 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 1119c: e3700001 cmn r0, #1 <== NOT EXECUTED 111a0: 0affffe5 beq 1113c <== NOT EXECUTED 111a4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 111a8: eaffffd9 b 11114 <== NOT EXECUTED 00001ed8 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1ed8: e92d45f0 push {r4, r5, r6, r7, r8, sl, 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) ) ) 1edc: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1ee0: e24dd01c sub sp, sp, #28 1ee4: e1a05001 mov r5, r1 1ee8: e1a0c000 mov ip, r0 1eec: e1a07002 mov r7, r2 1ef0: 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) ) ) 1ef4: 0a000045 beq 2010 rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1ef8: e5d03000 ldrb r3, [r0] 1efc: e353002f cmp r3, #47 ; 0x2f 1f00: 1353005c cmpne r3, #92 ; 0x5c 1f04: 13a06000 movne r6, #0 1f08: 03a06001 moveq r6, #1 1f0c: 1a00002b bne 1fc0 1f10: e59f3128 ldr r3, [pc, #296] ; 2040 1f14: e593e000 ldr lr, [r3] 1f18: e28ee018 add lr, lr, #24 1f1c: e8be000f ldm lr!, {r0, r1, r2, r3} 1f20: e28d4004 add r4, sp, #4 1f24: e1a06004 mov r6, r4 1f28: e8a6000f stmia r6!, {r0, r1, r2, r3} if ( !temp_loc.ops->evalformake_h ) { 1f2c: e59d3010 ldr r3, [sp, #16] 1f30: e5933004 ldr r3, [r3, #4] int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1f34: e59e2000 ldr r2, [lr] if ( !temp_loc.ops->evalformake_h ) { 1f38: e3530000 cmp r3, #0 int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1f3c: e5862000 str r2, [r6] 1f40: e3a06001 mov r6, #1 if ( !temp_loc.ops->evalformake_h ) { 1f44: 0a00002c beq 1ffc rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 1f48: e08c0006 add r0, ip, r6 1f4c: e1a01004 mov r1, r4 1f50: e28d2018 add r2, sp, #24 1f54: e1a0e00f mov lr, pc 1f58: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 1f5c: e3500000 cmp r0, #0 1f60: 1a000028 bne 2008 return -1; if ( !temp_loc.ops->mknod_h ) { 1f64: e59d3010 ldr r3, [sp, #16] 1f68: e593c014 ldr ip, [r3, #20] 1f6c: e35c0000 cmp ip, #0 1f70: 0a00002b beq 2024 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1f74: e1a01005 mov r1, r5 1f78: e1a03008 mov r3, r8 1f7c: e58d4000 str r4, [sp] 1f80: e59d0018 ldr r0, [sp, #24] 1f84: e1a02007 mov r2, r7 1f88: e1a0e00f mov lr, pc 1f8c: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 1f90: e59d3010 ldr r3, [sp, #16] 1f94: e3530000 cmp r3, #0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1f98: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 1f9c: 0a000004 beq 1fb4 1fa0: e593301c ldr r3, [r3, #28] 1fa4: e3530000 cmp r3, #0 1fa8: 11a00004 movne r0, r4 1fac: 11a0e00f movne lr, pc 1fb0: 112fff13 bxne r3 return result; } 1fb4: e1a00005 mov r0, r5 1fb8: e28dd01c add sp, sp, #28 1fbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1fc0: e3530000 cmp r3, #0 1fc4: 0affffd1 beq 1f10 1fc8: e59f3070 ldr r3, [pc, #112] ; 2040 1fcc: e593e000 ldr lr, [r3] 1fd0: e28ee004 add lr, lr, #4 1fd4: e8be000f ldm lr!, {r0, r1, r2, r3} 1fd8: e28d4004 add r4, sp, #4 1fdc: e1a0a004 mov sl, r4 1fe0: e8aa000f stmia sl!, {r0, r1, r2, r3} if ( !temp_loc.ops->evalformake_h ) { 1fe4: e59d3010 ldr r3, [sp, #16] 1fe8: e5933004 ldr r3, [r3, #4] int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1fec: e59e2000 ldr r2, [lr] if ( !temp_loc.ops->evalformake_h ) { 1ff0: e3530000 cmp r3, #0 int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1ff4: e58a2000 str r2, [sl] if ( !temp_loc.ops->evalformake_h ) { 1ff8: 1affffd2 bne 1f48 if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 1ffc: eb002a4f bl c940 <__errno> <== NOT EXECUTED 2000: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2004: e5803000 str r3, [r0] <== NOT EXECUTED 2008: e3e05000 mvn r5, #0 200c: eaffffe8 b 1fb4 int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 2010: eb002a4a bl c940 <__errno> <== NOT EXECUTED 2014: e3a03016 mov r3, #22 <== NOT EXECUTED 2018: e5803000 str r3, [r0] <== NOT EXECUTED 201c: e3e05000 mvn r5, #0 <== NOT EXECUTED 2020: eaffffe3 b 1fb4 <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 2024: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2028: e3530000 cmp r3, #0 <== NOT EXECUTED 202c: 0afffff2 beq 1ffc <== NOT EXECUTED 2030: e1a00004 mov r0, r4 <== NOT EXECUTED 2034: e1a0e00f mov lr, pc <== NOT EXECUTED 2038: e12fff13 bx r3 <== NOT EXECUTED 203c: eaffffee b 1ffc <== NOT EXECUTED 00002060 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 2060: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 2064: e2516000 subs r6, r1, #0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 2068: e24dd018 sub sp, sp, #24 206c: e1a07000 mov r7, r0 2070: e1a05002 mov r5, r2 2074: e1a09003 mov r9, r3 2078: e59da038 ldr sl, [sp, #56] ; 0x38 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 207c: 0a000083 beq 2290 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 2080: e3520001 cmp r2, #1 2084: 8a000081 bhi 2290 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 2088: e5968024 ldr r8, [r6, #36] ; 0x24 208c: e3580000 cmp r8, #0 2090: 0a000089 beq 22bc /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 2094: e3530000 cmp r3, #0 2098: 03a0006c moveq r0, #108 ; 0x6c 209c: 0a000002 beq 20ac size += strlen( device ) + 1; 20a0: e1a00003 mov r0, r3 <== NOT EXECUTED 20a4: eb002e16 bl d904 <== NOT EXECUTED 20a8: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED temp_mt_entry = malloc( size ); 20ac: ebffff46 bl 1dcc if ( !temp_mt_entry ) { 20b0: e3500000 cmp r0, #0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 20b4: e1a04000 mov r4, r0 20b8: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 20bc: 0a000089 beq 22e8 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 20c0: e3590000 cmp r9, #0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 20c4: e5805030 str r5, [r0, #48] ; 0x30 if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 20c8: e584002c str r0, [r4, #44] ; 0x2c if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 20cc: 05809068 streq r9, [r0, #104] ; 0x68 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 20d0: 0a000004 beq 20e8 temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 20d4: e280306c add r3, r0, #108 ; 0x6c <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 20d8: e1a00003 mov r0, r3 <== NOT EXECUTED 20dc: e1a01009 mov r1, r9 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 20e0: e5843068 str r3, [r4, #104] ; 0x68 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 20e4: eb002dca bl d814 <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 20e8: e35a0000 cmp sl, #0 20ec: 0a00004a beq 221c if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 20f0: e1a0000a mov r0, sl 20f4: eb002e02 bl d904 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 20f8: e28d5004 add r5, sp, #4 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 20fc: e1a01000 mov r1, r0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 2100: e3a0c001 mov ip, #1 2104: e1a0000a mov r0, sl 2108: e3a02007 mov r2, #7 210c: e1a03005 mov r3, r5 2110: e58dc000 str ip, [sp] 2114: ebfffe3b bl 1a08 2118: e3700001 cmn r0, #1 211c: 0a000069 beq 22c8 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 2120: e59d3010 ldr r3, [sp, #16] 2124: e5933010 ldr r3, [r3, #16] 2128: e3530000 cmp r3, #0 212c: 0a000069 beq 22d8 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2130: e1a00005 mov r0, r5 2134: e1a0e00f mov lr, pc 2138: e12fff13 bx r3 213c: e3500001 cmp r0, #1 2140: 1a000059 bne 22ac /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 2144: e59f11b0 ldr r1, [pc, #432] ; 22fc 2148: e4913004 ldr r3, [r1], #4 214c: e1530001 cmp r3, r1 2150: 0a000053 beq 22a4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 2154: e59d0004 ldr r0, [sp, #4] 2158: e593201c ldr r2, [r3, #28] 215c: e1520000 cmp r2, r0 2160: 1a000003 bne 2174 2164: ea000022 b 21f4 <== NOT EXECUTED 2168: e593201c ldr r2, [r3, #28] 216c: e1520000 cmp r2, r0 2170: 0a00001f beq 21f4 * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 2174: e5933000 ldr r3, [r3] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 2178: e1530001 cmp r3, r1 217c: 1afffff9 bne 2168 * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 2180: e28d100c add r1, sp, #12 2184: e8910006 ldm r1, {r1, r2} /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 2188: e5923020 ldr r3, [r2, #32] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 218c: e5841010 str r1, [r4, #16] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2190: e59d1014 ldr r1, [sp, #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 ){ 2194: e3530000 cmp r3, #0 * 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. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 2198: e5840008 str r0, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 219c: e5841018 str r1, [r4, #24] * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 21a0: e5842014 str r2, [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 ){ 21a4: 0a00004b beq 22d8 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 21a8: e1a00004 mov r0, r4 21ac: e1a0e00f mov lr, pc 21b0: e12fff13 bx r3 21b4: e3500000 cmp r0, #0 21b8: 1a000010 bne 2200 temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 21bc: e1a00004 mov r0, r4 21c0: e1a0e00f mov lr, pc 21c4: e596f024 ldr pc, [r6, #36] ; 0x24 21c8: e2506000 subs r6, r0, #0 21cc: 1a00001b bne 2240 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 21d0: e59f0124 ldr r0, [pc, #292] ; 22fc 21d4: e1a01004 mov r1, r4 21d8: eb000de6 bl 5978 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 21dc: e3570000 cmp r7, #0 *mt_entry = temp_mt_entry; 21e0: 15874000 strne r4, [r7] */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 21e4: 01a00007 moveq r0, r7 *mt_entry = temp_mt_entry; 21e8: 11a00006 movne r0, r6 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 21ec: e28dd018 add sp, sp, #24 21f0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 21f4: eb0029d1 bl c940 <__errno> 21f8: e3a03010 mov r3, #16 21fc: e5803000 str r3, [r0] return 0; cleanup_and_bail: free( temp_mt_entry ); 2200: e1a00004 mov r0, r4 2204: ebfffe35 bl 1ae0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 2208: e595300c ldr r3, [r5, #12] 220c: e3530000 cmp r3, #0 2210: 1a000016 bne 2270 2214: e3e00000 mvn r0, #0 <== NOT EXECUTED 2218: eafffff3 b 21ec <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 221c: e584a01c str sl, [r4, #28] temp_mt_entry->mt_fs_root.handlers = NULL; 2220: e584a024 str sl, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = NULL; 2224: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->mt_point_node.node_access = NULL; 2228: e584a008 str sl, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 222c: e584a010 str sl, [r4, #16] temp_mt_entry->mt_point_node.ops = NULL; 2230: e584a014 str sl, [r4, #20] temp_mt_entry->mt_point_node.mt_entry = NULL; 2234: e584a018 str sl, [r4, #24] 2238: e1a0500a mov r5, sl 223c: eaffffde b 21bc } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 2240: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2244: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 2248: e3530000 cmp r3, #0 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 224c: 11a00004 movne r0, r4 <== NOT EXECUTED 2250: 11a0e00f movne lr, pc <== NOT EXECUTED 2254: 112fff13 bxne r3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 2258: e1a00004 mov r0, r4 <== NOT EXECUTED 225c: ebfffe1f bl 1ae0 <== NOT EXECUTED if ( loc_to_free ) 2260: e3550000 cmp r5, #0 <== NOT EXECUTED 2264: 1affffe7 bne 2208 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 2268: e3e00000 mvn r0, #0 <== NOT EXECUTED 226c: eaffffde b 21ec <== NOT EXECUTED 2270: e593301c ldr r3, [r3, #28] 2274: e3530000 cmp r3, #0 2278: 0affffe5 beq 2214 227c: e1a00005 mov r0, r5 2280: e1a0e00f mov lr, pc 2284: e12fff13 bx r3 2288: e3e00000 mvn r0, #0 228c: eaffffd6 b 21ec * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 2290: eb0029aa bl c940 <__errno> 2294: e3a03016 mov r3, #22 2298: e5803000 str r3, [r0] 229c: e3e00000 mvn r0, #0 return -1; 22a0: eaffffd1 b 21ec cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 22a4: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 22a8: eaffffb4 b 2180 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 22ac: eb0029a3 bl c940 <__errno> 22b0: e3a03014 mov r3, #20 22b4: e5803000 str r3, [r0] goto cleanup_and_bail; 22b8: eaffffd0 b 2200 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 22bc: eb00299f bl c940 <__errno> <== NOT EXECUTED 22c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22c4: e5803000 str r3, [r0] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 22c8: e1a00008 mov r0, r8 <== NOT EXECUTED 22cc: ebfffe03 bl 1ae0 <== NOT EXECUTED 22d0: e3e00000 mvn r0, #0 <== NOT EXECUTED 22d4: eaffffc4 b 21ec <== NOT EXECUTED * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 22d8: eb002998 bl c940 <__errno> <== NOT EXECUTED 22dc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22e0: e5803000 str r3, [r0] <== NOT EXECUTED goto cleanup_and_bail; 22e4: eaffffc5 b 2200 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 22e8: eb002994 bl c940 <__errno> <== NOT EXECUTED 22ec: e3a0300c mov r3, #12 <== NOT EXECUTED 22f0: e5803000 str r3, [r0] <== NOT EXECUTED 22f4: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 22f8: eaffffbb b 21ec <== NOT EXECUTED 00002370 : */ int newlib_free_buffers( FILE *fp ) { 2370: e92d4010 push {r4, lr} 2374: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 2378: eb002a6f bl cd3c 237c: e3500002 cmp r0, #2 2380: 9a000003 bls 2394 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 2384: e1a00004 mov r0, r4 <== NOT EXECUTED 2388: eb0029b9 bl ca74 <== NOT EXECUTED } return 0; } 238c: e3a00000 mov r0, #0 2390: e8bd8010 pop {r4, pc} { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 2394: e1d430bc ldrh r3, [r4, #12] 2398: e3130080 tst r3, #128 ; 0x80 239c: 0afffffa beq 238c free( fp->_bf._base ); 23a0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 23a4: ebfffdcd bl 1ae0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 23a8: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 23ac: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 23b0: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 23b4: e5843010 str r3, [r4, #16] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 23b8: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 23bc: e5843000 str r3, [r4] <== NOT EXECUTED break; default: fclose(fp); } return 0; } 23c0: e3a00000 mov r0, #0 <== NOT EXECUTED 23c4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 000024e8 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 24e8: e92d4010 push {r4, lr} rtems_device_driver status; if ( !initialized ) { 24ec: e59f3044 ldr r3, [pc, #68] ; 2538 24f0: e5d32000 ldrb r2, [r3] 24f4: e3520000 cmp r2, #0 rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 24f8: e1a04000 mov r4, r0 rtems_device_driver status; if ( !initialized ) { 24fc: 0a000001 beq 2508 NULL_major = major; } return RTEMS_SUCCESSFUL; } 2500: e3a00000 mov r0, #0 2504: e8bd8010 pop {r4, pc} ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 2508: e3a0c001 mov ip, #1 status = rtems_io_register_name( 250c: e59f0028 ldr r0, [pc, #40] ; 253c 2510: e1a01004 mov r1, r4 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 2514: e5c3c000 strb ip, [r3] status = rtems_io_register_name( 2518: eb000051 bl 2664 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 251c: e3500000 cmp r0, #0 2520: 1a000003 bne 2534 rtems_fatal_error_occurred(status); NULL_major = major; 2524: e59f3014 ldr r3, [pc, #20] ; 2540 } return RTEMS_SUCCESSFUL; } 2528: e3a00000 mov r0, #0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); NULL_major = major; 252c: e5834000 str r4, [r3] } return RTEMS_SUCCESSFUL; } 2530: e8bd8010 pop {r4, pc} major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 2534: eb0010d1 bl 6880 <== NOT EXECUTED 00002608 : int open( const char *pathname, int flags, ... ) { 2608: e92d000e push {r1, r2, r3} 260c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 2610: e24dd01c sub sp, sp, #28 2614: e59d503c ldr r5, [sp, #60] ; 0x3c /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 2618: e2853001 add r3, r5, #1 if ( ( status & _FREAD ) == _FREAD ) 261c: e2138001 ands r8, r3, #1 2620: 13a08004 movne r8, #4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 2624: e3130002 tst r3, #2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 2628: e28d3044 add r3, sp, #68 ; 0x44 int open( const char *pathname, int flags, ... ) { 262c: e1a06000 mov r6, r0 eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 2630: 13888002 orrne r8, r8, #2 va_start(ap, flags); mode = va_arg( ap, int ); 2634: e58d3018 str r3, [sp, #24] 2638: e59da040 ldr sl, [sp, #64] ; 0x40 * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 263c: eb001da3 bl 9cd0 if ( iop == 0 ) { 2640: e2504000 subs r4, r0, #0 2644: 03a06017 moveq r6, #23 2648: 0a00005d beq 27c4 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 264c: e1a00006 mov r0, r6 2650: eb002cab bl d904 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 2654: e28d7004 add r7, sp, #4 pathname, strlen( pathname ), eval_flags, &loc, true ); 2658: e1a01000 mov r1, r0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 265c: e1a02008 mov r2, r8 2660: e1a00006 mov r0, r6 2664: e3a08001 mov r8, #1 2668: e1a03007 mov r3, r7 266c: e58d8000 str r8, [sp] 2670: ebfffce4 bl 1a08 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 2674: e3700001 cmn r0, #1 2678: 0a000055 beq 27d4 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 267c: e2053c0a and r3, r5, #2560 ; 0xa00 2680: e3530c0a cmp r3, #2560 ; 0xa00 2684: 03a06011 moveq r6, #17 2688: 0a000040 beq 2790 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 268c: e59d300c ldr r3, [sp, #12] 2690: e584303c str r3, [r4, #60] ; 0x3c iop->file_info = loc.node_access; 2694: e59d3004 ldr r3, [sp, #4] iop->flags |= rtems_libio_fcntl_flags( flags ); 2698: e1a00005 mov r0, r5 * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; 269c: e5843038 str r3, [r4, #56] ; 0x38 iop->flags |= rtems_libio_fcntl_flags( flags ); 26a0: e5948014 ldr r8, [r4, #20] 26a4: eb001db7 bl 9d88 iop->pathinfo = loc; 26a8: e1a0e007 mov lr, r7 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 26ac: e1808008 orr r8, r0, r8 iop->pathinfo = loc; 26b0: e8be000f ldm lr!, {r0, r1, r2, r3} 26b4: e284c018 add ip, r4, #24 26b8: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !iop->handlers || !iop->handlers->open_h ) { 26bc: e594303c ldr r3, [r4, #60] ; 0x3c */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 26c0: e59e2000 ldr r2, [lr] if ( !iop->handlers || !iop->handlers->open_h ) { 26c4: e3530000 cmp r3, #0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 26c8: e58c2000 str r2, [ip] * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 26cc: e5848014 str r8, [r4, #20] iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 26d0: 0a00002d beq 278c 26d4: e593c000 ldr ip, [r3] 26d8: e35c0000 cmp ip, #0 26dc: 0a00002a beq 278c rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 26e0: e1a01006 mov r1, r6 26e4: e1a0300a mov r3, sl 26e8: e1a00004 mov r0, r4 26ec: e1a02005 mov r2, r5 26f0: e1a0e00f mov lr, pc 26f4: e12fff1c bx ip if ( rc ) { 26f8: e3500000 cmp r0, #0 26fc: 1a000009 bne 2728 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 2700: e3150b01 tst r5, #1024 ; 0x400 2704: 1a00000c bne 273c 2708: e59f5150 ldr r5, [pc, #336] ; 2860 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 270c: e5950000 ldr r0, [r5] 2710: e0604004 rsb r4, r0, r4 2714: e1a00344 asr r0, r4, #6 } 2718: e28dd01c add sp, sp, #28 271c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 2720: e28dd00c add sp, sp, #12 2724: e12fff1e bx lr goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 2728: eb002884 bl c940 <__errno> 272c: e5906000 ldr r6, [r0] */ done: va_end(ap); if ( rc ) { 2730: e3560000 cmp r6, #0 2734: 0afffff3 beq 2708 2738: ea000014 b 2790 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 273c: e59f511c ldr r5, [pc, #284] ; 2860 2740: e5950000 ldr r0, [r5] 2744: e0600004 rsb r0, r0, r4 2748: e1a00340 asr r0, r0, #6 274c: e3a01000 mov r1, #0 2750: e3a02000 mov r2, #0 2754: eb001c8b bl 9988 if ( rc ) { 2758: e2506000 subs r6, r0, #0 275c: 0affffea beq 270c if(errno) rc = errno; 2760: eb002876 bl c940 <__errno> <== NOT EXECUTED 2764: e5903000 ldr r3, [r0] <== NOT EXECUTED 2768: e3530000 cmp r3, #0 <== NOT EXECUTED 276c: 1a000038 bne 2854 <== NOT EXECUTED close( iop - rtems_libio_iops ); 2770: e5950000 ldr r0, [r5] <== NOT EXECUTED 2774: e0600004 rsb r0, r0, r4 <== NOT EXECUTED 2778: e1a00340 asr r0, r0, #6 <== NOT EXECUTED 277c: e3a04000 mov r4, #0 <== NOT EXECUTED 2780: eb001c57 bl 98e4 <== NOT EXECUTED 2784: e1a07004 mov r7, r4 <== NOT EXECUTED 2788: eaffffe8 b 2730 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 278c: e3a06086 mov r6, #134 ; 0x86 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 2790: e3540000 cmp r4, #0 rtems_libio_free( iop ); 2794: 11a00004 movne r0, r4 2798: 1b001d36 blne 9c78 if ( loc_to_free ) 279c: e3570000 cmp r7, #0 27a0: 0a000007 beq 27c4 rtems_filesystem_freenode( loc_to_free ); 27a4: e597300c ldr r3, [r7, #12] 27a8: e3530000 cmp r3, #0 27ac: 0a000004 beq 27c4 27b0: e593301c ldr r3, [r3, #28] 27b4: e3530000 cmp r3, #0 27b8: 11a00007 movne r0, r7 27bc: 11a0e00f movne lr, pc 27c0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 27c4: eb00285d bl c940 <__errno> 27c8: e5806000 str r6, [r0] 27cc: e3e00000 mvn r0, #0 27d0: eaffffd0 b 2718 status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 27d4: eb002859 bl c940 <__errno> 27d8: e5903000 ldr r3, [r0] 27dc: e3530002 cmp r3, #2 27e0: 0a000003 beq 27f4 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 27e4: eb002855 bl c940 <__errno> 27e8: e3a07000 mov r7, #0 27ec: e5906000 ldr r6, [r0] goto done; 27f0: eaffffce b 2730 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 27f4: e2159c02 ands r9, r5, #512 ; 0x200 27f8: 01a07009 moveq r7, r9 27fc: 01a06003 moveq r6, r3 2800: 0affffe2 beq 2790 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 2804: e1a00006 mov r0, r6 2808: e38a1902 orr r1, sl, #32768 ; 0x8000 280c: e3a02000 mov r2, #0 2810: e3a03000 mov r3, #0 2814: ebfffdaf bl 1ed8 if ( rc ) { 2818: e2509000 subs r9, r0, #0 281c: 1afffff0 bne 27e4 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 2820: e1a00006 mov r0, r6 2824: eb002c36 bl d904 2828: e1a03007 mov r3, r7 282c: e1a01000 mov r1, r0 2830: e1a02009 mov r2, r9 2834: e1a00006 mov r0, r6 2838: e58d8000 str r8, [sp] 283c: ebfffc71 bl 1a08 if ( status != 0 ) { /* The file did not exist */ 2840: e3500000 cmp r0, #0 2844: 11a07009 movne r7, r9 2848: 13a0600d movne r6, #13 284c: 1affffcf bne 2790 2850: eaffff8d b 268c */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 2854: eb002839 bl c940 <__errno> <== NOT EXECUTED 2858: e5906000 ldr r6, [r0] <== NOT EXECUTED 285c: eaffffc3 b 2770 <== NOT EXECUTED 000025a0 : int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 25a0: e3a01000 mov r1, #0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 25a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 25a8: e59f004c ldr r0, [pc, #76] ; 25fc 25ac: e1a02001 mov r2, r1 25b0: eb000014 bl 2608 25b4: e3700001 cmn r0, #1 25b8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 25bc: e59f0038 ldr r0, [pc, #56] ; 25fc 25c0: e3a01001 mov r1, #1 25c4: e3a02000 mov r2, #0 25c8: eb00000e bl 2608 25cc: e3700001 cmn r0, #1 25d0: 0a000007 beq 25f4 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 25d4: e59f0020 ldr r0, [pc, #32] ; 25fc 25d8: e3a01001 mov r1, #1 25dc: e3a02000 mov r2, #0 25e0: eb000008 bl 2608 25e4: e3700001 cmn r0, #1 25e8: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 25ec: e59f000c ldr r0, [pc, #12] ; 2600 <== NOT EXECUTED 25f0: eb000c29 bl 569c <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 25f4: e59f0008 ldr r0, [pc, #8] ; 2604 <== NOT EXECUTED 25f8: eb000c27 bl 569c <== NOT EXECUTED 00002fa8 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2fa8: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 2fac: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2fb0: e24dd004 sub sp, sp, #4 int i; if (tty->termios.c_oflag & OPOST) { 2fb4: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2fb8: e1a04001 mov r4, r1 2fbc: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 2fc0: 0a000014 beq 3018 switch (c) { 2fc4: e5dd1000 ldrb r1, [sp] 2fc8: e2412008 sub r2, r1, #8 2fcc: e3520005 cmp r2, #5 2fd0: 979ff102 ldrls pc, [pc, r2, lsl #2] 2fd4: ea000005 b 2ff0 2fd8: 00003088 .word 0x00003088 <== NOT EXECUTED 2fdc: 00003064 .word 0x00003064 <== NOT EXECUTED 2fe0: 0000309c .word 0x0000309c <== NOT EXECUTED 2fe4: 00002ff0 .word 0x00002ff0 <== NOT EXECUTED 2fe8: 00002ff0 .word 0x00002ff0 <== NOT EXECUTED 2fec: 00003030 .word 0x00003030 <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 2ff0: e3130002 tst r3, #2 2ff4: 1a000034 bne 30cc 2ff8: e59f310c ldr r3, [pc, #268] ; 310c 2ffc: e5933000 ldr r3, [r3] c = toupper(c); if (!iscntrl(c)) 3000: e0831001 add r1, r3, r1 3004: e5d13001 ldrb r3, [r1, #1] 3008: e3130020 tst r3, #32 tty->column++; 300c: 05943028 ldreq r3, [r4, #40] ; 0x28 3010: 02833001 addeq r3, r3, #1 3014: 05843028 streq r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 3018: e1a02004 mov r2, r4 301c: e1a0000d mov r0, sp 3020: e3a01001 mov r1, #1 3024: ebffff97 bl 2e88 } 3028: e28dd004 add sp, sp, #4 302c: e8bd8010 pop {r4, pc} tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 3030: e3130010 tst r3, #16 <== NOT EXECUTED 3034: 0a000002 beq 3044 <== NOT EXECUTED 3038: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 303c: e3520000 cmp r2, #0 <== NOT EXECUTED 3040: 0afffff8 beq 3028 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 3044: e2132008 ands r2, r3, #8 <== NOT EXECUTED 3048: 0a00000c beq 3080 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 304c: 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'; 3050: e3a0300a mov r3, #10 <== NOT EXECUTED 3054: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) tty->column = 0; 3058: 13a03000 movne r3, #0 <== NOT EXECUTED 305c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3060: eaffffec b 3018 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3064: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3068: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 306c: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3070: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3074: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 3078: 10812002 addne r2, r1, r2 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 307c: 0a00001c beq 30f4 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 3080: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED break; 3084: eaffffe3 b 3018 <== NOT EXECUTED case '\b': if (tty->column > 0) 3088: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 308c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3090: c2433001 subgt r3, r3, #1 <== NOT EXECUTED 3094: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3098: eaffffde b 3018 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 309c: e3130020 tst r3, #32 tty->column = 0; 30a0: 13a02000 movne r2, #0 30a4: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 30a8: e3130004 tst r3, #4 30ac: 0affffd9 beq 3018 rtems_termios_puts ("\r", 1, tty); 30b0: e59f0058 ldr r0, [pc, #88] ; 3110 30b4: e3a01001 mov r1, #1 30b8: e1a02004 mov r2, r4 30bc: ebffff71 bl 2e88 tty->column = 0; 30c0: e3a03000 mov r3, #0 30c4: e5843028 str r3, [r4, #40] ; 0x28 30c8: eaffffd2 b 3018 tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 30cc: e59f3038 ldr r3, [pc, #56] ; 310c <== NOT EXECUTED 30d0: e5933000 ldr r3, [r3] <== NOT EXECUTED 30d4: e0832001 add r2, r3, r1 <== NOT EXECUTED 30d8: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 30dc: e2022003 and r2, r2, #3 <== NOT EXECUTED 30e0: e3520002 cmp r2, #2 <== NOT EXECUTED 30e4: 02411020 subeq r1, r1, #32 <== NOT EXECUTED 30e8: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED 30ec: e5cd1000 strb r1, [sp] <== NOT EXECUTED 30f0: eaffffc2 b 3000 <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 30f4: e0812002 add r2, r1, r2 30f8: e5842028 str r2, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 30fc: e59f0010 ldr r0, [pc, #16] ; 3114 3100: e1a02004 mov r2, r4 3104: ebffff5f bl 2e88 return; 3108: eaffffc6 b 3028 0000c414 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { c414: e92d4070 push {r4, r5, r6, lr} c418: e24dd028 sub sp, sp, #40 ; 0x28 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) c41c: e28d4004 add r4, sp, #4 c420: e3a0c001 mov ip, #1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { c424: e1a05000 mov r5, r0 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) c428: e3a01003 mov r1, #3 c42c: e59f0154 ldr r0, [pc, #340] ; c588 c430: e3a02007 mov r2, #7 c434: e1a03004 mov r3, r4 c438: e58dc000 str ip, [sp] c43c: ebffd571 bl 1a08 c440: e3500000 cmp r0, #0 c444: 1a00003a bne c534 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); c448: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED c44c: e3530000 cmp r3, #0 <== NOT EXECUTED c450: 0a000004 beq c468 <== NOT EXECUTED c454: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c458: e3530000 cmp r3, #0 <== NOT EXECUTED c45c: 11a00004 movne r0, r4 <== NOT EXECUTED c460: 11a0e00f movne lr, pc <== NOT EXECUTED c464: 112fff13 bxne r3 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); c468: e59f311c ldr r3, [pc, #284] ; c58c c46c: e28d4018 add r4, sp, #24 c470: e8930007 ldm r3, {r0, r1, r2} c474: e1a0c004 mov ip, r4 c478: e8ac0003 stmia ip!, {r0, r1} sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); c47c: e59f310c ldr r3, [pc, #268] ; c590 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); c480: e1a0100c mov r1, ip sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); c484: e1d3c0b0 ldrh ip, [r3] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); c488: e1c120b0 strh r2, [r1] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); c48c: e1a0200c mov r2, ip c490: e28cc001 add ip, ip, #1 c494: e59f10f8 ldr r1, [pc, #248] ; c594 c498: e1c3c0b0 strh ip, [r3] c49c: e284000a add r0, r4, #10 c4a0: eb0003da bl d410 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { c4a4: e1a00004 mov r0, r4 c4a8: e3a01d06 mov r1, #384 ; 0x180 c4ac: eb00004b bl c5e0 c4b0: e2506000 subs r6, r0, #0 c4b4: 1a00001c bne c52c return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); c4b8: e1a00004 mov r0, r4 c4bc: e3a01901 mov r1, #16384 ; 0x4000 c4c0: ebffd850 bl 2608 if (filsdes[0] < 0) { c4c4: e3500000 cmp r0, #0 return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); c4c8: e5850000 str r0, [r5] if (filsdes[0] < 0) { c4cc: ba000023 blt c560 the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); c4d0: e59f30c0 ldr r3, [pc, #192] ; c598 <== NOT EXECUTED c4d4: e5933000 ldr r3, [r3] <== NOT EXECUTED c4d8: e1500003 cmp r0, r3 <== NOT EXECUTED c4dc: 359f30b8 ldrcc r3, [pc, #184] ; c59c <== NOT EXECUTED c4e0: 35936000 ldrcc r6, [r3] <== NOT EXECUTED c4e4: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; c4e8: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED c4ec: e3c33001 bic r3, r3, #1 <== NOT EXECUTED c4f0: e5863014 str r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); c4f4: e1a00004 mov r0, r4 <== NOT EXECUTED c4f8: e3a01001 mov r1, #1 <== NOT EXECUTED c4fc: ebffd841 bl 2608 <== NOT EXECUTED if (filsdes[1] < 0) { c500: e3500000 cmp r0, #0 <== NOT EXECUTED else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); c504: e5850004 str r0, [r5, #4] <== NOT EXECUTED if (filsdes[1] < 0) { c508: a3a06000 movge r6, #0 <== NOT EXECUTED c50c: ba000018 blt c574 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); c510: e1a00004 mov r0, r4 <== NOT EXECUTED c514: eb000035 bl c5f0 <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); c518: eb000108 bl c940 <__errno> c51c: e5806000 str r6, [r0] } c520: e3e00000 mvn r0, #0 c524: e28dd028 add sp, sp, #40 ; 0x28 c528: e8bd8070 pop {r4, r5, r6, pc} memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ c52c: eb000103 bl c940 <__errno> <== NOT EXECUTED c530: eafffffa b c520 <== NOT EXECUTED rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) c534: eb000101 bl c940 <__errno> c538: e5903000 ldr r3, [r0] c53c: e3530002 cmp r3, #2 c540: 1afffff6 bne c520 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) c544: e3a01fff mov r1, #1020 ; 0x3fc c548: e2811003 add r1, r1, #3 c54c: e59f0034 ldr r0, [pc, #52] ; c588 c550: ebffd65c bl 1ec8 c554: e3500000 cmp r0, #0 c558: 0affffc2 beq c468 c55c: eaffffef b c520 <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; c560: eb0000f6 bl c940 <__errno> c564: e5906000 ldr r6, [r0] /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); c568: e1a00004 mov r0, r4 c56c: eb00001f bl c5f0 c570: eaffffe8 b c518 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; c574: eb0000f1 bl c940 <__errno> <== NOT EXECUTED c578: e5906000 ldr r6, [r0] <== NOT EXECUTED close(filsdes[0]); c57c: e5950000 ldr r0, [r5] <== NOT EXECUTED c580: ebfff4d7 bl 98e4 <== NOT EXECUTED c584: eaffffe1 b c510 <== NOT EXECUTED 0000b088 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { b088: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED b08c: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED b090: e283313d add r3, r3, #1073741839 ; 0x4000000f <== NOT EXECUTED b094: e1510003 cmp r1, r3 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { b098: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED b09c: e1a05000 mov r5, r0 <== NOT EXECUTED b0a0: e1a04002 mov r4, r2 <== NOT EXECUTED if (cmd == FIONREAD) { b0a4: 13e00015 mvnne r0, #21 <== NOT EXECUTED b0a8: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED if (buffer == NULL) b0ac: e3520000 cmp r2, #0 <== NOT EXECUTED b0b0: 03e0000d mvneq r0, #13 <== NOT EXECUTED b0b4: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) b0b8: e3a01000 mov r1, #0 <== NOT EXECUTED b0bc: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b0c0: e1a02001 mov r2, r1 <== NOT EXECUTED b0c4: ebffe7d5 bl 5020 <== NOT EXECUTED b0c8: e2506000 subs r6, r0, #0 <== NOT EXECUTED b0cc: 13e00003 mvnne r0, #3 <== NOT EXECUTED b0d0: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; b0d4: e595300c ldr r3, [r5, #12] <== NOT EXECUTED PIPE_UNLOCK(pipe); b0d8: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; b0dc: e5843000 str r3, [r4] <== NOT EXECUTED PIPE_UNLOCK(pipe); b0e0: ebffe816 bl 5140 <== NOT EXECUTED b0e4: e1a00006 mov r0, r6 <== NOT EXECUTED return 0; } return -EINVAL; } b0e8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 0000b010 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } b010: e3e0001c mvn r0, #28 <== NOT EXECUTED b014: e12fff1e bx lr <== NOT EXECUTED 0000b2ec : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b2ec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED b2f0: e1a09001 mov r9, r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b2f4: e3a01000 mov r1, #0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b2f8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED b2fc: e1a04000 mov r4, r0 <== NOT EXECUTED b300: e1a05002 mov r5, r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b304: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED b308: e1a02001 mov r2, r1 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b30c: e1a08003 mov r8, r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b310: ebffe742 bl 5020 <== NOT EXECUTED b314: e250a000 subs sl, r0, #0 <== NOT EXECUTED b318: 13e07003 mvnne r7, #3 <== NOT EXECUTED b31c: 1a000027 bne b3c0 <== NOT EXECUTED return -EINTR; while (read < count) { b320: e3550000 cmp r5, #0 <== NOT EXECUTED b324: 01a07005 moveq r7, r5 <== NOT EXECUTED b328: 01a06007 moveq r6, r7 <== NOT EXECUTED b32c: 0a00001f beq b3b0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) b330: e1a0700a mov r7, sl <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); b334: e28db004 add fp, sp, #4 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { b338: e594200c ldr r2, [r4, #12] <== NOT EXECUTED b33c: e3520000 cmp r2, #0 <== NOT EXECUTED b340: 1a000021 bne b3cc <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) b344: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED b348: e3530000 cmp r3, #0 <== NOT EXECUTED b34c: 0a00003d beq b448 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { b350: e5986014 ldr r6, [r8, #20] <== NOT EXECUTED b354: e2166001 ands r6, r6, #1 <== NOT EXECUTED b358: 1a00003c bne b450 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; b35c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED b360: e2833001 add r3, r3, #1 <== NOT EXECUTED b364: e5843018 str r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); b368: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b36c: ebffe773 bl 5140 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) b370: e1a01006 mov r1, r6 <== NOT EXECUTED b374: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED b378: eb0002ba bl be68 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { b37c: e1a01006 mov r1, r6 <== NOT EXECUTED b380: e1a02001 mov r2, r1 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) b384: e2506000 subs r6, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { b388: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) b38c: 13e06003 mvnne r6, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { b390: ebffe722 bl 5020 <== NOT EXECUTED b394: e3500000 cmp r0, #0 <== NOT EXECUTED b398: 1a00002e bne b458 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; b39c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED if (ret != 0) b3a0: e3560000 cmp r6, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; b3a4: e2433001 sub r3, r3, #1 <== NOT EXECUTED b3a8: e5843018 str r3, [r4, #24] <== NOT EXECUTED if (ret != 0) b3ac: 0affffe1 beq b338 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); b3b0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b3b4: ebffe761 bl 5140 <== NOT EXECUTED out_nolock: if (read > 0) b3b8: e3570000 cmp r7, #0 <== NOT EXECUTED b3bc: d1a07006 movle r7, r6 <== NOT EXECUTED return read; return ret; } b3c0: e1a00007 mov r0, r7 <== NOT EXECUTED b3c4: e28dd008 add sp, sp, #8 <== NOT EXECUTED b3c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; b3cc: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED b3d0: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); b3d4: e06a6005 rsb r6, sl, r5 <== NOT EXECUTED b3d8: e1520006 cmp r2, r6 <== NOT EXECUTED b3dc: 31a06002 movcc r6, r2 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; b3e0: e0613003 rsb r3, r1, r3 <== NOT EXECUTED if (chunk > chunk1) { b3e4: e1560003 cmp r6, r3 <== NOT EXECUTED b3e8: ca00001c bgt b460 <== NOT EXECUTED 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); b3ec: e5943000 ldr r3, [r4] <== NOT EXECUTED b3f0: e089000a add r0, r9, sl <== NOT EXECUTED b3f4: e0831001 add r1, r3, r1 <== NOT EXECUTED b3f8: e1a02006 mov r2, r6 <== NOT EXECUTED b3fc: eb00075d bl d178 <== NOT EXECUTED pipe->Start += chunk; b400: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED b404: e0860000 add r0, r6, r0 <== NOT EXECUTED b408: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; b40c: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED b410: eb002b11 bl 1605c <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; b414: e594300c ldr r3, [r4, #12] <== NOT EXECUTED b418: e0663003 rsb r3, r6, r3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) b41c: e3530000 cmp r3, #0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; b420: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Length -= chunk; b424: e584300c str r3, [r4, #12] <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; b428: 05843008 streq r3, [r4, #8] <== NOT EXECUTED if (pipe->waitingWriters > 0) b42c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED b430: e3530000 cmp r3, #0 <== NOT EXECUTED b434: 1a000016 bne b494 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; b438: e0877006 add r7, r7, r6 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { b43c: e1570005 cmp r7, r5 <== NOT EXECUTED b440: e1a0a007 mov sl, r7 <== NOT EXECUTED b444: 3affffbb bcc b338 <== NOT EXECUTED b448: e3a06000 mov r6, #0 <== NOT EXECUTED b44c: eaffffd7 b b3b0 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { b450: e3e0600a mvn r6, #10 <== NOT EXECUTED b454: eaffffd5 b b3b0 <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { b458: e3e06003 mvn r6, #3 <== NOT EXECUTED b45c: eaffffd5 b b3b8 <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); b460: e5942000 ldr r2, [r4] <== NOT EXECUTED b464: e089000a add r0, r9, sl <== NOT EXECUTED b468: e0821001 add r1, r2, r1 <== NOT EXECUTED b46c: e1a02003 mov r2, r3 <== NOT EXECUTED b470: e58d3000 str r3, [sp] <== NOT EXECUTED b474: eb00073f bl d178 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); b478: e59d3000 ldr r3, [sp] <== NOT EXECUTED b47c: e08a0003 add r0, sl, r3 <== NOT EXECUTED b480: e0890000 add r0, r9, r0 <== NOT EXECUTED b484: e0632006 rsb r2, r3, r6 <== NOT EXECUTED b488: e5941000 ldr r1, [r4] <== NOT EXECUTED b48c: eb000739 bl d178 <== NOT EXECUTED b490: eaffffda b b400 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); b494: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b498: e1a0100b mov r1, fp <== NOT EXECUTED b49c: eb000258 bl be04 <== NOT EXECUTED b4a0: eaffffe4 b b438 <== NOT EXECUTED 0000b4a4 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { b4a4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED pipe_control_t *pipe = *pipep; b4a8: e5904000 ldr r4, [r0] <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { b4ac: e1a05001 mov r5, r1 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, b4b0: e3a01000 mov r1, #0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { b4b4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED b4b8: e1a07000 mov r7, r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, b4bc: e1a02001 mov r2, r1 <== NOT EXECUTED b4c0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b4c4: ebffe6d5 bl 5020 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) b4c8: e3500000 cmp r0, #0 <== NOT EXECUTED b4cc: 1a000038 bne b5b4 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); b4d0: e5956014 ldr r6, [r5, #20] <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) b4d4: e3160002 tst r6, #2 <== NOT EXECUTED pipe->Readers --; b4d8: 15943010 ldrne r3, [r4, #16] <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); b4dc: e2066006 and r6, r6, #6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; b4e0: 12433001 subne r3, r3, #1 <== NOT EXECUTED b4e4: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) b4e8: e3160004 tst r6, #4 <== NOT EXECUTED pipe->Writers --; b4ec: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, b4f0: e59f50c0 ldr r5, [pc, #192] ; b5b8 <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; b4f4: 12433001 subne r3, r3, #1 <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, b4f8: e3a01000 mov r1, #0 <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; b4fc: 15843014 strne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, b500: e5950000 ldr r0, [r5] <== NOT EXECUTED b504: e1a02001 mov r2, r1 <== NOT EXECUTED b508: ebffe6c4 bl 5020 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) b50c: e3500000 cmp r0, #0 <== NOT EXECUTED b510: 1a000027 bne b5b4 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); b514: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b518: ebffe708 bl 5140 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { b51c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b520: e3530000 cmp r3, #0 <== NOT EXECUTED b524: 0a00000d beq b560 <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) b528: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED b52c: e2723001 rsbs r3, r2, #1 <== NOT EXECUTED b530: 33a03000 movcc r3, #0 <== NOT EXECUTED b534: e3560002 cmp r6, #2 <== NOT EXECUTED b538: 03a03000 moveq r3, #0 <== NOT EXECUTED b53c: e3530000 cmp r3, #0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b540: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED b544: 11a0100d movne r1, sp <== NOT EXECUTED b548: 1b00022d blne be04 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); b54c: e5950000 ldr r0, [r5] <== NOT EXECUTED b550: ebffe6fa bl 5140 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } b554: e3a00000 mov r0, #0 <== NOT EXECUTED b558: e28dd004 add sp, sp, #4 <== NOT EXECUTED b55c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { b560: e5948014 ldr r8, [r4, #20] <== NOT EXECUTED b564: e3580000 cmp r8, #0 <== NOT EXECUTED b568: 0a000005 beq b584 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) b56c: e3560004 cmp r6, #4 <== NOT EXECUTED b570: 0afffff5 beq b54c <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); b574: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b578: e1a0100d mov r1, sp <== NOT EXECUTED b57c: eb000220 bl be04 <== NOT EXECUTED b580: eafffff1 b b54c <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); b584: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED b588: eb000203 bl bd9c <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); b58c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b590: eb000201 bl bd9c <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); b594: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b598: ebffe677 bl 4f7c <== NOT EXECUTED free(pipe->Buffer); b59c: e5940000 ldr r0, [r4] <== NOT EXECUTED b5a0: ebffd94e bl 1ae0 <== NOT EXECUTED free(pipe); b5a4: e1a00004 mov r0, r4 <== NOT EXECUTED b5a8: ebffd94c bl 1ae0 <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; b5ac: e5878000 str r8, [r7] <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { b5b0: eaffffe5 b b54c <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); b5b4: ebffe838 bl 569c <== NOT EXECUTED 0000b0ec : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { b0ec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) b0f0: e2524000 subs r4, r2, #0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { b0f4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED b0f8: e1a05000 mov r5, r0 <== NOT EXECUTED b0fc: e1a06001 mov r6, r1 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) b100: 01a07004 moveq r7, r4 <== NOT EXECUTED b104: 1a000002 bne b114 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } b108: e1a00007 mov r0, r7 <== NOT EXECUTED b10c: e28dd008 add sp, sp, #8 <== NOT EXECUTED b110: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) b114: e3a01000 mov r1, #0 <== NOT EXECUTED b118: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED b11c: e1a02001 mov r2, r1 <== NOT EXECUTED b120: e58d3000 str r3, [sp] <== NOT EXECUTED b124: ebffe7bd bl 5020 <== NOT EXECUTED b128: e2509000 subs r9, r0, #0 <== NOT EXECUTED b12c: e59d3000 ldr r3, [sp] <== NOT EXECUTED b130: 13e07003 mvnne r7, #3 <== NOT EXECUTED b134: 1afffff3 bne b108 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { b138: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED b13c: e3570000 cmp r7, #0 <== NOT EXECUTED b140: 0a00004f beq b284 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; b144: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED b148: e1540008 cmp r4, r8 <== NOT EXECUTED b14c: 91a0a004 movls sl, r4 <== NOT EXECUTED b150: 83a0a001 movhi sl, #1 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { b154: e1a07009 mov r7, r9 <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); b158: e28db004 add fp, sp, #4 <== NOT EXECUTED /* 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) { b15c: e595100c ldr r1, [r5, #12] <== NOT EXECUTED b160: e0612008 rsb r2, r1, r8 <== NOT EXECUTED b164: e152000a cmp r2, sl <== NOT EXECUTED b168: 2a000021 bcs b1f4 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { b16c: e5938014 ldr r8, [r3, #20] <== NOT EXECUTED b170: e2188001 ands r8, r8, #1 <== NOT EXECUTED b174: 1a00004a bne b2a4 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; b178: e595201c ldr r2, [r5, #28] <== NOT EXECUTED b17c: e2822001 add r2, r2, #1 <== NOT EXECUTED b180: e585201c str r2, [r5, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); b184: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b188: e58d3000 str r3, [sp] <== NOT EXECUTED b18c: ebffe7eb bl 5140 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) b190: e1a01008 mov r1, r8 <== NOT EXECUTED b194: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b198: eb000332 bl be68 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { b19c: e1a01008 mov r1, r8 <== NOT EXECUTED b1a0: e1a02001 mov r2, r1 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) b1a4: e2508000 subs r8, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { b1a8: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) b1ac: 13e08003 mvnne r8, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { b1b0: ebffe79a bl 5020 <== NOT EXECUTED b1b4: e3500000 cmp r0, #0 <== NOT EXECUTED b1b8: e59d3000 ldr r3, [sp] <== NOT EXECUTED b1bc: 1a000036 bne b29c <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; b1c0: e595201c ldr r2, [r5, #28] <== NOT EXECUTED if (ret != 0) b1c4: e3580000 cmp r8, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; b1c8: e2422001 sub r2, r2, #1 <== NOT EXECUTED b1cc: e585201c str r2, [r5, #28] <== NOT EXECUTED if (ret != 0) b1d0: 1a00002c bne b288 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { b1d4: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED b1d8: e3520000 cmp r2, #0 <== NOT EXECUTED b1dc: 0a000028 beq b284 <== NOT EXECUTED b1e0: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED /* 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) { b1e4: e595100c ldr r1, [r5, #12] <== NOT EXECUTED b1e8: e0612008 rsb r2, r1, r8 <== NOT EXECUTED b1ec: e152000a cmp r2, sl <== NOT EXECUTED b1f0: 3affffdd bcc b16c <== NOT EXECUTED goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); b1f4: e5950008 ldr r0, [r5, #8] <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); b1f8: e069a004 rsb sl, r9, r4 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); b1fc: e0810000 add r0, r1, r0 <== NOT EXECUTED b200: e1a01008 mov r1, r8 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); b204: e152000a cmp r2, sl <== NOT EXECUTED b208: 31a0a002 movcc sl, r2 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); b20c: e58d3000 str r3, [sp] <== NOT EXECUTED b210: eb002b91 bl 1605c <__umodsi3> <== NOT EXECUTED b214: e0608008 rsb r8, r0, r8 <== NOT EXECUTED if (chunk > chunk1) { b218: e15a0008 cmp sl, r8 <== NOT EXECUTED b21c: e59d3000 ldr r3, [sp] <== NOT EXECUTED b220: da000021 ble b2ac <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); b224: e5952000 ldr r2, [r5] <== NOT EXECUTED b228: e0861009 add r1, r6, r9 <== NOT EXECUTED b22c: e0820000 add r0, r2, r0 <== NOT EXECUTED b230: e1a02008 mov r2, r8 <== NOT EXECUTED b234: eb0007cf bl d178 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); b238: e0881009 add r1, r8, r9 <== NOT EXECUTED b23c: e0861001 add r1, r6, r1 <== NOT EXECUTED b240: e068200a rsb r2, r8, sl <== NOT EXECUTED b244: e5950000 ldr r0, [r5] <== NOT EXECUTED b248: eb0007ca bl d178 <== NOT EXECUTED b24c: e59d3000 ldr r3, [sp] <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; b250: e595200c ldr r2, [r5, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) b254: e5951018 ldr r1, [r5, #24] <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; b258: e082200a add r2, r2, sl <== NOT EXECUTED if (pipe->waitingReaders > 0) b25c: e3510000 cmp r1, #0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; b260: e585200c str r2, [r5, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) b264: 1a000018 bne b2cc <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; b268: e087700a add r7, r7, sl <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { b26c: e1540007 cmp r4, r7 <== NOT EXECUTED b270: e1a09007 mov r9, r7 <== NOT EXECUTED b274: 9a00001a bls b2e4 <== NOT EXECUTED b278: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED b27c: e3a0a001 mov sl, #1 <== NOT EXECUTED b280: eaffffb5 b b15c <== NOT EXECUTED b284: e3e0801f mvn r8, #31 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); b288: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b28c: ebffe7ab bl 5140 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) b290: e3570000 cmp r7, #0 <== NOT EXECUTED b294: d1a07008 movle r7, r8 <== NOT EXECUTED b298: eaffff9a b b108 <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { b29c: e3e08003 mvn r8, #3 <== NOT EXECUTED b2a0: eafffffa b b290 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { b2a4: e3e0800a mvn r8, #10 <== NOT EXECUTED b2a8: eafffff6 b b288 <== NOT EXECUTED if (chunk > chunk1) { 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); b2ac: e5952000 ldr r2, [r5] <== NOT EXECUTED b2b0: e0861009 add r1, r6, r9 <== NOT EXECUTED b2b4: e0820000 add r0, r2, r0 <== NOT EXECUTED b2b8: e1a0200a mov r2, sl <== NOT EXECUTED b2bc: e58d3000 str r3, [sp] <== NOT EXECUTED b2c0: eb0007ac bl d178 <== NOT EXECUTED b2c4: e59d3000 ldr r3, [sp] <== NOT EXECUTED b2c8: eaffffe0 b b250 <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); b2cc: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b2d0: e1a0100b mov r1, fp <== NOT EXECUTED b2d4: e58d3000 str r3, [sp] <== NOT EXECUTED b2d8: eb0002c9 bl be04 <== NOT EXECUTED b2dc: e59d3000 ldr r3, [sp] <== NOT EXECUTED b2e0: eaffffe0 b b268 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { b2e4: e3a08000 mov r8, #0 <== NOT EXECUTED b2e8: eaffffe6 b b288 <== NOT EXECUTED 00017a48 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17a48: e59f30bc ldr r3, [pc, #188] ; 17b0c 17a4c: e5933000 ldr r3, [r3] 17a50: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 17a54: e92d4810 push {r4, fp, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17a58: 2a00001c bcs 17ad0 iop = rtems_libio_iop( fd ); 17a5c: e59f40ac ldr r4, [pc, #172] ; 17b10 17a60: e5944000 ldr r4, [r4] 17a64: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 17a68: e5940014 ldr r0, [r4, #20] 17a6c: e3100c01 tst r0, #256 ; 0x100 17a70: 0a000016 beq 17ad0 rtems_libio_check_buffer( buffer ); 17a74: e3510000 cmp r1, #0 17a78: 0a000019 beq 17ae4 rtems_libio_check_count( count ); 17a7c: e3520000 cmp r2, #0 17a80: 01a00002 moveq r0, r2 17a84: 08bd8810 popeq {r4, fp, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 17a88: e3100002 tst r0, #2 17a8c: 0a000014 beq 17ae4 /* * Now process the read(). */ if ( !iop->handlers->read_h ) 17a90: e594303c ldr r3, [r4, #60] ; 0x3c 17a94: e5933008 ldr r3, [r3, #8] 17a98: e3530000 cmp r3, #0 17a9c: 0a000015 beq 17af8 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 17aa0: e1a00004 mov r0, r4 17aa4: e1a0e00f mov lr, pc 17aa8: e12fff13 bx r3 if ( rc > 0 ) 17aac: e3500000 cmp r0, #0 17ab0: d8bd8810 pople {r4, fp, pc} iop->offset += rc; 17ab4: e284c00c add ip, r4, #12 17ab8: e89c1800 ldm ip, {fp, ip} 17abc: e09b2000 adds r2, fp, r0 17ac0: e0ac3fc0 adc r3, ip, r0, asr #31 17ac4: e584200c str r2, [r4, #12] 17ac8: e5843010 str r3, [r4, #16] return rc; } 17acc: e8bd8810 pop {r4, fp, pc} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 17ad0: ebffd39a bl c940 <__errno> 17ad4: e3a03009 mov r3, #9 17ad8: e5803000 str r3, [r0] 17adc: e3e00000 mvn r0, #0 17ae0: e8bd8810 pop {r4, fp, pc} rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 17ae4: ebffd395 bl c940 <__errno> <== NOT EXECUTED 17ae8: e3a03016 mov r3, #22 <== NOT EXECUTED 17aec: e5803000 str r3, [r0] <== NOT EXECUTED 17af0: e3e00000 mvn r0, #0 <== NOT EXECUTED 17af4: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 17af8: ebffd390 bl c940 <__errno> <== NOT EXECUTED 17afc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17b00: e5803000 str r3, [r0] <== NOT EXECUTED 17b04: e3e00000 mvn r0, #0 <== NOT EXECUTED 17b08: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 00005370 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 5370: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 5374: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 5378: e24dd018 sub sp, sp, #24 537c: e1a05002 mov r5, r2 5380: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if (!buf) 5384: 0a000032 beq 5454 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 5388: eb0036b4 bl 12e60 538c: e28d4004 add r4, sp, #4 5390: e3a0c000 mov ip, #0 5394: e1a01000 mov r1, r0 5398: e1a0200c mov r2, ip 539c: e1a00007 mov r0, r7 53a0: e1a03004 mov r3, r4 53a4: e58dc000 str ip, [sp] 53a8: ebfffb51 bl 40f4 0, &loc, false ); if ( result != 0 ) 53ac: e3500000 cmp r0, #0 53b0: 1a000025 bne 544c return -1; if ( !loc.ops->node_type_h ){ 53b4: e59d2010 ldr r2, [sp, #16] 53b8: e5923010 ldr r3, [r2, #16] 53bc: e3530000 cmp r3, #0 53c0: 0a000019 beq 542c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 53c4: e1a00004 mov r0, r4 53c8: e1a0e00f mov lr, pc 53cc: e12fff13 bx r3 53d0: e3500004 cmp r0, #4 53d4: 1a000023 bne 5468 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 53d8: e59d2010 ldr r2, [sp, #16] 53dc: e592303c ldr r3, [r2, #60] ; 0x3c 53e0: e3530000 cmp r3, #0 53e4: 0a00002c beq 549c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 53e8: e1a02005 mov r2, r5 53ec: e1a01006 mov r1, r6 53f0: e1a00004 mov r0, r4 53f4: e1a0e00f mov lr, pc 53f8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 53fc: e59d3010 ldr r3, [sp, #16] 5400: e3530000 cmp r3, #0 if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 5404: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 5408: 0a000004 beq 5420 540c: e593301c ldr r3, [r3, #28] 5410: e3530000 cmp r3, #0 5414: 11a00004 movne r0, r4 5418: 11a0e00f movne lr, pc 541c: 112fff13 bxne r3 return result; } 5420: e1a00005 mov r0, r5 5424: e28dd018 add sp, sp, #24 5428: e8bd80f0 pop {r4, r5, r6, r7, pc} 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 542c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 5430: e3530000 cmp r3, #0 <== NOT EXECUTED 5434: 11a00004 movne r0, r4 <== NOT EXECUTED 5438: 11a0e00f movne lr, pc <== NOT EXECUTED 543c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 5440: eb002f47 bl 11164 <__errno> <== NOT EXECUTED 5444: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5448: e5803000 str r3, [r0] <== NOT EXECUTED 544c: e3e05000 mvn r5, #0 <== NOT EXECUTED 5450: eafffff2 b 5420 <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 5454: eb002f42 bl 11164 <__errno> <== NOT EXECUTED 5458: e3a0300e mov r3, #14 <== NOT EXECUTED 545c: e5803000 str r3, [r0] <== NOT EXECUTED 5460: e3e05000 mvn r5, #0 <== NOT EXECUTED 5464: eaffffed b 5420 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 5468: e59d3010 ldr r3, [sp, #16] 546c: e3530000 cmp r3, #0 5470: 0a000004 beq 5488 5474: e593301c ldr r3, [r3, #28] 5478: e3530000 cmp r3, #0 547c: 11a00004 movne r0, r4 5480: 11a0e00f movne lr, pc 5484: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 5488: eb002f35 bl 11164 <__errno> 548c: e3a03016 mov r3, #22 5490: e5803000 str r3, [r0] 5494: e3e05000 mvn r5, #0 5498: eaffffe0 b 5420 } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 549c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 54a0: e3530000 cmp r3, #0 <== NOT EXECUTED 54a4: 11a00004 movne r0, r4 <== NOT EXECUTED 54a8: 11a0e00f movne lr, pc <== NOT EXECUTED 54ac: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 54b0: eb002f2b bl 11164 <__errno> <== NOT EXECUTED 54b4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 54b8: e5803000 str r3, [r0] <== NOT EXECUTED 54bc: e3e05000 mvn r5, #0 <== NOT EXECUTED 54c0: eaffffd6 b 5420 <== NOT EXECUTED 00003c70 : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3c70: e59f3160 ldr r3, [pc, #352] ; 3dd8 3c74: e5933000 ldr r3, [r3] 3c78: e1500003 cmp r0, r3 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 3c7c: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 3c80: e1a04002 mov r4, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3c84: 2a000049 bcs 3db0 iop = rtems_libio_iop( fd ); 3c88: e59f314c ldr r3, [pc, #332] ; 3ddc 3c8c: e5936000 ldr r6, [r3] 3c90: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 3c94: e5963014 ldr r3, [r6, #20] 3c98: e3130c01 tst r3, #256 ; 0x100 3c9c: 0a000043 beq 3db0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 3ca0: e3130002 tst r3, #2 3ca4: 0a00003b beq 3d98 /* * Argument validation on IO vector */ if ( !iov ) 3ca8: e3510000 cmp r1, #0 3cac: 0a000039 beq 3d98 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 3cb0: e3520000 cmp r2, #0 3cb4: da000037 ble 3d98 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 3cb8: e3520b01 cmp r2, #1024 ; 0x400 3cbc: ca000035 bgt 3d98 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 3cc0: e596303c ldr r3, [r6, #60] ; 0x3c 3cc4: e5933008 ldr r3, [r3, #8] 3cc8: e3530000 cmp r3, #0 3ccc: 0a00003c beq 3dc4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3cd0: e1a05001 mov r5, r1 3cd4: e3a01000 mov r1, #0 3cd8: e1a02005 mov r2, r5 3cdc: e3a07001 mov r7, #1 3ce0: e1a00001 mov r0, r1 3ce4: ea000000 b 3cec * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3ce8: e1a00008 mov r0, r8 ssize_t old; if ( !iov[v].iov_base ) 3cec: e592c000 ldr ip, [r2] 3cf0: e35c0000 cmp ip, #0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3cf4: e2811001 add r1, r1, #1 ssize_t old; if ( !iov[v].iov_base ) 3cf8: 0a000026 beq 3d98 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 3cfc: e592c004 ldr ip, [r2, #4] 3d00: e080800c add r8, r0, ip if ( total < old ) 3d04: e1580000 cmp r8, r0 3d08: ba000022 blt 3d98 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 3d0c: e35c0000 cmp ip, #0 3d10: 13a07000 movne r7, #0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3d14: e1540001 cmp r4, r1 3d18: e2822008 add r2, r2, #8 3d1c: cafffff1 bgt 3ce8 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 3d20: e3570000 cmp r7, #0 3d24: 13a08000 movne r8, #0 3d28: 1a00001e bne 3da8 3d2c: e1a08007 mov r8, r7 3d30: ea00000f b 3d74 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 3d34: 0a000006 beq 3d54 iop->offset += bytes; 3d38: e286c00c add ip, r6, #12 3d3c: e89c1800 ldm ip, {fp, ip} 3d40: e09b2000 adds r2, fp, r0 3d44: e0ac3fc0 adc r3, ip, r0, asr #31 3d48: e586200c str r2, [r6, #12] 3d4c: e5863010 str r3, [r6, #16] total += bytes; 3d50: e0888000 add r8, r8, r0 } if (bytes != iov[ v ].iov_len) 3d54: e5953004 ldr r3, [r5, #4] 3d58: e1500003 cmp r0, r3 3d5c: 1a000011 bne 3da8 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3d60: e1540007 cmp r4, r7 3d64: e2855008 add r5, r5, #8 3d68: da00000e ble 3da8 3d6c: e596303c ldr r3, [r6, #60] ; 0x3c 3d70: e5933008 ldr r3, [r3, #8] bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 3d74: e8950006 ldm r5, {r1, r2} 3d78: e1a00006 mov r0, r6 3d7c: e1a0e00f mov lr, pc 3d80: e12fff13 bx r3 if ( bytes < 0 ) 3d84: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3d88: e2877001 add r7, r7, #1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3d8c: aaffffe8 bge 3d34 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3d90: e3e08000 mvn r8, #0 <== NOT EXECUTED 3d94: ea000003 b 3da8 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 3d98: eb002cc4 bl f0b0 <__errno> 3d9c: e3a03016 mov r3, #22 3da0: e5803000 str r3, [r0] 3da4: e3e08000 mvn r8, #0 if (bytes != iov[ v ].iov_len) break; } return total; } 3da8: e1a00008 mov r0, r8 3dac: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 3db0: eb002cbe bl f0b0 <__errno> <== NOT EXECUTED 3db4: e3a03009 mov r3, #9 <== NOT EXECUTED 3db8: e5803000 str r3, [r0] <== NOT EXECUTED 3dbc: e3e08000 mvn r8, #0 <== NOT EXECUTED 3dc0: eafffff8 b 3da8 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 3dc4: eb002cb9 bl f0b0 <__errno> <== NOT EXECUTED 3dc8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3dcc: e5803000 str r3, [r0] <== NOT EXECUTED 3dd0: e3e08000 mvn r8, #0 <== NOT EXECUTED 3dd4: eafffff3 b 3da8 <== NOT EXECUTED 00017b6c : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17b6c: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17b70: e59f3118 ldr r3, [pc, #280] ; 17c90 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17b74: e59f5118 ldr r5, [pc, #280] ; 17c94 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17b78: e5932000 ldr r2, [r3] { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17b7c: e5953010 ldr r3, [r5, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17b80: e3520003 cmp r2, #3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17b84: e2833001 add r3, r3, #1 17b88: e24dd004 sub sp, sp, #4 17b8c: e5853010 str r3, [r5, #16] 17b90: e1a04000 mov r4, r0 17b94: e1a06001 mov r6, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17b98: 0a000020 beq 17c20 } /* * Continue with realloc(). */ if ( !ptr ) 17b9c: e3540000 cmp r4, #0 17ba0: 0a00001a beq 17c10 return malloc( size ); if ( !size ) { 17ba4: e3560000 cmp r6, #0 17ba8: 0a00000f beq 17bec free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 17bac: e59f70e4 ldr r7, [pc, #228] ; 17c98 17bb0: e1a01004 mov r1, r4 17bb4: e5970000 ldr r0, [r7] 17bb8: e1a0200d mov r2, sp 17bbc: eb00006b bl 17d70 <_Protected_heap_Get_block_size> 17bc0: e2508000 subs r8, r0, #0 17bc4: 0a00000c beq 17bfc #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 17bc8: e5970000 ldr r0, [r7] 17bcc: e1a01004 mov r1, r4 17bd0: e1a02006 mov r2, r6 17bd4: eb000076 bl 17db4 <_Protected_heap_Resize_block> 17bd8: e3500000 cmp r0, #0 17bdc: 0a00001b beq 17c50 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 17be0: e1a00004 mov r0, r4 17be4: e28dd004 add sp, sp, #4 17be8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 17bec: e1a00004 mov r0, r4 <== NOT EXECUTED 17bf0: ebffa7ba bl 1ae0 <== NOT EXECUTED 17bf4: e1a04006 mov r4, r6 <== NOT EXECUTED return (void *) 0; 17bf8: eafffff8 b 17be0 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 17bfc: ebffd34f bl c940 <__errno> 17c00: e3a03016 mov r3, #22 17c04: e5803000 str r3, [r0] 17c08: e1a04008 mov r4, r8 return (void *) 0; 17c0c: eafffff3 b 17be0 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 17c10: e1a00006 mov r0, r6 17c14: ebffa86c bl 1dcc 17c18: e1a04000 mov r4, r0 17c1c: eaffffef b 17be0 /* * 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) 17c20: e59f3074 ldr r3, [pc, #116] ; 17c9c 17c24: e5933000 ldr r3, [r3] 17c28: e3530000 cmp r3, #0 17c2c: 0a000001 beq 17c38 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 17c30: e3a04000 mov r4, #0 17c34: eaffffe9 b 17be0 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 17c38: e59f3060 ldr r3, [pc, #96] ; 17ca0 17c3c: e5933000 ldr r3, [r3] 17c40: e3530000 cmp r3, #0 17c44: 0affffd4 beq 17b9c } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 17c48: e3a04000 mov r4, #0 <== NOT EXECUTED 17c4c: eaffffe3 b 17be0 <== NOT EXECUTED * 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 ); 17c50: e1a00006 mov r0, r6 17c54: ebffa85c bl 1dcc MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 17c58: e5953004 ldr r3, [r5, #4] if ( !new_area ) { 17c5c: e2507000 subs r7, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 17c60: e2433001 sub r3, r3, #1 17c64: e5853004 str r3, [r5, #4] if ( !new_area ) { 17c68: 0afffff0 beq 17c30 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 17c6c: e59d2000 ldr r2, [sp] 17c70: e1a01004 mov r1, r4 17c74: e1560002 cmp r6, r2 17c78: 31a02006 movcc r2, r6 17c7c: ebffd53d bl d178 free( ptr ); 17c80: e1a00004 mov r0, r4 17c84: ebffa795 bl 1ae0 17c88: e1a04007 mov r4, r7 return new_area; 17c8c: eaffffd3 b 17be0 0000655c : #include int rmdir( const char *pathname ) { 655c: e92d40f0 push {r4, r5, r6, r7, lr} 6560: e24dd02c sub sp, sp, #44 ; 0x2c 6564: e1a05000 mov r5, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 6568: ebfff99b bl 4bdc if ( parentpathlen == 0 ) 656c: e2507000 subs r7, r0, #0 6570: 1a000080 bne 6778 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 6574: e5d53000 ldrb r3, [r5] 6578: e353002f cmp r3, #47 ; 0x2f 657c: 1353005c cmpne r3, #92 ; 0x5c 6580: 1a000049 bne 66ac 6584: e59f328c ldr r3, [pc, #652] ; 6818 6588: e593c000 ldr ip, [r3] 658c: e28cc018 add ip, ip, #24 6590: e8bc000f ldm ip!, {r0, r1, r2, r3} 6594: e28d4018 add r4, sp, #24 6598: e1a0e004 mov lr, r4 659c: e8ae000f stmia lr!, {r0, r1, r2, r3} 65a0: e59c2000 ldr r2, [ip] 65a4: e58e2000 str r2, [lr] 65a8: e3a06000 mov r6, #0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 65ac: e1a0e004 mov lr, r4 65b0: e8be000f ldm lr!, {r0, r1, r2, r3} 65b4: e28dc004 add ip, sp, #4 65b8: e8ac000f stmia ip!, {r0, r1, r2, r3} 65bc: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; 65c0: e0855007 add r5, r5, r7 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 65c4: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 65c8: e1a00005 mov r0, r5 65cc: eb003ade bl 1514c 65d0: e1a01000 mov r1, r0 65d4: e1a00005 mov r0, r5 65d8: ebfff96b bl 4b8c 65dc: e0857000 add r7, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 65e0: e1a00007 mov r0, r7 65e4: eb003ad8 bl 1514c 65e8: e28d5004 add r5, sp, #4 65ec: e3a0c000 mov ip, #0 65f0: e1a01000 mov r1, r0 65f4: e1a0200c mov r2, ip 65f8: e1a00007 mov r0, r7 65fc: e1a03005 mov r3, r5 6600: e58dc000 str ip, [sp] 6604: ebfff98e bl 4c44 0, &loc, false ); if ( result != 0 ) { 6608: e3500000 cmp r0, #0 660c: 1a00004a bne 673c /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 6610: e59d2010 ldr r2, [sp, #16] 6614: e5923010 ldr r3, [r2, #16] 6618: e3530000 cmp r3, #0 661c: 0a000079 beq 6808 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 6620: e1a00005 mov r0, r5 6624: e1a0e00f mov lr, pc 6628: e12fff13 bx r3 662c: e3500001 cmp r0, #1 6630: 1a00002a bne 66e0 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 6634: e59d300c ldr r3, [sp, #12] 6638: e5933034 ldr r3, [r3, #52] ; 0x34 663c: e3530000 cmp r3, #0 6640: 0a000058 beq 67a8 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 6644: e1a00004 mov r0, r4 6648: e1a01005 mov r1, r5 664c: e1a0e00f mov lr, pc 6650: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 6654: e59d3010 ldr r3, [sp, #16] 6658: e3530000 cmp r3, #0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 665c: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); 6660: 0a000004 beq 6678 6664: e593301c ldr r3, [r3, #28] 6668: e3530000 cmp r3, #0 666c: 11a00005 movne r0, r5 6670: 11a0e00f movne lr, pc 6674: 112fff13 bxne r3 if ( free_parentloc ) 6678: e3560000 cmp r6, #0 667c: 0a000007 beq 66a0 rtems_filesystem_freenode( &parentloc ); 6680: e59d3024 ldr r3, [sp, #36] ; 0x24 6684: e3530000 cmp r3, #0 6688: 0a000004 beq 66a0 668c: e593301c ldr r3, [r3, #28] 6690: e3530000 cmp r3, #0 6694: 11a00004 movne r0, r4 6698: 11a0e00f movne lr, pc 669c: 112fff13 bxne r3 return result; } 66a0: e1a00007 mov r0, r7 66a4: e28dd02c add sp, sp, #44 ; 0x2c 66a8: e8bd80f0 pop {r4, r5, r6, r7, pc} */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 66ac: e3530000 cmp r3, #0 <== NOT EXECUTED 66b0: 0affffb3 beq 6584 <== NOT EXECUTED 66b4: e59f315c ldr r3, [pc, #348] ; 6818 <== NOT EXECUTED 66b8: e593c000 ldr ip, [r3] <== NOT EXECUTED 66bc: e28cc004 add ip, ip, #4 <== NOT EXECUTED 66c0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 66c4: e28d4018 add r4, sp, #24 <== NOT EXECUTED 66c8: e1a0e004 mov lr, r4 <== NOT EXECUTED 66cc: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 66d0: e59c2000 ldr r2, [ip] <== NOT EXECUTED 66d4: e1a06007 mov r6, r7 <== NOT EXECUTED 66d8: e58e2000 str r2, [lr] <== NOT EXECUTED 66dc: eaffffb2 b 65ac <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 66e0: e59d3010 ldr r3, [sp, #16] 66e4: e3530000 cmp r3, #0 66e8: 0a000004 beq 6700 66ec: e593301c ldr r3, [r3, #28] 66f0: e3530000 cmp r3, #0 66f4: 11a00005 movne r0, r5 66f8: 11a0e00f movne lr, pc 66fc: 112fff13 bxne r3 if ( free_parentloc ) 6700: e3560000 cmp r6, #0 6704: 0a000007 beq 6728 rtems_filesystem_freenode( &parentloc ); 6708: e59d3024 ldr r3, [sp, #36] ; 0x24 670c: e3530000 cmp r3, #0 6710: 0a000004 beq 6728 6714: e593301c ldr r3, [r3, #28] 6718: e3530000 cmp r3, #0 671c: 11a00004 movne r0, r4 6720: 11a0e00f movne lr, pc 6724: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 6728: eb002d78 bl 11d10 <__errno> 672c: e3a03014 mov r3, #20 6730: e5803000 str r3, [r0] 6734: e3e07000 mvn r7, #0 6738: eaffffd8 b 66a0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 673c: e3560000 cmp r6, #0 6740: 1a000001 bne 674c result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 6744: e3e07000 mvn r7, #0 6748: eaffffd4 b 66a0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 674c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6750: e3530000 cmp r3, #0 <== NOT EXECUTED 6754: 0afffffa beq 6744 <== NOT EXECUTED 6758: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 675c: e3530000 cmp r3, #0 <== NOT EXECUTED 6760: 0afffff7 beq 6744 <== NOT EXECUTED 6764: e1a00004 mov r0, r4 <== NOT EXECUTED 6768: e1a0e00f mov lr, pc <== NOT EXECUTED 676c: e12fff13 bx r3 <== NOT EXECUTED 6770: e3e07000 mvn r7, #0 <== NOT EXECUTED 6774: eaffffc9 b 66a0 <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 6778: e28d4018 add r4, sp, #24 677c: e3a0c000 mov ip, #0 6780: e1a00005 mov r0, r5 6784: e1a01007 mov r1, r7 6788: e3a02002 mov r2, #2 678c: e1a03004 mov r3, r4 6790: e58dc000 str ip, [sp] 6794: ebfff966 bl 4d34 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 6798: e3500000 cmp r0, #0 679c: 1affffe8 bne 6744 67a0: e3a06001 mov r6, #1 67a4: eaffff80 b 65ac /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 67a8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 67ac: e3530000 cmp r3, #0 <== NOT EXECUTED 67b0: 0a000005 beq 67cc <== NOT EXECUTED 67b4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 67b8: e3530000 cmp r3, #0 <== NOT EXECUTED 67bc: 0a000002 beq 67cc <== NOT EXECUTED 67c0: e1a00005 mov r0, r5 <== NOT EXECUTED 67c4: e1a0e00f mov lr, pc <== NOT EXECUTED 67c8: e12fff13 bx r3 <== NOT EXECUTED if ( free_parentloc ) 67cc: e3560000 cmp r6, #0 <== NOT EXECUTED 67d0: 0a000007 beq 67f4 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 67d4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 67d8: e3530000 cmp r3, #0 <== NOT EXECUTED 67dc: 0a000004 beq 67f4 <== NOT EXECUTED 67e0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 67e4: e3530000 cmp r3, #0 <== NOT EXECUTED 67e8: 11a00004 movne r0, r4 <== NOT EXECUTED 67ec: 11a0e00f movne lr, pc <== NOT EXECUTED 67f0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 67f4: eb002d45 bl 11d10 <__errno> <== NOT EXECUTED 67f8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 67fc: e5803000 str r3, [r0] <== NOT EXECUTED 6800: e3e07000 mvn r7, #0 <== NOT EXECUTED 6804: eaffffa5 b 66a0 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 6808: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 680c: e3530000 cmp r3, #0 <== NOT EXECUTED 6810: 1affffea bne 67c0 <== NOT EXECUTED 6814: eaffffec b 67cc <== NOT EXECUTED 0001331c : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 1331c: e59f0000 ldr r0, [pc, #0] ; 13324 <== NOT EXECUTED 13320: e12fff1e bx lr <== NOT EXECUTED 00010258 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 10258: e92d4010 push {r4, lr} 1025c: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 10260: eb000006 bl 10280 if (nap) 10264: e3500000 cmp r0, #0 10268: 0a000001 beq 10274 return nap->name; return rtems_assoc_name_bad(local_value); } 1026c: e5900000 ldr r0, [r0] 10270: e8bd8010 pop {r4, pc} nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 10274: e1a00004 mov r0, r4 <== NOT EXECUTED } 10278: e8bd4010 pop {r4, lr} <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 1027c: ea000c26 b 1331c <== NOT EXECUTED 0000c8a8 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { c8a8: e92d4030 push {r4, r5, lr} c8ac: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) c8b0: e5900000 ldr r0, [r0] c8b4: e3500000 cmp r0, #0 const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { c8b8: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) c8bc: 01a04000 moveq r4, r0 c8c0: 0a000013 beq c914 c8c4: e59f105c ldr r1, [pc, #92] ; c928 c8c8: eb000345 bl d5e4 c8cc: e3500000 cmp r0, #0 c8d0: 13a02000 movne r2, #0 c8d4: 1a00000b bne c908 default_ap = ap++; for ( ; ap->name; ap++) c8d8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED c8dc: e3530000 cmp r3, #0 <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; c8e0: e284300c add r3, r4, #12 <== NOT EXECUTED for ( ; ap->name; ap++) c8e4: 0a00000a beq c914 <== NOT EXECUTED c8e8: e1a02004 mov r2, r4 <== NOT EXECUTED c8ec: e1a04003 mov r4, r3 <== NOT EXECUTED if (ap->local_value == local_value) c8f0: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED c8f4: e1530005 cmp r3, r5 <== NOT EXECUTED c8f8: 0a000005 beq c914 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) c8fc: e5b4300c ldr r3, [r4, #12]! c900: e3530000 cmp r3, #0 c904: 0a000004 beq c91c if (ap->local_value == local_value) c908: e5943004 ldr r3, [r4, #4] c90c: e1530005 cmp r3, r5 c910: 1afffff9 bne c8fc return ap; return default_ap; } c914: e1a00004 mov r0, r4 c918: e8bd8030 pop {r4, r5, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) c91c: e1a04002 mov r4, r2 if (ap->local_value == local_value) return ap; return default_ap; } c920: e1a00004 mov r0, r4 c924: e8bd8030 pop {r4, r5, pc} 0000bc54 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { bc54: e92d4030 push {r4, r5, lr} bc58: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) bc5c: e5900000 ldr r0, [r0] bc60: e3500000 cmp r0, #0 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { bc64: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) bc68: 01a04000 moveq r4, r0 bc6c: 0a000013 beq bcc0 bc70: e59f105c ldr r1, [pc, #92] ; bcd4 bc74: eb00065a bl d5e4 bc78: e3500000 cmp r0, #0 bc7c: 13a02000 movne r2, #0 bc80: 1a00000b bne bcb4 default_ap = ap++; for ( ; ap->name; ap++) bc84: e594300c ldr r3, [r4, #12] <== NOT EXECUTED bc88: e3530000 cmp r3, #0 <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; bc8c: e284300c add r3, r4, #12 <== NOT EXECUTED for ( ; ap->name; ap++) bc90: 0a00000a beq bcc0 <== NOT EXECUTED bc94: e1a02004 mov r2, r4 <== NOT EXECUTED bc98: e1a04003 mov r4, r3 <== NOT EXECUTED if (ap->remote_value == remote_value) bc9c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED bca0: e1530005 cmp r3, r5 <== NOT EXECUTED bca4: 0a000005 beq bcc0 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) bca8: e5b4300c ldr r3, [r4, #12]! bcac: e3530000 cmp r3, #0 bcb0: 0a000004 beq bcc8 if (ap->remote_value == remote_value) bcb4: e5943008 ldr r3, [r4, #8] bcb8: e1530005 cmp r3, r5 bcbc: 1afffff9 bne bca8 return ap; return default_ap; } bcc0: e1a00004 mov r0, r4 bcc4: e8bd8030 pop {r4, r5, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) bcc8: e1a04002 mov r4, r2 if (ap->remote_value == remote_value) return ap; return default_ap; } bccc: e1a00004 mov r0, r4 bcd0: e8bd8030 pop {r4, r5, pc} 0000c5cc : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { c5cc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); c5d0: eb0000b4 bl c8a8 <== NOT EXECUTED if (nap) c5d4: e3500000 cmp r0, #0 <== NOT EXECUTED return nap->remote_value; c5d8: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } c5dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 0000c5a0 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { c5a0: e92d4010 push {r4, lr} <== NOT EXECUTED c5a4: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) c5a8: e59f0018 ldr r0, [pc, #24] ; c5c8 <== NOT EXECUTED c5ac: eb000006 bl c5cc <== NOT EXECUTED c5b0: e2504000 subs r4, r0, #0 <== NOT EXECUTED c5b4: 0a000001 beq c5c0 <== NOT EXECUTED { errno = rc; c5b8: eb0000e0 bl c940 <__errno> <== NOT EXECUTED c5bc: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } c5c0: e3e00000 mvn r0, #0 <== NOT EXECUTED c5c4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00006cec : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 6cec: e92d000e push {r1, r2, r3} <== NOT EXECUTED 6cf0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 6cf4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 6cf8: e28d300c add r3, sp, #12 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 6cfc: e1a02003 mov r2, r3 <== NOT EXECUTED 6d00: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); 6d04: e58d3000 str r3, [sp] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 6d08: ebffff81 bl 6b14 <== NOT EXECUTED va_end(arglist); return chars_written; } 6d0c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 6d10: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 6d14: e28dd00c add sp, sp, #12 <== NOT EXECUTED 6d18: e12fff1e bx lr <== NOT EXECUTED 000018b0 : } int rtems_filesystem_dirname( const char *pathname ) { 18b0: e92d4010 push {r4, lr} 18b4: e1a04000 mov r4, r0 int len = strlen( pathname ); 18b8: eb003011 bl d904 while ( len ) { 18bc: e3500000 cmp r0, #0 int rtems_filesystem_dirname( const char *pathname ) { int len = strlen( pathname ); 18c0: e1a02000 mov r2, r0 while ( len ) { 18c4: 08bd8010 popeq {r4, pc} len--; 18c8: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 18cc: e7d43000 ldrb r3, [r4, r0] 18d0: e353002f cmp r3, #47 ; 0x2f 18d4: 1353005c cmpne r3, #92 ; 0x5c 18d8: 08bd8010 popeq {r4, pc} 18dc: e3530000 cmp r3, #0 18e0: 10844002 addne r4, r4, r2 18e4: 1a000008 bne 190c 18e8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 18ec: e5543002 ldrb r3, [r4, #-2] 18f0: e353002f cmp r3, #47 ; 0x2f 18f4: 1353005c cmpne r3, #92 ; 0x5c ) { int len = strlen( pathname ); while ( len ) { len--; 18f8: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 18fc: 08bd8010 popeq {r4, pc} 1900: e3530000 cmp r3, #0 1904: e2444001 sub r4, r4, #1 1908: 08bd8010 popeq {r4, pc} const char *pathname ) { int len = strlen( pathname ); while ( len ) { 190c: e3500000 cmp r0, #0 1910: 1afffff5 bne 18ec if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 1914: e8bd8010 pop {r4, pc} 00001a08 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1a08: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Verify Input parameters. */ if ( !pathname ) 1a0c: e2505000 subs r5, r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1a10: e1a07001 mov r7, r1 1a14: e1a06002 mov r6, r2 1a18: e1a0c003 mov ip, r3 1a1c: e59d8020 ldr r8, [sp, #32] /* * Verify Input parameters. */ if ( !pathname ) 1a20: 0a000029 beq 1acc rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 1a24: e3530000 cmp r3, #0 1a28: 0a000022 beq 1ab8 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 1a2c: e5d53000 ldrb r3, [r5] 1a30: e353002f cmp r3, #47 ; 0x2f 1a34: 1353005c cmpne r3, #92 ; 0x5c 1a38: 13a04000 movne r4, #0 1a3c: 03a04001 moveq r4, #1 1a40: 1a000010 bne 1a88 1a44: e59f3090 ldr r3, [pc, #144] ; 1adc 1a48: e5934000 ldr r4, [r3] 1a4c: e2844018 add r4, r4, #24 1a50: e8b4000f ldm r4!, {r0, r1, r2, r3} 1a54: e1a0900c mov r9, ip 1a58: e8a9000f stmia r9!, {r0, r1, r2, r3} 1a5c: e5942000 ldr r2, [r4] 1a60: e3a04001 mov r4, #1 1a64: e5892000 str r2, [r9] 1a68: e1a01004 mov r1, r4 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1a6c: e0850004 add r0, r5, r4 1a70: e0611007 rsb r1, r1, r7 1a74: e1a02006 mov r2, r6 1a78: e1a0300c mov r3, ip 1a7c: e58d8020 str r8, [sp, #32] pathnamelen - i, flags, pathloc, follow_link ); } 1a80: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1a84: eaffffa3 b 1918 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 1a88: e3530000 cmp r3, #0 1a8c: 0affffec beq 1a44 1a90: e59f3044 ldr r3, [pc, #68] ; 1adc 1a94: e593a000 ldr sl, [r3] 1a98: e28aa004 add sl, sl, #4 1a9c: e8ba000f ldm sl!, {r0, r1, r2, r3} 1aa0: e1a0900c mov r9, ip 1aa4: e8a9000f stmia r9!, {r0, r1, r2, r3} 1aa8: e59a2000 ldr r2, [sl] 1aac: e1a01004 mov r1, r4 1ab0: e5892000 str r2, [r9] 1ab4: eaffffec b 1a6c if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1ab8: eb002ba0 bl c940 <__errno> <== NOT EXECUTED 1abc: e3a03005 mov r3, #5 <== NOT EXECUTED 1ac0: e5803000 str r3, [r0] <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 1ac4: e3e00000 mvn r0, #0 <== NOT EXECUTED 1ac8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 1acc: eb002b9b bl c940 <__errno> <== NOT EXECUTED 1ad0: e3a0300e mov r3, #14 <== NOT EXECUTED 1ad4: e5803000 str r3, [r0] <== NOT EXECUTED 1ad8: eafffff9 b 1ac4 <== NOT EXECUTED 00001918 : /* * Verify Input parameters. */ if ( !pathname ) 1918: e3500000 cmp r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 191c: e92d4030 push {r4, r5, lr} 1920: e1a05002 mov r5, r2 1924: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 1928: 0a00002c beq 19e0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 192c: e3530000 cmp r3, #0 1930: 0a00002f beq 19f4 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 1934: e593c00c ldr ip, [r3, #12] 1938: e59cc000 ldr ip, [ip] 193c: e35c0000 cmp ip, #0 1940: 0a000021 beq 19cc rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 1944: e1a0e00f mov lr, pc 1948: e12fff1c bx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 194c: e59d200c ldr r2, [sp, #12] 1950: e2703001 rsbs r3, r0, #1 1954: 33a03000 movcc r3, #0 1958: e3520000 cmp r2, #0 195c: 03a03000 moveq r3, #0 1960: e3530000 cmp r3, #0 1964: 08bd8030 popeq {r4, r5, pc} if ( !pathloc->ops->node_type_h ){ 1968: e594200c ldr r2, [r4, #12] 196c: e5923010 ldr r3, [r2, #16] 1970: e3530000 cmp r3, #0 1974: 0a00000f beq 19b8 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1978: e1a00004 mov r0, r4 197c: e1a0e00f mov lr, pc 1980: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1984: e2400003 sub r0, r0, #3 1988: e3500001 cmp r0, #1 198c: 83a00000 movhi r0, #0 1990: 88bd8030 pophi {r4, r5, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1994: e594200c ldr r2, [r4, #12] 1998: e5923034 ldr r3, [r2, #52] ; 0x34 199c: e3530000 cmp r3, #0 19a0: 0a000004 beq 19b8 * 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 ); 19a4: e1a00004 mov r0, r4 19a8: e1a01005 mov r1, r5 19ac: e1a0e00f mov lr, pc 19b0: e12fff13 bx r3 } } return result; } 19b4: e8bd8030 pop {r4, r5, pc} if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 19b8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 19bc: e3530000 cmp r3, #0 <== NOT EXECUTED 19c0: 11a00004 movne r0, r4 <== NOT EXECUTED 19c4: 11a0e00f movne lr, pc <== NOT EXECUTED 19c8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 19cc: eb002bdb bl c940 <__errno> <== NOT EXECUTED 19d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 19d4: e5803000 str r3, [r0] <== NOT EXECUTED 19d8: e3e00000 mvn r0, #0 <== NOT EXECUTED 19dc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 19e0: eb002bd6 bl c940 <__errno> <== NOT EXECUTED 19e4: e3a0300e mov r3, #14 <== NOT EXECUTED 19e8: e5803000 str r3, [r0] <== NOT EXECUTED 19ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 19f0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 19f4: eb002bd1 bl c940 <__errno> <== NOT EXECUTED 19f8: e3a03005 mov r3, #5 <== NOT EXECUTED 19fc: e5803000 str r3, [r0] <== NOT EXECUTED 1a00: e3e00000 mvn r0, #0 <== NOT EXECUTED 1a04: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00001720 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1720: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1724: e59f6120 ldr r6, [pc, #288] ; 184c 1728: e5963000 ldr r3, [r6] 172c: e3a02012 mov r2, #18 1730: e583202c str r2, [r3, #44] ; 0x2c * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1734: e24dd01c sub sp, sp, #28 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 1738: eb000241 bl 2044 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 173c: e59f310c ldr r3, [pc, #268] ; 1850 1740: e5933000 ldr r3, [r3] 1744: e3530000 cmp r3, #0 1748: 0a000033 beq 181c rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 174c: e59f3100 ldr r3, [pc, #256] ; 1854 1750: e5930000 ldr r0, [r3] status = mount( 1754: e890100e ldm r0, {r1, r2, r3, ip} 1758: e28d0018 add r0, sp, #24 175c: e58dc000 str ip, [sp] 1760: eb00023e bl 2060 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 1764: e3700001 cmn r0, #1 1768: 0a000033 beq 183c * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 176c: e59de018 ldr lr, [sp, #24] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1770: e5967000 ldr r7, [r6] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 1774: e28ee01c add lr, lr, #28 1778: e8be000f ldm lr!, {r0, r1, r2, r3} 177c: e287c018 add ip, r7, #24 1780: e8ac000f stmia ip!, {r0, r1, r2, r3} 1784: e59e3000 ldr r3, [lr] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1788: e3a05000 mov r5, #0 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 178c: e28d4004 add r4, sp, #4 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 1790: e58c3000 str r3, [ip] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1794: e1c753b0 strh r5, [r7, #48] ; 0x30 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1798: e1a03004 mov r3, r4 179c: e3a01001 mov r1, #1 17a0: e1a02005 mov r2, r5 17a4: e59f00ac ldr r0, [pc, #172] ; 1858 rtems_filesystem_root = loc; 17a8: e1a07004 mov r7, r4 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 17ac: e58d5000 str r5, [sp] 17b0: eb000094 bl 1a08 rtems_filesystem_root = loc; 17b4: e596c000 ldr ip, [r6] 17b8: e8b7000f ldm r7!, {r0, r1, r2, r3} 17bc: e28cc018 add ip, ip, #24 17c0: e8ac000f stmia ip!, {r0, r1, r2, r3} 17c4: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 17c8: e1a02005 mov r2, r5 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 17cc: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 17d0: e3a01001 mov r1, #1 17d4: e1a03004 mov r3, r4 17d8: e59f0078 ldr r0, [pc, #120] ; 1858 17dc: e58d5000 str r5, [sp] 17e0: eb000088 bl 1a08 rtems_filesystem_current = loc; 17e4: e596c000 ldr ip, [r6] 17e8: e8b4000f ldm r4!, {r0, r1, r2, r3} 17ec: e28cc004 add ip, ip, #4 17f0: e8ac000f stmia ip!, {r0, r1, r2, r3} 17f4: 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); 17f8: e3a01f7f mov r1, #508 ; 0x1fc /* 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; 17fc: 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); 1800: e2811003 add r1, r1, #3 1804: e59f0050 ldr r0, [pc, #80] ; 185c 1808: eb0001ae bl 1ec8 if ( status != 0 ) 180c: e1500005 cmp r0, r5 1810: 1a000005 bne 182c * 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. */ } 1814: e28dd01c add sp, sp, #28 1818: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 181c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 1820: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 1824: e2800001 add r0, r0, #1 <== NOT EXECUTED 1828: eb000f9b bl 569c <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 182c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 1830: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 1834: e2800003 add r0, r0, #3 <== NOT EXECUTED 1838: eb000f97 bl 569c <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 183c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 1840: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 1844: e2800002 add r0, r0, #2 <== NOT EXECUTED 1848: eb000f93 bl 569c <== NOT EXECUTED 00008980 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 8980: e5903000 ldr r3, [r0] <== NOT EXECUTED 8984: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 8988: e1530000 cmp r3, r0 <== NOT EXECUTED 898c: 13a00000 movne r0, #0 <== NOT EXECUTED 8990: 03a00001 moveq r0, #1 <== NOT EXECUTED 8994: e12fff1e bx lr <== NOT EXECUTED 000015d4 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 15d4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 15d8: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 15dc: e1a06001 mov r6, r1 <== NOT EXECUTED 15e0: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 15e4: eb0030c6 bl d904 <== NOT EXECUTED 15e8: e28d4004 add r4, sp, #4 <== NOT EXECUTED 15ec: e1a01000 mov r1, r0 <== NOT EXECUTED 15f0: e3a02000 mov r2, #0 <== NOT EXECUTED 15f4: e1a03004 mov r3, r4 <== NOT EXECUTED 15f8: e3a0c001 mov ip, #1 <== NOT EXECUTED 15fc: e1a00005 mov r0, r5 <== NOT EXECUTED 1600: e58dc000 str ip, [sp] <== NOT EXECUTED 1604: eb0000ff bl 1a08 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 1608: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 160c: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 1610: e3530000 cmp r3, #0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 1614: e1a07000 mov r7, r0 <== NOT EXECUTED the_jnode = loc.node_access; 1618: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 161c: 0a000013 beq 1670 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 1620: e1a00004 mov r0, r4 <== NOT EXECUTED 1624: e1a0e00f mov lr, pc <== NOT EXECUTED 1628: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 162c: e3570000 cmp r7, #0 <== NOT EXECUTED 1630: 03500002 cmpeq r0, #2 <== NOT EXECUTED 1634: 03a07000 moveq r7, #0 <== NOT EXECUTED 1638: 13a07001 movne r7, #1 <== NOT EXECUTED 163c: 0a000015 beq 1698 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1640: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1644: e3530000 cmp r3, #0 <== NOT EXECUTED 1648: 0a000025 beq 16e4 <== NOT EXECUTED 164c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1650: e3530000 cmp r3, #0 <== NOT EXECUTED 1654: 0a000022 beq 16e4 <== NOT EXECUTED 1658: e1a00004 mov r0, r4 <== NOT EXECUTED 165c: e1a0e00f mov lr, pc <== NOT EXECUTED 1660: e12fff13 bx r3 <== NOT EXECUTED 1664: e3a0000d mov r0, #13 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 1668: e28dd018 add sp, sp, #24 <== NOT EXECUTED 166c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 1670: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1674: e3530000 cmp r3, #0 <== NOT EXECUTED 1678: 11a00004 movne r0, r4 <== NOT EXECUTED 167c: 11a0e00f movne lr, pc <== NOT EXECUTED 1680: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1684: eb002cad bl c940 <__errno> <== NOT EXECUTED 1688: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 168c: e5803000 str r3, [r0] <== NOT EXECUTED 1690: e3e00000 mvn r0, #0 <== NOT EXECUTED 1694: eafffff3 b 1668 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 1698: e5865000 str r5, [r6] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 169c: e1a00005 mov r0, r5 <== NOT EXECUTED 16a0: eb003097 bl d904 <== NOT EXECUTED 16a4: e5860004 str r0, [r6, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 16a8: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED 16ac: e5863008 str r3, [r6, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 16b0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 16b4: e5982054 ldr r2, [r8, #84] ; 0x54 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 16b8: e3530000 cmp r3, #0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 16bc: e586200c str r2, [r6, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 16c0: 0a000009 beq 16ec <== NOT EXECUTED 16c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 16c8: e3530000 cmp r3, #0 <== NOT EXECUTED 16cc: 0a000006 beq 16ec <== NOT EXECUTED 16d0: e1a00004 mov r0, r4 <== NOT EXECUTED 16d4: e1a0e00f mov lr, pc <== NOT EXECUTED 16d8: e12fff13 bx r3 <== NOT EXECUTED 16dc: e1a00007 mov r0, r7 <== NOT EXECUTED 16e0: eaffffe0 b 1668 <== NOT EXECUTED 16e4: e3a0000d mov r0, #13 <== NOT EXECUTED 16e8: eaffffde b 1668 <== NOT EXECUTED 16ec: e3a00000 mov r0, #0 <== NOT EXECUTED 16f0: eaffffdc b 1668 <== NOT EXECUTED 00007164 : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 7164: e59f3144 ldr r3, [pc, #324] ; 72b0 7168: e593c000 ldr ip, [r3] rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 716c: e59f3140 ldr r3, [pc, #320] ; 72b4 if ( rtems_interrupt_is_in_progress() ) 7170: e35c0000 cmp ip, #0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 7174: e92d4010 push {r4, lr} 7178: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 717c: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) 7180: 13a00012 movne r0, #18 7184: 18bd8010 popne {r4, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 7188: e3520000 cmp r2, #0 718c: 0a00003c beq 7284 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 7190: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 7194: e5820000 str r0, [r2] if ( driver_table == NULL ) 7198: 0a000039 beq 7284 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 719c: e591c000 ldr ip, [r1] 71a0: e35c0000 cmp ip, #0 71a4: 0a000033 beq 7278 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 71a8: e1500004 cmp r0, r4 71ac: 93a0000a movls r0, #10 71b0: 98bd8010 popls {r4, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 71b4: e59f00fc ldr r0, [pc, #252] ; 72b8 71b8: e590c000 ldr ip, [r0] 71bc: e28cc001 add ip, ip, #1 71c0: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 71c4: e3540000 cmp r4, #0 71c8: 1a000020 bne 7250 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 71cc: e593e000 ldr lr, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 71d0: e35e0000 cmp lr, #0 71d4: 0a00002c beq 728c 71d8: e59f30dc ldr r3, [pc, #220] ; 72bc 71dc: e593c000 ldr ip, [r3] 71e0: e1a0300c mov r3, ip 71e4: ea000003 b 71f8 71e8: e2844001 add r4, r4, #1 71ec: e15e0004 cmp lr, r4 71f0: e2833018 add r3, r3, #24 71f4: 9a000005 bls 7210 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 71f8: e5930000 ldr r0, [r3] 71fc: e3500000 cmp r0, #0 7200: 1afffff8 bne 71e8 7204: e5930004 ldr r0, [r3, #4] 7208: e3500000 cmp r0, #0 720c: 1afffff5 bne 71e8 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 7210: e15e0004 cmp lr, r4 7214: 10843084 addne r3, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 7218: e5824000 str r4, [r2] if ( m != n ) 721c: 108cc183 addne ip, ip, r3, lsl #3 7220: 0a00001a beq 7290 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 7224: e1a0e001 mov lr, r1 7228: e8be000f ldm lr!, {r0, r1, r2, r3} 722c: e8ac000f stmia ip!, {r0, r1, r2, r3} 7230: e89e0003 ldm lr, {r0, r1} 7234: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 7238: eb00067f bl 8c3c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 723c: e3a01000 mov r1, #0 7240: e1a00004 mov r0, r4 7244: e1a02001 mov r2, r1 } 7248: e8bd4010 pop {r4, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 724c: ea002160 b f7d4 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 7250: e59f3064 ldr r3, [pc, #100] ; 72bc 7254: e5933000 ldr r3, [r3] 7258: e084c084 add ip, r4, r4, lsl #1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 725c: e793018c ldr r0, [r3, ip, lsl #3] 7260: e3500000 cmp r0, #0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 7264: e083c18c add ip, r3, ip, lsl #3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 7268: 0a00000b beq 729c major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 726c: eb000672 bl 8c3c <_Thread_Enable_dispatch> 7270: e3a0000c mov r0, #12 return RTEMS_RESOURCE_IN_USE; 7274: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 7278: e591c004 ldr ip, [r1, #4] 727c: e35c0000 cmp ip, #0 7280: 1affffc8 bne 71a8 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 7284: e3a00009 mov r0, #9 } 7288: e8bd8010 pop {r4, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 728c: e5824000 str r4, [r2] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 7290: eb000669 bl 8c3c <_Thread_Enable_dispatch> 7294: e3a00005 mov r0, #5 return sc; 7298: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 729c: e59c3004 ldr r3, [ip, #4] 72a0: e3530000 cmp r3, #0 72a4: 1afffff0 bne 726c if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 72a8: e5824000 str r4, [r2] 72ac: eaffffdc b 7224 00001b84 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1b84: e92d4010 push {r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1b88: e59f40b4 ldr r4, [pc, #180] ; 1c44 1b8c: e5940000 ldr r0, [r4] 1b90: e3500000 cmp r0, #0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1b94: e24dd004 sub sp, sp, #4 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1b98: 0a000016 beq 1bf8 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1b9c: e3a01040 mov r1, #64 ; 0x40 1ba0: eb001f3d bl 989c 1ba4: e59f309c ldr r3, [pc, #156] ; 1c48 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1ba8: e3500000 cmp r0, #0 uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1bac: e5830000 str r0, [r3] 1bb0: e1a02000 mov r2, r0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1bb4: 0a000020 beq 1c3c rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1bb8: e5941000 ldr r1, [r4] rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1bbc: e59f3088 ldr r3, [pc, #136] ; 1c4c for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1bc0: e3510001 cmp r1, #1 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1bc4: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1bc8: 9a000008 bls 1bf0 1bcc: e2803040 add r3, r0, #64 ; 0x40 1bd0: e3a02001 mov r2, #1 iop->data1 = iop + 1; 1bd4: e2822001 add r2, r2, #1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1bd8: e1520001 cmp r2, r1 iop->data1 = iop + 1; 1bdc: e503300c str r3, [r3, #-12] 1be0: e2833040 add r3, r3, #64 ; 0x40 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1be4: 1afffffa bne 1bd4 1be8: e2422001 sub r2, r2, #1 1bec: e0802302 add r2, r0, r2, lsl #6 iop->data1 = iop + 1; iop->data1 = NULL; 1bf0: e3a03000 mov r3, #0 1bf4: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1bf8: e59fc050 ldr ip, [pc, #80] ; 1c50 1bfc: e59f0050 ldr r0, [pc, #80] ; 1c54 1c00: e3a01001 mov r1, #1 1c04: e3a02054 mov r2, #84 ; 0x54 1c08: e3a03000 mov r3, #0 1c0c: e58dc000 str ip, [sp] 1c10: eb000c67 bl 4db4 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1c14: e3500000 cmp r0, #0 1c18: 1a000006 bne 1c38 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 1c1c: e59f3034 ldr r3, [pc, #52] ; 1c58 1c20: e5933000 ldr r3, [r3] 1c24: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 1c28: 11a0e00f movne lr, pc 1c2c: 112fff13 bxne r3 } 1c30: e28dd004 add sp, sp, #4 1c34: e8bd8010 pop {r4, pc} RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 1c38: eb000e97 bl 569c <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1c3c: e280001a add r0, r0, #26 <== NOT EXECUTED 1c40: eb000e95 bl 569c <== NOT EXECUTED 0000349c : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 349c: e92d40f0 push {r4, r5, r6, r7, lr} rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 34a0: e3a00000 mov r0, #0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 34a4: 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); 34a8: e1a01000 mov r1, r0 34ac: e28d2018 add r2, sp, #24 34b0: eb000b26 bl 6150 if (sc != RTEMS_SUCCESSFUL) return sc; 34b4: e2505000 subs r5, r0, #0 34b8: 1a00002d bne 3574 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 34bc: e59f70f8 ldr r7, [pc, #248] ; 35bc 34c0: e59f30f8 ldr r3, [pc, #248] ; 35c0 34c4: e5974000 ldr r4, [r7] 34c8: e1540003 cmp r4, r3 34cc: 0a00002b beq 3580 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 34d0: e59f10e8 ldr r1, [pc, #232] ; 35c0 34d4: e3a02048 mov r2, #72 ; 0x48 34d8: e1a00004 mov r0, r4 34dc: eb002e4e bl ee1c rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 34e0: e59f30dc ldr r3, [pc, #220] ; 35c4 34e4: e593e000 ldr lr, [r3] } 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*/ 34e8: e59d3018 ldr r3, [sp, #24] 34ec: e1a0c004 mov ip, r4 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 34f0: e28ee01c add lr, lr, #28 } 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*/ 34f4: e48c3018 str r3, [ip], #24 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 34f8: e8be000f ldm lr!, {r0, r1, r2, r3} 34fc: e8ac000f stmia ip!, {r0, r1, r2, r3} 3500: e59e3000 ldr r3, [lr] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 3504: e3a05000 mov r5, #0 3508: e28d4004 add r4, sp, #4 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 350c: e58c3000 str r3, [ip] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 3510: e3a01001 mov r1, #1 3514: e1a03004 mov r3, r4 3518: e1a02005 mov r2, r5 351c: e59f00a4 ldr r0, [pc, #164] ; 35c8 rtems_filesystem_root = loc; 3520: e1a06004 mov r6, r4 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 3524: e58d5000 str r5, [sp] 3528: ebfffb24 bl 21c0 rtems_filesystem_root = loc; 352c: e597c000 ldr ip, [r7] 3530: e8b6000f ldm r6!, {r0, r1, r2, r3} 3534: e28cc018 add ip, ip, #24 3538: e8ac000f stmia ip!, {r0, r1, r2, r3} 353c: e5963000 ldr r3, [r6] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 3540: e3a01001 mov r1, #1 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 3544: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 3548: e1a02005 mov r2, r5 354c: e1a03004 mov r3, r4 3550: e59f0070 ldr r0, [pc, #112] ; 35c8 3554: e58d5000 str r5, [sp] 3558: ebfffb18 bl 21c0 rtems_filesystem_current = loc; 355c: e597c000 ldr ip, [r7] 3560: e8b4000f ldm r4!, {r0, r1, r2, r3} 3564: e28cc004 add ip, ip, #4 3568: e8ac000f stmia ip!, {r0, r1, r2, r3} 356c: e5963000 ldr r3, [r6] 3570: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 3574: e1a00005 mov r0, r5 3578: e28dd01c add sp, sp, #28 357c: e8bd80f0 pop {r4, r5, r6, r7, pc} sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 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)); 3580: e3a00048 mov r0, #72 ; 0x48 3584: ebfffcc9 bl 28b0 if (!tmp) 3588: e2504000 subs r4, r0, #0 358c: 03a0501a moveq r5, #26 3590: 0afffff7 beq 3574 #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 3594: e1a00005 mov r0, r5 3598: e1a01007 mov r1, r7 359c: e59f2028 ldr r2, [pc, #40] ; 35cc 35a0: eb000b3d bl 629c if (sc != RTEMS_SUCCESSFUL) { 35a4: e2505000 subs r5, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 35a8: 05874000 streq r4, [r7] #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { 35ac: 0affffc7 beq 34d0 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 35b0: e1a00004 mov r0, r4 <== NOT EXECUTED 35b4: ebfffb37 bl 2298 <== NOT EXECUTED return sc; 35b8: eaffffed b 3574 <== NOT EXECUTED 000033ec : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 33ec: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 33f0: e1a05000 mov r5, r0 <== NOT EXECUTED 33f4: e24dd008 sub sp, sp, #8 <== 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); 33f8: e3a00000 mov r0, #0 <== NOT EXECUTED 33fc: e1a01000 mov r1, r0 <== NOT EXECUTED 3400: e1a0200d mov r2, sp <== NOT EXECUTED 3404: eb000b51 bl 6150 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 3408: e2503000 subs r3, r0, #0 <== NOT EXECUTED 340c: 1a00000d bne 3448 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 3410: e59f4078 ldr r4, [pc, #120] ; 3490 <== NOT EXECUTED 3414: e5946000 ldr r6, [r4] <== NOT EXECUTED 3418: e59d3000 ldr r3, [sp] <== NOT EXECUTED 341c: e5962000 ldr r2, [r6] <== NOT EXECUTED 3420: e1520003 cmp r2, r3 <== NOT EXECUTED 3424: 0a00000a beq 3454 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 3428: e1a00005 mov r0, r5 <== NOT EXECUTED 342c: e59f105c ldr r1, [pc, #92] ; 3490 <== NOT EXECUTED 3430: e28d2004 add r2, sp, #4 <== NOT EXECUTED 3434: eb000beb bl 63e8 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 3438: e2503000 subs r3, r0, #0 <== NOT EXECUTED 343c: 0a00000b beq 3470 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 3440: e59f204c ldr r2, [pc, #76] ; 3494 <== NOT EXECUTED 3444: e5842000 str r2, [r4] <== NOT EXECUTED return sc; } 3448: e1a00003 mov r0, r3 <== NOT EXECUTED 344c: e28dd008 add sp, sp, #8 <== NOT EXECUTED 3450: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* 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); 3454: e1a01004 mov r1, r4 <== NOT EXECUTED 3458: eb000bbc bl 6350 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 345c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3460: 1afffff8 bne 3448 <== NOT EXECUTED free_user_env(tmp); 3464: e1a00006 mov r0, r6 <== NOT EXECUTED 3468: ebffffc6 bl 3388 <== NOT EXECUTED 346c: eaffffed b 3428 <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 3470: e59f1018 ldr r1, [pc, #24] ; 3490 <== NOT EXECUTED 3474: e59f201c ldr r2, [pc, #28] ; 3498 <== NOT EXECUTED 3478: eb000b87 bl 629c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 347c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3480: 1affffee bne 3440 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 3484: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 3488: e5842000 str r2, [r4] <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 348c: eaffffed b 3448 <== NOT EXECUTED 00006cb8 : void rtems_panic( const char *printf_format, ... ) { 6cb8: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 6cbc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 6cc0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); 6cc4: e28d300c add r3, sp, #12 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 6cc8: e1a02003 mov r2, r3 <== NOT EXECUTED 6ccc: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 6cd0: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 6cd4: e58d3000 str r3, [sp] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 6cd8: ebffff8d bl 6b14 <== NOT EXECUTED va_end(arglist); } 6cdc: e28dd004 add sp, sp, #4 <== NOT EXECUTED 6ce0: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 6ce4: e28dd010 add sp, sp, #16 <== NOT EXECUTED 6ce8: e12fff1e bx lr <== NOT EXECUTED 0000b018 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { b018: e52de004 push {lr} ; (str lr, [sp, #-4]!) if (!rtems_pipe_configured) b01c: e59f3054 ldr r3, [pc, #84] ; b078 b020: e5d33000 ldrb r3, [r3] b024: e3530000 cmp r3, #0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { b028: e24dd004 sub sp, sp, #4 if (!rtems_pipe_configured) b02c: 0a000003 beq b040 return; if (rtems_pipe_semaphore) b030: e59fc044 ldr ip, [pc, #68] ; b07c <== NOT EXECUTED b034: e59c3000 ldr r3, [ip] <== NOT EXECUTED b038: e3530000 cmp r3, #0 <== NOT EXECUTED b03c: 0a000001 beq b048 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } b040: e28dd004 add sp, sp, #4 b044: e8bd8000 pop {pc} if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( b048: e59f0030 ldr r0, [pc, #48] ; b080 <== NOT EXECUTED b04c: e3a01001 mov r1, #1 <== NOT EXECUTED b050: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED b054: e58dc000 str ip, [sp] <== NOT EXECUTED b058: ebffe755 bl 4db4 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) b05c: e3500000 cmp r0, #0 <== NOT EXECUTED b060: 1a000003 bne b074 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); b064: ebffe645 bl 4980 <== NOT EXECUTED rtems_pipe_no = now; b068: e59f3014 ldr r3, [pc, #20] ; b084 <== NOT EXECUTED b06c: e1c300b0 strh r0, [r3] <== NOT EXECUTED b070: eafffff2 b b040 <== NOT EXECUTED sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); b074: ebffe988 bl 569c <== NOT EXECUTED 000016b0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 16b0: e92d4830 push {r4, r5, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 16b4: e59f4078 ldr r4, [pc, #120] ; 1734 16b8: e5943000 ldr r3, [r4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 16bc: e59300c4 ldr r0, [r3, #196] ; 0xc4 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 16c0: e28db00c add fp, sp, #12 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 16c4: e15b0000 cmp fp, r0 16c8: 33a05000 movcc r5, #0 16cc: 3a000004 bcc 16e4 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 16d0: e59350c0 ldr r5, [r3, #192] ; 0xc0 16d4: e0805005 add r5, r0, r5 16d8: e15b0005 cmp fp, r5 16dc: 83a05000 movhi r5, #0 16e0: 93a05001 movls r5, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 16e4: e59f304c ldr r3, [pc, #76] ; 1738 16e8: e5933000 ldr r3, [r3] 16ec: e3530000 cmp r3, #0 16f0: 03a01001 moveq r1, #1 16f4: 0a000005 beq 1710 pattern_ok = (!memcmp( 16f8: e59f103c ldr r1, [pc, #60] ; 173c 16fc: e2800008 add r0, r0, #8 1700: e3a02010 mov r2, #16 1704: eb002ea7 bl d1a8 1708: e2701001 rsbs r1, r0, #1 170c: 33a01000 movcc r1, #0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 1710: e3550000 cmp r5, #0 1714: 0a000002 beq 1724 1718: e3510000 cmp r1, #0 171c: 13a00000 movne r0, #0 1720: 18bd8830 popne {r4, r5, fp, pc} return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 1724: e5940000 ldr r0, [r4] <== NOT EXECUTED 1728: ebffffb3 bl 15fc <== NOT EXECUTED 172c: e3a00001 mov r0, #1 <== NOT EXECUTED return true; } 1730: e8bd8830 pop {r4, r5, fp, pc} <== NOT EXECUTED 000015ec : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 15ec: e59f1004 ldr r1, [pc, #4] ; 15f8 <== NOT EXECUTED 15f0: e3a00000 mov r0, #0 <== NOT EXECUTED 15f4: eaffffe3 b 1588 <== NOT EXECUTED 00001588 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 1588: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED print_context = context; 158c: e59f4048 ldr r4, [pc, #72] ; 15dc <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 1590: e1a05001 mov r5, r1 <== NOT EXECUTED 1594: e1a06000 mov r6, r0 <== NOT EXECUTED print_context = context; print_handler = print; 1598: e5841004 str r1, [r4, #4] <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 159c: e5840008 str r0, [r4, #8] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 15a0: e59f1038 ldr r1, [pc, #56] ; 15e0 <== NOT EXECUTED 15a4: e1a0e00f mov lr, pc <== NOT EXECUTED 15a8: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 15ac: e59f1030 ldr r1, [pc, #48] ; 15e4 <== NOT EXECUTED 15b0: e1a00006 mov r0, r6 <== NOT EXECUTED 15b4: e1a0e00f mov lr, pc <== NOT EXECUTED 15b8: e12fff15 bx r5 <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 15bc: e59f0024 ldr r0, [pc, #36] ; 15e8 <== NOT EXECUTED 15c0: eb001367 bl 6364 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 15c4: e3e00000 mvn r0, #0 <== NOT EXECUTED 15c8: ebffff9d bl 1444 <== NOT EXECUTED print_context = NULL; 15cc: e3a03000 mov r3, #0 <== NOT EXECUTED print_handler = NULL; 15d0: e5843004 str r3, [r4, #4] <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 15d4: e5843008 str r3, [r4, #8] <== NOT EXECUTED print_handler = NULL; } 15d8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00001740 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 1740: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 1744: e59030c4 ldr r3, [r0, #196] ; 0xc4 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 1748: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 174c: e15b0003 cmp fp, r3 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 1750: e1a04000 mov r4, r0 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 1754: e2830008 add r0, r3, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1758: 3a000003 bcc 176c void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 175c: e59420c0 ldr r2, [r4, #192] ; 0xc0 1760: e0833002 add r3, r3, r2 1764: e15b0003 cmp fp, r3 1768: 9a000007 bls 178c /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 176c: e59f1034 ldr r1, [pc, #52] ; 17a8 <== NOT EXECUTED 1770: e3a02010 mov r2, #16 <== NOT EXECUTED 1774: eb002e8b bl d1a8 <== NOT EXECUTED 1778: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED 177c: 33a01000 movcc r1, #0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 1780: e1a00004 mov r0, r4 } } 1784: e8bd4810 pop {r4, fp, lr} pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 1788: eaffff9b b 15fc /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 178c: e59f1014 ldr r1, [pc, #20] ; 17a8 1790: e3a02010 mov r2, #16 1794: eb002e83 bl d1a8 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 1798: e3500000 cmp r0, #0 179c: 13a01000 movne r1, #0 17a0: 1afffff6 bne 1780 17a4: e8bd8810 pop {r4, fp, pc} 0000bac4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { bac4: e92d40f0 push {r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) bac8: e2515000 subs r5, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { bacc: e1a04000 mov r4, r0 bad0: e24dd004 sub sp, sp, #4 bad4: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) bad8: 03a00009 moveq r0, #9 badc: 0a000013 beq bb30 return RTEMS_INVALID_ADDRESS; errno = 0; bae0: eb00074f bl d824 <__errno> bae4: e3a03000 mov r3, #0 bae8: e5803000 str r3, [r0] *n = 0; baec: e5853000 str r3, [r5] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); baf0: e1a00004 mov r0, r4 baf4: e1a0100d mov r1, sp baf8: e3a02010 mov r2, #16 bafc: eb00144c bl 10c34 #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 ) bb00: e3560000 cmp r6, #0 *endptr = end; bb04: 159d3000 ldrne r3, [sp] bb08: 059d3000 ldreq r3, [sp] bb0c: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) bb10: e1530004 cmp r3, r4 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); bb14: e1a07000 mov r7, r0 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) bb18: 03a0000b moveq r0, #11 bb1c: 0a000003 beq bb30 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) bb20: e3770001 cmn r7, #1 bb24: 0a000003 beq bb38 if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; bb28: e5857000 str r7, [r5] bb2c: e3a00000 mov r0, #0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } bb30: e28dd004 add sp, sp, #4 bb34: e8bd80f0 pop {r4, r5, r6, r7, pc} return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) bb38: eb000739 bl d824 <__errno> <== NOT EXECUTED bb3c: e5903000 ldr r3, [r0] <== NOT EXECUTED bb40: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED bb44: 03a0000a moveq r0, #10 <== NOT EXECUTED bb48: 1afffff6 bne bb28 <== NOT EXECUTED bb4c: eafffff7 b bb30 <== NOT EXECUTED 00003ed4 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3ed4: e3500009 cmp r0, #9 3ed8: 012fff1e bxeq lr 3edc: da000013 ble 3f30 3ee0: e350000e cmp r0, #14 <== NOT EXECUTED 3ee4: 012fff1e bxeq lr <== NOT EXECUTED 3ee8: da00001b ble 3f5c <== NOT EXECUTED 3eec: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3ef0: e2833002 add r3, r3, #2 <== NOT EXECUTED 3ef4: e1500003 cmp r0, r3 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 3ef8: 03a00011 moveq r0, #17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3efc: 012fff1e bxeq lr <== NOT EXECUTED 3f00: da000028 ble 3fa8 <== NOT EXECUTED 3f04: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3f08: e2833003 add r3, r3, #3 <== NOT EXECUTED 3f0c: e1500003 cmp r0, r3 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 3f10: 03a00012 moveq r0, #18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3f14: 012fff1e bxeq lr <== NOT EXECUTED 3f18: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3f1c: e2833004 add r3, r3, #4 <== NOT EXECUTED 3f20: e1500003 cmp r0, r3 <== NOT EXECUTED 3f24: 1a00001d bne 3fa0 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 3f28: e3a00013 mov r0, #19 <== NOT EXECUTED case B460800: baud_index = 19; break; 3f2c: e12fff1e bx lr <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3f30: e3500004 cmp r0, #4 3f34: 012fff1e bxeq lr 3f38: ca000010 bgt 3f80 3f3c: e3500001 cmp r0, #1 3f40: 012fff1e bxeq lr 3f44: da00001f ble 3fc8 3f48: e3500002 cmp r0, #2 <== NOT EXECUTED 3f4c: 012fff1e bxeq lr <== NOT EXECUTED 3f50: e3500003 cmp r0, #3 <== NOT EXECUTED 3f54: 1a000011 bne 3fa0 <== NOT EXECUTED 3f58: e12fff1e bx lr <== NOT EXECUTED 3f5c: e350000b cmp r0, #11 <== NOT EXECUTED 3f60: 012fff1e bxeq lr <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 3f64: b3a0000a movlt r0, #10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3f68: b12fff1e bxlt lr <== NOT EXECUTED 3f6c: e350000c cmp r0, #12 <== NOT EXECUTED 3f70: 012fff1e bxeq lr <== NOT EXECUTED 3f74: e350000d cmp r0, #13 <== NOT EXECUTED 3f78: 1a000008 bne 3fa0 <== NOT EXECUTED 3f7c: e12fff1e bx lr <== NOT EXECUTED 3f80: e3500006 cmp r0, #6 <== NOT EXECUTED 3f84: 012fff1e bxeq lr <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 3f88: b3a00005 movlt r0, #5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3f8c: b12fff1e bxlt lr <== NOT EXECUTED 3f90: e3500007 cmp r0, #7 <== NOT EXECUTED 3f94: 012fff1e bxeq lr <== NOT EXECUTED 3f98: e3500008 cmp r0, #8 <== NOT EXECUTED 3f9c: 012fff1e bxeq lr <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 3fa0: e3e00000 mvn r0, #0 default: baud_index = -1; break; } return baud_index; } 3fa4: e12fff1e bx lr rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3fa8: e350000f cmp r0, #15 <== NOT EXECUTED 3fac: 012fff1e bxeq lr <== NOT EXECUTED 3fb0: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3fb4: e2833001 add r3, r3, #1 <== NOT EXECUTED 3fb8: e1500003 cmp r0, r3 <== NOT EXECUTED 3fbc: 1afffff7 bne 3fa0 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 3fc0: e3a00010 mov r0, #16 <== NOT EXECUTED case B57600: baud_index = 16; break; 3fc4: e12fff1e bx lr <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3fc8: e3500000 cmp r0, #0 3fcc: 012fff1e bxeq lr 3fd0: eafffff2 b 3fa0 000028ec : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 28ec: e59f3008 ldr r3, [pc, #8] ; 28fc <== NOT EXECUTED 28f0: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 28f4: e3a00000 mov r0, #0 <== NOT EXECUTED 28f8: e12fff1e bx lr <== NOT EXECUTED 00003e9c : } } rtems_status_code rtems_termios_close (void *arg) { 3e9c: e92d4070 push {r4, r5, r6, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3ea0: e59f51b0 ldr r5, [pc, #432] ; 4058 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3ea4: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3ea8: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 3eac: e1a06000 mov r6, 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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3eb0: e1a02001 mov r2, r1 3eb4: e5950000 ldr r0, [r5] rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3eb8: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3ebc: eb000457 bl 5020 if (sc != RTEMS_SUCCESSFUL) 3ec0: e3500000 cmp r0, #0 3ec4: 1a00005f bne 4048 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 3ec8: e5943008 ldr r3, [r4, #8] 3ecc: e2433001 sub r3, r3, #1 3ed0: e3530000 cmp r3, #0 3ed4: e5843008 str r3, [r4, #8] 3ed8: 1a00002f bne 3f9c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3edc: e59420cc ldr r2, [r4, #204] ; 0xcc 3ee0: e59f3174 ldr r3, [pc, #372] ; 405c 3ee4: e0833282 add r3, r3, r2, lsl #5 3ee8: e5931004 ldr r1, [r3, #4] 3eec: e3510000 cmp r1, #0 3ef0: 0a000040 beq 3ff8 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3ef4: e1a00004 mov r0, r4 <== NOT EXECUTED 3ef8: e1a0e00f mov lr, pc <== NOT EXECUTED 3efc: e12fff11 bx r1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 3f00: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 3f04: e3530002 cmp r3, #2 <== NOT EXECUTED 3f08: 0a000044 beq 4020 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 3f0c: e594309c ldr r3, [r4, #156] ; 0x9c 3f10: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3f14: 11a02006 movne r2, r6 3f18: 1284000c addne r0, r4, #12 3f1c: 18900003 ldmne r0, {r0, r1} 3f20: 11a0e00f movne lr, pc 3f24: 112fff13 bxne r3 if (tty->forw == NULL) { 3f28: e5943000 ldr r3, [r4] 3f2c: e3530000 cmp r3, #0 3f30: 0a000020 beq 3fb8 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 3f34: e5942004 ldr r2, [r4, #4] 3f38: e5832004 str r2, [r3, #4] } if (tty->back == NULL) { 3f3c: e5942004 ldr r2, [r4, #4] 3f40: e3520000 cmp r2, #0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 3f44: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3f48: 0a000025 beq 3fe4 } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 3f4c: e5940014 ldr r0, [r4, #20] 3f50: eb000409 bl 4f7c rtems_semaphore_delete (tty->osem); 3f54: e5940018 ldr r0, [r4, #24] 3f58: eb000407 bl 4f7c rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 3f5c: e594008c ldr r0, [r4, #140] ; 0x8c 3f60: eb000405 bl 4f7c if ((tty->device.pollRead == NULL) || 3f64: e59430a0 ldr r3, [r4, #160] ; 0xa0 3f68: e3530000 cmp r3, #0 3f6c: 0a00000e beq 3fac (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 3f70: e59430b4 ldr r3, [r4, #180] ; 0xb4 3f74: e3530002 cmp r3, #2 3f78: 0a00000b beq 3fac rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 3f7c: e5940058 ldr r0, [r4, #88] ; 0x58 3f80: ebfff6d6 bl 1ae0 free (tty->rawOutBuf.theBuf); 3f84: e594007c ldr r0, [r4, #124] ; 0x7c 3f88: ebfff6d4 bl 1ae0 free (tty->cbuf); 3f8c: e594001c ldr r0, [r4, #28] 3f90: ebfff6d2 bl 1ae0 free (tty); 3f94: e1a00004 mov r0, r4 3f98: ebfff6d0 bl 1ae0 } rtems_semaphore_release (rtems_termios_ttyMutex); 3f9c: e5950000 ldr r0, [r5] 3fa0: eb000466 bl 5140 return RTEMS_SUCCESSFUL; } 3fa4: e3a00000 mov r0, #0 3fa8: e8bd8070 pop {r4, r5, r6, pc} rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3fac: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 3fb0: eb0003f1 bl 4f7c <== NOT EXECUTED 3fb4: eafffff0 b 3f7c <== NOT EXECUTED 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; 3fb8: e5942004 ldr r2, [r4, #4] 3fbc: e59f109c ldr r1, [pc, #156] ; 4060 if ( rtems_termios_ttyTail != NULL ) { 3fc0: e3520000 cmp r2, #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; 3fc4: e5812000 str r2, [r1] if ( rtems_termios_ttyTail != NULL ) { 3fc8: 0a00001f beq 404c rtems_termios_ttyTail->forw = NULL; 3fcc: e5823000 str r3, [r2] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3fd0: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3fd4: e5943000 ldr r3, [r4] <== NOT EXECUTED 3fd8: e3520000 cmp r2, #0 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 3fdc: 15823000 strne r3, [r2] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3fe0: 1affffd9 bne 3f4c <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 3fe4: e59f1078 ldr r1, [pc, #120] ; 4064 if ( rtems_termios_ttyHead != NULL ) { 3fe8: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3fec: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 3ff0: 15832004 strne r2, [r3, #4] 3ff4: eaffffd4 b 3f4c } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3ff8: e5940018 ldr r0, [r4, #24] 3ffc: e1a02001 mov r2, r1 4000: eb000406 bl 5020 if (sc != RTEMS_SUCCESSFUL) { 4004: e3500000 cmp r0, #0 4008: 1a00000e bne 4048 rtems_fatal_error_occurred (sc); } drainOutput (tty); 400c: e1a00004 mov r0, r4 4010: ebfffda4 bl 36a8 } if (tty->device.outputUsesInterrupts 4014: e59430b4 ldr r3, [r4, #180] ; 0xb4 4018: e3530002 cmp r3, #2 401c: 1affffba bne 3f0c == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 4020: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 4024: e3a01001 mov r1, #1 <== NOT EXECUTED 4028: eb0002d2 bl 4b78 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 402c: e3500000 cmp r0, #0 <== NOT EXECUTED 4030: 1a000004 bne 4048 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 4034: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 4038: e3a01001 mov r1, #1 <== NOT EXECUTED 403c: eb0002cd bl 4b78 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 4040: e3500000 cmp r0, #0 <== NOT EXECUTED 4044: 0affffb0 beq 3f0c <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4048: eb000593 bl 569c <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 404c: e59f3010 ldr r3, [pc, #16] ; 4064 4050: e5832000 str r2, [r3] 4054: eaffffbc b 3f4c 00002b1c : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2b1c: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2b20: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2b24: e08c1001 add r1, ip, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2b28: e3520002 cmp r2, #2 <== NOT EXECUTED * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 2b2c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2b30: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2b34: 0a00000b beq 2b68 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 2b38: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 2b3c: e3530005 cmp r3, #5 <== NOT EXECUTED 2b40: 0a000001 beq 2b4c <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 2b44: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 2b48: eaffff6f b 290c <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2b4c: e59f302c ldr r3, [pc, #44] ; 2b80 <== NOT EXECUTED 2b50: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 2b54: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2b58: 11a0e00f movne lr, pc <== NOT EXECUTED 2b5c: 112fff13 bxne r3 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 2b60: e3a00000 mov r0, #0 <== NOT EXECUTED 2b64: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 2b68: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 2b6c: e1a01002 mov r1, r2 <== NOT EXECUTED 2b70: eb000800 bl 4b78 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 2b74: e3500000 cmp r0, #0 <== NOT EXECUTED 2b78: 0afffff8 beq 2b60 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2b7c: eb000ac6 bl 569c <== NOT EXECUTED 00002b84 : * 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) { 2b84: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 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) { 2b88: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 2b8c: e59f82f0 ldr r8, [pc, #752] ; 2e84 <== NOT EXECUTED 2b90: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED 2b94: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED 2b98: e3560000 cmp r6, #0 <== 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) { 2b9c: e24dd00c sub sp, sp, #12 <== NOT EXECUTED 2ba0: e1a04000 mov r4, r0 <== NOT EXECUTED 2ba4: e1a05001 mov r5, r1 <== NOT EXECUTED 2ba8: e1a07002 mov r7, r2 <== NOT EXECUTED 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) { 2bac: 0a00001e beq 2c2c <== NOT EXECUTED while (len--) { 2bb0: e3520000 cmp r2, #0 <== NOT EXECUTED 2bb4: 0a00000b beq 2be8 <== NOT EXECUTED 2bb8: e3a0a000 mov sl, #0 <== NOT EXECUTED 2bbc: ea000002 b 2bcc <== NOT EXECUTED 2bc0: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2bc4: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED 2bc8: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2bcc: e7d5000a ldrb r0, [r5, sl] <== NOT EXECUTED 2bd0: e1a01004 mov r1, r4 <== NOT EXECUTED 2bd4: e28aa001 add sl, sl, #1 <== NOT EXECUTED 2bd8: e1a0e00f mov lr, pc <== NOT EXECUTED 2bdc: e12fff16 bx r6 <== NOT EXECUTED 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--) { 2be0: e157000a cmp r7, sl <== NOT EXECUTED 2be4: 1afffff5 bne 2bc0 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2be8: e59490e4 ldr r9, [r4, #228] ; 0xe4 <== NOT EXECUTED 2bec: e3590000 cmp r9, #0 <== NOT EXECUTED 2bf0: 1a00000b bne 2c24 <== NOT EXECUTED 2bf4: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2bf8: e3530000 cmp r3, #0 <== NOT EXECUTED 2bfc: 0a000008 beq 2c24 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2c00: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2c04: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2c08: e1a0e00f mov lr, pc <== NOT EXECUTED 2c0c: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 2c10: e3a03001 mov r3, #1 <== NOT EXECUTED 2c14: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 2c18: e1a00009 mov r0, r9 <== NOT EXECUTED 2c1c: e28dd00c add sp, sp, #12 <== NOT EXECUTED 2c20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2c24: e3a09000 mov r9, #0 <== NOT EXECUTED 2c28: eafffffa b 2c18 <== NOT EXECUTED 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, 2c2c: e280304a add r3, r0, #74 ; 0x4a <== NOT EXECUTED 2c30: e58d3008 str r3, [sp, #8] <== NOT EXECUTED /* * 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); 2c34: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED 2c38: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2c3c: e1a0b006 mov fp, r6 <== NOT EXECUTED 2c40: e58d6000 str r6, [sp] <== NOT EXECUTED 2c44: ea000036 b 2d24 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 2c48: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2c4c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2c50: e2800001 add r0, r0, #1 <== NOT EXECUTED 2c54: eb004d00 bl 1605c <__umodsi3> <== NOT EXECUTED 2c58: e1a08000 mov r8, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2c5c: e10f9000 mrs r9, CPSR <== NOT EXECUTED 2c60: e3893080 orr r3, r9, #128 ; 0x80 <== NOT EXECUTED 2c64: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 2c68: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2c6c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 2c70: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 2c74: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2c78: e0800008 add r0, r0, r8 <== NOT EXECUTED 2c7c: eb004cf6 bl 1605c <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 2c80: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 2c84: e1500003 cmp r0, r3 <== NOT EXECUTED 2c88: 9a000010 bls 2cd0 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 2c8c: 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) 2c90: e3130001 tst r3, #1 <== NOT EXECUTED 2c94: 1a00000d bne 2cd0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 2c98: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2c9c: e3833001 orr r3, r3, #1 <== NOT EXECUTED 2ca0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 2ca4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2ca8: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 2cac: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 2cb0: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 2cb4: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 2cb8: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 2cbc: 0a000057 beq 2e20 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 2cc0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2cc4: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2cc8: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2ccc: 0a000062 beq 2e5c <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2cd0: e129f009 msr CPSR_fc, r9 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2cd4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2cd8: e1530008 cmp r3, r8 <== NOT EXECUTED 2cdc: 0a00002d beq 2d98 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2ce0: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2ce4: e7c3a008 strb sl, [r3, r8] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2ce8: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2cec: e3530000 cmp r3, #0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2cf0: e5848060 str r8, [r4, #96] ; 0x60 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2cf4: 1a000008 bne 2d1c <== NOT EXECUTED 2cf8: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2cfc: e3530000 cmp r3, #0 <== NOT EXECUTED 2d00: 0a000005 beq 2d1c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2d04: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 2d08: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2d0c: e1a0e00f mov lr, pc <== NOT EXECUTED 2d10: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 2d14: e3a03001 mov r3, #1 <== NOT EXECUTED 2d18: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2d1c: e2866001 add r6, r6, #1 <== NOT EXECUTED 2d20: e2477001 sub r7, r7, #1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2d24: e3570000 cmp r7, #0 <== NOT EXECUTED 2d28: 0a00002d beq 2de4 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 2d2c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2d30: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 2d34: e7d5a006 ldrb sl, [r5, r6] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 2d38: 0a000005 beq 2d54 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 2d3c: e5d4304a ldrb r3, [r4, #74] ; 0x4a <== NOT EXECUTED 2d40: e153000a cmp r3, sl <== NOT EXECUTED 2d44: 0a000017 beq 2da8 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 2d48: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 2d4c: e153000a cmp r3, sl <== NOT EXECUTED 2d50: 0a00001e beq 2dd0 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 2d54: e35b0000 cmp fp, #0 <== NOT EXECUTED 2d58: 0affffba beq 2c48 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2d5c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2d60: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 2d64: e3530020 cmp r3, #32 <== NOT EXECUTED 2d68: 1affffeb bne 2d1c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2d6c: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2d70: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2d74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2d78: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2d7c: e5942094 ldr r2, [r4, #148] ; 0x94 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2d80: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2d84: e3520000 cmp r2, #0 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2d88: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2d8c: 1a00001b bne 2e00 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2d90: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 2d94: eaffffe0 b 2d1c <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 2d98: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2d9c: e2833001 add r3, r3, #1 <== NOT EXECUTED 2da0: e58d3000 str r3, [sp] <== NOT EXECUTED 2da4: eaffffdc b 2d1c <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* 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]) { 2da8: e5d42049 ldrb r2, [r4, #73] ; 0x49 <== NOT EXECUTED 2dac: e1520003 cmp r2, r3 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 2db0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2db4: 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; 2db8: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2dbc: 13833010 orrne r3, r3, #16 <== 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; 2dc0: 058430b8 streq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2dc4: 158430b8 strne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2dc8: e3a0b001 mov fp, #1 <== NOT EXECUTED 2dcc: eaffffe2 b 2d5c <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 2dd0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2dd4: e3c33010 bic r3, r3, #16 <== NOT EXECUTED 2dd8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2ddc: e3a0b001 mov fp, #1 <== NOT EXECUTED 2de0: eaffffdd b 2d5c <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 2de4: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 2de8: e59d9000 ldr r9, [sp] <== NOT EXECUTED 2dec: e0833009 add r3, r3, r9 <== NOT EXECUTED 2df0: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 2df4: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 2df8: eb0008d0 bl 5140 <== NOT EXECUTED return dropped; 2dfc: eaffff85 b 2c18 <== NOT EXECUTED 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)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 2e00: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 2e04: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2e08: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2e0c: e0811003 add r1, r1, r3 <== NOT EXECUTED 2e10: e3a02001 mov r2, #1 <== NOT EXECUTED 2e14: e1a0e00f mov lr, pc <== NOT EXECUTED 2e18: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2e1c: eaffffdb b 2d90 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 2e20: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2e24: e3130020 tst r3, #32 <== NOT EXECUTED 2e28: 1a000002 bne 2e38 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 2e2c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2e30: e3530000 cmp r3, #0 <== NOT EXECUTED 2e34: 1affffa5 bne 2cd0 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 2e38: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2e3c: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2e40: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2e44: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2e48: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2e4c: e3a02001 mov r2, #1 <== NOT EXECUTED 2e50: e1a0e00f mov lr, pc <== NOT EXECUTED 2e54: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2e58: eaffff9c b 2cd0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2e5c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2e60: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2e64: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2e68: e3530000 cmp r3, #0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2e6c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2e70: 0affff96 beq 2cd0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 2e74: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2e78: e1a0e00f mov lr, pc <== NOT EXECUTED 2e7c: e12fff13 bx r3 <== NOT EXECUTED 2e80: eaffff92 b 2cd0 <== NOT EXECUTED 000028a4 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 28a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 28a8: e59fc034 ldr ip, [pc, #52] ; 28e4 28ac: e59c3000 ldr r3, [ip] 28b0: e3530000 cmp r3, #0 struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 28b4: e24dd004 sub sp, sp, #4 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 28b8: 0a000001 beq 28c4 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 28bc: e28dd004 add sp, sp, #4 28c0: e8bd8000 pop {pc} /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 28c4: e59f001c ldr r0, [pc, #28] ; 28e8 28c8: e3a01001 mov r1, #1 28cc: e3a02054 mov r2, #84 ; 0x54 28d0: e58dc000 str ip, [sp] 28d4: eb000936 bl 4db4 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 28d8: e3500000 cmp r0, #0 28dc: 0afffff6 beq 28bc rtems_fatal_error_occurred (sc); 28e0: eb000b6d bl 569c <== NOT EXECUTED 00003abc : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3abc: e5903000 ldr r3, [r0] struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3ac0: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 3ac4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3ac8: e580100c str r1, [r0, #12] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3acc: e5935034 ldr r5, [r3, #52] ; 0x34 } } rtems_status_code rtems_termios_ioctl (void *arg) { 3ad0: e1a04000 mov r4, 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); 3ad4: e1a02001 mov r2, r1 3ad8: e5950018 ldr r0, [r5, #24] 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; 3adc: e5947008 ldr r7, [r4, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3ae0: eb00054e bl 5020 if (sc != RTEMS_SUCCESSFUL) { 3ae4: e2506000 subs r6, r0, #0 3ae8: 1a00000e bne 3b28 args->ioctl_return = sc; return sc; } switch (args->command) { 3aec: e5943004 ldr r3, [r4, #4] 3af0: e3530004 cmp r3, #4 3af4: 0a000006 beq 3b14 3af8: 8a00000d bhi 3b34 3afc: e3530002 cmp r3, #2 3b00: 0a000020 beq 3b88 3b04: 9a000087 bls 3d28 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 3b08: e1a00005 mov r0, r5 3b0c: ebfffee5 bl 36a8 break; 3b10: ea000002 b 3b20 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3b14: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3b18: e58520dc str r2, [r5, #220] ; 0xdc <== NOT EXECUTED 3b1c: e58530e0 str r3, [r5, #224] ; 0xe0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 3b20: e5950018 ldr r0, [r5, #24] 3b24: eb000585 bl 5140 args->ioctl_return = sc; 3b28: e584600c str r6, [r4, #12] return sc; } 3b2c: e1a00006 mov r0, r6 3b30: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3b34: e3a02a46 mov r2, #286720 ; 0x46000 <== NOT EXECUTED 3b38: e2822e67 add r2, r2, #1648 ; 0x670 <== NOT EXECUTED 3b3c: e282213d add r2, r2, #1073741839 ; 0x4000000f <== NOT EXECUTED 3b40: e1530002 cmp r3, r2 <== NOT EXECUTED 3b44: 0a00006b beq 3cf8 <== NOT EXECUTED 3b48: 8a000082 bhi 3d58 <== NOT EXECUTED 3b4c: e3530005 cmp r3, #5 <== NOT EXECUTED 3b50: 0a0000a5 beq 3dec <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3b54: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED 3b58: e59f3334 ldr r3, [pc, #820] ; 3e94 <== NOT EXECUTED 3b5c: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3b60: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 3b64: e3530000 cmp r3, #0 <== NOT EXECUTED 3b68: 03a0600a moveq r6, #10 <== NOT EXECUTED 3b6c: 0affffeb beq 3b20 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 3b70: e1a00005 mov r0, r5 <== NOT EXECUTED 3b74: e1a01004 mov r1, r4 <== NOT EXECUTED 3b78: e1a0e00f mov lr, pc <== NOT EXECUTED 3b7c: e12fff13 bx r3 <== NOT EXECUTED 3b80: e1a06000 mov r6, r0 <== NOT EXECUTED 3b84: eaffffe5 b 3b20 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3b88: e594e008 ldr lr, [r4, #8] 3b8c: e2857030 add r7, r5, #48 ; 0x30 3b90: e8be000f ldm lr!, {r0, r1, r2, r3} 3b94: e1a0c007 mov ip, r7 3b98: e8ac000f stmia ip!, {r0, r1, r2, r3} 3b9c: e8be000f ldm lr!, {r0, r1, r2, r3} 3ba0: e8ac000f stmia ip!, {r0, r1, r2, r3} /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3ba4: e59520b8 ldr r2, [r5, #184] ; 0xb8 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3ba8: e59e3000 ldr r3, [lr] /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3bac: e3120c02 tst r2, #512 ; 0x200 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3bb0: 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) && 3bb4: 0a000012 beq 3c04 3bb8: e5953030 ldr r3, [r5, #48] ; 0x30 3bbc: e3130b01 tst r3, #1024 ; 0x400 3bc0: 1a00000f bne 3c04 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3bc4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3bc8: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3bcc: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3bd0: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3bd4: e3130020 tst r3, #32 <== NOT EXECUTED 3bd8: 0a000009 beq 3c04 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3bdc: e10f8000 mrs r8, CPSR <== NOT EXECUTED 3be0: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 3be4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3be8: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3bec: e5952094 ldr r2, [r5, #148] ; 0x94 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3bf0: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3bf4: e3520000 cmp r2, #0 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3bf8: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3bfc: 1a00009c bne 3e74 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3c00: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 3c04: e59530b8 ldr r3, [r5, #184] ; 0xb8 3c08: e3130b01 tst r3, #1024 ; 0x400 3c0c: 0a000008 beq 3c34 3c10: e5953030 ldr r3, [r5, #48] ; 0x30 <== NOT EXECUTED 3c14: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 3c18: 1a000005 bne 3c34 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3c1c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c20: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3c24: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 3c28: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c2c: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 3c30: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 3c34: e59530b8 ldr r3, [r5, #184] ; 0xb8 3c38: e3130c01 tst r3, #256 ; 0x100 3c3c: 05952038 ldreq r2, [r5, #56] ; 0x38 3c40: 0a000012 beq 3c90 3c44: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED 3c48: e3520000 cmp r2, #0 <== NOT EXECUTED 3c4c: ba00007c blt 3e44 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 3c50: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c54: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 3c58: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 3c5c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c60: e3130004 tst r3, #4 <== NOT EXECUTED 3c64: 0a000006 beq 3c84 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 3c68: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 3c6c: e3530000 cmp r3, #0 <== NOT EXECUTED 3c70: 0a000003 beq 3c84 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 3c74: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3c78: e1a0e00f mov lr, pc <== NOT EXECUTED 3c7c: e12fff13 bx r3 <== NOT EXECUTED 3c80: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 3c84: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c88: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3c8c: e58530b8 str r3, [r5, #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) { 3c90: e3520000 cmp r2, #0 3c94: ba00006a blt 3e44 tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 3c98: e5953030 ldr r3, [r5, #48] ; 0x30 3c9c: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3ca0: 159520b8 ldrne r2, [r5, #184] ; 0xb8 3ca4: 13822b01 orrne r2, r2, #1024 ; 0x400 3ca8: 158520b8 strne r2, [r5, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 3cac: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 3cb0: 159530b8 ldrne r3, [r5, #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) { 3cb4: e595803c ldr r8, [r5, #60] ; 0x3c if (tty->termios.c_iflag & IXOFF) { tty->flow_ctrl |= FL_MDXOF; } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { tty->flow_ctrl |= FL_MDXON; 3cb8: 13833c02 orrne r3, r3, #512 ; 0x200 3cbc: 158530b8 strne r3, [r5, #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) { 3cc0: e2188002 ands r8, r8, #2 3cc4: 0a00004c beq 3dfc tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3cc8: e3a03000 mov r3, #0 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3ccc: e5853074 str r3, [r5, #116] ; 0x74 /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3cd0: e585306c str r3, [r5, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3cd4: e5853070 str r3, [r5, #112] ; 0x70 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 3cd8: e59530a8 ldr r3, [r5, #168] ; 0xa8 3cdc: e3530000 cmp r3, #0 3ce0: 0affff8e beq 3b20 (*tty->device.setAttributes)(tty->minor, &tty->termios); 3ce4: e1a01007 mov r1, r7 3ce8: e5950010 ldr r0, [r5, #16] 3cec: e1a0e00f mov lr, pc 3cf0: e12fff13 bx r3 3cf4: eaffff89 b 3b20 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 3cf8: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED 3cfc: e595305c ldr r3, [r5, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 3d00: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 3d04: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED 3d08: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3d0c: e2851020 add r1, r5, #32 <== NOT EXECUTED 3d10: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 3d14: e0412002 sub r2, r1, r2 <== NOT EXECUTED 3d18: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED 3d1c: e0823003 add r3, r2, r3 <== NOT EXECUTED 3d20: e5813000 str r3, [r1] <== NOT EXECUTED 3d24: eaffff7d b 3b20 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3d28: e3530001 cmp r3, #1 3d2c: 1affff88 bne 3b54 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 3d30: e5947008 ldr r7, [r4, #8] 3d34: e285c030 add ip, r5, #48 ; 0x30 3d38: e8bc000f ldm ip!, {r0, r1, r2, r3} 3d3c: e1a0e007 mov lr, r7 3d40: e8ae000f stmia lr!, {r0, r1, r2, r3} 3d44: e8bc000f ldm ip!, {r0, r1, r2, r3} 3d48: e8ae000f stmia lr!, {r0, r1, r2, r3} 3d4c: e59c3000 ldr r3, [ip] 3d50: e58e3000 str r3, [lr] break; 3d54: eaffff71 b 3b20 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3d58: e3a02a47 mov r2, #290816 ; 0x47000 <== NOT EXECUTED 3d5c: e2822e41 add r2, r2, #1040 ; 0x410 <== NOT EXECUTED 3d60: e2822129 add r2, r2, #1073741834 ; 0x4000000a <== NOT EXECUTED 3d64: e1530002 cmp r3, r2 <== NOT EXECUTED 3d68: 0a00001b beq 3ddc <== NOT EXECUTED 3d6c: e3a02a47 mov r2, #290816 ; 0x47000 <== NOT EXECUTED 3d70: e2822e41 add r2, r2, #1040 ; 0x410 <== NOT EXECUTED 3d74: e282212e add r2, r2, #-2147483637 ; 0x8000000b <== NOT EXECUTED 3d78: e1530002 cmp r3, r2 <== NOT EXECUTED 3d7c: 1affff74 bne 3b54 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3d80: e59f710c ldr r7, [pc, #268] ; 3e94 <== NOT EXECUTED 3d84: e59530cc ldr r3, [r5, #204] ; 0xcc <== NOT EXECUTED 3d88: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 3d8c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3d90: e3530000 cmp r3, #0 <== NOT EXECUTED 3d94: 0a000003 beq 3da8 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3d98: e1a00005 mov r0, r5 <== NOT EXECUTED 3d9c: e1a0e00f mov lr, pc <== NOT EXECUTED 3da0: e12fff13 bx r3 <== NOT EXECUTED 3da4: e1a06000 mov r6, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3da8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3dac: e5932000 ldr r2, [r3] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3db0: e7973282 ldr r3, [r7, r2, lsl #5] <== NOT EXECUTED */ 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); tty->t_sc = NULL; /* ensure that no more valid data */ 3db4: e3a01000 mov r1, #0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3db8: e3530000 cmp r3, #0 <== NOT EXECUTED */ 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); tty->t_sc = NULL; /* ensure that no more valid data */ 3dbc: e58510d0 str r1, [r5, #208] ; 0xd0 <== NOT EXECUTED * 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); 3dc0: e58520cc str r2, [r5, #204] ; 0xcc <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3dc4: 0affff55 beq 3b20 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3dc8: e1a00005 mov r0, r5 <== NOT EXECUTED 3dcc: e1a0e00f mov lr, pc <== NOT EXECUTED 3dd0: e12fff13 bx r3 <== NOT EXECUTED 3dd4: e1a06000 mov r6, r0 <== NOT EXECUTED 3dd8: eaffff50 b 3b20 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 3ddc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3de0: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED 3de4: e5832000 str r2, [r3] <== NOT EXECUTED break; 3de8: eaffff4c b 3b20 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 3dec: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3df0: e58520d4 str r2, [r5, #212] ; 0xd4 <== NOT EXECUTED 3df4: e58530d8 str r3, [r5, #216] ; 0xd8 <== NOT EXECUTED break; 3df8: eaffff48 b 3b20 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 3dfc: e5d5a046 ldrb sl, [r5, #70] ; 0x46 <== NOT EXECUTED 3e00: eb0002d6 bl 4960 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3e04: e000009a mul r0, sl, r0 <== NOT EXECUTED 3e08: e59f2088 ldr r2, [pc, #136] ; 3e98 <== NOT EXECUTED 3e0c: e0831092 umull r1, r3, r2, r0 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3e10: e5d52046 ldrb r2, [r5, #70] ; 0x46 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3e14: e1a031a3 lsr r3, r3, #3 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3e18: e3520000 cmp r2, #0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3e1c: e5853054 str r3, [r5, #84] ; 0x54 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3e20: 0a00000b beq 3e54 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 3e24: e5d52047 ldrb r2, [r5, #71] ; 0x47 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3e28: e3520000 cmp r2, #0 <== NOT EXECUTED 3e2c: 01a02003 moveq r2, r3 <== NOT EXECUTED 3e30: 13a02000 movne 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; 3e34: e585806c str r8, [r5, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3e38: e5852074 str r2, [r5, #116] ; 0x74 <== 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; 3e3c: e5853070 str r3, [r5, #112] ; 0x70 <== NOT EXECUTED 3e40: eaffffa4 b 3cd8 <== 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) { tty->flow_ctrl |= FL_MDRTS; 3e44: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3e48: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED 3e4c: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3e50: eaffff90 b 3c98 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3e54: e5d53047 ldrb r3, [r5, #71] ; 0x47 <== NOT EXECUTED 3e58: e3530000 cmp r3, #0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 3e5c: 03a03001 moveq r3, #1 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3e60: 15852074 strne r2, [r5, #116] ; 0x74 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3e64: 1585206c strne r2, [r5, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3e68: 15852070 strne r2, [r5, #112] ; 0x70 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 3e6c: 0585306c streq r3, [r5, #108] ; 0x6c <== NOT EXECUTED 3e70: eaffff98 b 3cd8 <== NOT EXECUTED 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)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3e74: e5953084 ldr r3, [r5, #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)(tty->minor, 3e78: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED 3e7c: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3e80: e0811003 add r1, r1, r3 <== NOT EXECUTED 3e84: e3a02001 mov r2, #1 <== NOT EXECUTED 3e88: e1a0e00f mov lr, pc <== NOT EXECUTED 3e8c: e595f0a4 ldr pc, [r5, #164] ; 0xa4 <== NOT EXECUTED 3e90: eaffff5a b 3c00 <== NOT EXECUTED 00004068 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 4068: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 406c: e59f7490 ldr r7, [pc, #1168] ; 4504 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 4070: e1a06001 mov r6, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 4074: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 4078: e24dd014 sub sp, sp, #20 407c: e1a05000 mov r5, r0 4080: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 4084: e5970000 ldr r0, [r7] 4088: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 408c: e1a09003 mov r9, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 4090: eb0003e2 bl 5020 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4094: e250a000 subs sl, r0, #0 4098: 1a000020 bne 4120 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 409c: e59fb464 ldr fp, [pc, #1124] ; 4508 40a0: e59b4000 ldr r4, [fp] 40a4: e3540000 cmp r4, #0 40a8: 1a000003 bne 40bc 40ac: ea00002b b 4160 40b0: e5944000 ldr r4, [r4] 40b4: e3540000 cmp r4, #0 40b8: 0a000028 beq 4160 if ((tty->major == major) && (tty->minor == minor)) 40bc: e594300c ldr r3, [r4, #12] 40c0: e1530005 cmp r3, r5 40c4: 1afffff9 bne 40b0 40c8: e5943010 ldr r3, [r4, #16] 40cc: e1530006 cmp r3, r6 40d0: 1afffff6 bne 40b0 if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 40d4: e5943008 ldr r3, [r4, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40d8: e5982000 ldr r2, [r8] if (!tty->refcount++) { 40dc: e3530000 cmp r3, #0 40e0: e2833001 add r3, r3, #1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40e4: e5824034 str r4, [r2, #52] ; 0x34 if (!tty->refcount++) { 40e8: e5843008 str r3, [r4, #8] 40ec: 1a000009 bne 4118 if (tty->device.firstOpen) 40f0: e5943098 ldr r3, [r4, #152] ; 0x98 40f4: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 40f8: 11a00005 movne r0, r5 40fc: 11a01006 movne r1, r6 4100: 11a02008 movne r2, r8 4104: 11a0e00f movne lr, pc 4108: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 410c: e59430b4 ldr r3, [r4, #180] ; 0xb4 4110: e3530002 cmp r3, #2 4114: 0a000004 beq 412c (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 4118: e5970000 ldr r0, [r7] 411c: eb000407 bl 5140 return RTEMS_SUCCESSFUL; } 4120: e1a0000a mov r0, sl 4124: e28dd014 add sp, sp, #20 4128: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 412c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 4130: e59f13d4 ldr r1, [pc, #980] ; 450c <== NOT EXECUTED 4134: e1a02004 mov r2, r4 <== NOT EXECUTED 4138: eb0004d1 bl 5484 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 413c: e3500000 cmp r0, #0 <== NOT EXECUTED 4140: 1a0000d2 bne 4490 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 4144: e1a02004 mov r2, r4 <== NOT EXECUTED 4148: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 414c: e59f13bc ldr r1, [pc, #956] ; 4510 <== NOT EXECUTED 4150: eb0004cb bl 5484 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 4154: e3500000 cmp r0, #0 <== NOT EXECUTED 4158: 0affffee beq 4118 <== NOT EXECUTED 415c: ea0000cb b 4490 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 4160: e3a00001 mov r0, #1 4164: e3a010e8 mov r1, #232 ; 0xe8 4168: eb0015cb bl 989c if (tty == NULL) { 416c: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 4170: e58d0010 str r0, [sp, #16] 4174: e1a04000 mov r4, r0 if (tty == NULL) { 4178: 0a0000af beq 443c return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 417c: e59f0390 ldr r0, [pc, #912] ; 4514 4180: e59d1010 ldr r1, [sp, #16] 4184: e5903004 ldr r3, [r0, #4] 4188: e5813064 str r3, [r1, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 418c: e5910064 ldr r0, [r1, #100] ; 0x64 4190: ebfff70d bl 1dcc 4194: e59d2010 ldr r2, [sp, #16] if (tty->rawInBuf.theBuf == NULL) { 4198: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 419c: e5820058 str r0, [r2, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 41a0: 0a0000a9 beq 444c return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 41a4: e59fc368 ldr ip, [pc, #872] ; 4514 41a8: e59de010 ldr lr, [sp, #16] 41ac: e59c3008 ldr r3, [ip, #8] 41b0: e58e3088 str r3, [lr, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 41b4: e59e0088 ldr r0, [lr, #136] ; 0x88 41b8: ebfff703 bl 1dcc 41bc: e59d1010 ldr r1, [sp, #16] if (tty->rawOutBuf.theBuf == NULL) { 41c0: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 41c4: e581007c str r0, [r1, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 41c8: 05910058 ldreq r0, [r1, #88] ; 0x58 /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { 41cc: 0a000097 beq 4430 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 41d0: e59f233c ldr r2, [pc, #828] ; 4514 41d4: e5920000 ldr r0, [r2] 41d8: ebfff6fb bl 1dcc 41dc: e59d3010 ldr r3, [sp, #16] if (tty->cbuf == NULL) { 41e0: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 41e4: e583001c str r0, [r3, #28] if (tty->cbuf == NULL) { 41e8: 0a00008c beq 4420 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 41ec: e59b2000 ldr r2, [fp] tty->back = NULL; 41f0: e59dc010 ldr ip, [sp, #16] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 41f4: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 41f8: e3520000 cmp r2, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 41fc: e88c000c stm ip, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 4200: 1582c004 strne ip, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 4204: e58c30d4 str r3, [ip, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 4208: e58c30d8 str r3, [ip, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 420c: e58c30dc str r3, [ip, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 4210: e58c30e0 str r3, [ip, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 4214: e58c30e4 str r3, [ip, #228] ; 0xe4 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) 4218: e59f32f8 ldr r3, [pc, #760] ; 4518 421c: e5932000 ldr r2, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4220: e59f12ec ldr r1, [pc, #748] ; 4514 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) 4224: e3520000 cmp r2, #0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4228: e59d2010 ldr r2, [sp, #16] 422c: e5d1000c ldrb r0, [r1, #12] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 4230: e59de010 ldr lr, [sp, #16] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4234: e282c014 add ip, r2, #20 tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 4238: 0583e000 streq lr, [r3] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 423c: e58be000 str lr, [fp] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4240: e3800315 orr r0, r0, #1409286144 ; 0x54000000 4244: e58dc000 str ip, [sp] rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 4248: e59dc010 ldr ip, [sp, #16] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 424c: e3800852 orr r0, r0, #5373952 ; 0x520000 4250: e3a03000 mov r3, #0 4254: e3800c69 orr r0, r0, #26880 ; 0x6900 4258: e3a01001 mov r1, #1 425c: e3a02054 mov r2, #84 ; 0x54 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 4260: e58c6010 str r6, [ip, #16] tty->major = major; 4264: e58c500c str r5, [ip, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4268: eb0002d1 bl 4db4 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) 426c: e2503000 subs r3, r0, #0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4270: e59fb29c ldr fp, [pc, #668] ; 4514 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) 4274: 1a000085 bne 4490 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 4278: e5db000c ldrb r0, [fp, #12] 427c: e59de010 ldr lr, [sp, #16] 4280: e3800315 orr r0, r0, #1409286144 ; 0x54000000 4284: e3800852 orr r0, r0, #5373952 ; 0x520000 4288: e28ec018 add ip, lr, #24 428c: e3a01001 mov r1, #1 4290: e3800c6f orr r0, r0, #28416 ; 0x6f00 4294: e3a02054 mov r2, #84 ; 0x54 4298: e58dc000 str ip, [sp] 429c: eb0002c4 bl 4db4 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) 42a0: e2501000 subs r1, r0, #0 42a4: 1a000079 bne 4490 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 42a8: e5db000c ldrb r0, [fp, #12] 42ac: e59d2010 ldr r2, [sp, #16] 42b0: e3800315 orr r0, r0, #1409286144 ; 0x54000000 42b4: e3800852 orr r0, r0, #5373952 ; 0x520000 42b8: e282c08c add ip, r2, #140 ; 0x8c 42bc: e3800b1e orr r0, r0, #30720 ; 0x7800 42c0: e3a02020 mov r2, #32 42c4: e1a03001 mov r3, r1 42c8: e58dc000 str ip, [sp] 42cc: eb0002b8 bl 4db4 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 42d0: e250e000 subs lr, r0, #0 42d4: 1a00006d bne 4490 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 42d8: e8b9000f ldm r9!, {r0, r1, r2, r3} 42dc: e58d900c str r9, [sp, #12] 42e0: e59d9010 ldr r9, [sp, #16] 42e4: e289c098 add ip, r9, #152 ; 0x98 42e8: e8ac000f stmia ip!, {r0, r1, r2, r3} 42ec: e59d900c ldr r9, [sp, #12] 42f0: e899000f ldm r9, {r0, r1, r2, r3} 42f4: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 42f8: e59dc010 ldr ip, [sp, #16] 42fc: e59c30b4 ldr r3, [ip, #180] ; 0xb4 4300: e3530002 cmp r3, #2 RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 4304: e58ce094 str lr, [ip, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4308: 0a000061 beq 4494 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 430c: e59d9010 ldr r9, [sp, #16] 4310: e59930a0 ldr r3, [r9, #160] ; 0xa0 4314: e3530000 cmp r3, #0 4318: 0a00004e beq 4458 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 431c: e59930b4 ldr r3, [r9, #180] ; 0xb4 4320: e3530002 cmp r3, #2 4324: 0a00004b beq 4458 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; 4328: e59d0010 ldr r0, [sp, #16] 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'; 432c: 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; 4330: e58030b8 str r3, [r0, #184] ; 0xb8 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 4334: e5909064 ldr r9, [r0, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; 4338: e590b064 ldr fp, [r0, #100] ; 0x64 /* * Bump name characer */ if (c++ == 'z') 433c: e59f11d0 ldr r1, [pc, #464] ; 4514 /* 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; 4340: e1a090a9 lsr r9, r9, #1 4344: e58d9008 str r9, [sp, #8] tty->highwater = tty->rawInBuf.Size * 3/4; 4348: e08bb08b add fp, fp, fp, lsl #1 434c: e59d9010 ldr r9, [sp, #16] /* * Bump name characer */ if (c++ == 'z') 4350: e5d1e00c ldrb lr, [r1, #12] 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; 4354: e1a0b12b lsr fp, fp, #2 4358: e589b0c0 str fp, [r9, #192] ; 0xc0 /* * Bump name characer */ if (c++ == 'z') 435c: e59f91b0 ldr r9, [pc, #432] ; 4514 4360: e35e007a cmp lr, #122 ; 0x7a 4364: e28ee001 add lr, lr, #1 4368: e5c9e00c strb lr, [r9, #12] * 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 = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 436c: e3a02c82 mov r2, #33280 ; 0x8200 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 4370: e59de010 ldr lr, [sp, #16] tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 4374: e282203b add r2, r2, #59 ; 0x3b 4378: e58e203c str r2, [lr, #60] ; 0x3c tty->termios.c_cc[VINTR] = '\003'; 437c: e3a02003 mov r2, #3 4380: e5ce2041 strb r2, [lr, #65] ; 0x41 tty->termios.c_cc[VQUIT] = '\034'; 4384: e3a0201c mov r2, #28 4388: e5ce2042 strb r2, [lr, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 438c: e3a0207f mov r2, #127 ; 0x7f 4390: e5ce2043 strb r2, [lr, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 4394: e3a02015 mov r2, #21 4398: e5ce2044 strb r2, [lr, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 439c: e3a02004 mov r2, #4 43a0: e5ce2045 strb r2, [lr, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 43a4: e3a02011 mov r2, #17 43a8: e5ce2049 strb r2, [lr, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 43ac: e3a02013 mov r2, #19 43b0: e5ce204a strb r2, [lr, #74] ; 0x4a tty->termios.c_cc[VSUSP] = '\032'; 43b4: e3a0201a mov r2, #26 43b8: e5ce204b strb r2, [lr, #75] ; 0x4b tty->termios.c_cc[VREPRINT] = '\022'; 43bc: e3a02012 mov r2, #18 43c0: e5ce204d strb r2, [lr, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 43c4: e3a0200f mov r2, #15 43c8: e5ce204e strb r2, [lr, #78] ; 0x4e tty->termios.c_cc[VWERASE] = '\027'; 43cc: e3a02017 mov r2, #23 43d0: e5ce204f strb r2, [lr, #79] ; 0x4f /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 43d4: e3a00b06 mov r0, #6144 ; 0x1800 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'; 43d8: e3a02016 mov r2, #22 43dc: e5ce2050 strb r2, [lr, #80] ; 0x50 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 43e0: e2800005 add r0, r0, #5 43e4: e58e0034 str r0, [lr, #52] ; 0x34 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 43e8: e3a0cc25 mov ip, #9472 ; 0x2500 /* 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; 43ec: e59d0008 ldr r0, [sp, #8] /* * 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; 43f0: e3a01e8b mov r1, #2224 ; 0x8b0 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'; 43f4: e5ce304c strb r3, [lr, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 43f8: e5ce3051 strb r3, [lr, #81] ; 0x51 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 43fc: e28cc002 add ip, ip, #2 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 4400: e281100d add r1, r1, #13 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 4404: 0282204b addeq r2, r2, #75 ; 0x4b 4408: 01a03009 moveq r3, r9 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 440c: e58ec030 str ip, [lr, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 4410: e58e1038 str r1, [lr, #56] ; 0x38 /* 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; 4414: e58e00bc str r0, [lr, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 4418: 05c3200c strbeq r2, [r3, #12] 441c: eaffff2c b 40d4 /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 4420: e593007c ldr r0, [r3, #124] ; 0x7c <== NOT EXECUTED 4424: ebfff5ad bl 1ae0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 4428: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED 442c: e5990058 ldr r0, [r9, #88] ; 0x58 <== NOT EXECUTED 4430: ebfff5aa bl 1ae0 <== NOT EXECUTED free(tty); 4434: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 4438: ebfff5a8 bl 1ae0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 443c: e5970000 ldr r0, [r7] <== NOT EXECUTED 4440: eb00033e bl 5140 <== NOT EXECUTED 4444: e3a0a01a mov sl, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 4448: eaffff34 b 4120 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 444c: e1a00002 mov r0, r2 <== NOT EXECUTED 4450: ebfff5a2 bl 1ae0 <== NOT EXECUTED 4454: eafffff8 b 443c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 4458: e59fc0b4 ldr ip, [pc, #180] ; 4514 <== NOT EXECUTED 445c: e5dc000c ldrb r0, [ip, #12] <== NOT EXECUTED 4460: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED 4464: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 4468: e3a01000 mov r1, #0 <== NOT EXECUTED 446c: e3800852 orr r0, r0, #5373952 ; 0x520000 <== NOT EXECUTED 4470: e28ec068 add ip, lr, #104 ; 0x68 <== NOT EXECUTED 4474: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED 4478: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 447c: e1a03001 mov r3, r1 <== NOT EXECUTED 4480: e58dc000 str ip, [sp] <== NOT EXECUTED 4484: eb00024a bl 4db4 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 4488: e3500000 cmp r0, #0 <== NOT EXECUTED 448c: 0affffa5 beq 4328 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4490: eb000481 bl 569c <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 4494: e5db000c ldrb r0, [fp, #12] <== NOT EXECUTED 4498: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 449c: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 44a0: e28cc0c8 add ip, ip, #200 ; 0xc8 <== NOT EXECUTED 44a4: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 44a8: e3a0100a mov r1, #10 <== NOT EXECUTED 44ac: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 44b0: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 44b4: e58de000 str lr, [sp] <== NOT EXECUTED 44b8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 44bc: eb000349 bl 51e8 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 44c0: e250e000 subs lr, r0, #0 <== NOT EXECUTED 44c4: 1afffff1 bne 4490 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 44c8: e5db000c ldrb r0, [fp, #12] <== NOT EXECUTED 44cc: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 44d0: e3800452 orr r0, r0, #1375731712 ; 0x52000000 <== NOT EXECUTED 44d4: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 44d8: e282c0c4 add ip, r2, #196 ; 0xc4 <== NOT EXECUTED 44dc: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 44e0: e3a01009 mov r1, #9 <== NOT EXECUTED 44e4: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 44e8: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 44ec: e58de000 str lr, [sp] <== NOT EXECUTED 44f0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 44f4: eb00033b bl 51e8 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 44f8: e3500000 cmp r0, #0 <== NOT EXECUTED 44fc: 0affff82 beq 430c <== NOT EXECUTED 4500: eaffffe2 b 4490 <== NOT EXECUTED 00002e88 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 2e88: e59230b4 ldr r3, [r2, #180] ; 0xb4 2e8c: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 2e90: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2e94: e1a04002 mov r4, r2 2e98: e1a0b000 mov fp, r0 2e9c: e1a09001 mov r9, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 2ea0: 0a000039 beq 2f8c (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 2ea4: e3510000 cmp r1, #0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 2ea8: e5928080 ldr r8, [r2, #128] ; 0x80 <== NOT EXECUTED while (len) { 2eac: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 2eb0: e3a0a000 mov sl, #0 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 2eb4: e3a07002 mov r7, #2 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 2eb8: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2ebc: e2880001 add r0, r8, #1 <== NOT EXECUTED 2ec0: eb004c65 bl 1605c <__umodsi3> <== NOT EXECUTED 2ec4: e1a08000 mov r8, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2ec8: e10f5000 mrs r5, CPSR <== NOT EXECUTED 2ecc: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED 2ed0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2ed4: e5946084 ldr r6, [r4, #132] ; 0x84 <== NOT EXECUTED 2ed8: e1560000 cmp r6, r0 <== NOT EXECUTED 2edc: 1a00000d bne 2f18 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2ee0: e5847094 str r7, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2ee4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2ee8: e3a01000 mov r1, #0 <== NOT EXECUTED 2eec: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2ef0: e1a02001 mov r2, r1 <== NOT EXECUTED 2ef4: eb000849 bl 5020 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2ef8: e3500000 cmp r0, #0 <== NOT EXECUTED 2efc: 1a000028 bne 2fa4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2f00: e10f5000 mrs r5, CPSR <== NOT EXECUTED 2f04: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED 2f08: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED * 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) { 2f0c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2f10: e1530006 cmp r3, r6 <== NOT EXECUTED 2f14: 0afffff1 beq 2ee0 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 2f18: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2f1c: e7db100a ldrb r1, [fp, sl] <== NOT EXECUTED 2f20: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 2f24: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 2f28: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2f2c: e3530000 cmp r3, #0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 2f30: e5848080 str r8, [r4, #128] ; 0x80 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 2f34: 1a000007 bne 2f58 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 2f38: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2f3c: e3130010 tst r3, #16 <== NOT EXECUTED 2f40: 0a000009 beq 2f6c <== NOT EXECUTED (*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; 2f44: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2f48: e3833020 orr r3, r3, #32 <== NOT EXECUTED 2f4c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 2f50: e3a03001 mov r3, #1 <== NOT EXECUTED 2f54: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2f58: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 2f5c: e2599001 subs r9, r9, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; 2f60: e28aa001 add sl, sl, #1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 2f64: 1affffd3 bne 2eb8 <== NOT EXECUTED 2f68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 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, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 2f6c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 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, 2f70: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2f74: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2f78: e0811003 add r1, r1, r3 <== NOT EXECUTED 2f7c: e3a02001 mov r2, #1 <== NOT EXECUTED 2f80: e1a0e00f mov lr, pc <== NOT EXECUTED 2f84: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2f88: eafffff0 b 2f50 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 2f8c: e1a01000 mov r1, r0 2f90: e1a02009 mov r2, r9 2f94: e5940010 ldr r0, [r4, #16] 2f98: e1a0e00f mov lr, pc 2f9c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 2fa0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 2fa4: eb0009bc bl 569c <== NOT EXECUTED 00003724 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3724: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3728: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 372c: e1a0a000 mov sl, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3730: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3734: e3a01000 mov r1, #0 <== NOT EXECUTED 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; char *buffer = args->buffer; 3738: e59a300c ldr r3, [sl, #12] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 373c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 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); 3740: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3744: e1a02001 mov r2, r1 <== NOT EXECUTED 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; 3748: e59a7010 ldr r7, [sl, #16] <== NOT EXECUTED char *buffer = args->buffer; 374c: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3750: eb000632 bl 5020 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 3754: e250b000 subs fp, r0, #0 <== NOT EXECUTED 3758: 1a00000e bne 3798 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 375c: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3760: e59f334c ldr r3, [pc, #844] ; 3ab4 <== NOT EXECUTED 3764: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3768: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 376c: e3530000 cmp r3, #0 <== NOT EXECUTED 3770: 0a00000b beq 37a4 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3774: e1a0100a mov r1, sl <== NOT EXECUTED 3778: e1a00004 mov r0, r4 <== NOT EXECUTED 377c: e1a0e00f mov lr, pc <== NOT EXECUTED 3780: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 3784: e3a03000 mov r3, #0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3788: e1a0b000 mov fp, r0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 378c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 3790: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3794: eb000669 bl 5140 <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 3798: e1a0000b mov r0, fp <== NOT EXECUTED 379c: e28dd008 add sp, sp, #8 <== NOT EXECUTED 37a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 37a4: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 37a8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 37ac: e1520003 cmp r2, r3 <== NOT EXECUTED 37b0: 0a00001a beq 3820 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 37b4: e3570000 cmp r7, #0 <== NOT EXECUTED 37b8: 0a000010 beq 3800 <== NOT EXECUTED 37bc: e2842020 add r2, r4, #32 <== NOT EXECUTED 37c0: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 37c4: e1530002 cmp r3, r2 <== NOT EXECUTED 37c8: aa00000c bge 3800 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 37cc: e59d2000 ldr r2, [sp] <== NOT EXECUTED 37d0: e0631002 rsb r1, r3, r2 <== NOT EXECUTED 37d4: ea000002 b 37e4 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 37d8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 37dc: e1520003 cmp r2, r3 <== NOT EXECUTED 37e0: da000006 ble 3800 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 37e4: e594201c ldr r2, [r4, #28] <== NOT EXECUTED 37e8: e7d22003 ldrb r2, [r2, r3] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 37ec: e2577001 subs r7, r7, #1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 37f0: e7c12003 strb r2, [r1, r3] <== NOT EXECUTED 37f4: e2833001 add r3, r3, #1 <== NOT EXECUTED 37f8: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 37fc: 1afffff5 bne 37d8 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 3800: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED 3804: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 3808: e58a7018 str r7, [sl, #24] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 380c: e3a03000 mov r3, #0 <== NOT EXECUTED 3810: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 3814: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3818: eb000648 bl 5140 <== NOT EXECUTED return sc; 381c: eaffffdd b 3798 <== NOT EXECUTED } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 3820: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 3824: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED if (tty->device.pollRead != NULL 3828: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 382c: e584202c str r2, [r4, #44] ; 0x2c <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 3830: e584b020 str fp, [r4, #32] <== NOT EXECUTED 3834: e584b024 str fp, [r4, #36] ; 0x24 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 3838: 0a000002 beq 3848 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 383c: e59420b4 ldr r2, [r4, #180] ; 0xb4 <== NOT EXECUTED 3840: e3520000 cmp r2, #0 <== NOT EXECUTED 3844: 0a00005e beq 39c4 <== 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)(tty->minor, 3848: e2842049 add r2, r4, #73 ; 0x49 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 384c: e3a09c02 mov r9, #512 ; 0x200 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 3850: e5945074 ldr r5, [r4, #116] ; 0x74 <== 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)(tty->minor, 3854: e58d2004 str r2, [sp, #4] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3858: e59f6258 ldr r6, [pc, #600] ; 3ab8 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 385c: e2899002 add r9, r9, #2 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 3860: e3a08001 mov r8, #1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3864: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 3868: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 386c: e1520003 cmp r2, r3 <== NOT EXECUTED 3870: 0a000036 beq 3950 <== NOT EXECUTED 3874: e5963000 ldr r3, [r6] <== NOT EXECUTED 3878: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 387c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3880: e1520003 cmp r2, r3 <== NOT EXECUTED 3884: aa000031 bge 3950 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 3888: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 388c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3890: e2800001 add r0, r0, #1 <== NOT EXECUTED 3894: eb0049f0 bl 1605c <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 3898: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 389c: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 38a0: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 38a4: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 38a8: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 38ac: e0823003 add r3, r2, r3 <== NOT EXECUTED 38b0: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 38b4: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 38b8: eb0049e7 bl 1605c <__umodsi3> <== NOT EXECUTED 38bc: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 38c0: e1500003 cmp r0, r3 <== NOT EXECUTED 38c4: 2a000014 bcs 391c <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 38c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38cc: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 38d0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 38d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38d8: e3c33f7f bic r3, r3, #508 ; 0x1fc <== NOT EXECUTED 38dc: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 38e0: e1a03b03 lsl r3, r3, #22 <== NOT EXECUTED 38e4: e1a03b23 lsr r3, r3, #22 <== NOT EXECUTED 38e8: e1530009 cmp r3, r9 <== NOT EXECUTED 38ec: 0a000028 beq 3994 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 38f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38f4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 38f8: 0a000007 beq 391c <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 38fc: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 3900: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 3904: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 3908: e3530000 cmp r3, #0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 390c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 3910: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3914: 11a0e00f movne lr, pc <== NOT EXECUTED 3918: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 391c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3920: e3130002 tst r3, #2 <== NOT EXECUTED 3924: 0a000012 beq 3974 <== NOT EXECUTED if (siproc (c, tty)) 3928: e1a00005 mov r0, r5 <== NOT EXECUTED 392c: e1a01004 mov r1, r4 <== NOT EXECUTED 3930: ebffff0f bl 3574 <== NOT EXECUTED 3934: e3500000 cmp r0, #0 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 3938: 13a08000 movne r8, #0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 393c: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 3940: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3944: e1520003 cmp r2, r3 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 3948: e5945070 ldr r5, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 394c: 1affffc8 bne 3874 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 3950: e3580000 cmp r8, #0 <== NOT EXECUTED 3954: 0affff96 beq 37b4 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 3958: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 395c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3960: e1a02005 mov r2, r5 <== NOT EXECUTED 3964: eb0005ad bl 5020 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 3968: e3500000 cmp r0, #0 <== NOT EXECUTED 396c: 0affffbc beq 3864 <== NOT EXECUTED 3970: eaffff8f b 37b4 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 3974: e1a00005 mov r0, r5 <== NOT EXECUTED 3978: e1a01004 mov r1, r4 <== NOT EXECUTED 397c: ebfffefc bl 3574 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3980: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3984: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3988: e1520003 cmp r2, r3 <== NOT EXECUTED 398c: a3a08000 movge r8, #0 <== NOT EXECUTED 3990: eaffffe9 b 393c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 3994: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 3998: e3530000 cmp r3, #0 <== NOT EXECUTED 399c: 0a000002 beq 39ac <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 39a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 39a4: e3130020 tst r3, #32 <== NOT EXECUTED 39a8: 0affffd0 beq 38f0 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 39ac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 39b0: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 39b4: e3a02001 mov r2, #1 <== NOT EXECUTED 39b8: e1a0e00f mov lr, pc <== NOT EXECUTED 39bc: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 39c0: eaffffd5 b 391c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 39c4: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 39c8: e3120002 tst r2, #2 <== NOT EXECUTED 39cc: 0a00000b beq 3a00 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 39d0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 39d4: e1a0e00f mov lr, pc <== NOT EXECUTED 39d8: e12fff13 bx r3 <== NOT EXECUTED if (n < 0) { 39dc: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 39e0: e1a01004 mov r1, r4 <== NOT EXECUTED 39e4: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { 39e8: ba00002d blt 3aa4 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 39ec: ebfffee0 bl 3574 <== NOT EXECUTED 39f0: e3500000 cmp r0, #0 <== NOT EXECUTED 39f4: 1affff6e bne 37b4 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 39f8: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED 39fc: eafffff3 b 39d0 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 3a00: eb0003de bl 4980 <== NOT EXECUTED 3a04: e1a05000 mov r5, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 3a08: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3a0c: e1a0e00f mov lr, pc <== NOT EXECUTED 3a10: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 3a14: e3500000 cmp r0, #0 <== NOT EXECUTED 3a18: ba00000c blt 3a50 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 3a1c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 3a20: e1a01004 mov r1, r4 <== NOT EXECUTED 3a24: ebfffed2 bl 3574 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3a28: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3a2c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3a30: e1520003 cmp r2, r3 <== NOT EXECUTED 3a34: aaffff5e bge 37b4 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 3a38: e3530000 cmp r3, #0 <== NOT EXECUTED 3a3c: 0afffff1 beq 3a08 <== NOT EXECUTED 3a40: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3a44: e3530000 cmp r3, #0 <== NOT EXECUTED 3a48: 0affffee beq 3a08 <== NOT EXECUTED 3a4c: eaffffeb b 3a00 <== NOT EXECUTED rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 3a50: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3a54: e3530000 cmp r3, #0 <== NOT EXECUTED 3a58: 0a000008 beq 3a80 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 3a5c: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3a60: e3530000 cmp r3, #0 <== NOT EXECUTED 3a64: 0a000002 beq 3a74 <== NOT EXECUTED 3a68: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3a6c: e3530000 cmp r3, #0 <== NOT EXECUTED 3a70: 1a000005 bne 3a8c <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 3a74: e3a00001 mov r0, #1 <== NOT EXECUTED 3a78: eb00069b bl 54ec <== NOT EXECUTED 3a7c: eaffffe1 b 3a08 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 3a80: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3a84: e3530000 cmp r3, #0 <== NOT EXECUTED 3a88: 0affff49 beq 37b4 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 3a8c: eb0003bb bl 4980 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 3a90: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 3a94: e0650000 rsb r0, r5, r0 <== NOT EXECUTED 3a98: e1500003 cmp r0, r3 <== NOT EXECUTED 3a9c: 9afffff4 bls 3a74 <== NOT EXECUTED 3aa0: eaffff43 b 37b4 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 3aa4: e3a00001 mov r0, #1 <== NOT EXECUTED 3aa8: eb00068f bl 54ec <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3aac: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED 3ab0: eaffffc6 b 39d0 <== NOT EXECUTED 0000290c : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 290c: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 2910: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 2914: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 2918: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 291c: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 2920: e2822001 add r2, r2, #1 <== NOT EXECUTED 2924: e1530002 cmp r3, r2 <== NOT EXECUTED * 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) { 2928: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 292c: e1a04000 mov r4, r0 <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 2930: 0a000046 beq 2a50 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 2934: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 2938: e2033003 and r3, r3, #3 <== NOT EXECUTED 293c: e3530002 cmp r3, #2 <== NOT EXECUTED 2940: 0a000054 beq 2a98 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 2944: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 2948: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 294c: e1520003 cmp r2, r3 <== NOT EXECUTED 2950: 0a00002a beq 2a00 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2954: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2958: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 295c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 2960: e3a02000 mov r2, #0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 2964: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED tty->t_dqlen = 0; 2968: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 296c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 2970: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2974: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2978: e0800003 add r0, r0, r3 <== NOT EXECUTED 297c: eb004db6 bl 1605c <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 2980: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2984: e3530002 cmp r3, #2 <== NOT EXECUTED rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 2988: e1a05000 mov r5, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 298c: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 2990: 0a00002b beq 2a44 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 2994: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2998: e1530005 cmp r3, r5 <== NOT EXECUTED 299c: 0a00001d beq 2a18 <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 29a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 29a4: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 29a8: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 29ac: 0a00004b beq 2ae0 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 29b0: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 29b4: e1550003 cmp r5, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 29b8: 85946088 ldrhi r6, [r4, #136] ; 0x88 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 29bc: 95946080 ldrls r6, [r4, #128] ; 0x80 <== NOT EXECUTED /* 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)) { 29c0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 29c4: 80656006 rsbhi r6, r5, r6 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 29c8: 90656006 rsbls r6, r5, r6 <== NOT EXECUTED /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 29cc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 29d0: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 29d4: 13a06001 movne r6, #1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 29d8: e3a03001 mov r3, #1 <== NOT EXECUTED 29dc: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED (*tty->device.write)(tty->minor, 29e0: e0811005 add r1, r1, r5 <== NOT EXECUTED 29e4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 29e8: e1a02006 mov r2, r6 <== NOT EXECUTED 29ec: e1a0e00f mov lr, pc <== NOT EXECUTED 29f0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 29f4: e5845084 str r5, [r4, #132] ; 0x84 <== NOT EXECUTED } return nToSend; } 29f8: e1a00006 mov r0, r6 <== NOT EXECUTED 29fc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 2a00: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 2a04: e3530002 cmp r3, #2 <== NOT EXECUTED 2a08: 0a00003f beq 2b0c <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2a0c: e3a06000 mov r6, #0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 2a10: e1a00006 mov r0, r6 <== NOT EXECUTED 2a14: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2a18: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2a1c: e3a06000 mov r6, #0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2a20: e3530000 cmp r3, #0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2a24: e5846094 str r6, [r4, #148] ; 0x94 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2a28: 01a06003 moveq r6, r3 <== NOT EXECUTED 2a2c: 0afffff0 beq 29f4 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 2a30: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2a34: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2a38: e1a0e00f mov lr, pc <== NOT EXECUTED 2a3c: e12fff13 bx r3 <== NOT EXECUTED 2a40: eaffffeb b 29f4 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2a44: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2a48: eb0009bc bl 5140 <== NOT EXECUTED 2a4c: eaffffd0 b 2994 <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 2a50: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 2a54: e3a02001 mov r2, #1 <== NOT EXECUTED 2a58: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2a5c: e1a0e00f mov lr, pc <== NOT EXECUTED 2a60: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2a64: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2a68: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2a6c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2a70: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2a74: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2a78: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2a7c: e3811002 orr r1, r1, #2 <== NOT EXECUTED 2a80: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2a84: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2a88: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2a8c: e3a06001 mov r6, #1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 2a90: e1a00006 mov r0, r6 <== NOT EXECUTED 2a94: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED * 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, 2a98: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 2a9c: e3a02001 mov r2, #1 <== NOT EXECUTED 2aa0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2aa4: e1a0e00f mov lr, pc <== NOT EXECUTED 2aa8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2aac: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2ab0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2ab4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2ab8: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2abc: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2ac0: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2ac4: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 2ac8: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2acc: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2ad0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2ad4: e3a06001 mov r6, #1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 2ad8: e1a00006 mov r0, r6 <== NOT EXECUTED 2adc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2ae0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2ae4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2ae8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 2aec: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2af0: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2af4: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 2af8: e3a02001 mov r2, #1 <== NOT EXECUTED 2afc: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2b00: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2b04: e3a06000 mov r6, #0 <== NOT EXECUTED 2b08: eaffffb9 b 29f4 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2b0c: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 2b10: eb00098a bl 5140 <== NOT EXECUTED 2b14: e3a06000 mov r6, #0 <== NOT EXECUTED 2b18: eaffffbc b 2a10 <== NOT EXECUTED 0000458c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 458c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 4590: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 4594: e1a04000 mov r4, r0 <== NOT EXECUTED 4598: e28d7007 add r7, sp, #7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 459c: e3a06000 mov r6, #0 <== NOT EXECUTED 45a0: e1a0300d mov r3, sp <== NOT EXECUTED 45a4: e3a01002 mov r1, #2 <== NOT EXECUTED 45a8: e3a02000 mov r2, #0 <== NOT EXECUTED 45ac: e3a00003 mov r0, #3 <== NOT EXECUTED 45b0: eb000112 bl 4a00 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 45b4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 45b8: e3130001 tst r3, #1 <== NOT EXECUTED 45bc: 1a000012 bne 460c <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 45c0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 45c4: e1a0e00f mov lr, pc <== NOT EXECUTED 45c8: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 45cc: e3700001 cmn r0, #1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 45d0: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 45d4: 0afffff1 beq 45a0 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 45d8: e1a01007 mov r1, r7 <== NOT EXECUTED 45dc: e3a02001 mov r2, #1 <== NOT EXECUTED 45e0: e1a00004 mov r0, r4 <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 45e4: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 45e8: ebfff965 bl 2b84 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 45ec: e1a0300d mov r3, sp <== NOT EXECUTED 45f0: e3a01002 mov r1, #2 <== NOT EXECUTED 45f4: e3a02000 mov r2, #0 <== NOT EXECUTED 45f8: e3a00003 mov r0, #3 <== NOT EXECUTED 45fc: eb0000ff bl 4a00 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 4600: e59d3000 ldr r3, [sp] <== NOT EXECUTED 4604: e3130001 tst r3, #1 <== NOT EXECUTED 4608: 0affffec beq 45c0 <== NOT EXECUTED tty->rxTaskId = 0; 460c: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4610: e1a00006 mov r0, r6 <== NOT EXECUTED 4614: eb000341 bl 5320 <== NOT EXECUTED 4618: eaffffe0 b 45a0 <== NOT EXECUTED 00002900 : void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 2900: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 2904: e3a01002 mov r1, #2 <== NOT EXECUTED 2908: ea00089a b 4b78 <== NOT EXECUTED 0000451c : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 451c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 4520: e59f6060 ldr r6, [pc, #96] ; 4588 <== NOT EXECUTED 4524: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 4528: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 452c: e3a07000 mov r7, #0 <== NOT EXECUTED 4530: e1a0300d mov r3, sp <== NOT EXECUTED 4534: e3a01002 mov r1, #2 <== NOT EXECUTED 4538: e3a02000 mov r2, #0 <== NOT EXECUTED 453c: e3a00003 mov r0, #3 <== NOT EXECUTED 4540: eb00012e bl 4a00 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 4544: e59d3000 ldr r3, [sp] <== NOT EXECUTED 4548: e3130001 tst r3, #1 <== NOT EXECUTED else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); 454c: e1a00004 mov r0, r4 <== NOT EXECUTED rtems_event_receive((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) { 4550: 1a000008 bne 4578 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4554: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 4558: e0863283 add r3, r6, r3, lsl #5 <== NOT EXECUTED 455c: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 4560: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 4564: 11a0e00f movne lr, pc <== NOT EXECUTED 4568: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 456c: e1a00004 mov r0, r4 <== NOT EXECUTED 4570: ebfff8e5 bl 290c <== NOT EXECUTED 4574: eaffffed b 4530 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 4578: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 457c: e1a00007 mov r0, r7 <== NOT EXECUTED 4580: eb000366 bl 5320 <== NOT EXECUTED 4584: eaffffe9 b 4530 <== NOT EXECUTED 000035d8 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 35d8: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 35dc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 35e0: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 35e4: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 35e8: e1a05000 mov r5, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 35ec: e1a02001 mov r2, r1 35f0: e5940018 ldr r0, [r4, #24] 35f4: eb000689 bl 5020 if (sc != RTEMS_SUCCESSFUL) 35f8: e2506000 subs r6, r0, #0 35fc: 1a00000c bne 3634 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 3600: e59420cc ldr r2, [r4, #204] ; 0xcc 3604: e59f3098 ldr r3, [pc, #152] ; 36a4 3608: e0833282 add r3, r3, r2, lsl #5 360c: e593300c ldr r3, [r3, #12] 3610: e3530000 cmp r3, #0 3614: 0a000008 beq 363c sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 3618: e1a01005 mov r1, r5 <== NOT EXECUTED 361c: e1a00004 mov r0, r4 <== NOT EXECUTED 3620: e1a0e00f mov lr, pc <== NOT EXECUTED 3624: e12fff13 bx r3 <== NOT EXECUTED 3628: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 362c: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 3630: eb0006c2 bl 5140 <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 3634: e1a00006 mov r0, r6 <== NOT EXECUTED 3638: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 363c: e5943034 ldr r3, [r4, #52] ; 0x34 3640: e3130001 tst r3, #1 3644: 0a000011 beq 3690 uint32_t count = args->count; 3648: e5958010 ldr r8, [r5, #16] char *buffer = args->buffer; while (count--) 364c: e3580000 cmp r8, #0 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 3650: e595a00c ldr sl, [r5, #12] while (count--) 3654: 01a03006 moveq r3, r6 3658: 0a000007 beq 367c 365c: e1a07006 mov r7, r6 oproc (*buffer++, tty); 3660: e7da0007 ldrb r0, [sl, r7] 3664: e1a01004 mov r1, r4 3668: e2877001 add r7, r7, #1 366c: ebfffe4d bl 2fa8 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 3670: e1580007 cmp r8, r7 3674: 1afffff9 bne 3660 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 3678: e5953010 ldr r3, [r5, #16] 367c: e5853018 str r3, [r5, #24] } rtems_semaphore_release (tty->osem); 3680: e5940018 ldr r0, [r4, #24] 3684: eb0006ad bl 5140 return sc; } 3688: e1a00006 mov r0, r6 368c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 3690: e285000c add r0, r5, #12 <== NOT EXECUTED 3694: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3698: e1a02004 mov r2, r4 <== NOT EXECUTED 369c: ebfffdf9 bl 2e88 <== NOT EXECUTED 36a0: eafffff4 b 3678 <== NOT EXECUTED 00006b14 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 6b14: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 6b18: e2108202 ands r8, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 6b1c: e1a04000 mov r4, r0 <== NOT EXECUTED 6b20: e1a09001 mov r9, r1 <== NOT EXECUTED 6b24: e1a07002 mov r7, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 6b28: 0a00000c beq 6b60 <== NOT EXECUTED { if (rtems_panic_in_progress++) 6b2c: e59f2160 ldr r2, [pc, #352] ; 6c94 <== NOT EXECUTED 6b30: e5923000 ldr r3, [r2] <== NOT EXECUTED 6b34: e3530000 cmp r3, #0 <== NOT EXECUTED 6b38: e2833001 add r3, r3, #1 <== NOT EXECUTED 6b3c: e5823000 str r3, [r2] <== NOT EXECUTED 6b40: 0a000004 beq 6b58 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 6b44: e59f314c ldr r3, [pc, #332] ; 6c98 <== NOT EXECUTED 6b48: e5931000 ldr r1, [r3] <== NOT EXECUTED 6b4c: e2811001 add r1, r1, #1 <== NOT EXECUTED 6b50: e5831000 str r1, [r3] <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 6b54: e5923000 ldr r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 6b58: e3530002 cmp r3, #2 <== NOT EXECUTED 6b5c: ca00002e bgt 6c1c <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 6b60: e59f5134 ldr r5, [pc, #308] ; 6c9c <== NOT EXECUTED 6b64: e5953000 ldr r3, [r5] <== NOT EXECUTED 6b68: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 6b6c: eb0033cc bl 13aa4 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 6b70: e2146101 ands r6, r4, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 6b74: e3c4a207 bic sl, r4, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 6b78: 1a000038 bne 6c60 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 6b7c: e5953000 ldr r3, [r5] <== NOT EXECUTED 6b80: e1a02007 mov r2, r7 <== NOT EXECUTED 6b84: e1a01009 mov r1, r9 <== NOT EXECUTED 6b88: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6b8c: eb004c05 bl 19ba8 <== NOT EXECUTED if (status) 6b90: e35a0000 cmp sl, #0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 6b94: e1a07000 mov r7, r0 <== NOT EXECUTED if (status) 6b98: 1a000025 bne 6c34 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 6b9c: e3560000 cmp r6, #0 <== NOT EXECUTED 6ba0: 0a00000b beq 6bd4 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 6ba4: da000004 ble 6bbc <== NOT EXECUTED 6ba8: e1a00006 mov r0, r6 <== NOT EXECUTED 6bac: eb00378d bl 149e8 <== NOT EXECUTED 6bb0: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 6bb4: e3530000 cmp r3, #0 <== NOT EXECUTED 6bb8: 1a00002b bne 6c6c <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 6bbc: e5953000 ldr r3, [r5] <== NOT EXECUTED 6bc0: e59f10d8 ldr r1, [pc, #216] ; 6ca0 <== NOT EXECUTED 6bc4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6bc8: e1a02006 mov r2, r6 <== NOT EXECUTED 6bcc: eb003472 bl 13d9c <== NOT EXECUTED 6bd0: e0877000 add r7, r7, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 6bd4: e5953000 ldr r3, [r5] <== NOT EXECUTED 6bd8: e59f10c4 ldr r1, [pc, #196] ; 6ca4 <== NOT EXECUTED 6bdc: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6be0: eb00346d bl 13d9c <== NOT EXECUTED (void) fflush(stderr); 6be4: e5953000 ldr r3, [r5] <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 6be8: e1a0a000 mov sl, r0 <== NOT EXECUTED (void) fflush(stderr); 6bec: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6bf0: eb0033ab bl 13aa4 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 6bf4: e3140203 tst r4, #805306368 ; 0x30000000 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 6bf8: 008a0007 addeq r0, sl, r7 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 6bfc: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 6c00: e3580000 cmp r8, #0 <== NOT EXECUTED 6c04: 0a000006 beq 6c24 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 6c08: e3a00000 mov r0, #0 <== NOT EXECUTED 6c0c: e59f1094 ldr r1, [pc, #148] ; 6ca8 <== NOT EXECUTED 6c10: eb000035 bl 6cec <== NOT EXECUTED _exit(local_errno); 6c14: e1a00006 mov r0, r6 <== NOT EXECUTED 6c18: eb00031f bl 789c <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); abort(); 6c1c: e3a00000 mov r0, #0 <== NOT EXECUTED } } return chars_written; } 6c20: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 6c24: e59f1080 ldr r1, [pc, #128] ; 6cac <== NOT EXECUTED 6c28: e1a00008 mov r0, r8 <== NOT EXECUTED 6c2c: eb00002e bl 6cec <== NOT EXECUTED abort(); 6c30: eb00329f bl 136b4 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 6c34: e59f3060 ldr r3, [pc, #96] ; 6c9c <== NOT EXECUTED 6c38: e5933000 ldr r3, [r3] <== NOT EXECUTED 6c3c: e1a0000a mov r0, sl <== NOT EXECUTED 6c40: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED 6c44: ebffffae bl 6b04 <== NOT EXECUTED 6c48: e59f1060 ldr r1, [pc, #96] ; 6cb0 <== NOT EXECUTED 6c4c: e1a02000 mov r2, r0 <== NOT EXECUTED 6c50: e1a0000a mov r0, sl <== NOT EXECUTED 6c54: eb003450 bl 13d9c <== NOT EXECUTED 6c58: e0877000 add r7, r7, r0 <== NOT EXECUTED 6c5c: eaffffce b 6b9c <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 6c60: eb00329c bl 136d8 <__errno> <== NOT EXECUTED 6c64: e5906000 ldr r6, [r0] <== NOT EXECUTED 6c68: eaffffc3 b 6b7c <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 6c6c: e5953000 ldr r3, [r5] <== NOT EXECUTED 6c70: e1a00006 mov r0, r6 <== NOT EXECUTED 6c74: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED 6c78: eb00375a bl 149e8 <== NOT EXECUTED 6c7c: e59f1030 ldr r1, [pc, #48] ; 6cb4 <== NOT EXECUTED 6c80: e1a02000 mov r2, r0 <== NOT EXECUTED 6c84: e1a0000a mov r0, sl <== NOT EXECUTED 6c88: eb003443 bl 13d9c <== NOT EXECUTED 6c8c: e0877000 add r7, r7, r0 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 6c90: eaffffcf b 6bd4 <== NOT EXECUTED 00002304 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2304: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2308: e3a06000 mov r6, #0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 230c: e59f90e8 ldr r9, [pc, #232] ; 23fc limit++; continue; } sign = 1; } if (!isdigit(c)) 2310: e59f80e8 ldr r8, [pc, #232] ; 2400 return 0; d = c - '0'; if ((i > (limit / 10)) 2314: e59fa0e8 ldr sl, [pc, #232] ; 2404 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2318: e1a04000 mov r4, r0 231c: e1a0b001 mov fp, r1 2320: e3e07102 mvn r7, #-2147483648 ; 0x80000000 2324: e1a05006 mov r5, r6 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2328: e5943004 ldr r3, [r4, #4] 232c: e2433001 sub r3, r3, #1 2330: e3530000 cmp r3, #0 2334: e5843004 str r3, [r4, #4] 2338: ba00001d blt 23b4 233c: e5943000 ldr r3, [r4] 2340: e4d30001 ldrb r0, [r3], #1 if (c == ':') 2344: e350003a cmp r0, #58 ; 0x3a unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2348: e5843000 str r3, [r4] if (c == ':') 234c: 0a00001d beq 23c8 break; if (sign == 0) { 2350: e3560000 cmp r6, #0 2354: 1a000004 bne 236c if (c == '-') { 2358: e350002d cmp r0, #45 ; 0x2d sign = -1; limit++; 235c: 02877001 addeq r7, r7, #1 2360: 03e06000 mvneq r6, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 2364: 0affffef beq 2328 sign = -1; limit++; continue; 2368: e3a06001 mov r6, #1 } sign = 1; } if (!isdigit(c)) 236c: e5983000 ldr r3, [r8] 2370: e0833000 add r3, r3, r0 2374: e5d33001 ldrb r3, [r3, #1] 2378: e3130004 tst r3, #4 237c: 0a00001c beq 23f4 return 0; d = c - '0'; if ((i > (limit / 10)) 2380: e083279a umull r2, r3, sl, r7 2384: e15501a3 cmp r5, r3, lsr #3 2388: 8a000019 bhi 23f4 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 238c: e2400030 sub r0, r0, #48 ; 0x30 2390: 11a03105 lslne r3, r5, #2 if ((i > (limit / 10)) 2394: 0a000011 beq 23e0 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 2398: e0835005 add r5, r3, r5 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 239c: e5943004 ldr r3, [r4, #4] 23a0: e2433001 sub r3, r3, #1 23a4: e3530000 cmp r3, #0 return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 23a8: e0805085 add r5, r0, r5, lsl #1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 23ac: e5843004 str r3, [r4, #4] 23b0: aaffffe1 bge 233c 23b4: e5990000 ldr r0, [r9] <== NOT EXECUTED 23b8: e1a01004 mov r1, r4 <== NOT EXECUTED 23bc: eb003740 bl 100c4 <__srget_r> <== NOT EXECUTED if (c == ':') 23c0: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 23c4: 1affffe1 bne 2350 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 23c8: e3560000 cmp r6, #0 23cc: 0a000008 beq 23f4 return 0; *val = i * sign; 23d0: e0030695 mul r3, r5, r6 23d4: e3a00001 mov r0, #1 23d8: e58b3000 str r3, [fp] return 1; 23dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 23e0: e1a03105 lsl r3, r5, #2 <== NOT EXECUTED 23e4: e0832005 add r2, r3, r5 <== NOT EXECUTED 23e8: e0472082 sub r2, r7, r2, lsl #1 <== NOT EXECUTED 23ec: e1500002 cmp r0, r2 <== NOT EXECUTED 23f0: 9affffe8 bls 2398 <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 23f4: e3a00000 mov r0, #0 <== NOT EXECUTED } 23f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00002408 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2408: e92d41f0 push {r4, r5, r6, r7, r8, lr} 240c: e1a05002 mov r5, r2 int c; *name = *bufp; 2410: e5922000 ldr r2, [r2] /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2414: e59d7018 ldr r7, [sp, #24] int c; *name = *bufp; 2418: e5812000 str r2, [r1] for (;;) { c = getc(fp); 241c: e59f60c4 ldr r6, [pc, #196] ; 24e8 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2420: e1a04000 mov r4, r0 2424: e1a08003 mov r8, r3 2428: ea000013 b 247c int c; *name = *bufp; for (;;) { c = getc(fp); 242c: e5943000 ldr r3, [r4] 2430: e4d30001 ldrb r0, [r3], #1 if (c == ':') { 2434: e350003a cmp r0, #58 ; 0x3a { int c; *name = *bufp; for (;;) { c = getc(fp); 2438: e5843000 str r3, [r4] if (c == ':') { 243c: 0a000018 beq 24a4 if (nlFlag) return 0; break; } if (c == '\n') { 2440: e350000a cmp r0, #10 2444: 0a000023 beq 24d8 if (!nlFlag) return 0; break; } if (c == EOF) 2448: e3700001 cmn r0, #1 244c: 0a000023 beq 24e0 return 0; if (*nleft < 2) 2450: e5983000 ldr r3, [r8] 2454: e3530001 cmp r3, #1 2458: 9a000020 bls 24e0 return 0; **bufp = c; 245c: e5953000 ldr r3, [r5] 2460: e5c30000 strb r0, [r3] ++(*bufp); 2464: e5952000 ldr r2, [r5] --(*nleft); 2468: e5983000 ldr r3, [r8] if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 246c: e2822001 add r2, r2, #1 --(*nleft); 2470: e2433001 sub r3, r3, #1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 2474: e5852000 str r2, [r5] --(*nleft); 2478: e5883000 str r3, [r8] { int c; *name = *bufp; for (;;) { c = getc(fp); 247c: e5943004 ldr r3, [r4, #4] 2480: e2433001 sub r3, r3, #1 2484: e3530000 cmp r3, #0 2488: e5843004 str r3, [r4, #4] 248c: aaffffe6 bge 242c 2490: e5960000 ldr r0, [r6] 2494: e1a01004 mov r1, r4 2498: eb003709 bl 100c4 <__srget_r> if (c == ':') { 249c: e350003a cmp r0, #58 ; 0x3a 24a0: 1affffe6 bne 2440 if (nlFlag) 24a4: e3570000 cmp r7, #0 24a8: 1a00000c bne 24e0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 24ac: e5953000 ldr r3, [r5] 24b0: e3a02000 mov r2, #0 24b4: e5c32000 strb r2, [r3] ++(*bufp); 24b8: e5952000 ldr r2, [r5] --(*nleft); 24bc: e5983000 ldr r3, [r8] **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 24c0: e2822001 add r2, r2, #1 --(*nleft); 24c4: e2433001 sub r3, r3, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 24c8: e5852000 str r2, [r5] --(*nleft); 24cc: e5883000 str r3, [r8] 24d0: e3a00001 mov r0, #1 return 1; 24d4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 24d8: e3570000 cmp r7, #0 24dc: 1afffff2 bne 24ac --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 24e0: e3a00000 mov r0, #0 <== NOT EXECUTED } 24e4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 000024ec : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 24ec: e92d41f0 push {r4, r5, r6, r7, r8, lr} 24f0: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 24f4: e28d5008 add r5, sp, #8 24f8: e28d4004 add r4, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 24fc: e58d2008 str r2, [sp, #8] 2500: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2504: e3a06000 mov r6, #0 2508: e1a02005 mov r2, r5 250c: e1a03004 mov r3, r4 2510: e58d6000 str r6, [sp] FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2514: e1a07000 mov r7, r0 2518: e1a08001 mov r8, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 251c: ebffffb9 bl 2408 2520: e1500006 cmp r0, r6 2524: 1a000002 bne 2534 *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 2528: e3a00000 mov r0, #0 <== NOT EXECUTED } 252c: e28dd014 add sp, sp, #20 2530: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 2534: e1a00007 mov r0, r7 2538: e2881004 add r1, r8, #4 253c: e1a02005 mov r2, r5 2540: e1a03004 mov r3, r4 2544: e58d6000 str r6, [sp] 2548: ebffffae bl 2408 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 254c: e1500006 cmp r0, r6 2550: 0afffff4 beq 2528 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 2554: e1a00007 mov r0, r7 2558: e28d1010 add r1, sp, #16 255c: ebffff68 bl 2304 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2560: e1500006 cmp r0, r6 2564: 0affffef beq 2528 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 2568: e1a03004 mov r3, r4 256c: e1a00007 mov r0, r7 2570: e1a02005 mov r2, r5 2574: e3a04001 mov r4, #1 2578: e28d100c add r1, sp, #12 257c: e58d4000 str r4, [sp] 2580: ebffffa0 bl 2408 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2584: e1500006 cmp r0, r6 2588: 0affffe6 beq 2528 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 258c: e1dd31b0 ldrh r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2590: e59d100c ldr r1, [sp, #12] if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 2594: e1c830b8 strh r3, [r8, #8] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2598: e5d13000 ldrb r3, [r1] 259c: e1530006 cmp r3, r6 25a0: 03a04017 moveq r4, #23 25a4: 0a000007 beq 25c8 25a8: e1a02001 mov r2, r1 if(*cp == ',') 25ac: e353002c cmp r3, #44 ; 0x2c grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25b0: e5f23001 ldrb r3, [r2, #1]! if(*cp == ',') memcount++; 25b4: 02844001 addeq r4, r4, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25b8: e3530000 cmp r3, #0 25bc: 1afffffa bne 25ac 25c0: e1a04104 lsl r4, r4, #2 25c4: e2844013 add r4, r4, #19 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 25c8: e59d3004 ldr r3, [sp, #4] 25cc: e1530004 cmp r3, r4 25d0: 3affffd4 bcc 2528 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 25d4: e59d3008 ldr r3, [sp, #8] 25d8: e283300f add r3, r3, #15 25dc: e3c3300f bic r3, r3, #15 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 25e0: e5831000 str r1, [r3] /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 25e4: e588300c str r3, [r8, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25e8: e59d200c ldr r2, [sp, #12] 25ec: e5d23000 ldrb r3, [r2] 25f0: e3530000 cmp r3, #0 25f4: 03a01004 moveq r1, #4 25f8: 0a00000b beq 262c 25fc: e2822001 add r2, r2, #1 2600: e3a01001 mov r1, #1 if(*cp == ',') { *cp = '\0'; 2604: e3a00000 mov r0, #0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 2608: e353002c cmp r3, #44 ; 0x2c *cp = '\0'; 260c: 05420001 strbeq r0, [r2, #-1] grp->gr_mem[memcount++] = cp + 1; 2610: 0598300c ldreq r3, [r8, #12] 2614: 07832101 streq r2, [r3, r1, lsl #2] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2618: e4d23001 ldrb r3, [r2], #1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 261c: 02811001 addeq r1, r1, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2620: e3530000 cmp r3, #0 2624: 1afffff7 bne 2608 2628: e1a01101 lsl r1, r1, #2 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 262c: e598300c ldr r3, [r8, #12] 2630: e3a02000 mov r2, #0 2634: e7832001 str r2, [r3, r1] 2638: e3a00001 mov r0, #1 return 1; 263c: eaffffba b 252c 00002680 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 2680: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2684: e24dd014 sub sp, sp, #20 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2688: e28d5008 add r5, sp, #8 268c: e28d4004 add r4, sp, #4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 2690: e58d2008 str r2, [sp, #8] 2694: e58d3004 str r3, [sp, #4] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2698: e3a06000 mov r6, #0 269c: e1a02005 mov r2, r5 26a0: e1a03004 mov r3, r4 26a4: e58d6000 str r6, [sp] FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 26a8: e1a07000 mov r7, r0 26ac: e1a08001 mov r8, r1 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 26b0: ebffff54 bl 2408 26b4: e1500006 cmp r0, r6 26b8: 1a000002 bne 26c8 || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 26bc: e3a00000 mov r0, #0 <== NOT EXECUTED } 26c0: e28dd014 add sp, sp, #20 26c4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 26c8: e1a00007 mov r0, r7 26cc: e2881004 add r1, r8, #4 26d0: e1a02005 mov r2, r5 26d4: e1a03004 mov r3, r4 26d8: e58d6000 str r6, [sp] 26dc: ebffff49 bl 2408 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 26e0: e1500006 cmp r0, r6 26e4: 0afffff4 beq 26bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 26e8: e1a00007 mov r0, r7 26ec: e28d1010 add r1, sp, #16 26f0: ebffff03 bl 2304 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 26f4: e1500006 cmp r0, r6 26f8: 0affffef beq 26bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 26fc: e1a00007 mov r0, r7 2700: e28d100c add r1, sp, #12 2704: ebfffefe bl 2304 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2708: e1500006 cmp r0, r6 270c: 0affffea beq 26bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 2710: e1a00007 mov r0, r7 2714: e288100c add r1, r8, #12 2718: e1a02005 mov r2, r5 271c: e1a03004 mov r3, r4 2720: e58d6000 str r6, [sp] 2724: ebffff37 bl 2408 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2728: e1500006 cmp r0, r6 272c: 0affffe2 beq 26bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 2730: e1a00007 mov r0, r7 2734: e2881010 add r1, r8, #16 2738: e1a02005 mov r2, r5 273c: e1a03004 mov r3, r4 2740: e58d6000 str r6, [sp] 2744: ebffff2f bl 2408 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2748: e1500006 cmp r0, r6 274c: 0affffda beq 26bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 2750: e1a00007 mov r0, r7 2754: e2881014 add r1, r8, #20 2758: e1a02005 mov r2, r5 275c: e1a03004 mov r3, r4 2760: e58d6000 str r6, [sp] 2764: ebffff27 bl 2408 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2768: e1500006 cmp r0, r6 276c: 0affffd2 beq 26bc || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 2770: e1a03004 mov r3, r4 2774: e1a00007 mov r0, r7 2778: e1a02005 mov r2, r5 277c: e3a04001 mov r4, #1 2780: e2881018 add r1, r8, #24 2784: e58d4000 str r4, [sp] 2788: ebffff1e bl 2408 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 278c: e1500006 cmp r0, r6 2790: 0affffc9 beq 26bc || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 2794: e1dd30bc ldrh r3, [sp, #12] 2798: e1c830ba strh r3, [r8, #10] || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 279c: e1dd31b0 ldrh r3, [sp, #16] pwd->pw_gid = pwgid; 27a0: e1a00004 mov r0, r4 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 27a4: e1c830b8 strh r3, [r8, #8] pwd->pw_gid = pwgid; return 1; 27a8: eaffffc4 b 26c0 000028cc : return NULL; return &grent; } void setgrent(void) { 28cc: e92d4010 push {r4, lr} <== NOT EXECUTED init_etc_passwd_group(); if (group_fp != NULL) 28d0: e59f4020 ldr r4, [pc, #32] ; 28f8 <== NOT EXECUTED return &grent; } void setgrent(void) { init_etc_passwd_group(); 28d4: ebffffc4 bl 27ec <== NOT EXECUTED if (group_fp != NULL) 28d8: e5940000 ldr r0, [r4] <== NOT EXECUTED 28dc: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(group_fp); 28e0: 1b0030f9 blne eccc <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 28e4: e59f0010 ldr r0, [pc, #16] ; 28fc <== NOT EXECUTED 28e8: e59f1010 ldr r1, [pc, #16] ; 2900 <== NOT EXECUTED 28ec: eb0032ae bl f3ac <== NOT EXECUTED 28f0: e5840000 str r0, [r4] <== NOT EXECUTED } 28f4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00002ac4 : return NULL; return &pwent; } void setpwent(void) { 2ac4: e92d4010 push {r4, lr} <== NOT EXECUTED init_etc_passwd_group(); if (passwd_fp != NULL) 2ac8: e59f4020 ldr r4, [pc, #32] ; 2af0 <== NOT EXECUTED return &pwent; } void setpwent(void) { init_etc_passwd_group(); 2acc: ebffff46 bl 27ec <== NOT EXECUTED if (passwd_fp != NULL) 2ad0: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 2ad4: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(passwd_fp); 2ad8: 1b00307b blne eccc <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 2adc: e59f0010 ldr r0, [pc, #16] ; 2af4 <== NOT EXECUTED 2ae0: e59f1010 ldr r1, [pc, #16] ; 2af8 <== NOT EXECUTED 2ae4: eb003230 bl f3ac <== NOT EXECUTED 2ae8: e5840004 str r0, [r4, #4] <== NOT EXECUTED } 2aec: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00003574 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 3574: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 3578: e3c33f61 bic r3, r3, #388 ; 0x184 <== NOT EXECUTED 357c: e3c33003 bic r3, r3, #3 <== NOT EXECUTED 3580: e1a03a03 lsl r3, r3, #20 <== NOT EXECUTED 3584: e1a03a23 lsr r3, r3, #20 <== NOT EXECUTED 3588: e3530000 cmp r3, #0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 358c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3590: e1a04001 mov r4, r1 <== NOT EXECUTED 3594: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 3598: 1a000002 bne 35a8 <== 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); 359c: e1a00005 mov r0, r5 <== NOT EXECUTED } return i; } 35a0: 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); 35a4: eaffff80 b 33ac <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 35a8: e3a01000 mov r1, #0 <== NOT EXECUTED 35ac: e1a02001 mov r2, r1 <== NOT EXECUTED 35b0: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 35b4: eb000699 bl 5020 <== NOT EXECUTED i = iproc (c, tty); 35b8: e1a01004 mov r1, r4 <== NOT EXECUTED 35bc: e1a00005 mov r0, r5 <== NOT EXECUTED 35c0: ebffff79 bl 33ac <== NOT EXECUTED 35c4: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 35c8: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 35cc: eb0006db bl 5140 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 35d0: e1a00005 mov r0, r5 <== NOT EXECUTED 35d4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00004200 : int _STAT_NAME( const char *path, struct stat *buf ) { 4200: e92d4070 push {r4, r5, r6, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 4204: e2515000 subs r5, r1, #0 int _STAT_NAME( const char *path, struct stat *buf ) { 4208: e24dd018 sub sp, sp, #24 420c: e1a06000 mov r6, r0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 4210: 0a00002f beq 42d4 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 4214: eb00333c bl 10f0c 4218: e28d4004 add r4, sp, #4 421c: e1a01000 mov r1, r0 4220: e3a0c001 mov ip, #1 4224: e1a00006 mov r0, r6 4228: e3a02000 mov r2, #0 422c: e1a03004 mov r3, r4 4230: e58dc000 str ip, [sp] 4234: ebfff9cf bl 2978 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 4238: e2501000 subs r1, r0, #0 423c: 1a000022 bne 42cc return -1; if ( !loc.handlers->fstat_h ){ 4240: e59d300c ldr r3, [sp, #12] 4244: e5933018 ldr r3, [r3, #24] 4248: e3530000 cmp r3, #0 424c: 0a000013 beq 42a0 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 4250: e3a02048 mov r2, #72 ; 0x48 4254: e1a00005 mov r0, r5 4258: eb0030d2 bl 105a8 status = (*loc.handlers->fstat_h)( &loc, buf ); 425c: e1a01005 mov r1, r5 4260: e59d300c ldr r3, [sp, #12] 4264: e1a00004 mov r0, r4 4268: e1a0e00f mov lr, pc 426c: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 4270: e59d3010 ldr r3, [sp, #16] 4274: e3530000 cmp r3, #0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 4278: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 427c: 0a000004 beq 4294 4280: e593301c ldr r3, [r3, #28] 4284: e3530000 cmp r3, #0 4288: 11a00004 movne r0, r4 428c: 11a0e00f movne lr, pc 4290: 112fff13 bxne r3 return status; } 4294: e1a00005 mov r0, r5 4298: e28dd018 add sp, sp, #24 429c: e8bd8070 pop {r4, r5, r6, pc} 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 42a0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 42a4: e3530000 cmp r3, #0 <== NOT EXECUTED 42a8: 0a000004 beq 42c0 <== NOT EXECUTED 42ac: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 42b0: e3530000 cmp r3, #0 <== NOT EXECUTED 42b4: 11a00004 movne r0, r4 <== NOT EXECUTED 42b8: 11a0e00f movne lr, pc <== NOT EXECUTED 42bc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42c0: eb002bfa bl f2b0 <__errno> <== NOT EXECUTED 42c4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 42c8: e5803000 str r3, [r0] <== NOT EXECUTED 42cc: e3e05000 mvn r5, #0 42d0: eaffffef b 4294 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 42d4: eb002bf5 bl f2b0 <__errno> 42d8: e3a0300e mov r3, #14 42dc: e5803000 str r3, [r0] 42e0: e3e05000 mvn r5, #0 42e4: eaffffea b 4294 00004404 : int symlink( const char *actualpath, const char *sympath ) { 4404: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4408: e5d13000 ldrb r3, [r1] 440c: e353002f cmp r3, #47 ; 0x2f 4410: 1353005c cmpne r3, #92 ; 0x5c int symlink( const char *actualpath, const char *sympath ) { 4414: e24dd018 sub sp, sp, #24 4418: e1a0e001 mov lr, r1 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 441c: 13a06000 movne r6, #0 4420: 03a06001 moveq r6, #1 int symlink( const char *actualpath, const char *sympath ) { 4424: e1a05000 mov r5, r0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4428: 0a000001 beq 4434 442c: e3530000 cmp r3, #0 4430: 1a000029 bne 44dc 4434: e59f3104 ldr r3, [pc, #260] ; 4540 4438: e593c000 ldr ip, [r3] 443c: e28cc018 add ip, ip, #24 4440: e8bc000f ldm ip!, {r0, r1, r2, r3} 4444: e1a0600d mov r6, sp 4448: e8a6000f stmia r6!, {r0, r1, r2, r3} if ( !loc.ops->evalformake_h ) { 444c: e59d300c ldr r3, [sp, #12] 4450: e5933004 ldr r3, [r3, #4] rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4454: e59c2000 ldr r2, [ip] if ( !loc.ops->evalformake_h ) { 4458: e3530000 cmp r3, #0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 445c: e5862000 str r2, [r6] 4460: e1a0400d mov r4, sp 4464: e3a06001 mov r6, #1 if ( !loc.ops->evalformake_h ) { 4468: 0a000028 beq 4510 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 446c: e08e0006 add r0, lr, r6 4470: e1a0100d mov r1, sp 4474: e28d2014 add r2, sp, #20 4478: e1a0e00f mov lr, pc 447c: e12fff13 bx r3 if ( result != 0 ) 4480: e3500000 cmp r0, #0 4484: 1a000024 bne 451c return -1; if ( !loc.ops->symlink_h ) { 4488: e59d200c ldr r2, [sp, #12] 448c: e5923038 ldr r3, [r2, #56] ; 0x38 4490: e3530000 cmp r3, #0 4494: 0a000022 beq 4524 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 4498: e1a01005 mov r1, r5 449c: e1a0000d mov r0, sp 44a0: e59d2014 ldr r2, [sp, #20] 44a4: e1a0e00f mov lr, pc 44a8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 44ac: e59d300c ldr r3, [sp, #12] 44b0: e3530000 cmp r3, #0 if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 44b4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 44b8: 0a000004 beq 44d0 44bc: e593301c ldr r3, [r3, #28] 44c0: e3530000 cmp r3, #0 44c4: 11a0000d movne r0, sp 44c8: 11a0e00f movne lr, pc 44cc: 112fff13 bxne r3 return result; } 44d0: e1a00005 mov r0, r5 44d4: e28dd018 add sp, sp, #24 44d8: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 44dc: e59f305c ldr r3, [pc, #92] ; 4540 44e0: e593c000 ldr ip, [r3] 44e4: e28cc004 add ip, ip, #4 44e8: e8bc000f ldm ip!, {r0, r1, r2, r3} 44ec: e1a0700d mov r7, sp 44f0: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->evalformake_h ) { 44f4: e59d300c ldr r3, [sp, #12] 44f8: e5933004 ldr r3, [r3, #4] rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 44fc: e59c2000 ldr r2, [ip] if ( !loc.ops->evalformake_h ) { 4500: e3530000 cmp r3, #0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4504: e1a0400d mov r4, sp 4508: e5872000 str r2, [r7] if ( !loc.ops->evalformake_h ) { 450c: 1affffd6 bne 446c if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4510: eb002b86 bl f330 <__errno> <== NOT EXECUTED 4514: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4518: e5803000 str r3, [r0] <== NOT EXECUTED 451c: e3e05000 mvn r5, #0 4520: eaffffea b 44d0 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 4524: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 4528: e3530000 cmp r3, #0 <== NOT EXECUTED 452c: 0afffff7 beq 4510 <== NOT EXECUTED 4530: e1a0000d mov r0, sp <== NOT EXECUTED 4534: e1a0e00f mov lr, pc <== NOT EXECUTED 4538: e12fff13 bx r3 <== NOT EXECUTED 453c: eafffff3 b 4510 <== NOT EXECUTED 00003e7c : int fd, int opt, struct termios *tp ) { switch (opt) { 3e7c: e3510000 cmp r1, #0 int tcsetattr( int fd, int opt, struct termios *tp ) { 3e80: e92d4030 push {r4, r5, lr} 3e84: e1a04002 mov r4, r2 3e88: e1a05000 mov r5, r0 switch (opt) { 3e8c: 0a00000b beq 3ec0 3e90: e3510001 cmp r1, #1 <== NOT EXECUTED 3e94: 0a000004 beq 3eac <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 3e98: eb0028b7 bl e17c <__errno> <== NOT EXECUTED 3e9c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3ea0: e5803000 str r3, [r0] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 3ea4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3ea8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 3eac: e3a01003 mov r1, #3 <== NOT EXECUTED 3eb0: e3a02000 mov r2, #0 <== NOT EXECUTED 3eb4: eb001dfc bl b6ac <== NOT EXECUTED 3eb8: e3500000 cmp r0, #0 <== NOT EXECUTED 3ebc: bafffff8 blt 3ea4 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 3ec0: e1a00005 mov r0, r5 3ec4: e1a02004 mov r2, r4 3ec8: e3a01002 mov r1, #2 } } 3ecc: e8bd4030 pop {r4, r5, lr} return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 3ed0: ea001df5 b b6ac 0000c5f0 : #include int unlink( const char *path ) { c5f0: e92d40f0 push {r4, r5, r6, r7, lr} c5f4: e24dd02c sub sp, sp, #44 ; 0x2c c5f8: e1a05000 mov r5, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); c5fc: ebffd4ab bl 18b0 if ( parentpathlen == 0 ) c600: e2507000 subs r7, r0, #0 c604: 1a00007d bne c800 rtems_filesystem_get_start_loc( path, &i, &parentloc ); c608: e5d53000 ldrb r3, [r5] c60c: e353002f cmp r3, #47 ; 0x2f c610: 1353005c cmpne r3, #92 ; 0x5c c614: 1a000049 bne c740 c618: e59f326c ldr r3, [pc, #620] ; c88c c61c: e593c000 ldr ip, [r3] c620: e28cc018 add ip, ip, #24 c624: e8bc000f ldm ip!, {r0, r1, r2, r3} c628: e28d4018 add r4, sp, #24 c62c: e1a0e004 mov lr, r4 c630: e8ae000f stmia lr!, {r0, r1, r2, r3} c634: e59c2000 ldr r2, [ip] c638: e58e2000 str r2, [lr] c63c: e3a06000 mov r6, #0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; c640: e1a0e004 mov lr, r4 c644: e8be000f ldm lr!, {r0, r1, r2, r3} c648: e28dc004 add ip, sp, #4 c64c: e8ac000f stmia ip!, {r0, r1, r2, r3} c650: e59e3000 ldr r3, [lr] name = path + parentpathlen; c654: e0855007 add r5, r5, r7 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; c658: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); c65c: e1a00005 mov r0, r5 c660: eb0004a7 bl d904 c664: e1a01000 mov r1, r0 c668: e1a00005 mov r0, r5 c66c: ebffd47b bl 1860 c670: e0857000 add r7, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), c674: e1a00007 mov r0, r7 c678: eb0004a1 bl d904 c67c: e28d5004 add r5, sp, #4 c680: e3a0c000 mov ip, #0 c684: e1a01000 mov r1, r0 c688: e1a0200c mov r2, ip c68c: e1a00007 mov r0, r7 c690: e1a03005 mov r3, r5 c694: e58dc000 str ip, [sp] c698: ebffd49e bl 1918 0, &loc, false ); if ( result != 0 ) { c69c: e3500000 cmp r0, #0 c6a0: 1a000033 bne c774 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { c6a4: e59d2010 ldr r2, [sp, #16] c6a8: e5923010 ldr r3, [r2, #16] c6ac: e3530000 cmp r3, #0 c6b0: 0a00003e beq c7b0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { c6b4: e1a00005 mov r0, r5 c6b8: e1a0e00f mov lr, pc c6bc: e12fff13 bx r3 c6c0: e3500001 cmp r0, #1 c6c4: 0a000059 beq c830 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { c6c8: e59d2010 ldr r2, [sp, #16] c6cc: e592300c ldr r3, [r2, #12] c6d0: e3530000 cmp r3, #0 c6d4: 0a000035 beq c7b0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c6d8: e1a00004 mov r0, r4 c6dc: e1a01005 mov r1, r5 c6e0: e1a0e00f mov lr, pc c6e4: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); c6e8: e59d3010 ldr r3, [sp, #16] c6ec: e3530000 cmp r3, #0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c6f0: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); c6f4: 0a000004 beq c70c c6f8: e593301c ldr r3, [r3, #28] c6fc: e3530000 cmp r3, #0 c700: 11a00005 movne r0, r5 c704: 11a0e00f movne lr, pc c708: 112fff13 bxne r3 if ( free_parentloc ) c70c: e3560000 cmp r6, #0 c710: 0a000007 beq c734 rtems_filesystem_freenode( &parentloc ); c714: e59d3024 ldr r3, [sp, #36] ; 0x24 c718: e3530000 cmp r3, #0 c71c: 0a000004 beq c734 c720: e593301c ldr r3, [r3, #28] c724: e3530000 cmp r3, #0 c728: 11a00004 movne r0, r4 c72c: 11a0e00f movne lr, pc c730: 112fff13 bxne r3 return result; } c734: e1a00007 mov r0, r7 c738: e28dd02c add sp, sp, #44 ; 0x2c c73c: e8bd80f0 pop {r4, r5, r6, r7, pc} */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); c740: e3530000 cmp r3, #0 c744: 0affffb3 beq c618 c748: e59f313c ldr r3, [pc, #316] ; c88c c74c: e593c000 ldr ip, [r3] c750: e28cc004 add ip, ip, #4 c754: e8bc000f ldm ip!, {r0, r1, r2, r3} c758: e28d4018 add r4, sp, #24 c75c: e1a0e004 mov lr, r4 c760: e8ae000f stmia lr!, {r0, r1, r2, r3} c764: e59c2000 ldr r2, [ip] c768: e1a06007 mov r6, r7 c76c: e58e2000 str r2, [lr] c770: eaffffb2 b c640 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) c774: e3560000 cmp r6, #0 c778: 1a000001 bne c784 result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); c77c: e3e07000 mvn r7, #0 <== NOT EXECUTED c780: eaffffeb b c734 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); c784: e59d3024 ldr r3, [sp, #36] ; 0x24 c788: e3530000 cmp r3, #0 c78c: 0afffffa beq c77c c790: e593301c ldr r3, [r3, #28] c794: e3530000 cmp r3, #0 c798: 0afffff7 beq c77c c79c: e1a00004 mov r0, r4 c7a0: e1a0e00f mov lr, pc c7a4: e12fff13 bx r3 c7a8: e3e07000 mvn r7, #0 c7ac: eaffffe0 b c734 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); c7b0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED c7b4: e3530000 cmp r3, #0 <== NOT EXECUTED c7b8: 11a00005 movne r0, r5 <== NOT EXECUTED c7bc: 11a0e00f movne lr, pc <== NOT EXECUTED c7c0: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) c7c4: e3560000 cmp r6, #0 <== NOT EXECUTED c7c8: 0a000007 beq c7ec <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); c7cc: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c7d0: e3530000 cmp r3, #0 <== NOT EXECUTED c7d4: 0a000004 beq c7ec <== NOT EXECUTED c7d8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c7dc: e3530000 cmp r3, #0 <== NOT EXECUTED c7e0: 11a00004 movne r0, r4 <== NOT EXECUTED c7e4: 11a0e00f movne lr, pc <== NOT EXECUTED c7e8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); c7ec: eb000053 bl c940 <__errno> <== NOT EXECUTED c7f0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED c7f4: e5803000 str r3, [r0] <== NOT EXECUTED c7f8: e3e07000 mvn r7, #0 <== NOT EXECUTED c7fc: eaffffcc b c734 <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, c800: e28d4018 add r4, sp, #24 c804: e3a0c000 mov ip, #0 c808: e1a00005 mov r0, r5 c80c: e1a01007 mov r1, r7 c810: e3a02002 mov r2, #2 c814: e1a03004 mov r3, r4 c818: e58dc000 str ip, [sp] c81c: ebffd479 bl 1a08 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) c820: e3500000 cmp r0, #0 c824: 1affffd4 bne c77c c828: e3a06001 mov r6, #1 c82c: eaffff83 b c640 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); c830: e59d3010 ldr r3, [sp, #16] c834: e3530000 cmp r3, #0 c838: 0a000004 beq c850 c83c: e593301c ldr r3, [r3, #28] c840: e3530000 cmp r3, #0 c844: 11a00005 movne r0, r5 c848: 11a0e00f movne lr, pc c84c: 112fff13 bxne r3 if ( free_parentloc ) c850: e3560000 cmp r6, #0 c854: 0a000007 beq c878 rtems_filesystem_freenode( &parentloc ); c858: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c85c: e3530000 cmp r3, #0 <== NOT EXECUTED c860: 0a000004 beq c878 <== NOT EXECUTED c864: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c868: e3530000 cmp r3, #0 <== NOT EXECUTED c86c: 11a00004 movne r0, r4 <== NOT EXECUTED c870: 11a0e00f movne lr, pc <== NOT EXECUTED c874: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); c878: eb000030 bl c940 <__errno> c87c: e3a03015 mov r3, #21 c880: e5803000 str r3, [r0] c884: e3e07000 mvn r7, #0 c888: eaffffa9 b c734 000089e8 : */ int unmount( const char *path ) { 89e8: e92d4030 push {r4, r5, lr} 89ec: e24dd018 sub sp, sp, #24 89f0: 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 ) ) 89f4: eb0031d4 bl 1514c 89f8: e28d4004 add r4, sp, #4 89fc: e1a01000 mov r1, r0 8a00: e3a0c001 mov ip, #1 8a04: e1a00005 mov r0, r5 8a08: e3a02000 mov r2, #0 8a0c: e1a03004 mov r3, r4 8a10: e58dc000 str ip, [sp] 8a14: ebfff0c6 bl 4d34 8a18: e3500000 cmp r0, #0 8a1c: 1a000032 bne 8aec return -1; mt_entry = loc.mt_entry; 8a20: e59d5014 ldr r5, [sp, #20] fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 8a24: e59d3004 ldr r3, [sp, #4] 8a28: e595201c ldr r2, [r5, #28] 8a2c: e1520003 cmp r2, r3 8a30: 1a000049 bne 8b5c /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 8a34: e59d3010 ldr r3, [sp, #16] 8a38: e3530000 cmp r3, #0 8a3c: 0a000004 beq 8a54 8a40: e593301c ldr r3, [r3, #28] 8a44: e3530000 cmp r3, #0 8a48: 11a00004 movne r0, r4 8a4c: 11a0e00f movne lr, pc 8a50: 112fff13 bxne r3 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 8a54: e5953014 ldr r3, [r5, #20] 8a58: e5933028 ldr r3, [r3, #40] ; 0x28 8a5c: e3530000 cmp r3, #0 8a60: 0a000052 beq 8bb0 fs_root_loc = &mt_entry->mt_fs_root; 8a64: e5953028 ldr r3, [r5, #40] ; 0x28 8a68: e593302c ldr r3, [r3, #44] ; 0x2c 8a6c: e3530000 cmp r3, #0 8a70: 0a00004e beq 8bb0 * 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 ) 8a74: e59f3148 ldr r3, [pc, #328] ; 8bc4 8a78: e5933000 ldr r3, [r3] 8a7c: e5933014 ldr r3, [r3, #20] 8a80: e1530005 cmp r3, r5 8a84: 0a00001b beq 8af8 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8a88: e59f1138 ldr r1, [pc, #312] ; 8bc8 8a8c: e4913004 ldr r3, [r1], #4 8a90: e1530001 cmp r3, r1 8a94: 0a00000a beq 8ac4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 8a98: e595002c ldr r0, [r5, #44] ; 0x2c 8a9c: e5932018 ldr r2, [r3, #24] 8aa0: e1520000 cmp r2, r0 8aa4: 1a000003 bne 8ab8 8aa8: ea000012 b 8af8 <== NOT EXECUTED 8aac: e5932018 ldr r2, [r3, #24] 8ab0: e1500002 cmp r0, r2 8ab4: 0a00000f beq 8af8 * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 8ab8: e5933000 ldr r3, [r3] /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8abc: e1530001 cmp r3, r1 8ac0: 1afffff9 bne 8aac * 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 ) 8ac4: e1a00005 mov r0, r5 8ac8: ebfff182 bl 50d8 8acc: e3500001 cmp r0, #1 8ad0: 0a000008 beq 8af8 * 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 ) 8ad4: e5953014 ldr r3, [r5, #20] 8ad8: e1a00005 mov r0, r5 8adc: e1a0e00f mov lr, pc 8ae0: e593f028 ldr pc, [r3, #40] ; 0x28 8ae4: e2504000 subs r4, r0, #0 8ae8: 0a000007 beq 8b0c */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 8aec: e3e00000 mvn r0, #0 } 8af0: e28dd018 add sp, sp, #24 8af4: e8bd8030 pop {r4, r5, pc} * 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 ) rtems_set_errno_and_return_minus_one( EBUSY ); 8af8: eb002484 bl 11d10 <__errno> 8afc: e3a03010 mov r3, #16 8b00: e5803000 str r3, [r0] 8b04: e3e00000 mvn r0, #0 8b08: eafffff8 b 8af0 * 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){ 8b0c: e5953028 ldr r3, [r5, #40] ; 0x28 8b10: e1a00005 mov r0, r5 8b14: e1a0e00f mov lr, pc 8b18: e593f02c ldr pc, [r3, #44] ; 0x2c 8b1c: e3500000 cmp r0, #0 8b20: 1a00001a bne 8b90 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8b24: e1a00005 mov r0, r5 8b28: eb0005a5 bl a1c4 <_Chain_Extract> /* * 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 ); 8b2c: e5953014 ldr r3, [r5, #20] 8b30: e3530000 cmp r3, #0 8b34: 0a000004 beq 8b4c 8b38: e593301c ldr r3, [r3, #28] 8b3c: e3530000 cmp r3, #0 8b40: 12850008 addne r0, r5, #8 8b44: 11a0e00f movne lr, pc 8b48: 112fff13 bxne r3 free( mt_entry ); 8b4c: e1a00005 mov r0, r5 8b50: ebfff0ad bl 4e0c 8b54: e3a00000 mov r0, #0 return 0; 8b58: eaffffe4 b 8af0 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 8b5c: e59d3010 ldr r3, [sp, #16] 8b60: e3530000 cmp r3, #0 8b64: 0a000004 beq 8b7c 8b68: e593301c ldr r3, [r3, #28] 8b6c: e3530000 cmp r3, #0 8b70: 11a00004 movne r0, r4 8b74: 11a0e00f movne lr, pc 8b78: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 8b7c: eb002463 bl 11d10 <__errno> 8b80: e3a0300d mov r3, #13 8b84: e5803000 str r3, [r0] 8b88: e3e00000 mvn r0, #0 8b8c: eaffffd7 b 8af0 * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 8b90: e1a00005 mov r0, r5 <== NOT EXECUTED 8b94: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8b98: e1a0e00f mov lr, pc <== NOT EXECUTED 8b9c: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 8ba0: e3500000 cmp r0, #0 <== NOT EXECUTED 8ba4: 0affffd0 beq 8aec <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 8ba8: e1a00004 mov r0, r4 <== NOT EXECUTED 8bac: eb0004c2 bl 9ebc <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8bb0: eb002456 bl 11d10 <__errno> <== NOT EXECUTED 8bb4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8bb8: e5803000 str r3, [r0] <== NOT EXECUTED 8bbc: e3e00000 mvn r0, #0 <== NOT EXECUTED 8bc0: eaffffca b 8af0 <== NOT EXECUTED 00006110 : int utime( const char *path, const struct utimbuf *times ) { 6110: e92d4070 push {r4, r5, r6, lr} 6114: e24dd018 sub sp, sp, #24 6118: e1a05001 mov r5, r1 611c: e1a06000 mov r6, r0 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 6120: eb002b79 bl 10f0c 6124: e28d4004 add r4, sp, #4 6128: e1a01000 mov r1, r0 612c: e3a0c001 mov ip, #1 6130: e1a00006 mov r0, r6 6134: e3a02000 mov r2, #0 6138: e1a03004 mov r3, r4 613c: e58dc000 str ip, [sp] 6140: ebfff20c bl 2978 6144: e3500000 cmp r0, #0 6148: 1a00001b bne 61bc return -1; if ( !temp_loc.ops->utime_h ){ 614c: e59d2010 ldr r2, [sp, #16] 6150: e5923030 ldr r3, [r2, #48] ; 0x30 6154: e3530000 cmp r3, #0 6158: 0a00000f beq 619c rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 615c: e8950006 ldm r5, {r1, r2} 6160: e1a00004 mov r0, r4 6164: e1a0e00f mov lr, pc 6168: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 616c: e59d3010 ldr r3, [sp, #16] 6170: e3530000 cmp r3, #0 if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 6174: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 6178: 0a000004 beq 6190 617c: e593301c ldr r3, [r3, #28] 6180: e3530000 cmp r3, #0 6184: 11a00004 movne r0, r4 6188: 11a0e00f movne lr, pc 618c: 112fff13 bxne r3 return result; } 6190: e1a00005 mov r0, r5 6194: e28dd018 add sp, sp, #24 6198: e8bd8070 pop {r4, r5, r6, pc} if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 619c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 61a0: e3530000 cmp r3, #0 <== NOT EXECUTED 61a4: 11a00004 movne r0, r4 <== NOT EXECUTED 61a8: 11a0e00f movne lr, pc <== NOT EXECUTED 61ac: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61b0: eb00243e bl f2b0 <__errno> <== NOT EXECUTED 61b4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 61b8: e5803000 str r3, [r0] <== NOT EXECUTED 61bc: e3e05000 mvn r5, #0 61c0: eafffff2 b 6190 00017ca4 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17ca4: e59f30bc ldr r3, [pc, #188] ; 17d68 17ca8: e5933000 ldr r3, [r3] 17cac: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 17cb0: e92d4810 push {r4, fp, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17cb4: 2a00001c bcs 17d2c iop = rtems_libio_iop( fd ); 17cb8: e59f40ac ldr r4, [pc, #172] ; 17d6c 17cbc: e5944000 ldr r4, [r4] 17cc0: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 17cc4: e5940014 ldr r0, [r4, #20] 17cc8: e3100c01 tst r0, #256 ; 0x100 17ccc: 0a000016 beq 17d2c rtems_libio_check_buffer( buffer ); 17cd0: e3510000 cmp r1, #0 17cd4: 0a000019 beq 17d40 rtems_libio_check_count( count ); 17cd8: e3520000 cmp r2, #0 17cdc: 01a00002 moveq r0, r2 17ce0: 08bd8810 popeq {r4, fp, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 17ce4: e3100004 tst r0, #4 17ce8: 0a000014 beq 17d40 /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 17cec: e594303c ldr r3, [r4, #60] ; 0x3c 17cf0: e593300c ldr r3, [r3, #12] 17cf4: e3530000 cmp r3, #0 17cf8: 0a000015 beq 17d54 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 17cfc: e1a00004 mov r0, r4 17d00: e1a0e00f mov lr, pc 17d04: e12fff13 bx r3 if ( rc > 0 ) 17d08: e3500000 cmp r0, #0 17d0c: d8bd8810 pople {r4, fp, pc} iop->offset += rc; 17d10: e284c00c add ip, r4, #12 17d14: e89c1800 ldm ip, {fp, ip} 17d18: e09b2000 adds r2, fp, r0 17d1c: e0ac3fc0 adc r3, ip, r0, asr #31 17d20: e584200c str r2, [r4, #12] 17d24: e5843010 str r3, [r4, #16] return rc; } 17d28: e8bd8810 pop {r4, fp, pc} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 17d2c: ebffd303 bl c940 <__errno> <== NOT EXECUTED 17d30: e3a03009 mov r3, #9 <== NOT EXECUTED 17d34: e5803000 str r3, [r0] <== NOT EXECUTED 17d38: e3e00000 mvn r0, #0 <== NOT EXECUTED 17d3c: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 17d40: ebffd2fe bl c940 <__errno> <== NOT EXECUTED 17d44: e3a03016 mov r3, #22 <== NOT EXECUTED 17d48: e5803000 str r3, [r0] <== NOT EXECUTED 17d4c: e3e00000 mvn r0, #0 <== NOT EXECUTED 17d50: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 17d54: ebffd2f9 bl c940 <__errno> <== NOT EXECUTED 17d58: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17d5c: e5803000 str r3, [r0] <== NOT EXECUTED 17d60: e3e00000 mvn r0, #0 <== NOT EXECUTED 17d64: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 00006144 : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 6144: e59f317c ldr r3, [pc, #380] ; 62c8 6148: e5933000 ldr r3, [r3] 614c: e1500003 cmp r0, r3 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 6150: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 6154: e1a05002 mov r5, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 6158: 2a00004e bcs 6298 iop = rtems_libio_iop( fd ); 615c: e59f3168 ldr r3, [pc, #360] ; 62cc 6160: e5937000 ldr r7, [r3] 6164: e0877300 add r7, r7, r0, lsl #6 rtems_libio_check_is_open( iop ); 6168: e5973014 ldr r3, [r7, #20] 616c: e3130c01 tst r3, #256 ; 0x100 6170: 0a000048 beq 6298 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 6174: e3130004 tst r3, #4 6178: 0a000040 beq 6280 /* * Argument validation on IO vector */ if ( !iov ) 617c: e3510000 cmp r1, #0 6180: 0a00003e beq 6280 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 6184: e3520000 cmp r2, #0 6188: da00003c ble 6280 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 618c: e3520b01 cmp r2, #1024 ; 0x400 6190: ca00003a bgt 6280 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 6194: e597303c ldr r3, [r7, #60] ; 0x3c 6198: e593300c ldr r3, [r3, #12] 619c: e3530000 cmp r3, #0 61a0: 0a000043 beq 62b4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 61a4: e1a04001 mov r4, r1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 61a8: e3a0cc7f mov ip, #32512 ; 0x7f00 if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 61ac: e3a01000 mov r1, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 61b0: e28cc0ff add ip, ip, #255 ; 0xff if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 61b4: e1a02004 mov r2, r4 61b8: e3a06001 mov r6, #1 61bc: e1a08001 mov r8, r1 61c0: ea000000 b 61c8 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 61c4: e1a08003 mov r8, r3 if ( !iov[v].iov_base ) 61c8: e5923000 ldr r3, [r2] 61cc: e3530000 cmp r3, #0 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 61d0: e2811001 add r1, r1, #1 if ( !iov[v].iov_base ) 61d4: 0a000029 beq 6280 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 61d8: e5920004 ldr r0, [r2, #4] all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 61dc: e0883000 add r3, r8, r0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 61e0: e3500000 cmp r0, #0 61e4: 13a06000 movne r6, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 61e8: e1580003 cmp r8, r3 61ec: d153000c cmple r3, ip 61f0: d3a08000 movle r8, #0 61f4: c3a08001 movgt r8, #1 61f8: ca000020 bgt 6280 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 61fc: e1550001 cmp r5, r1 6200: e2822008 add r2, r2, #8 6204: caffffee bgt 61c4 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 6208: e3560000 cmp r6, #0 620c: 1a00001f bne 6290 6210: e1a08006 mov r8, r6 6214: ea000002 b 6224 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 6218: e1550006 cmp r5, r6 621c: e2844008 add r4, r4, #8 6220: da00001a ble 6290 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 6224: e5942004 ldr r2, [r4, #4] 6228: e3520000 cmp r2, #0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 622c: e2866001 add r6, r6, #1 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 6230: 0afffff8 beq 6218 continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 6234: e5941000 ldr r1, [r4] 6238: e597303c ldr r3, [r7, #60] ; 0x3c 623c: e1a00007 mov r0, r7 6240: e1a0e00f mov lr, pc 6244: e593f00c ldr pc, [r3, #12] if ( bytes < 0 ) 6248: e3500000 cmp r0, #0 624c: ba000016 blt 62ac return -1; if ( bytes > 0 ) { 6250: 0a000006 beq 6270 iop->offset += bytes; 6254: e287c00c add ip, r7, #12 6258: e89c1800 ldm ip, {fp, ip} 625c: e09b2000 adds r2, fp, r0 6260: e0ac3fc0 adc r3, ip, r0, asr #31 6264: e587200c str r2, [r7, #12] 6268: e5873010 str r3, [r7, #16] total += bytes; 626c: e0888000 add r8, r8, r0 } if (bytes != iov[ v ].iov_len) 6270: e5943004 ldr r3, [r4, #4] 6274: e1500003 cmp r0, r3 6278: 0affffe6 beq 6218 627c: ea000003 b 6290 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 6280: eb00238a bl f0b0 <__errno> 6284: e3a03016 mov r3, #22 6288: e5803000 str r3, [r0] 628c: e3e08000 mvn r8, #0 if (bytes != iov[ v ].iov_len) break; } return total; } 6290: e1a00008 mov r0, r8 6294: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 6298: eb002384 bl f0b0 <__errno> 629c: e3a03009 mov r3, #9 62a0: e5803000 str r3, [r0] 62a4: e3e08000 mvn r8, #0 62a8: eafffff8 b 6290 if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 62ac: e3e08000 mvn r8, #0 <== NOT EXECUTED 62b0: eafffff6 b 6290 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 62b4: eb00237d bl f0b0 <__errno> <== NOT EXECUTED 62b8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 62bc: e5803000 str r3, [r0] <== NOT EXECUTED 62c0: e3e08000 mvn r8, #0 <== NOT EXECUTED 62c4: eafffff1 b 6290 <== NOT EXECUTED