=============================================================================== a0008750 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { a0008750: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a0008754: e5903010 ldr r3, [r0, #16] switch( node->type ) { a0008758: e592204c ldr r2, [r2, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a000875c: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { a0008760: e2422001 sub r2, r2, #1 a0008764: e3520006 cmp r2, #6 a0008768: 979ff102 ldrls pc, [pc, r2, lsl #2] a000876c: ea000010 b a00087b4 <== NOT EXECUTED a0008770: a000878c .word 0xa000878c <== NOT EXECUTED a0008774: a0008794 .word 0xa0008794 <== NOT EXECUTED a0008778: a000879c .word 0xa000879c <== NOT EXECUTED a000877c: a000879c .word 0xa000879c <== NOT EXECUTED a0008780: a00087a4 .word 0xa00087a4 <== NOT EXECUTED a0008784: a00087a4 .word 0xa00087a4 <== NOT EXECUTED a0008788: a00087ac .word 0xa00087ac <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; a000878c: e593300c ldr r3, [r3, #12] a0008790: ea000006 b a00087b0 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; a0008794: e59f3020 ldr r3, [pc, #32] ; a00087bc a0008798: ea000004 b a00087b0 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; a000879c: e59f301c ldr r3, [pc, #28] ; a00087c0 a00087a0: ea000002 b a00087b0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; a00087a4: e5933008 ldr r3, [r3, #8] a00087a8: ea000000 b a00087b0 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; a00087ac: e5933010 ldr r3, [r3, #16] a00087b0: e5803008 str r3, [r0, #8] break; } return 0; } a00087b4: e3a00000 mov r0, #0 a00087b8: e12fff1e bx lr =============================================================================== a0008850 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a0008850: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { a0008854: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a0008858: e24dd040 sub sp, sp, #64 ; 0x40 a000885c: e58d0000 str r0, [sp] a0008860: e1a06001 mov r6, r1 a0008864: e1a08002 mov r8, r2 a0008868: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a000886c: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; a0008870: 03a09001 moveq r9, #1 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a0008874: 028da004 addeq sl, sp, #4 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { a0008878: 0a000057 beq a00089dc rtems_set_errno_and_return_minus_one( EIO ); a000887c: eb000cca bl a000bbac <__errno> <== NOT EXECUTED a0008880: e3a03005 mov r3, #5 <== NOT EXECUTED a0008884: ea00007e b a0008a84 <== NOT EXECUTED * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a0008888: e59d2000 ldr r2, [sp] a000888c: e28d303c add r3, sp, #60 ; 0x3c a0008890: e1a01006 mov r1, r6 a0008894: e0820007 add r0, r2, r7 a0008898: e1a0200a mov r2, sl a000889c: eb0001ae bl a0008f5c pathnamelen -= len; i += len; if ( !pathloc->node_access ) a00088a0: e5943000 ldr r3, [r4] * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a00088a4: e1a09000 mov r9, r0 pathnamelen -= len; a00088a8: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) a00088ac: e3530000 cmp r3, #0 a00088b0: 0a000041 beq a00089bc rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a00088b4: e3500000 cmp r0, #0 a00088b8: 0a000006 beq a00088d8 if ( node->type == IMFS_DIRECTORY ) a00088bc: e595104c ldr r1, [r5, #76] ; 0x4c a00088c0: e3510001 cmp r1, #1 a00088c4: 1a000003 bne a00088d8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a00088c8: e1a00004 mov r0, r4 a00088cc: ebffffbc bl a00087c4 a00088d0: e3500000 cmp r0, #0 a00088d4: 0a000068 beq a0008a7c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { a00088d8: e3590003 cmp r9, #3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; a00088dc: e06b6006 rsb r6, fp, r6 i += len; a00088e0: e087700b add r7, r7, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a00088e4: e5945000 ldr r5, [r4] switch( type ) { a00088e8: 0a000014 beq a0008940 a00088ec: e3590004 cmp r9, #4 a00088f0: 0a000036 beq a00089d0 a00088f4: e3590002 cmp r9, #2 a00088f8: 1a000037 bne a00089dc case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a00088fc: e59fc194 ldr ip, [pc, #404] ; a0008a98 a0008900: e59c3000 ldr r3, [ip] a0008904: e5933018 ldr r3, [r3, #24] a0008908: e1550003 cmp r5, r3 a000890c: 0a000032 beq a00089dc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { a0008910: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == a0008914: e59e301c ldr r3, [lr, #28] a0008918: e1550003 cmp r5, r3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; a000891c: 028dc028 addeq ip, sp, #40 ; 0x28 a0008920: 028ee008 addeq lr, lr, #8 a0008924: 0a000037 beq a0008a08 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) a0008928: e5955008 ldr r5, [r5, #8] a000892c: e3550000 cmp r5, #0 a0008930: 1a000024 bne a00089c8 rtems_set_errno_and_return_minus_one( ENOENT ); a0008934: eb000c9c bl a000bbac <__errno> a0008938: e5809000 str r9, [r0] a000893c: ea000051 b a0008a88 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a0008940: e595304c ldr r3, [r5, #76] ; 0x4c a0008944: e3530003 cmp r3, #3 a0008948: 1a000004 bne a0008960 IMFS_evaluate_hard_link( pathloc, 0 ); a000894c: e1a00004 mov r0, r4 a0008950: e3a01000 mov r1, #0 a0008954: ebffffaa bl a0008804 node = pathloc->node_access; a0008958: e5945000 ldr r5, [r4] a000895c: ea000008 b a0008984 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { a0008960: e3530004 cmp r3, #4 a0008964: 1a000006 bne a0008984 result = IMFS_evaluate_sym_link( pathloc, 0 ); a0008968: e1a00004 mov r0, r4 a000896c: e3a01000 mov r1, #0 a0008970: eb000049 bl a0008a9c /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) a0008974: e3700001 cmn r0, #1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); a0008978: e1a0b000 mov fp, r0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; a000897c: e5945000 ldr r5, [r4] if ( result == -1 ) a0008980: 0a000041 beq a0008a8c } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a0008984: e595304c ldr r3, [r5, #76] ; 0x4c a0008988: e3530001 cmp r3, #1 a000898c: 0a000002 beq a000899c rtems_set_errno_and_return_minus_one( ENOTDIR ); a0008990: eb000c85 bl a000bbac <__errno> a0008994: e3a03014 mov r3, #20 a0008998: ea000039 b a0008a84 /* * 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 ) { a000899c: e595e05c ldr lr, [r5, #92] ; 0x5c a00089a0: e35e0000 cmp lr, #0 a00089a4: 1a000015 bne a0008a00 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a00089a8: e1a00005 mov r0, r5 a00089ac: e1a0100a mov r1, sl a00089b0: eb000149 bl a0008edc if ( !node ) a00089b4: e2505000 subs r5, r0, #0 a00089b8: 1a000002 bne a00089c8 rtems_set_errno_and_return_minus_one( ENOENT ); a00089bc: eb000c7a bl a000bbac <__errno> a00089c0: e3a03002 mov r3, #2 a00089c4: ea00002e b a0008a84 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a00089c8: e5845000 str r5, [r4] a00089cc: ea000002 b a00089dc case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a00089d0: eb000c75 bl a000bbac <__errno> a00089d4: e3a0305b mov r3, #91 ; 0x5b a00089d8: ea000029 b a0008a84 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { a00089dc: e3590004 cmp r9, #4 a00089e0: 13590000 cmpne r9, #0 a00089e4: 1affffa7 bne a0008888 * 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 ) { a00089e8: e595304c ldr r3, [r5, #76] ; 0x4c a00089ec: e3530001 cmp r3, #1 a00089f0: 1a000019 bne a0008a5c if ( node->info.directory.mt_fs != NULL ) { a00089f4: e595e05c ldr lr, [r5, #92] ; 0x5c a00089f8: e35e0000 cmp lr, #0 a00089fc: 0a000016 beq a0008a5c newloc = node->info.directory.mt_fs->mt_fs_root; a0008a00: e28dc028 add ip, sp, #40 ; 0x28 a0008a04: e28ee01c add lr, lr, #28 a0008a08: e8be000f ldm lr!, {r0, r1, r2, r3} a0008a0c: e8ac000f stmia ip!, {r0, r1, r2, r3} a0008a10: e59ee000 ldr lr, [lr] a0008a14: e58ce000 str lr, [ip] *pathloc = newloc; a0008a18: e28dc028 add ip, sp, #40 ; 0x28 a0008a1c: e8bc000f ldm ip!, {r0, r1, r2, r3} a0008a20: e1a0c004 mov ip, r4 a0008a24: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], a0008a28: e59d103c ldr r1, [sp, #60] ; 0x3c */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; a0008a2c: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a0008a30: e594300c ldr r3, [r4, #12] a0008a34: e59d2000 ldr r2, [sp] a0008a38: e0610007 rsb r0, r1, r7 a0008a3c: e593c000 ldr ip, [r3] a0008a40: e0820000 add r0, r2, r0 a0008a44: e0861001 add r1, r6, r1 a0008a48: e1a02008 mov r2, r8 a0008a4c: e1a03004 mov r3, r4 a0008a50: e12fff3c blx ip a0008a54: e1a0b000 mov fp, r0 a0008a58: ea00000b b a0008a8c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a0008a5c: e1a00004 mov r0, r4 a0008a60: ebffff3a bl a0008750 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a0008a64: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a0008a68: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a0008a6c: e1a00004 mov r0, r4 a0008a70: ebffff53 bl a00087c4 a0008a74: e3500000 cmp r0, #0 a0008a78: 1a000003 bne a0008a8c rtems_set_errno_and_return_minus_one( EACCES ); a0008a7c: eb000c4a bl a000bbac <__errno> a0008a80: e3a0300d mov r3, #13 a0008a84: e5803000 str r3, [r0] a0008a88: e3e0b000 mvn fp, #0 return result; } a0008a8c: e1a0000b mov r0, fp a0008a90: e28dd040 add sp, sp, #64 ; 0x40 a0008a94: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0008bd8 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a0008bd8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0008bdc: e24dd03c sub sp, sp, #60 ; 0x3c a0008be0: e1a07000 mov r7, r0 a0008be4: e1a04001 mov r4, r1 a0008be8: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a0008bec: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); a0008bf0: eb000fd7 bl a000cb54 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; a0008bf4: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a0008bf8: e1a08000 mov r8, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a0008bfc: e1a01008 mov r1, r8 a0008c00: e28d3038 add r3, sp, #56 ; 0x38 a0008c04: e0870005 add r0, r7, r5 a0008c08: e1a0200d mov r2, sp a0008c0c: eb0000d2 bl a0008f5c pathlen -= len; i += len; if ( !pathloc->node_access ) a0008c10: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a0008c14: e59db038 ldr fp, [sp, #56] ; 0x38 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a0008c18: e1a09000 mov r9, r0 pathlen -= len; i += len; if ( !pathloc->node_access ) a0008c1c: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a0008c20: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) a0008c24: 0a000060 beq a0008dac /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a0008c28: e3500000 cmp r0, #0 a0008c2c: 0a000006 beq a0008c4c if ( node->type == IMFS_DIRECTORY ) a0008c30: e596104c ldr r1, [r6, #76] ; 0x4c a0008c34: e3510001 cmp r1, #1 a0008c38: 1a000003 bne a0008c4c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a0008c3c: e1a00004 mov r0, r4 a0008c40: ebfffedf bl a00087c4 a0008c44: e3500000 cmp r0, #0 a0008c48: 0a00006c beq a0008e00 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a0008c4c: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; a0008c50: e085500b add r5, r5, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a0008c54: e1a06003 mov r6, r3 switch( type ) { a0008c58: e3590004 cmp r9, #4 a0008c5c: 979ff109 ldrls pc, [pc, r9, lsl #2] a0008c60: eaffffe5 b a0008bfc <== NOT EXECUTED a0008c64: a0008d70 .word 0xa0008d70 <== NOT EXECUTED a0008c68: a0008bfc .word 0xa0008bfc <== NOT EXECUTED a0008c6c: a0008c78 .word 0xa0008c78 <== NOT EXECUTED a0008c70: a0008cb4 .word 0xa0008cb4 <== NOT EXECUTED a0008c74: a0008d7c .word 0xa0008d7c <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a0008c78: e59f119c ldr r1, [pc, #412] ; a0008e1c a0008c7c: e5912000 ldr r2, [r1] a0008c80: e5922018 ldr r2, [r2, #24] a0008c84: e1530002 cmp r3, r2 a0008c88: 0affffdb beq a0008bfc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ a0008c8c: e594e010 ldr lr, [r4, #16] a0008c90: e59e201c ldr r2, [lr, #28] a0008c94: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; a0008c98: 028dc024 addeq ip, sp, #36 ; 0x24 a0008c9c: 028ee008 addeq lr, lr, #8 a0008ca0: 0a000019 beq a0008d0c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) a0008ca4: e5936008 ldr r6, [r3, #8] a0008ca8: e3560000 cmp r6, #0 a0008cac: 1a00002d bne a0008d68 a0008cb0: ea00003d b a0008dac pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { a0008cb4: e593304c ldr r3, [r3, #76] ; 0x4c a0008cb8: e3530003 cmp r3, #3 a0008cbc: 0a000001 beq a0008cc8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { a0008cc0: e3530004 cmp r3, #4 a0008cc4: 1a000005 bne a0008ce0 result = IMFS_evaluate_link( pathloc, 0 ); a0008cc8: e1a00004 mov r0, r4 a0008ccc: e3a01000 mov r1, #0 a0008cd0: ebffff93 bl a0008b24 if ( result == -1 ) a0008cd4: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a0008cd8: e1a06000 mov r6, r0 if ( result == -1 ) a0008cdc: 0a00004b beq a0008e10 return -1; } node = pathloc->node_access; a0008ce0: e5940000 ldr r0, [r4] if ( !node ) a0008ce4: e3500000 cmp r0, #0 a0008ce8: 0a00003c beq a0008de0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a0008cec: e590304c ldr r3, [r0, #76] ; 0x4c a0008cf0: e3530001 cmp r3, #1 a0008cf4: 1a000039 bne a0008de0 /* * 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 ) { a0008cf8: e590e05c ldr lr, [r0, #92] ; 0x5c a0008cfc: e35e0000 cmp lr, #0 a0008d00: 0a000014 beq a0008d58 newloc = node->info.directory.mt_fs->mt_fs_root; a0008d04: e28dc024 add ip, sp, #36 ; 0x24 a0008d08: e28ee01c add lr, lr, #28 a0008d0c: e8be000f ldm lr!, {r0, r1, r2, r3} a0008d10: e8ac000f stmia ip!, {r0, r1, r2, r3} a0008d14: e59ee000 ldr lr, [lr] a0008d18: e58ce000 str lr, [ip] *pathloc = newloc; a0008d1c: e28dc024 add ip, sp, #36 ; 0x24 a0008d20: e8bc000f ldm ip!, {r0, r1, r2, r3} a0008d24: e1a0c004 mov ip, r4 a0008d28: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0008d2c: e59d2038 ldr r2, [sp, #56] ; 0x38 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; a0008d30: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0008d34: e594300c ldr r3, [r4, #12] a0008d38: e0625005 rsb r5, r2, r5 a0008d3c: e0870005 add r0, r7, r5 a0008d40: e5933004 ldr r3, [r3, #4] a0008d44: e1a01004 mov r1, r4 a0008d48: e1a0200a mov r2, sl a0008d4c: e12fff33 blx r3 a0008d50: e1a06000 mov r6, r0 a0008d54: ea00002d b a0008e10 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a0008d58: e1a0100d mov r1, sp a0008d5c: eb00005e bl a0008edc /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) a0008d60: e2506000 subs r6, r0, #0 a0008d64: 0a000007 beq a0008d88 done = true; else pathloc->node_access = node; a0008d68: e5846000 str r6, [r4] a0008d6c: eaffffa2 b a0008bfc break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); a0008d70: eb000b8d bl a000bbac <__errno> a0008d74: e3a03011 mov r3, #17 a0008d78: ea000022 b a0008e08 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a0008d7c: eb000b8a bl a000bbac <__errno> a0008d80: e3a0305b mov r3, #91 ; 0x5b a0008d84: ea00001f b a0008e08 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a0008d88: e59d3038 ldr r3, [sp, #56] ; 0x38 a0008d8c: e0633005 rsb r3, r3, r5 a0008d90: e0873003 add r3, r7, r3 a0008d94: e58a3000 str r3, [sl] * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( a0008d98: e0875005 add r5, r7, r5 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { a0008d9c: ea000005 b a0008db8 if ( !IMFS_is_separator( path[ i ] ) ) a0008da0: ebffe72f bl a0002a64 a0008da4: e3500000 cmp r0, #0 a0008da8: 1a000002 bne a0008db8 rtems_set_errno_and_return_minus_one( ENOENT ); a0008dac: eb000b7e bl a000bbac <__errno> a0008db0: e3a03002 mov r3, #2 a0008db4: ea000013 b a0008e08 /* * 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++) { a0008db8: e4d50001 ldrb r0, [r5], #1 a0008dbc: e3500000 cmp r0, #0 a0008dc0: 1afffff6 bne a0008da0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a0008dc4: e1a00004 mov r0, r4 a0008dc8: ebfffe60 bl a0008750 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a0008dcc: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a0008dd0: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a0008dd4: e593304c ldr r3, [r3, #76] ; 0x4c a0008dd8: e3530001 cmp r3, #1 a0008ddc: 0a000002 beq a0008dec rtems_set_errno_and_return_minus_one( ENOTDIR ); a0008de0: eb000b71 bl a000bbac <__errno> a0008de4: e3a03014 mov r3, #20 a0008de8: ea000006 b a0008e08 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) a0008dec: e1a00004 mov r0, r4 a0008df0: e3a01003 mov r1, #3 a0008df4: ebfffe72 bl a00087c4 a0008df8: e3500000 cmp r0, #0 a0008dfc: 1a000003 bne a0008e10 rtems_set_errno_and_return_minus_one( EACCES ); a0008e00: eb000b69 bl a000bbac <__errno> a0008e04: e3a0300d mov r3, #13 a0008e08: e5803000 str r3, [r0] a0008e0c: e3e06000 mvn r6, #0 return result; } a0008e10: e1a00006 mov r0, r6 a0008e14: e28dd03c add sp, sp, #60 ; 0x3c a0008e18: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a00087c4 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a00087c4: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { a00087c8: e52de004 push {lr} ; (str lr, [sp, #-4]!) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a00087cc: 0a000004 beq a00087e4 rtems_set_errno_and_return_minus_one( EPERM ); a00087d0: eb000cf5 bl a000bbac <__errno> <== NOT EXECUTED a00087d4: e3a03001 mov r3, #1 <== NOT EXECUTED a00087d8: e5803000 str r3, [r0] <== NOT EXECUTED a00087dc: e3e00000 mvn r0, #0 <== NOT EXECUTED a00087e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) a00087e4: e5903000 ldr r3, [r0] */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; a00087e8: e1a01301 lsl r1, r1, #6 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) a00087ec: e5930030 ldr r0, [r3, #48] ; 0x30 a00087f0: e0010000 and r0, r1, r0 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); a00087f4: e1500001 cmp r0, r1 a00087f8: 13a00000 movne r0, #0 a00087fc: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } a0008800: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0008e20 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a0008e20: 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; a0008e24: e1a0c000 mov ip, r0 a0008e28: 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 ) { a0008e2c: e24dd014 sub sp, sp, #20 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a0008e30: e1a0e00d mov lr, sp ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a0008e34: e1a05000 mov r5, r0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a0008e38: e8bc000f ldm ip!, {r0, r1, r2, r3} a0008e3c: e8ae000f stmia lr!, {r0, r1, r2, r3} a0008e40: e59c3000 ldr r3, [ip] a0008e44: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a0008e48: e3a03000 mov r3, #0 a0008e4c: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a0008e50: e1a0500d mov r5, sp a0008e54: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a0008e58: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; a0008e5c: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); a0008e60: ebfffe3a bl a0008750 if ( jnode->type != IMFS_DIRECTORY ) { a0008e64: e594304c ldr r3, [r4, #76] ; 0x4c a0008e68: e3530001 cmp r3, #1 a0008e6c: 1a000003 bne a0008e80 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { a0008e70: e5942050 ldr r2, [r4, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0008e74: e2843054 add r3, r4, #84 ; 0x54 a0008e78: e1520003 cmp r2, r3 a0008e7c: 1a000005 bne a0008e98 result = IMFS_unlink( NULL, &loc ); a0008e80: e3a00000 mov r0, #0 a0008e84: e1a0100d mov r1, sp a0008e88: ebffe238 bl a0001770 if (result != 0) a0008e8c: e3500000 cmp r0, #0 a0008e90: 1a00000c bne a0008ec8 return -1; jnode = next; a0008e94: e1a04006 mov r4, r6 } if ( jnode != NULL ) { a0008e98: e3540000 cmp r4, #0 a0008e9c: 0a00000b beq a0008ed0 if ( jnode->type == IMFS_DIRECTORY ) { a0008ea0: e594304c ldr r3, [r4, #76] ; 0x4c a0008ea4: e3530001 cmp r3, #1 a0008ea8: 1affffe9 bne a0008e54 if ( jnode_has_children( jnode ) ) a0008eac: e5943050 ldr r3, [r4, #80] ; 0x50 a0008eb0: e2842054 add r2, r4, #84 ; 0x54 a0008eb4: e1530002 cmp r3, r2 a0008eb8: 0affffe5 beq a0008e54 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a0008ebc: e2534000 subs r4, r3, #0 a0008ec0: 1affffe3 bne a0008e54 a0008ec4: ea000001 b a0008ed0 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; a0008ec8: e3e00000 mvn r0, #0 <== NOT EXECUTED a0008ecc: ea000000 b a0008ed4 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; a0008ed0: e1a00004 mov r0, r4 } a0008ed4: e28dd014 add sp, sp, #20 a0008ed8: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000a724 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000a724: e59f31e4 ldr r3, [pc, #484] ; a000a910 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000a728: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000a72c: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000a730: e1a04000 mov r4, r0 a000a734: e1a06001 mov r6, r1 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000a738: e1a05125 lsr r5, r5, #2 a000a73c: e2453001 sub r3, r5, #1 a000a740: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000a744: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000a748: 8a00000e bhi a000a788 p = info->indirect; if ( malloc_it ) { a000a74c: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a000a750: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a000a754: 0a000007 beq a000a778 if ( !p ) { a000a758: e3500000 cmp r0, #0 a000a75c: 1a000003 bne a000a770 p = memfile_alloc_block(); a000a760: ebffffe2 bl a000a6f0 if ( !p ) a000a764: e3500000 cmp r0, #0 a000a768: 0a000067 beq a000a90c return 0; info->indirect = p; a000a76c: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; a000a770: e5940058 ldr r0, [r4, #88] ; 0x58 a000a774: ea000001 b a000a780 } if ( !p ) a000a778: e3500000 cmp r0, #0 a000a77c: 0a000062 beq a000a90c return 0; return &info->indirect[ my_block ]; a000a780: e0800106 add r0, r0, r6, lsl #2 a000a784: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a000a788: e2853001 add r3, r5, #1 a000a78c: e0030395 mul r3, r5, r3 a000a790: e2432001 sub r2, r3, #1 a000a794: e1510002 cmp r1, r2 a000a798: 8a000021 bhi a000a824 my_block -= FIRST_DOUBLY_INDIRECT; a000a79c: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000a7a0: e1a00006 mov r0, r6 a000a7a4: e1a01005 mov r1, r5 a000a7a8: eb001336 bl a000f488 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a7ac: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000a7b0: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a7b4: e1a00006 mov r0, r6 a000a7b8: eb00129a bl a000f228 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a000a7bc: e3580000 cmp r8, #0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a7c0: e1a05000 mov r5, r0 p = info->doubly_indirect; a000a7c4: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { a000a7c8: 0a00000e beq a000a808 if ( !p ) { a000a7cc: e3500000 cmp r0, #0 a000a7d0: 1a000003 bne a000a7e4 p = memfile_alloc_block(); a000a7d4: ebffffc5 bl a000a6f0 if ( !p ) a000a7d8: e3500000 cmp r0, #0 a000a7dc: 0a00004a beq a000a90c return 0; info->doubly_indirect = p; a000a7e0: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; a000a7e4: e0804105 add r4, r0, r5, lsl #2 a000a7e8: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { a000a7ec: e3500000 cmp r0, #0 a000a7f0: 1a000009 bne a000a81c p1 = memfile_alloc_block(); a000a7f4: ebffffbd bl a000a6f0 if ( !p1 ) a000a7f8: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a000a7fc: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) a000a800: 1a000005 bne a000a81c a000a804: ea000040 b a000a90c <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) a000a808: e3500000 cmp r0, #0 a000a80c: 0a00003e beq a000a90c return 0; p = (block_p *)p[ doubly ]; a000a810: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) a000a814: e3500000 cmp r0, #0 a000a818: 0a00003b beq a000a90c return 0; return (block_p *)&p[ singly ]; a000a81c: e0800107 add r0, r0, r7, lsl #2 a000a820: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a000a824: e2832001 add r2, r3, #1 a000a828: e0020295 mul r2, r5, r2 a000a82c: e2422001 sub r2, r2, #1 a000a830: e1510002 cmp r1, r2 a000a834: 8a000033 bhi a000a908 my_block -= FIRST_TRIPLY_INDIRECT; a000a838: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000a83c: e1a00006 mov r0, r6 a000a840: e1a01005 mov r1, r5 a000a844: eb00130f bl a000f488 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a848: e1a01005 mov r1, r5 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000a84c: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a850: e1a00006 mov r0, r6 a000a854: eb001273 bl a000f228 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000a858: e1a01005 mov r1, r5 */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a85c: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000a860: eb001270 bl a000f228 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000a864: e1a01005 mov r1, r5 if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000a868: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000a86c: e1a00006 mov r0, r6 a000a870: eb001304 bl a000f488 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a000a874: e3580000 cmp r8, #0 my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000a878: e1a05000 mov r5, r0 p = info->triply_indirect; a000a87c: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a000a880: 0a000016 beq a000a8e0 if ( !p ) { a000a884: e3500000 cmp r0, #0 a000a888: 1a000003 bne a000a89c p = memfile_alloc_block(); a000a88c: ebffff97 bl a000a6f0 if ( !p ) a000a890: e3500000 cmp r0, #0 a000a894: 0a00001c beq a000a90c return 0; info->triply_indirect = p; a000a898: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; a000a89c: e0804107 add r4, r0, r7, lsl #2 a000a8a0: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { a000a8a4: e3500000 cmp r0, #0 a000a8a8: 1a000003 bne a000a8bc p1 = memfile_alloc_block(); a000a8ac: ebffff8f bl a000a6f0 if ( !p1 ) a000a8b0: e3500000 cmp r0, #0 a000a8b4: 0a000014 beq a000a90c return 0; p[ triply ] = (block_p) p1; a000a8b8: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; a000a8bc: e0804105 add r4, r0, r5, lsl #2 a000a8c0: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { a000a8c4: e3500000 cmp r0, #0 a000a8c8: 1a00000c bne a000a900 p2 = memfile_alloc_block(); a000a8cc: ebffff87 bl a000a6f0 if ( !p2 ) a000a8d0: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a000a8d4: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) a000a8d8: 1a000008 bne a000a900 a000a8dc: ea00000a b a000a90c <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a000a8e0: e3500000 cmp r0, #0 a000a8e4: 0a000008 beq a000a90c return 0; p1 = (block_p *) p[ triply ]; a000a8e8: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a000a8ec: e3500000 cmp r0, #0 a000a8f0: 0a000005 beq a000a90c return 0; p2 = (block_p *)p1[ doubly ]; a000a8f4: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) a000a8f8: e3500000 cmp r0, #0 a000a8fc: 0a000002 beq a000a90c return 0; return (block_p *)&p2[ singly ]; a000a900: e080010a add r0, r0, sl, lsl #2 a000a904: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * This means the requested block number is out of range. */ return 0; a000a908: e3a00000 mov r0, #0 <== NOT EXECUTED } a000a90c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000160c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a000160c: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0001610: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a0001614: e593204c ldr r2, [r3, #76] ; 0x4c a0001618: e3520001 cmp r2, #1 a000161c: 0a000004 beq a0001634 rtems_set_errno_and_return_minus_one( ENOTDIR ); a0001620: eb002961 bl a000bbac <__errno> <== NOT EXECUTED a0001624: e3a03014 mov r3, #20 <== NOT EXECUTED a0001628: e5803000 str r3, [r0] <== NOT EXECUTED a000162c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001630: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; a0001634: e583005c str r0, [r3, #92] ; 0x5c return 0; a0001638: e3a00000 mov r0, #0 } a000163c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0003f98 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a0003f98: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a0003f9c: e59f50e0 ldr r5, [pc, #224] ; a0004084 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a0003fa0: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a0003fa4: e280000c add r0, r0, #12 a0003fa8: e5953000 ldr r3, [r5] a0003fac: e5931008 ldr r1, [r3, #8] a0003fb0: eb0030de bl a0010330 switch( the_jnode->type ) { a0003fb4: e594204c ldr r2, [r4, #76] ; 0x4c a0003fb8: e2423001 sub r3, r2, #1 a0003fbc: e3530006 cmp r3, #6 a0003fc0: 979ff103 ldrls pc, [pc, r3, lsl #2] a0003fc4: ea000026 b a0004064 <== NOT EXECUTED a0003fc8: a0003fe4 .word 0xa0003fe4 <== NOT EXECUTED a0003fcc: a0003ff8 .word 0xa0003ff8 <== NOT EXECUTED a0003fd0: a0004044 .word 0xa0004044 <== NOT EXECUTED a0003fd4: a0004044 .word 0xa0004044 <== NOT EXECUTED a0003fd8: a000402c .word 0xa000402c <== NOT EXECUTED a0003fdc: a0004010 .word 0xa0004010 <== NOT EXECUTED a0003fe0: a0004050 .word 0xa0004050 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); a0003fe4: e5953000 ldr r3, [r5] a0003fe8: e3a0002f mov r0, #47 ; 0x2f a0003fec: e5931008 ldr r1, [r3, #8] a0003ff0: eb003099 bl a001025c break; a0003ff4: ea00001f b a0004078 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", a0003ff8: e5953000 ldr r3, [r5] a0003ffc: e59f1084 ldr r1, [pc, #132] ; a0004088 a0004000: e5942050 ldr r2, [r4, #80] ; 0x50 a0004004: e5930008 ldr r0, [r3, #8] a0004008: e5943054 ldr r3, [r4, #84] ; 0x54 a000400c: ea000004 b a0004024 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", a0004010: e5953000 ldr r3, [r5] a0004014: e59f1070 ldr r1, [pc, #112] ; a000408c a0004018: e5942050 ldr r2, [r4, #80] ; 0x50 a000401c: e5930008 ldr r0, [r3, #8] a0004020: e5943058 ldr r3, [r4, #88] ; 0x58 a0004024: eb00306c bl a00101dc (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; a0004028: ea000012 b a0004078 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", a000402c: e5953000 ldr r3, [r5] a0004030: e59f1058 ldr r1, [pc, #88] ; a0004090 a0004034: e5942050 ldr r2, [r4, #80] ; 0x50 a0004038: e5930008 ldr r0, [r3, #8] a000403c: eb003066 bl a00101dc (uint32_t)the_jnode->info.file.size ); #endif break; a0004040: ea00000c b a0004078 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); a0004044: e5953000 ldr r3, [r5] <== NOT EXECUTED a0004048: e59f0044 ldr r0, [pc, #68] ; a0004094 <== NOT EXECUTED a000404c: ea000001 b a0004058 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a0004050: e5953000 ldr r3, [r5] <== NOT EXECUTED a0004054: e59f003c ldr r0, [pc, #60] ; a0004098 <== NOT EXECUTED a0004058: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } a000405c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a0004060: ea0030b2 b a0010330 <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); a0004064: e5953000 ldr r3, [r5] <== NOT EXECUTED a0004068: e59f102c ldr r1, [pc, #44] ; a000409c <== NOT EXECUTED a000406c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } a0004070: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); a0004074: ea003058 b a00101dc <== NOT EXECUTED return; } puts(""); a0004078: e59f0020 ldr r0, [pc, #32] ; a00040a0 } a000407c: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); a0004080: ea003784 b a0011e98 =============================================================================== a0009108 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; a0009108: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a000910c: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { a0009110: e593204c ldr r2, [r3, #76] ; 0x4c a0009114: e2422002 sub r2, r2, #2 a0009118: e3520005 cmp r2, #5 a000911c: 979ff102 ldrls pc, [pc, r2, lsl #2] a0009120: ea000012 b a0009170 <== NOT EXECUTED a0009124: a000913c .word 0xa000913c <== NOT EXECUTED a0009128: a0009170 .word 0xa0009170 <== NOT EXECUTED a000912c: a000915c .word 0xa000915c <== NOT EXECUTED a0009130: a0009150 .word 0xa0009150 <== NOT EXECUTED a0009134: a0009150 .word 0xa0009150 <== NOT EXECUTED a0009138: a000915c .word 0xa000915c <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); a000913c: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; a0009140: e593c050 ldr ip, [r3, #80] ; 0x50 a0009144: e581201c str r2, [r1, #28] a0009148: e581c018 str ip, [r1, #24] break; a000914c: ea00000c b a0009184 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; a0009150: e283c050 add ip, r3, #80 ; 0x50 a0009154: e89c1800 ldm ip, {fp, ip} a0009158: ea000001 b a0009164 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; a000915c: e3a0b000 mov fp, #0 a0009160: e3a0c000 mov ip, #0 a0009164: e581b020 str fp, [r1, #32] a0009168: e581c024 str ip, [r1, #36] ; 0x24 break; a000916c: ea000004 b a0009184 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); a0009170: eb000a8d bl a000bbac <__errno> a0009174: e3a03086 mov r3, #134 ; 0x86 a0009178: e5803000 str r3, [r0] a000917c: e3e00000 mvn r0, #0 a0009180: e8bd8800 pop {fp, pc} /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; a0009184: e5902010 ldr r2, [r0, #16] a0009188: e59f0054 ldr r0, [pc, #84] ; a00091e4 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a000918c: e5922034 ldr r2, [r2, #52] ; 0x34 a0009190: e5922000 ldr r2, [r2] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = a0009194: e5810000 str r0, [r1] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; a0009198: e3a00000 mov r0, #0 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = a000919c: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; a00091a0: e5932030 ldr r2, [r3, #48] ; 0x30 a00091a4: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; a00091a8: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a00091ac: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; a00091b0: e5932038 ldr r2, [r3, #56] ; 0x38 a00091b4: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; a00091b8: e1d323bc ldrh r2, [r3, #60] ; 0x3c a00091bc: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; a00091c0: e1d323be ldrh r2, [r3, #62] ; 0x3e a00091c4: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; a00091c8: e5932040 ldr r2, [r3, #64] ; 0x40 a00091cc: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; a00091d0: e5932044 ldr r2, [r3, #68] ; 0x44 buf->st_ctime = the_jnode->stat_ctime; a00091d4: e5933048 ldr r3, [r3, #72] ; 0x48 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; a00091d8: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; a00091dc: e5813038 str r3, [r1, #56] ; 0x38 return 0; } a00091e0: e8bd8800 pop {fp, pc} =============================================================================== a0001770 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0001770: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; a0001774: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0001778: e24dd01c sub sp, sp, #28 a000177c: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a0001780: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0001784: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a0001788: e3530003 cmp r3, #3 a000178c: 1a000024 bne a0001824 if ( !node->info.hard_link.link_node ) a0001790: e595e050 ldr lr, [r5, #80] ; 0x50 a0001794: e35e0000 cmp lr, #0 a0001798: 1a000003 bne a00017ac rtems_set_errno_and_return_minus_one( EINVAL ); a000179c: eb002902 bl a000bbac <__errno> <== NOT EXECUTED a00017a0: e3a03016 mov r3, #22 <== NOT EXECUTED a00017a4: e5803000 str r3, [r0] <== NOT EXECUTED a00017a8: ea000023 b a000183c <== NOT EXECUTED the_link = *loc; a00017ac: e1a0c00d mov ip, sp a00017b0: e1a07001 mov r7, r1 a00017b4: e8b7000f ldm r7!, {r0, r1, r2, r3} a00017b8: e8ac000f stmia ip!, {r0, r1, r2, r3} a00017bc: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; a00017c0: e28d701c add r7, sp, #28 a00017c4: e527e01c str lr, [r7, #-28]! IMFS_Set_handlers( &the_link ); a00017c8: 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; a00017cc: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); a00017d0: eb001bde bl a0008750 /* * 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) a00017d4: e5953050 ldr r3, [r5, #80] ; 0x50 a00017d8: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a00017dc: e3520001 cmp r2, #1 a00017e0: 1a000007 bne a0001804 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); a00017e4: e59d3008 ldr r3, [sp, #8] a00017e8: e1a00006 mov r0, r6 a00017ec: e1a0100d mov r1, sp a00017f0: e5933034 ldr r3, [r3, #52] ; 0x34 a00017f4: e12fff33 blx r3 if ( result != 0 ) a00017f8: e3500000 cmp r0, #0 a00017fc: 0a000008 beq a0001824 a0001800: ea00000d b a000183c return -1; } else { node->info.hard_link.link_node->st_nlink --; a0001804: e2422001 sub r2, r2, #1 a0001808: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); a000180c: e28d0014 add r0, sp, #20 a0001810: e3a01000 mov r1, #0 a0001814: eb000139 bl a0001d00 a0001818: e5953050 ldr r3, [r5, #80] ; 0x50 a000181c: e59d2014 ldr r2, [sp, #20] a0001820: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); a0001824: e5943008 ldr r3, [r4, #8] a0001828: e1a00006 mov r0, r6 a000182c: e1a01004 mov r1, r4 a0001830: e5933034 ldr r3, [r3, #52] ; 0x34 a0001834: e12fff33 blx r3 return result; a0001838: ea000000 b a0001840 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; a000183c: e3e00000 mvn r0, #0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } a0001840: e28dd01c add sp, sp, #28 a0001844: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0001848 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a0001848: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a000184c: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a0001850: e593204c ldr r2, [r3, #76] ; 0x4c a0001854: e3520001 cmp r2, #1 a0001858: 0a000002 beq a0001868 rtems_set_errno_and_return_minus_one( ENOTDIR ); a000185c: eb0028d2 bl a000bbac <__errno> <== NOT EXECUTED a0001860: e3a03014 mov r3, #20 <== NOT EXECUTED a0001864: ea000004 b a000187c <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) a0001868: e593205c ldr r2, [r3, #92] ; 0x5c a000186c: e3520000 cmp r2, #0 a0001870: 1a000004 bne a0001888 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ a0001874: eb0028cc bl a000bbac <__errno> <== NOT EXECUTED a0001878: e3a03016 mov r3, #22 <== NOT EXECUTED a000187c: e5803000 str r3, [r0] <== NOT EXECUTED a0001880: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001884: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; a0001888: e3a00000 mov r0, #0 a000188c: e583005c str r0, [r3, #92] ; 0x5c return 0; } a0001890: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a00010e0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { a00010e0: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); a00010e4: e59030c4 ldr r3, [r0, #196] ; 0xc4 size = Stack_check_usable_stack_size(stack); a00010e8: e59070c0 ldr r7, [r0, #192] ; 0xc0 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { a00010ec: e1a05000 mov r5, r0 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); a00010f0: e2832010 add r2, r3, #16 size = Stack_check_usable_stack_size(stack); a00010f4: e2477010 sub r7, r7, #16 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) a00010f8: e3c71003 bic r1, r7, #3 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); a00010fc: e590b0f0 ldr fp, [r0, #240] ; 0xf0 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; a0001100: e2820010 add r0, r2, #16 for (ebase = base + length; base < ebase; base++) a0001104: e0800001 add r0, r0, r1 * Try to print out how much stack was actually used by the task. */ static void *print_context; static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( a0001108: e2833020 add r3, r3, #32 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) a000110c: e59f10bc ldr r1, [pc, #188] ; a00011d0 a0001110: ea000002 b a0001120 a0001114: e493c004 ldr ip, [r3], #4 a0001118: e15c0001 cmp ip, r1 a000111c: 1a000004 bne a0001134 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) a0001120: e1530000 cmp r3, r0 if (*base != U32_PATTERN) a0001124: e1a06003 mov r6, r3 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) a0001128: 3afffff9 bcc a0001114 high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; a000112c: e3a06000 mov r6, #0 <== NOT EXECUTED a0001130: ea000002 b a0001140 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) a0001134: e3560000 cmp r6, #0 used = Stack_check_Calculate_used( low, size, high_water_mark ); a0001138: 10822007 addne r2, r2, r7 a000113c: 10666002 rsbne r6, r6, r2 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( a0001140: e5958008 ldr r8, [r5, #8] a0001144: e59f4088 ldr r4, [pc, #136] ; a00011d4 a0001148: e3a01005 mov r1, #5 a000114c: e28d2008 add r2, sp, #8 a0001150: e1a00008 mov r0, r8 a0001154: e8940600 ldm r4, {r9, sl} a0001158: eb000edc bl a0004cd0 a000115c: e59f1074 ldr r1, [pc, #116] ; a00011d8 a0001160: e1a03000 mov r3, r0 a0001164: e1a02008 mov r2, r8 a0001168: e1a0000a mov r0, sl a000116c: e12fff39 blx r9 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, a0001170: e59530c0 ldr r3, [r5, #192] ; 0xc0 a0001174: e59520c4 ldr r2, [r5, #196] ; 0xc4 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( a0001178: e58db000 str fp, [sp] print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, a000117c: e2433001 sub r3, r3, #1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( a0001180: e0823003 add r3, r2, r3 a0001184: e58d7004 str r7, [sp, #4] a0001188: e594c000 ldr ip, [r4] a000118c: e5940004 ldr r0, [r4, #4] a0001190: e59f1044 ldr r1, [pc, #68] ; a00011dc a0001194: e12fff3c blx ip stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { a0001198: e5943008 ldr r3, [r4, #8] a000119c: e3530000 cmp r3, #0 a00011a0: 1a000004 bne a00011b8 (*print_handler)( print_context, "Unavailable\n" ); a00011a4: e5943000 ldr r3, [r4] <== NOT EXECUTED a00011a8: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED a00011ac: e59f102c ldr r1, [pc, #44] ; a00011e0 <== NOT EXECUTED a00011b0: e12fff33 blx r3 <== NOT EXECUTED a00011b4: ea000004 b a00011cc <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); a00011b8: e5943000 ldr r3, [r4] a00011bc: e5940004 ldr r0, [r4, #4] a00011c0: e59f101c ldr r1, [pc, #28] ; a00011e4 a00011c4: e1a02006 mov r2, r6 a00011c8: e12fff33 blx r3 } } a00011cc: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0001290 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { a0001290: e92d40ff push {r0, r1, r2, r3, r4, r5, r6, r7, lr} <== NOT EXECUTED a0001294: e1a06000 mov r6, r0 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); a0001298: e59040c4 ldr r4, [r0, #196] ; 0xc4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); a000129c: e59f007c ldr r0, [pc, #124] ; a0001320 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { a00012a0: e20150ff and r5, r1, #255 ; 0xff <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); a00012a4: eb000611 bl a0002af0 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); a00012a8: e59f0074 ldr r0, [pc, #116] ; a0001324 <== NOT EXECUTED a00012ac: e1a01006 mov r1, r6 <== NOT EXECUTED a00012b0: eb00060e bl a0002af0 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); a00012b4: e59f006c ldr r0, [pc, #108] ; a0001328 <== NOT EXECUTED a00012b8: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED a00012bc: eb00060b bl a0002af0 <== NOT EXECUTED printk( a00012c0: e59f0064 ldr r0, [pc, #100] ; a000132c <== NOT EXECUTED a00012c4: e596100c ldr r1, [r6, #12] <== NOT EXECUTED a00012c8: eb000608 bl a0002af0 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( a00012cc: e1a0200d mov r2, sp <== NOT EXECUTED a00012d0: e3a01020 mov r1, #32 <== NOT EXECUTED a00012d4: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED a00012d8: eb000e7c bl a0004cd0 <== NOT EXECUTED a00012dc: e1a01000 mov r1, r0 <== NOT EXECUTED a00012e0: e59f0048 ldr r0, [pc, #72] ; a0001330 <== NOT EXECUTED a00012e4: eb000601 bl a0002af0 <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) a00012e8: e59620c4 ldr r2, [r6, #196] ; 0xc4 <== NOT EXECUTED a00012ec: e59610c0 ldr r1, [r6, #192] ; 0xc0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( a00012f0: e59f003c ldr r0, [pc, #60] ; a0001334 <== NOT EXECUTED a00012f4: e0823001 add r3, r2, r1 <== NOT EXECUTED a00012f8: eb0005fc bl a0002af0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { a00012fc: e3550000 cmp r5, #0 <== NOT EXECUTED a0001300: 1a000004 bne a0001318 <== NOT EXECUTED printk( a0001304: e59f002c ldr r0, [pc, #44] ; a0001338 <== NOT EXECUTED a0001308: e3a01010 mov r1, #16 <== NOT EXECUTED a000130c: e2842008 add r2, r4, #8 <== NOT EXECUTED a0001310: e2843018 add r3, r4, #24 <== NOT EXECUTED a0001314: eb0005f5 bl a0002af0 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); a0001318: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED a000131c: eb00107c bl a0005514 <== NOT EXECUTED =============================================================================== a0014b08 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0014b08: e590304c ldr r3, [r0, #76] ; 0x4c Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { a0014b0c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0014b10: e1520003 cmp r2, r3 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { a0014b14: e1a06000 mov r6, r0 a0014b18: e1a0a001 mov sl, r1 a0014b1c: e1a07002 mov r7, r2 a0014b20: e59d8020 ldr r8, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0014b24: 8a000013 bhi a0014b78 <_CORE_message_queue_Broadcast+0x70> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { a0014b28: e5905048 ldr r5, [r0, #72] ; 0x48 a0014b2c: e3550000 cmp r5, #0 a0014b30: 0a000009 beq a0014b5c <_CORE_message_queue_Broadcast+0x54> *count = 0; a0014b34: e3a00000 mov r0, #0 a0014b38: e5880000 str r0, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0014b3c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a0014b40: e594002c ldr r0, [r4, #44] ; 0x2c a0014b44: e1a0100a mov r1, sl a0014b48: e1a02007 mov r2, r7 a0014b4c: eb001e78 bl a001c534 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0014b50: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; a0014b54: e2855001 add r5, r5, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0014b58: e5837000 str r7, [r3] /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = a0014b5c: e1a00006 mov r0, r6 a0014b60: eb0009b9 bl a001724c <_Thread_queue_Dequeue> a0014b64: e2504000 subs r4, r0, #0 a0014b68: 1afffff4 bne a0014b40 <_CORE_message_queue_Broadcast+0x38> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; a0014b6c: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0014b70: e1a00004 mov r0, r4 a0014b74: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; a0014b78: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a0014b7c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000dbe4 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dbe4: e92d40f0 push {r4, r5, r6, r7, lr} /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { a000dbe8: e3130003 tst r3, #3 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dbec: e1a04000 mov r4, r0 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; a000dbf0: e3a00000 mov r0, #0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dbf4: e1a06002 mov r6, r2 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; a000dbf8: e5842044 str r2, [r4, #68] ; 0x44 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dbfc: e1a05001 mov r5, r1 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; a000dc00: e5840048 str r0, [r4, #72] ; 0x48 the_message_queue->maximum_message_size = maximum_message_size; a000dc04: e584304c str r3, [r4, #76] ; 0x4c /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { a000dc08: 01a02003 moveq r2, r3 a000dc0c: 0a000003 beq a000dc20 <_CORE_message_queue_Initialize+0x3c> allocated_message_size += sizeof(uint32_t); a000dc10: e2832004 add r2, r3, #4 allocated_message_size &= ~(sizeof(uint32_t) - 1); a000dc14: e3c22003 bic r2, r2, #3 } if (allocated_message_size < maximum_message_size) a000dc18: e1520003 cmp r2, r3 a000dc1c: 3a00001e bcc a000dc9c <_CORE_message_queue_Initialize+0xb8> /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); a000dc20: e2827010 add r7, r2, #16 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * a000dc24: e0000796 mul r0, r6, r7 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) a000dc28: e1500002 cmp r0, r2 a000dc2c: 3a000018 bcc a000dc94 <_CORE_message_queue_Initialize+0xb0> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); a000dc30: eb000acd bl a001076c <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) a000dc34: e3500000 cmp r0, #0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); a000dc38: e1a01000 mov r1, r0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) a000dc3c: e584005c str r0, [r4, #92] ; 0x5c _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) a000dc40: 0a000015 beq a000dc9c <_CORE_message_queue_Initialize+0xb8> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( a000dc44: e2840060 add r0, r4, #96 ; 0x60 a000dc48: e1a02006 mov r2, r6 a000dc4c: e1a03007 mov r3, r7 a000dc50: eb00120a bl a0012480 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a000dc54: e2843054 add r3, r4, #84 ; 0x54 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( a000dc58: e5951000 ldr r1, [r5] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a000dc5c: e5843050 str r3, [r4, #80] ; 0x50 the_chain->permanent_null = NULL; a000dc60: e3a03000 mov r3, #0 a000dc64: e5843054 str r3, [r4, #84] ; 0x54 the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); a000dc68: e2843050 add r3, r4, #80 ; 0x50 the_chain->last = _Chain_Head(the_chain); a000dc6c: e5843058 str r3, [r4, #88] ; 0x58 _Thread_queue_Initialize( a000dc70: e1a00004 mov r0, r4 a000dc74: e3510001 cmp r1, #1 a000dc78: 13a01000 movne r1, #0 a000dc7c: 03a01001 moveq r1, #1 a000dc80: e3a02080 mov r2, #128 ; 0x80 a000dc84: e3a03006 mov r3, #6 a000dc88: eb0007e3 bl a000fc1c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; a000dc8c: e3a00001 mov r0, #1 a000dc90: e8bd80f0 pop {r4, r5, r6, r7, pc} */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; a000dc94: e3a00000 mov r0, #0 <== NOT EXECUTED a000dc98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } a000dc9c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0009da4 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a0009da4: e59f212c ldr r2, [pc, #300] ; a0009ed8 <_CORE_mutex_Seize_interrupt_trylock+0x134> #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { a0009da8: e1a03000 mov r3, r0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a0009dac: e593c050 ldr ip, [r3, #80] ; 0x50 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a0009db0: e5922004 ldr r2, [r2, #4] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a0009db4: e3a00000 mov r0, #0 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a0009db8: e15c0000 cmp ip, r0 a0009dbc: e92d4010 push {r4, lr} Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a0009dc0: e5820034 str r0, [r2, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a0009dc4: 0a00002c beq a0009e7c <_CORE_mutex_Seize_interrupt_trylock+0xd8> the_mutex->lock = CORE_MUTEX_LOCKED; a0009dc8: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; a0009dcc: e5920008 ldr r0, [r2, #8] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; a0009dd0: e583205c str r2, [r3, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; a0009dd4: e5830060 str r0, [r3, #96] ; 0x60 the_mutex->nest_count = 1; a0009dd8: e3a00001 mov r0, #1 a0009ddc: e5830054 str r0, [r3, #84] ; 0x54 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } a0009de0: e5930048 ldr r0, [r3, #72] ; 0x48 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a0009de4: e3500002 cmp r0, #2 a0009de8: 0a000001 beq a0009df4 <_CORE_mutex_Seize_interrupt_trylock+0x50> a0009dec: e3500003 cmp r0, #3 a0009df0: 1a000004 bne a0009e08 <_CORE_mutex_Seize_interrupt_trylock+0x64> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a0009df4: e592c01c ldr ip, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { a0009df8: e3500003 cmp r0, #3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a0009dfc: e28c4001 add r4, ip, #1 a0009e00: e582401c str r4, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { a0009e04: 0a000000 beq a0009e0c <_CORE_mutex_Seize_interrupt_trylock+0x68> _ISR_Enable( *level_p ); a0009e08: ea00002a b a0009eb8 <_CORE_mutex_Seize_interrupt_trylock+0x114> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; a0009e0c: e593004c ldr r0, [r3, #76] ; 0x4c current = executing->current_priority; a0009e10: e5924014 ldr r4, [r2, #20] if ( current == ceiling ) { a0009e14: e1540000 cmp r4, r0 a0009e18: 1a000000 bne a0009e20 <_CORE_mutex_Seize_interrupt_trylock+0x7c> _ISR_Enable( *level_p ); a0009e1c: ea000025 b a0009eb8 <_CORE_mutex_Seize_interrupt_trylock+0x114> return 0; } if ( current > ceiling ) { a0009e20: 9a00000b bls a0009e54 <_CORE_mutex_Seize_interrupt_trylock+0xb0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a0009e24: e59f20b0 ldr r2, [pc, #176] ; a0009edc <_CORE_mutex_Seize_interrupt_trylock+0x138> a0009e28: e5920000 ldr r0, [r2] a0009e2c: e2800001 add r0, r0, #1 a0009e30: e5820000 str r0, [r2] a0009e34: e5912000 ldr r2, [r1] a0009e38: e129f002 msr CPSR_fc, r2 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( a0009e3c: e3a02000 mov r2, #0 a0009e40: e593005c ldr r0, [r3, #92] ; 0x5c a0009e44: e593104c ldr r1, [r3, #76] ; 0x4c a0009e48: ebfff295 bl a00068a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); a0009e4c: ebfff3de bl a0006dcc <_Thread_Enable_dispatch> a0009e50: ea00001a b a0009ec0 <_CORE_mutex_Seize_interrupt_trylock+0x11c> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a0009e54: e3a00006 mov r0, #6 a0009e58: e5820034 str r0, [r2, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; a0009e5c: e3a00001 mov r0, #1 a0009e60: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ a0009e64: e3a00000 mov r0, #0 a0009e68: e5830054 str r0, [r3, #84] ; 0x54 executing->resource_count--; /* undo locking above */ a0009e6c: e582c01c str ip, [r2, #28] a0009e70: e5913000 ldr r3, [r1] a0009e74: e129f003 msr CPSR_fc, r3 a0009e78: e8bd8010 pop {r4, pc} /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { a0009e7c: e593005c ldr r0, [r3, #92] ; 0x5c a0009e80: e1500002 cmp r0, r2 a0009e84: 1a00000f bne a0009ec8 <_CORE_mutex_Seize_interrupt_trylock+0x124> switch ( the_mutex->Attributes.lock_nesting_behavior ) { a0009e88: e5932040 ldr r2, [r3, #64] ; 0x40 a0009e8c: e3520000 cmp r2, #0 a0009e90: 0a000002 beq a0009ea0 <_CORE_mutex_Seize_interrupt_trylock+0xfc> a0009e94: e3520001 cmp r2, #1 a0009e98: 1a00000c bne a0009ed0 <_CORE_mutex_Seize_interrupt_trylock+0x12c> a0009e9c: ea000003 b a0009eb0 <_CORE_mutex_Seize_interrupt_trylock+0x10c><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; a0009ea0: e5932054 ldr r2, [r3, #84] ; 0x54 a0009ea4: e2822001 add r2, r2, #1 a0009ea8: e5832054 str r2, [r3, #84] ; 0x54 _ISR_Enable( *level_p ); a0009eac: ea000001 b a0009eb8 <_CORE_mutex_Seize_interrupt_trylock+0x114> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; a0009eb0: e3a03002 mov r3, #2 <== NOT EXECUTED a0009eb4: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED a0009eb8: e5913000 ldr r3, [r1] a0009ebc: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; a0009ec0: e3a00000 mov r0, #0 a0009ec4: e8bd8010 pop {r4, pc} /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; a0009ec8: e3a00001 mov r0, #1 a0009ecc: e8bd8010 pop {r4, pc} a0009ed0: e3a00001 mov r0, #1 a0009ed4: e8bd8010 pop {r4, pc} =============================================================================== a0006c34 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006c34: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a0006c38: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006c3c: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006c40: e59f44c8 ldr r4, [pc, #1224] ; a0007110 <_Heap_Walk+0x4dc> int source, bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a0006c44: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; a0006c48: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006c4c: e31200ff tst r2, #255 ; 0xff bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; a0006c50: e590c020 ldr ip, [r0, #32] Heap_Block *const last_block = heap->last_block; a0006c54: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006c58: e59f34b4 ldr r3, [pc, #1204] ; a0007114 <_Heap_Walk+0x4e0> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006c5c: e1a06000 mov r6, r0 a0006c60: e1a05001 mov r5, r1 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006c64: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { a0006c68: e59f34a8 ldr r3, [pc, #1192] ; a0007118 <_Heap_Walk+0x4e4> Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; a0006c6c: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; a0006c70: e58dc020 str ip, [sp, #32] Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { a0006c74: e5933000 ldr r3, [r3] a0006c78: e3530003 cmp r3, #3 a0006c7c: 1a000118 bne a00070e4 <_Heap_Walk+0x4b0> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( a0006c80: e59dc024 ldr ip, [sp, #36] ; 0x24 a0006c84: e59d2020 ldr r2, [sp, #32] a0006c88: e58dc000 str ip, [sp] a0006c8c: e5903018 ldr r3, [r0, #24] a0006c90: e58d3004 str r3, [sp, #4] a0006c94: e590301c ldr r3, [r0, #28] a0006c98: e58d200c str r2, [sp, #12] a0006c9c: e59f2478 ldr r2, [pc, #1144] ; a000711c <_Heap_Walk+0x4e8> a0006ca0: e58d3008 str r3, [sp, #8] a0006ca4: e59d3028 ldr r3, [sp, #40] ; 0x28 a0006ca8: e58d3010 str r3, [sp, #16] a0006cac: e5903008 ldr r3, [r0, #8] a0006cb0: e58d3014 str r3, [sp, #20] a0006cb4: e590300c ldr r3, [r0, #12] a0006cb8: e1a00001 mov r0, r1 a0006cbc: e3a01000 mov r1, #0 a0006cc0: e58d3018 str r3, [sp, #24] a0006cc4: e1a03009 mov r3, r9 a0006cc8: e12fff34 blx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { a0006ccc: e3590000 cmp r9, #0 a0006cd0: 1a000005 bne a0006cec <_Heap_Walk+0xb8> (*printer)( source, true, "page size is zero\n" ); a0006cd4: e1a00005 mov r0, r5 a0006cd8: e3a01001 mov r1, #1 a0006cdc: e59f243c ldr r2, [pc, #1084] ; a0007120 <_Heap_Walk+0x4ec> a0006ce0: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006ce4: e1a08009 mov r8, r9 a0006ce8: ea0000fe b a00070e8 <_Heap_Walk+0x4b4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { a0006cec: e2198003 ands r8, r9, #3 (*printer)( a0006cf0: 11a00005 movne r0, r5 a0006cf4: 13a01001 movne r1, #1 a0006cf8: 159f2424 ldrne r2, [pc, #1060] ; a0007124 <_Heap_Walk+0x4f0> a0006cfc: 11a03009 movne r3, r9 a0006d00: 1a0000ff bne a0007104 <_Heap_Walk+0x4d0> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006d04: e59d0024 ldr r0, [sp, #36] ; 0x24 a0006d08: e1a01009 mov r1, r9 a0006d0c: ebffe758 bl a0000a74 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { a0006d10: e250b000 subs fp, r0, #0 a0006d14: 0a000005 beq a0006d30 <_Heap_Walk+0xfc> (*printer)( a0006d18: e1a00005 mov r0, r5 a0006d1c: e3a01001 mov r1, #1 a0006d20: e59f2400 ldr r2, [pc, #1024] ; a0007128 <_Heap_Walk+0x4f4> a0006d24: e59d3024 ldr r3, [sp, #36] ; 0x24 a0006d28: e12fff34 blx r4 a0006d2c: ea0000ed b a00070e8 <_Heap_Walk+0x4b4> a0006d30: e59dc020 ldr ip, [sp, #32] a0006d34: e1a01009 mov r1, r9 a0006d38: e28c0008 add r0, ip, #8 a0006d3c: ebffe74c bl a0000a74 <__umodsi3> ); return false; } if ( a0006d40: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( a0006d44: 11a00005 movne r0, r5 a0006d48: 13a01001 movne r1, #1 a0006d4c: 159f23d8 ldrne r2, [pc, #984] ; a000712c <_Heap_Walk+0x4f8> a0006d50: 159d3020 ldrne r3, [sp, #32] a0006d54: 1a0000c3 bne a0007068 <_Heap_Walk+0x434> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a0006d58: e59d2020 ldr r2, [sp, #32] a0006d5c: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { a0006d60: e2188001 ands r8, r8, #1 (*printer)( a0006d64: 01a00005 moveq r0, r5 a0006d68: 03a01001 moveq r1, #1 a0006d6c: 059f23bc ldreq r2, [pc, #956] ; a0007130 <_Heap_Walk+0x4fc> a0006d70: 0a000009 beq a0006d9c <_Heap_Walk+0x168> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a0006d74: e59d3028 ldr r3, [sp, #40] ; 0x28 a0006d78: e5937004 ldr r7, [r3, #4] a0006d7c: e3c77001 bic r7, r7, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a0006d80: e0837007 add r7, r3, r7 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a0006d84: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { a0006d88: e2188001 ands r8, r8, #1 a0006d8c: 1a000004 bne a0006da4 <_Heap_Walk+0x170> (*printer)( a0006d90: e59f239c ldr r2, [pc, #924] ; a0007134 <_Heap_Walk+0x500> a0006d94: e1a00005 mov r0, r5 a0006d98: e3a01001 mov r1, #1 a0006d9c: e12fff34 blx r4 a0006da0: ea0000d0 b a00070e8 <_Heap_Walk+0x4b4> ); return false; } if ( a0006da4: e59dc020 ldr ip, [sp, #32] a0006da8: e157000c cmp r7, ip a0006dac: 0a000005 beq a0006dc8 <_Heap_Walk+0x194> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( a0006db0: e1a00005 mov r0, r5 <== NOT EXECUTED a0006db4: e3a01001 mov r1, #1 <== NOT EXECUTED a0006db8: e59f2378 ldr r2, [pc, #888] ; a0007138 <_Heap_Walk+0x504> <== NOT EXECUTED a0006dbc: e12fff34 blx r4 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006dc0: e1a0800a mov r8, sl <== NOT EXECUTED a0006dc4: ea0000c7 b a00070e8 <_Heap_Walk+0x4b4> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; a0006dc8: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } a0006dcc: e5968008 ldr r8, [r6, #8] Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); a0006dd0: e1a0a006 mov sl, r6 a0006dd4: ea000032 b a0006ea4 <_Heap_Walk+0x270> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a0006dd8: e5963020 ldr r3, [r6, #32] a0006ddc: e1530008 cmp r3, r8 a0006de0: 83a0c000 movhi ip, #0 a0006de4: 8a000003 bhi a0006df8 <_Heap_Walk+0x1c4> a0006de8: e596c024 ldr ip, [r6, #36] ; 0x24 a0006dec: e15c0008 cmp ip, r8 a0006df0: 33a0c000 movcc ip, #0 a0006df4: 23a0c001 movcs ip, #1 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { a0006df8: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( a0006dfc: 01a00005 moveq r0, r5 a0006e00: 03a01001 moveq r1, #1 a0006e04: 059f2330 ldreq r2, [pc, #816] ; a000713c <_Heap_Walk+0x508> a0006e08: 0a000012 beq a0006e58 <_Heap_Walk+0x224> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006e0c: e2880008 add r0, r8, #8 a0006e10: e1a0100b mov r1, fp a0006e14: ebffe716 bl a0000a74 <__umodsi3> ); return false; } if ( a0006e18: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( a0006e1c: 11a00005 movne r0, r5 a0006e20: 13a01001 movne r1, #1 a0006e24: 159f2314 ldrne r2, [pc, #788] ; a0007140 <_Heap_Walk+0x50c> a0006e28: 11a03008 movne r3, r8 a0006e2c: 1a0000b4 bne a0007104 <_Heap_Walk+0x4d0> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a0006e30: e5983004 ldr r3, [r8, #4] a0006e34: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } a0006e38: e0883003 add r3, r8, r3 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a0006e3c: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a0006e40: e2133001 ands r3, r3, #1 a0006e44: e58d302c str r3, [sp, #44] ; 0x2c a0006e48: 0a000008 beq a0006e70 <_Heap_Walk+0x23c> (*printer)( a0006e4c: e59f22f0 ldr r2, [pc, #752] ; a0007144 <_Heap_Walk+0x510> a0006e50: e1a00005 mov r0, r5 a0006e54: e3a01001 mov r1, #1 a0006e58: e1a03008 mov r3, r8 a0006e5c: e58dc01c str ip, [sp, #28] a0006e60: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006e64: e59dc01c ldr ip, [sp, #28] a0006e68: e1a0800c mov r8, ip a0006e6c: ea00009d b a00070e8 <_Heap_Walk+0x4b4> ); return false; } if ( free_block->prev != prev_block ) { a0006e70: e598300c ldr r3, [r8, #12] a0006e74: e153000a cmp r3, sl a0006e78: 0a000007 beq a0006e9c <_Heap_Walk+0x268> (*printer)( a0006e7c: e58d3000 str r3, [sp] a0006e80: e1a00005 mov r0, r5 a0006e84: e1a03008 mov r3, r8 a0006e88: e3a01001 mov r1, #1 a0006e8c: e59f22b4 ldr r2, [pc, #692] ; a0007148 <_Heap_Walk+0x514> a0006e90: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006e94: e59d802c ldr r8, [sp, #44] ; 0x2c a0006e98: ea000092 b a00070e8 <_Heap_Walk+0x4b4> return false; } prev_block = free_block; free_block = free_block->next; a0006e9c: e1a0a008 mov sl, r8 a0006ea0: e5988008 ldr r8, [r8, #8] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { a0006ea4: e1580006 cmp r8, r6 a0006ea8: 1affffca bne a0006dd8 <_Heap_Walk+0x1a4> a0006eac: ea000000 b a0006eb4 <_Heap_Walk+0x280> block->prev_size ); } block = next_block; } while ( block != first_block ); a0006eb0: e1a07008 mov r7, r8 return true; } a0006eb4: e5973004 ldr r3, [r7, #4] const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a0006eb8: e5962020 ldr r2, [r6, #32] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a0006ebc: e3c3a001 bic sl, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a0006ec0: e087800a add r8, r7, sl const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a0006ec4: e1520008 cmp r2, r8 a0006ec8: 83a0b000 movhi fp, #0 a0006ecc: 8a000003 bhi a0006ee0 <_Heap_Walk+0x2ac> a0006ed0: e596b024 ldr fp, [r6, #36] ; 0x24 a0006ed4: e15b0008 cmp fp, r8 a0006ed8: 33a0b000 movcc fp, #0 a0006edc: 23a0b001 movcs fp, #1 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { a0006ee0: e21bb0ff ands fp, fp, #255 ; 0xff a0006ee4: 1a000006 bne a0006f04 <_Heap_Walk+0x2d0> (*printer)( a0006ee8: e58d8000 str r8, [sp] a0006eec: e1a00005 mov r0, r5 a0006ef0: e3a01001 mov r1, #1 a0006ef4: e59f2250 ldr r2, [pc, #592] ; a000714c <_Heap_Walk+0x518> a0006ef8: e1a03007 mov r3, r7 a0006efc: e12fff34 blx r4 a0006f00: ea000059 b a000706c <_Heap_Walk+0x438> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; a0006f04: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006f08: e1a0000a mov r0, sl a0006f0c: e1a01009 mov r1, r9 a0006f10: e057b002 subs fp, r7, r2 a0006f14: 13a0b001 movne fp, #1 a0006f18: e58d301c str r3, [sp, #28] a0006f1c: ebffe6d4 bl a0000a74 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { a0006f20: e3500000 cmp r0, #0 a0006f24: e59d301c ldr r3, [sp, #28] a0006f28: 0a000005 beq a0006f44 <_Heap_Walk+0x310> a0006f2c: e35b0000 cmp fp, #0 (*printer)( a0006f30: 158da000 strne sl, [sp] a0006f34: 11a00005 movne r0, r5 a0006f38: 13a01001 movne r1, #1 a0006f3c: 159f220c ldrne r2, [pc, #524] ; a0007150 <_Heap_Walk+0x51c> a0006f40: 1a000013 bne a0006f94 <_Heap_Walk+0x360> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { a0006f44: e59dc024 ldr ip, [sp, #36] ; 0x24 a0006f48: e15a000c cmp sl, ip a0006f4c: 2a000008 bcs a0006f74 <_Heap_Walk+0x340> a0006f50: e35b0000 cmp fp, #0 a0006f54: 0a000006 beq a0006f74 <_Heap_Walk+0x340> (*printer)( a0006f58: e88d1400 stm sp, {sl, ip} a0006f5c: e1a00005 mov r0, r5 a0006f60: e3a01001 mov r1, #1 a0006f64: e59f21e8 ldr r2, [pc, #488] ; a0007154 <_Heap_Walk+0x520> a0006f68: e1a03007 mov r3, r7 a0006f6c: e12fff34 blx r4 a0006f70: ea000064 b a0007108 <_Heap_Walk+0x4d4> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { a0006f74: e1580007 cmp r8, r7 a0006f78: 8a000008 bhi a0006fa0 <_Heap_Walk+0x36c> a0006f7c: e35b0000 cmp fp, #0 a0006f80: 0a000006 beq a0006fa0 <_Heap_Walk+0x36c> (*printer)( a0006f84: e59f21cc ldr r2, [pc, #460] ; a0007158 <_Heap_Walk+0x524> a0006f88: e58d8000 str r8, [sp] a0006f8c: e1a00005 mov r0, r5 a0006f90: e3a01001 mov r1, #1 a0006f94: e1a03007 mov r3, r7 a0006f98: e12fff34 blx r4 a0006f9c: ea000059 b a0007108 <_Heap_Walk+0x4d4> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a0006fa0: e203b001 and fp, r3, #1 a0006fa4: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { a0006fa8: e3130001 tst r3, #1 a0006fac: 1a000038 bne a0007094 <_Heap_Walk+0x460> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? a0006fb0: e597200c ldr r2, [r7, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( a0006fb4: e5963008 ldr r3, [r6, #8] block = next_block; } while ( block != first_block ); return true; } a0006fb8: e596100c ldr r1, [r6, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( a0006fbc: e1520003 cmp r2, r3 a0006fc0: 059f0194 ldreq r0, [pc, #404] ; a000715c <_Heap_Walk+0x528> a0006fc4: 0a000003 beq a0006fd8 <_Heap_Walk+0x3a4> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), a0006fc8: e59f3190 ldr r3, [pc, #400] ; a0007160 <_Heap_Walk+0x52c> a0006fcc: e1520006 cmp r2, r6 a0006fd0: e59f018c ldr r0, [pc, #396] ; a0007164 <_Heap_Walk+0x530> a0006fd4: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? a0006fd8: e5973008 ldr r3, [r7, #8] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( a0006fdc: e1530001 cmp r3, r1 a0006fe0: 059f1180 ldreq r1, [pc, #384] ; a0007168 <_Heap_Walk+0x534> a0006fe4: 0a000003 beq a0006ff8 <_Heap_Walk+0x3c4> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") a0006fe8: e59fc17c ldr ip, [pc, #380] ; a000716c <_Heap_Walk+0x538> a0006fec: e1530006 cmp r3, r6 a0006ff0: e59f116c ldr r1, [pc, #364] ; a0007164 <_Heap_Walk+0x530> a0006ff4: 01a0100c moveq r1, ip Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( a0006ff8: e58d2004 str r2, [sp, #4] a0006ffc: e58d0008 str r0, [sp, #8] a0007000: e58d300c str r3, [sp, #12] a0007004: e58d1010 str r1, [sp, #16] a0007008: e1a03007 mov r3, r7 a000700c: e58da000 str sl, [sp] a0007010: e1a00005 mov r0, r5 a0007014: e3a01000 mov r1, #0 a0007018: e59f2150 ldr r2, [pc, #336] ; a0007170 <_Heap_Walk+0x53c> a000701c: e12fff34 blx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { a0007020: e5983000 ldr r3, [r8] a0007024: e15a0003 cmp sl, r3 a0007028: 0a000008 beq a0007050 <_Heap_Walk+0x41c> (*printer)( a000702c: e58d3004 str r3, [sp, #4] a0007030: e58da000 str sl, [sp] a0007034: e58d8008 str r8, [sp, #8] a0007038: e1a00005 mov r0, r5 a000703c: e3a01001 mov r1, #1 a0007040: e59f212c ldr r2, [pc, #300] ; a0007174 <_Heap_Walk+0x540> a0007044: e1a03007 mov r3, r7 a0007048: e12fff34 blx r4 a000704c: ea00002d b a0007108 <_Heap_Walk+0x4d4> ); return false; } if ( !prev_used ) { a0007050: e35b0000 cmp fp, #0 a0007054: 1a000006 bne a0007074 <_Heap_Walk+0x440> (*printer)( a0007058: e59f2118 ldr r2, [pc, #280] ; a0007178 <_Heap_Walk+0x544> a000705c: e1a00005 mov r0, r5 a0007060: e3a01001 mov r1, #1 a0007064: e1a03007 mov r3, r7 a0007068: e12fff34 blx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a000706c: e1a0800b mov r8, fp a0007070: ea00001c b a00070e8 <_Heap_Walk+0x4b4> block = next_block; } while ( block != first_block ); return true; } a0007074: e5963008 ldr r3, [r6, #8] a0007078: ea000002 b a0007088 <_Heap_Walk+0x454> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { a000707c: e1530007 cmp r3, r7 a0007080: 0a000014 beq a00070d8 <_Heap_Walk+0x4a4> return true; } free_block = free_block->next; a0007084: 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 ) { a0007088: e1530006 cmp r3, r6 a000708c: 1afffffa bne a000707c <_Heap_Walk+0x448> a0007090: ea000017 b a00070f4 <_Heap_Walk+0x4c0> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { a0007094: e35b0000 cmp fp, #0 a0007098: 0a000006 beq a00070b8 <_Heap_Walk+0x484> (*printer)( a000709c: e58da000 str sl, [sp] a00070a0: e1a00005 mov r0, r5 a00070a4: e3a01000 mov r1, #0 a00070a8: e59f20cc ldr r2, [pc, #204] ; a000717c <_Heap_Walk+0x548> a00070ac: e1a03007 mov r3, r7 a00070b0: e12fff34 blx r4 a00070b4: ea000007 b a00070d8 <_Heap_Walk+0x4a4> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( a00070b8: e58da000 str sl, [sp] a00070bc: e5973000 ldr r3, [r7] a00070c0: e1a00005 mov r0, r5 a00070c4: e1a0100b mov r1, fp a00070c8: e58d3004 str r3, [sp, #4] a00070cc: e59f20ac ldr r2, [pc, #172] ; a0007180 <_Heap_Walk+0x54c> a00070d0: e1a03007 mov r3, r7 a00070d4: e12fff34 blx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); a00070d8: e59d2020 ldr r2, [sp, #32] a00070dc: e1580002 cmp r8, r2 a00070e0: 1affff72 bne a0006eb0 <_Heap_Walk+0x27c> Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; a00070e4: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } a00070e8: e1a00008 mov r0, r8 a00070ec: e28dd030 add sp, sp, #48 ; 0x30 a00070f0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( a00070f4: e59f2088 ldr r2, [pc, #136] ; a0007184 <_Heap_Walk+0x550> a00070f8: e1a00005 mov r0, r5 a00070fc: e3a01001 mov r1, #1 a0007100: e1a03007 mov r3, r7 a0007104: e12fff34 blx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a0007108: e3a08000 mov r8, #0 a000710c: eafffff5 b a00070e8 <_Heap_Walk+0x4b4> =============================================================================== a0006054 <_Internal_error_Occurred>: bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; a0006054: e59f3038 ldr r3, [pc, #56] ; a0006094 <_Internal_error_Occurred+0x40> void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { a0006058: e20110ff and r1, r1, #255 ; 0xff a000605c: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Internal_errors_What_happened.the_source = the_source; a0006060: e5830000 str r0, [r3] _Internal_errors_What_happened.is_internal = is_internal; a0006064: e5c31004 strb r1, [r3, #4] _Internal_errors_What_happened.the_error = the_error; a0006068: e5832008 str r2, [r3, #8] void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { a000606c: e1a04002 mov r4, r2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); a0006070: eb0006e5 bl a0007c0c <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; a0006074: e59f301c ldr r3, [pc, #28] ; a0006098 <_Internal_error_Occurred+0x44><== NOT EXECUTED a0006078: e3a02005 mov r2, #5 <== NOT EXECUTED a000607c: e5832000 str r2, [r3] <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0006080: e10f2000 mrs r2, CPSR <== NOT EXECUTED a0006084: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED a0006088: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); a000608c: e1a00004 mov r0, r4 <== NOT EXECUTED a0006090: eafffffe b a0006090 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED =============================================================================== a0005e18 <_TOD_Validate>: { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); a0005e18: e59f30b4 ldr r3, [pc, #180] ; a0005ed4 <_TOD_Validate+0xbc> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { a0005e1c: e92d4010 push {r4, lr} uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0005e20: e2504000 subs r4, r0, #0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); a0005e24: e593100c ldr r1, [r3, #12] if ((!the_tod) || a0005e28: 0a000021 beq a0005eb4 <_TOD_Validate+0x9c> ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / a0005e2c: e59f00a4 ldr r0, [pc, #164] ; a0005ed8 <_TOD_Validate+0xc0> a0005e30: eb0042e1 bl a00169bc <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0005e34: e5943018 ldr r3, [r4, #24] a0005e38: e1530000 cmp r3, r0 a0005e3c: 2a000020 bcs a0005ec4 <_TOD_Validate+0xac> (the_tod->ticks >= ticks_per_second) || a0005e40: e5943014 ldr r3, [r4, #20] a0005e44: e353003b cmp r3, #59 ; 0x3b a0005e48: 8a00001d bhi a0005ec4 <_TOD_Validate+0xac> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || a0005e4c: e5943010 ldr r3, [r4, #16] a0005e50: e353003b cmp r3, #59 ; 0x3b a0005e54: 8a00001a bhi a0005ec4 <_TOD_Validate+0xac> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || a0005e58: e594300c ldr r3, [r4, #12] a0005e5c: e3530017 cmp r3, #23 a0005e60: 8a000017 bhi a0005ec4 <_TOD_Validate+0xac> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || a0005e64: e5943004 ldr r3, [r4, #4] rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || a0005e68: e3530000 cmp r3, #0 a0005e6c: 0a000012 beq a0005ebc <_TOD_Validate+0xa4> (the_tod->month == 0) || a0005e70: e353000c cmp r3, #12 a0005e74: 8a000012 bhi a0005ec4 <_TOD_Validate+0xac> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a0005e78: e5942000 ldr r2, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || a0005e7c: e59f1058 ldr r1, [pc, #88] ; a0005edc <_TOD_Validate+0xc4> a0005e80: e1520001 cmp r2, r1 a0005e84: 9a000010 bls a0005ecc <_TOD_Validate+0xb4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) a0005e88: e5940008 ldr r0, [r4, #8] (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a0005e8c: e3500000 cmp r0, #0 a0005e90: 0a00000e beq a0005ed0 <_TOD_Validate+0xb8> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) a0005e94: e3120003 tst r2, #3 a0005e98: e59f2040 ldr r2, [pc, #64] ; a0005ee0 <_TOD_Validate+0xc8> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; a0005e9c: 0283300d addeq r3, r3, #13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a0005ea0: e7924103 ldr r4, [r2, r3, lsl #2] * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( a0005ea4: e1500004 cmp r0, r4 a0005ea8: 83a00000 movhi r0, #0 a0005eac: 93a00001 movls r0, #1 a0005eb0: e8bd8010 pop {r4, pc} (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; a0005eb4: e1a00004 mov r0, r4 <== NOT EXECUTED a0005eb8: e8bd8010 pop {r4, pc} <== NOT EXECUTED a0005ebc: e1a00003 mov r0, r3 <== NOT EXECUTED a0005ec0: e8bd8010 pop {r4, pc} <== NOT EXECUTED a0005ec4: e3a00000 mov r0, #0 a0005ec8: e8bd8010 pop {r4, pc} a0005ecc: e3a00000 mov r0, #0 if ( the_tod->day > days_in_month ) return false; return true; } a0005ed0: e8bd8010 pop {r4, pc} =============================================================================== a0006e84 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a0006e84: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; a0006e88: e3a06000 mov r6, #0 a0006e8c: e5816100 str r6, [r1, #256] ; 0x100 a0006e90: e5816104 str r6, [r1, #260] ; 0x104 extensions_area = NULL; the_thread->libc_reent = NULL; a0006e94: e58160fc str r6, [r1, #252] ; 0xfc Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a0006e98: e1a05000 mov r5, r0 a0006e9c: e1a04001 mov r4, r1 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); a0006ea0: e1a00001 mov r0, r1 a0006ea4: e1a01003 mov r1, r3 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a0006ea8: e1a07003 mov r7, r3 a0006eac: e59d8020 ldr r8, [sp, #32] a0006eb0: e5dda024 ldrb sl, [sp, #36] ; 0x24 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); a0006eb4: eb000261 bl a0007840 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) a0006eb8: e1500006 cmp r0, r6 a0006ebc: 13a03000 movne r3, #0 a0006ec0: 03a03001 moveq r3, #1 a0006ec4: e1500007 cmp r0, r7 a0006ec8: 21a07003 movcs r7, r3 a0006ecc: 33837001 orrcc r7, r3, #1 a0006ed0: e1570006 cmp r7, r6 a0006ed4: 1a00004c bne a000700c <_Thread_Initialize+0x188> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; a0006ed8: e59430c8 ldr r3, [r4, #200] ; 0xc8 the_stack->size = size; a0006edc: e58400c0 str r0, [r4, #192] ; 0xc0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0006ee0: e5847050 str r7, [r4, #80] ; 0x50 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; a0006ee4: e58430c4 str r3, [r4, #196] ; 0xc4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { a0006ee8: e59f312c ldr r3, [pc, #300] ; a000701c <_Thread_Initialize+0x198> the_watchdog->routine = routine; a0006eec: e5847064 str r7, [r4, #100] ; 0x64 the_watchdog->id = id; a0006ef0: e5847068 str r7, [r4, #104] ; 0x68 a0006ef4: e5936000 ldr r6, [r3] the_watchdog->user_data = user_data; a0006ef8: e584706c str r7, [r4, #108] ; 0x6c a0006efc: e3560000 cmp r6, #0 a0006f00: 0a000004 beq a0006f18 <_Thread_Initialize+0x94> extensions_area = _Workspace_Allocate( a0006f04: e2866001 add r6, r6, #1 a0006f08: e1a00106 lsl r0, r6, #2 a0006f0c: eb000452 bl a000805c <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) a0006f10: e2506000 subs r6, r0, #0 a0006f14: 0a000028 beq a0006fbc <_Thread_Initialize+0x138> * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { a0006f18: e3560000 cmp r6, #0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; a0006f1c: e5846108 str r6, [r4, #264] ; 0x108 * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { a0006f20: 0a000009 beq a0006f4c <_Thread_Initialize+0xc8> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0006f24: e59f30f0 ldr r3, [pc, #240] ; a000701c <_Thread_Initialize+0x198> a0006f28: e1a02006 mov r2, r6 a0006f2c: e5930000 ldr r0, [r3] a0006f30: e3a03000 mov r3, #0 the_thread->extensions[i] = NULL; a0006f34: e1a01003 mov r1, r3 a0006f38: ea000001 b a0006f44 <_Thread_Initialize+0xc0> a0006f3c: e4821004 str r1, [r2], #4 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0006f40: e2833001 add r3, r3, #1 a0006f44: e1530000 cmp r3, r0 a0006f48: 9afffffb bls a0006f3c <_Thread_Initialize+0xb8> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; a0006f4c: e59d3028 ldr r3, [sp, #40] ; 0x28 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; a0006f50: e3a07000 mov r7, #0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; a0006f54: e5c4a0ac strb sl, [r4, #172] ; 0xac the_thread->Start.budget_algorithm = budget_algorithm; a0006f58: e58430b0 str r3, [r4, #176] ; 0xb0 the_thread->Start.budget_callout = budget_callout; a0006f5c: e59d302c ldr r3, [sp, #44] ; 0x2c #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; a0006f60: e3a0a001 mov sl, #1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); a0006f64: e1a00004 mov r0, r4 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; a0006f68: e58430b4 str r3, [r4, #180] ; 0xb4 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; a0006f6c: e59d3030 ldr r3, [sp, #48] ; 0x30 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); a0006f70: e1a01008 mov r1, r8 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; a0006f74: e584a010 str sl, [r4, #16] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; a0006f78: e58430b8 str r3, [r4, #184] ; 0xb8 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; a0006f7c: e5847044 str r7, [r4, #68] ; 0x44 the_thread->resource_count = 0; a0006f80: e584701c str r7, [r4, #28] the_thread->real_priority = priority; a0006f84: e5848018 str r8, [r4, #24] the_thread->Start.initial_priority = priority; a0006f88: e58480bc str r8, [r4, #188] ; 0xbc _Thread_Set_priority( the_thread, priority ); a0006f8c: eb00019d bl a0007608 <_Thread_Set_priority> _Thread_Stack_Free( the_thread ); return false; } a0006f90: e595301c ldr r3, [r5, #28] Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a0006f94: e1d420b8 ldrh r2, [r4, #8] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); a0006f98: e5847084 str r7, [r4, #132] ; 0x84 a0006f9c: e5847088 str r7, [r4, #136] ; 0x88 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0006fa0: e7834102 str r4, [r3, r2, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a0006fa4: e59d3034 ldr r3, [sp, #52] ; 0x34 * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); a0006fa8: e1a00004 mov r0, r4 a0006fac: e584300c str r3, [r4, #12] a0006fb0: eb000328 bl a0007c58 <_User_extensions_Thread_create> if ( extension_status ) a0006fb4: e1500007 cmp r0, r7 a0006fb8: 1a000015 bne a0007014 <_Thread_Initialize+0x190> return true; failed: if ( the_thread->libc_reent ) a0006fbc: e59400fc ldr r0, [r4, #252] ; 0xfc a0006fc0: e3500000 cmp r0, #0 a0006fc4: 0a000000 beq a0006fcc <_Thread_Initialize+0x148> _Workspace_Free( the_thread->libc_reent ); a0006fc8: eb000429 bl a0008074 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0006fcc: e5940100 ldr r0, [r4, #256] ; 0x100 a0006fd0: e3500000 cmp r0, #0 a0006fd4: 0a000000 beq a0006fdc <_Thread_Initialize+0x158> _Workspace_Free( the_thread->API_Extensions[i] ); a0006fd8: eb000425 bl a0008074 <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0006fdc: e5940104 ldr r0, [r4, #260] ; 0x104 a0006fe0: e3500000 cmp r0, #0 a0006fe4: 0a000000 beq a0006fec <_Thread_Initialize+0x168> _Workspace_Free( the_thread->API_Extensions[i] ); a0006fe8: eb000421 bl a0008074 <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) a0006fec: e3560000 cmp r6, #0 a0006ff0: 0a000001 beq a0006ffc <_Thread_Initialize+0x178> (void) _Workspace_Free( extensions_area ); a0006ff4: e1a00006 mov r0, r6 a0006ff8: eb00041d bl a0008074 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); a0006ffc: e1a00004 mov r0, r4 a0007000: eb000225 bl a000789c <_Thread_Stack_Free> return false; a0007004: e3a00000 mov r0, #0 a0007008: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ a000700c: e1a00006 mov r0, r6 a0007010: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; a0007014: e1a0000a mov r0, sl _Thread_Stack_Free( the_thread ); return false; } a0007018: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a0013fc8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a0013fc8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0013fcc: e24dd018 sub sp, sp, #24 a0013fd0: e28db00c add fp, sp, #12 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; a0013fd4: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0013fd8: e28ba004 add sl, fp, #4 a0013fdc: e28d7004 add r7, sp, #4 a0013fe0: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0013fe4: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; a0013fe8: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); a0013fec: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0013ff0: e1a0500d mov r5, sp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0013ff4: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; a0013ff8: e98d2008 stmib sp, {r3, sp} */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0013ffc: e2809030 add r9, r0, #48 ; 0x30 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; a0014000: e584b078 str fp, [r4, #120] ; 0x78 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); a0014004: e2848068 add r8, r4, #104 ; 0x68 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; a0014008: e59f2154 ldr r2, [pc, #340] ; a0014164 <_Timer_server_Body+0x19c> */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a001400c: e1a00009 mov r0, r9 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; a0014010: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; a0014014: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0014018: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; a001401c: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0014020: e0611003 rsb r1, r1, r3 a0014024: eb001095 bl a0018280 <_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(); a0014028: e59f3138 ldr r3, [pc, #312] ; a0014168 <_Timer_server_Body+0x1a0> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; a001402c: e5942074 ldr r2, [r4, #116] ; 0x74 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); a0014030: e5936000 ldr r6, [r3] /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { a0014034: e1560002 cmp r6, r2 a0014038: 9a000004 bls a0014050 <_Timer_server_Body+0x88> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a001403c: e0621006 rsb r1, r2, r6 a0014040: e1a00008 mov r0, r8 a0014044: e1a02005 mov r2, r5 a0014048: eb00108c bl a0018280 <_Watchdog_Adjust_to_chain> a001404c: ea000004 b a0014064 <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { a0014050: 2a000003 bcs a0014064 <_Timer_server_Body+0x9c> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); a0014054: e1a00008 mov r0, r8 a0014058: e3a01001 mov r1, #1 a001405c: e0662002 rsb r2, r6, r2 a0014060: eb00105e bl a00181e0 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; a0014064: e5846074 str r6, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); a0014068: e5940078 ldr r0, [r4, #120] ; 0x78 a001406c: eb000288 bl a0014a94 <_Chain_Get> if ( timer == NULL ) { a0014070: e2506000 subs r6, r0, #0 a0014074: 0a000009 beq a00140a0 <_Timer_server_Body+0xd8> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { a0014078: e5963038 ldr r3, [r6, #56] ; 0x38 a001407c: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); a0014080: 01a00009 moveq r0, r9 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { a0014084: 0a000002 beq a0014094 <_Timer_server_Body+0xcc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { a0014088: e3530003 cmp r3, #3 a001408c: 1afffff5 bne a0014068 <_Timer_server_Body+0xa0> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); a0014090: e1a00008 mov r0, r8 a0014094: e2861010 add r1, r6, #16 a0014098: eb0010a3 bl a001832c <_Watchdog_Insert> a001409c: eafffff1 b a0014068 <_Timer_server_Body+0xa0> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); a00140a0: ebffff96 bl a0013f00 if ( _Chain_Is_empty( insert_chain ) ) { a00140a4: e59d300c ldr r3, [sp, #12] a00140a8: e153000a cmp r3, sl a00140ac: 1a000006 bne a00140cc <_Timer_server_Body+0x104> ts->insert_chain = NULL; a00140b0: e5846078 str r6, [r4, #120] ; 0x78 a00140b4: e129f000 msr CPSR_fc, r0 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { a00140b8: e59d3000 ldr r3, [sp] a00140bc: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; a00140c0: 13a06000 movne r6, #0 a00140c4: 1a000002 bne a00140d4 <_Timer_server_Body+0x10c> a00140c8: ea000013 b a001411c <_Timer_server_Body+0x154> a00140cc: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED a00140d0: eaffffcc b a0014008 <_Timer_server_Body+0x40> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); a00140d4: ebffff89 bl a0013f00 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a00140d8: e59d2000 ldr r2, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a00140dc: e1520007 cmp r2, r7 a00140e0: 0a00000b beq a0014114 <_Timer_server_Body+0x14c> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; a00140e4: e5923000 ldr r3, [r2] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { a00140e8: e3520000 cmp r2, #0 the_chain->first = new_first; a00140ec: e58d3000 str r3, [sp] new_first->previous = _Chain_Head(the_chain); a00140f0: e5835004 str r5, [r3, #4] a00140f4: 0a000006 beq a0014114 <_Timer_server_Body+0x14c> watchdog->state = WATCHDOG_INACTIVE; a00140f8: e5826008 str r6, [r2, #8] a00140fc: e129f000 msr CPSR_fc, r0 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); a0014100: e592301c ldr r3, [r2, #28] a0014104: e5920020 ldr r0, [r2, #32] a0014108: e5921024 ldr r1, [r2, #36] ; 0x24 a001410c: e12fff33 blx r3 } a0014110: eaffffef b a00140d4 <_Timer_server_Body+0x10c> a0014114: e129f000 msr CPSR_fc, r0 a0014118: eaffffb8 b a0014000 <_Timer_server_Body+0x38> } else { ts->active = false; a001411c: e3a03000 mov r3, #0 a0014120: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); a0014124: ebffff79 bl a0013f10 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); a0014128: e3a01008 mov r1, #8 a001412c: e5940000 ldr r0, [r4] a0014130: eb000ded bl a00178ec <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); a0014134: e1a00004 mov r0, r4 a0014138: ebffff7a bl a0013f28 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); a001413c: e1a00004 mov r0, r4 a0014140: ebffff8c bl a0013f78 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); a0014144: eb000b6e bl a0016f04 <_Thread_Enable_dispatch> ts->active = true; a0014148: e3a03001 mov r3, #1 a001414c: e5c4307c strb r3, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); a0014150: e2840008 add r0, r4, #8 a0014154: eb0010ca bl a0018484 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0014158: e2840040 add r0, r4, #64 ; 0x40 a001415c: eb0010c8 bl a0018484 <_Watchdog_Remove> a0014160: eaffffa6 b a0014000 <_Timer_server_Body+0x38> =============================================================================== a0009704 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) a0009704: e5902000 ldr r2, [r0] a0009708: e5913000 ldr r3, [r1] a000970c: e1520003 cmp r2, r3 return true; a0009710: c3a00001 movgt r0, #1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) a0009714: c12fff1e bxgt lr return true; if ( lhs->tv_sec < rhs->tv_sec ) a0009718: ba000005 blt a0009734 <_Timespec_Greater_than+0x30> #include #include #include bool _Timespec_Greater_than( a000971c: e5900004 ldr r0, [r0, #4] a0009720: e5913004 ldr r3, [r1, #4] a0009724: e1500003 cmp r0, r3 a0009728: d3a00000 movle r0, #0 a000972c: c3a00001 movgt r0, #1 a0009730: e12fff1e bx lr { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; a0009734: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } a0009738: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000973c <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) a000973c: e5902000 ldr r2, [r0] a0009740: e5913000 ldr r3, [r1] a0009744: e1520003 cmp r2, r3 return true; a0009748: b3a00001 movlt r0, #1 bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) a000974c: b12fff1e bxlt lr return true; if ( lhs->tv_sec > rhs->tv_sec ) a0009750: ca000005 bgt a000976c <_Timespec_Less_than+0x30> #include #include #include bool _Timespec_Less_than( a0009754: e5900004 ldr r0, [r0, #4] a0009758: e5913004 ldr r3, [r1, #4] a000975c: e1500003 cmp r0, r3 a0009760: a3a00000 movge r0, #0 a0009764: b3a00001 movlt r0, #1 a0009768: e12fff1e bx lr { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) return false; a000976c: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } a0009770: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0007c0c <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { a0007c0c: e92d41f0 push {r4, r5, r6, r7, r8, lr} Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; a0007c10: e59f503c ldr r5, [pc, #60] ; a0007c54 <_User_extensions_Fatal+0x48> void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { a0007c14: e1a08000 mov r8, r0 a0007c18: e1a07002 mov r7, r2 a0007c1c: e20160ff and r6, r1, #255 ; 0xff Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; a0007c20: e5954008 ldr r4, [r5, #8] a0007c24: ea000007 b a0007c48 <_User_extensions_Fatal+0x3c> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) a0007c28: e5943030 ldr r3, [r4, #48] ; 0x30 a0007c2c: e3530000 cmp r3, #0 a0007c30: 0a000003 beq a0007c44 <_User_extensions_Fatal+0x38> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); a0007c34: e1a00008 mov r0, r8 a0007c38: e1a01006 mov r1, r6 a0007c3c: e1a02007 mov r2, r7 a0007c40: e12fff33 blx r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { a0007c44: e5944004 ldr r4, [r4, #4] ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; a0007c48: e1540005 cmp r4, r5 a0007c4c: 1afffff5 bne a0007c28 <_User_extensions_Fatal+0x1c> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } a0007c50: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== a001f3e0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } a001f3e0: e3a00000 mov r0, #0 <== NOT EXECUTED a001f3e4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0001d64 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); a0001d64: eaffffe5 b a0001d00 <== NOT EXECUTED =============================================================================== a0008470 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { a0008470: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) a0008474: e3d27007 bics r7, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { a0008478: e1a09000 mov r9, r0 a000847c: e1a04001 mov r4, r1 a0008480: e1a05003 mov r5, r3 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) a0008484: 0a000002 beq a0008494 rtems_set_errno_and_return_minus_one( EPERM ); a0008488: eb00065b bl a0009dfc <__errno> <== NOT EXECUTED a000848c: e3a03001 mov r3, #1 <== NOT EXECUTED a0008490: ea000005 b a00084ac <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; a0008494: e5936000 ldr r6, [r3] if (!device_name_table) a0008498: e3560000 cmp r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { a000849c: 159fa094 ldrne sl, [pc, #148] ; a0008538 if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) a00084a0: 1a00001c bne a0008518 rtems_set_errno_and_return_minus_one( EFAULT ); a00084a4: eb000654 bl a0009dfc <__errno> a00084a8: e3a0300e mov r3, #14 a00084ac: e5803000 str r3, [r0] a00084b0: e3e00000 mvn r0, #0 a00084b4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) a00084b8: e5968000 ldr r8, [r6] a00084bc: e3580000 cmp r8, #0 a00084c0: 0a000012 beq a0008510 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) a00084c4: e1a00009 mov r0, r9 a00084c8: e1a01008 mov r1, r8 a00084cc: e1a02004 mov r2, r4 a00084d0: eb0009d0 bl a000ac18 a00084d4: e3500000 cmp r0, #0 a00084d8: 1a00000c bne a0008510 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') a00084dc: e7d80004 ldrb r0, [r8, r4] a00084e0: e3500000 cmp r0, #0 a00084e4: 1a000009 bne a0008510 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; a00084e8: e59f304c ldr r3, [pc, #76] ; a000853c if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; a00084ec: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; a00084f0: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; a00084f4: e59f3044 ldr r3, [pc, #68] ; a0008540 a00084f8: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; a00084fc: e59f3040 ldr r3, [pc, #64] ; a0008544 a0008500: e5933000 ldr r3, [r3] a0008504: e5933028 ldr r3, [r3, #40] ; 0x28 a0008508: e5853010 str r3, [r5, #16] return 0; a000850c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { a0008510: e2877001 add r7, r7, #1 a0008514: e2866014 add r6, r6, #20 a0008518: e59a3000 ldr r3, [sl] a000851c: e1570003 cmp r7, r3 a0008520: 3affffe4 bcc a00084b8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); a0008524: eb000634 bl a0009dfc <__errno> a0008528: e3a03002 mov r3, #2 a000852c: e5803000 str r3, [r0] a0008530: e3e00000 mvn r0, #0 } a0008534: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a0002ad8 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002ad8: e59030b4 ldr r3, [r0, #180] ; 0xb4 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { a0002adc: e92d4030 push {r4, r5, lr} rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002ae0: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { a0002ae4: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002ae8: 0a000011 beq a0002b34 rtems_interrupt_disable (level); a0002aec: ebfffff5 bl a0002ac8 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; a0002af0: e3a05002 mov r5, #2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { a0002af4: ea000009 b a0002b20 tty->rawOutBufState = rob_wait; a0002af8: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0002afc: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( a0002b00: e3a01000 mov r1, #0 <== NOT EXECUTED a0002b04: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED a0002b08: e1a02001 mov r2, r1 <== NOT EXECUTED a0002b0c: eb0008cb bl a0004e40 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0002b10: e3500000 cmp r0, #0 <== NOT EXECUTED a0002b14: 0a000000 beq a0002b1c <== NOT EXECUTED rtems_fatal_error_occurred (sc); a0002b18: eb000a5e bl a0005498 <== NOT EXECUTED rtems_interrupt_disable (level); a0002b1c: ebffffe9 bl a0002ac8 <== 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) { a0002b20: e5942084 ldr r2, [r4, #132] ; 0x84 a0002b24: e5943080 ldr r3, [r4, #128] ; 0x80 a0002b28: e1520003 cmp r2, r3 a0002b2c: 1afffff1 bne a0002af8 a0002b30: e129f000 msr CPSR_fc, r0 a0002b34: e8bd8030 pop {r4, r5, pc} =============================================================================== a00037ac : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) a00037ac: e5903020 ldr r3, [r0, #32] * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { a00037b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} if (tty->ccount == 0) a00037b4: e3530000 cmp r3, #0 * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { a00037b8: e1a04000 mov r4, r0 a00037bc: e1a07001 mov r7, r1 if (tty->ccount == 0) a00037c0: 0a000067 beq a0003964 return; if (lineFlag) { a00037c4: e3510000 cmp r1, #0 a00037c8: 0a000061 beq a0003954 if (!(tty->termios.c_lflag & ECHO)) { a00037cc: e590303c ldr r3, [r0, #60] ; 0x3c a00037d0: e2132008 ands r2, r3, #8 a00037d4: 1a000001 bne a00037e0 tty->ccount = 0; a00037d8: e5802020 str r2, [r0, #32] <== NOT EXECUTED return; a00037dc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { a00037e0: e2133010 ands r3, r3, #16 a00037e4: 1a00005a bne a0003954 tty->ccount = 0; a00037e8: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); a00037ec: e1a01004 mov r1, r4 <== NOT EXECUTED a00037f0: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED a00037f4: ebffffc9 bl a0003720 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) a00037f8: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED a00037fc: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); a0003800: 13a0000a movne r0, #10 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) a0003804: 0a000056 beq a0003964 <== NOT EXECUTED a0003808: ea00000b b a000383c <== NOT EXECUTED } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { a000380c: e594303c ldr r3, [r4, #60] ; 0x3c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; a0003810: e594001c ldr r0, [r4, #28] a0003814: e2411001 sub r1, r1, #1 a0003818: e5841020 str r1, [r4, #32] if (tty->termios.c_lflag & ECHO) { a000381c: e3130008 tst r3, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; a0003820: e7d05001 ldrb r5, [r0, r1] if (tty->termios.c_lflag & ECHO) { a0003824: 0a000047 beq a0003948 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { a0003828: e3570000 cmp r7, #0 a000382c: 1a000005 bne a0003848 a0003830: e3130010 tst r3, #16 a0003834: 1a000003 bne a0003848 echo (tty->termios.c_cc[VERASE], tty); a0003838: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED a000383c: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } a0003840: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); a0003844: eaffffb5 b a0003720 <== NOT EXECUTED } else if (c == '\t') { a0003848: e3550009 cmp r5, #9 a000384c: 1a00001f bne a00038d0 int col = tty->read_start_column; a0003850: e594502c ldr r5, [r4, #44] ; 0x2c */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { a0003854: e5968000 ldr r8, [r6] if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; int i = 0; a0003858: e3a02000 mov r2, #0 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) a000385c: e2033c02 and r3, r3, #512 ; 0x200 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { a0003860: ea00000c b a0003898 c = tty->cbuf[i++]; a0003864: e7d0c002 ldrb ip, [r0, r2] a0003868: e2822001 add r2, r2, #1 if (c == '\t') { a000386c: e35c0009 cmp ip, #9 col = (col | 7) + 1; a0003870: 03855007 orreq r5, r5, #7 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { a0003874: 0a000006 beq a0003894 col = (col | 7) + 1; } else if (iscntrl (c)) { a0003878: e088c00c add ip, r8, ip a000387c: e5dcc001 ldrb ip, [ip, #1] a0003880: e31c0020 tst ip, #32 a0003884: 0a000002 beq a0003894 if (tty->termios.c_lflag & ECHOCTL) a0003888: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; a000388c: 12855002 addne r5, r5, #2 <== NOT EXECUTED a0003890: ea000000 b a0003898 <== NOT EXECUTED } else { col++; a0003894: e2855001 add r5, r5, #1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { a0003898: e1520001 cmp r2, r1 a000389c: 1afffff0 bne a0003864 a00038a0: ea000006 b a00038c0 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); a00038a4: e59f00bc ldr r0, [pc, #188] ; a0003968 a00038a8: e3a01001 mov r1, #1 a00038ac: e1a02004 mov r2, r4 a00038b0: ebffff05 bl a00034cc tty->column--; a00038b4: e5943028 ldr r3, [r4, #40] ; 0x28 a00038b8: e2433001 sub r3, r3, #1 a00038bc: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { a00038c0: e5943028 ldr r3, [r4, #40] ; 0x28 a00038c4: e1530005 cmp r3, r5 a00038c8: cafffff5 bgt a00038a4 a00038cc: ea00001d b a0003948 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { a00038d0: e5962000 ldr r2, [r6] a00038d4: e2855001 add r5, r5, #1 a00038d8: e7d22005 ldrb r2, [r2, r5] a00038dc: e3120020 tst r2, #32 a00038e0: 0a000009 beq a000390c a00038e4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED a00038e8: 0a000007 beq a000390c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); a00038ec: e59f0078 ldr r0, [pc, #120] ; a000396c <== NOT EXECUTED a00038f0: e3a01003 mov r1, #3 <== NOT EXECUTED a00038f4: e1a02004 mov r2, r4 <== NOT EXECUTED a00038f8: ebfffef3 bl a00034cc <== NOT EXECUTED if (tty->column) a00038fc: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003900: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; a0003904: 12433001 subne r3, r3, #1 <== NOT EXECUTED a0003908: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { a000390c: e5963000 ldr r3, [r6] a0003910: e7d33005 ldrb r3, [r3, r5] a0003914: e3130020 tst r3, #32 a0003918: 0a000002 beq a0003928 a000391c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED a0003920: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED a0003924: 0a000007 beq a0003948 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); a0003928: e59f003c ldr r0, [pc, #60] ; a000396c a000392c: e3a01003 mov r1, #3 a0003930: e1a02004 mov r2, r4 a0003934: ebfffee4 bl a00034cc if (tty->column) a0003938: e5943028 ldr r3, [r4, #40] ; 0x28 a000393c: e3530000 cmp r3, #0 tty->column--; a0003940: 12433001 subne r3, r3, #1 a0003944: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) a0003948: e3570000 cmp r7, #0 a000394c: 1a000001 bne a0003958 a0003950: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} a0003954: e59f6014 ldr r6, [pc, #20] ; a0003970 echo ('\n', tty); return; } } while (tty->ccount) { a0003958: e5941020 ldr r1, [r4, #32] a000395c: e3510000 cmp r1, #0 a0003960: 1affffa9 bne a000380c a0003964: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a0002530 : int fcntl( int fd, int cmd, ... ) { a0002530: e92d000e push {r1, r2, r3} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a0002534: e59f21a8 ldr r2, [pc, #424] ; a00026e4 int fcntl( int fd, int cmd, ... ) { a0002538: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a000253c: e5921000 ldr r1, [r2] ... ) { int ret; va_list ap; va_start( ap, cmd ); a0002540: e28d301c add r3, sp, #28 int fcntl( int fd, int cmd, ... ) { a0002544: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a0002548: e1500001 cmp r0, r1 ... ) { int ret; va_list ap; va_start( ap, cmd ); a000254c: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a0002550: 2a000006 bcs a0002570 iop = rtems_libio_iop( fd ); a0002554: e59f218c ldr r2, [pc, #396] ; a00026e8 a0002558: e3a04038 mov r4, #56 ; 0x38 a000255c: e5922000 ldr r2, [r2] a0002560: e0242490 mla r4, r0, r4, r2 rtems_libio_check_is_open(iop); a0002564: e5940014 ldr r0, [r4, #20] a0002568: e3100c01 tst r0, #256 ; 0x100 a000256c: 1a000002 bne a000257c a0002570: eb00296d bl a000cb2c <__errno> a0002574: e3a03009 mov r3, #9 a0002578: ea000047 b a000269c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { a000257c: e3570009 cmp r7, #9 a0002580: 979ff107 ldrls pc, [pc, r7, lsl #2] a0002584: ea000042 b a0002694 a0002588: a00025b0 .word 0xa00025b0 <== NOT EXECUTED a000258c: a0002620 .word 0xa0002620 <== NOT EXECUTED a0002590: a0002630 .word 0xa0002630 <== NOT EXECUTED a0002594: a0002650 .word 0xa0002650 <== NOT EXECUTED a0002598: a000265c .word 0xa000265c <== NOT EXECUTED a000259c: a0002688 .word 0xa0002688 <== NOT EXECUTED a00025a0: a0002688 .word 0xa0002688 <== NOT EXECUTED a00025a4: a0002688 .word 0xa0002688 <== NOT EXECUTED a00025a8: a0002688 .word 0xa0002688 <== NOT EXECUTED a00025ac: a0002688 .word 0xa0002688 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); a00025b0: e5933000 ldr r3, [r3] if ( fd2 ) a00025b4: e3530000 cmp r3, #0 a00025b8: 0a000004 beq a00025d0 diop = rtems_libio_iop( fd2 ); a00025bc: e1530001 cmp r3, r1 a00025c0: 33a06038 movcc r6, #56 ; 0x38 a00025c4: 30262693 mlacc r6, r3, r6, r2 a00025c8: 3a000005 bcc a00025e4 a00025cc: ea000003 b a00025e0 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); a00025d0: eb00019c bl a0002c48 if ( diop == 0 ) { a00025d4: e2506000 subs r6, r0, #0 a00025d8: 1a000001 bne a00025e4 a00025dc: ea00003b b a00026d0 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); a00025e0: e3a06000 mov r6, #0 <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; a00025e4: e5943014 ldr r3, [r4, #20] diop->pathinfo = iop->pathinfo; a00025e8: e286c018 add ip, r6, #24 a00025ec: e2845018 add r5, r4, #24 ret = -1; break; } } diop->flags = iop->flags; a00025f0: e5863014 str r3, [r6, #20] diop->pathinfo = iop->pathinfo; a00025f4: e8b5000f ldm r5!, {r0, r1, r2, r3} a00025f8: e8ac000f stmia ip!, {r0, r1, r2, r3} a00025fc: e5953000 ldr r3, [r5] a0002600: e58c3000 str r3, [ip] ret = (int) (diop - rtems_libio_iops); a0002604: e59f30dc ldr r3, [pc, #220] ; a00026e8 a0002608: e5933000 ldr r3, [r3] a000260c: e0636006 rsb r6, r3, r6 a0002610: e59f30d4 ldr r3, [pc, #212] ; a00026ec a0002614: e1a061c6 asr r6, r6, #3 a0002618: e0060693 mul r6, r3, r6 a000261c: ea000020 b a00026a4 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); a0002620: e3100b02 tst r0, #2048 ; 0x800 a0002624: 03a06000 moveq r6, #0 a0002628: 13a06001 movne r6, #1 a000262c: ea00001e b a00026ac * 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 ) ) a0002630: e5936000 ldr r6, [r3] a0002634: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; a0002638: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; a000263c: 03c00b02 biceq r0, r0, #2048 ; 0x800 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; a0002640: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; a0002644: 05840014 streq r0, [r4, #20] * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) a0002648: 0a000017 beq a00026ac a000264c: ea00000b b a0002680 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); a0002650: eb00016a bl a0002c00 a0002654: e1a06000 mov r6, r0 a0002658: ea000011 b a00026a4 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); a000265c: e5930000 ldr r0, [r3] a0002660: eb000159 bl a0002bcc /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); a0002664: e5942014 ldr r2, [r4, #20] a0002668: e59f3080 ldr r3, [pc, #128] ; a00026f0 a000266c: e3c22c02 bic r2, r2, #512 ; 0x200 a0002670: e0003003 and r3, r0, r3 a0002674: e3c22001 bic r2, r2, #1 a0002678: e1833002 orr r3, r3, r2 a000267c: e5843014 str r3, [r4, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; a0002680: e3a06000 mov r6, #0 a0002684: ea000008 b a00026ac errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; a0002688: eb002927 bl a000cb2c <__errno> a000268c: e3a03086 mov r3, #134 ; 0x86 a0002690: ea000001 b a000269c ret = -1; break; default: errno = EINVAL; a0002694: eb002924 bl a000cb2c <__errno> a0002698: e3a03016 mov r3, #22 a000269c: e5803000 str r3, [r0] a00026a0: ea00000a b a00026d0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { a00026a4: e3560000 cmp r6, #0 a00026a8: ba000009 blt a00026d4 int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); a00026ac: e5943020 ldr r3, [r4, #32] a00026b0: e1a01004 mov r1, r4 a00026b4: e1a00007 mov r0, r7 a00026b8: e5933030 ldr r3, [r3, #48] ; 0x30 a00026bc: e12fff33 blx r3 if (err) { a00026c0: e2504000 subs r4, r0, #0 a00026c4: 0a000002 beq a00026d4 errno = err; a00026c8: eb002917 bl a000cb2c <__errno> <== NOT EXECUTED a00026cc: e5804000 str r4, [r0] <== NOT EXECUTED ret = -1; a00026d0: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } a00026d4: e1a00006 mov r0, r6 a00026d8: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} a00026dc: e28dd00c add sp, sp, #12 a00026e0: e12fff1e bx lr =============================================================================== a000b1c0 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a000b1c0: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { a000b1c4: e59f538c ldr r5, [pc, #908] ; a000b558 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a000b1c8: e1a08000 mov r8, r0 a000b1cc: e1a07001 mov r7, r1 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { a000b1d0: e5954000 ldr r4, [r5] a000b1d4: e3540000 cmp r4, #0 a000b1d8: 1a000012 bne a000b228 rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); a000b1dc: e59f3378 ldr r3, [pc, #888] ; a000b55c a000b1e0: e1a01004 mov r1, r4 a000b1e4: e1a02004 mov r2, r4 a000b1e8: e5930000 ldr r0, [r3] a000b1ec: ebffeefc bl a0006de4 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { a000b1f0: e5953000 ldr r3, [r5] a000b1f4: e3530000 cmp r3, #0 a000b1f8: 1a000005 bne a000b214 sc = rtems_semaphore_create( a000b1fc: e59f035c ldr r0, [pc, #860] ; a000b560 a000b200: e3a01001 mov r1, #1 a000b204: e3a02054 mov r2, #84 ; 0x54 a000b208: e58d5000 str r5, [sp] a000b20c: ebffee62 bl a0006b9c a000b210: e1a04000 mov r4, r0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a000b214: e59f3340 ldr r3, [pc, #832] ; a000b55c a000b218: e5930000 ldr r0, [r3] a000b21c: ebffef36 bl a0006efc } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { a000b220: e3540000 cmp r4, #0 a000b224: 1a000006 bne a000b244 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a000b228: e59f3328 ldr r3, [pc, #808] ; a000b558 a000b22c: e3a01000 mov r1, #0 a000b230: e1a02001 mov r2, r1 a000b234: e5930000 ldr r0, [r3] a000b238: ebffeee9 bl a0006de4 } if (sc == RTEMS_SUCCESSFUL) { a000b23c: e2505000 subs r5, r0, #0 a000b240: 0a000000 beq a000b248 return 0; } else { return -ENOMEM; a000b244: e3e0500b mvn r5, #11 { pipe_control_t *pipe; int err = 0; err = pipe_lock(); if (err) a000b248: e2556000 subs r6, r5, #0 a000b24c: 1a0000bf bne a000b550 return err; pipe = *pipep; a000b250: e5984000 ldr r4, [r8] if (pipe == NULL) { a000b254: e3540000 cmp r4, #0 a000b258: 1a00003c bne a000b350 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a000b25c: e3a00034 mov r0, #52 ; 0x34 a000b260: ebffe2fb bl a0003e54 if (pipe == NULL) a000b264: e250a000 subs sl, r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a000b268: e1a04000 mov r4, r0 if (pipe == NULL) a000b26c: 0a000035 beq a000b348 return err; memset(pipe, 0, sizeof(pipe_control_t)); a000b270: e1a01005 mov r1, r5 a000b274: e3a02034 mov r2, #52 ; 0x34 a000b278: eb000dfa bl a000ea68 pipe->Size = PIPE_BUF; a000b27c: e3a00c02 mov r0, #512 ; 0x200 a000b280: e5840004 str r0, [r4, #4] pipe->Buffer = malloc(pipe->Size); a000b284: ebffe2f2 bl a0003e54 if (! pipe->Buffer) a000b288: e3500000 cmp r0, #0 if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); a000b28c: e5840000 str r0, [r4] if (! pipe->Buffer) a000b290: 0a00002a beq a000b340 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), a000b294: e59f62c8 ldr r6, [pc, #712] ; a000b564 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( a000b298: e59f02c8 ldr r0, [pc, #712] ; a000b568 a000b29c: e1a01005 mov r1, r5 rtems_build_name ('P', 'I', 'r', c), a000b2a0: e5d63000 ldrb r3, [r6] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( a000b2a4: e1a02005 mov r2, r5 a000b2a8: e1830000 orr r0, r3, r0 a000b2ac: e284302c add r3, r4, #44 ; 0x2c a000b2b0: eb0003e5 bl a000c24c a000b2b4: e3500000 cmp r0, #0 a000b2b8: 1a00001e bne a000b338 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), a000b2bc: e5d63000 ldrb r3, [r6] if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( a000b2c0: e59f02a4 ldr r0, [pc, #676] ; a000b56c a000b2c4: e1a01005 mov r1, r5 a000b2c8: e1a02005 mov r2, r5 a000b2cc: e1830000 orr r0, r3, r0 a000b2d0: e2843030 add r3, r4, #48 ; 0x30 a000b2d4: eb0003dc bl a000c24c a000b2d8: e3500000 cmp r0, #0 a000b2dc: 1a000013 bne a000b330 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( rtems_build_name ('P', 'I', 's', c), 1, a000b2e0: e5d63000 ldrb r3, [r6] if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( a000b2e4: e59f0284 ldr r0, [pc, #644] ; a000b570 a000b2e8: e2842028 add r2, r4, #40 ; 0x28 a000b2ec: e58d2000 str r2, [sp] a000b2f0: e1830000 orr r0, r3, r0 a000b2f4: e3a01001 mov r1, #1 a000b2f8: e3a02010 mov r2, #16 a000b2fc: e1a03005 mov r3, r5 a000b300: ebffee25 bl a0006b9c a000b304: e3500000 cmp r0, #0 a000b308: 1a000006 bne a000b328 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') a000b30c: e5d63000 ldrb r3, [r6] a000b310: e353007a cmp r3, #122 ; 0x7a a000b314: e2832001 add r2, r3, #1 c = 'a'; a000b318: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') a000b31c: e5c62000 strb r2, [r6] c = 'a'; a000b320: 05c63000 strbeq r3, [r6] a000b324: ea000009 b a000b350 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); a000b328: e59a0030 ldr r0, [sl, #48] ; 0x30 a000b32c: eb0003f6 bl a000c30c err_wbar: rtems_barrier_delete(pipe->readBarrier); a000b330: e59a002c ldr r0, [sl, #44] ; 0x2c a000b334: eb0003f4 bl a000c30c err_rbar: free(pipe->Buffer); a000b338: e59a0000 ldr r0, [sl] a000b33c: ebffe0e1 bl a00036c8 err_buf: free(pipe); a000b340: e1a0000a mov r0, sl a000b344: ebffe0df bl a00036c8 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; a000b348: e3e0600b mvn r6, #11 a000b34c: ea00000e b a000b38c err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) a000b350: e3a01000 mov r1, #0 a000b354: e5940028 ldr r0, [r4, #40] ; 0x28 a000b358: e1a02001 mov r2, r1 a000b35c: ebffeea0 bl a0006de4 err = -EINTR; if (*pipep == NULL) { a000b360: e5983000 ldr r3, [r8] if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; a000b364: e3500000 cmp r0, #0 a000b368: 03a06000 moveq r6, #0 a000b36c: 13e06003 mvnne r6, #3 if (*pipep == NULL) { a000b370: e3530000 cmp r3, #0 a000b374: 1a000004 bne a000b38c if (err) a000b378: e3560000 cmp r6, #0 pipe_free(pipe); else *pipep = pipe; a000b37c: 05884000 streq r4, [r8] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) a000b380: 0a000001 beq a000b38c pipe_free(pipe); a000b384: e1a00004 mov r0, r4 <== NOT EXECUTED a000b388: ebffff53 bl a000b0dc <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); a000b38c: ebffff4e bl a000b0cc pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) a000b390: e3560000 cmp r6, #0 a000b394: 1a00006d bne a000b550 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { a000b398: e5973014 ldr r3, [r7, #20] int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; a000b39c: e5984000 ldr r4, [r8] switch (LIBIO_ACCMODE(iop)) { a000b3a0: e2033006 and r3, r3, #6 a000b3a4: e3530004 cmp r3, #4 a000b3a8: 0a000025 beq a000b444 a000b3ac: e3530006 cmp r3, #6 a000b3b0: 0a000049 beq a000b4dc a000b3b4: e3530002 cmp r3, #2 a000b3b8: 1a00005d bne a000b534 case LIBIO_FLAGS_READ: pipe->readerCounter ++; a000b3bc: e5943020 ldr r3, [r4, #32] a000b3c0: e2833001 add r3, r3, #1 a000b3c4: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) a000b3c8: e5943010 ldr r3, [r4, #16] a000b3cc: e2832001 add r2, r3, #1 a000b3d0: e3530000 cmp r3, #0 a000b3d4: e5842010 str r2, [r4, #16] a000b3d8: 1a000002 bne a000b3e8 PIPE_WAKEUPWRITERS(pipe); a000b3dc: e5940030 ldr r0, [r4, #48] ; 0x30 a000b3e0: e28d1004 add r1, sp, #4 a000b3e4: eb0003f0 bl a000c3ac if (pipe->Writers == 0) { a000b3e8: e5943014 ldr r3, [r4, #20] a000b3ec: e3530000 cmp r3, #0 a000b3f0: 1a00004f bne a000b534 /* Not an error */ if (LIBIO_NODELAY(iop)) a000b3f4: e5973014 ldr r3, [r7, #20] a000b3f8: e3130001 tst r3, #1 a000b3fc: 1a00004c bne a000b534 break; prevCounter = pipe->writerCounter; a000b400: e5945024 ldr r5, [r4, #36] ; 0x24 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); a000b404: e5940028 ldr r0, [r4, #40] ; 0x28 a000b408: ebffeebb bl a0006efc if (! PIPE_READWAIT(pipe)) a000b40c: e3a01000 mov r1, #0 a000b410: e594002c ldr r0, [r4, #44] ; 0x2c a000b414: eb0003fa bl a000c404 a000b418: e2501000 subs r1, r0, #0 a000b41c: 1a000047 bne a000b540 goto out_error; if (! PIPE_LOCK(pipe)) a000b420: e5940028 ldr r0, [r4, #40] ; 0x28 a000b424: e1a02001 mov r2, r1 a000b428: ebffee6d bl a0006de4 a000b42c: e3500000 cmp r0, #0 a000b430: 1a000042 bne a000b540 goto out_error; } while (prevCounter == pipe->writerCounter); a000b434: e5943024 ldr r3, [r4, #36] ; 0x24 a000b438: e1550003 cmp r5, r3 a000b43c: 0afffff0 beq a000b404 a000b440: ea00003b b a000b534 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; a000b444: e5943024 ldr r3, [r4, #36] ; 0x24 a000b448: e2833001 add r3, r3, #1 a000b44c: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) a000b450: e5943014 ldr r3, [r4, #20] a000b454: e2832001 add r2, r3, #1 a000b458: e3530000 cmp r3, #0 a000b45c: e5842014 str r2, [r4, #20] a000b460: 1a000002 bne a000b470 PIPE_WAKEUPREADERS(pipe); a000b464: e594002c ldr r0, [r4, #44] ; 0x2c a000b468: e28d1004 add r1, sp, #4 a000b46c: eb0003ce bl a000c3ac if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { a000b470: e5943010 ldr r3, [r4, #16] a000b474: e3530000 cmp r3, #0 a000b478: 1a00002d bne a000b534 a000b47c: e5973014 ldr r3, [r7, #20] a000b480: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; a000b484: 05945020 ldreq r5, [r4, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { a000b488: 0a000003 beq a000b49c PIPE_UNLOCK(pipe); a000b48c: e5940028 ldr r0, [r4, #40] ; 0x28 a000b490: ebffee99 bl a0006efc err = -ENXIO; a000b494: e3e06005 mvn r6, #5 goto out_error; a000b498: ea000029 b a000b544 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); a000b49c: e5940028 ldr r0, [r4, #40] ; 0x28 a000b4a0: ebffee95 bl a0006efc if (! PIPE_WRITEWAIT(pipe)) a000b4a4: e3a01000 mov r1, #0 a000b4a8: e5940030 ldr r0, [r4, #48] ; 0x30 a000b4ac: eb0003d4 bl a000c404 a000b4b0: e2501000 subs r1, r0, #0 a000b4b4: 1a000021 bne a000b540 goto out_error; if (! PIPE_LOCK(pipe)) a000b4b8: e5940028 ldr r0, [r4, #40] ; 0x28 a000b4bc: e1a02001 mov r2, r1 a000b4c0: ebffee47 bl a0006de4 a000b4c4: e3500000 cmp r0, #0 a000b4c8: 1a00001c bne a000b540 goto out_error; } while (prevCounter == pipe->readerCounter); a000b4cc: e5943020 ldr r3, [r4, #32] a000b4d0: e1550003 cmp r5, r3 a000b4d4: 0afffff0 beq a000b49c a000b4d8: ea000015 b a000b534 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a000b4dc: e5943020 ldr r3, [r4, #32] a000b4e0: e2833001 add r3, r3, #1 a000b4e4: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) a000b4e8: e5943010 ldr r3, [r4, #16] a000b4ec: e2832001 add r2, r3, #1 a000b4f0: e3530000 cmp r3, #0 a000b4f4: e5842010 str r2, [r4, #16] a000b4f8: 1a000002 bne a000b508 PIPE_WAKEUPWRITERS(pipe); a000b4fc: e5940030 ldr r0, [r4, #48] ; 0x30 a000b500: e28d1004 add r1, sp, #4 a000b504: eb0003a8 bl a000c3ac pipe->writerCounter ++; a000b508: e5943024 ldr r3, [r4, #36] ; 0x24 a000b50c: e2833001 add r3, r3, #1 a000b510: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) a000b514: e5943014 ldr r3, [r4, #20] a000b518: e2832001 add r2, r3, #1 a000b51c: e3530000 cmp r3, #0 a000b520: e5842014 str r2, [r4, #20] a000b524: 1a000002 bne a000b534 PIPE_WAKEUPREADERS(pipe); a000b528: e594002c ldr r0, [r4, #44] ; 0x2c a000b52c: e28d1004 add r1, sp, #4 a000b530: eb00039d bl a000c3ac break; } PIPE_UNLOCK(pipe); a000b534: e5940028 ldr r0, [r4, #40] ; 0x28 a000b538: ebffee6f bl a0006efc return 0; a000b53c: ea000003 b a000b550 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; a000b540: e3e06003 mvn r6, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); a000b544: e1a00008 mov r0, r8 a000b548: e1a01007 mov r1, r7 a000b54c: ebfffeef bl a000b110 return err; } a000b550: e1a00006 mov r0, r6 a000b554: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== a0002774 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); a0002774: e59f3104 ldr r3, [pc, #260] ; a0002880 long fpathconf( int fd, int name ) { a0002778: 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); a000277c: e5933000 ldr r3, [r3] a0002780: e1500003 cmp r0, r3 a0002784: 2a000006 bcs a00027a4 iop = rtems_libio_iop(fd); a0002788: e59f30f4 ldr r3, [pc, #244] ; a0002884 a000278c: e3a02038 mov r2, #56 ; 0x38 a0002790: e5933000 ldr r3, [r3] a0002794: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); a0002798: e5903014 ldr r3, [r0, #20] a000279c: e3130c01 tst r3, #256 ; 0x100 a00027a0: 1a000002 bne a00027b0 a00027a4: eb0028e0 bl a000cb2c <__errno> a00027a8: e3a03009 mov r3, #9 a00027ac: ea000003 b a00027c0 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); a00027b0: e3130002 tst r3, #2 a00027b4: 1a000004 bne a00027cc a00027b8: eb0028db bl a000cb2c <__errno> a00027bc: e3a03016 mov r3, #22 a00027c0: e5803000 str r3, [r0] a00027c4: e3e00000 mvn r0, #0 a00027c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; a00027cc: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { a00027d0: e351000b cmp r1, #11 a00027d4: 979ff101 ldrls pc, [pc, r1, lsl #2] a00027d8: ea000023 b a000286c a00027dc: a000280c .word 0xa000280c <== NOT EXECUTED a00027e0: a0002814 .word 0xa0002814 <== NOT EXECUTED a00027e4: a000281c .word 0xa000281c <== NOT EXECUTED a00027e8: a0002824 .word 0xa0002824 <== NOT EXECUTED a00027ec: a000282c .word 0xa000282c <== NOT EXECUTED a00027f0: a0002834 .word 0xa0002834 <== NOT EXECUTED a00027f4: a000283c .word 0xa000283c <== NOT EXECUTED a00027f8: a0002844 .word 0xa0002844 <== NOT EXECUTED a00027fc: a000284c .word 0xa000284c <== NOT EXECUTED a0002800: a0002854 .word 0xa0002854 <== NOT EXECUTED a0002804: a000285c .word 0xa000285c <== NOT EXECUTED a0002808: a0002864 .word 0xa0002864 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; a000280c: e5930038 ldr r0, [r3, #56] ; 0x38 break; a0002810: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; a0002814: e593003c ldr r0, [r3, #60] ; 0x3c break; a0002818: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; a000281c: e5930040 ldr r0, [r3, #64] ; 0x40 break; a0002820: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; a0002824: e5930044 ldr r0, [r3, #68] ; 0x44 break; a0002828: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; a000282c: e5930048 ldr r0, [r3, #72] ; 0x48 break; a0002830: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; a0002834: e593004c ldr r0, [r3, #76] ; 0x4c break; a0002838: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; a000283c: e5930054 ldr r0, [r3, #84] ; 0x54 break; a0002840: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; a0002844: e5930058 ldr r0, [r3, #88] ; 0x58 break; a0002848: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; a000284c: e5930064 ldr r0, [r3, #100] ; 0x64 break; a0002850: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; a0002854: e5930050 ldr r0, [r3, #80] ; 0x50 break; a0002858: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; a000285c: e593005c ldr r0, [r3, #92] ; 0x5c break; a0002860: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; a0002864: e5930060 ldr r0, [r3, #96] ; 0x60 break; a0002868: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); a000286c: eb0028ae bl a000cb2c <__errno> a0002870: e3a03016 mov r3, #22 a0002874: e5803000 str r3, [r0] a0002878: e3e00000 mvn r0, #0 break; } return return_value; } a000287c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0002f0c : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a0002f0c: e59f302c ldr r3, [pc, #44] ; a0002f40 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { a0002f10: e92d4010 push {r4, lr} rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a0002f14: e1500003 cmp r0, r3 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { a0002f18: e1a04000 mov r4, r0 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a0002f1c: 0a000006 beq a0002f3c #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); a0002f20: e2800004 add r0, r0, #4 a0002f24: ebfffbdf bl a0001ea8 rtems_filesystem_freenode( &env->root_directory); a0002f28: e2840018 add r0, r4, #24 a0002f2c: ebfffbdd bl a0001ea8 free(env); a0002f30: e1a00004 mov r0, r4 } } a0002f34: e8bd4010 pop {r4, lr} && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); a0002f38: eafffbdf b a0001ebc a0002f3c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0001d00 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { a0001d00: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) a0001d04: e2504000 subs r4, r0, #0 a0001d08: 1a000004 bne a0001d20 rtems_set_errno_and_return_minus_one( EFAULT ); a0001d0c: eb0027a6 bl a000bbac <__errno> <== NOT EXECUTED a0001d10: e3a0300e mov r3, #14 <== NOT EXECUTED a0001d14: e5803000 str r3, [r0] <== NOT EXECUTED a0001d18: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001d1c: ea00000c b a0001d54 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0001d20: e10f5000 mrs r5, CPSR a0001d24: e3853080 orr r3, r5, #128 ; 0x80 a0001d28: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); a0001d2c: e1a0000d mov r0, sp a0001d30: eb000f86 bl a0005b50 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0001d34: e129f005 msr CPSR_fc, r5 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; a0001d38: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; a0001d3c: e59d0004 ldr r0, [sp, #4] a0001d40: e3a01ffa mov r1, #1000 ; 0x3e8 time->tv_sec = now.tv_sec; a0001d44: e5843000 str r3, [r4] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; a0001d48: eb00357c bl a000f340 <__aeabi_idiv> time->tv_sec = now.tv_sec; time->tv_usec = useconds; a0001d4c: e5840004 str r0, [r4, #4] * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; a0001d50: e3a00000 mov r0, #0 } a0001d54: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== a000b398 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) a000b398: e5903018 ldr r3, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a000b39c: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) a000b3a0: e593304c ldr r3, [r3, #76] ; 0x4c a000b3a4: e3530001 cmp r3, #1 a000b3a8: 1a000005 bne a000b3c4 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; a000b3ac: e3a03000 mov r3, #0 a000b3b0: e3a04000 mov r4, #0 a000b3b4: e580300c str r3, [r0, #12] a000b3b8: e5804010 str r4, [r0, #16] return 0; a000b3bc: e3a00000 mov r0, #0 a000b3c0: e8bd8010 pop {r4, pc} /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ a000b3c4: e3e00000 mvn r0, #0 <== NOT EXECUTED iop->offset = 0; return 0; } a000b3c8: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0003974 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) a0003974: e5913030 ldr r3, [r1, #48] ; 0x30 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a0003978: e92d4030 push {r4, r5, lr} if (tty->termios.c_iflag & ISTRIP) a000397c: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a0003980: e20050ff and r5, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; a0003984: 1200507f andne r5, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) a0003988: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a000398c: e1a04001 mov r4, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) a0003990: 0a000007 beq a00039b4 c = tolower (c); a0003994: e59f2170 ldr r2, [pc, #368] ; a0003b0c a0003998: e5922000 ldr r2, [r2] a000399c: e0822005 add r2, r2, r5 a00039a0: e5d22001 ldrb r2, [r2, #1] a00039a4: e2022003 and r2, r2, #3 a00039a8: e3520001 cmp r2, #1 a00039ac: 02855020 addeq r5, r5, #32 a00039b0: e20550ff and r5, r5, #255 ; 0xff if (c == '\r') { a00039b4: e355000d cmp r5, #13 a00039b8: 1a000005 bne a00039d4 if (tty->termios.c_iflag & IGNCR) a00039bc: e3130080 tst r3, #128 ; 0x80 a00039c0: 1a00004b bne a0003af4 return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; a00039c4: e3130c01 tst r3, #256 ; 0x100 a00039c8: 03a0500d moveq r5, #13 a00039cc: 13a0500a movne r5, #10 a00039d0: ea000007 b a00039f4 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { a00039d4: e355000a cmp r5, #10 a00039d8: 1a000003 bne a00039ec c = '\r'; a00039dc: e3130040 tst r3, #64 ; 0x40 a00039e0: 03a0500a moveq r5, #10 a00039e4: 13a0500d movne r5, #13 a00039e8: ea000001 b a00039f4 } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { a00039ec: e3550000 cmp r5, #0 a00039f0: 0a00002e beq a0003ab0 a00039f4: e594303c ldr r3, [r4, #60] ; 0x3c a00039f8: e3130002 tst r3, #2 a00039fc: 0a00002b beq a0003ab0 if (c == tty->termios.c_cc[VERASE]) { a0003a00: e5d42043 ldrb r2, [r4, #67] ; 0x43 a0003a04: e1520005 cmp r2, r5 erase (tty, 0); a0003a08: 01a00004 moveq r0, r4 a0003a0c: 03a01000 moveq r1, #0 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { a0003a10: 0a000004 beq a0003a28 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { a0003a14: e5d42044 ldrb r2, [r4, #68] ; 0x44 a0003a18: e1520005 cmp r2, r5 a0003a1c: 1a000003 bne a0003a30 erase (tty, 1); a0003a20: e1a00004 mov r0, r4 a0003a24: e3a01001 mov r1, #1 a0003a28: ebffff5f bl a00037ac a0003a2c: ea000030 b a0003af4 return 0; } else if (c == tty->termios.c_cc[VEOF]) { a0003a30: e5d42045 ldrb r2, [r4, #69] ; 0x45 a0003a34: e1520005 cmp r2, r5 a0003a38: 0a00002f beq a0003afc return 1; } else if (c == '\n') { a0003a3c: e355000a cmp r5, #10 a0003a40: 1a000009 bne a0003a6c if (tty->termios.c_lflag & (ECHO | ECHONL)) a0003a44: e3130048 tst r3, #72 ; 0x48 a0003a48: 0a000002 beq a0003a58 echo (c, tty); a0003a4c: e1a00005 mov r0, r5 a0003a50: e1a01004 mov r1, r4 a0003a54: ebffff31 bl a0003720 tty->cbuf[tty->ccount++] = c; a0003a58: e5943020 ldr r3, [r4, #32] a0003a5c: e594201c ldr r2, [r4, #28] a0003a60: e3a0100a mov r1, #10 a0003a64: e7c21003 strb r1, [r2, r3] a0003a68: ea00000d b a0003aa4 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || a0003a6c: e5d4204c ldrb r2, [r4, #76] ; 0x4c a0003a70: e1520005 cmp r2, r5 a0003a74: 0a000002 beq a0003a84 a0003a78: e5d42051 ldrb r2, [r4, #81] ; 0x51 a0003a7c: e1520005 cmp r2, r5 a0003a80: 1a00000a bne a0003ab0 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) a0003a84: e3130008 tst r3, #8 <== NOT EXECUTED a0003a88: 0a000002 beq a0003a98 <== NOT EXECUTED echo (c, tty); a0003a8c: e1a00005 mov r0, r5 <== NOT EXECUTED a0003a90: e1a01004 mov r1, r4 <== NOT EXECUTED a0003a94: ebffff21 bl a0003720 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; a0003a98: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED a0003a9c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED a0003aa0: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED a0003aa4: e2833001 add r3, r3, #1 a0003aa8: e5843020 str r3, [r4, #32] a0003aac: ea000012 b a0003afc } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { a0003ab0: e59f3058 ldr r3, [pc, #88] ; a0003b10 a0003ab4: e5942020 ldr r2, [r4, #32] a0003ab8: e5933008 ldr r3, [r3, #8] a0003abc: e2433001 sub r3, r3, #1 a0003ac0: e1520003 cmp r2, r3 a0003ac4: aa00000e bge a0003b04 if (tty->termios.c_lflag & ECHO) a0003ac8: e594303c ldr r3, [r4, #60] ; 0x3c a0003acc: e3130008 tst r3, #8 a0003ad0: 0a000002 beq a0003ae0 echo (c, tty); a0003ad4: e1a00005 mov r0, r5 a0003ad8: e1a01004 mov r1, r4 a0003adc: ebffff0f bl a0003720 tty->cbuf[tty->ccount++] = c; a0003ae0: e5943020 ldr r3, [r4, #32] a0003ae4: e594201c ldr r2, [r4, #28] a0003ae8: e7c25003 strb r5, [r2, r3] a0003aec: e2833001 add r3, r3, #1 a0003af0: e5843020 str r3, [r4, #32] if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; a0003af4: e3a00000 mov r0, #0 a0003af8: e8bd8030 pop {r4, r5, pc} else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; a0003afc: e3a00001 mov r0, #1 a0003b00: e8bd8030 pop {r4, r5, pc} if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; a0003b04: e3a00000 mov r0, #0 <== NOT EXECUTED } a0003b08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a001f3d0 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } a001f3d0: e3a00000 mov r0, #0 <== NOT EXECUTED a001f3d4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0010b34 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) a0010b34: e59f3060 ldr r3, [pc, #96] ; a0010b9c extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { a0010b38: e92d4030 push {r4, r5, lr} /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) a0010b3c: e5933000 ldr r3, [r3] a0010b40: e3530003 cmp r3, #3 a0010b44: 1a000013 bne a0010b98 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { a0010b48: e59f3050 ldr r3, [pc, #80] ; a0010ba0 a0010b4c: e59f5050 ldr r5, [pc, #80] ; a0010ba4 a0010b50: e5934000 ldr r4, [r3] a0010b54: e5953000 ldr r3, [r5] a0010b58: e1530004 cmp r3, r4 a0010b5c: 0a000002 beq a0010b6c _wrapup_reent(_global_impure_ptr); a0010b60: e1a00004 mov r0, r4 a0010b64: eb0001b4 bl a001123c <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; a0010b68: e5854000 str r4, [r5] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); a0010b6c: e59f4030 ldr r4, [pc, #48] ; a0010ba4 a0010b70: e5943000 ldr r3, [r4] a0010b74: e5930004 ldr r0, [r3, #4] a0010b78: ebffec59 bl a000bce4 fclose (stdout); a0010b7c: e5943000 ldr r3, [r4] a0010b80: e5930008 ldr r0, [r3, #8] a0010b84: ebffec56 bl a000bce4 fclose (stderr); a0010b88: e5943000 ldr r3, [r4] a0010b8c: e593000c ldr r0, [r3, #12] } a0010b90: e8bd4030 pop {r4, r5, lr} * _fwalk (_REENT, fclose); */ fclose (stdin); fclose (stdout); fclose (stderr); a0010b94: eaffec52 b a000bce4 a0010b98: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a0002354 : * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; a0002354: e59f30a0 ldr r3, [pc, #160] ; a00023fc } void *malloc_sbrk_extend_and_allocate( size_t size ) { a0002358: e92d40f0 push {r4, r5, r6, r7, lr} * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; a000235c: e5934000 ldr r4, [r3] } void *malloc_sbrk_extend_and_allocate( size_t size ) { a0002360: e1a05000 mov r5, r0 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) a0002364: e3540000 cmp r4, #0 a0002368: 0a00001f beq a00023ec return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); a000236c: e1a01004 mov r1, r4 a0002370: e0800004 add r0, r0, r4 a0002374: eb003501 bl a000f780 <__aeabi_uidiv> a0002378: e0040490 mul r4, r0, r4 starting_address = (void *) sbrk(the_size); a000237c: e1a00004 mov r0, r4 a0002380: ebfff86b bl a0000534 if ( starting_address == (void*) -1 ) a0002384: e3700001 cmn r0, #1 if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); a0002388: e1a01000 mov r1, r0 if ( starting_address == (void*) -1 ) a000238c: 0a000018 beq a00023f4 return (void *) 0; if ( !_Protected_heap_Extend( a0002390: e59f6068 ldr r6, [pc, #104] ; a0002400 a0002394: e1a02004 mov r2, r4 a0002398: e5960000 ldr r0, [r6] a000239c: eb0011d0 bl a0006ae4 <_Protected_heap_Extend> a00023a0: e2507000 subs r7, r0, #0 a00023a4: 1a000006 bne a00023c4 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); a00023a8: e2640000 rsb r0, r4, #0 a00023ac: ebfff860 bl a0000534 errno = ENOMEM; a00023b0: eb00277e bl a000c1b0 <__errno> a00023b4: e3a0300c mov r3, #12 a00023b8: e5803000 str r3, [r0] return (void *) 0; a00023bc: e1a00007 mov r0, r7 a00023c0: e8bd80f0 pop {r4, r5, r6, r7, pc} } MSBUMP(space_available, the_size); a00023c4: e59f3038 ldr r3, [pc, #56] ; a0002404 a00023c8: e5960000 ldr r0, [r6] a00023cc: e1a01005 mov r1, r5 a00023d0: e5932000 ldr r2, [r3] a00023d4: e0844002 add r4, r4, r2 a00023d8: e3a02000 mov r2, #0 a00023dc: e5834000 str r4, [r3] a00023e0: e1a03002 mov r3, r2 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } a00023e4: e8bd40f0 pop {r4, r5, r6, r7, lr} a00023e8: ea0011aa b a0006a98 <_Protected_heap_Allocate_aligned_with_boundary> */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; a00023ec: e1a00004 mov r0, r4 <== NOT EXECUTED a00023f0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; a00023f4: e3a00000 mov r0, #0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } a00023f8: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000b0f8 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a000b0f8: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000b0fc: e5905018 ldr r5, [r0, #24] rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a000b100: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { a000b104: e595304c ldr r3, [r5, #76] ; 0x4c a000b108: e3530006 cmp r3, #6 a000b10c: 1a00000b bne a000b140 if (iop->offset > the_jnode->info.linearfile.size) a000b110: e5953054 ldr r3, [r5, #84] ; 0x54 a000b114: e5901010 ldr r1, [r0, #16] a000b118: e5952050 ldr r2, [r5, #80] ; 0x50 a000b11c: e1510003 cmp r1, r3 a000b120: ca000003 bgt a000b134 a000b124: 1a000014 bne a000b17c a000b128: e590100c ldr r1, [r0, #12] a000b12c: e1510002 cmp r1, r2 a000b130: 9a000011 bls a000b17c iop->offset = the_jnode->info.linearfile.size; a000b134: e584200c str r2, [r4, #12] <== NOT EXECUTED a000b138: e5843010 str r3, [r4, #16] <== NOT EXECUTED a000b13c: ea00000e b a000b17c <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) a000b140: e1a00005 mov r0, r5 a000b144: e284200c add r2, r4, #12 a000b148: e8920006 ldm r2, {r1, r2} a000b14c: ebfffeed bl a000ad08 a000b150: e3500000 cmp r0, #0 a000b154: 0a000005 beq a000b170 rtems_set_errno_and_return_minus_one( ENOSPC ); a000b158: eb000293 bl a000bbac <__errno> a000b15c: e3a0301c mov r3, #28 a000b160: e5803000 str r3, [r0] a000b164: e3e04000 mvn r4, #0 a000b168: e3e03000 mvn r3, #0 a000b16c: ea000004 b a000b184 iop->size = the_jnode->info.file.size; a000b170: e2853050 add r3, r5, #80 ; 0x50 a000b174: e893000c ldm r3, {r2, r3} a000b178: e984000c stmib r4, {r2, r3} } return iop->offset; a000b17c: e284400c add r4, r4, #12 a000b180: e8940018 ldm r4, {r3, r4} } a000b184: e1a00003 mov r0, r3 a000b188: e1a01004 mov r1, r4 a000b18c: e8bd8030 pop {r4, r5, pc} =============================================================================== a000b004 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) a000b004: e5903014 ldr r3, [r0, #20] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a000b008: e92d4031 push {r0, r4, r5, lr} the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) a000b00c: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a000b010: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000b014: e5904018 ldr r4, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) a000b018: 0a000015 beq a000b074 && (the_jnode->type == IMFS_LINEAR_FILE)) { a000b01c: e594304c ldr r3, [r4, #76] ; 0x4c a000b020: e3530006 cmp r3, #6 a000b024: 1a000012 bne a000b074 uint32_t count = the_jnode->info.linearfile.size; a000b028: e594c050 ldr ip, [r4, #80] ; 0x50 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; a000b02c: 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; a000b030: e3a02005 mov r2, #5 <== NOT EXECUTED a000b034: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; a000b038: e3a01000 mov r1, #0 <== NOT EXECUTED a000b03c: 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) a000b040: e15c0000 cmp ip, r0 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; a000b044: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; a000b048: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED a000b04c: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; a000b050: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; a000b054: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; a000b058: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) a000b05c: 0a000004 beq a000b074 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) a000b060: e1a00004 mov r0, r4 <== NOT EXECUTED a000b064: e58dc000 str ip, [sp] <== NOT EXECUTED a000b068: ebffff6d bl a000ae24 <== NOT EXECUTED a000b06c: e3700001 cmn r0, #1 <== NOT EXECUTED a000b070: 0a000009 beq a000b09c <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) a000b074: e5953014 ldr r3, [r5, #20] a000b078: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; a000b07c: 12843050 addne r3, r4, #80 ; 0x50 a000b080: 1893000c ldmne r3, {r2, r3} a000b084: 1585200c strne r2, [r5, #12] a000b088: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; a000b08c: e2844050 add r4, r4, #80 ; 0x50 a000b090: e8940018 ldm r4, {r3, r4} a000b094: e9850018 stmib r5, {r3, r4} return 0; a000b098: e3a00000 mov r0, #0 } a000b09c: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== a00021dc : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { a00021dc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && a00021e0: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { a00021e4: e24dd02c sub sp, sp, #44 ; 0x2c a00021e8: e1a06000 mov r6, r0 a00021ec: e1a0b001 mov fp, r1 a00021f0: e1a0a002 mov sl, r2 a00021f4: e58d300c str r3, [sp, #12] /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && a00021f8: 8a000004 bhi a0002210 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); a00021fc: e1a00002 mov r0, r2 a0002200: eb001d1d bl a000967c if ( !mount_h ) a0002204: e3500000 cmp r0, #0 a0002208: e58d0014 str r0, [sp, #20] a000220c: 1a000002 bne a000221c rtems_set_errno_and_return_minus_one( EINVAL ); a0002210: eb002665 bl a000bbac <__errno> a0002214: e3a03016 mov r3, #22 a0002218: ea00003b b a000230c const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; a000221c: e59f3260 ldr r3, [pc, #608] ; a0002484 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; a0002220: e25b5000 subs r5, fp, #0 a0002224: 13a05001 movne r5, #1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; a0002228: e3550000 cmp r5, #0 a000222c: 11a0300b movne r3, fp size_t filesystemtype_size = strlen( filesystemtype ) + 1; a0002230: e1a0000a mov r0, sl const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; a0002234: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; a0002238: eb002a45 bl a000cb54 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; a000223c: e3560000 cmp r6, #0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; a0002240: e2809001 add r9, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; a0002244: 01a07006 moveq r7, r6 a0002248: 0a000002 beq a0002258 a000224c: e1a00006 mov r0, r6 a0002250: eb002a3f bl a000cb54 a0002254: e2807001 add r7, r0, #1 size_t target_size = strlen( target ) + 1; a0002258: e59d0004 ldr r0, [sp, #4] a000225c: eb002a3c bl a000cb54 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; a0002260: e2891074 add r1, r9, #116 ; 0x74 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; a0002264: e2803001 add r3, r0, #1 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; a0002268: e0811007 add r1, r1, r7 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; a000226c: e58d0010 str r0, [sp, #16] size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); a0002270: e0811003 add r1, r1, r3 a0002274: e3a00001 mov r0, #1 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; a0002278: e58d3008 str r3, [sp, #8] size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); a000227c: ebfffe05 bl a0001a98 if ( mt_entry != NULL ) { a0002280: e2504000 subs r4, r0, #0 a0002284: 0a00001e beq a0002304 char *str = (char *) mt_entry + sizeof( *mt_entry ); a0002288: e2848074 add r8, r4, #116 ; 0x74 memcpy( str, filesystemtype, filesystemtype_size ); a000228c: e1a00008 mov r0, r8 a0002290: e1a0100a mov r1, sl a0002294: e1a02009 mov r2, r9 a0002298: eb002871 bl a000c464 mt_entry->type = str; a000229c: e584806c str r8, [r4, #108] ; 0x6c str += filesystemtype_size; a00022a0: e0888009 add r8, r8, r9 memcpy( str, source_or_null, source_size ); a00022a4: e1a00008 mov r0, r8 a00022a8: e1a01006 mov r1, r6 a00022ac: e1a02007 mov r2, r7 a00022b0: eb00286b bl a000c464 mt_entry->dev = str; a00022b4: e5848070 str r8, [r4, #112] ; 0x70 str += source_size; a00022b8: e0888007 add r8, r8, r7 memcpy( str, target, target_size ); a00022bc: e99d0006 ldmib sp, {r1, r2} a00022c0: e1a00008 mov r0, r8 a00022c4: eb002866 bl a000c464 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; a00022c8: e59d300c ldr r3, [sp, #12] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; a00022cc: e59fe1b4 ldr lr, [pc, #436] ; a0002488 a00022d0: e284c038 add ip, r4, #56 ; 0x38 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; a00022d4: e5843030 str r3, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; a00022d8: e8be000f ldm lr!, {r0, r1, r2, r3} a00022dc: e8ac000f stmia ip!, {r0, r1, r2, r3} a00022e0: e8be000f ldm lr!, {r0, r1, r2, r3} a00022e4: e8ac000f stmia ip!, {r0, r1, r2, r3} a00022e8: e89e000f ldm lr, {r0, r1, r2, r3} /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { a00022ec: e3550000 cmp r5, #0 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; a00022f0: e5848068 str r8, [r4, #104] ; 0x68 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; a00022f4: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; a00022f8: e88c000f stm ip, {r0, r1, r2, r3} /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { a00022fc: 0a00002e beq a00023bc a0002300: ea000003 b a0002314 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); a0002304: eb002628 bl a000bbac <__errno> <== NOT EXECUTED a0002308: e3a0300c mov r3, #12 <== NOT EXECUTED a000230c: e5803000 str r3, [r0] a0002310: ea000058 b a0002478 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( a0002314: e3a03001 mov r3, #1 a0002318: e28d6018 add r6, sp, #24 a000231c: e58d3000 str r3, [sp] a0002320: e1a0000b mov r0, fp a0002324: e59d1010 ldr r1, [sp, #16] a0002328: e3a02007 mov r2, #7 a000232c: e1a03006 mov r3, r6 a0002330: ebfffe08 bl a0001b58 a0002334: e3700001 cmn r0, #1 a0002338: 0a000047 beq a000245c /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { a000233c: e59d3024 ldr r3, [sp, #36] ; 0x24 a0002340: e1a00006 mov r0, r6 a0002344: e5933010 ldr r3, [r3, #16] a0002348: e12fff33 blx r3 a000234c: e3500001 cmp r0, #1 a0002350: 0a000002 beq a0002360 errno = ENOTDIR; a0002354: eb002614 bl a000bbac <__errno> a0002358: e3a03014 mov r3, #20 a000235c: ea000006 b a000237c /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { a0002360: e59f0124 ldr r0, [pc, #292] ; a000248c a0002364: e59d1018 ldr r1, [sp, #24] a0002368: ebffff86 bl a0002188 a000236c: e3500000 cmp r0, #0 a0002370: 0a000003 beq a0002384 errno = EBUSY; a0002374: eb00260c bl a000bbac <__errno> a0002378: e3a03010 mov r3, #16 a000237c: e5803000 str r3, [r0] goto cleanup_and_bail; a0002380: ea000036 b a0002460 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; a0002384: e59d3018 ldr r3, [sp, #24] mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; a0002388: e59d2028 ldr r2, [sp, #40] ; 0x28 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { a000238c: e1a00004 mov r0, r4 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; a0002390: e5843008 str r3, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; a0002394: e59d3020 ldr r3, [sp, #32] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; a0002398: e5842018 str r2, [r4, #24] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; a000239c: e5843010 str r3, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; a00023a0: e59d3024 ldr r3, [sp, #36] ; 0x24 a00023a4: e5843014 str r3, [r4, #20] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { a00023a8: e5933020 ldr r3, [r3, #32] a00023ac: e12fff33 blx r3 a00023b0: e3500000 cmp r0, #0 a00023b4: 0a00000b beq a00023e8 a00023b8: ea000028 b a0002460 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a00023bc: e59f30cc ldr r3, [pc, #204] ; a0002490 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a00023c0: e2832004 add r2, r3, #4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { a00023c4: e5933000 ldr r3, [r3] a00023c8: e1530002 cmp r3, r2 ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; a00023cc: 01a06005 moveq r6, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { a00023d0: 0a000004 beq a00023e8 errno = EINVAL; a00023d4: eb0025f4 bl a000bbac <__errno> <== NOT EXECUTED a00023d8: e3a03016 mov r3, #22 <== NOT EXECUTED a00023dc: e5803000 str r3, [r0] <== NOT EXECUTED ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; a00023e0: e1a06005 mov r6, r5 <== NOT EXECUTED /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; goto cleanup_and_bail; a00023e4: ea00001d b a0002460 <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { a00023e8: e1a00004 mov r0, r4 a00023ec: e59d1050 ldr r1, [sp, #80] ; 0x50 a00023f0: e59d3014 ldr r3, [sp, #20] a00023f4: e12fff33 blx r3 a00023f8: e2507000 subs r7, r0, #0 a00023fc: 0a000004 beq a0002414 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); a0002400: e59d3024 ldr r3, [sp, #36] ; 0x24 a0002404: e1a00004 mov r0, r4 a0002408: e5933028 ldr r3, [r3, #40] ; 0x28 a000240c: e12fff33 blx r3 goto cleanup_and_bail; a0002410: ea000012 b a0002460 } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); a0002414: ebffff51 bl a0002160 a0002418: e59f0070 ldr r0, [pc, #112] ; a0002490 a000241c: e1a01004 mov r1, r4 a0002420: eb000cc8 bl a0005748 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); a0002424: ebffff53 bl a0002178 if ( !has_target ) a0002428: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; a000242c: 11a00007 movne r0, r7 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) a0002430: 1a000011 bne a000247c rtems_filesystem_root = mt_entry->mt_fs_root; a0002434: e59f3058 ldr r3, [pc, #88] ; a0002494 a0002438: e284401c add r4, r4, #28 a000243c: e593c000 ldr ip, [r3] a0002440: e8b4000f ldm r4!, {r0, r1, r2, r3} a0002444: e28cc018 add ip, ip, #24 a0002448: e8ac000f stmia ip!, {r0, r1, r2, r3} a000244c: e5943000 ldr r3, [r4] return 0; a0002450: e1a00005 mov r0, r5 rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; a0002454: e58c3000 str r3, [ip] a0002458: ea000007 b a000247c ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; a000245c: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); a0002460: e1a00004 mov r0, r4 a0002464: ebfffdf0 bl a0001c2c if ( loc_to_free ) a0002468: e3560000 cmp r6, #0 a000246c: 0a000001 beq a0002478 rtems_filesystem_freenode( loc_to_free ); a0002470: e1a00006 mov r0, r6 a0002474: ebfffde7 bl a0001c18 return -1; a0002478: e3e00000 mvn r0, #0 } a000247c: e28dd02c add sp, sp, #44 ; 0x2c a0002480: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000249c : */ int newlib_free_buffers( FILE *fp ) { a000249c: e92d4010 push {r4, lr} a00024a0: e1a04000 mov r4, r0 switch ( fileno(fp) ) { a00024a4: eb0026c3 bl a000bfb8 a00024a8: e3500002 cmp r0, #2 a00024ac: 8a00000b bhi a00024e0 case 0: case 1: case 2: if (fp->_flags & __SMBF) { a00024b0: e1d430bc ldrh r3, [r4, #12] a00024b4: e3130080 tst r3, #128 ; 0x80 a00024b8: 0a00000a beq a00024e8 free( fp->_bf._base ); a00024bc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a00024c0: ebfffdd9 bl a0001c2c <== NOT EXECUTED fp->_flags &= ~__SMBF; a00024c4: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED a00024c8: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED a00024cc: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; a00024d0: e3a03000 mov r3, #0 <== NOT EXECUTED a00024d4: e5843000 str r3, [r4] <== NOT EXECUTED a00024d8: e5843010 str r3, [r4, #16] <== NOT EXECUTED a00024dc: ea000001 b a00024e8 <== NOT EXECUTED } break; default: fclose(fp); a00024e0: e1a00004 mov r0, r4 <== NOT EXECUTED a00024e4: eb0025fe bl a000bce4 <== NOT EXECUTED } return 0; } a00024e8: e3a00000 mov r0, #0 a00024ec: e8bd8010 pop {r4, pc} =============================================================================== a00035d0 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { a00035d0: e92d4011 push {r0, r4, lr} a00035d4: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { a00035d8: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { a00035dc: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { a00035e0: e3130001 tst r3, #1 a00035e4: 0a000045 beq a0003700 switch (c) { a00035e8: e5dd2000 ldrb r2, [sp] a00035ec: e2421008 sub r1, r2, #8 a00035f0: e3510005 cmp r1, #5 a00035f4: 979ff101 ldrls pc, [pc, r1, lsl #2] a00035f8: ea00002c b a00036b0 a00035fc: a000369c .word 0xa000369c <== NOT EXECUTED a0003600: a0003674 .word 0xa0003674 <== NOT EXECUTED a0003604: a0003614 .word 0xa0003614 <== NOT EXECUTED a0003608: a00036b0 .word 0xa00036b0 <== NOT EXECUTED a000360c: a00036b0 .word 0xa00036b0 <== NOT EXECUTED a0003610: a000363c .word 0xa000363c <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) a0003614: e3130020 tst r3, #32 tty->column = 0; a0003618: 13a02000 movne r2, #0 a000361c: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { a0003620: e3130004 tst r3, #4 a0003624: 0a000035 beq a0003700 rtems_termios_puts ("\r", 1, tty); a0003628: e59f00e4 ldr r0, [pc, #228] ; a0003714 a000362c: e3a01001 mov r1, #1 a0003630: e1a02004 mov r2, r4 a0003634: ebffffa4 bl a00034cc a0003638: ea00000b b a000366c tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) a000363c: e3130010 tst r3, #16 <== NOT EXECUTED a0003640: 0a000002 beq a0003650 <== NOT EXECUTED a0003644: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED a0003648: e3520000 cmp r2, #0 <== NOT EXECUTED a000364c: 0a00002f beq a0003710 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { a0003650: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; a0003654: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { a0003658: 0a000028 beq a0003700 <== NOT EXECUTED c = '\n'; a000365c: e3a0200a mov r2, #10 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) a0003660: 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'; a0003664: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) a0003668: 0a000024 beq a0003700 <== NOT EXECUTED tty->column = 0; a000366c: e3a03000 mov r3, #0 a0003670: ea000021 b a00036fc } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); a0003674: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { a0003678: e2033b06 and r3, r3, #6144 ; 0x1800 a000367c: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); a0003680: e2021007 and r1, r2, #7 a0003684: e2611008 rsb r1, r1, #8 a0003688: e0813002 add r3, r1, r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; a000368c: 05843028 streq r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); a0003690: 059f0080 ldreq r0, [pc, #128] ; a0003718 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { a0003694: 1a000018 bne a00036fc a0003698: ea00001a b a0003708 } tty->column += i; break; case '\b': if (tty->column > 0) a000369c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED a00036a0: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; a00036a4: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) a00036a8: ca000013 bgt a00036fc <== NOT EXECUTED a00036ac: ea000013 b a0003700 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) a00036b0: e3130002 tst r3, #2 a00036b4: 0a000007 beq a00036d8 c = toupper(c); a00036b8: e59f305c ldr r3, [pc, #92] ; a000371c <== NOT EXECUTED a00036bc: e5933000 ldr r3, [r3] <== NOT EXECUTED a00036c0: e0833002 add r3, r3, r2 <== NOT EXECUTED a00036c4: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED a00036c8: e2033003 and r3, r3, #3 <== NOT EXECUTED a00036cc: e3530002 cmp r3, #2 <== NOT EXECUTED a00036d0: 02422020 subeq r2, r2, #32 <== NOT EXECUTED a00036d4: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) a00036d8: e59f203c ldr r2, [pc, #60] ; a000371c a00036dc: e5dd3000 ldrb r3, [sp] a00036e0: e5922000 ldr r2, [r2] a00036e4: e0823003 add r3, r2, r3 a00036e8: e5d33001 ldrb r3, [r3, #1] a00036ec: e3130020 tst r3, #32 a00036f0: 1a000002 bne a0003700 tty->column++; a00036f4: e5943028 ldr r3, [r4, #40] ; 0x28 a00036f8: e2833001 add r3, r3, #1 a00036fc: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); a0003700: e1a0000d mov r0, sp a0003704: e3a01001 mov r1, #1 a0003708: e1a02004 mov r2, r4 a000370c: ebffff6e bl a00034cc } a0003710: e8bd8018 pop {r3, r4, pc} =============================================================================== a000b894 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { a000b894: e59f3060 ldr r3, [pc, #96] ; a000b8fc pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a000b898: e92d4070 push {r4, r5, r6, lr} if (cmd == FIONREAD) { a000b89c: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a000b8a0: e1a04000 mov r4, r0 a000b8a4: e1a05002 mov r5, r2 if (cmd == FIONREAD) { a000b8a8: 1a00000d bne a000b8e4 if (buffer == NULL) a000b8ac: e3520000 cmp r2, #0 a000b8b0: 0a00000d beq a000b8ec return -EFAULT; if (! PIPE_LOCK(pipe)) a000b8b4: e3a01000 mov r1, #0 a000b8b8: e5900028 ldr r0, [r0, #40] ; 0x28 a000b8bc: e1a02001 mov r2, r1 a000b8c0: ebffed47 bl a0006de4 a000b8c4: e2506000 subs r6, r0, #0 a000b8c8: 1a000009 bne a000b8f4 return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; a000b8cc: e594300c ldr r3, [r4, #12] PIPE_UNLOCK(pipe); a000b8d0: e5940028 ldr r0, [r4, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; a000b8d4: e5853000 str r3, [r5] PIPE_UNLOCK(pipe); a000b8d8: ebffed87 bl a0006efc return 0; a000b8dc: e1a00006 mov r0, r6 a000b8e0: e8bd8070 pop {r4, r5, r6, pc} } return -EINVAL; a000b8e4: e3e00015 mvn r0, #21 a000b8e8: e8bd8070 pop {r4, r5, r6, pc} rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; a000b8ec: e3e0000d mvn r0, #13 a000b8f0: e8bd8070 pop {r4, r5, r6, pc} if (! PIPE_LOCK(pipe)) return -EINTR; a000b8f4: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } a000b8f8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a000b574 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000b574: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} a000b578: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000b57c: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000b580: e1a04000 mov r4, r0 a000b584: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000b588: e5900028 ldr r0, [r0, #40] ; 0x28 a000b58c: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000b590: e1a0a003 mov sl, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000b594: ebffee12 bl a0006de4 a000b598: e2506000 subs r6, r0, #0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); a000b59c: 01a0b00d moveq fp, sp rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000b5a0: 0a000044 beq a000b6b8 a000b5a4: ea00004f b a000b6e8 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) a000b5a8: e5947014 ldr r7, [r4, #20] a000b5ac: e3570000 cmp r7, #0 a000b5b0: 0a000045 beq a000b6cc goto out_locked; if (LIBIO_NODELAY(iop)) { a000b5b4: e59a8014 ldr r8, [sl, #20] a000b5b8: e2188001 ands r8, r8, #1 a000b5bc: 1a000041 bne a000b6c8 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a000b5c0: e5943018 ldr r3, [r4, #24] PIPE_UNLOCK(pipe); a000b5c4: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a000b5c8: e2833001 add r3, r3, #1 a000b5cc: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); a000b5d0: ebffee49 bl a0006efc if (! PIPE_READWAIT(pipe)) a000b5d4: e1a01008 mov r1, r8 a000b5d8: e594002c ldr r0, [r4, #44] ; 0x2c a000b5dc: eb000388 bl a000c404 a000b5e0: e3500000 cmp r0, #0 a000b5e4: 01a07000 moveq r7, r0 a000b5e8: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000b5ec: e1a01008 mov r1, r8 a000b5f0: e5940028 ldr r0, [r4, #40] ; 0x28 a000b5f4: e1a02008 mov r2, r8 a000b5f8: ebffedf9 bl a0006de4 a000b5fc: e3500000 cmp r0, #0 a000b600: 1a000034 bne a000b6d8 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a000b604: e5943018 ldr r3, [r4, #24] if (ret != 0) a000b608: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a000b60c: e2433001 sub r3, r3, #1 a000b610: e5843018 str r3, [r4, #24] if (ret != 0) a000b614: 1a00002c bne a000b6cc if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { a000b618: e594300c ldr r3, [r4, #12] a000b61c: e3530000 cmp r3, #0 a000b620: 0affffe0 beq a000b5a8 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); a000b624: e0667005 rsb r7, r6, r5 a000b628: e1530007 cmp r3, r7 a000b62c: 31a07003 movcc r7, r3 chunk1 = pipe->Size - pipe->Start; a000b630: e5948004 ldr r8, [r4, #4] a000b634: e5943008 ldr r3, [r4, #8] a000b638: e5941000 ldr r1, [r4] a000b63c: e0890006 add r0, r9, r6 a000b640: e0638008 rsb r8, r3, r8 if (chunk > chunk1) { a000b644: e1570008 cmp r7, r8 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); a000b648: d0811003 addle r1, r1, r3 a000b64c: d1a02007 movle r2, r7 } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { a000b650: da000006 ble a000b670 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); a000b654: e0811003 add r1, r1, r3 a000b658: e1a02008 mov r2, r8 a000b65c: eb000c85 bl a000e878 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); a000b660: e5941000 ldr r1, [r4] a000b664: e0860008 add r0, r6, r8 a000b668: e0890000 add r0, r9, r0 a000b66c: e0682007 rsb r2, r8, r7 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); a000b670: eb000c80 bl a000e878 pipe->Start += chunk; a000b674: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; a000b678: e5941004 ldr r1, [r4, #4] a000b67c: e0870000 add r0, r7, r0 a000b680: eb0038c7 bl a00199a4 <__umodsi3> pipe->Length -= chunk; a000b684: e594300c ldr r3, [r4, #12] } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; a000b688: e5840008 str r0, [r4, #8] pipe->Length -= chunk; a000b68c: e0673003 rsb r3, r7, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) a000b690: e3530000 cmp r3, #0 pipe->Start = 0; a000b694: 05843008 streq r3, [r4, #8] else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; a000b698: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) a000b69c: e594301c ldr r3, [r4, #28] a000b6a0: e3530000 cmp r3, #0 a000b6a4: 0a000002 beq a000b6b4 PIPE_WAKEUPWRITERS(pipe); a000b6a8: e5940030 ldr r0, [r4, #48] ; 0x30 a000b6ac: e1a0100d mov r1, sp a000b6b0: eb00033d bl a000c3ac read += chunk; a000b6b4: e0866007 add r6, r6, r7 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { a000b6b8: e1560005 cmp r6, r5 a000b6bc: 3affffd5 bcc a000b618 a000b6c0: e3a07000 mov r7, #0 a000b6c4: ea000000 b a000b6cc /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; a000b6c8: e3e0700a mvn r7, #10 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); a000b6cc: e5940028 ldr r0, [r4, #40] ; 0x28 a000b6d0: ebffee09 bl a0006efc a000b6d4: ea000000 b a000b6dc PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; a000b6d8: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; a000b6dc: e3560000 cmp r6, #0 a000b6e0: d1a06007 movle r6, r7 a000b6e4: ea000000 b a000b6ec ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; a000b6e8: e3e06003 mvn r6, #3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } a000b6ec: e1a00006 mov r0, r6 a000b6f0: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000b6f4 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { a000b6f4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) a000b6f8: e2527000 subs r7, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { a000b6fc: e1a04000 mov r4, r0 a000b700: e1a0b001 mov fp, r1 a000b704: e1a08003 mov r8, r3 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; a000b708: 01a05007 moveq r5, r7 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) a000b70c: 0a00005e beq a000b88c return 0; if (! PIPE_LOCK(pipe)) a000b710: e3a01000 mov r1, #0 a000b714: e5900028 ldr r0, [r0, #40] ; 0x28 a000b718: e1a02001 mov r2, r1 a000b71c: ebffedb0 bl a0006de4 a000b720: e3500000 cmp r0, #0 return -EINTR; a000b724: 13e05003 mvnne r5, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) a000b728: 1a000057 bne a000b88c return -EINTR; if (pipe->Readers == 0) { a000b72c: e5945010 ldr r5, [r4, #16] a000b730: e3550000 cmp r5, #0 a000b734: 0a00004d beq a000b870 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; a000b738: e5949004 ldr r9, [r4, #4] /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; a000b73c: e1a05000 mov r5, r0 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; a000b740: e1570009 cmp r7, r9 a000b744: 91a09007 movls r9, r7 a000b748: 83a09001 movhi r9, #1 a000b74c: ea000041 b a000b858 while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { a000b750: e598a014 ldr sl, [r8, #20] a000b754: e21aa001 ands sl, sl, #1 a000b758: 1a000042 bne a000b868 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; a000b75c: e594301c ldr r3, [r4, #28] PIPE_UNLOCK(pipe); a000b760: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; a000b764: e2833001 add r3, r3, #1 a000b768: e584301c str r3, [r4, #28] PIPE_UNLOCK(pipe); a000b76c: ebffede2 bl a0006efc if (! PIPE_WRITEWAIT(pipe)) a000b770: e1a0100a mov r1, sl a000b774: e5940030 ldr r0, [r4, #48] ; 0x30 a000b778: eb000321 bl a000c404 a000b77c: e3500000 cmp r0, #0 a000b780: 01a06000 moveq r6, r0 a000b784: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000b788: e1a0100a mov r1, sl a000b78c: e5940028 ldr r0, [r4, #40] ; 0x28 a000b790: e1a0200a mov r2, sl a000b794: ebffed92 bl a0006de4 a000b798: e3500000 cmp r0, #0 a000b79c: 1a000037 bne a000b880 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a000b7a0: e594301c ldr r3, [r4, #28] if (ret != 0) a000b7a4: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a000b7a8: e2433001 sub r3, r3, #1 a000b7ac: e584301c str r3, [r4, #28] if (ret != 0) a000b7b0: 1a00002f bne a000b874 goto out_locked; if (pipe->Readers == 0) { a000b7b4: e5943010 ldr r3, [r4, #16] a000b7b8: e3530000 cmp r3, #0 a000b7bc: 0a00002b beq a000b870 /* 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) { a000b7c0: e594a004 ldr sl, [r4, #4] a000b7c4: e594300c ldr r3, [r4, #12] a000b7c8: e063200a rsb r2, r3, sl a000b7cc: e1520009 cmp r2, r9 a000b7d0: 3affffde bcc a000b750 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); a000b7d4: e5940008 ldr r0, [r4, #8] a000b7d8: e1a0100a mov r1, sl ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); a000b7dc: e0656007 rsb r6, r5, r7 chunk1 = pipe->Size - PIPE_WSTART(pipe); a000b7e0: e0830000 add r0, r3, r0 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); a000b7e4: e1520006 cmp r2, r6 a000b7e8: 31a06002 movcc r6, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); a000b7ec: eb00386c bl a00199a4 <__umodsi3> a000b7f0: e5943000 ldr r3, [r4] a000b7f4: e060a00a rsb sl, r0, sl if (chunk > chunk1) { a000b7f8: e156000a cmp r6, sl a000b7fc: e08b1005 add r1, fp, r5 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); a000b800: d0830000 addle r0, r3, r0 a000b804: d1a02006 movle r2, r6 } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { a000b808: da000006 ble a000b828 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); a000b80c: e1a0200a mov r2, sl a000b810: e0830000 add r0, r3, r0 a000b814: eb000c17 bl a000e878 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); a000b818: e5940000 ldr r0, [r4] a000b81c: e08a1005 add r1, sl, r5 a000b820: e08b1001 add r1, fp, r1 a000b824: e06a2006 rsb r2, sl, r6 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); a000b828: eb000c12 bl a000e878 pipe->Length += chunk; a000b82c: e594300c ldr r3, [r4, #12] a000b830: e0833006 add r3, r3, r6 a000b834: e584300c str r3, [r4, #12] if (pipe->waitingReaders > 0) a000b838: e5943018 ldr r3, [r4, #24] a000b83c: e3530000 cmp r3, #0 a000b840: 0a000002 beq a000b850 PIPE_WAKEUPREADERS(pipe); a000b844: e594002c ldr r0, [r4, #44] ; 0x2c a000b848: e1a0100d mov r1, sp a000b84c: eb0002d6 bl a000c3ac written += chunk; a000b850: e0855006 add r5, r5, r6 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; a000b854: e3a09001 mov r9, #1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { a000b858: e1550007 cmp r5, r7 a000b85c: 3affffd7 bcc a000b7c0 a000b860: e3a06000 mov r6, #0 a000b864: ea000002 b a000b874 while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; a000b868: e3e0600a mvn r6, #10 a000b86c: ea000000 b a000b874 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; a000b870: e3e0601f mvn r6, #31 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); a000b874: e5940028 ldr r0, [r4, #40] ; 0x28 a000b878: ebffed9f bl a0006efc a000b87c: ea000000 b a000b884 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; a000b880: e3e06003 mvn r6, #3 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) return written; return ret; a000b884: e3550000 cmp r5, #0 a000b888: d1a05006 movle r5, r6 } a000b88c: e1a00005 mov r0, r5 a000b890: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0010cd4 : ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0010cd4: e59f310c ldr r3, [pc, #268] ; a0010de8 void *realloc( void *ptr, size_t size ) { a0010cd8: e92d40f1 push {r0, r4, r5, r6, r7, lr} uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0010cdc: e5932010 ldr r2, [r3, #16] void *realloc( void *ptr, size_t size ) { a0010ce0: e1a04000 mov r4, r0 a0010ce4: e1a05001 mov r5, r1 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0010ce8: e2822001 add r2, r2, #1 a0010cec: e5832010 str r2, [r3, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { a0010cf0: e59f30f4 ldr r3, [pc, #244] ; a0010dec a0010cf4: e5933000 ldr r3, [r3] a0010cf8: e3530003 cmp r3, #3 a0010cfc: 1a000009 bne a0010d28 if (_Thread_Dispatch_disable_level > 0) a0010d00: e59f30e8 ldr r3, [pc, #232] ; a0010df0 a0010d04: e5933000 ldr r3, [r3] a0010d08: e3530000 cmp r3, #0 return (void *) 0; a0010d0c: 13a04000 movne r4, #0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) a0010d10: 1a000032 bne a0010de0 return (void *) 0; if (_ISR_Nest_level > 0) a0010d14: e59f20d8 ldr r2, [pc, #216] ; a0010df4 a0010d18: e5922000 ldr r2, [r2] a0010d1c: e3520000 cmp r2, #0 return (void *) 0; a0010d20: 11a04003 movne r4, r3 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) a0010d24: 1a00002d bne a0010de0 } /* * Continue with realloc(). */ if ( !ptr ) a0010d28: e3540000 cmp r4, #0 a0010d2c: 1a000003 bne a0010d40 return malloc( size ); a0010d30: e1a00005 mov r0, r5 a0010d34: ebffc49a bl a0001fa4 a0010d38: e1a04000 mov r4, r0 a0010d3c: ea000027 b a0010de0 if ( !size ) { a0010d40: e3550000 cmp r5, #0 a0010d44: 1a000003 bne a0010d58 free( ptr ); a0010d48: e1a00004 mov r0, r4 <== NOT EXECUTED a0010d4c: ebffc3b6 bl a0001c2c <== NOT EXECUTED return (void *) 0; a0010d50: e1a04005 mov r4, r5 <== NOT EXECUTED a0010d54: ea000021 b a0010de0 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { a0010d58: e59f6098 ldr r6, [pc, #152] ; a0010df8 a0010d5c: e1a01004 mov r1, r4 a0010d60: e1a0200d mov r2, sp a0010d64: e5960000 ldr r0, [r6] a0010d68: eb00004e bl a0010ea8 <_Protected_heap_Get_block_size> a0010d6c: e2507000 subs r7, r0, #0 a0010d70: 1a000004 bne a0010d88 errno = EINVAL; a0010d74: ebffeb8c bl a000bbac <__errno> a0010d78: e3a03016 mov r3, #22 a0010d7c: e5803000 str r3, [r0] return (void *) 0; a0010d80: e1a04007 mov r4, r7 a0010d84: ea000015 b a0010de0 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { a0010d88: e5960000 ldr r0, [r6] a0010d8c: e1a01004 mov r1, r4 a0010d90: e1a02005 mov r2, r5 a0010d94: eb000054 bl a0010eec <_Protected_heap_Resize_block> a0010d98: e3500000 cmp r0, #0 a0010d9c: 1a00000f bne a0010de0 * 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 ); a0010da0: e1a00005 mov r0, r5 a0010da4: ebffc47e bl a0001fa4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ a0010da8: e59f3038 ldr r3, [pc, #56] ; a0010de8 if ( !new_area ) { a0010dac: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ a0010db0: e5932004 ldr r2, [r3, #4] a0010db4: e2422001 sub r2, r2, #1 a0010db8: e5832004 str r2, [r3, #4] if ( !new_area ) { a0010dbc: 0a000006 beq a0010ddc return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); a0010dc0: e59d2000 ldr r2, [sp] a0010dc4: e1a01004 mov r1, r4 a0010dc8: e1550002 cmp r5, r2 a0010dcc: 31a02005 movcc r2, r5 a0010dd0: ebffeda3 bl a000c464 free( ptr ); a0010dd4: e1a00004 mov r0, r4 a0010dd8: ebffc393 bl a0001c2c new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; a0010ddc: e1a04006 mov r4, r6 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } a0010de0: e1a00004 mov r0, r4 a0010de4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== a0005978 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a0005978: e92d4030 push {r4, r5, lr} a000597c: e1a04002 mov r4, r2 a0005980: e1a05003 mov r5, r3 RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); a0005984: eb000126 bl a0005e24 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { a0005988: e3500000 cmp r0, #0 a000598c: 0a000003 beq a00059a0 sc = rtems_event_send( task, events ); a0005990: e1a00004 mov r0, r4 a0005994: e1a01005 mov r1, r5 } return sc; } a0005998: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); a000599c: eafffda8 b a0005044 } return sc; } a00059a0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a00059a4 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { a00059a4: e92d4030 push {r4, r5, lr} a00059a8: e1a04001 mov r4, r1 RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); a00059ac: e1a01003 mov r1, r3 a00059b0: e1a05002 mov r5, r2 a00059b4: eb00013d bl a0005eb0 <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { a00059b8: e3500000 cmp r0, #0 a00059bc: 0a000003 beq a00059d0 sc = rtems_event_send( task, events ); a00059c0: e1a00004 mov r0, r4 a00059c4: e1a01005 mov r1, r5 } return sc; } a00059c8: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); a00059cc: eafffd9c b a0005044 } return sc; } a00059d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a0005a28 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a0005a28: e92d4030 push {r4, r5, lr} a0005a2c: e1a04002 mov r4, r2 a0005a30: e1a05003 mov r5, r3 RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); a0005a34: eb000148 bl a0005f5c <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { a0005a38: e3500000 cmp r0, #0 a0005a3c: 0a000003 beq a0005a50 sc = rtems_event_send( task, events ); a0005a40: e1a00004 mov r0, r4 a0005a44: e1a01005 mov r1, r5 } return sc; } a0005a48: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); a0005a4c: eafffd7c b a0005044 } return sc; } a0005a50: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000226c : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { a000226c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) a0002270: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { a0002274: e24dd040 sub sp, sp, #64 ; 0x40 a0002278: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) a000227c: 0a000051 beq a00023c8 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); a0002280: e28d5030 add r5, sp, #48 ; 0x30 a0002284: e1a00005 mov r0, r5 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); a0002288: e28d4028 add r4, sp, #40 ; 0x28 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); a000228c: eb001481 bl a0007498 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); a0002290: e1a01005 mov r1, r5 a0002294: e59f0134 ldr r0, [pc, #308] ; a00023d0 a0002298: e1a02004 mov r2, r4 a000229c: eb001d43 bl a00097b0 <_Timespec_Subtract> } } } #endif (*print)( a00022a0: e1a00008 mov r0, r8 a00022a4: e59f1128 ldr r1, [pc, #296] ; a00023d4 a00022a8: e12fff3a blx sl a00022ac: e59f5124 ldr r5, [pc, #292] ; a00023d8 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); a00022b0: e28db008 add fp, sp, #8 #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; a00022b4: e5b53004 ldr r3, [r5, #4]! a00022b8: e5936004 ldr r6, [r3, #4] if ( information ) { a00022bc: e3560000 cmp r6, #0 a00022c0: 13a07001 movne r7, #1 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( a00022c4: 128d9018 addne r9, sp, #24 if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { a00022c8: 1a000030 bne a0002390 a00022cc: ea000032 b a000239c <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; a00022d0: e596301c ldr r3, [r6, #28] a00022d4: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) a00022d8: e3540000 cmp r4, #0 a00022dc: 0a00002a beq a000238c continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); a00022e0: e3a0100d mov r1, #13 a00022e4: e1a0200b mov r2, fp a00022e8: e5940008 ldr r0, [r4, #8] a00022ec: eb000fd8 bl a0006254 (*print)( a00022f0: e5942008 ldr r2, [r4, #8] a00022f4: e1a0300b mov r3, fp a00022f8: e1a00008 mov r0, r8 a00022fc: e59f10d8 ldr r1, [pc, #216] ; a00023dc a0002300: e12fff3a blx sl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; a0002304: e2843084 add r3, r4, #132 ; 0x84 a0002308: e893000c ldm r3, {r2, r3} a000230c: e58d2020 str r2, [sp, #32] a0002310: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { a0002314: e59f20c4 ldr r2, [pc, #196] ; a00023e0 a0002318: e5923004 ldr r3, [r2, #4] a000231c: e5932008 ldr r2, [r3, #8] a0002320: e5943008 ldr r3, [r4, #8] a0002324: e1520003 cmp r2, r3 a0002328: 1a000006 bne a0002348 Timestamp_Control used; _Timestamp_Subtract( a000232c: e59f00b0 ldr r0, [pc, #176] ; a00023e4 a0002330: e28d1030 add r1, sp, #48 ; 0x30 a0002334: e1a02009 mov r2, r9 a0002338: eb001d1c bl a00097b0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); a000233c: e28d0020 add r0, sp, #32 a0002340: e1a01009 mov r1, r9 a0002344: eb001cdd bl a00096c0 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); a0002348: e28d203c add r2, sp, #60 ; 0x3c a000234c: e28d3038 add r3, sp, #56 ; 0x38 a0002350: e28d0020 add r0, sp, #32 a0002354: e28d1028 add r1, sp, #40 ; 0x28 a0002358: eb001cf0 bl a0009720 <_Timespec_Divide> /* * Print the information */ (*print)( context, a000235c: e3a01ffa mov r1, #1000 ; 0x3e8 a0002360: e59d0024 ldr r0, [sp, #36] ; 0x24 a0002364: eb005194 bl a00169bc <__aeabi_uidiv> a0002368: e59d203c ldr r2, [sp, #60] ; 0x3c a000236c: e1a03000 mov r3, r0 a0002370: e59f1070 ldr r1, [pc, #112] ; a00023e8 a0002374: e58d2000 str r2, [sp] a0002378: e59d2038 ldr r2, [sp, #56] ; 0x38 a000237c: e1a00008 mov r0, r8 a0002380: e58d2004 str r2, [sp, #4] a0002384: e59d2020 ldr r2, [sp, #32] a0002388: e12fff3a blx sl continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { a000238c: e2877001 add r7, r7, #1 a0002390: e1d631b0 ldrh r3, [r6, #16] a0002394: e1570003 cmp r7, r3 a0002398: 9affffcc bls a00022d0 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { a000239c: e59f3048 ldr r3, [pc, #72] ; a00023ec a00023a0: e1550003 cmp r5, r3 a00023a4: 1affffc2 bne a00022b4 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( a00023a8: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED a00023ac: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED a00023b0: eb005181 bl a00169bc <__aeabi_uidiv> <== NOT EXECUTED a00023b4: e59f1034 ldr r1, [pc, #52] ; a00023f0 <== NOT EXECUTED a00023b8: e1a03000 mov r3, r0 <== NOT EXECUTED a00023bc: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED a00023c0: e1a00008 mov r0, r8 <== NOT EXECUTED a00023c4: e12fff3a blx sl <== NOT EXECUTED "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } a00023c8: e28dd040 add sp, sp, #64 ; 0x40 <== NOT EXECUTED a00023cc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== a0001988 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { a0001988: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; a000198c: e59f60e0 ldr r6, [pc, #224] ; a0001a74 a0001990: e3a02012 mov r2, #18 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { a0001994: e24dd018 sub sp, sp, #24 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; a0001998: e5963000 ldr r3, [r6] a000199c: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) a00019a0: e59f30d0 ldr r3, [pc, #208] ; a0001a78 a00019a4: e5933000 ldr r3, [r3] a00019a8: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); a00019ac: 059f00c8 ldreq r0, [pc, #200] ; a0001a7c rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) a00019b0: 0a00000a beq a00019e0 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; a00019b4: e59f30c4 ldr r3, [pc, #196] ; a0001a80 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); a00019b8: e3a05000 mov r5, #0 * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; a00019bc: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); a00019c0: e58d5000 str r5, [sp] a00019c4: e5930008 ldr r0, [r3, #8] a00019c8: e593100c ldr r1, [r3, #12] a00019cc: e893000c ldm r3, {r2, r3} a00019d0: eb000201 bl a00021dc if ( status == -1 ) a00019d4: e3700001 cmn r0, #1 a00019d8: 1a000001 bne a00019e4 rtems_fatal_error_occurred( 0xABCD0002 ); a00019dc: e59f00a0 ldr r0, [pc, #160] ; a0001a84 <== NOT EXECUTED a00019e0: eb000eac bl a0005498 <== NOT EXECUTED rtems_filesystem_link_counts = 0; a00019e4: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a00019e8: e28d4004 add r4, sp, #4 a00019ec: e3a01001 mov r1, #1 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; a00019f0: e1c353b0 strh r5, [r3, #48] ; 0x30 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a00019f4: e1a02005 mov r2, r5 a00019f8: e1a03004 mov r3, r4 a00019fc: e59f0084 ldr r0, [pc, #132] ; a0001a88 a0001a00: e58d5000 str r5, [sp] a0001a04: eb000053 bl a0001b58 rtems_filesystem_root = loc; a0001a08: e596c000 ldr ip, [r6] a0001a0c: e1a07004 mov r7, r4 a0001a10: e8b7000f ldm r7!, {r0, r1, r2, r3} a0001a14: e28cc018 add ip, ip, #24 a0001a18: e8ac000f stmia ip!, {r0, r1, r2, r3} a0001a1c: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0001a20: e3a01001 mov r1, #1 a0001a24: e1a02005 mov r2, r5 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; a0001a28: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0001a2c: e59f0054 ldr r0, [pc, #84] ; a0001a88 a0001a30: e1a03004 mov r3, r4 a0001a34: e58d5000 str r5, [sp] a0001a38: eb000046 bl a0001b58 rtems_filesystem_current = loc; a0001a3c: e8b4000f ldm r4!, {r0, r1, r2, r3} a0001a40: e596c000 ldr ip, [r6] a0001a44: e28cc004 add ip, ip, #4 a0001a48: e8ac000f stmia ip!, {r0, r1, r2, r3} a0001a4c: 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); a0001a50: e59f0034 ldr r0, [pc, #52] ; a0001a8c a0001a54: e59f1034 ldr r1, [pc, #52] ; a0001a90 /* 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; a0001a58: 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); a0001a5c: eb00018d bl a0002098 if ( status != 0 ) a0001a60: e3500000 cmp r0, #0 rtems_fatal_error_occurred( 0xABCD0003 ); a0001a64: 159f0028 ldrne r0, [pc, #40] ; a0001a94 * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) a0001a68: 1affffdc bne a00019e0 * 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. */ } a0001a6c: e28dd018 add sp, sp, #24 a0001a70: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0007a74 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { a0007a74: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) a0007a78: e2508000 subs r8, r0, #0 a0007a7c: 0a000012 beq a0007acc a0007a80: e59f4048 ldr r4, [pc, #72] ; a0007ad0 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) a0007a84: e284700c add r7, r4, #12 #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; a0007a88: e5b43004 ldr r3, [r4, #4]! a0007a8c: e5936004 ldr r6, [r3, #4] if ( !information ) a0007a90: e3560000 cmp r6, #0 a0007a94: 13a05001 movne r5, #1 a0007a98: 1a000006 bne a0007ab8 a0007a9c: ea000008 b a0007ac4 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; a0007aa0: e596301c ldr r3, [r6, #28] a0007aa4: e7930105 ldr r0, [r3, r5, lsl #2] if ( !the_thread ) a0007aa8: e3500000 cmp r0, #0 a0007aac: 0a000000 beq a0007ab4 continue; (*routine)(the_thread); a0007ab0: e12fff38 blx r8 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { a0007ab4: e2855001 add r5, r5, #1 a0007ab8: e1d631b0 ldrh r3, [r6, #16] a0007abc: e1550003 cmp r5, r3 a0007ac0: 9afffff6 bls a0007aa0 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { a0007ac4: e1540007 cmp r4, r7 a0007ac8: 1affffee bne a0007a88 a0007acc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== a0009390 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { a0009390: e2003006 and r3, r0, #6 a0009394: e3530006 cmp r3, #6 fcntl_flags |= O_RDWR; a0009398: 03a03002 moveq r3, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { a000939c: 0a000005 beq a00093b8 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { a00093a0: e3100002 tst r0, #2 fcntl_flags |= O_RDONLY; a00093a4: 13a03000 movne r3, #0 { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { a00093a8: 1a000002 bne a00093b8 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; a00093ac: e3100004 tst r0, #4 <== NOT EXECUTED a00093b0: 03a03000 moveq r3, #0 <== NOT EXECUTED a00093b4: 13a03001 movne r3, #1 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { a00093b8: e3100001 tst r0, #1 fcntl_flags |= O_NONBLOCK; a00093bc: 13833901 orrne r3, r3, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { a00093c0: e3100c02 tst r0, #512 ; 0x200 fcntl_flags |= O_APPEND; a00093c4: 13833008 orrne r3, r3, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { a00093c8: e3100b01 tst r0, #1024 ; 0x400 fcntl_flags |= O_CREAT; a00093cc: 13833c02 orrne r3, r3, #512 ; 0x200 } return fcntl_flags; } a00093d0: e1a00003 mov r0, r3 a00093d4: e12fff1e bx lr =============================================================================== a000b764 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { a000b764: e92d4010 push {r4, lr} Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) a000b768: e2514000 subs r4, r1, #0 rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { a000b76c: e1a03000 mov r3, r0 a000b770: e24dd014 sub sp, sp, #20 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; a000b774: 03a00009 moveq r0, #9 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) a000b778: 0a000023 beq a000b80c a000b77c: e1a01003 mov r1, r3 a000b780: e28d2010 add r2, sp, #16 a000b784: e59f0088 ldr r0, [pc, #136] ; a000b814 a000b788: ebfff212 bl a0007fd8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a000b78c: e59d2010 ldr r2, [sp, #16] a000b790: e1a03000 mov r3, r0 a000b794: e3520000 cmp r2, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000b798: 13a00004 movne r0, #4 if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a000b79c: 1a00001a bne a000b80c case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; a000b7a0: e5932040 ldr r2, [r3, #64] ; 0x40 status->state = the_period->state; a000b7a4: e5933038 ldr r3, [r3, #56] ; 0x38 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; a000b7a8: e5922008 ldr r2, [r2, #8] status->state = the_period->state; /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { a000b7ac: e3530000 cmp r3, #0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; status->state = the_period->state; a000b7b0: e884000c stm r4, {r2, r3} /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); a000b7b4: 05843008 streq r3, [r4, #8] a000b7b8: 0584300c streq r3, [r4, #12] _Timespec_Set_to_zero( &status->executed_since_last_period ); a000b7bc: 05843010 streq r3, [r4, #16] a000b7c0: 05843014 streq r3, [r4, #20] a000b7c4: 0a00000e beq a000b804 } else { /* * Grab the current status. */ valid_status = a000b7c8: e1a0100d mov r1, sp a000b7cc: e28d2008 add r2, sp, #8 a000b7d0: ebffe942 bl a0005ce0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { a000b7d4: e3500000 cmp r0, #0 a000b7d8: 1a000002 bne a000b7e8 _Thread_Enable_dispatch(); a000b7dc: ebfff423 bl a0008870 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_NOT_DEFINED; a000b7e0: e3a0000b mov r0, #11 <== NOT EXECUTED a000b7e4: ea000008 b a000b80c <== NOT EXECUTED } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( a000b7e8: e89d000c ldm sp, {r2, r3} a000b7ec: e5842008 str r2, [r4, #8] a000b7f0: e584300c str r3, [r4, #12] &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( a000b7f4: e28d3008 add r3, sp, #8 a000b7f8: e893000c ldm r3, {r2, r3} a000b7fc: e5842010 str r2, [r4, #16] a000b800: e5843014 str r3, [r4, #20] status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); a000b804: ebfff419 bl a0008870 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000b808: e3a00000 mov r0, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000b80c: e28dd014 add sp, sp, #20 a000b810: e8bd8010 pop {r4, pc} =============================================================================== a00013a4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; a00013a4: e59f307c ldr r3, [pc, #124] ; a0001428 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { a00013a8: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; a00013ac: e5933004 ldr r3, [r3, #4] /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { a00013b0: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a00013b4: e59300c4 ldr r0, [r3, #196] ; 0xc4 a00013b8: e15b0000 cmp fp, r0 return false; a00013bc: 33a04000 movcc r4, #0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a00013c0: 3a000004 bcc a00013d8 return false; } if ( sp > (the_stack->area + the_stack->size) ) { a00013c4: e59340c0 ldr r4, [r3, #192] ; 0xc0 a00013c8: e0804004 add r4, r0, r4 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) a00013cc: e15b0004 cmp fp, r4 a00013d0: 83a04000 movhi r4, #0 a00013d4: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { a00013d8: e59f304c ldr r3, [pc, #76] ; a000142c a00013dc: e5933008 ldr r3, [r3, #8] a00013e0: e3530000 cmp r3, #0 */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; a00013e4: 03a01001 moveq r1, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { a00013e8: 0a000005 beq a0001404 pattern_ok = (!memcmp( a00013ec: e59f103c ldr r1, [pc, #60] ; a0001430 a00013f0: e2800008 add r0, r0, #8 a00013f4: e3a02010 mov r2, #16 a00013f8: eb002c06 bl a000c418 a00013fc: e2701001 rsbs r1, r0, #1 a0001400: 33a01000 movcc r1, #0 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { a0001404: e3540000 cmp r4, #0 a0001408: 0a000001 beq a0001414 a000140c: e3510000 cmp r1, #0 a0001410: 1a000002 bne a0001420 Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); a0001414: e59f300c ldr r3, [pc, #12] ; a0001428 <== NOT EXECUTED a0001418: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED a000141c: ebffff9b bl a0001290 <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } a0001420: e3a00000 mov r0, #0 a0001424: e8bd8810 pop {r4, fp, pc} =============================================================================== a0001434 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { a0001434: e92d4070 push {r4, r5, r6, lr} if ( !print ) a0001438: e2515000 subs r5, r1, #0 void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { a000143c: e1a06000 mov r6, r0 if ( !print ) a0001440: 0a00000c beq a0001478 return; print_context = context; a0001444: e59f4030 ldr r4, [pc, #48] ; a000147c print_handler = print; (*print)( context, "Stack usage by thread\n"); a0001448: e59f1030 ldr r1, [pc, #48] ; a0001480 ) { if ( !print ) return; print_context = context; a000144c: e5840004 str r0, [r4, #4] print_handler = print; a0001450: e5845000 str r5, [r4] (*print)( context, "Stack usage by thread\n"); a0001454: e12fff35 blx r5 (*print)( context, a0001458: e59f1024 ldr r1, [pc, #36] ; a0001484 a000145c: e1a00006 mov r0, r6 a0001460: e12fff35 blx r5 " 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 ); a0001464: e59f001c ldr r0, [pc, #28] ; a0001488 a0001468: eb001310 bl a00060b0 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); #endif print_context = NULL; a000146c: e3a03000 mov r3, #0 <== NOT EXECUTED a0001470: e5843004 str r3, [r4, #4] <== NOT EXECUTED print_handler = NULL; a0001474: e5843000 str r3, [r4] <== NOT EXECUTED a0001478: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a000133c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { a000133c: e92d4830 push {r4, r5, fp, lr} Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; a0001340: e59030c4 ldr r3, [r0, #196] ; 0xc4 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { a0001344: e28db00c add fp, sp, #12 a0001348: e1a04000 mov r4, r0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a000134c: e15b0003 cmp fp, r3 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; a0001350: e2830008 add r0, r3, #8 { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; a0001354: 33a05000 movcc r5, #0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a0001358: 3a000004 bcc a0001370 return false; } if ( sp > (the_stack->area + the_stack->size) ) { a000135c: e59450c0 ldr r5, [r4, #192] ; 0xc0 a0001360: e0835005 add r5, r3, r5 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( a0001364: e15b0005 cmp fp, r5 a0001368: 83a05000 movhi r5, #0 a000136c: 93a05001 movls r5, #1 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, a0001370: e59f1028 ldr r1, [pc, #40] ; a00013a0 a0001374: e3a02010 mov r2, #16 a0001378: eb002c26 bl a000c418 a000137c: e2701001 rsbs r1, r0, #1 a0001380: 33a01000 movcc r1, #0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { a0001384: e3550000 cmp r5, #0 a0001388: 0a000001 beq a0001394 a000138c: e3510000 cmp r1, #0 a0001390: 1a000001 bne a000139c Stack_check_report_blown_task( running, pattern_ok ); a0001394: e1a00004 mov r0, r4 <== NOT EXECUTED a0001398: ebffffbc bl a0001290 <== NOT EXECUTED a000139c: e8bd8830 pop {r4, r5, fp, pc} =============================================================================== a000af48 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a000af48: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a000af4c: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a000af50: e1a05000 mov r5, r0 a000af54: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; a000af58: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a000af5c: 0a000018 beq a000afc4 return RTEMS_INVALID_ADDRESS; errno = 0; a000af60: eb000796 bl a000cdc0 <__errno> a000af64: e3a03000 mov r3, #0 a000af68: e5803000 str r3, [r0] *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); a000af6c: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; a000af70: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); a000af74: e1a00005 mov r0, r5 a000af78: e3a02010 mov r2, #16 a000af7c: eb0014be bl a001027c #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 ) a000af80: e3560000 cmp r6, #0 *endptr = end; a000af84: 159d3000 ldrne r3, [sp] *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); a000af88: e1a07000 mov r7, r0 result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; a000af8c: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) a000af90: e59d3000 ldr r3, [sp] a000af94: e1530005 cmp r3, r5 return RTEMS_NOT_DEFINED; a000af98: 03a0000b moveq r0, #11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) a000af9c: 0a000008 beq a000afc4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a000afa0: e3770001 cmn r7, #1 a000afa4: 1a000004 bne a000afbc a000afa8: eb000784 bl a000cdc0 <__errno> <== NOT EXECUTED a000afac: e5903000 ldr r3, [r0] <== NOT EXECUTED a000afb0: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; a000afb4: 03a0000a moveq r0, #10 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a000afb8: 0a000001 beq a000afc4 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; a000afbc: e5847000 str r7, [r4] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; a000afc0: e3a00000 mov r0, #0 } a000afc4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== a0001764 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { a0001764: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0001768: e24ddf6b sub sp, sp, #428 ; 0x1ac a000176c: e58d1010 str r1, [sp, #16] a0001770: e58d2018 str r2, [sp, #24] a0001774: e58d000c str r0, [sp, #12] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( a0001778: eb003a76 bl a0010158 a000177c: e3a02000 mov r2, #0 a0001780: e1a01000 mov r1, r0 a0001784: e28d3f65 add r3, sp, #404 ; 0x194 a0001788: e59d000c ldr r0, [sp, #12] a000178c: e58d2000 str r2, [sp] a0001790: eb00029e bl a0002210 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) a0001794: e2504000 subs r4, r0, #0 a0001798: 1a00006d bne a0001954 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) a000179c: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 a00017a0: e59f21c4 ldr r2, [pc, #452] ; a000196c a00017a4: e1530002 cmp r3, r2 a00017a8: 0a000005 beq a00017c4 a00017ac: e59f21bc ldr r2, [pc, #444] ; a0001970 a00017b0: e1530002 cmp r3, r2 a00017b4: 1a000066 bne a0001954 a00017b8: ea000001 b a00017c4 <== NOT EXECUTED a00017bc: e1a08004 mov r8, r4 a00017c0: ea000006 b a00017e0 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a00017c4: e28d2f65 add r2, sp, #404 ; 0x194 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) a00017c8: e1a08004 mov r8, r4 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); a00017cc: e28d7f47 add r7, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a00017d0: e28d9d06 add r9, sp, #384 ; 0x180 a00017d4: e58d2004 str r2, [sp, #4] * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); a00017d8: e28d501c add r5, sp, #28 a00017dc: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) a00017e0: e59d3018 ldr r3, [sp, #24] a00017e4: e2884c02 add r4, r8, #512 ; 0x200 a00017e8: e1540003 cmp r4, r3 a00017ec: 8a00005a bhi a000195c break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; a00017f0: e59de010 ldr lr, [sp, #16] offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) a00017f4: e59f1178 ldr r1, [pc, #376] ; a0001974 a00017f8: e3a02005 mov r2, #5 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; a00017fc: e08e8008 add r8, lr, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) a0001800: e2880c01 add r0, r8, #256 ; 0x100 a0001804: e2800001 add r0, r0, #1 a0001808: eb003a6a bl a00101b8 a000180c: e2506000 subs r6, r0, #0 a0001810: 1a000051 bne a000195c break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); a0001814: e3a02063 mov r2, #99 ; 0x63 a0001818: e1a01008 mov r1, r8 a000181c: e1a00007 mov r0, r7 a0001820: eb003ac0 bl a0010328 filename[MAX_NAME_FIELD_SIZE] = '\0'; a0001824: e5cd617f strb r6, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); a0001828: e3a01008 mov r1, #8 a000182c: e2880064 add r0, r8, #100 ; 0x64 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; a0001830: e5d8609c ldrb r6, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); a0001834: eb001d46 bl a0008d54 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); a0001838: e3a0100c mov r1, #12 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); a000183c: e58d0014 str r0, [sp, #20] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); a0001840: e288007c add r0, r8, #124 ; 0x7c a0001844: eb001d42 bl a0008d54 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); a0001848: e3a01008 mov r1, #8 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); a000184c: e1a0b000 mov fp, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); a0001850: e2880094 add r0, r8, #148 ; 0x94 a0001854: eb001d3e bl a0008d54 <_rtems_octal2ulong> a0001858: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) a000185c: e1a00008 mov r0, r8 a0001860: e58d3008 str r3, [sp, #8] a0001864: eb001d48 bl a0008d8c <_rtems_tar_header_checksum> a0001868: e59d3008 ldr r3, [sp, #8] a000186c: e1500003 cmp r0, r3 a0001870: 1a000039 bne a000195c * Generate an IMFS node depending on the file type. * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { a0001874: e3560035 cmp r6, #53 ; 0x35 a0001878: 1a000013 bne a00018cc strcpy(full_filename, mountpoint); a000187c: e59d100c ldr r1, [sp, #12] a0001880: e1a00005 mov r0, r5 a0001884: eb00386f bl a000fa48 if (full_filename[strlen(full_filename)-1] != '/') a0001888: e1a00005 mov r0, r5 a000188c: eb003a31 bl a0010158 a0001890: e28d2f6b add r2, sp, #428 ; 0x1ac a0001894: e0820000 add r0, r2, r0 a0001898: e5503191 ldrb r3, [r0, #-401] ; 0x191 a000189c: e353002f cmp r3, #47 ; 0x2f a00018a0: 0a000002 beq a00018b0 strcat(full_filename, "/"); a00018a4: e1a00005 mov r0, r5 <== NOT EXECUTED a00018a8: e59f10c8 ldr r1, [pc, #200] ; a0001978 <== NOT EXECUTED a00018ac: eb0037ae bl a000f76c <== NOT EXECUTED strcat(full_filename, filename); a00018b0: e1a01007 mov r1, r7 a00018b4: e1a00005 mov r0, r5 a00018b8: eb0037ab bl a000f76c mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); a00018bc: e1a00005 mov r0, r5 a00018c0: e59f10b4 ldr r1, [pc, #180] ; a000197c a00018c4: eb000477 bl a0002aa8 a00018c8: eaffffbb b a00017bc * IMFS_create_node was ONLY passed a NULL when we created the * root node. We added a new IMFS_create_root_node() so this * path no longer existed. The result was simpler code which * should not have this path. */ else if (linkflag == REGTYPE) { a00018cc: e3560030 cmp r6, #48 ; 0x30 a00018d0: 1affffb9 bne a00017bc const char *name; loc = root_loc; a00018d4: e59dc004 ldr ip, [sp, #4] a00018d8: e1a0e009 mov lr, r9 a00018dc: e8bc000f ldm ip!, {r0, r1, r2, r3} a00018e0: e8ae000f stmia lr!, {r0, r1, r2, r3} a00018e4: e59c2000 ldr r2, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { a00018e8: e1a00007 mov r0, r7 a00018ec: e1a01009 mov r1, r9 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a00018f0: e58e2000 str r2, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { a00018f4: e28d2f6a add r2, sp, #424 ; 0x1a8 a00018f8: eb001fee bl a00098b8 a00018fc: e2506000 subs r6, r0, #0 a0001900: 1a00000d bne a000193c node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, a0001904: e59d2014 ldr r2, [sp, #20] else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( a0001908: e1a00009 mov r0, r9 a000190c: e3a01006 mov r1, #6 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, a0001910: e1a03b82 lsl r3, r2, #23 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( a0001914: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, a0001918: e1a03ba3 lsr r3, r3, #23 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( a000191c: e3833902 orr r3, r3, #32768 ; 0x8000 a0001920: e58d6000 str r6, [sp] a0001924: eb001e61 bl a00092b0 IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; a0001928: e59d2010 ldr r2, [sp, #16] &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; a000192c: e580b050 str fp, [r0, #80] ; 0x50 a0001930: e5806054 str r6, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; a0001934: e0823004 add r3, r2, r4 a0001938: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; a000193c: e28bbf7f add fp, fp, #508 ; 0x1fc a0001940: e28bb003 add fp, fp, #3 offset += 512 * nblocks; a0001944: e3cbbf7f bic fp, fp, #508 ; 0x1fc a0001948: e3cbb003 bic fp, fp, #3 a000194c: e08b4004 add r4, fp, r4 a0001950: eaffff99 b a00017bc ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; a0001954: e3e04000 mvn r4, #0 a0001958: ea000000 b a0001960 a000195c: e1a0400a mov r4, sl nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } a0001960: e1a00004 mov r0, r4 a0001964: e28ddf6b add sp, sp, #428 ; 0x1ac a0001968: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0002f8c : rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0002f8c: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_close (void *arg) { a0002f90: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0002f94: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( a0002f98: e59f3178 ldr r3, [pc, #376] ; a0003118 a0002f9c: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { a0002fa0: e1a05000 mov r5, r0 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( a0002fa4: e1a02001 mov r2, r1 a0002fa8: e5930000 ldr r0, [r3] a0002fac: eb0007a3 bl a0004e40 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0002fb0: e3500000 cmp r0, #0 a0002fb4: 1a000023 bne a0003048 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { a0002fb8: e5943008 ldr r3, [r4, #8] a0002fbc: e2433001 sub r3, r3, #1 a0002fc0: e3530000 cmp r3, #0 a0002fc4: e5843008 str r3, [r4, #8] a0002fc8: 1a00004d bne a0003104 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { a0002fcc: e59420cc ldr r2, [r4, #204] ; 0xcc a0002fd0: e59f3144 ldr r3, [pc, #324] ; a000311c a0002fd4: e0833282 add r3, r3, r2, lsl #5 a0002fd8: e5931004 ldr r1, [r3, #4] a0002fdc: e3510000 cmp r1, #0 a0002fe0: 0a000002 beq a0002ff0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); a0002fe4: e1a00004 mov r0, r4 a0002fe8: e12fff31 blx r1 a0002fec: ea000008 b a0003014 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0002ff0: e5940018 ldr r0, [r4, #24] a0002ff4: e1a02001 mov r2, r1 a0002ff8: eb000790 bl a0004e40 if (sc != RTEMS_SUCCESSFUL) { a0002ffc: e3500000 cmp r0, #0 a0003000: 1a000010 bne a0003048 rtems_fatal_error_occurred (sc); } drainOutput (tty); a0003004: e1a00004 mov r0, r4 a0003008: ebfffeb2 bl a0002ad8 rtems_semaphore_release (tty->osem); a000300c: e5940018 ldr r0, [r4, #24] a0003010: eb0007d0 bl a0004f58 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0003014: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0003018: e3530002 cmp r3, #2 a000301c: 1a00000a bne a000304c /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); a0003020: e59400c4 ldr r0, [r4, #196] ; 0xc4 a0003024: e3a01001 mov r1, #1 a0003028: eb000672 bl a00049f8 if (sc != RTEMS_SUCCESSFUL) a000302c: e3500000 cmp r0, #0 a0003030: 1a000004 bne a0003048 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); a0003034: e59400c8 ldr r0, [r4, #200] ; 0xc8 a0003038: e3a01001 mov r1, #1 a000303c: eb00066d bl a00049f8 if (sc != RTEMS_SUCCESSFUL) a0003040: e3500000 cmp r0, #0 a0003044: 0a000000 beq a000304c rtems_fatal_error_occurred (sc); a0003048: eb000912 bl a0005498 <== NOT EXECUTED } if (tty->device.lastClose) a000304c: e594309c ldr r3, [r4, #156] ; 0x9c a0003050: e3530000 cmp r3, #0 a0003054: 0a000003 beq a0003068 (*tty->device.lastClose)(tty->major, tty->minor, arg); a0003058: e594000c ldr r0, [r4, #12] a000305c: e5941010 ldr r1, [r4, #16] a0003060: e1a02005 mov r2, r5 a0003064: e12fff33 blx r3 if (tty->forw == NULL) { a0003068: e894000c ldm r4, {r2, r3} a000306c: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; a0003070: 15823004 strne r3, [r2, #4] if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { a0003074: 1a000003 bne a0003088 rtems_termios_ttyTail = tty->back; a0003078: e59f10a0 ldr r1, [pc, #160] ; a0003120 if ( rtems_termios_ttyTail != NULL ) { a000307c: e3530000 cmp r3, #0 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; a0003080: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; a0003084: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { a0003088: e5942004 ldr r2, [r4, #4] a000308c: e5943000 ldr r3, [r4] a0003090: e3520000 cmp r2, #0 rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; a0003094: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { a0003098: 1a000003 bne a00030ac rtems_termios_ttyHead = tty->forw; a000309c: e59f1080 ldr r1, [pc, #128] ; a0003124 if ( rtems_termios_ttyHead != NULL ) { a00030a0: e3530000 cmp r3, #0 rtems_termios_ttyHead->back = NULL; a00030a4: 15832004 strne r2, [r3, #4] } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; a00030a8: e5813000 str r3, [r1] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); a00030ac: e5940014 ldr r0, [r4, #20] a00030b0: eb00073b bl a0004da4 rtems_semaphore_delete (tty->osem); a00030b4: e5940018 ldr r0, [r4, #24] a00030b8: eb000739 bl a0004da4 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); a00030bc: e594008c ldr r0, [r4, #140] ; 0x8c a00030c0: eb000737 bl a0004da4 if ((tty->device.pollRead == NULL) || a00030c4: e59430a0 ldr r3, [r4, #160] ; 0xa0 a00030c8: e3530000 cmp r3, #0 a00030cc: 0a000002 beq a00030dc a00030d0: e59430b4 ldr r3, [r4, #180] ; 0xb4 a00030d4: e3530002 cmp r3, #2 a00030d8: 1a000001 bne a00030e4 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); a00030dc: e5940068 ldr r0, [r4, #104] ; 0x68 a00030e0: eb00072f bl a0004da4 free (tty->rawInBuf.theBuf); a00030e4: e5940058 ldr r0, [r4, #88] ; 0x58 a00030e8: ebfffacf bl a0001c2c free (tty->rawOutBuf.theBuf); a00030ec: e594007c ldr r0, [r4, #124] ; 0x7c a00030f0: ebfffacd bl a0001c2c free (tty->cbuf); a00030f4: e594001c ldr r0, [r4, #28] a00030f8: ebfffacb bl a0001c2c free (tty); a00030fc: e1a00004 mov r0, r4 a0003100: ebfffac9 bl a0001c2c } rtems_semaphore_release (rtems_termios_ttyMutex); a0003104: e59f300c ldr r3, [pc, #12] ; a0003118 a0003108: e5930000 ldr r0, [r3] a000310c: eb000791 bl a0004f58 return RTEMS_SUCCESSFUL; } a0003110: e3a00000 mov r0, #0 a0003114: e8bd8030 pop {r4, r5, pc} =============================================================================== a00044a0 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a00044a0: e5902090 ldr r2, [r0, #144] ; 0x90 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { a00044a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a00044a8: e0822001 add r2, r2, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a00044ac: e59010b4 ldr r1, [r0, #180] ; 0xb4 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a00044b0: e5802090 str r2, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a00044b4: e3510002 cmp r1, #2 a00044b8: 1a000004 bne a00044d0 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); a00044bc: e59000c8 ldr r0, [r0, #200] ; 0xc8 a00044c0: eb00014c bl a00049f8 if (sc != RTEMS_SUCCESSFUL) a00044c4: e2503000 subs r3, r0, #0 a00044c8: 0a00000c beq a0004500 rtems_fatal_error_occurred (sc); a00044cc: eb0003f1 bl a0005498 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { a00044d0: e59030cc ldr r3, [r0, #204] ; 0xcc a00044d4: e3530005 cmp r3, #5 a00044d8: 1a000006 bne a00044f8 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a00044dc: e59f3024 ldr r3, [pc, #36] ; a0004508 a00044e0: e59330b4 ldr r3, [r3, #180] ; 0xb4 a00044e4: e3530000 cmp r3, #0 a00044e8: 0a000004 beq a0004500 rtems_termios_linesw[tty->t_line].l_start(tty); a00044ec: e12fff33 blx r3 } return 0; /* nothing to output in IRQ... */ a00044f0: e3a03000 mov r3, #0 a00044f4: ea000001 b a0004500 } return rtems_termios_refill_transmitter(tty); } a00044f8: e49de004 pop {lr} ; (ldr lr, [sp], #4) rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); a00044fc: eaffff5a b a000426c } a0004500: e1a00003 mov r0, r3 a0004504: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0003f6c : * 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) { a0003f6c: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { a0003f70: e59030cc ldr r3, [r0, #204] ; 0xcc a0003f74: e59f7280 ldr r7, [pc, #640] ; a00041fc * 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) { a0003f78: e1a04000 mov r4, r0 a0003f7c: e1a06001 mov r6, r1 char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { a0003f80: e0873283 add r3, r7, r3, lsl #5 a0003f84: e5939010 ldr r9, [r3, #16] a0003f88: e3590000 cmp r9, #0 a0003f8c: 11a05002 movne r5, r2 a0003f90: 1a00000d bne a0003fcc /* * 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); a0003f94: e2803030 add r3, r0, #48 ; 0x30 a0003f98: e58d3000 str r3, [sp] if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, a0003f9c: e280304a add r3, r0, #74 ; 0x4a char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { a0003fa0: e1a0a002 mov sl, r2 a0003fa4: e1a05009 mov r5, r9 if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, a0003fa8: e58d3004 str r3, [sp, #4] a0003fac: ea000089 b a00041d8 rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); a0003fb0: e59430cc ldr r3, [r4, #204] ; 0xcc a0003fb4: e4d60001 ldrb r0, [r6], #1 a0003fb8: e1a01004 mov r1, r4 a0003fbc: e0873283 add r3, r7, r3, lsl #5 a0003fc0: e5933010 ldr r3, [r3, #16] a0003fc4: e12fff33 blx r3 a0003fc8: e2455001 sub r5, r5, #1 int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { a0003fcc: e3550000 cmp r5, #0 a0003fd0: 1afffff6 bne a0003fb0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { a0003fd4: e59430e4 ldr r3, [r4, #228] ; 0xe4 a0003fd8: e3530000 cmp r3, #0 a0003fdc: 1a000084 bne a00041f4 a0003fe0: e59430dc ldr r3, [r4, #220] ; 0xdc a0003fe4: e3530000 cmp r3, #0 a0003fe8: 0a000081 beq a00041f4 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); a0003fec: e2840030 add r0, r4, #48 ; 0x30 a0003ff0: e59410e0 ldr r1, [r4, #224] ; 0xe0 a0003ff4: e12fff33 blx r3 tty->tty_rcvwakeup = 1; a0003ff8: e3a03001 mov r3, #1 a0003ffc: e58430e4 str r3, [r4, #228] ; 0xe4 a0004000: ea00007b b a00041f4 while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { a0004004: e59430b8 ldr r3, [r4, #184] ; 0xb8 } return 0; } while (len--) { c = *buf++; a0004008: e4d68001 ldrb r8, [r6], #1 /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { a000400c: e3130c02 tst r3, #512 ; 0x200 a0004010: 0a00000f beq a0004054 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { a0004014: e5d4204a ldrb r2, [r4, #74] ; 0x4a a0004018: e5d43049 ldrb r3, [r4, #73] ; 0x49 a000401c: e1520008 cmp r2, r8 a0004020: 1a000007 bne a0004044 if (c == tty->termios.c_cc[VSTART]) { a0004024: e1530002 cmp r3, r2 /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; a0004028: 059430b8 ldreq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; a000402c: 159430b8 ldrne r3, [r4, #184] ; 0xb8 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; a0004030: 02233010 eoreq r3, r3, #16 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; a0004034: 13833010 orrne r3, r3, #16 a0004038: e58430b8 str r3, [r4, #184] ; 0xb8 * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { a000403c: e3a09001 mov r9, #1 a0004040: ea000005 b a000405c /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { a0004044: e1530008 cmp r3, r8 /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; a0004048: 059430b8 ldreq r3, [r4, #184] ; 0xb8 a000404c: 03c33010 biceq r3, r3, #16 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { a0004050: 0afffff8 beq a0004038 /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { a0004054: e3590000 cmp r9, #0 a0004058: 0a000014 beq a00040b0 /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { a000405c: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0004060: e2033030 and r3, r3, #48 ; 0x30 a0004064: e3530020 cmp r3, #32 a0004068: 1a000059 bne a00041d4 /* disable interrupts */ rtems_interrupt_disable(level); a000406c: ebfffa95 bl a0002ac8 <== NOT EXECUTED a0004070: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; a0004074: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004078: e3c33020 bic r3, r3, #32 <== NOT EXECUTED a000407c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a0004080: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a0004084: e3530000 cmp r3, #0 <== NOT EXECUTED a0004088: 0a000006 beq a00040a8 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); a000408c: e5942084 ldr r2, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( a0004090: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED a0004094: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a0004098: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a000409c: e0811002 add r1, r1, r2 <== NOT EXECUTED a00040a0: e3a02001 mov r2, #1 <== NOT EXECUTED a00040a4: e12fff33 blx r3 <== NOT EXECUTED a00040a8: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED a00040ac: ea000048 b a00041d4 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; a00040b0: e5940060 ldr r0, [r4, #96] ; 0x60 a00040b4: e5941064 ldr r1, [r4, #100] ; 0x64 a00040b8: e2800001 add r0, r0, #1 a00040bc: eb002cf1 bl a000f488 <__umodsi3> a00040c0: e1a07000 mov r7, r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); a00040c4: ebfffa7f bl a0002ac8 a00040c8: e1a0b000 mov fp, r0 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) a00040cc: e594305c ldr r3, [r4, #92] ; 0x5c a00040d0: e5940064 ldr r0, [r4, #100] ; 0x64 % tty->rawInBuf.Size) > tty->highwater) && a00040d4: e5941064 ldr r1, [r4, #100] ; 0x64 } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) a00040d8: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && a00040dc: e0800007 add r0, r0, r7 a00040e0: eb002ce8 bl a000f488 <__umodsi3> } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) a00040e4: e59430c0 ldr r3, [r4, #192] ; 0xc0 a00040e8: e1500003 cmp r0, r3 a00040ec: 9a000025 bls a0004188 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { a00040f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) % tty->rawInBuf.Size) > tty->highwater) && a00040f4: e3130001 tst r3, #1 <== NOT EXECUTED a00040f8: 1a000022 bne a0004188 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; a00040fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004100: e3833001 orr r3, r3, #1 <== NOT EXECUTED a0004104: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) a0004108: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED a000410c: e59f30ec ldr r3, [pc, #236] ; a0004200 <== NOT EXECUTED a0004110: e0023003 and r3, r2, r3 <== NOT EXECUTED a0004114: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED a0004118: 1a00000e bne a0004158 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || a000411c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004120: e3130020 tst r3, #32 <== NOT EXECUTED a0004124: 1a000002 bne a0004134 <== NOT EXECUTED a0004128: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a000412c: e3530000 cmp r3, #0 <== NOT EXECUTED a0004130: 1a000014 bne a0004188 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; a0004134: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, a0004138: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a000413c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; a0004140: e3833002 orr r3, r3, #2 <== NOT EXECUTED a0004144: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, a0004148: e3a02001 mov r2, #1 <== NOT EXECUTED a000414c: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a0004150: e12fff33 blx r3 <== NOT EXECUTED a0004154: ea00000b b a0004188 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { a0004158: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a000415c: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED a0004160: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED a0004164: 1a000007 bne a0004188 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; a0004168: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a000416c: e3833004 orr r3, r3, #4 <== NOT EXECUTED a0004170: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { a0004174: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED a0004178: e3530000 cmp r3, #0 <== NOT EXECUTED a000417c: 0a000001 beq a0004188 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); a0004180: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0004184: e12fff33 blx r3 <== NOT EXECUTED a0004188: e129f00b msr CPSR_fc, fp } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { a000418c: e594305c ldr r3, [r4, #92] ; 0x5c a0004190: e1570003 cmp r7, r3 dropped++; a0004194: 02855001 addeq r5, r5, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { a0004198: 0a00000d beq a00041d4 dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; a000419c: e5943058 ldr r3, [r4, #88] ; 0x58 a00041a0: e7c38007 strb r8, [r3, r7] tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { a00041a4: e59430e4 ldr r3, [r4, #228] ; 0xe4 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; a00041a8: e5847060 str r7, [r4, #96] ; 0x60 /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { a00041ac: e3530000 cmp r3, #0 a00041b0: 1a000007 bne a00041d4 a00041b4: e59430dc ldr r3, [r4, #220] ; 0xdc a00041b8: e3530000 cmp r3, #0 a00041bc: 0a000004 beq a00041d4 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); a00041c0: e59d0000 ldr r0, [sp] <== NOT EXECUTED a00041c4: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED a00041c8: e12fff33 blx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; a00041cc: e3a03001 mov r3, #1 <== NOT EXECUTED a00041d0: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED a00041d4: e24aa001 sub sl, sl, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { a00041d8: e35a0000 cmp sl, #0 a00041dc: 1affff88 bne a0004004 } } } } tty->rawInBufDropped += dropped; a00041e0: e5943078 ldr r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); a00041e4: e5940068 ldr r0, [r4, #104] ; 0x68 } } } } tty->rawInBufDropped += dropped; a00041e8: e0833005 add r3, r3, r5 a00041ec: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); a00041f0: eb000358 bl a0004f58 return dropped; } a00041f4: e1a00005 mov r0, r5 a00041f8: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0003140 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003140: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { a0003144: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003148: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; a000314c: e3a01000 mov r1, #0 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; a0003150: e5907008 ldr r7, [r0, #8] rtems_status_code sc; args->ioctl_return = 0; a0003154: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { a0003158: e1a05000 mov r5, r0 struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a000315c: e1a02001 mov r2, r1 a0003160: e5940018 ldr r0, [r4, #24] a0003164: eb000735 bl a0004e40 if (sc != RTEMS_SUCCESSFUL) { a0003168: e2506000 subs r6, r0, #0 a000316c: 1a0000d0 bne a00034b4 args->ioctl_return = sc; return sc; } switch (args->command) { a0003170: e5953004 ldr r3, [r5, #4] a0003174: e3530004 cmp r3, #4 a0003178: 0a0000a6 beq a0003418 a000317c: 8a000005 bhi a0003198 a0003180: e3530002 cmp r3, #2 a0003184: 0a000028 beq a000322c a0003188: 8a00009b bhi a00033fc a000318c: e3530001 cmp r3, #1 a0003190: 1a000010 bne a00031d8 a0003194: ea00001a b a0003204 a0003198: e59f2320 ldr r2, [pc, #800] ; a00034c0 a000319c: e1530002 cmp r3, r2 a00031a0: 0a0000b6 beq a0003480 a00031a4: 8a000002 bhi a00031b4 a00031a8: e3530005 cmp r3, #5 a00031ac: 1a000009 bne a00031d8 a00031b0: ea000094 b a0003408 a00031b4: e59f2308 ldr r2, [pc, #776] ; a00034c4 a00031b8: e1530002 cmp r3, r2 if (rtems_termios_linesw[tty->t_line].l_open != NULL) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; a00031bc: 05953008 ldreq r3, [r5, #8] a00031c0: 059420cc ldreq r2, [r4, #204] ; 0xcc a00031c4: 05832000 streq r2, [r3] sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { a00031c8: 0a0000b7 beq a00034ac a00031cc: e2822105 add r2, r2, #1073741825 ; 0x40000001 a00031d0: e1530002 cmp r3, r2 a00031d4: 0a000093 beq a0003428 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { a00031d8: e59420cc ldr r2, [r4, #204] ; 0xcc a00031dc: e59f32e4 ldr r3, [pc, #740] ; a00034c8 a00031e0: e0833282 add r3, r3, r2, lsl #5 a00031e4: e5933018 ldr r3, [r3, #24] a00031e8: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; a00031ec: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { a00031f0: 0a0000ad beq a00034ac sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); a00031f4: e1a00004 mov r0, r4 a00031f8: e1a01005 mov r1, r5 a00031fc: e12fff33 blx r3 a0003200: ea00009c b a0003478 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; a0003204: e5957008 ldr r7, [r5, #8] a0003208: e284c030 add ip, r4, #48 ; 0x30 a000320c: e8bc000f ldm ip!, {r0, r1, r2, r3} a0003210: e1a0e007 mov lr, r7 a0003214: e8ae000f stmia lr!, {r0, r1, r2, r3} a0003218: e8bc000f ldm ip!, {r0, r1, r2, r3} a000321c: e8ae000f stmia lr!, {r0, r1, r2, r3} a0003220: e59c3000 ldr r3, [ip] a0003224: e58e3000 str r3, [lr] break; a0003228: ea00009f b a00034ac case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; a000322c: e595e008 ldr lr, [r5, #8] a0003230: e284c030 add ip, r4, #48 ; 0x30 a0003234: e8be000f ldm lr!, {r0, r1, r2, r3} a0003238: e8ac000f stmia ip!, {r0, r1, r2, r3} a000323c: e8be000f ldm lr!, {r0, r1, r2, r3} a0003240: e8ac000f stmia ip!, {r0, r1, r2, r3} a0003244: e59e3000 ldr r3, [lr] a0003248: 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) && a000324c: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003250: e3130c02 tst r3, #512 ; 0x200 a0003254: 0a000018 beq a00032bc !(tty->termios.c_iflag & IXON)) { a0003258: e5943030 ldr r3, [r4, #48] ; 0x30 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && a000325c: e3130b01 tst r3, #1024 ; 0x400 a0003260: 1a000015 bne a00032bc !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); a0003264: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003268: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED a000326c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { a0003270: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003274: e3130020 tst r3, #32 <== NOT EXECUTED a0003278: 0a00000f beq a00032bc <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); a000327c: ebfffe11 bl a0002ac8 <== NOT EXECUTED a0003280: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; a0003284: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003288: e3c33020 bic r3, r3, #32 <== NOT EXECUTED a000328c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a0003290: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a0003294: e3530000 cmp r3, #0 <== NOT EXECUTED a0003298: 0a000006 beq a00032b8 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); a000329c: e5942084 ldr r2, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( a00032a0: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED a00032a4: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a00032a8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a00032ac: e0811002 add r1, r1, r2 <== NOT EXECUTED a00032b0: e3a02001 mov r2, #1 <== NOT EXECUTED a00032b4: e12fff33 blx r3 <== NOT EXECUTED a00032b8: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { a00032bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 a00032c0: e3130b01 tst r3, #1024 ; 0x400 a00032c4: 0a000008 beq a00032ec a00032c8: e5943030 ldr r3, [r4, #48] ; 0x30 a00032cc: e3130a01 tst r3, #4096 ; 0x1000 a00032d0: 1a000005 bne a00032ec /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); a00032d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00032d8: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED a00032dc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); a00032e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00032e4: e3c33002 bic r3, r3, #2 <== NOT EXECUTED a00032e8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { a00032ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 a00032f0: e3130c01 tst r3, #256 ; 0x100 a00032f4: 0a000010 beq a000333c a00032f8: e5943038 ldr r3, [r4, #56] ; 0x38 a00032fc: e3530000 cmp r3, #0 a0003300: ba00000d blt a000333c /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); a0003304: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003308: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED a000330c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { a0003310: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003314: e3130004 tst r3, #4 <== NOT EXECUTED a0003318: 0a000004 beq a0003330 <== NOT EXECUTED a000331c: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED a0003320: e3530000 cmp r3, #0 <== NOT EXECUTED a0003324: 0a000001 beq a0003330 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); a0003328: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a000332c: e12fff33 blx r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); a0003330: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003334: e3c33004 bic r3, r3, #4 <== NOT EXECUTED a0003338: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { a000333c: e5943038 ldr r3, [r4, #56] ; 0x38 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { a0003340: e594703c ldr r7, [r4, #60] ; 0x3c /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { a0003344: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; a0003348: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 a000334c: b3833c01 orrlt r3, r3, #256 ; 0x100 a0003350: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { a0003354: e5943030 ldr r3, [r4, #48] ; 0x30 a0003358: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; a000335c: 159420b8 ldrne r2, [r4, #184] ; 0xb8 a0003360: 13822b01 orrne r2, r2, #1024 ; 0x400 a0003364: 158420b8 strne r2, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { a0003368: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; a000336c: 159430b8 ldrne r3, [r4, #184] ; 0xb8 a0003370: 13833c02 orrne r3, r3, #512 ; 0x200 a0003374: 158430b8 strne r3, [r4, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { a0003378: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; a000337c: 13a03000 movne r3, #0 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { a0003380: 1a000013 bne a00033d4 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * a0003384: e5d48046 ldrb r8, [r4, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; a0003388: eb000518 bl a00047f0 a000338c: e3a0100a mov r1, #10 a0003390: e0000098 mul r0, r8, r0 a0003394: eb002fa3 bl a000f228 <__aeabi_uidiv> if (tty->termios.c_cc[VTIME]) { a0003398: e5d43046 ldrb r3, [r4, #70] ; 0x46 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * a000339c: e5840054 str r0, [r4, #84] ; 0x54 a00033a0: e5d42047 ldrb r2, [r4, #71] ; 0x47 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { a00033a4: e3530000 cmp r3, #0 a00033a8: 0a000005 beq a00033c4 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a00033ac: e3520000 cmp r2, #0 } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; a00033b0: e5840070 str r0, [r4, #112] ; 0x70 if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a00033b4: 13a00000 movne r0, #0 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; a00033b8: e584706c str r7, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a00033bc: e5840074 str r0, [r4, #116] ; 0x74 a00033c0: ea000006 b a00033e0 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { a00033c4: e3520000 cmp r2, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; a00033c8: 03a03001 moveq r3, #1 a00033cc: 0584306c streq r3, [r4, #108] ; 0x6c if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { a00033d0: 0a000002 beq a00033e0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; a00033d4: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; a00033d8: e5843070 str r3, [r4, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a00033dc: e5843074 str r3, [r4, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) a00033e0: e59430a8 ldr r3, [r4, #168] ; 0xa8 a00033e4: e3530000 cmp r3, #0 a00033e8: 0a00002f beq a00034ac (*tty->device.setAttributes)(tty->minor, &tty->termios); a00033ec: e5940010 ldr r0, [r4, #16] a00033f0: e2841030 add r1, r4, #48 ; 0x30 a00033f4: e12fff33 blx r3 a00033f8: ea00002b b a00034ac break; case RTEMS_IO_TCDRAIN: drainOutput (tty); a00033fc: e1a00004 mov r0, r4 a0003400: ebfffdb4 bl a0002ad8 break; a0003404: ea000028 b a00034ac case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; a0003408: e897000c ldm r7, {r2, r3} a000340c: e58420d4 str r2, [r4, #212] ; 0xd4 a0003410: e58430d8 str r3, [r4, #216] ; 0xd8 break; a0003414: ea000024 b a00034ac case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; a0003418: e897000c ldm r7, {r2, r3} a000341c: e58420dc str r2, [r4, #220] ; 0xdc a0003420: e58430e0 str r3, [r4, #224] ; 0xe0 break; a0003424: ea000020 b a00034ac #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { a0003428: e59420cc ldr r2, [r4, #204] ; 0xcc a000342c: e59f3094 ldr r3, [pc, #148] ; a00034c8 a0003430: e0833282 add r3, r3, r2, lsl #5 a0003434: e5933004 ldr r3, [r3, #4] a0003438: e3530000 cmp r3, #0 a000343c: 0a000002 beq a000344c sc = rtems_termios_linesw[tty->t_line].l_close(tty); a0003440: e1a00004 mov r0, r4 a0003444: e12fff33 blx r3 a0003448: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); a000344c: e5953008 ldr r3, [r5, #8] tty->t_sc = NULL; /* ensure that no more valid data */ a0003450: e3a02000 mov r2, #0 * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); a0003454: e5933000 ldr r3, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ a0003458: e58420d0 str r2, [r4, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { a000345c: e59f2064 ldr r2, [pc, #100] ; a00034c8 * 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); a0003460: e58430cc str r3, [r4, #204] ; 0xcc tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { a0003464: e7923283 ldr r3, [r2, r3, lsl #5] a0003468: e3530000 cmp r3, #0 a000346c: 0a00000e beq a00034ac sc = rtems_termios_linesw[tty->t_line].l_open(tty); a0003470: e1a00004 mov r0, r4 a0003474: e12fff33 blx r3 a0003478: e1a06000 mov r6, r0 a000347c: ea00000a b a00034ac case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; a0003480: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED a0003484: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; a0003488: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED a000348c: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) a0003490: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; a0003494: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; a0003498: e0611000 rsb r1, r1, r0 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; a000349c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; a00034a0: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED a00034a4: e0813003 add r3, r1, r3 <== NOT EXECUTED a00034a8: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); a00034ac: e5940018 ldr r0, [r4, #24] a00034b0: eb0006a8 bl a0004f58 args->ioctl_return = sc; a00034b4: e585600c str r6, [r5, #12] return sc; } a00034b8: e1a00006 mov r0, r6 a00034bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a00034cc : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { a00034cc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} a00034d0: e1a04002 mov r4, r2 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { a00034d4: e59220b4 ldr r2, [r2, #180] ; 0xb4 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { a00034d8: e1a03000 mov r3, r0 a00034dc: e1a06001 mov r6, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { a00034e0: e3520000 cmp r2, #0 */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { const unsigned char *buf = _buf; a00034e4: e1a08000 mov r8, r0 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; a00034e8: 15945080 ldrne r5, [r4, #128] ; 0x80 * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; a00034ec: 13a0a002 movne sl, #2 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; a00034f0: 13a09001 movne r9, #1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { a00034f4: 1a000032 bne a00035c4 (*tty->device.write)(tty->minor, (void *)buf, len); a00034f8: e594c0a4 ldr ip, [r4, #164] ; 0xa4 a00034fc: e5940010 ldr r0, [r4, #16] a0003500: e1a01003 mov r1, r3 a0003504: e1a02006 mov r2, r6 a0003508: e12fff3c blx ip return; a000350c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; a0003510: e5941088 ldr r1, [r4, #136] ; 0x88 a0003514: e2850001 add r0, r5, #1 a0003518: eb002fda bl a000f488 <__umodsi3> a000351c: e1a05000 mov r5, r0 rtems_interrupt_disable (level); a0003520: ebfffd68 bl a0002ac8 a0003524: e1a07000 mov r7, r0 while (newHead == tty->rawOutBuf.Tail) { a0003528: ea00000a b a0003558 tty->rawOutBufState = rob_wait; a000352c: e584a094 str sl, [r4, #148] ; 0x94 a0003530: e129f007 msr CPSR_fc, r7 rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( a0003534: e3a01000 mov r1, #0 a0003538: e594008c ldr r0, [r4, #140] ; 0x8c a000353c: e1a02001 mov r2, r1 a0003540: eb00063e bl a0004e40 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0003544: e3500000 cmp r0, #0 a0003548: 0a000000 beq a0003550 rtems_fatal_error_occurred (sc); a000354c: eb0007d1 bl a0005498 <== NOT EXECUTED rtems_interrupt_disable (level); a0003550: ebfffd5c bl a0002ac8 a0003554: e1a07000 mov r7, r0 * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { a0003558: e5943084 ldr r3, [r4, #132] ; 0x84 a000355c: e1550003 cmp r5, r3 a0003560: 0afffff1 beq a000352c tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; a0003564: e5943080 ldr r3, [r4, #128] ; 0x80 a0003568: e4d81001 ldrb r1, [r8], #1 a000356c: e594207c ldr r2, [r4, #124] ; 0x7c a0003570: e7c21003 strb r1, [r2, r3] tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { a0003574: e5943094 ldr r3, [r4, #148] ; 0x94 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; a0003578: e5845080 str r5, [r4, #128] ; 0x80 if (tty->rawOutBufState == rob_idle) { a000357c: e3530000 cmp r3, #0 a0003580: 1a00000d bne a00035bc /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { a0003584: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003588: e3130010 tst r3, #16 (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; a000358c: 159430b8 ldrne r3, [r4, #184] ; 0xb8 a0003590: 13833020 orrne r3, r3, #32 a0003594: 158430b8 strne r3, [r4, #184] ; 0xb8 } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { a0003598: 1a000006 bne a00035b8 (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); a000359c: e5942084 ldr r2, [r4, #132] ; 0x84 tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, a00035a0: e594107c ldr r1, [r4, #124] ; 0x7c a00035a4: e59430a4 ldr r3, [r4, #164] ; 0xa4 a00035a8: e5940010 ldr r0, [r4, #16] a00035ac: e0811002 add r1, r1, r2 a00035b0: e3a02001 mov r2, #1 a00035b4: e12fff33 blx r3 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; a00035b8: e5849094 str r9, [r4, #148] ; 0x94 a00035bc: e129f007 msr CPSR_fc, r7 } rtems_interrupt_enable (level); len--; a00035c0: e2466001 sub r6, r6, #1 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { a00035c4: e3560000 cmp r6, #0 a00035c8: 1affffd0 bne a0003510 a00035cc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a0003c24 : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003c24: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { a0003c28: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003c2c: e5934034 ldr r4, [r3, #52] ; 0x34 uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0003c30: e3a01000 mov r1, #0 rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; a0003c34: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; a0003c38: e590b00c ldr fp, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { a0003c3c: e1a05000 mov r5, r0 struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0003c40: e1a02001 mov r2, r1 a0003c44: e5940014 ldr r0, [r4, #20] a0003c48: eb00047c bl a0004e40 if (sc != RTEMS_SUCCESSFUL) a0003c4c: e2507000 subs r7, r0, #0 a0003c50: 1a0000bd bne a0003f4c return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { a0003c54: e59420cc ldr r2, [r4, #204] ; 0xcc a0003c58: e59f32f4 ldr r3, [pc, #756] ; a0003f54 a0003c5c: e0833282 add r3, r3, r2, lsl #5 a0003c60: e5933008 ldr r3, [r3, #8] a0003c64: e3530000 cmp r3, #0 a0003c68: 0a000004 beq a0003c80 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); a0003c6c: e1a00004 mov r0, r4 a0003c70: e1a01005 mov r1, r5 a0003c74: e12fff33 blx r3 a0003c78: e1a07000 mov r7, r0 a0003c7c: ea0000ae b a0003f3c tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { a0003c80: e5942024 ldr r2, [r4, #36] ; 0x24 a0003c84: e5943020 ldr r3, [r4, #32] a0003c88: e1520003 cmp r2, r3 a0003c8c: 1a0000a1 bne a0003f18 tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; a0003c90: e5943028 ldr r3, [r4, #40] ; 0x28 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; a0003c94: e5847020 str r7, [r4, #32] a0003c98: e5847024 str r7, [r4, #36] ; 0x24 tty->read_start_column = tty->column; a0003c9c: e584302c str r3, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && a0003ca0: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0003ca4: e3530000 cmp r3, #0 a0003ca8: 0a00003b beq a0003d9c a0003cac: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0003cb0: e3530000 cmp r3, #0 a0003cb4: 1a000038 bne a0003d9c static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { a0003cb8: e594303c ldr r3, [r4, #60] ; 0x3c a0003cbc: e3130002 tst r3, #2 a0003cc0: 0a00000d beq a0003cfc for (;;) { n = (*tty->device.pollRead)(tty->minor); a0003cc4: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0003cc8: e5940010 ldr r0, [r4, #16] a0003ccc: e12fff33 blx r3 if (n < 0) { a0003cd0: e3500000 cmp r0, #0 a0003cd4: aa000002 bge a0003ce4 rtems_task_wake_after (1); a0003cd8: e3a00001 mov r0, #1 a0003cdc: eb000584 bl a00052f4 a0003ce0: eafffff7 b a0003cc4 } else { if (siproc (n, tty)) a0003ce4: e20000ff and r0, r0, #255 ; 0xff a0003ce8: e1a01004 mov r1, r4 a0003cec: ebffff88 bl a0003b14 a0003cf0: e3500000 cmp r0, #0 a0003cf4: 0afffff2 beq a0003cc4 a0003cf8: ea000086 b a0003f18 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); a0003cfc: eb0002c3 bl a0004810 a0003d00: e1a06000 mov r6, r0 for (;;) { n = (*tty->device.pollRead)(tty->minor); a0003d04: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0003d08: e5940010 ldr r0, [r4, #16] a0003d0c: e12fff33 blx r3 if (n < 0) { a0003d10: e3500000 cmp r0, #0 a0003d14: aa000013 bge a0003d68 if (tty->termios.c_cc[VMIN]) { a0003d18: e5d43047 ldrb r3, [r4, #71] ; 0x47 a0003d1c: e3530000 cmp r3, #0 a0003d20: e5d43046 ldrb r3, [r4, #70] ; 0x46 a0003d24: 0a000005 beq a0003d40 if (tty->termios.c_cc[VTIME] && tty->ccount) { a0003d28: e3530000 cmp r3, #0 a0003d2c: 0a00000a beq a0003d5c a0003d30: e5943020 ldr r3, [r4, #32] a0003d34: e3530000 cmp r3, #0 a0003d38: 0a000007 beq a0003d5c a0003d3c: ea000001 b a0003d48 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) a0003d40: e3530000 cmp r3, #0 <== NOT EXECUTED a0003d44: 0a000073 beq a0003f18 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); a0003d48: eb0002b0 bl a0004810 if ((now - then) > tty->vtimeTicks) { a0003d4c: e5943054 ldr r3, [r4, #84] ; 0x54 a0003d50: e0660000 rsb r0, r6, r0 a0003d54: e1500003 cmp r0, r3 a0003d58: 8a00006e bhi a0003f18 break; } } rtems_task_wake_after (1); a0003d5c: e3a00001 mov r0, #1 a0003d60: eb000563 bl a00052f4 a0003d64: eaffffe6 b a0003d04 } else { siproc (n, tty); a0003d68: e20000ff and r0, r0, #255 ; 0xff a0003d6c: e1a01004 mov r1, r4 a0003d70: ebffff67 bl a0003b14 if (tty->ccount >= tty->termios.c_cc[VMIN]) a0003d74: e5d43047 ldrb r3, [r4, #71] ; 0x47 a0003d78: e5942020 ldr r2, [r4, #32] a0003d7c: e1520003 cmp r2, r3 a0003d80: aa000064 bge a0003f18 break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) a0003d84: e3530000 cmp r3, #0 a0003d88: 0affffdd beq a0003d04 a0003d8c: e5d43046 ldrb r3, [r4, #70] ; 0x46 a0003d90: e3530000 cmp r3, #0 a0003d94: 0affffda beq a0003d04 a0003d98: eaffffd7 b a0003cfc 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)( a0003d9c: e2842049 add r2, r4, #73 ; 0x49 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; a0003da0: e594a074 ldr sl, [r4, #116] ; 0x74 rtems_status_code sc; int wait = (int)1; a0003da4: e3a06001 mov r6, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { a0003da8: e59f91a8 ldr r9, [pc, #424] ; a0003f58 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)( a0003dac: e58d2000 str r2, [sp] a0003db0: ea000040 b a0003eb8 while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; a0003db4: e594005c ldr r0, [r4, #92] ; 0x5c a0003db8: e5941064 ldr r1, [r4, #100] ; 0x64 a0003dbc: e2800001 add r0, r0, #1 a0003dc0: eb002db0 bl a000f488 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; a0003dc4: e5943058 ldr r3, [r4, #88] ; 0x58 a0003dc8: e7d3a000 ldrb sl, [r3, r0] tty->rawInBuf.Head = newHead; a0003dcc: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) a0003dd0: e5943060 ldr r3, [r4, #96] ; 0x60 a0003dd4: e5942064 ldr r2, [r4, #100] ; 0x64 % tty->rawInBuf.Size) a0003dd8: e5941064 ldr r1, [r4, #100] ; 0x64 unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) a0003ddc: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) a0003de0: e0600003 rsb r0, r0, r3 a0003de4: eb002da7 bl a000f488 <__umodsi3> unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) a0003de8: e59430bc ldr r3, [r4, #188] ; 0xbc a0003dec: e1500003 cmp r0, r3 a0003df0: 2a00001f bcs a0003e74 % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; a0003df4: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003df8: e3c33001 bic r3, r3, #1 a0003dfc: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) a0003e00: e59420b8 ldr r2, [r4, #184] ; 0xb8 a0003e04: e59f3150 ldr r3, [pc, #336] ; a0003f5c a0003e08: e0023003 and r3, r2, r3 a0003e0c: e59f2148 ldr r2, [pc, #328] ; a0003f5c a0003e10: e1530002 cmp r3, r2 a0003e14: 1a00000b bne a0003e48 == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) a0003e18: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a0003e1c: e3530000 cmp r3, #0 <== NOT EXECUTED a0003e20: 0a000002 beq a0003e30 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { a0003e24: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003e28: e3130020 tst r3, #32 <== NOT EXECUTED a0003e2c: 0a000005 beq a0003e48 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( a0003e30: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a0003e34: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0003e38: e59d1000 ldr r1, [sp] <== NOT EXECUTED a0003e3c: e3a02001 mov r2, #1 <== NOT EXECUTED a0003e40: e12fff33 blx r3 <== NOT EXECUTED a0003e44: ea00000a b a0003e74 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { a0003e48: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003e4c: e3130c01 tst r3, #256 ; 0x100 a0003e50: 0a000007 beq a0003e74 tty->flow_ctrl &= ~FL_IRTSOFF; a0003e54: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003e58: e3c33004 bic r3, r3, #4 <== NOT EXECUTED a0003e5c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { a0003e60: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED a0003e64: e3530000 cmp r3, #0 <== NOT EXECUTED a0003e68: 0a000001 beq a0003e74 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); a0003e6c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0003e70: e12fff33 blx r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { a0003e74: e594303c ldr r3, [r4, #60] ; 0x3c a0003e78: e3130002 tst r3, #2 a0003e7c: 0a000005 beq a0003e98 if (siproc (c, tty)) a0003e80: e1a0000a mov r0, sl a0003e84: e1a01004 mov r1, r4 a0003e88: ebffff21 bl a0003b14 wait = 0; a0003e8c: e3500000 cmp r0, #0 a0003e90: 13a06000 movne r6, #0 a0003e94: ea000006 b a0003eb4 } else { siproc (c, tty); a0003e98: e1a0000a mov r0, sl <== NOT EXECUTED a0003e9c: e1a01004 mov r1, r4 <== NOT EXECUTED a0003ea0: ebffff1b bl a0003b14 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) a0003ea4: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED a0003ea8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; a0003eac: e1520003 cmp r2, r3 <== NOT EXECUTED a0003eb0: a3a06000 movge r6, #0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; a0003eb4: e594a070 ldr sl, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0003eb8: e594205c ldr r2, [r4, #92] ; 0x5c a0003ebc: e5943060 ldr r3, [r4, #96] ; 0x60 a0003ec0: e1520003 cmp r2, r3 a0003ec4: 0a000004 beq a0003edc (tty->ccount < (CBUFSIZE-1))) { a0003ec8: e5993008 ldr r3, [r9, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0003ecc: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { a0003ed0: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0003ed4: e1520003 cmp r2, r3 a0003ed8: baffffb5 blt a0003db4 } /* * Wait for characters */ if ( wait ) { a0003edc: e3560000 cmp r6, #0 a0003ee0: 0a00000c beq a0003f18 sc = rtems_semaphore_obtain( a0003ee4: e5940068 ldr r0, [r4, #104] ; 0x68 a0003ee8: e594106c ldr r1, [r4, #108] ; 0x6c a0003eec: e1a0200a mov r2, sl a0003ef0: eb0003d2 bl a0004e40 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) a0003ef4: e3500000 cmp r0, #0 a0003ef8: 0affffee beq a0003eb8 a0003efc: ea000005 b a0003f18 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; a0003f00: e594201c ldr r2, [r4, #28] count--; a0003f04: e2488001 sub r8, r8, #1 if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; a0003f08: e7d22003 ldrb r2, [r2, r3] a0003f0c: e2833001 add r3, r3, #1 a0003f10: e4cb2001 strb r2, [fp], #1 a0003f14: e5843024 str r3, [r4, #36] ; 0x24 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { a0003f18: e3580000 cmp r8, #0 a0003f1c: 0a000003 beq a0003f30 a0003f20: e5943024 ldr r3, [r4, #36] ; 0x24 a0003f24: e5942020 ldr r2, [r4, #32] a0003f28: e1530002 cmp r3, r2 a0003f2c: bafffff3 blt a0003f00 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; a0003f30: e5953010 ldr r3, [r5, #16] a0003f34: e0688003 rsb r8, r8, r3 a0003f38: e5858018 str r8, [r5, #24] tty->tty_rcvwakeup = 0; a0003f3c: e3a03000 mov r3, #0 a0003f40: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); a0003f44: e5940014 ldr r0, [r4, #20] a0003f48: eb000402 bl a0004f58 return sc; } a0003f4c: e1a00007 mov r0, r7 a0003f50: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000426c : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) a000426c: e59020b8 ldr r2, [r0, #184] ; 0xb8 a0004270: e59f31b8 ldr r3, [pc, #440] ; a0004430 * 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) { a0004274: e92d4070 push {r4, r5, r6, lr} int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) a0004278: e0023003 and r3, r2, r3 a000427c: e59f21b0 ldr r2, [pc, #432] ; a0004434 * 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) { a0004280: e1a04000 mov r4, r0 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) a0004284: e1530002 cmp r3, r2 a0004288: 1a00000c bne a00042c0 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); a000428c: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED a0004290: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED a0004294: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED a0004298: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED a000429c: e12fff33 blx r3 <== NOT EXECUTED rtems_interrupt_disable(level); a00042a0: ebfffa08 bl a0002ac8 <== NOT EXECUTED tty->t_dqlen--; a00042a4: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED a00042a8: e2433001 sub r3, r3, #1 <== NOT EXECUTED a00042ac: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; a00042b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00042b4: e3833002 orr r3, r3, #2 <== NOT EXECUTED a00042b8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED rtems_interrupt_enable(level); a00042bc: ea00000f b a0004300 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { a00042c0: e59030b8 ldr r3, [r0, #184] ; 0xb8 a00042c4: e2033003 and r3, r3, #3 a00042c8: e3530002 cmp r3, #2 a00042cc: 1a00000e bne a000430c * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); a00042d0: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED a00042d4: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED a00042d8: e3a02001 mov r2, #1 <== NOT EXECUTED a00042dc: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED a00042e0: e12fff33 blx r3 <== NOT EXECUTED rtems_interrupt_disable(level); a00042e4: ebfff9f7 bl a0002ac8 <== NOT EXECUTED tty->t_dqlen--; a00042e8: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED a00042ec: e2433001 sub r3, r3, #1 <== NOT EXECUTED a00042f0: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; a00042f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00042f8: e3c33002 bic r3, r3, #2 <== NOT EXECUTED a00042fc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004300: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; a0004304: e3a05001 mov r5, #1 <== NOT EXECUTED a0004308: ea000046 b a0004428 <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { a000430c: e5902080 ldr r2, [r0, #128] ; 0x80 a0004310: e5903084 ldr r3, [r0, #132] ; 0x84 a0004314: e1520003 cmp r2, r3 a0004318: 1a000005 bne a0004334 /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { a000431c: e5903094 ldr r3, [r0, #148] ; 0x94 a0004320: e3530002 cmp r3, #2 a0004324: 1a00003e bne a0004424 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); a0004328: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED a000432c: eb000309 bl a0004f58 <== NOT EXECUTED a0004330: ea00003b b a0004424 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); a0004334: ebfff9e3 bl a0002ac8 len = tty->t_dqlen; tty->t_dqlen = 0; a0004338: e3a03000 mov r3, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; a000433c: e5942090 ldr r2, [r4, #144] ; 0x90 tty->t_dqlen = 0; a0004340: e5843090 str r3, [r4, #144] ; 0x90 a0004344: e129f000 msr CPSR_fc, r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; a0004348: e5943084 ldr r3, [r4, #132] ; 0x84 a000434c: e5941088 ldr r1, [r4, #136] ; 0x88 a0004350: e0820003 add r0, r2, r3 a0004354: eb002c4b bl a000f488 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { a0004358: e5943094 ldr r3, [r4, #148] ; 0x94 rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; a000435c: e1a06000 mov r6, r0 tty->rawOutBuf.Tail = newTail; a0004360: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { a0004364: e3530002 cmp r3, #2 a0004368: 1a000001 bne a0004374 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); a000436c: e594008c ldr r0, [r4, #140] ; 0x8c a0004370: eb0002f8 bl a0004f58 } if (newTail == tty->rawOutBuf.Head) { a0004374: e5943080 ldr r3, [r4, #128] ; 0x80 a0004378: e1560003 cmp r6, r3 a000437c: 1a000009 bne a00043a8 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a0004380: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; a0004384: e3a05000 mov r5, #0 a0004388: e5845094 str r5, [r4, #148] ; 0x94 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a000438c: e1530005 cmp r3, r5 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; a0004390: 01a05003 moveq r5, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a0004394: 0a000020 beq a000441c (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); a0004398: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED a000439c: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED a00043a0: e12fff33 blx r3 <== NOT EXECUTED a00043a4: ea00001c b a000441c <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) a00043a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 a00043ac: e2033e21 and r3, r3, #528 ; 0x210 a00043b0: e3530e21 cmp r3, #528 ; 0x210 a00043b4: 1a000008 bne a00043dc == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); a00043b8: ebfff9c2 bl a0002ac8 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; a00043bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00043c0: e3833020 orr r3, r3, #32 <== NOT EXECUTED a00043c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ a00043c8: e3a03001 mov r3, #1 <== NOT EXECUTED a00043cc: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED a00043d0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; a00043d4: e3a05000 mov r5, #0 <== NOT EXECUTED a00043d8: ea00000f b a000441c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) a00043dc: e5943080 ldr r3, [r4, #128] ; 0x80 /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( a00043e0: e594107c ldr r1, [r4, #124] ; 0x7c a00043e4: e5940010 ldr r0, [r4, #16] nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) a00043e8: e1560003 cmp r6, r3 nToSend = tty->rawOutBuf.Size - newTail; a00043ec: 85945088 ldrhi r5, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; a00043f0: 95945080 ldrls r5, [r4, #128] ; 0x80 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { a00043f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( a00043f8: e0811006 add r1, r1, r6 * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; a00043fc: e0665005 rsb r5, r6, r5 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { a0004400: e3130c06 tst r3, #1536 ; 0x600 nToSend = 1; a0004404: 13a05001 movne r5, #1 } tty->rawOutBufState = rob_busy; /*apm*/ a0004408: e3a03001 mov r3, #1 a000440c: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( a0004410: e1a02005 mov r2, r5 a0004414: e59430a4 ldr r3, [r4, #164] ; 0xa4 a0004418: e12fff33 blx r3 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ a000441c: e5846084 str r6, [r4, #132] ; 0x84 a0004420: ea000000 b a0004428 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; a0004424: e3a05000 mov r5, #0 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } a0004428: e1a00005 mov r0, r5 a000442c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a0004204 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { a0004204: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} a0004208: e1a04000 mov r4, r0 while (1) { /* * wait for rtems event */ rtems_event_receive( a000420c: e3a05000 mov r5, #0 if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); a0004210: e28d6007 add r6, sp, #7 while (1) { /* * wait for rtems event */ rtems_event_receive( a0004214: e1a0300d mov r3, sp a0004218: e3a00003 mov r0, #3 a000421c: e3a01002 mov r1, #2 a0004220: e3a02000 mov r2, #0 a0004224: eb000197 bl a0004888 (TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { a0004228: e59d3000 ldr r3, [sp] a000422c: e3130001 tst r3, #1 a0004230: 0a000002 beq a0004240 tty->rxTaskId = 0; a0004234: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); a0004238: e1a00005 mov r0, r5 <== NOT EXECUTED a000423c: eb0003be bl a000513c <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); a0004240: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0004244: e5940010 ldr r0, [r4, #16] a0004248: e12fff33 blx r3 if (c != EOF) { a000424c: e3700001 cmn r0, #1 a0004250: 0affffef beq a0004214 /* * pollRead did call enqueue on its own */ c_buf = c; a0004254: e5cd0007 strb r0, [sp, #7] rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); a0004258: e1a01006 mov r1, r6 a000425c: e1a00004 mov r0, r4 a0004260: e3a02001 mov r2, #1 a0004264: ebffff40 bl a0003f6c a0004268: eaffffe9 b a0004214 =============================================================================== a0004438 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { a0004438: e92d40f1 push {r0, r4, r5, r6, r7, lr} } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a000443c: e59f6058 ldr r6, [pc, #88] ; a000449c /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { a0004440: e1a04000 mov r4, r0 while (1) { /* * wait for rtems event */ rtems_event_receive( a0004444: e3a05000 mov r5, #0 a0004448: e1a0300d mov r3, sp a000444c: e3a00003 mov r0, #3 a0004450: e3a01002 mov r1, #2 a0004454: e3a02000 mov r2, #0 a0004458: eb00010a bl a0004888 (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) { a000445c: e59d3000 ldr r3, [sp] a0004460: e3130001 tst r3, #1 a0004464: 0a000002 beq a0004474 tty->txTaskId = 0; a0004468: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); a000446c: e1a00005 mov r0, r5 <== NOT EXECUTED a0004470: eb000331 bl a000513c <== NOT EXECUTED } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a0004474: e59430cc ldr r3, [r4, #204] ; 0xcc a0004478: e0863283 add r3, r6, r3, lsl #5 a000447c: e5933014 ldr r3, [r3, #20] a0004480: e3530000 cmp r3, #0 a0004484: 0a000001 beq a0004490 rtems_termios_linesw[tty->t_line].l_start(tty); a0004488: e1a00004 mov r0, r4 <== NOT EXECUTED a000448c: e12fff33 blx r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); a0004490: e1a00004 mov r0, r4 a0004494: ebffff74 bl a000426c } a0004498: eaffffea b a0004448 =============================================================================== a0003b70 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003b70: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { a0003b74: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003b78: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0003b7c: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { a0003b80: e1a04000 mov r4, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0003b84: e1a02001 mov r2, r1 a0003b88: e5950018 ldr r0, [r5, #24] a0003b8c: eb0004ab bl a0004e40 if (sc != RTEMS_SUCCESSFUL) a0003b90: e2506000 subs r6, r0, #0 a0003b94: 1a00001f bne a0003c18 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { a0003b98: e59520cc ldr r2, [r5, #204] ; 0xcc a0003b9c: e59f307c ldr r3, [pc, #124] ; a0003c20 a0003ba0: e0833282 add r3, r3, r2, lsl #5 a0003ba4: e593300c ldr r3, [r3, #12] a0003ba8: e3530000 cmp r3, #0 a0003bac: 0a000004 beq a0003bc4 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); a0003bb0: e1a00005 mov r0, r5 a0003bb4: e1a01004 mov r1, r4 a0003bb8: e12fff33 blx r3 a0003bbc: e1a06000 mov r6, r0 a0003bc0: ea000012 b a0003c10 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { a0003bc4: e5953034 ldr r3, [r5, #52] ; 0x34 a0003bc8: e3130001 tst r3, #1 uint32_t count = args->count; a0003bcc: 15947010 ldrne r7, [r4, #16] char *buffer = args->buffer; a0003bd0: 1594800c ldrne r8, [r4, #12] if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { a0003bd4: 1a000004 bne a0003bec a0003bd8: ea000006 b a0003bf8 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); a0003bdc: e4d80001 ldrb r0, [r8], #1 a0003be0: e1a01005 mov r1, r5 a0003be4: ebfffe79 bl a00035d0 a0003be8: e2477001 sub r7, r7, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) a0003bec: e3570000 cmp r7, #0 a0003bf0: 1afffff9 bne a0003bdc a0003bf4: ea000003 b a0003c08 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); a0003bf8: e594000c ldr r0, [r4, #12] <== NOT EXECUTED a0003bfc: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED a0003c00: e1a02005 mov r2, r5 <== NOT EXECUTED a0003c04: ebfffe30 bl a00034cc <== NOT EXECUTED args->bytes_moved = args->count; a0003c08: e5943010 ldr r3, [r4, #16] a0003c0c: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); a0003c10: e5950018 ldr r0, [r5, #24] a0003c14: eb0004cf bl a0004f58 return sc; } a0003c18: e1a00006 mov r0, r6 a0003c1c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a0006188 : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { a0006188: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { a000618c: e92d41f0 push {r4, r5, r6, r7, r8, lr} a0006190: e1a05000 mov r5, r0 a0006194: e1a08001 mov r8, r1 a0006198: e1a04002 mov r4, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { a000619c: 0a00000e beq a00061dc if (rtems_panic_in_progress++) a00061a0: e59f212c ldr r2, [pc, #300] ; a00062d4 a00061a4: e5923000 ldr r3, [r2] a00061a8: e2831001 add r1, r3, #1 a00061ac: e3530000 cmp r3, #0 a00061b0: e5821000 str r1, [r2] a00061b4: 0a000003 beq a00061c8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a00061b8: e59f3118 ldr r3, [pc, #280] ; a00062d8 <== NOT EXECUTED a00061bc: e5932000 ldr r2, [r3] <== NOT EXECUTED a00061c0: e2822001 add r2, r2, #1 <== NOT EXECUTED a00061c4: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) a00061c8: e59f3104 ldr r3, [pc, #260] ; a00062d4 a00061cc: e5933000 ldr r3, [r3] a00061d0: e3530002 cmp r3, #2 return 0; a00061d4: c3a04000 movgt r4, #0 if (error_flag & RTEMS_ERROR_PANIC) { if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) a00061d8: ca00003b bgt a00062cc return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ a00061dc: e59f30f8 ldr r3, [pc, #248] ; a00062dc status = error_flag & ~RTEMS_ERROR_MASK; a00061e0: e3c56207 bic r6, r5, #1879048192 ; 0x70000000 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ a00061e4: e5933000 ldr r3, [r3] a00061e8: e5930008 ldr r0, [r3, #8] a00061ec: eb002bc2 bl a00110fc status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ a00061f0: e2155101 ands r5, r5, #1073741824 ; 0x40000000 a00061f4: 0a000001 beq a0006200 local_errno = errno; a00061f8: eb002ac8 bl a0010d20 <__errno> a00061fc: e5905000 ldr r5, [r0] #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); a0006200: e59f70d4 ldr r7, [pc, #212] ; a00062dc a0006204: e1a02004 mov r2, r4 a0006208: e1a01008 mov r1, r8 a000620c: e5973000 ldr r3, [r7] a0006210: e593000c ldr r0, [r3, #12] a0006214: eb00442a bl a00172c4 if (status) a0006218: e3560000 cmp r6, #0 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); a000621c: e1a04000 mov r4, r0 if (status) a0006220: 0a000008 beq a0006248 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); a0006224: e5973000 ldr r3, [r7] a0006228: e1a00006 mov r0, r6 a000622c: e593700c ldr r7, [r3, #12] a0006230: ebffffd0 bl a0006178 a0006234: e59f10a4 ldr r1, [pc, #164] ; a00062e0 a0006238: e1a02000 mov r2, r0 a000623c: e1a00007 mov r0, r7 a0006240: eb002c93 bl a0011494 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += a0006244: e0844000 add r4, r4, r0 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { a0006248: e3550000 cmp r5, #0 a000624c: 0a000015 beq a00062a8 if ((local_errno > 0) && *strerror(local_errno)) a0006250: da00000d ble a000628c a0006254: e1a00005 mov r0, r5 a0006258: eb002f90 bl a00120a0 a000625c: e5d03000 ldrb r3, [r0] a0006260: e3530000 cmp r3, #0 a0006264: 0a000008 beq a000628c chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); a0006268: e59f306c ldr r3, [pc, #108] ; a00062dc a000626c: e1a00005 mov r0, r5 a0006270: e5933000 ldr r3, [r3] a0006274: e593600c ldr r6, [r3, #12] a0006278: eb002f88 bl a00120a0 a000627c: e59f1060 ldr r1, [pc, #96] ; a00062e4 a0006280: e1a02000 mov r2, r0 a0006284: e1a00006 mov r0, r6 a0006288: ea000004 b a00062a0 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); a000628c: e59f3048 ldr r3, [pc, #72] ; a00062dc a0006290: e59f1050 ldr r1, [pc, #80] ; a00062e8 a0006294: e1a02005 mov r2, r5 a0006298: e5933000 ldr r3, [r3] a000629c: e593000c ldr r0, [r3, #12] a00062a0: eb002c7b bl a0011494 a00062a4: e0844000 add r4, r4, r0 } chars_written += fprintf(stderr, "\n"); a00062a8: e59f502c ldr r5, [pc, #44] ; a00062dc a00062ac: e59f1038 ldr r1, [pc, #56] ; a00062ec a00062b0: e5953000 ldr r3, [r5] a00062b4: e593000c ldr r0, [r3, #12] a00062b8: eb002c75 bl a0011494 (void) fflush(stderr); a00062bc: e5953000 ldr r3, [r5] chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); a00062c0: e0804004 add r4, r0, r4 (void) fflush(stderr); a00062c4: e593000c ldr r0, [r3, #12] a00062c8: eb002b8b bl a00110fc return chars_written; } a00062cc: e1a00004 mov r0, r4 a00062d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a000235c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { a000235c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a0002360: e59fb0dc ldr fp, [pc, #220] ; a0002444 limit++; continue; } sign = 1; } if (!isdigit(c)) a0002364: e59f90dc ldr r9, [pc, #220] ; a0002448 scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; a0002368: e3a04000 mov r4, #0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { a000236c: e1a05000 mov r5, r0 a0002370: e58d1000 str r1, [sp] int c; unsigned int i = 0; unsigned int limit = INT_MAX; a0002374: e3e08102 mvn r8, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; a0002378: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) a000237c: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a0002380: e5953004 ldr r3, [r5, #4] a0002384: e2433001 sub r3, r3, #1 a0002388: e3530000 cmp r3, #0 a000238c: e5853004 str r3, [r5, #4] a0002390: a5953000 ldrge r3, [r5] a0002394: a4d36001 ldrbge r6, [r3], #1 a0002398: a5853000 strge r3, [r5] a000239c: aa000003 bge a00023b0 a00023a0: e59b0000 ldr r0, [fp] <== NOT EXECUTED a00023a4: e1a01005 mov r1, r5 <== NOT EXECUTED a00023a8: eb0030e9 bl a000e754 <__srget_r> <== NOT EXECUTED a00023ac: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') a00023b0: e356003a cmp r6, #58 ; 0x3a a00023b4: 0a000019 beq a0002420 break; if (sign == 0) { a00023b8: e3540000 cmp r4, #0 a00023bc: 1a000004 bne a00023d4 if (c == '-') { a00023c0: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; a00023c4: 02888001 addeq r8, r8, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; a00023c8: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { a00023cc: 0affffeb beq a0002380 sign = -1; limit++; continue; } sign = 1; a00023d0: e3a04001 mov r4, #1 } if (!isdigit(c)) a00023d4: e5993000 ldr r3, [r9] a00023d8: e0833006 add r3, r3, r6 a00023dc: e5d30001 ldrb r0, [r3, #1] a00023e0: e2100004 ands r0, r0, #4 a00023e4: 0a000015 beq a0002440 return 0; d = c - '0'; if ((i > (limit / 10)) a00023e8: e1a00008 mov r0, r8 a00023ec: e3a0100a mov r1, #10 a00023f0: eb0039e1 bl a0010b7c <__aeabi_uidiv> a00023f4: e1570000 cmp r7, r0 a00023f8: 8a00000f bhi a000243c } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; a00023fc: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) a0002400: 1a000004 bne a0002418 a0002404: e1a00008 mov r0, r8 a0002408: e3a0100a mov r1, #10 a000240c: eb003a72 bl a0010ddc <__umodsi3> a0002410: e1560000 cmp r6, r0 a0002414: 8a000008 bhi a000243c return 0; i = i * 10 + d; a0002418: e027679a mla r7, sl, r7, r6 a000241c: eaffffd7 b a0002380 } if (sign == 0) a0002420: e3540000 cmp r4, #0 return 0; a0002424: 01a00004 moveq r0, r4 *val = i * sign; a0002428: 10040497 mulne r4, r7, r4 a000242c: 159d3000 ldrne r3, [sp] return 1; a0002430: 13a00001 movne r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; a0002434: 15834000 strne r4, [r3] return 1; a0002438: ea000000 b a0002440 if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; a000243c: e3a00000 mov r0, #0 } if (sign == 0) return 0; *val = i * sign; return 1; } a0002440: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0003b14 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { a0003b14: e591203c ldr r2, [r1, #60] ; 0x3c a0003b18: e59f304c ldr r3, [pc, #76] ; a0003b6c /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { a0003b1c: e92d4030 push {r4, r5, lr} int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { a0003b20: e0023003 and r3, r2, r3 a0003b24: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { a0003b28: e1a04001 mov r4, r1 a0003b2c: e1a05000 mov r5, r0 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { a0003b30: 0a00000b beq a0003b64 rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0003b34: e5910018 ldr r0, [r1, #24] a0003b38: e3a01000 mov r1, #0 a0003b3c: e1a02001 mov r2, r1 a0003b40: eb0004be bl a0004e40 i = iproc (c, tty); a0003b44: e1a01004 mov r1, r4 a0003b48: e1a00005 mov r0, r5 a0003b4c: ebffff88 bl a0003974 a0003b50: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); a0003b54: e5940018 ldr r0, [r4, #24] a0003b58: eb0004fe bl a0004f58 } else { i = iproc (c, tty); } return i; } a0003b5c: e1a00005 mov r0, r5 a0003b60: e8bd8030 pop {r4, r5, pc} a0003b64: 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); a0003b68: eaffff81 b a0003974 <== NOT EXECUTED =============================================================================== a000574c : */ int unmount( const char *path ) { a000574c: e92d4070 push {r4, r5, r6, lr} a0005750: e24dd018 sub sp, sp, #24 a0005754: 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 ) ) a0005758: eb002219 bl a000dfc4 a000575c: e28d4004 add r4, sp, #4 a0005760: e3a03001 mov r3, #1 a0005764: e1a01000 mov r1, r0 a0005768: e58d3000 str r3, [sp] a000576c: e1a00005 mov r0, r5 a0005770: e3a02000 mov r2, #0 a0005774: e1a03004 mov r3, r4 a0005778: ebfff464 bl a0002910 a000577c: e3500000 cmp r0, #0 a0005780: 1a000040 bne a0005888 return -1; mt_entry = loc.mt_entry; a0005784: e59d5014 ldr r5, [sp, #20] /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ a0005788: e59d3004 ldr r3, [sp, #4] a000578c: e595201c ldr r2, [r5, #28] a0005790: e1520003 cmp r2, r3 a0005794: 0a000004 beq a00057ac rtems_filesystem_freenode( &loc ); a0005798: e1a00004 mov r0, r4 a000579c: ebfff48b bl a00029d0 rtems_set_errno_and_return_minus_one( EACCES ); a00057a0: eb001c8f bl a000c9e4 <__errno> a00057a4: e3a0300d mov r3, #13 a00057a8: ea000011 b a00057f4 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); a00057ac: e1a00004 mov r0, r4 a00057b0: ebfff486 bl a00029d0 * 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 ) a00057b4: e59f30d8 ldr r3, [pc, #216] ; a0005894 a00057b8: e5933000 ldr r3, [r3] a00057bc: e5933014 ldr r3, [r3, #20] a00057c0: e1530005 cmp r3, r5 a00057c4: 0a000008 beq a00057ec /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, a00057c8: e59f00c8 ldr r0, [pc, #200] ; a0005898 a00057cc: e595102c ldr r1, [r5, #44] ; 0x2c a00057d0: ebfff6b1 bl a000329c a00057d4: e3500000 cmp r0, #0 a00057d8: 1a000003 bne a00057ec * 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 ) a00057dc: e1a00005 mov r0, r5 a00057e0: ebfff562 bl a0002d70 a00057e4: e3500001 cmp r0, #1 a00057e8: 1a000003 bne a00057fc rtems_set_errno_and_return_minus_one( EBUSY ); a00057ec: eb001c7c bl a000c9e4 <__errno> a00057f0: e3a03010 mov r3, #16 a00057f4: e5803000 str r3, [r0] a00057f8: ea000022 b a0005888 * 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 ) a00057fc: e5953014 ldr r3, [r5, #20] a0005800: e1a00005 mov r0, r5 a0005804: e5933028 ldr r3, [r3, #40] ; 0x28 a0005808: e12fff33 blx r3 a000580c: e2506000 subs r6, r0, #0 a0005810: 1a00001c bne a0005888 * 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){ a0005814: e5953028 ldr r3, [r5, #40] ; 0x28 a0005818: e1a00005 mov r0, r5 a000581c: e593302c ldr r3, [r3, #44] ; 0x2c a0005820: e12fff33 blx r3 a0005824: e2504000 subs r4, r0, #0 a0005828: 0a000007 beq a000584c if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) a000582c: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED a0005830: e1a00005 mov r0, r5 <== NOT EXECUTED a0005834: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED a0005838: e12fff33 blx r3 <== NOT EXECUTED a000583c: e3500000 cmp r0, #0 <== NOT EXECUTED a0005840: 0a000010 beq a0005888 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); a0005844: e1a00006 mov r0, r6 <== NOT EXECUTED a0005848: eb0003c5 bl a0006764 <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); a000584c: e59f6048 ldr r6, [pc, #72] ; a000589c a0005850: e1a01004 mov r1, r4 a0005854: e1a02004 mov r2, r4 a0005858: e5960000 ldr r0, [r6] a000585c: eb000242 bl a000616c */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a0005860: e1a00005 mov r0, r5 a0005864: eb000475 bl a0006a40 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a0005868: e5960000 ldr r0, [r6] a000586c: eb000284 bl a0006284 /* * 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 ); a0005870: e2850008 add r0, r5, #8 a0005874: ebfff455 bl a00029d0 free( mt_entry ); a0005878: e1a00005 mov r0, r5 a000587c: ebfff458 bl a00029e4 return 0; a0005880: e1a00004 mov r0, r4 a0005884: ea000000 b a000588c */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) rtems_fatal_error_occurred( 0 ); return -1; a0005888: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } a000588c: e28dd018 add sp, sp, #24 a0005890: e8bd8070 pop {r4, r5, r6, pc}