=============================================================================== 000080e0 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 80e0: e5903000 ldr r3, [r0] 80e4: e593204c ldr r2, [r3, #76] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 80e8: e590100c ldr r1, [r0, #12] switch( node->type ) { 80ec: e2422001 sub r2, r2, #1 ; 0x1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 80f0: e591302c ldr r3, [r1, #44] switch( node->type ) { 80f4: e3520005 cmp r2, #5 ; 0x5 80f8: 979ff102 ldrls pc, [pc, r2, lsl #2] 80fc: ea000007 b 8120 <== NOT EXECUTED 8100: 00008138 .word 0x00008138 <== NOT EXECUTED 8104: 00008148 .word 0x00008148 <== NOT EXECUTED 8108: 00008128 .word 0x00008128 <== NOT EXECUTED 810c: 00008128 .word 0x00008128 <== NOT EXECUTED 8110: 00008118 .word 0x00008118 <== NOT EXECUTED 8114: 00008118 .word 0x00008118 <== NOT EXECUTED break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 8118: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 811c: e5803004 str r3, [r0, #4] <== NOT EXECUTED break; } return 0; } 8120: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 8124: e12fff1e bx lr <== NOT EXECUTED case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 8128: e59f3028 ldr r3, [pc, #40] ; 8158 <== NOT EXECUTED 812c: e5803004 str r3, [r0, #4] <== NOT EXECUTED loc->handlers = fs_info->memfile_handlers; break; } return 0; } 8130: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 8134: e12fff1e bx lr <== NOT EXECUTED IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 8138: e5933008 ldr r3, [r3, #8] 813c: e5803004 str r3, [r0, #4] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 8140: e3a00000 mov r0, #0 ; 0x0 8144: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 8148: e59f300c ldr r3, [pc, #12] ; 815c 814c: e5803004 str r3, [r0, #4] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 8150: e3a00000 mov r0, #0 ; 0x0 8154: e12fff1e bx lr =============================================================================== 0000ab18 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ab18: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; if ( parent_loc != NULL ) ab1c: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ab20: e24dd008 sub sp, sp, #8 ; 0x8 ab24: e1a07001 mov r7, r1 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); ab28: e3a00001 mov r0, #1 ; 0x1 ab2c: e3a01060 mov r1, #96 ; 0x60 IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; if ( parent_loc != NULL ) ab30: 01a0800a moveq r8, sl parent = parent_loc->node_access; ab34: 159a8000 ldrne r8, [sl] IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ab38: e1a05002 mov r5, r2 ab3c: e1a06003 mov r6, r3 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); ab40: ebfff8e8 bl 8ee8 if ( !node ) ab44: e2504000 subs r4, r0, #0 ; 0x0 ab48: 0a000034 beq ac20 /* * Fill in the basic information */ node->st_nlink = 1; ab4c: e3a02001 mov r2, #1 ; 0x1 node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); ab50: e1a01005 mov r1, r5 /* * Fill in the basic information */ node->st_nlink = 1; ab54: e1c423b4 strh r2, [r4, #52] node->type = type; ab58: e584704c str r7, [r4, #76] strncpy( node->name, name, IMFS_NAME_MAX ); ab5c: e3a02020 mov r2, #32 ; 0x20 ab60: e284000c add r0, r4, #12 ; 0xc ab64: eb000770 bl c92c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; ab68: e59f2120 ldr r2, [pc, #288] ; ac90 ab6c: e5921000 ldr r1, [r2] ab70: e5913024 ldr r3, [r1, #36] ab74: e1e03003 mvn r3, r3 ab78: e0063003 and r3, r6, r3 ab7c: e5843030 str r3, [r4, #48] #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; ab80: e3a03000 mov r3, #0 ; 0x0 ab84: e1c433bc strh r3, [r4, #60] node->st_gid = 0; ab88: e1c433be strh r3, [r4, #62] /* * Now set all the times. */ gettimeofday( &tv, 0 ); ab8c: e1a0000d mov r0, sp ab90: e3a01000 mov r1, #0 ; 0x0 ab94: ebfff979 bl 9180 node->stat_atime = (time_t) tv.tv_sec; ab98: e59d3000 ldr r3, [sp] /* * Set the type specific information */ switch (type) { ab9c: e2472001 sub r2, r7, #1 ; 0x1 gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; aba0: e5843048 str r3, [r4, #72] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; aba4: e5843040 str r3, [r4, #64] node->stat_mtime = (time_t) tv.tv_sec; aba8: e5843044 str r3, [r4, #68] /* * Set the type specific information */ switch (type) { abac: e3520005 cmp r2, #5 ; 0x5 abb0: 979ff102 ldrls pc, [pc, r2, lsl #2] abb4: ea000020 b ac3c <== NOT EXECUTED abb8: 0000ac50 .word 0x0000ac50 <== NOT EXECUTED abbc: 0000ac6c .word 0x0000ac6c <== NOT EXECUTED abc0: 0000ac80 .word 0x0000ac80 <== NOT EXECUTED abc4: 0000ac2c .word 0x0000ac2c <== NOT EXECUTED abc8: 0000abdc .word 0x0000abdc <== NOT EXECUTED abcc: 0000abd0 .word 0x0000abd0 <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; abd0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED node->info.linearfile.direct = 0; abd4: e5843054 str r3, [r4, #84] <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; abd8: e5843050 str r3, [r4, #80] <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; abdc: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; abe0: e584305c str r3, [r4, #92] <== NOT EXECUTED case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; abe4: e5843050 str r3, [r4, #80] <== NOT EXECUTED node->info.file.indirect = 0; abe8: e5843054 str r3, [r4, #84] <== NOT EXECUTED node->info.file.doubly_indirect = 0; abec: e5843058 str r3, [r4, #88] <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { abf0: e3580000 cmp r8, #0 ; 0x0 abf4: 0a000009 beq ac20 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); abf8: e1a01004 mov r1, r4 abfc: e2880050 add r0, r8, #80 ; 0x50 ac00: ebffe98f bl 5244 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; ac04: e59a300c ldr r3, [sl, #12] ac08: e593102c ldr r1, [r3, #44] node->st_ino = ++fs_info->ino_count; ac0c: e5912000 ldr r2, [r1] ac10: e2822001 add r2, r2, #1 ; 0x1 ac14: e5812000 str r2, [r1] * If this node has a parent, then put it in that directory list. */ if ( parent ) { rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; ac18: e5848008 str r8, [r4, #8] fs_info = parent_loc->mt_entry->fs_info; node->st_ino = ++fs_info->ino_count; ac1c: e5842038 str r2, [r4, #56] } return node; } ac20: e1a00004 mov r0, r4 ac24: e28dd008 add sp, sp, #8 ; 0x8 ac28: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; ac2c: e59d2024 ldr r2, [sp, #36] <== NOT EXECUTED ac30: e5923000 ldr r3, [r2] <== NOT EXECUTED ac34: e5843050 str r3, [r4, #80] <== NOT EXECUTED ac38: eaffffec b abf0 <== NOT EXECUTED node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; default: assert(0); ac3c: e59f0050 ldr r0, [pc, #80] ; ac94 <== NOT EXECUTED ac40: e3a01074 mov r1, #116 ; 0x74 <== NOT EXECUTED ac44: e59f204c ldr r2, [pc, #76] ; ac98 <== NOT EXECUTED ac48: e59f304c ldr r3, [pc, #76] ; ac9c <== NOT EXECUTED ac4c: ebfff848 bl 8d74 <__assert_func> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ac50: e2843054 add r3, r4, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ac54: e2841050 add r1, r4, #80 ; 0x50 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ac58: e3a02000 mov r2, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ac5c: e5843050 str r3, [r4, #80] the_chain->permanent_null = NULL; ac60: e5842054 str r2, [r4, #84] the_chain->last = _Chain_Head(the_chain); ac64: e5841058 str r1, [r4, #88] ac68: eaffffe0 b abf0 node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; ac6c: e59d1024 ldr r1, [sp, #36] ac70: e891000c ldm r1, {r2, r3} ac74: e5843054 str r3, [r4, #84] case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; ac78: e5842050 str r2, [r4, #80] ac7c: eaffffdb b abf0 case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); break; case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; ac80: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED ac84: e5913000 ldr r3, [r1] <== NOT EXECUTED ac88: e5843050 str r3, [r4, #80] <== NOT EXECUTED ac8c: eaffffd7 b abf0 <== NOT EXECUTED =============================================================================== 000082d8 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 82d8: 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 ) ) { 82dc: e3d1e007 bics lr, r1, #7 ; 0x7 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 82e0: e24dd038 sub sp, sp, #56 ; 0x38 82e4: e1a0a001 mov sl, r1 82e8: e1a08000 mov r8, r0 82ec: e1a06002 mov r6, r2 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 ) ) { 82f0: 1a000080 bne 84f8 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 82f4: e5925000 ldr r5, [r2] 82f8: e1a0700e mov r7, lr 82fc: e28d9003 add r9, sp, #3 ; 0x3 8300: e28db034 add fp, sp, #52 ; 0x34 * 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], token, &len ); 8304: e0880007 add r0, r8, r7 8308: e1a01009 mov r1, r9 830c: e1a0200b mov r2, fp 8310: eb000189 bl 893c i += len; if ( !pathloc->node_access ) 8314: e596e000 ldr lr, [r6] 8318: e35e0000 cmp lr, #0 ; 0x0 * 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], token, &len ); 831c: e1a04000 mov r4, r0 i += len; 8320: e59d3034 ldr r3, [sp, #52] if ( !pathloc->node_access ) 8324: 0a00004d beq 8460 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8328: e3500000 cmp r0, #0 ; 0x0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); i += len; 832c: e0877003 add r7, r7, r3 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8330: 1a00000f bne 8374 * 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 ) { 8334: e59e304c ldr r3, [lr, #76] 8338: e3530001 cmp r3, #1 ; 0x1 833c: 0a000063 beq 84d0 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8340: e1a00006 mov r0, r6 8344: ebffff65 bl 80e0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8348: e1a0100a mov r1, sl return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 834c: e1a04000 mov r4, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8350: e1a00006 mov r0, r6 8354: ebffff81 bl 8160 8358: e3500000 cmp r0, #0 ; 0x0 835c: 1a000036 bne 843c rtems_set_errno_and_return_minus_one( EACCES ); 8360: eb000c14 bl b3b8 <__errno> <== NOT EXECUTED 8364: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 8368: e5803000 str r3, [r0] <== NOT EXECUTED 836c: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 8370: ea000031 b 843c <== NOT EXECUTED /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8374: e595104c ldr r1, [r5, #76] 8378: e3510001 cmp r1, #1 ; 0x1 837c: 0a000031 beq 8448 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8380: e3540003 cmp r4, #3 ; 0x3 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; 8384: e1a0500e mov r5, lr switch( type ) { 8388: 0a000006 beq 83a8 838c: e3540004 cmp r4, #4 ; 0x4 8390: 0a000025 beq 842c 8394: e3540002 cmp r4, #2 ; 0x2 8398: 0a000013 beq 83ec /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 839c: e3540004 cmp r4, #4 ; 0x4 83a0: 1affffd7 bne 8304 83a4: eaffffe2 b 8334 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 83a8: e59e304c ldr r3, [lr, #76] 83ac: e3530003 cmp r3, #3 ; 0x3 83b0: 0a00002f beq 8474 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 83b4: e3530004 cmp r3, #4 ; 0x4 83b8: 0a000054 beq 8510 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 83bc: e3530001 cmp r3, #1 ; 0x1 83c0: 1a000047 bne 84e4 /* * 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 ) { 83c4: e595e05c ldr lr, [r5, #92] 83c8: e35e0000 cmp lr, #0 ; 0x0 83cc: 1a000042 bne 84dc /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 83d0: e1a00005 mov r0, r5 83d4: e1a01009 mov r1, r9 83d8: eb000128 bl 8880 if ( !node ) 83dc: e2505000 subs r5, r0, #0 ; 0x0 83e0: 0a00001e beq 8460 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 83e4: e5865000 str r5, [r6] 83e8: eaffffc5 b 8304 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 83ec: e59f2144 ldr r2, [pc, #324] ; 8538 <== NOT EXECUTED 83f0: e5923000 ldr r3, [r2] <== NOT EXECUTED 83f4: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 83f8: e152000e cmp r2, lr <== NOT EXECUTED 83fc: 0affffc0 beq 8304 <== NOT EXECUTED /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 8400: e596200c ldr r2, [r6, #12] <== NOT EXECUTED 8404: e5923018 ldr r3, [r2, #24] <== NOT EXECUTED 8408: e153000e cmp r3, lr <== NOT EXECUTED 840c: 0a000020 beq 8494 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 8410: e59e5008 ldr r5, [lr, #8] <== NOT EXECUTED 8414: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 8418: 1afffff1 bne 83e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); 841c: eb000be5 bl b3b8 <__errno> <== NOT EXECUTED 8420: e5804000 str r4, [r0] <== NOT EXECUTED 8424: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 8428: ea000003 b 843c <== NOT EXECUTED case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 842c: eb000be1 bl b3b8 <__errno> <== NOT EXECUTED 8430: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 8434: e5803000 str r3, [r0] <== NOT EXECUTED 8438: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 843c: e1a00004 mov r0, r4 8440: e28dd038 add sp, sp, #56 ; 0x38 8444: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8448: e1a00006 mov r0, r6 844c: ebffff43 bl 8160 8450: e3500000 cmp r0, #0 ; 0x0 8454: 0affffc1 beq 8360 8458: e596e000 ldr lr, [r6] 845c: eaffffc7 b 8380 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 8460: eb000bd4 bl b3b8 <__errno> <== NOT EXECUTED 8464: e3a03002 mov r3, #2 ; 0x2 <== NOT EXECUTED 8468: e5803000 str r3, [r0] <== NOT EXECUTED 846c: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 8470: eafffff1 b 843c <== NOT EXECUTED * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 8474: e1a00006 mov r0, r6 <== NOT EXECUTED 8478: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 847c: ebffff47 bl 81a0 <== NOT EXECUTED node = pathloc->node_access; 8480: e5965000 ldr r5, [r6] <== NOT EXECUTED if ( !node ) 8484: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 8488: 0a000015 beq 84e4 <== NOT EXECUTED } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 848c: e595304c ldr r3, [r5, #76] <== NOT EXECUTED 8490: eaffffc9 b 83bc <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8494: e282e008 add lr, r2, #8 ; 0x8 <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8498: e89e000f ldm lr, {r0, r1, r2, r3} <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 849c: e59de034 ldr lr, [sp, #52] <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 84a0: e28dc024 add ip, sp, #36 ; 0x24 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 84a4: e06ee007 rsb lr, lr, r7 <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 84a8: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED *pathloc = newloc; 84ac: e886000f stm r6, {r0, r1, r2, r3} <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 84b0: e5923000 ldr r3, [r2] <== NOT EXECUTED 84b4: e088000e add r0, r8, lr <== NOT EXECUTED 84b8: e1a0100a mov r1, sl <== NOT EXECUTED 84bc: e1a02006 mov r2, r6 <== NOT EXECUTED 84c0: e1a0e00f mov lr, pc <== NOT EXECUTED 84c4: e12fff13 bx r3 <== NOT EXECUTED 84c8: e1a04000 mov r4, r0 <== NOT EXECUTED 84cc: eaffffda b 843c <== NOT EXECUTED * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 84d0: e59ee05c ldr lr, [lr, #92] 84d4: e35e0000 cmp lr, #0 ; 0x0 84d8: 0affff98 beq 8340 newloc = node->info.directory.mt_fs->mt_fs_root; 84dc: e28ee018 add lr, lr, #24 ; 0x18 <== NOT EXECUTED 84e0: eaffffec b 8498 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 84e4: eb000bb3 bl b3b8 <__errno> <== NOT EXECUTED 84e8: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 84ec: e5803000 str r3, [r0] <== NOT EXECUTED 84f0: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 84f4: eaffffd0 b 843c <== NOT EXECUTED rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); 84f8: e3a01f7a mov r1, #488 ; 0x1e8 <== NOT EXECUTED 84fc: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED 8500: e59f0034 ldr r0, [pc, #52] ; 853c <== NOT EXECUTED 8504: e59f2034 ldr r2, [pc, #52] ; 8540 <== NOT EXECUTED 8508: e59f3034 ldr r3, [pc, #52] ; 8544 <== NOT EXECUTED 850c: eb000218 bl 8d74 <__assert_func> <== NOT EXECUTED if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 8510: e1a00006 mov r0, r6 <== NOT EXECUTED 8514: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 8518: ebffff38 bl 8200 <== NOT EXECUTED node = pathloc->node_access; if ( result == -1 ) 851c: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 8520: e1a04000 mov r4, r0 <== NOT EXECUTED node = pathloc->node_access; 8524: e5960000 ldr r0, [r6] <== NOT EXECUTED if ( result == -1 ) 8528: 0affffc3 beq 843c <== NOT EXECUTED } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 852c: e1a05000 mov r5, r0 <== NOT EXECUTED 8530: e595304c ldr r3, [r5, #76] <== NOT EXECUTED 8534: eaffffa0 b 83bc <== NOT EXECUTED =============================================================================== 00008608 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8608: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 860c: e24dd03c sub sp, sp, #60 ; 0x3c /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8610: e5915000 ldr r5, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8614: e58d2000 str r2, [sp] 8618: e1a07001 mov r7, r1 861c: e1a0a000 mov sl, r0 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8620: e3a08000 mov r8, #0 ; 0x0 8624: e28d9007 add r9, sp, #7 ; 0x7 8628: e28db038 add fp, sp, #56 ; 0x38 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 862c: e08a0008 add r0, sl, r8 8630: e1a01009 mov r1, r9 8634: e1a0200b mov r2, fp 8638: eb0000bf bl 893c i += len; if ( !pathloc->node_access ) 863c: e597c000 ldr ip, [r7] 8640: e35c0000 cmp ip, #0 ; 0x0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 8644: e1a04000 mov r4, r0 i += len; 8648: e59d6038 ldr r6, [sp, #56] if ( !pathloc->node_access ) 864c: 0a00003a beq 873c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8650: e3500000 cmp r0, #0 ; 0x0 8654: 1a000006 bne 8674 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8658: eb000b56 bl b3b8 <__errno> <== NOT EXECUTED 865c: e3a03011 mov r3, #17 ; 0x11 <== NOT EXECUTED 8660: e5803000 str r3, [r0] <== NOT EXECUTED 8664: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8668: e1a00004 mov r0, r4 866c: e28dd03c add sp, sp, #60 ; 0x3c 8670: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8674: e595104c ldr r1, [r5, #76] 8678: e3510001 cmp r1, #1 ; 0x1 867c: 0a000033 beq 8750 */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); i += len; 8680: e0888006 add r8, r8, r6 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; 8684: e1a0500c mov r5, ip switch( type ) { 8688: e3540004 cmp r4, #4 ; 0x4 868c: 979ff104 ldrls pc, [pc, r4, lsl #2] 8690: eaffffe5 b 862c <== NOT EXECUTED 8694: 00008658 .word 0x00008658 <== NOT EXECUTED 8698: 0000862c .word 0x0000862c <== NOT EXECUTED 869c: 0000870c .word 0x0000870c <== NOT EXECUTED 86a0: 000086bc .word 0x000086bc <== NOT EXECUTED 86a4: 000086a8 .word 0x000086a8 <== NOT EXECUTED case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 86a8: eb000b42 bl b3b8 <__errno> <== NOT EXECUTED 86ac: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 86b0: e5803000 str r3, [r0] <== NOT EXECUTED 86b4: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 86b8: eaffffea b 8668 <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 86bc: e59c304c ldr r3, [ip, #76] 86c0: e3530003 cmp r3, #3 ; 0x3 86c4: 0a000062 beq 8854 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 86c8: e3530004 cmp r3, #4 ; 0x4 86cc: 0a000060 beq 8854 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 86d0: e3550000 cmp r5, #0 ; 0x0 86d4: 0a00004a beq 8804 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 86d8: e595304c ldr r3, [r5, #76] 86dc: e3530001 cmp r3, #1 ; 0x1 86e0: 1a000047 bne 8804 /* * 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 ) { 86e4: e595e05c ldr lr, [r5, #92] 86e8: e35e0000 cmp lr, #0 ; 0x0 86ec: 1a000049 bne 8818 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 86f0: e1a00005 mov r0, r5 86f4: e1a01009 mov r1, r9 86f8: eb000060 bl 8880 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 86fc: e2505000 subs r5, r0, #0 ; 0x0 8700: 0a000018 beq 8768 done = true; else pathloc->node_access = node; 8704: e5875000 str r5, [r7] 8708: eaffffc7 b 862c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 870c: e59f2168 ldr r2, [pc, #360] ; 887c <== NOT EXECUTED 8710: e5923000 ldr r3, [r2] <== NOT EXECUTED 8714: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 8718: e152000c cmp r2, ip <== NOT EXECUTED 871c: 0affffc2 beq 862c <== NOT EXECUTED /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8720: e597e00c ldr lr, [r7, #12] <== NOT EXECUTED 8724: e59e3018 ldr r3, [lr, #24] <== NOT EXECUTED 8728: e153000c cmp r3, ip <== NOT EXECUTED 872c: 0a000050 beq 8874 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8730: e59c5008 ldr r5, [ip, #8] <== NOT EXECUTED 8734: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 8738: 1afffff1 bne 8704 <== NOT EXECUTED * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 873c: eb000b1d bl b3b8 <__errno> <== NOT EXECUTED 8740: e3a03002 mov r3, #2 ; 0x2 <== NOT EXECUTED 8744: e5803000 str r3, [r0] <== NOT EXECUTED 8748: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 874c: eaffffc5 b 8668 <== NOT EXECUTED * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8750: e1a00007 mov r0, r7 8754: ebfffe81 bl 8160 8758: e3500000 cmp r0, #0 ; 0x0 875c: 0a000023 beq 87f0 8760: e597c000 ldr ip, [r7] 8764: eaffffc5 b 8680 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8768: e59d3038 ldr r3, [sp, #56] 876c: e59d2000 ldr r2, [sp] 8770: e0633008 rsb r3, r3, r8 8774: e08a3003 add r3, sl, r3 8778: e5823000 str r3, [r2] /* * 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++) { 877c: e7da2008 ldrb r2, [sl, r8] 8780: e3520000 cmp r2, #0 ; 0x0 8784: e08a0008 add r0, sl, r8 8788: 1a000004 bne 87a0 878c: ea00000b b 87c0 8790: e5d02001 ldrb r2, [r0, #1] <== NOT EXECUTED 8794: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED if ( !IMFS_is_separator( path[ i ] ) ) 8798: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED /* * 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++) { 879c: 0a000007 beq 87c0 <== NOT EXECUTED if ( !IMFS_is_separator( path[ i ] ) ) 87a0: e352002f cmp r2, #47 ; 0x2f <== NOT EXECUTED 87a4: 1352005c cmpne r2, #92 ; 0x5c <== NOT EXECUTED 87a8: 0afffff8 beq 8790 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); 87ac: eb000b01 bl b3b8 <__errno> <== NOT EXECUTED 87b0: e3a03002 mov r3, #2 ; 0x2 <== NOT EXECUTED 87b4: e5803000 str r3, [r0] <== NOT EXECUTED 87b8: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 87bc: eaffffa9 b 8668 <== NOT EXECUTED /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 87c0: e1a00007 mov r0, r7 87c4: ebfffe45 bl 80e0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 87c8: e5973000 ldr r3, [r7] 87cc: e593204c ldr r2, [r3, #76] 87d0: e3520001 cmp r2, #1 ; 0x1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 87d4: e1a04000 mov r4, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 87d8: 1a000009 bne 8804 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 87dc: e1a00007 mov r0, r7 87e0: e3a01003 mov r1, #3 ; 0x3 87e4: ebfffe5d bl 8160 87e8: e3500000 cmp r0, #0 ; 0x0 87ec: 1affff9d bne 8668 rtems_set_errno_and_return_minus_one( EACCES ); 87f0: eb000af0 bl b3b8 <__errno> <== NOT EXECUTED 87f4: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 87f8: e5803000 str r3, [r0] <== NOT EXECUTED 87fc: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 8800: eaffff98 b 8668 <== NOT EXECUTED /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8804: eb000aeb bl b3b8 <__errno> <== NOT EXECUTED 8808: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 880c: e5803000 str r3, [r0] <== NOT EXECUTED 8810: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 8814: eaffff93 b 8668 <== NOT EXECUTED * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8818: e28ee018 add lr, lr, #24 ; 0x18 <== NOT EXECUTED 881c: e89e000f ldm lr, {r0, r1, r2, r3} <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8820: e59de038 ldr lr, [sp, #56] <== NOT EXECUTED * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8824: e28dc028 add ip, sp, #40 ; 0x28 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8828: e06ee008 rsb lr, lr, r8 <== NOT EXECUTED * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 882c: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED *pathloc = newloc; 8830: e887000f stm r7, {r0, r1, r2, r3} <== NOT EXECUTED return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8834: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 8838: e08a000e add r0, sl, lr <== NOT EXECUTED 883c: e1a01007 mov r1, r7 <== NOT EXECUTED 8840: e59d2000 ldr r2, [sp] <== NOT EXECUTED 8844: e1a0e00f mov lr, pc <== NOT EXECUTED 8848: e12fff13 bx r3 <== NOT EXECUTED 884c: e1a04000 mov r4, r0 <== NOT EXECUTED 8850: eaffff84 b 8668 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8854: e1a00007 mov r0, r7 <== NOT EXECUTED 8858: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 885c: ebffff39 bl 8548 <== NOT EXECUTED if ( result == -1 ) 8860: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8864: e1a04000 mov r4, r0 <== NOT EXECUTED if ( result == -1 ) 8868: 0affff7e beq 8668 <== NOT EXECUTED 886c: e5975000 ldr r5, [r7] <== NOT EXECUTED 8870: eaffff96 b 86d0 <== NOT EXECUTED if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 8874: e28ee008 add lr, lr, #8 ; 0x8 <== NOT EXECUTED 8878: eaffffe7 b 881c <== NOT EXECUTED =============================================================================== 000081a0 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 81a0: e5902000 ldr r2, [r0] <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 81a4: e592304c ldr r3, [r2, #76] <== NOT EXECUTED 81a8: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 81ac: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 81b0: e1a04000 mov r4, r0 <== NOT EXECUTED 81b4: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 81b8: 1a00000d bne 81f4 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 81bc: e5923050 ldr r3, [r2, #80] <== NOT EXECUTED 81c0: e5803000 str r3, [r0] <== NOT EXECUTED IMFS_Set_handlers( node ); 81c4: ebffffc5 bl 80e0 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 81c8: e1a00004 mov r0, r4 <== NOT EXECUTED 81cc: e1a01005 mov r1, r5 <== NOT EXECUTED 81d0: ebffffe2 bl 8160 <== NOT EXECUTED 81d4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 81d8: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 81dc: 18bd8030 popne {r4, r5, pc} <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); 81e0: eb000c74 bl b3b8 <__errno> <== NOT EXECUTED 81e4: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 81e8: e5803000 str r3, [r0] <== NOT EXECUTED 81ec: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED return result; } 81f0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 81f4: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 81f8: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 81fc: ebfff33a bl 4eec <== NOT EXECUTED =============================================================================== 00008548 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8548: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 854c: e59f60b0 ldr r6, [pc, #176] ; 8604 <== NOT EXECUTED 8550: e1a05000 mov r5, r0 <== NOT EXECUTED 8554: e1a07001 mov r7, r1 <== NOT EXECUTED 8558: ea000004 b 8570 <== NOT EXECUTED */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 855c: e3530004 cmp r3, #4 ; 0x4 <== NOT EXECUTED 8560: 0a00001c beq 85d8 <== NOT EXECUTED result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 8564: e2433003 sub r3, r3, #3 ; 0x3 <== NOT EXECUTED 8568: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 856c: 8a000014 bhi 85c4 <== NOT EXECUTED /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 8570: e5962000 ldr r2, [r6] <== NOT EXECUTED 8574: e1d232b8 ldrh r3, [r2, #40] <== NOT EXECUTED 8578: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 857c: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 8580: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 8584: e3530005 cmp r3, #5 ; 0x5 <== NOT EXECUTED /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 8588: e1c232b8 strh r3, [r2, #40] <== NOT EXECUTED { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 858c: e5954000 ldr r4, [r5] <== NOT EXECUTED /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 8590: 8a000014 bhi 85e8 <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 8594: e594304c ldr r3, [r4, #76] <== NOT EXECUTED 8598: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 859c: 1affffee bne 855c <== NOT EXECUTED result = IMFS_evaluate_hard_link( node, flags ); 85a0: e1a00005 mov r0, r5 <== NOT EXECUTED 85a4: e1a01007 mov r1, r7 <== NOT EXECUTED 85a8: ebfffefc bl 81a0 <== NOT EXECUTED else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 85ac: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 85b0: 1a000004 bne 85c8 <== NOT EXECUTED 85b4: e594304c ldr r3, [r4, #76] <== NOT EXECUTED 85b8: e2433003 sub r3, r3, #3 ; 0x3 <== NOT EXECUTED 85bc: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 85c0: 9affffea bls 8570 <== NOT EXECUTED 85c4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 85c8: e5963000 ldr r3, [r6] <== NOT EXECUTED 85cc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 85d0: e1c322b8 strh r2, [r3, #40] <== NOT EXECUTED return result; } 85d4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 85d8: e1a00005 mov r0, r5 <== NOT EXECUTED 85dc: e1a01007 mov r1, r7 <== NOT EXECUTED 85e0: ebffff06 bl 8200 <== NOT EXECUTED 85e4: eafffff0 b 85ac <== NOT EXECUTED * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 85e8: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 85ec: e1c232b8 strh r3, [r2, #40] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ELOOP ); 85f0: eb000b70 bl b3b8 <__errno> <== NOT EXECUTED 85f4: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED 85f8: e5803000 str r3, [r0] <== NOT EXECUTED 85fc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8600: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00008160 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 8160: e3d13007 bics r3, r1, #7 ; 0x7 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 8164: 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 ) ) 8168: 1a000007 bne 818c /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 816c: e5903000 ldr r3, [r0] 8170: e5932030 ldr r2, [r3, #48] 8174: e1a01301 lsl r1, r1, #6 8178: e0012002 and r2, r1, r2 817c: e1510002 cmp r1, r2 8180: 13a00000 movne r0, #0 ; 0x0 8184: 03a00001 moveq r0, #1 ; 0x1 return 1; return 0; } 8188: e49df004 pop {pc} ; (ldr pc, [sp], #4) 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 ); 818c: eb000c89 bl b3b8 <__errno> <== NOT EXECUTED 8190: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 8194: e5803000 str r3, [r0] <== NOT EXECUTED 8198: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 819c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00008200 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8200: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 8204: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = node->node_access; 8208: e5900000 ldr r0, [r0] <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 820c: e590304c ldr r3, [r0, #76] <== NOT EXECUTED 8210: e3530004 cmp r3, #4 ; 0x4 <== NOT EXECUTED int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8214: e1a06001 mov r6, r1 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8218: 1a000027 bne 82bc <== NOT EXECUTED rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 821c: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED 8220: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 8224: 0a000027 beq 82c8 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 8228: e5843000 str r3, [r4] <== NOT EXECUTED rtems_filesystem_get_sym_start_loc( 822c: e590e050 ldr lr, [r0, #80] <== NOT EXECUTED 8230: e5de3000 ldrb r3, [lr] <== NOT EXECUTED 8234: e353005c cmp r3, #92 ; 0x5c <== NOT EXECUTED 8238: 1353002f cmpne r3, #47 ; 0x2f <== NOT EXECUTED 823c: 13a02000 movne r2, #0 ; 0x0 <== NOT EXECUTED 8240: 03a02001 moveq r2, #1 ; 0x1 <== NOT EXECUTED 8244: 1a000013 bne 8298 <== NOT EXECUTED 8248: e59f3084 ldr r3, [pc, #132] ; 82d4 <== NOT EXECUTED 824c: e593c000 ldr ip, [r3] <== NOT EXECUTED 8250: e28cc014 add ip, ip, #20 ; 0x14 <== NOT EXECUTED 8254: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED 8258: e884000f stm r4, {r0, r1, r2, r3} <== NOT EXECUTED 825c: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 8260: e08e0003 add r0, lr, r3 <== NOT EXECUTED 8264: e1a02004 mov r2, r4 <== NOT EXECUTED 8268: e1a01006 mov r1, r6 <== NOT EXECUTED 826c: eb000019 bl 82d8 <== NOT EXECUTED 8270: e1a05000 mov r5, r0 <== NOT EXECUTED &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 8274: e1a00004 mov r0, r4 <== NOT EXECUTED 8278: ebffff98 bl 80e0 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 827c: e1a00004 mov r0, r4 <== NOT EXECUTED 8280: e1a01006 mov r1, r6 <== NOT EXECUTED 8284: ebffffb5 bl 8160 <== NOT EXECUTED 8288: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 828c: 0a000005 beq 82a8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8290: e1a00005 mov r0, r5 <== NOT EXECUTED 8294: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 8298: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 829c: 11a03002 movne r3, r2 <== NOT EXECUTED 82a0: 1affffee bne 8260 <== NOT EXECUTED 82a4: eaffffe7 b 8248 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 82a8: eb000c42 bl b3b8 <__errno> <== NOT EXECUTED 82ac: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 82b0: e5803000 str r3, [r0] <== NOT EXECUTED 82b4: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 82b8: eafffff4 b 8290 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 82bc: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 82c0: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 82c4: ebfff308 bl 4eec <== NOT EXECUTED if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 82c8: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED 82cc: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED 82d0: ebfff305 bl 4eec <== NOT EXECUTED =============================================================================== 0000aca0 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { aca0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED #endif /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) aca4: e3c14f7f bic r4, r1, #508 ; 0x1fc <== NOT EXECUTED aca8: e3c44003 bic r4, r4, #3 ; 0x3 <== NOT EXECUTED acac: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { acb0: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; acb4: e5905000 ldr r5, [r0] <== NOT EXECUTED #endif /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) acb8: 1a00000c bne acf0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; acbc: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED acc0: e3c33f7f bic r3, r3, #508 ; 0x1fc <== NOT EXECUTED acc4: e3c33003 bic r3, r3, #3 ; 0x3 <== NOT EXECUTED acc8: e1813003 orr r3, r1, r3 <== NOT EXECUTED accc: e5853030 str r3, [r5, #48] <== NOT EXECUTED IMFS_update_ctime( jnode ); acd0: e1a0000d mov r0, sp <== NOT EXECUTED acd4: e1a01004 mov r1, r4 <== NOT EXECUTED acd8: ebfff928 bl 9180 <== NOT EXECUTED acdc: e59d3000 ldr r3, [sp] <== NOT EXECUTED ace0: e5853048 str r3, [r5, #72] <== NOT EXECUTED ace4: e1a00004 mov r0, r4 <== NOT EXECUTED return 0; } ace8: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED acec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) rtems_set_errno_and_return_minus_one( EPERM ); acf0: eb0001b0 bl b3b8 <__errno> <== NOT EXECUTED acf4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED acf8: e5803000 str r3, [r0] <== NOT EXECUTED acfc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED ad00: eafffff8 b ace8 <== NOT EXECUTED =============================================================================== 00008880 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 8880: e92d4070 push {r4, r5, r6, lr} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 8884: e2504000 subs r4, r0, #0 ; 0x0 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 8888: e1a05001 mov r5, r1 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 888c: 0a000020 beq 8914 if ( !name ) 8890: e3510000 cmp r1, #0 ; 0x0 8894: 0a00001b beq 8908 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 8898: e1a00001 mov r0, r1 889c: e59f1084 ldr r1, [pc, #132] ; 8928 88a0: eb000f92 bl c6f0 88a4: e3500000 cmp r0, #0 ; 0x0 88a8: 1a000001 bne 88b4 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 88ac: e1a00004 mov r0, r4 88b0: e8bd8070 pop {r4, r5, r6, pc} */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 88b4: e1a00005 mov r0, r5 88b8: e59f106c ldr r1, [pc, #108] ; 892c 88bc: eb000f8b bl c6f0 88c0: e3500000 cmp r0, #0 ; 0x0 return directory->Parent; 88c4: 05944008 ldreq r4, [r4, #8] */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 88c8: 0afffff7 beq 88ac return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 88cc: e5946050 ldr r6, [r4, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 88d0: e2844054 add r4, r4, #84 ; 0x54 !rtems_chain_is_tail( the_chain, the_node ); 88d4: e1560004 cmp r6, r4 88d8: 1a000003 bne 88ec 88dc: ea000009 b 8908 the_node = the_node->next ) { 88e0: e5966000 ldr r6, [r6] return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 88e4: e1560004 cmp r6, r4 88e8: 0a000006 beq 8908 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 88ec: e1a00005 mov r0, r5 88f0: e286100c add r1, r6, #12 ; 0xc 88f4: eb000f7d bl c6f0 88f8: e3500000 cmp r0, #0 ; 0x0 88fc: 1afffff7 bne 88e0 8900: e1a04006 mov r4, r6 8904: eaffffe8 b 88ac return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 8908: e3a04000 mov r4, #0 ; 0x0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 890c: e1a00004 mov r0, r4 8910: e8bd8070 pop {r4, r5, r6, pc} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 8914: e59f0014 ldr r0, [pc, #20] ; 8930 <== NOT EXECUTED 8918: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED 891c: e59f2010 ldr r2, [pc, #16] ; 8934 <== NOT EXECUTED 8920: e59f3010 ldr r3, [pc, #16] ; 8938 <== NOT EXECUTED 8924: eb000112 bl 8d74 <__assert_func> <== NOT EXECUTED =============================================================================== 0000893c : IMFS_token_types IMFS_get_token( const char *path, char *token, int *token_len ) { 893c: e92d4010 push {r4, lr} register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 8940: e5d03000 ldrb r3, [r0] while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 8944: e353002f cmp r3, #47 ; 0x2f 8948: 1353005c cmpne r3, #92 ; 0x5c IMFS_token_types IMFS_get_token( const char *path, char *token, int *token_len ) { 894c: e1a04001 mov r4, r1 8950: e1a0c002 mov ip, r2 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 8954: 0a000025 beq 89f0 8958: e3530000 cmp r3, #0 ; 0x0 token[i] = c; 895c: 15c13000 strbne r3, [r1] 8960: 13a01000 movne r1, #0 ; 0x0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 8964: 1a000009 bne 8990 8968: ea000029 b 8a14 896c: e2523000 subs r3, r2, #0 ; 0x0 8970: 13a03001 movne r3, #1 ; 0x1 8974: e3510020 cmp r1, #32 ; 0x20 8978: c3a03000 movgt r3, #0 ; 0x0 897c: e3530000 cmp r3, #0 ; 0x0 8980: 0a000007 beq 89a4 token[i] = c; if ( i == IMFS_NAME_MAX ) 8984: e3510020 cmp r1, #32 ; 0x20 * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { token[i] = c; 8988: e7c42001 strb r2, [r4, r1] if ( i == IMFS_NAME_MAX ) 898c: 0a00001e beq 8a0c return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 8990: e2811001 add r1, r1, #1 ; 0x1 8994: e7d02001 ldrb r2, [r0, r1] /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 8998: e352002f cmp r2, #47 ; 0x2f 899c: 1352005c cmpne r2, #92 ; 0x5c 89a0: 1afffff1 bne 896c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 89a4: e0843001 add r3, r4, r1 89a8: e5532001 ldrb r2, [r3, #-1] 89ac: e3520000 cmp r2, #0 ; 0x0 token[i] = '\0'; 89b0: 13a03000 movne r3, #0 ; 0x0 89b4: 17c43001 strbne r3, [r4, r1] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 89b8: e1a00004 mov r0, r4 /* * Set token_len to the number of characters copied. */ *token_len = i; 89bc: e58c1000 str r1, [ip] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 89c0: e59f1060 ldr r1, [pc, #96] ; 8a28 89c4: eb000f49 bl c6f0 89c8: e3500000 cmp r0, #0 ; 0x0 89cc: 02800002 addeq r0, r0, #2 ; 0x2 89d0: 08bd8010 popeq {r4, pc} type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 89d4: e1a00004 mov r0, r4 89d8: e59f104c ldr r1, [pc, #76] ; 8a2c 89dc: eb000f43 bl c6f0 89e0: e3500000 cmp r0, #0 ; 0x0 89e4: 13a00003 movne r0, #3 ; 0x3 89e8: 03a00001 moveq r0, #1 ; 0x1 type = IMFS_CURRENT_DIR; } return type; } 89ec: e8bd8010 pop {r4, pc} */ if ( i == 0 ) { token[i] = c; if ( token[i] != '\0' ) { 89f0: e3530000 cmp r3, #0 ; 0x0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 89f4: e5c13000 strb r3, [r1] if ( token[i] != '\0' ) { 89f8: 13a03001 movne r3, #1 ; 0x1 89fc: 11a00003 movne r0, r3 8a00: 0a000004 beq 8a18 /* * Set token_len to the number of characters copied. */ *token_len = i; 8a04: e58c3000 str r3, [ip] 8a08: e8bd8010 pop {r4, pc} c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) 8a0c: e3a00004 mov r0, #4 ; 0x4 <== NOT EXECUTED 8a10: e8bd8010 pop {r4, pc} <== NOT EXECUTED /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 8a14: e5c43000 strb r3, [r4] type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 8a18: e3a03000 mov r3, #0 ; 0x0 8a1c: e1a00003 mov r0, r3 /* * Set token_len to the number of characters copied. */ *token_len = i; 8a20: e58c3000 str r3, [ip] 8a24: e8bd8010 pop {r4, pc} =============================================================================== 00008a30 : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 8a30: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8a34: e59fc0f0 ldr ip, [pc, #240] ; 8b2c 8a38: e59ce000 ldr lr, [ip] * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 8a3c: e35e0010 cmp lr, #16 ; 0x10 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 8a40: e1a09002 mov r9, r2 8a44: e1a08003 mov r8, r3 8a48: e24dd004 sub sp, sp, #4 ; 0x4 8a4c: e1a06000 mov r6, r0 8a50: e1a0a001 mov sl, r1 * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 8a54: 13a02020 movne r2, #32 ; 0x20 8a58: 13a03000 movne r3, #0 ; 0x0 8a5c: 0a000006 beq 8a7c 8a60: e15e0002 cmp lr, r2 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8a64: e2833001 add r3, r3, #1 ; 0x1 8a68: e1a02082 lsl r2, r2, #1 if (bit_mask == requested_bytes_per_block) { 8a6c: 0a000002 beq 8a7c int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 8a70: e3530005 cmp r3, #5 ; 0x5 8a74: 1afffff9 bne 8a60 8a78: e3a0e080 mov lr, #128 ; 0x80 <== NOT EXECUTED bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 8a7c: e59fc0ac ldr ip, [pc, #172] ; 8b30 * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_node( 8a80: e3a07000 mov r7, #0 ; 0x0 8a84: e3a03c41 mov r3, #16640 ; 0x4100 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 8a88: e58ce000 str lr, [ip] * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_node( 8a8c: e28330ed add r3, r3, #237 ; 0xed 8a90: e3a01001 mov r1, #1 ; 0x1 8a94: e59f2098 ldr r2, [pc, #152] ; 8b34 8a98: e1a00007 mov r0, r7 8a9c: e58d7000 str r7, [sp] 8aa0: eb00081c bl ab18 NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8aa4: e59f508c ldr r5, [pc, #140] ; 8b38 8aa8: e1a04005 mov r4, r5 * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_node( 8aac: e5860018 str r0, [r6, #24] NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8ab0: e8b4000f ldm r4!, {r0, r1, r2, r3} 8ab4: e286c030 add ip, r6, #48 ; 0x30 8ab8: e8ac000f stmia ip!, {r0, r1, r2, r3} 8abc: e8b4000f ldm r4!, {r0, r1, r2, r3} 8ac0: e8ac000f stmia ip!, {r0, r1, r2, r3} 8ac4: e894000f ldm r4, {r0, r1, r2, r3} ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 8ac8: e586a020 str sl, [r6, #32] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8acc: e88c000f stm ip, {r0, r1, r2, r3} "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 8ad0: e586801c str r8, [r6, #28] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 8ad4: e3a00001 mov r0, #1 ; 0x1 8ad8: e3a0100c mov r1, #12 ; 0xc 8adc: eb000101 bl 8ee8 if ( !fs_info ){ 8ae0: e3500000 cmp r0, #0 ; 0x0 8ae4: 0a000009 beq 8b10 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8ae8: e5962018 ldr r2, [r6, #24] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 8aec: e3a03001 mov r3, #1 ; 0x1 8af0: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8af4: e5823038 str r3, [r2, #56] * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 8af8: e5808008 str r8, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8afc: e5809004 str r9, [r0, #4] fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ){ free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 8b00: e586002c str r0, [r6, #44] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8b04: e1a00007 mov r0, r7 return 0; } 8b08: e28dd004 add sp, sp, #4 ; 0x4 8b0c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ){ free(temp_mt_entry->mt_fs_root.node_access); 8b10: e5960018 ldr r0, [r6, #24] <== NOT EXECUTED 8b14: eb000132 bl 8fe4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8b18: eb000a26 bl b3b8 <__errno> <== NOT EXECUTED 8b1c: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 8b20: e5803000 str r3, [r0] <== NOT EXECUTED 8b24: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8b28: eafffff6 b 8b08 <== NOT EXECUTED =============================================================================== 00008b3c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8b3c: e92d40f0 push {r4, r5, r6, r7, lr} 8b40: e24dd03c sub sp, sp, #60 ; 0x3c IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, new_name, &result ); 8b44: e28d7007 add r7, sp, #7 ; 0x7 const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8b48: e1a05001 mov r5, r1 8b4c: e1a06002 mov r6, r2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, new_name, &result ); 8b50: e1a01007 mov r1, r7 8b54: e28d2038 add r2, sp, #56 ; 0x38 const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8b58: e1a04003 mov r4, r3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, new_name, &result ); 8b5c: ebffff76 bl 893c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8b60: e2053a0f and r3, r5, #61440 ; 0xf000 8b64: e3530901 cmp r3, #16384 ; 0x4000 8b68: 0a000013 beq 8bbc type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8b6c: e3530902 cmp r3, #32768 ; 0x8000 8b70: 03a01005 moveq r1, #5 ; 0x5 8b74: 0a000005 beq 8b90 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8b78: e3530a02 cmp r3, #8192 ; 0x2000 8b7c: 13530a06 cmpne r3, #24576 ; 0x6000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8b80: 058d6028 streq r6, [sp, #40] 8b84: 058d402c streq r4, [sp, #44] 8b88: 03a01002 moveq r1, #2 ; 0x2 if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8b8c: 1a00000c bne 8bc4 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 8b90: e28dc028 add ip, sp, #40 ; 0x28 8b94: e59d0050 ldr r0, [sp, #80] 8b98: e1a02007 mov r2, r7 8b9c: e1a03005 mov r3, r5 8ba0: e58dc000 str ip, [sp] 8ba4: eb0007db bl ab18 new_name, mode, &info ); if ( !new_node ) 8ba8: e3500000 cmp r0, #0 ; 0x0 8bac: 13a00000 movne r0, #0 ; 0x0 8bb0: 0a000008 beq 8bd8 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 8bb4: e28dd03c add sp, sp, #60 ; 0x3c 8bb8: e8bd80f0 pop {r4, r5, r6, r7, pc} type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 8bbc: e3a01001 mov r1, #1 ; 0x1 8bc0: eafffff2 b 8b90 8bc4: eb0009fb bl b3b8 <__errno> <== NOT EXECUTED 8bc8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 8bcc: e5803000 str r3, [r0] <== NOT EXECUTED 8bd0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8bd4: eafffff6 b 8bb4 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8bd8: eb0009f6 bl b3b8 <__errno> <== NOT EXECUTED 8bdc: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 8be0: e5803000 str r3, [r0] <== NOT EXECUTED 8be4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8be8: eafffff1 b 8bb4 <== NOT EXECUTED =============================================================================== 00008bf8 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 8bf8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 8bfc: e5904000 ldr r4, [r0] <== NOT EXECUTED /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 8c00: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 8c04: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 8c08: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 8c0c: e1a05000 mov r5, r0 <== NOT EXECUTED /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 8c10: 0a000003 beq 8c24 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8c14: e1a00004 mov r0, r4 <== NOT EXECUTED 8c18: eb0004a4 bl 9eb0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 8c1c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 8c20: e5843008 str r3, [r4, #8] <== NOT EXECUTED /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8c24: e1d433b4 ldrh r3, [r4, #52] <== NOT EXECUTED 8c28: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 8c2c: e1c433b4 strh r3, [r4, #52] <== NOT EXECUTED IMFS_update_ctime( the_jnode ); 8c30: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 8c34: e1a0000d mov r0, sp <== NOT EXECUTED 8c38: eb000150 bl 9180 <== NOT EXECUTED 8c3c: e59d3000 ldr r3, [sp] <== NOT EXECUTED /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 8c40: e1a00004 mov r0, r4 <== NOT EXECUTED /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; IMFS_update_ctime( the_jnode ); 8c44: e5843048 str r3, [r4, #72] <== NOT EXECUTED /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 8c48: eb00017a bl 9238 <== NOT EXECUTED 8c4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 8c50: 1a00000d bne 8c8c <== NOT EXECUTED 8c54: e1d413b4 ldrh r1, [r4, #52] <== NOT EXECUTED 8c58: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 8c5c: 1a00000a bne 8c8c <== NOT EXECUTED /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 8c60: e59f3044 ldr r3, [pc, #68] ; 8cac <== NOT EXECUTED 8c64: e5930000 ldr r0, [r3] <== NOT EXECUTED 8c68: e5952000 ldr r2, [r5] <== NOT EXECUTED 8c6c: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED 8c70: e1530002 cmp r3, r2 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 8c74: e594304c ldr r3, [r4, #76] <== NOT EXECUTED /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 8c78: 05801004 streq r1, [r0, #4] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 8c7c: e3530004 cmp r3, #4 ; 0x4 <== NOT EXECUTED 8c80: 0a000004 beq 8c98 <== NOT EXECUTED if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 8c84: e1a00004 mov r0, r4 <== NOT EXECUTED 8c88: eb0000d5 bl 8fe4 <== NOT EXECUTED } return 0; } 8c8c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 8c90: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 8c94: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 8c98: e5940050 ldr r0, [r4, #80] <== NOT EXECUTED 8c9c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 8ca0: 0afffff7 beq 8c84 <== NOT EXECUTED free( (void*) the_jnode->info.sym_link.name ); 8ca4: eb0000ce bl 8fe4 <== NOT EXECUTED 8ca8: eafffff5 b 8c84 <== NOT EXECUTED =============================================================================== 00008cb0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8cb0: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8cb4: e5904000 ldr r4, [r0] switch ( the_jnode->type ) { 8cb8: e594304c ldr r3, [r4, #76] 8cbc: e2433002 sub r3, r3, #2 ; 0x2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8cc0: e1a0c001 mov ip, r1 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 8cc4: e3530004 cmp r3, #4 ; 0x4 8cc8: 979ff103 ldrls pc, [pc, r3, lsl #2] 8ccc: ea000004 b 8ce4 <== NOT EXECUTED 8cd0: 00008d60 .word 0x00008d60 <== NOT EXECUTED 8cd4: 00008ce4 .word 0x00008ce4 <== NOT EXECUTED 8cd8: 00008d54 .word 0x00008d54 <== NOT EXECUTED 8cdc: 00008cf8 .word 0x00008cf8 <== NOT EXECUTED 8ce0: 00008cf8 .word 0x00008cf8 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8ce4: eb0009b3 bl b3b8 <__errno> <== NOT EXECUTED 8ce8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8cec: e5803000 str r3, [r0] <== NOT EXECUTED 8cf0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8cf4: e8bd8010 pop {r4, pc} <== NOT EXECUTED buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 8cf8: e5943050 ldr r3, [r4, #80] <== NOT EXECUTED 8cfc: e5813020 str r3, [r1, #32] <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 8d00: e5943038 ldr r3, [r4, #56] 8d04: e58c3008 str r3, [ip, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 8d08: e5942040 ldr r2, [r4, #64] 8d0c: e58c2024 str r2, [ip, #36] buf->st_mtime = the_jnode->stat_mtime; 8d10: e5943044 ldr r3, [r4, #68] 8d14: e58c302c str r3, [ip, #44] buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; 8d18: e59f3050 ldr r3, [pc, #80] ; 8d70 8d1c: e5932000 ldr r2, [r3] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8d20: e1d433b4 ldrh r3, [r4, #52] 8d24: e1cc31b0 strh r3, [ip, #16] buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8d28: e1d433bc ldrh r3, [r4, #60] 8d2c: e1cc31b2 strh r3, [ip, #18] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8d30: e5940048 ldr r0, [r4, #72] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8d34: e5941030 ldr r1, [r4, #48] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 8d38: e1d443be ldrh r4, [r4, #62] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8d3c: e58c0034 str r0, [ip, #52] buf->st_blksize = imfs_rq_memfile_bytes_per_block; 8d40: e58c203c str r2, [ip, #60] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8d44: e58c100c str r1, [ip, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 8d48: e1cc41b4 strh r4, [ip, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; 8d4c: e3a00000 mov r0, #0 ; 0x0 return 0; } 8d50: e8bd8010 pop {r4, pc} case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; break; case IMFS_SYM_LINK: buf->st_size = 0; 8d54: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 8d58: e5813020 str r3, [r1, #32] <== NOT EXECUTED 8d5c: eaffffe7 b 8d00 <== NOT EXECUTED switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 8d60: e2842050 add r2, r4, #80 ; 0x50 8d64: e892000c ldm r2, {r2, r3} 8d68: e881000c stm r1, {r2, r3} 8d6c: eaffffe3 b 8d00 =============================================================================== 000015bc : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 15bc: e59f30a4 ldr r3, [pc, #164] ; 1668 15c0: e5933000 ldr r3, [r3] 15c4: e3530000 cmp r3, #0 ; 0x0 void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 15c8: e92d4070 push {r4, r5, r6, lr} 15cc: e1a06000 mov r6, r0 15d0: e1a05001 mov r5, r1 15d4: e1a04002 mov r4, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->initialize)(); 15d8: 11a0e00f movne lr, pc 15dc: 1593f000 ldrne pc, [r3] /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 15e0: eb001fd1 bl 952c starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 15e4: e59f3080 ldr r3, [pc, #128] ; 166c 15e8: e5933000 ldr r3, [r3] 15ec: e3530000 cmp r3, #0 ; 0x0 15f0: 01a04006 moveq r4, r6 15f4: 0a000004 beq 160c starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 15f8: e1a01004 mov r1, r4 <== NOT EXECUTED 15fc: e1a00006 mov r0, r6 <== NOT EXECUTED 1600: e1a0e00f mov lr, pc <== NOT EXECUTED 1604: e593f000 ldr pc, [r3] <== NOT EXECUTED 1608: e1a04000 mov r4, r0 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( rtems_configuration_get_do_zero_of_workspace() ) 160c: e59f305c ldr r3, [pc, #92] ; 1670 1610: e5932000 ldr r2, [r3] 1614: e5d21028 ldrb r1, [r2, #40] 1618: e3510000 cmp r1, #0 ; 0x0 161c: 1a00000b bne 1650 void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 1620: e1a01004 mov r1, r4 1624: e59f0048 ldr r0, [pc, #72] ; 1674 1628: e1a02005 mov r2, r5 162c: e3a03004 mov r3, #4 ; 0x4 1630: eb001055 bl 578c <_Heap_Initialize> &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 1634: e3500000 cmp r0, #0 ; 0x0 1638: 0a000009 beq 1664 rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 163c: e59f2034 ldr r2, [pc, #52] ; 1678 1640: e5923000 ldr r3, [r2] 1644: e0853003 add r3, r5, r3 1648: e5823000 str r3, [r2] } 164c: e8bd8070 pop {r4, r5, r6, pc} * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( rtems_configuration_get_do_zero_of_workspace() ) memset( starting_address, 0, length ); 1650: e1a00004 mov r0, r4 <== NOT EXECUTED 1654: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1658: e1a02005 mov r2, r5 <== NOT EXECUTED 165c: eb00295e bl bbdc <== NOT EXECUTED 1660: eaffffee b 1620 <== NOT EXECUTED starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) rtems_fatal_error_occurred( status ); 1664: eb000e20 bl 4eec <== NOT EXECUTED =============================================================================== 00001ae0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 1ae0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 1ae4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 1ae8: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 1aec: 0a000036 beq 1bcc <== NOT EXECUTED return; if ( !print_handler ) 1af0: e59f312c ldr r3, [pc, #300] ; 1c24 <== NOT EXECUTED 1af4: e593a000 ldr sl, [r3] <== NOT EXECUTED 1af8: e35a0000 cmp sl, #0 ; 0x0 <== NOT EXECUTED 1afc: 0a000032 beq 1bcc <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 1b00: e3740001 cmn r4, #1 ; 0x1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 1b04: 159490f4 ldrne r9, [r4, #244] <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 1b08: 128470c4 addne r7, r4, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 1b0c: 0a000035 beq 1be8 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 1b10: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 1b14: e2835010 add r5, r3, #16 ; 0x10 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 1b18: e2428010 sub r8, r2, #16 ; 0x10 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 1b1c: e1a00005 mov r0, r5 <== NOT EXECUTED 1b20: e1a01008 mov r1, r8 <== NOT EXECUTED 1b24: ebffffd8 bl 1a8c <== NOT EXECUTED if ( high_water_mark ) 1b28: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 1b2c: 10853008 addne r3, r5, r8 <== 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 ) 1b30: 01a0b000 moveq fp, r0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 1b34: 1060b003 rsbne fp, r0, r3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 1b38: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 1b3c: 0a000031 beq 1c08 <== NOT EXECUTED (*print_handler)( 1b40: e5945008 ldr r5, [r4, #8] <== NOT EXECUTED 1b44: e59f60dc ldr r6, [pc, #220] ; 1c28 <== NOT EXECUTED 1b48: e28d200b add r2, sp, #11 ; 0xb <== NOT EXECUTED 1b4c: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 1b50: e1a00005 mov r0, r5 <== NOT EXECUTED 1b54: e5964000 ldr r4, [r6] <== NOT EXECUTED 1b58: eb000eee bl 5718 <== NOT EXECUTED 1b5c: e1a02005 mov r2, r5 <== NOT EXECUTED 1b60: e1a03000 mov r3, r0 <== NOT EXECUTED 1b64: e59f10c0 ldr r1, [pc, #192] ; 1c2c <== NOT EXECUTED 1b68: e1a00004 mov r0, r4 <== NOT EXECUTED 1b6c: e1a0e00f mov lr, pc <== NOT EXECUTED 1b70: e12fff1a bx sl <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 1b74: e5973000 ldr r3, [r7] <== NOT EXECUTED 1b78: e5972004 ldr r2, [r7, #4] <== NOT EXECUTED 1b7c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 1b80: e0823003 add r3, r2, r3 <== NOT EXECUTED 1b84: e5960000 ldr r0, [r6] <== NOT EXECUTED 1b88: e58d9000 str r9, [sp] <== NOT EXECUTED 1b8c: e58d8004 str r8, [sp, #4] <== NOT EXECUTED 1b90: e59f1098 ldr r1, [pc, #152] ; 1c30 <== NOT EXECUTED 1b94: e59fc088 ldr ip, [pc, #136] ; 1c24 <== NOT EXECUTED 1b98: e1a0e00f mov lr, pc <== NOT EXECUTED 1b9c: e59cf000 ldr pc, [ip] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 1ba0: e59f308c ldr r3, [pc, #140] ; 1c34 <== NOT EXECUTED 1ba4: e5932000 ldr r2, [r3] <== NOT EXECUTED 1ba8: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 1bac: e59f3070 ldr r3, [pc, #112] ; 1c24 <== NOT EXECUTED 1bb0: e59f0070 ldr r0, [pc, #112] ; 1c28 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 1bb4: 0a000006 beq 1bd4 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 1bb8: e5900000 ldr r0, [r0] <== NOT EXECUTED 1bbc: e1a0200b mov r2, fp <== NOT EXECUTED 1bc0: e59f1070 ldr r1, [pc, #112] ; 1c38 <== NOT EXECUTED 1bc4: e1a0e00f mov lr, pc <== NOT EXECUTED 1bc8: e593f000 ldr pc, [r3] <== NOT EXECUTED } } 1bcc: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 1bd0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 1bd4: e59f1060 ldr r1, [pc, #96] ; 1c3c <== NOT EXECUTED 1bd8: e5900000 ldr r0, [r0] <== NOT EXECUTED 1bdc: e1a0e00f mov lr, pc <== NOT EXECUTED 1be0: e593f000 ldr pc, [r3] <== NOT EXECUTED 1be4: eafffff8 b 1bcc <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 1be8: e59f2050 ldr r2, [pc, #80] ; 1c40 <== NOT EXECUTED 1bec: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 1bf0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 1bf4: 12844001 addne r4, r4, #1 ; 0x1 <== NOT EXECUTED 1bf8: 11a07002 movne r7, r2 <== NOT EXECUTED 1bfc: 11a09004 movne r9, r4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 1c00: 1affffc2 bne 1b10 <== NOT EXECUTED 1c04: eafffff0 b 1bcc <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 1c08: e59f6018 ldr r6, [pc, #24] ; 1c28 <== NOT EXECUTED 1c0c: e59f1030 ldr r1, [pc, #48] ; 1c44 <== NOT EXECUTED 1c10: e5960000 ldr r0, [r6] <== NOT EXECUTED 1c14: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED 1c18: e1a0e00f mov lr, pc <== NOT EXECUTED 1c1c: e12fff1a bx sl <== NOT EXECUTED 1c20: eaffffd3 b 1b74 <== NOT EXECUTED =============================================================================== 00001a8c : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 1a8c: e1a0c000 mov ip, r0 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 1a90: e3c11003 bic r1, r1, #3 ; 0x3 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 1a94: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 1a98: e0802001 add r2, r0, r1 <== NOT EXECUTED 1a9c: e1500002 cmp r0, r2 <== NOT EXECUTED 1aa0: 2a00000c bcs 1ad8 <== NOT EXECUTED if (*base != U32_PATTERN) 1aa4: e3a03ca6 mov r3, #42496 ; 0xa600 <== NOT EXECUTED 1aa8: e243305b sub r3, r3, #91 ; 0x5b <== NOT EXECUTED 1aac: e59c1010 ldr r1, [ip, #16] <== NOT EXECUTED 1ab0: e1833803 orr r3, r3, r3, lsl #16 <== NOT EXECUTED 1ab4: e1510003 cmp r1, r3 <== NOT EXECUTED 1ab8: 0a000003 beq 1acc <== NOT EXECUTED 1abc: e12fff1e bx lr <== NOT EXECUTED 1ac0: e5903000 ldr r3, [r0] <== NOT EXECUTED 1ac4: e1530001 cmp r3, r1 <== NOT EXECUTED 1ac8: 112fff1e bxne lr <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 1acc: e2800004 add r0, r0, #4 ; 0x4 <== NOT EXECUTED 1ad0: e1520000 cmp r2, r0 <== NOT EXECUTED 1ad4: 8afffff9 bhi 1ac0 <== NOT EXECUTED 1ad8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 1adc: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00005214 <_API_Mutex_Unlock>: rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 5214: e59f3024 ldr r3, [pc, #36] ; 5240 <_API_Mutex_Unlock+0x2c> 5218: e5932000 ldr r2, [r3] 521c: e2822001 add r2, r2, #1 ; 0x1 #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 5220: e52de004 push {lr} ; (str lr, [sp, #-4]!) 5224: e5832000 str r2, [r3] _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 5228: e3a02000 mov r2, #0 ; 0x0 522c: e5901008 ldr r1, [r0, #8] 5230: e2800010 add r0, r0, #16 ; 0x10 5234: eb00008a bl 5464 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); } 5238: e49de004 pop {lr} ; (ldr lr, [sp], #4) _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 523c: ea000583 b 6850 <_Thread_Enable_dispatch> =============================================================================== 000050dc <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 50dc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 50e0: e59f5030 ldr r5, [pc, #48] ; 5118 <_API_extensions_Run_postswitch+0x3c><== NOT EXECUTED 50e4: e4954004 ldr r4, [r5], #4 <== NOT EXECUTED !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 50e8: e1540005 cmp r4, r5 <== NOT EXECUTED 50ec: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 50f0: e59f6024 ldr r6, [pc, #36] ; 511c <_API_extensions_Run_postswitch+0x40><== NOT EXECUTED !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 50f4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 50f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 50fc: 15960000 ldrne r0, [r6] <== NOT EXECUTED 5100: 11a0e00f movne lr, pc <== NOT EXECUTED 5104: 112fff13 bxne r3 <== NOT EXECUTED Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 5108: e5944000 ldr r4, [r4] <== NOT EXECUTED { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 510c: e1540005 cmp r4, r5 <== NOT EXECUTED 5110: 1afffff7 bne 50f4 <_API_extensions_Run_postswitch+0x18> <== NOT EXECUTED 5114: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00009934 <_Barrier_Manager_initialization>: */ void _Barrier_Manager_initialization( uint32_t maximum_barriers ) { 9934: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Objects_Initialize_information( 9938: e3a0c060 mov ip, #96 ; 0x60 */ void _Barrier_Manager_initialization( uint32_t maximum_barriers ) { 993c: e24dd00c sub sp, sp, #12 ; 0xc 9940: e1a03000 mov r3, r0 _Objects_Initialize_information( 9944: e58dc000 str ip, [sp] 9948: e3a0e000 mov lr, #0 ; 0x0 994c: e24cc05c sub ip, ip, #92 ; 0x5c 9950: e59f0018 ldr r0, [pc, #24] ; 9970 <_Barrier_Manager_initialization+0x3c> 9954: e3a01002 mov r1, #2 ; 0x2 9958: e3a0200a mov r2, #10 ; 0xa 995c: e58de004 str lr, [sp, #4] 9960: e58dc008 str ip, [sp, #8] 9964: ebfff191 bl 5fb0 <_Objects_Initialize_information> , FALSE, /* TRUE if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 9968: e28dd00c add sp, sp, #12 ; 0xc 996c: e8bd8000 pop {pc} =============================================================================== 0001365c <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 1365c: e590304c ldr r3, [r0, #76] 13660: e1530002 cmp r3, r2 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 13664: e92d41f0 push {r4, r5, r6, r7, r8, lr} 13668: e1a07000 mov r7, r0 1366c: e1a06002 mov r6, r2 13670: e1a08001 mov r8, r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 13674: 33a00001 movcc r0, #1 ; 0x1 13678: 38bd81f0 popcc {r4, r5, r6, r7, r8, pc} * 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 ) { 1367c: e5973048 ldr r3, [r7, #72] 13680: e3530000 cmp r3, #0 ; 0x0 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 13684: 01a05003 moveq r5, r3 * 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 ) { 13688: 0a000009 beq 136b4 <_CORE_message_queue_Broadcast+0x58> *count = 0; 1368c: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED 13690: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 13694: e5823000 str r3, [r2] <== NOT EXECUTED 13698: e1a00003 mov r0, r3 <== NOT EXECUTED 1369c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 136a0: e594002c ldr r0, [r4, #44] 136a4: eb001e1b bl 1af18 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 136a8: e5943028 ldr r3, [r4, #40] 136ac: e5836000 str r6, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 136b0: e2855001 add r5, r5, #1 ; 0x1 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 136b4: e1a00007 mov r0, r7 136b8: eb00099d bl 15d34 <_Thread_queue_Dequeue> 136bc: e2504000 subs r4, r0, #0 ; 0x0 136c0: e1a01008 mov r1, r8 136c4: e1a02006 mov r2, r6 136c8: 1afffff4 bne 136a0 <_CORE_message_queue_Broadcast+0x44> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 136cc: e59d301c ldr r3, [sp, #28] 136d0: e1a00004 mov r0, r4 136d4: e5835000 str r5, [r3] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 136d8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000195c4 <_CORE_message_queue_Insert_message>: ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 195c4: e3520102 cmp r2, #-2147483648 ; 0x80000000 void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 195c8: e92d4030 push {r4, r5, lr} ISR_Level level; bool notify = false; the_message->priority = submit_type; 195cc: e5812008 str r2, [r1, #8] void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 195d0: e1a05001 mov r5, r1 195d4: e1a04000 mov r4, r0 ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 195d8: 0a000037 beq 196bc <_CORE_message_queue_Insert_message+0xf8> 195dc: e3720106 cmn r2, #-2147483647 ; 0x80000001 195e0: 0a000023 beq 19674 <_CORE_message_queue_Insert_message+0xb0> CORE_message_queue_Buffer_control *this_message; Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 195e4: e5901050 ldr r1, [r0, #80] <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 195e8: e2800054 add r0, r0, #84 ; 0x54 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { 195ec: e1500001 cmp r0, r1 <== NOT EXECUTED 195f0: 1a00001b bne 19664 <_CORE_message_queue_Insert_message+0xa0><== NOT EXECUTED 195f4: e1a01000 mov r1, r0 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 195f8: e10fc000 mrs ip, CPSR <== NOT EXECUTED 195fc: e38c30c0 orr r3, ip, #192 ; 0xc0 <== NOT EXECUTED 19600: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ( the_message_queue->number_of_pending_messages++ == 0 ) notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 19604: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 19608: e5941048 ldr r1, [r4, #72] <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 1960c: e5930000 ldr r0, [r3] <== NOT EXECUTED 19610: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED after_node->next = the_node; 19614: e5835000 str r5, [r3] <== NOT EXECUTED 19618: e5842048 str r2, [r4, #72] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1961c: e5853004 str r3, [r5, #4] <== NOT EXECUTED 19620: e2712001 rsbs r2, r1, #1 ; 0x1 <== NOT EXECUTED 19624: 33a02000 movcc r2, #0 ; 0x0 <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 19628: e5805004 str r5, [r0, #4] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 1962c: e5850000 str r0, [r5] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 19630: e129f00c msr CPSR_fc, ip <== NOT EXECUTED * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 19634: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 19638: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED 1963c: e5943060 ldr r3, [r4, #96] 19640: e3530000 cmp r3, #0 ; 0x0 19644: 08bd8030 popeq {r4, r5, pc} (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 19648: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 1964c: e1a0e00f mov lr, pc <== NOT EXECUTED 19650: e12fff13 bx r3 <== NOT EXECUTED 19654: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { the_node = the_node->next; 19658: e5911000 ldr r1, [r1] <== NOT EXECUTED Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 1965c: e1500001 cmp r0, r1 <== NOT EXECUTED 19660: 0affffe3 beq 195f4 <_CORE_message_queue_Insert_message+0x30><== NOT EXECUTED this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 19664: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 19668: e1520003 cmp r2, r3 <== NOT EXECUTED 1966c: aafffff9 bge 19658 <_CORE_message_queue_Insert_message+0x94><== NOT EXECUTED 19670: eaffffe0 b 195f8 <_CORE_message_queue_Insert_message+0x34> <== NOT EXECUTED the_message->priority = submit_type; switch ( submit_type ) { case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 19674: e10f0000 mrs r0, CPSR 19678: e38030c0 orr r3, r0, #192 ; 0xc0 1967c: e129f003 msr CPSR_fc, r3 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 19680: e2843054 add r3, r4, #84 ; 0x54 19684: e5813000 str r3, [r1] if ( the_message_queue->number_of_pending_messages++ == 0 ) 19688: e5942048 ldr r2, [r4, #72] old_last_node = the_chain->last; 1968c: e5941058 ldr r1, [r4, #88] 19690: e2823001 add r3, r2, #1 ; 0x1 the_chain->last = the_node; 19694: e5845058 str r5, [r4, #88] 19698: e5843048 str r3, [r4, #72] 1969c: e2722001 rsbs r2, r2, #1 ; 0x1 196a0: 33a02000 movcc r2, #0 ; 0x0 old_last_node->next = the_node; the_node->previous = old_last_node; 196a4: e5851004 str r1, [r5, #4] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 196a8: e5815000 str r5, [r1] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 196ac: e129f000 msr CPSR_fc, r0 * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 196b0: e3520000 cmp r2, #0 ; 0x0 196b4: 1affffe0 bne 1963c <_CORE_message_queue_Insert_message+0x78> 196b8: e8bd8030 pop {r4, r5, pc} notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 196bc: e10fc000 mrs ip, CPSR 196c0: e38c30c0 orr r3, ip, #192 ; 0xc0 196c4: e129f003 msr CPSR_fc, r3 if ( the_message_queue->number_of_pending_messages++ == 0 ) 196c8: e5901048 ldr r1, [r0, #72] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 196cc: e5900050 ldr r0, [r0, #80] 196d0: e2812001 add r2, r1, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 196d4: e2843050 add r3, r4, #80 ; 0x50 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 196d8: e5853004 str r3, [r5, #4] 196dc: e5842048 str r2, [r4, #72] before_node = after_node->next; after_node->next = the_node; 196e0: e5845050 str r5, [r4, #80] the_node->next = before_node; before_node->previous = the_node; 196e4: e5805004 str r5, [r0, #4] 196e8: e2712001 rsbs r2, r1, #1 ; 0x1 196ec: 33a02000 movcc r2, #0 ; 0x0 Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 196f0: e5850000 str r0, [r5] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 196f4: e129f00c msr CPSR_fc, ip * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 196f8: e3520000 cmp r2, #0 ; 0x0 196fc: 1affffce bne 1963c <_CORE_message_queue_Insert_message+0x78> 19700: e8bd8030 pop {r4, r5, pc} =============================================================================== 00013840 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 13840: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 13844: e59f8118 ldr r8, [pc, #280] ; 13964 <_CORE_message_queue_Seize+0x124> 13848: e598c000 ldr ip, [r8] void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1384c: e1a05000 mov r5, r0 13850: e1a00003 mov r0, r3 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 13854: e3a03000 mov r3, #0 ; 0x0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 13858: e1a07002 mov r7, r2 1385c: e59da020 ldr sl, [sp, #32] 13860: e5dd201c ldrb r2, [sp, #28] CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 13864: e58c3034 str r3, [ip, #52] _ISR_Disable( level ); 13868: e10f6000 mrs r6, CPSR 1386c: e38630c0 orr r3, r6, #192 ; 0xc0 13870: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 13874: e5954050 ldr r4, [r5, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 13878: e2853054 add r3, r5, #84 ; 0x54 1387c: e1540003 cmp r4, r3 13880: 0a000021 beq 1390c <_CORE_message_queue_Seize+0xcc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 13884: e5941000 ldr r1, [r4] the_chain->first = new_first; 13888: e1a03005 mov r3, r5 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 1388c: e5952048 ldr r2, [r5, #72] 13890: e5a31050 str r1, [r3, #80]! 13894: e2422001 sub r2, r2, #1 ; 0x1 new_first->previous = _Chain_Head(the_chain); 13898: e5813004 str r3, [r1, #4] 1389c: e5852048 str r2, [r5, #72] _ISR_Enable( level ); 138a0: e129f006 msr CPSR_fc, r6 *size_p = the_message->Contents.size; 138a4: e594300c ldr r3, [r4, #12] _Thread_Executing->Wait.count = the_message->priority; 138a8: e5981000 ldr r1, [r8] 138ac: e5942008 ldr r2, [r4, #8] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 138b0: e5803000 str r3, [r0] _Thread_Executing->Wait.count = the_message->priority; 138b4: e5812024 str r2, [r1, #36] _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p); 138b8: e2846010 add r6, r4, #16 ; 0x10 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 138bc: e5902000 ldr r2, [r0] 138c0: e1a01006 mov r1, r6 138c4: e1a00007 mov r0, r7 138c8: eb001d92 bl 1af18 * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 138cc: e1a00005 mov r0, r5 138d0: eb000917 bl 15d34 <_Thread_queue_Dequeue> if ( !the_thread ) { 138d4: e2501000 subs r1, r0, #0 ; 0x0 138d8: 0a00001d beq 13954 <_CORE_message_queue_Seize+0x114> * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 138dc: e5913024 ldr r3, [r1, #36] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 138e0: e5912030 ldr r2, [r1, #48] <== NOT EXECUTED * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 138e4: e5843008 str r3, [r4, #8] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 138e8: e584200c str r2, [r4, #12] <== NOT EXECUTED 138ec: e1a00006 mov r0, r6 <== NOT EXECUTED 138f0: e591102c ldr r1, [r1, #44] <== NOT EXECUTED 138f4: eb001d87 bl 1af18 <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 138f8: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED 138fc: e1a00005 mov r0, r5 <== NOT EXECUTED 13900: e1a01004 mov r1, r4 <== NOT EXECUTED executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 13904: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 13908: ea00172d b 195c4 <_CORE_message_queue_Insert_message> <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 1390c: e3520000 cmp r2, #0 ; 0x0 13910: 1a000003 bne 13924 <_CORE_message_queue_Seize+0xe4> _ISR_Enable( level ); 13914: e129f006 msr CPSR_fc, r6 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 13918: e3a03004 mov r3, #4 ; 0x4 1391c: e58c3034 str r3, [ip, #52] executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 13920: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 13924: e3a03001 mov r3, #1 ; 0x1 13928: e5853030 str r3, [r5, #48] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 1392c: e58c0028 str r0, [ip, #40] return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 13930: e58c1020 str r1, [ip, #32] executing->Wait.return_argument_second.mutable_object = buffer; 13934: e58c702c str r7, [ip, #44] executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 13938: e58c5044 str r5, [ip, #68] executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 1393c: e129f006 msr CPSR_fc, r6 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 13940: e59f2020 ldr r2, [pc, #32] ; 13968 <_CORE_message_queue_Seize+0x128> 13944: e1a00005 mov r0, r5 13948: e1a0100a mov r1, sl } 1394c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 13950: ea000959 b 15ebc <_Thread_queue_Enqueue_with_handler> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 13954: e2850068 add r0, r5, #104 ; 0x68 13958: e1a01004 mov r1, r4 } 1395c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} 13960: eaffff0e b 135a0 <_Chain_Append> =============================================================================== 0001396c <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 1396c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 13970: e590c04c ldr ip, [r0, #76] 13974: e15c0002 cmp ip, r2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 13978: e1a04000 mov r4, r0 1397c: e1a07002 mov r7, r2 13980: e1a0a001 mov sl, r1 13984: e1a09003 mov r9, r3 13988: e5dd8028 ldrb r8, [sp, #40] ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 1398c: 33a00001 movcc r0, #1 ; 0x1 13990: 38bd87f0 popcc {r4, r5, r6, r7, r8, r9, sl, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 13994: e5945048 ldr r5, [r4, #72] 13998: e3550000 cmp r5, #0 ; 0x0 1399c: 0a00001d beq 13a18 <_CORE_message_queue_Submit+0xac> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 139a0: e5943044 ldr r3, [r4, #68] 139a4: e1530005 cmp r3, r5 139a8: 8a00002a bhi 13a58 <_CORE_message_queue_Submit+0xec> * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 139ac: e3580000 cmp r8, #0 ; 0x0 139b0: 03a00002 moveq r0, #2 ; 0x2 139b4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 139b8: e59f30dc ldr r3, [pc, #220] ; 13a9c <_CORE_message_queue_Submit+0x130><== NOT EXECUTED 139bc: e5932000 ldr r2, [r3] <== NOT EXECUTED 139c0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 139c4: 1a000021 bne 13a50 <_CORE_message_queue_Submit+0xe4> <== NOT EXECUTED * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 139c8: e59f30d0 ldr r3, [pc, #208] ; 13aa0 <_CORE_message_queue_Submit+0x134><== NOT EXECUTED 139cc: e5932000 ldr r2, [r3] <== NOT EXECUTED _ISR_Disable( level ); 139d0: e10f1000 mrs r1, CPSR <== NOT EXECUTED 139d4: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 139d8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 139dc: e59d3024 ldr r3, [sp, #36] <== NOT EXECUTED 139e0: e5823024 str r3, [r2, #36] <== NOT EXECUTED 139e4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 139e8: e5843030 str r3, [r4, #48] <== NOT EXECUTED Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 139ec: e5829020 str r9, [r2, #32] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 139f0: e582a02c str sl, [r2, #44] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 139f4: e5827030 str r7, [r2, #48] <== NOT EXECUTED { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 139f8: e5824044 str r4, [r2, #68] <== NOT EXECUTED executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 139fc: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 13a00: e59f209c ldr r2, [pc, #156] ; 13aa4 <_CORE_message_queue_Submit+0x138><== NOT EXECUTED 13a04: e1a00004 mov r0, r4 <== NOT EXECUTED 13a08: e59d102c ldr r1, [sp, #44] <== NOT EXECUTED 13a0c: eb00092a bl 15ebc <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 13a10: e3a00007 mov r0, #7 ; 0x7 <== NOT EXECUTED 13a14: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 13a18: eb0008c5 bl 15d34 <_Thread_queue_Dequeue> if ( the_thread ) { 13a1c: e2506000 subs r6, r0, #0 ; 0x0 13a20: 05945048 ldreq r5, [r4, #72] 13a24: 0affffdd beq 139a0 <_CORE_message_queue_Submit+0x34> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 13a28: e1a0100a mov r1, sl 13a2c: e596002c ldr r0, [r6, #44] 13a30: e1a02007 mov r2, r7 13a34: eb001d37 bl 1af18 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 13a38: e5963028 ldr r3, [r6, #40] 13a3c: e5837000 str r7, [r3] the_thread->Wait.count = submit_type; 13a40: e59d3024 ldr r3, [sp, #36] 13a44: e1a00005 mov r0, r5 13a48: e5863024 str r3, [r6, #36] 13a4c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 13a50: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 13a54: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 13a58: e2840068 add r0, r4, #104 ; 0x68 13a5c: ebfffeda bl 135cc <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 13a60: e2505000 subs r5, r0, #0 ; 0x0 13a64: 0afffff9 beq 13a50 <_CORE_message_queue_Submit+0xe4> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 13a68: e1a0100a mov r1, sl 13a6c: e1a02007 mov r2, r7 13a70: e2850010 add r0, r5, #16 ; 0x10 13a74: eb001d27 bl 1af18 buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; the_message->priority = submit_type; 13a78: e59d3024 ldr r3, [sp, #36] 13a7c: e5853008 str r3, [r5, #8] _CORE_message_queue_Insert_message( 13a80: e1a00004 mov r0, r4 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 13a84: e585700c str r7, [r5, #12] the_message->priority = submit_type; _CORE_message_queue_Insert_message( 13a88: e1a01005 mov r1, r5 13a8c: e59d2024 ldr r2, [sp, #36] 13a90: eb0016cb bl 195c4 <_CORE_message_queue_Insert_message> 13a94: e3a00000 mov r0, #0 ; 0x0 13a98: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 00005274 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 5274: e92d40f0 push {r4, r5, r6, r7, lr} 5278: e1a05000 mov r5, r0 527c: e1a04002 mov r4, r2 5280: e1a07001 mov r7, r1 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 5284: e891000f ldm r1, {r0, r1, r2, r3} the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; 5288: e3a06000 mov r6, #0 ; 0x0 if ( initial_lock == CORE_MUTEX_LOCKED ) { 528c: e3540000 cmp r4, #0 ; 0x0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 5290: e285c040 add ip, r5, #64 ; 0x40 5294: e88c000f stm ip, {r0, r1, r2, r3} the_mutex->lock = initial_lock; 5298: e5854050 str r4, [r5, #80] the_mutex->blocked_count = 0; 529c: e5856058 str r6, [r5, #88] _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; 52a0: 15856060 strne r6, [r5, #96] #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 52a4: 15856054 strne r6, [r5, #84] the_mutex->holder = NULL; 52a8: 1585605c strne r6, [r5, #92] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 52ac: 1a00000b bne 52e0 <_CORE_mutex_Initialize+0x6c> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 52b0: e59f2070 ldr r2, [pc, #112] ; 5328 <_CORE_mutex_Initialize+0xb4> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 52b4: e3a03001 mov r3, #1 ; 0x1 the_mutex->holder = _Thread_Executing; 52b8: e5921000 ldr r1, [r2] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 52bc: e5853054 str r3, [r5, #84] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 52c0: e5952048 ldr r2, [r5, #72] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 52c4: e5913008 ldr r3, [r1, #8] if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 52c8: e3520002 cmp r2, #2 ; 0x2 the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 52cc: e5853060 str r3, [r5, #96] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 52d0: e585105c str r1, [r5, #92] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 52d4: 0a00000a beq 5304 <_CORE_mutex_Initialize+0x90> 52d8: e3520003 cmp r2, #3 ; 0x3 52dc: 0a000008 beq 5304 <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 52e0: e5971008 ldr r1, [r7, #8] 52e4: e1a00005 mov r0, r5 52e8: e2511000 subs r1, r1, #0 ; 0x0 52ec: 13a01001 movne r1, #1 ; 0x1 52f0: e3a02b01 mov r2, #1024 ; 0x400 52f4: e3a03005 mov r3, #5 ; 0x5 52f8: eb000768 bl 70a0 <_Thread_queue_Initialize> 52fc: e3a00000 mov r0, #0 ; 0x0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 5300: e8bd80f0 pop {r4, r5, r6, r7, pc} the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 5304: e595304c ldr r3, [r5, #76] 5308: e5912014 ldr r2, [r1, #20] 530c: e1520003 cmp r2, r3 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 5310: 2591301c ldrcs r3, [r1, #28] 5314: 22833001 addcs r3, r3, #1 ; 0x1 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 5318: 33a00006 movcc r0, #6 ; 0x6 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 531c: 2581301c strcs r3, [r1, #28] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 5320: 2affffee bcs 52e0 <_CORE_mutex_Initialize+0x6c> 5324: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 0000532c <_CORE_mutex_Seize_interrupt_blocking>: ) { Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 532c: e5903048 ldr r3, [r0, #72] <== NOT EXECUTED 5330: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED Watchdog_Interval timeout ) { Thread_Control *executing; executing = _Thread_Executing; 5334: e59f3054 ldr r3, [pc, #84] ; 5390 <_CORE_mutex_Seize_interrupt_blocking+0x64><== NOT EXECUTED void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 5338: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 533c: e1a05001 mov r5, r1 <== NOT EXECUTED 5340: e1a04000 mov r4, r0 <== NOT EXECUTED Thread_Control *executing; executing = _Thread_Executing; 5344: e5931000 ldr r1, [r3] <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 5348: 0a000008 beq 5370 <_CORE_mutex_Seize_interrupt_blocking+0x44><== NOT EXECUTED FALSE ); } } the_mutex->blocked_count++; 534c: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED 5350: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 5354: e5843058 str r3, [r4, #88] <== NOT EXECUTED _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 5358: e1a00004 mov r0, r4 <== NOT EXECUTED 535c: e1a01005 mov r1, r5 <== NOT EXECUTED 5360: e59f202c ldr r2, [pc, #44] ; 5394 <_CORE_mutex_Seize_interrupt_blocking+0x68><== NOT EXECUTED 5364: eb000681 bl 6d70 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED _Thread_Enable_dispatch(); } 5368: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } the_mutex->blocked_count++; _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); _Thread_Enable_dispatch(); 536c: ea000537 b 6850 <_Thread_Enable_dispatch> <== NOT EXECUTED { Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( the_mutex->holder->current_priority > executing->current_priority ) { 5370: e590005c ldr r0, [r0, #92] <== NOT EXECUTED 5374: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED 5378: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 537c: e1530001 cmp r3, r1 <== NOT EXECUTED 5380: 9afffff1 bls 534c <_CORE_mutex_Seize_interrupt_blocking+0x20><== NOT EXECUTED _Thread_Change_priority( 5384: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 5388: eb0003be bl 6288 <_Thread_Change_priority> <== NOT EXECUTED 538c: eaffffee b 534c <_CORE_mutex_Seize_interrupt_blocking+0x20><== NOT EXECUTED =============================================================================== 00009f64 <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 9f64: e59f313c ldr r3, [pc, #316] ; a0a8 <_CORE_mutex_Seize_interrupt_trylock+0x144> 9f68: e593c000 ldr ip, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9f6c: e3a02000 mov r2, #0 ; 0x0 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 9f70: e92d4010 push {r4, lr} CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 9f74: e5914000 ldr r4, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9f78: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9f7c: e5903050 ldr r3, [r0, #80] 9f80: e1530002 cmp r3, r2 9f84: 0a00000d beq 9fc0 <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; 9f88: e5802050 str r2, [r0, #80] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 9f8c: e5901048 ldr r1, [r0, #72] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 9f90: e59c2008 ldr r2, [ip, #8] the_mutex->nest_count = 1; 9f94: e3a03001 mov r3, #1 ; 0x1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9f98: e3510002 cmp r1, #2 ; 0x2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 9f9c: e5802060 str r2, [r0, #96] the_mutex->nest_count = 1; 9fa0: e5803054 str r3, [r0, #84] 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; 9fa4: e580c05c str ip, [r0, #92] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9fa8: 0a000009 beq 9fd4 <_CORE_mutex_Seize_interrupt_trylock+0x70> 9fac: e3510003 cmp r1, #3 ; 0x3 <== NOT EXECUTED 9fb0: 0a000007 beq 9fd4 <_CORE_mutex_Seize_interrupt_trylock+0x70><== NOT EXECUTED executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 9fb4: e129f004 msr CPSR_fc, r4 9fb8: e3a00000 mov r0, #0 ; 0x0 9fbc: 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 ) ) { 9fc0: e590305c ldr r3, [r0, #92] 9fc4: e15c0003 cmp ip, r3 9fc8: 0a000017 beq a02c <_CORE_mutex_Seize_interrupt_trylock+0xc8> the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( level ); 9fcc: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9fd0: e8bd8010 pop {r4, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9fd4: e59c301c ldr r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9fd8: e3510003 cmp r1, #3 ; 0x3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9fdc: e2833001 add r3, r3, #1 ; 0x1 9fe0: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9fe4: 1afffff2 bne 9fb4 <_CORE_mutex_Seize_interrupt_trylock+0x50> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 9fe8: e590204c ldr r2, [r0, #76] <== NOT EXECUTED current = executing->current_priority; 9fec: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED if ( current == ceiling ) { 9ff0: e1520003 cmp r2, r3 <== NOT EXECUTED 9ff4: 0a00001c beq a06c <_CORE_mutex_Seize_interrupt_trylock+0x108><== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 9ff8: 3a00001e bcc a078 <_CORE_mutex_Seize_interrupt_trylock+0x114><== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9ffc: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ a000: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; a004: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a008: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ a00c: e5802054 str r2, [r0, #84] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; a010: e5801050 str r1, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ a014: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED a018: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED a01c: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); a020: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED a024: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a028: e8bd8010 pop {r4, pc} <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { a02c: e5903040 ldr r3, [r0, #64] a030: e3530000 cmp r3, #0 ; 0x0 a034: 0a000006 beq a054 <_CORE_mutex_Seize_interrupt_trylock+0xf0> a038: e3530001 cmp r3, #1 ; 0x1 a03c: 1affffe2 bne 9fcc <_CORE_mutex_Seize_interrupt_trylock+0x68> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; a040: e3a03002 mov r3, #2 ; 0x2 a044: e58c3034 str r3, [ip, #52] _ISR_Enable( level ); a048: e129f004 msr CPSR_fc, r4 a04c: e3a00000 mov r0, #0 ; 0x0 a050: e8bd8010 pop {r4, pc} * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; a054: e5903054 ldr r3, [r0, #84] a058: e2833001 add r3, r3, #1 ; 0x1 a05c: e5803054 str r3, [r0, #84] _ISR_Enable( level ); a060: e129f004 msr CPSR_fc, r4 a064: e3a00000 mov r0, #0 ; 0x0 a068: e8bd8010 pop {r4, pc} Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); a06c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED a070: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a074: e8bd8010 pop {r4, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a078: e59f202c ldr r2, [pc, #44] ; a0ac <_CORE_mutex_Seize_interrupt_trylock+0x148><== NOT EXECUTED a07c: e5923000 ldr r3, [r2] <== NOT EXECUTED a080: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED a084: e5823000 str r3, [r2] <== NOT EXECUTED return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( level ); a088: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED _Thread_Change_priority( a08c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED a090: e590104c ldr r1, [r0, #76] <== NOT EXECUTED a094: e590005c ldr r0, [r0, #92] <== NOT EXECUTED a098: ebfff07a bl 6288 <_Thread_Change_priority> <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); a09c: ebfff1eb bl 6850 <_Thread_Enable_dispatch> <== NOT EXECUTED a0a0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a0a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00005464 <_CORE_mutex_Surrender>: * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 5464: e5d03044 ldrb r3, [r0, #68] 5468: e3530000 cmp r3, #0 ; 0x0 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 546c: e92d4010 push {r4, lr} 5470: e1a04000 mov r4, r0 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 5474: e590005c ldr r0, [r0, #92] * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 5478: 0a000004 beq 5490 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 547c: e59f3138 ldr r3, [pc, #312] ; 55bc <_CORE_mutex_Surrender+0x158> 5480: e5932000 ldr r2, [r3] 5484: e1500002 cmp r0, r2 5488: 13a00003 movne r0, #3 ; 0x3 548c: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 5490: e5943054 ldr r3, [r4, #84] 5494: e3530000 cmp r3, #0 ; 0x0 5498: 0a000020 beq 5520 <_CORE_mutex_Surrender+0xbc> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 549c: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 54a0: e3530000 cmp r3, #0 ; 0x0 /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 54a4: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 54a8: 1a00001e bne 5528 <_CORE_mutex_Surrender+0xc4> 54ac: e5942048 ldr r2, [r4, #72] /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 54b0: e3520002 cmp r2, #2 ; 0x2 54b4: 0a00002c beq 556c <_CORE_mutex_Surrender+0x108> 54b8: e3520003 cmp r2, #3 ; 0x3 54bc: 0a00002a beq 556c <_CORE_mutex_Surrender+0x108> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 54c0: e3a03000 mov r3, #0 ; 0x0 /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 54c4: e3520002 cmp r2, #2 ; 0x2 first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0; 54c8: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 54cc: e584305c str r3, [r4, #92] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 54d0: 0a00001b beq 5544 <_CORE_mutex_Surrender+0xe0> 54d4: e3520003 cmp r2, #3 ; 0x3 54d8: 0a000019 beq 5544 <_CORE_mutex_Surrender+0xe0> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 54dc: e1a00004 mov r0, r4 54e0: eb0005c0 bl 6be8 <_Thread_queue_Dequeue> 54e4: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 54e8: 03a03001 moveq r3, #1 ; 0x1 54ec: 05843050 streq r3, [r4, #80] 54f0: 01a00001 moveq r0, r1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 54f4: 08bd8010 popeq {r4, pc} the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 54f8: e594c048 ldr ip, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 54fc: e5912008 ldr r2, [r1, #8] the_mutex->nest_count = 1; 5500: e3a03001 mov r3, #1 ; 0x1 switch ( the_mutex->Attributes.discipline ) { 5504: e35c0002 cmp ip, #2 ; 0x2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 5508: e5842060 str r2, [r4, #96] the_mutex->nest_count = 1; 550c: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 5510: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 5514: 0a000023 beq 55a8 <_CORE_mutex_Surrender+0x144> 5518: e35c0003 cmp ip, #3 ; 0x3 551c: 0a000016 beq 557c <_CORE_mutex_Surrender+0x118> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5520: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 5524: e8bd8010 pop {r4, pc} return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 5528: e5943040 ldr r3, [r4, #64] 552c: e3530000 cmp r3, #0 ; 0x0 5530: 0afffffa beq 5520 <_CORE_mutex_Surrender+0xbc> 5534: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 5538: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 553c: 1affffda bne 54ac <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 5540: e8bd8010 pop {r4, pc} <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 5544: e590301c ldr r3, [r0, #28] 5548: e3530000 cmp r3, #0 ; 0x0 554c: 1affffe2 bne 54dc <_CORE_mutex_Surrender+0x78> 5550: e5901018 ldr r1, [r0, #24] 5554: e5903014 ldr r3, [r0, #20] 5558: e1510003 cmp r1, r3 555c: 0affffde beq 54dc <_CORE_mutex_Surrender+0x78> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 5560: e3a02001 mov r2, #1 ; 0x1 5564: eb000347 bl 6288 <_Thread_Change_priority> 5568: eaffffdb b 54dc <_CORE_mutex_Surrender+0x78> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 556c: e590301c ldr r3, [r0, #28] 5570: e2433001 sub r3, r3, #1 ; 0x1 5574: e580301c str r3, [r0, #28] 5578: eaffffd0 b 54c0 <_CORE_mutex_Surrender+0x5c> case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 557c: e591301c ldr r3, [r1, #28] <== NOT EXECUTED 5580: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 5584: e581301c str r3, [r1, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 5588: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED 558c: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 5590: e1510002 cmp r1, r2 <== NOT EXECUTED 5594: 2affffe1 bcs 5520 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 5598: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 559c: eb000339 bl 6288 <_Thread_Change_priority> <== NOT EXECUTED 55a0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 55a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 55a8: e591301c ldr r3, [r1, #28] 55ac: e2833001 add r3, r3, #1 ; 0x1 55b0: e581301c str r3, [r1, #28] 55b4: e3a00000 mov r0, #0 ; 0x0 55b8: e8bd8010 pop {r4, pc} =============================================================================== 00009e44 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 9e44: e59f3010 ldr r3, [pc, #16] ; 9e5c <_Debug_Is_enabled+0x18> <== NOT EXECUTED 9e48: e5932000 ldr r2, [r3] <== NOT EXECUTED 9e4c: e1100002 tst r0, r2 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 9e50: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 9e54: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 9e58: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00009974 <_Dual_ported_memory_Manager_initialization>: */ void _Dual_ported_memory_Manager_initialization( uint32_t maximum_ports ) { 9974: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Objects_Initialize_information( 9978: e3a0c01c mov ip, #28 ; 0x1c */ void _Dual_ported_memory_Manager_initialization( uint32_t maximum_ports ) { 997c: e24dd00c sub sp, sp, #12 ; 0xc 9980: e1a03000 mov r3, r0 _Objects_Initialize_information( 9984: e58dc000 str ip, [sp] 9988: e3a0e000 mov lr, #0 ; 0x0 998c: e24cc018 sub ip, ip, #24 ; 0x18 9990: e59f0018 ldr r0, [pc, #24] ; 99b0 <_Dual_ported_memory_Manager_initialization+0x3c> 9994: e3a01002 mov r1, #2 ; 0x2 9998: e3a02007 mov r2, #7 ; 0x7 999c: e58de004 str lr, [sp, #4] 99a0: e58dc008 str ip, [sp, #8] 99a4: ebfff181 bl 5fb0 <_Objects_Initialize_information> , FALSE, /* TRUE if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 99a8: e28dd00c add sp, sp, #12 ; 0xc 99ac: e8bd8000 pop {pc} =============================================================================== 000041e4 <_Event_Seize>: rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 41e4: e59fc108 ldr ip, [pc, #264] ; 42f4 <_Event_Seize+0x110> rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 41e8: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 41ec: e59c5000 ldr r5, [ip] executing->Wait.return_code = RTEMS_SUCCESSFUL; 41f0: e3a04000 mov r4, #0 ; 0x0 41f4: e5854034 str r4, [r5, #52] rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 41f8: e1a08002 mov r8, r2 41fc: e1a07003 mov r7, r3 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4200: e5954104 ldr r4, [r5, #260] _ISR_Disable( level ); 4204: e10f6000 mrs r6, CPSR 4208: e38630c0 orr r3, r6, #192 ; 0xc0 420c: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 4210: e5942000 ldr r2, [r4] seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 4214: e010c002 ands ip, r0, r2 4218: 0a000003 beq 422c <_Event_Seize+0x48> 421c: e150000c cmp r0, ip 4220: 0a00001f beq 42a4 <_Event_Seize+0xc0> 4224: e3110002 tst r1, #2 ; 0x2 4228: 1a00001d bne 42a4 <_Event_Seize+0xc0> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 422c: e3110001 tst r1, #1 ; 0x1 4230: 1a000016 bne 4290 <_Event_Seize+0xac> executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4234: e59f40bc ldr r4, [pc, #188] ; 42f8 <_Event_Seize+0x114> 4238: e3a03001 mov r3, #1 ; 0x1 423c: e5843000 str r3, [r4] executing->Wait.option = (uint32_t) option_set; 4240: e5851030 str r1, [r5, #48] executing->Wait.count = (uint32_t) event_in; 4244: e5850024 str r0, [r5, #36] executing->Wait.return_argument = event_out; 4248: e5857028 str r7, [r5, #40] _ISR_Enable( level ); 424c: e129f006 msr CPSR_fc, r6 if ( ticks ) { 4250: e3580000 cmp r8, #0 ; 0x0 4254: 1a00001a bne 42c4 <_Event_Seize+0xe0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 4258: e1a00005 mov r0, r5 425c: e3a01c01 mov r1, #256 ; 0x100 4260: eb000bfe bl 7260 <_Thread_Set_state> _ISR_Disable( level ); 4264: e10f2000 mrs r2, CPSR 4268: e38230c0 orr r3, r2, #192 ; 0xc0 426c: e129f003 msr CPSR_fc, r3 sync_state = _Event_Sync_state; 4270: e5940000 ldr r0, [r4] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4274: e3a03000 mov r3, #0 ; 0x0 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4278: e3500001 cmp r0, #1 ; 0x1 _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 427c: e5843000 str r3, [r4] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4280: 0a00000d beq 42bc <_Event_Seize+0xd8> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 4284: e1a01005 mov r1, r5 <== NOT EXECUTED } 4288: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 428c: ea0007e9 b 6238 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4290: e129f006 msr CPSR_fc, r6 executing->Wait.return_code = RTEMS_UNSATISFIED; 4294: e3a0300d mov r3, #13 ; 0xd 4298: e5853034 str r3, [r5, #52] *event_out = seized_events; 429c: e587c000 str ip, [r7] 42a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 42a4: e1e0300c mvn r3, ip 42a8: e0033002 and r3, r3, r2 42ac: e5843000 str r3, [r4] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 42b0: e129f006 msr CPSR_fc, r6 *event_out = seized_events; 42b4: e587c000 str ip, [r7] 42b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 42bc: e129f002 msr CPSR_fc, r2 42c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} executing->Wait.return_argument = event_out; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 42c4: e5953008 ldr r3, [r5, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 42c8: e59f202c ldr r2, [pc, #44] ; 42fc <_Event_Seize+0x118> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 42cc: e3a01000 mov r1, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 42d0: e585106c str r1, [r5, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 42d4: e5851050 str r1, [r5, #80] the_watchdog->routine = routine; 42d8: e5852064 str r2, [r5, #100] the_watchdog->id = id; 42dc: e5853068 str r3, [r5, #104] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 42e0: e5858054 str r8, [r5, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 42e4: e59f0014 ldr r0, [pc, #20] ; 4300 <_Event_Seize+0x11c> 42e8: e2851048 add r1, r5, #72 ; 0x48 42ec: eb000ddd bl 7a68 <_Watchdog_Insert> 42f0: eaffffd8 b 4258 <_Event_Seize+0x74> =============================================================================== 0000435c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 435c: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 4360: e590c104 ldr ip, [r0, #260] */ void _Event_Surrender( Thread_Control *the_thread ) { 4364: e1a04000 mov r4, r0 rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; 4368: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 436c: e10f6000 mrs r6, CPSR 4370: e38630c0 orr r3, r6, #192 ; 0xc0 4374: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 4378: e59c0000 ldr r0, [ip] event_condition = (rtems_event_set) the_thread->Wait.count; 437c: e5941024 ldr r1, [r4, #36] seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4380: e0115000 ands r5, r1, r0 4384: 0a000024 beq 441c <_Event_Surrender+0xc0> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4388: e59f3118 ldr r3, [pc, #280] ; 44a8 <_Event_Surrender+0x14c> 438c: e5932000 ldr r2, [r3] 4390: e3520000 cmp r2, #0 ; 0x0 4394: 0a000003 beq 43a8 <_Event_Surrender+0x4c> 4398: e59f310c ldr r3, [pc, #268] ; 44ac <_Event_Surrender+0x150> 439c: e5932000 ldr r2, [r3] 43a0: e1540002 cmp r4, r2 43a4: 0a000029 beq 4450 <_Event_Surrender+0xf4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 43a8: e5943010 ldr r3, [r4, #16] 43ac: e3130c01 tst r3, #256 ; 0x100 43b0: 0a000017 beq 4414 <_Event_Surrender+0xb8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 43b4: e1510005 cmp r1, r5 43b8: 0a000001 beq 43c4 <_Event_Surrender+0x68> 43bc: e3170002 tst r7, #2 ; 0x2 43c0: 0a000013 beq 4414 <_Event_Surrender+0xb8> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 43c4: e1e03005 mvn r3, r5 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 43c8: e5941028 ldr r1, [r4, #40] /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 43cc: e0033000 and r3, r3, r0 the_thread->Wait.count = 0; 43d0: e3a02000 mov r2, #0 ; 0x0 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 43d4: e58c3000 str r3, [ip] the_thread->Wait.count = 0; 43d8: e5842024 str r2, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 43dc: e5815000 str r5, [r1] _ISR_Flash( level ); 43e0: e10f3000 mrs r3, CPSR 43e4: e129f006 msr CPSR_fc, r6 43e8: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 43ec: e5943050 ldr r3, [r4, #80] 43f0: e3530002 cmp r3, #2 ; 0x2 43f4: 0a00000a beq 4424 <_Event_Surrender+0xc8> _ISR_Enable( level ); 43f8: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 43fc: e3a01201 mov r1, #268435456 ; 0x10000000 4400: e2811bff add r1, r1, #261120 ; 0x3fc00 4404: e1a00004 mov r0, r4 4408: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 440c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 4410: ea000807 b 6434 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 4414: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 4418: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 441c: e129f006 msr CPSR_fc, r6 4420: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4424: e3a03003 mov r3, #3 ; 0x3 4428: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 442c: e129f006 msr CPSR_fc, r6 (void) _Watchdog_Remove( &the_thread->Timer ); 4430: e2840048 add r0, r4, #72 ; 0x48 4434: eb000dfa bl 7c24 <_Watchdog_Remove> 4438: e3a01201 mov r1, #268435456 ; 0x10000000 443c: e2811bff add r1, r1, #261120 ; 0x3fc00 4440: e1a00004 mov r0, r4 4444: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 4448: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 444c: ea0007f8 b 6434 <_Thread_Clear_state> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4450: e59f8058 ldr r8, [pc, #88] ; 44b0 <_Event_Surrender+0x154> <== NOT EXECUTED 4454: e5983000 ldr r3, [r8] <== NOT EXECUTED 4458: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 445c: 0a000002 beq 446c <_Event_Surrender+0x110> <== NOT EXECUTED 4460: e5983000 ldr r3, [r8] <== NOT EXECUTED 4464: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 4468: 1affffce bne 43a8 <_Event_Surrender+0x4c> <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 446c: e1510005 cmp r1, r5 <== NOT EXECUTED 4470: 0a000001 beq 447c <_Event_Surrender+0x120> <== NOT EXECUTED 4474: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 4478: 0a000008 beq 44a0 <_Event_Surrender+0x144> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 447c: e1e03005 mvn r3, r5 <== NOT EXECUTED 4480: e0033000 and r3, r3, r0 <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4484: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 4488: e58c3000 str r3, [ip] <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 448c: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 4490: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 4494: e5843024 str r3, [r4, #36] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4498: e5882000 str r2, [r8] <== NOT EXECUTED ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 449c: e5815000 str r5, [r1] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 44a0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 44a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 000044b4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 44b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 44b8: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 44bc: e1a0100d mov r1, sp <== NOT EXECUTED 44c0: eb0008eb bl 6874 <_Thread_Get> <== NOT EXECUTED switch ( location ) { 44c4: e59d1000 ldr r1, [sp] <== NOT EXECUTED 44c8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 44cc: 1a000015 bne 4528 <_Event_Timeout+0x74> <== NOT EXECUTED * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 44d0: e10fc000 mrs ip, CPSR <== NOT EXECUTED 44d4: e38c30c0 orr r3, ip, #192 ; 0xc0 <== NOT EXECUTED 44d8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 44dc: e5903024 ldr r3, [r0, #36] <== NOT EXECUTED 44e0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 44e4: 0a000011 beq 4530 <_Event_Timeout+0x7c> <== NOT EXECUTED _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 44e8: e59f3070 ldr r3, [pc, #112] ; 4560 <_Event_Timeout+0xac> <== NOT EXECUTED 44ec: e5932000 ldr r2, [r3] <== NOT EXECUTED 44f0: e1500002 cmp r0, r2 <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 44f4: e5801024 str r1, [r0, #36] <== NOT EXECUTED if ( _Thread_Is_executing( the_thread ) ) { 44f8: 0a000012 beq 4548 <_Event_Timeout+0x94> <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 44fc: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED 4500: e5803034 str r3, [r0, #52] <== NOT EXECUTED _ISR_Enable( level ); 4504: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 4508: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED 450c: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED 4510: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED 4514: eb0007c6 bl 6434 <_Thread_Clear_state> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4518: e59f2044 ldr r2, [pc, #68] ; 4564 <_Event_Timeout+0xb0> <== NOT EXECUTED 451c: e5923000 ldr r3, [r2] <== NOT EXECUTED 4520: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 4524: e5823000 str r3, [r2] <== NOT EXECUTED case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4528: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 452c: e8bd8000 pop {pc} <== NOT EXECUTED 4530: e59f202c ldr r2, [pc, #44] ; 4564 <_Event_Timeout+0xb0> <== NOT EXECUTED 4534: e5923000 ldr r3, [r2] <== NOT EXECUTED 4538: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 453c: e5823000 str r3, [r2] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4540: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 4544: eafffff7 b 4528 <_Event_Timeout+0x74> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 4548: e59f2018 ldr r2, [pc, #24] ; 4568 <_Event_Timeout+0xb4> <== NOT EXECUTED 454c: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 4550: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4554: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 4558: 95823000 strls r3, [r2] <== NOT EXECUTED 455c: eaffffe6 b 44fc <_Event_Timeout+0x48> <== NOT EXECUTED =============================================================================== 000085c0 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 85c0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 85c4: e5909010 ldr r9, [r0, #16] void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 85c8: e1a07000 mov r7, r0 85cc: e1a03001 mov r3, r1 85d0: e24dd010 sub sp, sp, #16 ; 0x10 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 85d4: e1a00001 mov r0, r1 void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 85d8: e2433004 sub r3, r3, #4 ; 0x4 void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 85dc: e1a0b002 mov fp, r2 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 85e0: e1a01009 mov r1, r9 85e4: e5972014 ldr r2, [r7, #20] void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 85e8: e58d3004 str r3, [sp, #4] uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 85ec: eb000163 bl 8b80 <_Heap_Calc_block_size> if(the_size == 0) 85f0: e3500000 cmp r0, #0 ; 0x0 85f4: e58d0008 str r0, [sp, #8] 85f8: 0a000064 beq 8790 <_Heap_Allocate_aligned+0x1d0> */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 85fc: e5975008 ldr r5, [r7, #8] return NULL; if(alignment == 0) 8600: e35b0000 cmp fp, #0 ; 0x0 8604: 03a0b004 moveq fp, #4 ; 0x4 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 8608: e1570005 cmp r7, r5 860c: 0a00005f beq 8790 <_Heap_Allocate_aligned+0x1d0> 8610: e3a0a000 mov sl, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 8614: e5953004 ldr r3, [r5, #4] uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 8618: e59d1008 ldr r1, [sp, #8] 861c: e3c36001 bic r6, r3, #1 ; 0x1 8620: e1510006 cmp r1, r6 8624: 8a000023 bhi 86b8 <_Heap_Allocate_aligned+0xf8> return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; aligned_user_addr = block_end - end_to_user_offs; 8628: e59d3004 ldr r3, [sp, #4] /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 862c: e0852006 add r2, r5, r6 aligned_user_addr = block_end - end_to_user_offs; 8630: e0634002 rsb r4, r3, r2 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 8634: e1a0100b mov r1, fp 8638: e1a00004 mov r0, r4 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 863c: e58d200c str r2, [sp, #12] 8640: eb003ba6 bl 174e0 <__umodsi3> 8644: e0608004 rsb r8, r0, r4 if(block_size >= the_size) { /* the_block is large enough. */ _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 8648: e1a00008 mov r0, r8 864c: e1a01009 mov r1, r9 8650: eb003ba2 bl 174e0 <__umodsi3> 8654: e2854008 add r4, r5, #8 ; 0x8 8658: e0602008 rsb r2, r0, r8 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 865c: e1540002 cmp r4, r2 8660: 8a000014 bhi 86b8 <_Heap_Allocate_aligned+0xf8> /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 8664: e597c014 ldr ip, [r7, #20] 8668: e0643002 rsb r3, r4, r2 866c: e153000c cmp r3, ip 8670: 2a00001c bcs 86e8 <_Heap_Allocate_aligned+0x128> 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 8674: e0643008 rsb r3, r4, r8 8678: e1590003 cmp r9, r3 867c: 81a02004 movhi r2, r4 8680: 8a000018 bhi 86e8 <_Heap_Allocate_aligned+0x128> uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 8684: e1a00004 mov r0, r4 8688: e1a0100b mov r1, fp 868c: e58dc000 str ip, [sp] 8690: eb003b92 bl 174e0 <__umodsi3> *value = r ? v - r + a : v; 8694: e3500000 cmp r0, #0 ; 0x0 8698: 1084300b addne r3, r4, fp 869c: 10600003 rsbne r0, r0, r3 86a0: 01a03000 moveq r3, r0 86a4: 10643000 rsbne r3, r4, r0 86a8: 01a00004 moveq r0, r4 /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 86ac: e1590003 cmp r9, r3 86b0: e59dc000 ldr ip, [sp] 86b4: 8a000009 bhi 86e0 <_Heap_Allocate_aligned+0x120> /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 86b8: e5955008 ldr r5, [r5, #8] alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 86bc: e1570005 cmp r7, r5 the_block = the_block->next, ++search_count) 86c0: e28aa001 add sl, sl, #1 ; 0x1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 86c4: 1affffd2 bne 8614 <_Heap_Allocate_aligned+0x54> 86c8: e3a00000 mov r0, #0 ; 0x0 } } } } if(stats->max_search < search_count) 86cc: e5973044 ldr r3, [r7, #68] 86d0: e153000a cmp r3, sl stats->max_search = search_count; 86d4: 3587a044 strcc sl, [r7, #68] return user_ptr; } 86d8: e28dd010 add sp, sp, #16 ; 0x10 86dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 86e0: e1a02004 mov r2, r4 86e4: e1a08000 mov r8, r0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 86e8: e3580000 cmp r8, #0 ; 0x0 86ec: 0afffff1 beq 86b8 <_Heap_Allocate_aligned+0xf8> /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 86f0: e59d100c ldr r1, [sp, #12] 86f4: e2813008 add r3, r1, #8 ; 0x8 86f8: e0624003 rsb r4, r2, r3 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 86fc: e0642006 rsb r2, r4, r6 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 8700: e152000c cmp r2, ip /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 8704: 23823001 orrcs r3, r2, #1 ; 0x1 8708: 25853004 strcs r3, [r5, #4] the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 870c: 27a52002 strcs r2, [r5, r2]! the_block->size = alloc_size; 8710: 25854004 strcs r4, [r5, #4] _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 8714: 2a000007 bcs 8738 <_Heap_Allocate_aligned+0x178> /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 8718: e5973038 ldr r3, [r7, #56] Heap_Block *the_block ) { Heap_Block *block = the_block; Heap_Block *next = block->next; 871c: e2851008 add r1, r5, #8 ; 0x8 8720: e8910006 ldm r1, {r1, r2} 8724: e2433001 sub r3, r3, #1 ; 0x1 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 8728: e581200c str r2, [r1, #12] 872c: e5873038 str r3, [r7, #56] { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 8730: e5821008 str r1, [r2, #8] 8734: e1a04006 mov r4, r6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 8738: e0852004 add r2, r5, r4 } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 873c: e5923004 ldr r3, [r2, #4] 8740: e3833001 orr r3, r3, #1 ; 0x1 8744: e5823004 str r3, [r2, #4] /* Update statistics */ stats->free_size -= alloc_size; 8748: e2871030 add r1, r7, #48 ; 0x30 874c: e891000a ldm r1, {r1, r3} 8750: e0641001 rsb r1, r4, r1 if(stats->min_free_size > stats->free_size) 8754: e1510003 cmp r1, r3 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 8758: e597304c ldr r3, [r7, #76] _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 875c: e5972040 ldr r2, [r7, #64] stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 8760: e5871030 str r1, [r7, #48] if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; 8764: 35871034 strcc r1, [r7, #52] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 8768: e5971048 ldr r1, [r7, #72] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 876c: e2833001 add r3, r3, #1 ; 0x1 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 8770: e2822001 add r2, r2, #1 ; 0x1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 8774: e083300a add r3, r3, sl stats->allocs += 1; 8778: e2811001 add r1, r1, #1 ; 0x1 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 877c: e5872040 str r2, [r7, #64] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 8780: e587304c str r3, [r7, #76] stats->allocs += 1; 8784: e5871048 str r1, [r7, #72] check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 8788: e1a00008 mov r0, r8 878c: eaffffce b 86cc <_Heap_Allocate_aligned+0x10c> } } } if(stats->max_search < search_count) stats->max_search = search_count; 8790: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 8794: eaffffcf b 86d8 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED =============================================================================== 0000d950 <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { d950: e92d0070 push {r4, r5, r6} Heap_Block *the_block = the_heap->start; d954: e2802020 add r2, r0, #32 ; 0x20 d958: e8920044 ldm r2, {r2, r6} Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; d95c: e3a03000 mov r3, #0 ; 0x0 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { d960: e1520006 cmp r2, r6 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { d964: e1a0c001 mov ip, r1 the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; d968: e5813010 str r3, [r1, #16] Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; d96c: e5813000 str r3, [r1] the_info->Free.total = 0; d970: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; d974: e5813004 str r3, [r1, #4] the_info->Used.number = 0; d978: e581300c str r3, [r1, #12] the_info->Used.total = 0; d97c: e5813014 str r3, [r1, #20] the_info->Used.largest = 0; while ( the_block != end ) { d980: 0a000020 beq da08 <_Heap_Get_information+0xb8> d984: e5925004 ldr r5, [r2, #4] d988: ea00000b b d9bc <_Heap_Get_information+0x6c> uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; d98c: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; d990: e59c1014 ldr r1, [ip, #20] if ( the_info->Used.largest < the_size ) d994: e59c2010 ldr r2, [ip, #16] while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; d998: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) d99c: e1520000 cmp r2, r0 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; d9a0: e0811000 add r1, r1, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; d9a4: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; d9a8: e58c1014 str r1, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; d9ac: 358c0010 strcc r0, [ip, #16] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { d9b0: e1560004 cmp r6, r4 } else { the_info->Free.number++; the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) d9b4: e1a02004 mov r2, r4 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { d9b8: 0a000012 beq da08 <_Heap_Get_information+0xb8> d9bc: e3c50001 bic r0, r5, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); d9c0: e0824000 add r4, r2, r0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); d9c4: e5945004 ldr r5, [r4, #4] uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { d9c8: e3150001 tst r5, #1 ; 0x1 d9cc: 1affffee bne d98c <_Heap_Get_information+0x3c> the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; d9d0: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; d9d4: e59c1008 ldr r1, [ip, #8] if ( the_info->Free.largest < the_size ) d9d8: e59c2004 ldr r2, [ip, #4] the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; d9dc: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) d9e0: e1520000 cmp r2, r0 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; the_info->Free.total += the_size; d9e4: e0811000 add r1, r1, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; d9e8: 358c0004 strcc r0, [ip, #4] the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; d9ec: e58c3000 str r3, [ip] the_info->Free.total += the_size; d9f0: e58c1008 str r1, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) d9f4: e5943000 ldr r3, [r4] d9f8: e1530000 cmp r3, r0 d9fc: 0affffeb beq d9b0 <_Heap_Get_information+0x60> da00: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED da04: ea000003 b da18 <_Heap_Get_information+0xc8> <== NOT EXECUTED } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; da08: e59c3014 ldr r3, [ip, #20] da0c: e2833008 add r3, r3, #8 ; 0x8 da10: e58c3014 str r3, [ip, #20] da14: e3a00000 mov r0, #0 ; 0x0 return HEAP_GET_INFORMATION_SUCCESSFUL; } da18: e8bd0070 pop {r4, r5, r6} da1c: e12fff1e bx lr =============================================================================== 00013fa8 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13fa8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13fac: e24dd00c sub sp, sp, #12 ; 0xc Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; *avail_mem_size = 0; 13fb0: e59dc030 ldr ip, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13fb4: e1a05000 mov r5, r0 13fb8: e1a09003 mov r9, r3 uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 13fbc: e3a03000 mov r3, #0 ; 0x0 Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 13fc0: e5900014 ldr r0, [r0, #20] uint32_t const page_size = the_heap->page_size; 13fc4: e595b010 ldr fp, [r5, #16] *old_mem_size = 0; 13fc8: e5893000 str r3, [r9] *avail_mem_size = 0; 13fcc: e58c3000 str r3, [ip] Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 13fd0: e58d0004 str r0, [sp, #4] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13fd4: e1a04001 mov r4, r1 /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 13fd8: e1a00001 mov r0, r1 13fdc: e5951010 ldr r1, [r5, #16] 13fe0: e1a08002 mov r8, r2 13fe4: ebfff862 bl 12174 <__umodsi3> 13fe8: e2442008 sub r2, r4, #8 ; 0x8 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 13fec: e595c020 ldr ip, [r5, #32] 13ff0: e5951024 ldr r1, [r5, #36] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 13ff4: e0606002 rsb r6, r0, r2 *old_mem_size = 0; *avail_mem_size = 0; _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 13ff8: e156000c cmp r6, ip 13ffc: 33a03000 movcc r3, #0 ; 0x0 14000: 23a03001 movcs r3, #1 ; 0x1 14004: e1560001 cmp r6, r1 14008: 83a03000 movhi r3, #0 ; 0x0 1400c: e3530000 cmp r3, #0 ; 0x0 14010: 0a00002d beq 140cc <_Heap_Resize_block+0x124> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 14014: e5962004 ldr r2, [r6, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 14018: e3c2a001 bic sl, r2, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 1401c: e086700a add r7, r6, sl old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 14020: e15c0007 cmp ip, r7 14024: 83a03000 movhi r3, #0 ; 0x0 14028: 93a03001 movls r3, #1 ; 0x1 1402c: e1510007 cmp r1, r7 14030: 33a03000 movcc r3, #0 ; 0x0 14034: e3530000 cmp r3, #0 ; 0x0 14038: 0a000023 beq 140cc <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 1403c: e5973004 ldr r3, [r7, #4] 14040: e3130001 tst r3, #1 ; 0x1 14044: 0a000020 beq 140cc <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 14048: e3c33001 bic r3, r3, #1 ; 0x1 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 1404c: e1510007 cmp r1, r7 14050: e58d3000 str r3, [sp] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 14054: e0873003 add r3, r7, r3 14058: 15933004 ldrne r3, [r3, #4] 1405c: 12033001 andne r3, r3, #1 ; 0x1 14060: 03a00001 moveq r0, #1 ; 0x1 14064: 158d3008 strne r3, [sp, #8] _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 14068: e0643007 rsb r3, r4, r7 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 1406c: 058d0008 streq r0, [sp, #8] _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 14070: e2830004 add r0, r3, #4 ; 0x4 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 14074: e1500008 cmp r0, r8 /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 14078: e5890000 str r0, [r9] _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 1407c: e2029001 and r9, r2, #1 ; 0x1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 14080: 2a000014 bcs 140d8 <_Heap_Resize_block+0x130> /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 14084: e59d1008 ldr r1, [sp, #8] 14088: e3510000 cmp r1, #0 ; 0x0 1408c: 1a00000c bne 140c4 <_Heap_Resize_block+0x11c> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 14090: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 14094: e1a00004 mov r0, r4 14098: e1a0100b mov r1, fp 1409c: ebfff834 bl 12174 <__umodsi3> *value = r ? v - r + a : v; 140a0: e3500000 cmp r0, #0 ; 0x0 140a4: 1084300b addne r3, r4, fp 140a8: e59d2004 ldr r2, [sp, #4] 140ac: 10604003 rsbne r4, r0, r3 _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 140b0: e59d3000 ldr r3, [sp] 140b4: e1540002 cmp r4, r2 140b8: 21a02004 movcs r2, r4 140bc: e1530002 cmp r3, r2 140c0: 2a000049 bcs 141ec <_Heap_Resize_block+0x244> } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 140c4: e3a00001 mov r0, #1 ; 0x1 140c8: ea000000 b 140d0 <_Heap_Resize_block+0x128> 140cc: e3a00002 mov r0, #2 ; 0x2 } 140d0: e28dd00c add sp, sp, #12 ; 0xc 140d4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 140d8: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 140dc: e1a00004 mov r0, r4 140e0: e1a0100b mov r1, fp 140e4: ebfff822 bl 12174 <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 140e8: e0544000 subs r4, r4, r0 140ec: 0a000020 beq 14174 <_Heap_Resize_block+0x1cc> can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; if (new_block_size < min_block_size) { 140f0: e59dc004 ldr ip, [sp, #4] /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 140f4: e064000a rsb r0, r4, sl if (new_block_size < min_block_size) { 140f8: e15c0000 cmp ip, r0 140fc: 9a000021 bls 14188 <_Heap_Resize_block+0x1e0> uint32_t delta = min_block_size - new_block_size; 14100: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 14104: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 14108: 10800003 addne r0, r0, r3 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 1410c: 1a00001d bne 14188 <_Heap_Resize_block+0x1e0> ++stats->resizes; 14110: e5953054 ldr r3, [r5, #84] 14114: e2833001 add r3, r3, #1 ; 0x1 14118: e5853054 str r3, [r5, #84] 1411c: e1a00004 mov r0, r4 14120: eaffffea b 140d0 <_Heap_Resize_block+0x128> next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 14124: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 14128: e15c0004 cmp ip, r4 <== NOT EXECUTED 1412c: 8a000010 bhi 14174 <_Heap_Resize_block+0x1cc> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 14130: e0861000 add r1, r6, r0 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 14134: e1803009 orr r3, r0, r9 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 14138: e3842001 orr r2, r4, #1 ; 0x1 <== NOT EXECUTED the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 1413c: e5863004 str r3, [r6, #4] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 14140: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 14144: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14148: e5952050 ldr r2, [r5, #80] <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 1414c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14150: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 14154: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14158: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 1415c: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED 14160: e1a00005 mov r0, r5 <== NOT EXECUTED 14164: ebffd81e bl a1e4 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 14168: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED 1416c: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 14170: e5803000 str r3, [r0] <== NOT EXECUTED } } } ++stats->resizes; 14174: e5953054 ldr r3, [r5, #84] 14178: e2833001 add r3, r3, #1 ; 0x1 1417c: e5853054 str r3, [r5, #84] 14180: e3a00000 mov r0, #0 ; 0x0 14184: eaffffd1 b 140d0 <_Heap_Resize_block+0x128> _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 14188: e59d1008 ldr r1, [sp, #8] 1418c: e3510000 cmp r1, #0 ; 0x0 14190: 1affffe3 bne 14124 <_Heap_Resize_block+0x17c> /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 14194: e59d3000 ldr r3, [sp] _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 14198: e59dc000 ldr ip, [sp] if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 1419c: e0842003 add r2, r4, r3 141a0: e0861000 add r1, r6, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 141a4: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 141a8: e3820001 orr r0, r2, #1 ; 0x1 next_next_block->prev_size = new_next_block_size; 141ac: e787200c str r2, [r7, ip] Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 141b0: e5863004 str r3, [r6, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 141b4: e5810004 str r0, [r1, #4] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 141b8: e5953030 ldr r3, [r5, #48] 141bc: e0833004 add r3, r3, r4 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 141c0: e597000c ldr r0, [r7, #12] Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 141c4: e597c008 ldr ip, [r7, #8] 141c8: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 141cc: e59d3030 ldr r3, [sp, #48] 141d0: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 141d4: e581c008 str ip, [r1, #8] block->prev = prev; 141d8: e581000c str r0, [r1, #12] 141dc: e5832000 str r2, [r3] next->prev = prev->next = block; 141e0: e5801008 str r1, [r0, #8] 141e4: e58c100c str r1, [ip, #12] 141e8: eaffffe1 b 14174 <_Heap_Resize_block+0x1cc> _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 141ec: e1a01007 mov r1, r7 141f0: e1a00005 mov r0, r5 141f4: ebffc5c0 bl 58fc <_Heap_Block_allocate> _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 141f8: e080000a add r0, r0, sl 141fc: e1800009 orr r0, r0, r9 14200: e5860004 str r0, [r6, #4] --stats->used_blocks; 14204: e5953040 ldr r3, [r5, #64] 14208: e2433001 sub r3, r3, #1 ; 0x1 1420c: e5853040 str r3, [r5, #64] 14210: eaffffd7 b 14174 <_Heap_Resize_block+0x1cc> =============================================================================== 0000dacc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { dacc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; dad0: e5903024 ldr r3, [r0, #36] Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; dad4: e5906020 ldr r6, [r0, #32] bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { dad8: e24dd004 sub sp, sp, #4 ; 0x4 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; dadc: e58d3000 str r3, [sp] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { dae0: e5963004 ldr r3, [r6, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) dae4: e251b000 subs fp, r1, #0 ; 0x0 source = the_heap->stats.instance; dae8: b590b028 ldrlt fp, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { daec: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { daf0: e1a05000 mov r5, r0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { daf4: 13a08000 movne r8, #0 ; 0x0 daf8: 0a000086 beq dd18 <_Heap_Walk+0x24c> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { dafc: e5962000 ldr r2, [r6] db00: e5953010 ldr r3, [r5, #16] db04: e1520003 cmp r2, r3 db08: 0a000003 beq db1c <_Heap_Walk+0x50> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); db0c: e59f0238 ldr r0, [pc, #568] ; dd4c <_Heap_Walk+0x280> <== NOT EXECUTED db10: e1a0100b mov r1, fp <== NOT EXECUTED db14: ebffdbe3 bl 4aa8 <== NOT EXECUTED db18: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } while ( the_block != end ) { db1c: e59d3000 ldr r3, [sp] db20: e1560003 cmp r6, r3 db24: 0a000080 beq dd2c <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); db28: e5960004 ldr r0, [r6, #4] printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { db2c: e5951020 ldr r1, [r5, #32] db30: e3c07001 bic r7, r0, #1 ; 0x1 db34: e5952024 ldr r2, [r5, #36] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); db38: e0864007 add r4, r6, r7 db3c: e1540001 cmp r4, r1 db40: 33a03000 movcc r3, #0 ; 0x0 db44: 23a03001 movcs r3, #1 ; 0x1 db48: e1540002 cmp r4, r2 db4c: 83a03000 movhi r3, #0 ; 0x0 db50: e3530000 cmp r3, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); db54: 1200a001 andne sl, r0, #1 ; 0x1 db58: 11a09004 movne r9, r4 db5c: 0a000075 beq dd38 <_Heap_Walk+0x26c> printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { db60: e5943004 ldr r3, [r4, #4] db64: e3130001 tst r3, #1 ; 0x1 db68: 1a00003f bne dc6c <_Heap_Walk+0x1a0> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { db6c: e5943000 ldr r3, [r4] db70: e1530007 cmp r3, r7 db74: 0a000003 beq db88 <_Heap_Walk+0xbc> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); db78: e59f01d0 ldr r0, [pc, #464] ; dd50 <_Heap_Walk+0x284> <== NOT EXECUTED db7c: e1a0100b mov r1, fp <== NOT EXECUTED db80: ebffdbc8 bl 4aa8 <== NOT EXECUTED db84: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { db88: e35a0000 cmp sl, #0 ; 0x0 db8c: 1a000005 bne dba8 <_Heap_Walk+0xdc> if (do_dump || error) printk("\n"); db90: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED db94: 1a00005c bne dd0c <_Heap_Walk+0x240> <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); db98: e59f01b4 ldr r0, [pc, #436] ; dd54 <_Heap_Walk+0x288> <== NOT EXECUTED db9c: e1a0100b mov r1, fp <== NOT EXECUTED dba0: ebffdbc0 bl 4aa8 <== NOT EXECUTED dba4: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; dba8: e5953008 ldr r3, [r5, #8] error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) dbac: e1530006 cmp r3, r6 dbb0: 11550003 cmpne r5, r3 dbb4: 0a000003 beq dbc8 <_Heap_Walk+0xfc> block = block->next; dbb8: e5933008 ldr r3, [r3, #8] error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) dbbc: e1530006 cmp r3, r6 dbc0: 11550003 cmpne r5, r3 dbc4: 1afffffb bne dbb8 <_Heap_Walk+0xec> block = block->next; if(block != the_block) { dbc8: e1530006 cmp r3, r6 dbcc: 0a000026 beq dc6c <_Heap_Walk+0x1a0> if (do_dump || error) printk("\n"); dbd0: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED dbd4: 1a000049 bne dd00 <_Heap_Walk+0x234> <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); dbd8: e59f0178 ldr r0, [pc, #376] ; dd58 <_Heap_Walk+0x28c> <== NOT EXECUTED dbdc: e1a0100b mov r1, fp <== NOT EXECUTED dbe0: ebffdbb0 bl 4aa8 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); dbe4: e59f0170 ldr r0, [pc, #368] ; dd5c <_Heap_Walk+0x290> <== NOT EXECUTED dbe8: ebffdbae bl 4aa8 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { dbec: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED dbf0: e1530007 cmp r3, r7 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); dbf4: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { dbf8: 8a000020 bhi dc80 <_Heap_Walk+0x1b4> <== NOT EXECUTED printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { dbfc: e1a00007 mov r0, r7 dc00: e5951010 ldr r1, [r5, #16] dc04: eb002635 bl 174e0 <__umodsi3> dc08: e3500000 cmp r0, #0 ; 0x0 dc0c: 1a000031 bne dcd8 <_Heap_Walk+0x20c> printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) dc10: e3580000 cmp r8, #0 ; 0x0 dc14: 1a000032 bne dce4 <_Heap_Walk+0x218> if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { dc18: e59d3000 ldr r3, [sp] dc1c: e1530004 cmp r3, r4 dc20: 0a000041 beq dd2c <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); dc24: e5940004 ldr r0, [r4, #4] printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { dc28: e5951020 ldr r1, [r5, #32] dc2c: e3c07001 bic r7, r0, #1 ; 0x1 dc30: e5952024 ldr r2, [r5, #36] dc34: e0844007 add r4, r4, r7 dc38: e1540001 cmp r4, r1 dc3c: 33a03000 movcc r3, #0 ; 0x0 dc40: 23a03001 movcs r3, #1 ; 0x1 dc44: e1540002 cmp r4, r2 dc48: 83a03000 movhi r3, #0 ; 0x0 dc4c: e3530000 cmp r3, #0 ; 0x0 dc50: 0a000037 beq dd34 <_Heap_Walk+0x268> printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { dc54: e5943004 ldr r3, [r4, #4] dc58: e3130001 tst r3, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); dc5c: e1a06009 mov r6, r9 dc60: e200a001 and sl, r0, #1 ; 0x1 dc64: e1a09004 mov r9, r4 dc68: 0affffbf beq db6c <_Heap_Walk+0xa0> error = 1; } } } if (do_dump || error) printk("\n"); dc6c: e3580000 cmp r8, #0 ; 0x0 dc70: 1affffdb bne dbe4 <_Heap_Walk+0x118> if (the_size < the_heap->min_block_size) { dc74: e5953014 ldr r3, [r5, #20] dc78: e1530007 cmp r3, r7 dc7c: 9affffde bls dbfc <_Heap_Walk+0x130> printk("PASS: %d !block size is too small\n", source); dc80: e59f00d8 ldr r0, [pc, #216] ; dd60 <_Heap_Walk+0x294> <== NOT EXECUTED dc84: e1a0100b mov r1, fp <== NOT EXECUTED dc88: ebffdb86 bl 4aa8 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", dc8c: e59d3000 ldr r3, [sp] <== NOT EXECUTED dc90: e59f00cc ldr r0, [pc, #204] ; dd64 <_Heap_Walk+0x298> <== NOT EXECUTED dc94: e1a0100b mov r1, fp <== NOT EXECUTED dc98: e1a02006 mov r2, r6 <== NOT EXECUTED dc9c: ebffdb81 bl 4aa8 <== NOT EXECUTED dca0: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); dca4: e5963004 ldr r3, [r6, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { dca8: e5950010 ldr r0, [r5, #16] dcac: e3c32001 bic r2, r3, #1 ; 0x1 dcb0: e1500002 cmp r0, r2 dcb4: 01a00008 moveq r0, r8 dcb8: 0a000004 beq dcd0 <_Heap_Walk+0x204> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, dcbc: e1a03000 mov r3, r0 <== NOT EXECUTED dcc0: e1a0100b mov r1, fp <== NOT EXECUTED dcc4: e59f009c ldr r0, [pc, #156] ; dd68 <_Heap_Walk+0x29c> <== NOT EXECUTED dcc8: ebffdb76 bl 4aa8 <== NOT EXECUTED dccc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } dcd0: e28dd004 add sp, sp, #4 ; 0x4 dcd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); dcd8: e59f008c ldr r0, [pc, #140] ; dd6c <_Heap_Walk+0x2a0> <== NOT EXECUTED dcdc: e1a0100b mov r1, fp <== NOT EXECUTED dce0: ebffdb70 bl 4aa8 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", dce4: e59d3000 ldr r3, [sp] <== NOT EXECUTED dce8: e59f0074 ldr r0, [pc, #116] ; dd64 <_Heap_Walk+0x298> <== NOT EXECUTED dcec: e1a0100b mov r1, fp <== NOT EXECUTED dcf0: e1a02006 mov r2, r6 <== NOT EXECUTED dcf4: ebffdb6b bl 4aa8 <== NOT EXECUTED dcf8: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED dcfc: eaffffe8 b dca4 <_Heap_Walk+0x1d8> <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); dd00: e59f0054 ldr r0, [pc, #84] ; dd5c <_Heap_Walk+0x290> <== NOT EXECUTED dd04: ebffdb67 bl 4aa8 <== NOT EXECUTED dd08: eaffffb2 b dbd8 <_Heap_Walk+0x10c> <== NOT EXECUTED if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); dd0c: e59f0048 ldr r0, [pc, #72] ; dd5c <_Heap_Walk+0x290> <== NOT EXECUTED dd10: ebffdb64 bl 4aa8 <== NOT EXECUTED dd14: eaffff9f b db98 <_Heap_Walk+0xcc> <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); dd18: e59f0050 ldr r0, [pc, #80] ; dd70 <_Heap_Walk+0x2a4> <== NOT EXECUTED dd1c: e1a0100b mov r1, fp <== NOT EXECUTED dd20: ebffdb60 bl 4aa8 <== NOT EXECUTED dd24: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED dd28: eaffff73 b dafc <_Heap_Walk+0x30> <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, dd2c: e59d6000 ldr r6, [sp] dd30: eaffffdb b dca4 <_Heap_Walk+0x1d8> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); dd34: e1a06009 mov r6, r9 <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); dd38: e1a02004 mov r2, r4 <== NOT EXECUTED dd3c: e59f0030 ldr r0, [pc, #48] ; dd74 <_Heap_Walk+0x2a8> <== NOT EXECUTED dd40: e1a0100b mov r1, fp <== NOT EXECUTED dd44: ebffdb57 bl 4aa8 <== NOT EXECUTED dd48: eaffffe5 b dce4 <_Heap_Walk+0x218> <== NOT EXECUTED =============================================================================== 00004f3c <_IO_Manager_initialization>: /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 4f3c: e1520001 cmp r2, r1 void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, uint32_t number_of_drivers ) { 4f40: e92d41f0 push {r4, r5, r6, r7, r8, lr} 4f44: e1a06001 mov r6, r1 4f48: e1a05002 mov r5, r2 4f4c: e1a08000 mov r8, r0 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 4f50: 8a000004 bhi 4f68 <_IO_Manager_initialization+0x2c> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 4f54: e59f3078 ldr r3, [pc, #120] ; 4fd4 <_IO_Manager_initialization+0x98> _IO_Number_of_drivers = number_of_drivers; 4f58: e59f2078 ldr r2, [pc, #120] ; 4fd8 <_IO_Manager_initialization+0x9c> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 4f5c: e5830000 str r0, [r3] _IO_Number_of_drivers = number_of_drivers; 4f60: e5821000 str r1, [r2] 4f64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 4f68: e1a04282 lsl r4, r2, #5 <== NOT EXECUTED 4f6c: e0444182 sub r4, r4, r2, lsl #3 <== NOT EXECUTED 4f70: e1a00004 mov r0, r4 <== NOT EXECUTED 4f74: eb000b84 bl 7d8c <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED 4f78: e59f7054 ldr r7, [pc, #84] ; 4fd4 <_IO_Manager_initialization+0x98><== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 4f7c: e59f3054 ldr r3, [pc, #84] ; 4fd8 <_IO_Manager_initialization+0x9c><== NOT EXECUTED memset( 4f80: e1a02004 mov r2, r4 <== NOT EXECUTED 4f84: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 4f88: e5835000 str r5, [r3] <== NOT EXECUTED /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 4f8c: e5870000 str r0, [r7] <== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 4f90: eb001b11 bl bbdc <== NOT EXECUTED _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4f94: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 4f98: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 4f9c: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 4fa0: e5977000 ldr r7, [r7] <== NOT EXECUTED 4fa4: e1a0e005 mov lr, r5 <== NOT EXECUTED 4fa8: e088c00e add ip, r8, lr <== NOT EXECUTED 4fac: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 4fb0: e087400e add r4, r7, lr <== NOT EXECUTED 4fb4: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4fb8: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 4fbc: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4fc0: e1560005 cmp r6, r5 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 4fc4: e8840003 stm r4, {r0, r1} <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4fc8: e28ee018 add lr, lr, #24 ; 0x18 <== NOT EXECUTED 4fcc: 8afffff5 bhi 4fa8 <_IO_Manager_initialization+0x6c> <== NOT EXECUTED 4fd0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 0000a3d4 <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { a3d4: e2400001 sub r0, r0, #1 ; 0x1 a3d8: e3500003 cmp r0, #3 ; 0x3 a3dc: 979ff100 ldrls pc, [pc, r0, lsl #2] a3e0: ea000003 b a3f4 <_Objects_API_maximum_class+0x20> a3e4: 0000a414 .word 0x0000a414 a3e8: 0000a40c .word 0x0000a40c a3ec: 0000a404 .word 0x0000a404 <== NOT EXECUTED a3f0: 0000a3fc .word 0x0000a3fc <== NOT EXECUTED case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; a3f4: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } a3f8: e12fff1e bx lr case OBJECTS_INTERNAL_API: return OBJECTS_INTERNAL_CLASSES_LAST; case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; a3fc: e3a00008 mov r0, #8 ; 0x8 a400: e12fff1e bx lr int _Objects_API_maximum_class( uint32_t api ) { switch (api) { a404: e3a0000c mov r0, #12 ; 0xc <== NOT EXECUTED a408: e12fff1e bx lr <== NOT EXECUTED a40c: e3a0000a mov r0, #10 ; 0xa a410: e12fff1e bx lr a414: e3a00002 mov r0, #2 ; 0x2 a418: e12fff1e bx lr =============================================================================== 00005ae0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 5ae0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 5ae4: e1d0a0b8 ldrh sl, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5ae8: e1d091b0 ldrh r9, [r0, #16] 5aec: e159000a cmp r9, sl */ void _Objects_Extend_information( Objects_Information *information ) { 5af0: e24dd014 sub sp, sp, #20 ; 0x14 5af4: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5af8: 2a000071 bcs 5cc4 <_Objects_Extend_information+0x1e4> 5afc: e3a07000 mov r7, #0 ; 0x0 5b00: e5904014 ldr r4, [r0, #20] 5b04: e1a0800a mov r8, sl 5b08: e1a06007 mov r6, r7 5b0c: e3a0b001 mov fp, #1 ; 0x1 5b10: e3a00003 mov r0, #3 ; 0x3 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b14: e5d53012 ldrb r3, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5b18: e0849009 add r9, r4, r9 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b1c: e3530000 cmp r3, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5b20: e58d9004 str r9, [sp, #4] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b24: 1a000080 bne 5d2c <_Objects_Extend_information+0x24c> if ( !object_blocks ) return; } else { object_blocks = (void**) 5b28: e59d3004 ldr r3, [sp, #4] 5b2c: e080000a add r0, r0, sl 5b30: e0800003 add r0, r0, r3 5b34: e1a00100 lsl r0, r0, #2 5b38: eb000893 bl 7d8c <_Workspace_Allocate_or_fatal_error> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5b3c: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5b40: e1a0210b lsl r2, fp, #2 if ( !object_blocks ) return; } else { object_blocks = (void**) 5b44: e1a0c000 mov ip, r0 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5b48: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5b4c: e153000a cmp r3, sl 5b50: e0894002 add r4, r9, r2 5b54: 8a000080 bhi 5d5c <_Objects_Extend_information+0x27c> else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5b58: e35a0000 cmp sl, #0 ; 0x0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 5b5c: 13a03000 movne r3, #0 ; 0x0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 5b60: 11a02003 movne r2, r3 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5b64: 0a000003 beq 5b78 <_Objects_Extend_information+0x98> local_table[ index ] = NULL; 5b68: e7842103 str r2, [r4, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5b6c: e2833001 add r3, r3, #1 ; 0x1 5b70: e153000a cmp r3, sl 5b74: 3afffffb bcc 5b68 <_Objects_Extend_information+0x88> 5b78: e1a07107 lsl r7, r7, #2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5b7c: e3a00000 mov r0, #0 ; 0x0 inactive_per_block[block_count] = 0; 5b80: e7890007 str r0, [r9, r7] for ( index=index_base ; index < ( information->allocation_size + index_base ); 5b84: e5953014 ldr r3, [r5, #20] 5b88: e0881003 add r1, r8, r3 5b8c: e1580001 cmp r8, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5b90: e78c0007 str r0, [ip, r7] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5b94: 2a000006 bcs 5bb4 <_Objects_Extend_information+0xd4> 5b98: e1a03108 lsl r3, r8, #2 5b9c: e0842003 add r2, r4, r3 5ba0: e1a03008 mov r3, r8 index++ ) { 5ba4: e2833001 add r3, r3, #1 ; 0x1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5ba8: e1530001 cmp r3, r1 index++ ) { local_table[ index ] = NULL; 5bac: e4820004 str r0, [r2], #4 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5bb0: 3afffffb bcc 5ba4 <_Objects_Extend_information+0xc4> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 5bb4: e10f0000 mrs r0, CPSR 5bb8: e38030c0 orr r3, r0, #192 ; 0xc0 5bbc: e129f003 msr CPSR_fc, r3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 5bc0: e5953000 ldr r3, [r5] old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 5bc4: e59de004 ldr lr, [sp, #4] information->maximum_id = _Objects_Build_id( 5bc8: e1d510b4 ldrh r1, [r5, #4] 5bcc: e1a03c03 lsl r3, r3, #24 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 5bd0: e1a0280e lsl r2, lr, #16 information->maximum_id = _Objects_Build_id( 5bd4: e3833801 orr r3, r3, #65536 ; 0x10000 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 5bd8: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 5bdc: e1833d81 orr r3, r3, r1, lsl #27 5be0: e1833002 orr r3, r3, r2 5be4: e585300c str r3, [r5, #12] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 5be8: e5859030 str r9, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 5bec: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 5bf0: e585401c str r4, [r5, #28] information->maximum = maximum; 5bf4: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 5bf8: e585c034 str ip, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 5bfc: e129f000 msr CPSR_fc, r0 if ( old_tables ) 5c00: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 5c04: 11a00003 movne r0, r3 5c08: 1b000857 blne 7d6c <_Workspace_Free> 5c0c: e5954014 ldr r4, [r5, #20] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 5c10: e5d53012 ldrb r3, [r5, #18] 5c14: e3530000 cmp r3, #0 ; 0x0 5c18: 0a000061 beq 5da4 <_Objects_Extend_information+0x2c4> information->object_blocks[ block ] = 5c1c: e5953018 ldr r3, [r5, #24] 5c20: e0000493 mul r0, r3, r4 5c24: e5954034 ldr r4, [r5, #52] 5c28: eb000853 bl 7d7c <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5c2c: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5c30: e7840106 str r0, [r4, r6, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5c34: e7931106 ldr r1, [r3, r6, lsl #2] 5c38: e3510000 cmp r1, #0 ; 0x0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5c3c: e1a0a106 lsl sl, r6, #2 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5c40: 0a00001d beq 5cbc <_Objects_Extend_information+0x1dc> /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5c44: e28d7008 add r7, sp, #8 ; 0x8 5c48: e1a00007 mov r0, r7 5c4c: e2852014 add r2, r5, #20 ; 0x14 5c50: e892000c ldm r2, {r2, r3} 5c54: eb0010ab bl 9f08 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c58: e1a04008 mov r4, r8 5c5c: e2856020 add r6, r5, #32 ; 0x20 5c60: ea000008 b 5c88 <_Objects_Extend_information+0x1a8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 5c64: e5953000 ldr r3, [r5] 5c68: e1d520b4 ldrh r2, [r5, #4] 5c6c: e1a03c03 lsl r3, r3, #24 5c70: e3833801 orr r3, r3, #65536 ; 0x10000 5c74: e1833d82 orr r3, r3, r2, lsl #27 5c78: e1833004 orr r3, r3, r4 5c7c: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c80: ebfffd6f bl 5244 <_Chain_Append> index++; 5c84: e2844001 add r4, r4, #1 ; 0x1 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 5c88: e1a00007 mov r0, r7 5c8c: eb001090 bl 9ed4 <_Chain_Get> 5c90: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c94: e1a0100c mov r1, ip 5c98: e1a00006 mov r0, r6 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 5c9c: 1afffff0 bne 5c64 <_Objects_Extend_information+0x184> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5ca0: e5953014 ldr r3, [r5, #20] 5ca4: e5952030 ldr r2, [r5, #48] 5ca8: e782300a str r3, [r2, sl] information->inactive += information->allocation_size; 5cac: e1d512bc ldrh r1, [r5, #44] 5cb0: e5953014 ldr r3, [r5, #20] 5cb4: e0833001 add r3, r3, r1 5cb8: e1c532bc strh r3, [r5, #44] } 5cbc: e28dd014 add sp, sp, #20 ; 0x14 5cc0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 5cc4: e5904014 ldr r4, [r0, #20] 5cc8: e1a00009 mov r0, r9 5ccc: e1a01004 mov r1, r4 5cd0: eb0030e3 bl 12064 <__aeabi_uidiv> for ( ; block < block_count; block++ ) { 5cd4: e2507000 subs r7, r0, #0 ; 0x0 5cd8: 0a00003a beq 5dc8 <_Objects_Extend_information+0x2e8> if ( information->object_blocks[ block ] == NULL ) 5cdc: e5952034 ldr r2, [r5, #52] 5ce0: e5923000 ldr r3, [r2] 5ce4: e3530000 cmp r3, #0 ; 0x0 5ce8: 11a0800a movne r8, sl 5cec: 13a06000 movne r6, #0 ; 0x0 5cf0: 1a000003 bne 5d04 <_Objects_Extend_information+0x224> 5cf4: ea000033 b 5dc8 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED 5cf8: e7923106 ldr r3, [r2, r6, lsl #2] 5cfc: e3530000 cmp r3, #0 ; 0x0 5d00: 0a000003 beq 5d14 <_Objects_Extend_information+0x234> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 5d04: e2866001 add r6, r6, #1 ; 0x1 5d08: e1570006 cmp r7, r6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 5d0c: e0888004 add r8, r8, r4 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 5d10: 8afffff8 bhi 5cf8 <_Objects_Extend_information+0x218> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 5d14: e1580009 cmp r8, r9 5d18: 3affffbc bcc 5c10 <_Objects_Extend_information+0x130> 5d1c: e287b001 add fp, r7, #1 ; 0x1 5d20: e1a0308b lsl r3, fp, #1 5d24: e083000b add r0, r3, fp 5d28: eaffff79 b 5b14 <_Objects_Extend_information+0x34> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 5d2c: e080000a add r0, r0, sl 5d30: e0800009 add r0, r0, r9 5d34: e1a00100 lsl r0, r0, #2 5d38: eb00080f bl 7d7c <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 5d3c: e250c000 subs ip, r0, #0 ; 0x0 5d40: 0affffdd beq 5cbc <_Objects_Extend_information+0x1dc> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5d44: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5d48: e1a0210b lsl r2, fp, #2 5d4c: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5d50: e153000a cmp r3, sl 5d54: e0894002 add r4, r9, r2 5d58: 9affff7e bls 5b58 <_Objects_Extend_information+0x78> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 5d5c: e1a07107 lsl r7, r7, #2 5d60: e1a0000c mov r0, ip 5d64: e5951034 ldr r1, [r5, #52] 5d68: e1a02007 mov r2, r7 5d6c: e58dc000 str ip, [sp] 5d70: eb00175a bl bae0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 5d74: e5951030 ldr r1, [r5, #48] 5d78: e1a02007 mov r2, r7 5d7c: e1a00009 mov r0, r9 5d80: eb001756 bl bae0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 5d84: e1d521b0 ldrh r2, [r5, #16] 5d88: e08a2002 add r2, sl, r2 5d8c: e1a02102 lsl r2, r2, #2 5d90: e1a00004 mov r0, r4 5d94: e595101c ldr r1, [r5, #28] 5d98: eb001750 bl bae0 5d9c: e59dc000 ldr ip, [sp] 5da0: eaffff75 b 5b7c <_Objects_Extend_information+0x9c> if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 5da4: e5953018 ldr r3, [r5, #24] 5da8: e0000493 mul r0, r3, r4 5dac: e5954034 ldr r4, [r5, #52] 5db0: eb0007f5 bl 7d8c <_Workspace_Allocate_or_fatal_error> 5db4: e5953034 ldr r3, [r5, #52] 5db8: e7840106 str r0, [r4, r6, lsl #2] 5dbc: e1a0a106 lsl sl, r6, #2 5dc0: e7931106 ldr r1, [r3, r6, lsl #2] 5dc4: eaffff9e b 5c44 <_Objects_Extend_information+0x164> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 5dc8: e1a0800a mov r8, sl <== NOT EXECUTED 5dcc: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 5dd0: eaffffcf b 5d14 <_Objects_Extend_information+0x234> <== NOT EXECUTED =============================================================================== 00005ecc <_Objects_Get_isr_disable>: #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 5ecc: e1a01801 lsl r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 5ed0: e52d4004 push {r4} ; (str r4, [sp, #-4]!) #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 5ed4: e1a01821 lsr r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 5ed8: e1a04003 mov r4, r3 index = id & 0x0000ffff; /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 5edc: e10fc000 mrs ip, CPSR 5ee0: e38c30c0 orr r3, ip, #192 ; 0xc0 5ee4: e129f003 msr CPSR_fc, r3 if ( information->maximum >= index ) { 5ee8: e1d031b0 ldrh r3, [r0, #16] 5eec: e1510003 cmp r1, r3 5ef0: 8a000008 bhi 5f18 <_Objects_Get_isr_disable+0x4c> if ( (the_object = information->local_table[ index ]) != NULL ) { 5ef4: e590301c ldr r3, [r0, #28] 5ef8: e7930101 ldr r0, [r3, r1, lsl #2] 5efc: e3500000 cmp r0, #0 ; 0x0 *location = OBJECTS_LOCAL; 5f00: 13a03000 movne r3, #0 ; 0x0 5f04: 15823000 strne r3, [r2] *level_p = level; 5f08: 1584c000 strne ip, [r4] /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { 5f0c: 0a000006 beq 5f2c <_Objects_Get_isr_disable+0x60> _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 5f10: e8bd0010 pop {r4} 5f14: e12fff1e bx lr } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 5f18: e129f00c msr CPSR_fc, ip *location = OBJECTS_ERROR; 5f1c: e3a03001 mov r3, #1 ; 0x1 5f20: e5823000 str r3, [r2] 5f24: e3a00000 mov r0, #0 ; 0x0 5f28: eafffff8 b 5f10 <_Objects_Get_isr_disable+0x44> if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 5f2c: e129f00c msr CPSR_fc, ip <== NOT EXECUTED *location = OBJECTS_ERROR; 5f30: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 5f34: e5823000 str r3, [r2] <== NOT EXECUTED 5f38: eafffff4 b 5f10 <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED =============================================================================== 0000607c <_Objects_Namespace_remove>: ) { /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 607c: e5d03038 ldrb r3, [r0, #56] 6080: e3530000 cmp r3, #0 ; 0x0 void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 6084: e92d4010 push {r4, lr} 6088: e1a04001 mov r4, r1 /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 608c: 0a000002 beq 609c <_Objects_Namespace_remove+0x20> 6090: e591000c ldr r0, [r1, #12] <== NOT EXECUTED 6094: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 6098: 1b000733 blne 7d6c <_Workspace_Free> <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; 609c: e3a03000 mov r3, #0 ; 0x0 the_object->name.name_u32 = 0; 60a0: e584300c str r3, [r4, #12] } 60a4: e8bd8010 pop {r4, pc} =============================================================================== 00007ec4 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 7ec4: e92d40f0 push {r4, r5, r6, r7, lr} 7ec8: e1a04000 mov r4, r0 7ecc: e1a07001 mov r7, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7ed0: e1a00002 mov r0, r2 7ed4: e1d413ba ldrh r1, [r4, #58] bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 7ed8: e1a05002 mov r5, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7edc: eb001c4c bl f014 if ( information->is_string ) { 7ee0: e5d43038 ldrb r3, [r4, #56] 7ee4: e3530000 cmp r3, #0 ; 0x0 { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7ee8: e2804001 add r4, r0, #1 ; 0x1 if ( information->is_string ) { 7eec: 1a00001a bne 7f5c <_Objects_Set_name+0x98> strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 7ef0: e3540000 cmp r4, #0 ; 0x0 7ef4: 03a00a02 moveq r0, #8192 ; 0x2000 7ef8: 02800020 addeq r0, r0, #32 ; 0x20 7efc: 01800800 orreq r0, r0, r0, lsl #16 7f00: 0a000012 beq 7f50 <_Objects_Set_name+0x8c> 7f04: e5d53000 ldrb r3, [r5] 7f08: e3540001 cmp r4, #1 ; 0x1 7f0c: e1a02c03 lsl r2, r3, #24 7f10: 03820602 orreq r0, r2, #2097152 ; 0x200000 7f14: 03800a02 orreq r0, r0, #8192 ; 0x2000 7f18: 03800020 orreq r0, r0, #32 ; 0x20 7f1c: 0a00000b beq 7f50 <_Objects_Set_name+0x8c> 7f20: e5d53001 ldrb r3, [r5, #1] 7f24: e3540002 cmp r4, #2 ; 0x2 7f28: e1822803 orr r2, r2, r3, lsl #16 7f2c: 03820a02 orreq r0, r2, #8192 ; 0x2000 7f30: 03800020 orreq r0, r0, #32 ; 0x20 7f34: 0a000005 beq 7f50 <_Objects_Set_name+0x8c> 7f38: e5d53002 ldrb r3, [r5, #2] 7f3c: e3540003 cmp r4, #3 ; 0x3 7f40: e1820403 orr r0, r2, r3, lsl #8 7f44: 15d53003 ldrbne r3, [r5, #3] 7f48: 03800020 orreq r0, r0, #32 ; 0x20 7f4c: 11800003 orrne r0, r0, r3 7f50: e587000c str r0, [r7, #12] 7f54: e3a00001 mov r0, #1 ; 0x1 ); } return TRUE; } 7f58: e8bd80f0 pop {r4, r5, r6, r7, pc} length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 7f5c: e1a00004 mov r0, r4 <== NOT EXECUTED 7f60: eb000721 bl 9bec <_Workspace_Allocate> <== NOT EXECUTED if ( !d ) 7f64: e2506000 subs r6, r0, #0 ; 0x0 <== NOT EXECUTED 7f68: 01a00006 moveq r0, r6 <== NOT EXECUTED 7f6c: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 7f70: e597000c ldr r0, [r7, #12] <== NOT EXECUTED 7f74: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 7f78: 0a000002 beq 7f88 <_Objects_Set_name+0xc4> <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 7f7c: eb000716 bl 9bdc <_Workspace_Free> <== NOT EXECUTED the_object->name.name_p = NULL; 7f80: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 7f84: e587300c str r3, [r7, #12] <== NOT EXECUTED } strncpy( d, name, length ); 7f88: e1a01005 mov r1, r5 <== NOT EXECUTED 7f8c: e1a00006 mov r0, r6 <== NOT EXECUTED 7f90: e1a02004 mov r2, r4 <== NOT EXECUTED 7f94: eb001bdb bl ef08 <== NOT EXECUTED d[ length ] = '\0'; 7f98: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 7f9c: e7c63004 strb r3, [r6, r4] <== NOT EXECUTED the_object->name.name_p = d; 7fa0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 7fa4: e587600c str r6, [r7, #12] <== NOT EXECUTED 7fa8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 000098f4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 98f4: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 98f8: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 98fc: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 9900: 0a00000d beq 993c <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 9904: e3510000 cmp r1, #0 ; 0x0 9908: 0a00000b beq 993c <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 990c: e59f5030 ldr r5, [pc, #48] ; 9944 <_Protected_heap_Get_information+0x50> 9910: e5950000 ldr r0, [r5] 9914: ebfff981 bl 7f20 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 9918: e1a01004 mov r1, r4 991c: e1a00006 mov r0, r6 9920: eb00100a bl d950 <_Heap_Get_information> 9924: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 9928: e5950000 ldr r0, [r5] 992c: ebfff997 bl 7f90 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 9930: e2740001 rsbs r0, r4, #1 ; 0x1 9934: 33a00000 movcc r0, #0 ; 0x0 9938: e8bd8070 pop {r4, r5, r6, pc} 993c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 9940: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00009d20 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 9d20: e92d4030 push {r4, r5, lr} /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 9d24: e59f5084 ldr r5, [pc, #132] ; 9db0 <_RTEMS_tasks_Create_extension+0x90> 9d28: e5953000 ldr r3, [r5] 9d2c: e5932040 ldr r2, [r3, #64] 9d30: e5d20004 ldrb r0, [r2, #4] to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 9d34: e3500000 cmp r0, #0 ; 0x0 9d38: 13a00060 movne r0, #96 ; 0x60 9d3c: 03a00020 moveq r0, #32 ; 0x20 bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 9d40: e1a04001 mov r4, r1 */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 9d44: ebfff80c bl 7d7c <_Workspace_Allocate> if ( !api ) 9d48: e3500000 cmp r0, #0 ; 0x0 9d4c: 08bd8030 popeq {r4, r5, pc} api->pending_events = EVENT_SETS_NONE_PENDING; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 9d50: e5951000 ldr r1, [r5] */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = true; 9d54: e3a03001 mov r3, #1 ; 0x1 9d58: e5c03008 strb r3, [r0, #8] 9d5c: e5912040 ldr r2, [r1, #64] 9d60: e5d23004 ldrb r3, [r2, #4] 9d64: e3530000 cmp r3, #0 ; 0x0 if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; 9d68: e3a03000 mov r3, #0 ; 0x0 _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 9d6c: e5843114 str r3, [r4, #276] api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 9d70: e5840104 str r0, [r4, #260] api->pending_events = EVENT_SETS_NONE_PENDING; 9d74: e5803000 str r3, [r0] information->handler = NULL; 9d78: e580300c str r3, [r0, #12] information->mode_set = RTEMS_DEFAULT_MODES; 9d7c: e5803010 str r3, [r0, #16] information->signals_posted = 0; 9d80: e5803014 str r3, [r0, #20] information->signals_pending = 0; 9d84: e5803018 str r3, [r0, #24] information->nest_level = 0; 9d88: e580301c str r3, [r0, #28] _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 9d8c: 0a000005 beq 9da8 <_RTEMS_tasks_Create_extension+0x88> for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 9d90: e1a02003 mov r2, r3 api->pending_events = EVENT_SETS_NONE_PENDING; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 9d94: e2833001 add r3, r3, #1 ; 0x1 9d98: e3530010 cmp r3, #16 ; 0x10 api->Notepads[i] = 0; 9d9c: e5802020 str r2, [r0, #32] api->pending_events = EVENT_SETS_NONE_PENDING; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 9da0: e2800004 add r0, r0, #4 ; 0x4 9da4: 1afffffa bne 9d94 <_RTEMS_tasks_Create_extension+0x74> 9da8: e3a00001 mov r0, #1 ; 0x1 api->Notepads[i] = 0; } return true; } 9dac: e8bd8030 pop {r4, r5, pc} =============================================================================== 00005640 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 5640: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 5644: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 5648: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 564c: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 5650: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 5654: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 5658: e10f6000 mrs r6, CPSR 565c: e38630c0 orr r3, r6, #192 ; 0xc0 5660: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 5664: e59f3038 ldr r3, [pc, #56] ; 56a4 <_TOD_Get+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 5668: e59f2038 ldr r2, [pc, #56] ; 56a8 <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 566c: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 5670: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 5674: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 5678: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 567c: 0a000002 beq 568c <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 5680: e1a0e00f mov lr, pc <== NOT EXECUTED 5684: e12fff11 bx r1 <== NOT EXECUTED 5688: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 568c: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 5690: e1a00005 mov r0, r5 5694: e1a0100d mov r1, sp 5698: eb000813 bl 76ec <_Timespec_Add_to> } 569c: e28dd008 add sp, sp, #8 ; 0x8 56a0: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0000a0b0 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { a0b0: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; a0b4: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { a0b8: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; a0bc: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { a0c0: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; a0c4: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); a0c8: e10f6000 mrs r6, CPSR a0cc: e38630c0 orr r3, r6, #192 ; 0xc0 a0d0: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) a0d4: e59f3038 ldr r3, [pc, #56] ; a114 <_TOD_Get_uptime+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a0d8: e59f2038 ldr r2, [pc, #56] ; a118 <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) a0dc: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a0e0: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) a0e4: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a0e8: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) a0ec: 0a000002 beq a0fc <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); a0f0: e1a0e00f mov lr, pc <== NOT EXECUTED a0f4: e12fff11 bx r1 <== NOT EXECUTED a0f8: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); a0fc: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); a100: e1a00005 mov r0, r5 a104: e1a0100d mov r1, sp a108: ebfff577 bl 76ec <_Timespec_Add_to> } a10c: e28dd008 add sp, sp, #8 ; 0x8 a110: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00005700 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 5700: e92d4010 push {r4, lr} struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 5704: e59f306c ldr r3, [pc, #108] ; 5778 <_TOD_Tickle_ticks+0x78> 5708: e5931000 ldr r1, [r3] * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 570c: e24dd008 sub sp, sp, #8 ; 0x8 /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; tick.tv_sec = 0; /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 5710: e59fc064 ldr ip, [pc, #100] ; 577c <_TOD_Tickle_ticks+0x7c> struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; tick.tv_sec = 0; 5714: e28d4008 add r4, sp, #8 ; 0x8 { struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 5718: e1a03381 lsl r3, r1, #7 tick.tv_sec = 0; 571c: e3a02000 mov r2, #0 ; 0x0 5720: e5242008 str r2, [r4, #-8]! { struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 5724: e0433101 sub r3, r3, r1, lsl #2 tick.tv_sec = 0; /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 5728: e59c2000 ldr r2, [ip] { struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 572c: e0833001 add r3, r3, r1 5730: e1a03183 lsl r3, r3, #3 tick.tv_sec = 0; /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 5734: e2822001 add r2, r2, #1 ; 0x1 /* Update the timespec format uptime */ (void) _Timespec_Add_to( &_TOD_Uptime, &tick ); 5738: e1a0100d mov r1, sp 573c: e59f003c ldr r0, [pc, #60] ; 5780 <_TOD_Tickle_ticks+0x80> /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; tick.tv_sec = 0; /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 5740: e58c2000 str r2, [ip] { struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 5744: e58d3004 str r3, [sp, #4] /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ (void) _Timespec_Add_to( &_TOD_Uptime, &tick ); 5748: eb0007e7 bl 76ec <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timespec_Add_to( &_TOD_Now, &tick ); 574c: e1a0100d mov r1, sp 5750: e59f002c ldr r0, [pc, #44] ; 5784 <_TOD_Tickle_ticks+0x84> 5754: eb0007e4 bl 76ec <_Timespec_Add_to> while ( seconds ) { 5758: e2504000 subs r4, r0, #0 ; 0x0 575c: 0a000003 beq 5770 <_TOD_Tickle_ticks+0x70> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 5760: e59f0020 ldr r0, [pc, #32] ; 5788 <_TOD_Tickle_ticks+0x88> 5764: eb000959 bl 7cd0 <_Watchdog_Tickle> 5768: e2544001 subs r4, r4, #1 ; 0x1 576c: 1afffffb bne 5760 <_TOD_Tickle_ticks+0x60> _Watchdog_Tickle_seconds(); seconds--; } } 5770: e28dd008 add sp, sp, #8 ; 0x8 5774: e8bd8010 pop {r4, pc} =============================================================================== 000065c8 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 65c8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 65cc: e59f60c0 ldr r6, [pc, #192] ; 6694 <_Thread_Create_idle+0xcc> 65d0: e24dd01c sub sp, sp, #28 ; 0x1c 65d4: e1a00006 mov r0, r6 65d8: ebfffd10 bl 5a20 <_Objects_Allocate> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 65dc: e59f80b4 ldr r8, [pc, #180] ; 6698 <_Thread_Create_idle+0xd0> 65e0: e5983000 ldr r3, [r8] /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 65e4: e59f70b0 ldr r7, [pc, #176] ; 669c <_Thread_Create_idle+0xd4> 65e8: e2833001 add r3, r3, #1 ; 0x1 65ec: e5883000 str r3, [r8] 65f0: e5870000 str r0, [r7] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 65f4: e59fa0a4 ldr sl, [pc, #164] ; 66a0 <_Thread_Create_idle+0xd8> 65f8: e59f20a4 ldr r2, [pc, #164] ; 66a4 <_Thread_Create_idle+0xdc> 65fc: e59a3000 ldr r3, [sl] 6600: e5930018 ldr r0, [r3, #24] 6604: e5923000 ldr r3, [r2] 6608: e59f2098 ldr r2, [pc, #152] ; 66a8 <_Thread_Create_idle+0xe0> 660c: e5d24000 ldrb r4, [r2] 6610: e3a05000 mov r5, #0 ; 0x0 6614: e58d4004 str r4, [sp, #4] 6618: e59f408c ldr r4, [pc, #140] ; 66ac <_Thread_Create_idle+0xe4> 661c: e1500003 cmp r0, r3 6620: 21a03000 movcs r3, r0 6624: e3a0c001 mov ip, #1 ; 0x1 6628: e5971000 ldr r1, [r7] 662c: e1a00006 mov r0, r6 6630: e1a02005 mov r2, r5 6634: e58dc008 str ip, [sp, #8] 6638: e58d4018 str r4, [sp, #24] 663c: e58d5000 str r5, [sp] 6640: e58d500c str r5, [sp, #12] 6644: e58d5010 str r5, [sp, #16] 6648: e58d5014 str r5, [sp, #20] 664c: eb0000b2 bl 691c <_Thread_Initialize> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 6650: e5984000 ldr r4, [r8] 6654: e2444001 sub r4, r4, #1 ; 0x1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 6658: e5976000 ldr r6, [r7] _Thread_Executing = _Thread_Idle; _Thread_Start( 665c: e59a3000 ldr r3, [sl] 6660: e5884000 str r4, [r8] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 6664: e59fc044 ldr ip, [pc, #68] ; 66b0 <_Thread_Create_idle+0xe8> 6668: e59f4044 ldr r4, [pc, #68] ; 66b4 <_Thread_Create_idle+0xec> _Thread_Executing = _Thread_Idle; _Thread_Start( 666c: e5932014 ldr r2, [r3, #20] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 6670: e58c6000 str r6, [ip] 6674: e5846000 str r6, [r4] _Thread_Executing = _Thread_Idle; _Thread_Start( 6678: e1a01005 mov r1, r5 667c: e1a00006 mov r0, r6 6680: e1a03005 mov r3, r5 6684: e58d5000 str r5, [sp] 6688: eb0003b6 bl 7568 <_Thread_Start> _Configuration_Table->idle_task, NULL, 0 ); } 668c: e28dd01c add sp, sp, #28 ; 0x1c 6690: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00006850 <_Thread_Enable_dispatch>: #if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) 6850: e59f3018 ldr r3, [pc, #24] ; 6870 <_Thread_Enable_dispatch+0x20> 6854: e5932000 ldr r2, [r3] 6858: e2422001 sub r2, r2, #1 ; 0x1 685c: e5832000 str r2, [r3] 6860: e5931000 ldr r1, [r3] 6864: e3510000 cmp r1, #0 ; 0x0 6868: 112fff1e bxne lr return; _Thread_Dispatch(); 686c: eaffffa3 b 6700 <_Thread_Dispatch> =============================================================================== 0000b170 <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; b170: e59f3110 ldr r3, [pc, #272] ; b288 <_Thread_Handler+0x118> * * Output parameters: NONE */ void _Thread_Handler( void ) { b174: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; b178: e5935000 ldr r5, [r3] /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; b17c: e59520b8 ldr r2, [r5, #184] _ISR_Set_level(level); b180: e3a03000 mov r3, #0 ; 0x0 b184: e10f3000 mrs r3, CPSR b188: e3c330c0 bic r3, r3, #192 ; 0xc0 b18c: e1833002 orr r3, r3, r2 b190: e121f003 msr CPSR_c, r3 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; b194: e59f20f0 ldr r2, [pc, #240] ; b28c <_Thread_Handler+0x11c> doneConstructors = 1; b198: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; b19c: e5d24000 ldrb r4, [r2] * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); b1a0: e1a00005 mov r0, r5 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; doneConstructors = 1; b1a4: e5c23000 strb r3, [r2] * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); b1a8: ebfff1aa bl 7858 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); b1ac: ebffeda7 bl 6850 <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ b1b0: e3540000 cmp r4, #0 ; 0x0 b1b4: 0a000031 beq b280 <_Thread_Handler+0x110> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { b1b8: e59530a0 ldr r3, [r5, #160] b1bc: e3530003 cmp r3, #3 ; 0x3 b1c0: 979ff103 ldrls pc, [pc, r3, lsl #2] b1c4: ea000008 b b1ec <_Thread_Handler+0x7c> <== NOT EXECUTED b1c8: 0000b258 .word 0x0000b258 <== NOT EXECUTED b1cc: 0000b230 .word 0x0000b230 <== NOT EXECUTED b1d0: 0000b204 .word 0x0000b204 <== NOT EXECUTED b1d4: 0000b1d8 .word 0x0000b1d8 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = b1d8: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED b1dc: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED b1e0: e1a0e00f mov lr, pc <== NOT EXECUTED b1e4: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED b1e8: e5850028 str r0, [r5, #40] <== NOT EXECUTED * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); b1ec: e1a00005 mov r0, r5 <== NOT EXECUTED b1f0: ebfff1a8 bl 7898 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( b1f4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED b1f8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED b1fc: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED b200: ebffe9ec bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = b204: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED b208: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED b20c: e1a0e00f mov lr, pc <== NOT EXECUTED b210: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED b214: e5850028 str r0, [r5, #40] <== NOT EXECUTED * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); b218: e1a00005 mov r0, r5 <== NOT EXECUTED b21c: ebfff19d bl 7898 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( b220: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED b224: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED b228: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED b22c: ebffe9e1 bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = b230: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED b234: e1a0e00f mov lr, pc <== NOT EXECUTED b238: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED b23c: e5850028 str r0, [r5, #40] <== NOT EXECUTED * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); b240: e1a00005 mov r0, r5 <== NOT EXECUTED b244: ebfff193 bl 7898 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( b248: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED b24c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED b250: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED b254: ebffe9d7 bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = b258: e59500a8 ldr r0, [r5, #168] b25c: e1a0e00f mov lr, pc b260: e595f09c ldr pc, [r5, #156] b264: e5850028 str r0, [r5, #40] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); b268: e1a00005 mov r0, r5 b26c: ebfff189 bl 7898 <_User_extensions_Thread_exitted> _Internal_error_Occurred( b270: e3a00000 mov r0, #0 ; 0x0 b274: e3a01001 mov r1, #1 ; 0x1 b278: e3a02006 mov r2, #6 ; 0x6 b27c: ebffe9cd bl 59b8 <_Internal_error_Occurred> * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { _init (); b280: ebffd3a6 bl 120 <_init> b284: eaffffcb b b1b8 <_Thread_Handler+0x48> =============================================================================== 00006acc <_Thread_Handler_initialization>: /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!_Configuration_Table->stack_allocate_hook) 6acc: e59f20ec ldr r2, [pc, #236] ; 6bc0 <_Thread_Handler_initialization+0xf4> 6ad0: e592c000 ldr ip, [r2] #if defined(RTEMS_MULTIPROCESSING) , uint32_t maximum_proxies #endif ) { 6ad4: e92d4030 push {r4, r5, lr} /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!_Configuration_Table->stack_allocate_hook) 6ad8: e28c2020 add r2, ip, #32 ; 0x20 6adc: e892000c ldm r2, {r2, r3} 6ae0: e2733001 rsbs r3, r3, #1 ; 0x1 6ae4: 33a03000 movcc r3, #0 ; 0x0 6ae8: e3520000 cmp r2, #0 ; 0x0 6aec: 11a05003 movne r5, r3 6af0: 02235001 eoreq r5, r3, #1 ; 0x1 6af4: e3550000 cmp r5, #0 ; 0x0 #if defined(RTEMS_MULTIPROCESSING) , uint32_t maximum_proxies #endif ) { 6af8: e24dd00c sub sp, sp, #12 ; 0xc 6afc: e1a0c000 mov ip, r0 /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!_Configuration_Table->stack_allocate_hook) 6b00: 1a00002a bne 6bb0 <_Thread_Handler_initialization+0xe4> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 6b04: e59f40b8 ldr r4, [pc, #184] ; 6bc4 <_Thread_Handler_initialization+0xf8> 6b08: e5d40000 ldrb r0, [r4] 6b0c: e2800001 add r0, r0, #1 ; 0x1 6b10: e1a03200 lsl r3, r0, #4 6b14: e0430100 sub r0, r3, r0, lsl #2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 6b18: e59f20a8 ldr r2, [pc, #168] ; 6bc8 <_Thread_Handler_initialization+0xfc> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 6b1c: e59f30a8 ldr r3, [pc, #168] ; 6bcc <_Thread_Handler_initialization+0x100> _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 6b20: e5821000 str r1, [r2] _Thread_Ticks_per_timeslice = ticks_per_timeslice; 6b24: e583c000 str ip, [r3] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 6b28: e59f20a0 ldr r2, [pc, #160] ; 6bd0 <_Thread_Handler_initialization+0x104> _Thread_Executing = NULL; 6b2c: e59f30a0 ldr r3, [pc, #160] ; 6bd4 <_Thread_Handler_initialization+0x108> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 6b30: e5c25000 strb r5, [r2] _Thread_Executing = NULL; 6b34: e5835000 str r5, [r3] _Thread_Heir = NULL; 6b38: e59f2098 ldr r2, [pc, #152] ; 6bd8 <_Thread_Handler_initialization+0x10c> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 6b3c: e59f3098 ldr r3, [pc, #152] ; 6bdc <_Thread_Handler_initialization+0x110> INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; _Thread_Executing = NULL; _Thread_Heir = NULL; 6b40: e5825000 str r5, [r2] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 6b44: e5835000 str r5, [r3] _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 6b48: eb00048f bl 7d8c <_Workspace_Allocate_or_fatal_error> 6b4c: e59f308c ldr r3, [pc, #140] ; 6be0 <_Thread_Handler_initialization+0x114> (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 6b50: e5d41000 ldrb r1, [r4] _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 6b54: e5830000 str r0, [r3] (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 6b58: e1a02005 mov r2, r5 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 6b5c: e1a0c005 mov ip, r5 6b60: e2822001 add r2, r2, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6b64: e2803004 add r3, r0, #4 ; 0x4 6b68: e1520001 cmp r2, r1 6b6c: e8801008 stm r0, {r3, ip} the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 6b70: e5800008 str r0, [r0, #8] 6b74: e280000c add r0, r0, #12 ; 0xc 6b78: 9afffff8 bls 6b60 <_Thread_Handler_initialization+0x94> /* * Initialize this class of objects. */ _Objects_Initialize_information( 6b7c: e3a0c001 mov ip, #1 ; 0x1 6b80: e3a0ef46 mov lr, #280 ; 0x118 6b84: e3a04008 mov r4, #8 ; 0x8 6b88: e1a0100c mov r1, ip 6b8c: e59f0050 ldr r0, [pc, #80] ; 6be4 <_Thread_Handler_initialization+0x118> 6b90: e1a0200c mov r2, ip 6b94: e1a0300c mov r3, ip 6b98: e58de000 str lr, [sp] 6b9c: e58d4008 str r4, [sp, #8] 6ba0: e58dc004 str ip, [sp, #4] 6ba4: ebfffd01 bl 5fb0 <_Objects_Initialize_information> FALSE, /* TRUE if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 6ba8: e28dd00c add sp, sp, #12 ; 0xc 6bac: e8bd8030 pop {r4, r5, pc} * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!_Configuration_Table->stack_allocate_hook) == (!_Configuration_Table->stack_free_hook) ) ) _Internal_error_Occurred( 6bb0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 6bb4: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 6bb8: e3a0200f mov r2, #15 ; 0xf <== NOT EXECUTED 6bbc: ebfffb7d bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED =============================================================================== 0000691c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 691c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 6920: e2526000 subs r6, r2, #0 ; 0x0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 6924: e1a04003 mov r4, r3 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 6928: 13a03000 movne r3, #0 ; 0x0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 692c: e5dda02c ldrb sl, [sp, #44] 6930: e1a09000 mov r9, r0 6934: e1a05001 mov r5, r1 6938: e59d8028 ldr r8, [sp, #40] 693c: e59db030 ldr fp, [sp, #48] stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 6940: 15c130c0 strbne r3, [r1, #192] 6944: 11a0c004 movne ip, r4 6948: 11a02006 movne r2, r6 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 694c: 0a000034 beq 6a24 <_Thread_Initialize+0x108> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 6950: e59f416c ldr r4, [pc, #364] ; 6ac4 <_Thread_Initialize+0x1a8> 6954: e5940000 ldr r0, [r4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 6958: e3a06000 mov r6, #0 ; 0x0 695c: e3500000 cmp r0, #0 ; 0x0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 6960: e58520c8 str r2, [r5, #200] the_stack->size = size; 6964: e585c0c4 str ip, [r5, #196] 6968: e5856050 str r6, [r5, #80] the_watchdog->routine = routine; 696c: e5856064 str r6, [r5, #100] the_watchdog->id = id; 6970: e5856068 str r6, [r5, #104] the_watchdog->user_data = user_data; 6974: e585606c str r6, [r5, #108] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 6978: e5856100 str r6, [r5, #256] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 697c: 05850110 streq r0, [r5, #272] 6980: 01a07000 moveq r7, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 6984: 1a000033 bne 6a58 <_Thread_Initialize+0x13c> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 6988: e59d3034 ldr r3, [sp, #52] switch ( budget_algorithm ) { 698c: e35b0002 cmp fp, #2 ; 0x2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 6990: e58530b4 str r3, [r5, #180] switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 6994: 059f312c ldreq r3, [pc, #300] ; 6ac8 <_Thread_Initialize+0x1ac> 6998: 05932000 ldreq r2, [r3] 699c: 05852078 streq r2, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 69a0: e59d3038 ldr r3, [sp, #56] the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 69a4: e3a04000 mov r4, #0 ; 0x0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 69a8: e3a06001 mov r6, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 69ac: e58530b8 str r3, [r5, #184] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 69b0: e1a01008 mov r1, r8 69b4: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 69b8: e5c5a0ac strb sl, [r5, #172] the_thread->Start.budget_algorithm = budget_algorithm; 69bc: e585b0b0 str fp, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 69c0: e5856010 str r6, [r5, #16] the_thread->Wait.queue = NULL; 69c4: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 69c8: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 69cc: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 69d0: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 69d4: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 69d8: eb000200 bl 71e0 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 69dc: e1d530b8 ldrh r3, [r5, #8] 69e0: e599201c ldr r2, [r9, #28] * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; the_thread->cpu_time_used.tv_nsec = 0; 69e4: e5854088 str r4, [r5, #136] 69e8: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 69ec: e59d303c ldr r3, [sp, #60] * 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 ); 69f0: e1a00005 mov r0, r5 69f4: e585300c str r3, [r5, #12] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 69f8: e5854084 str r4, [r5, #132] * 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 ); 69fc: eb0003cb bl 7930 <_User_extensions_Thread_create> if ( !extension_status ) { 6a00: e1500004 cmp r0, r4 6a04: 1a000011 bne 6a50 <_Thread_Initialize+0x134> if ( extensions_area ) 6a08: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 6a0c: 11a00007 movne r0, r7 <== NOT EXECUTED 6a10: 1b0004d5 blne 7d6c <_Workspace_Free> <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 6a14: e1a00005 mov r0, r5 <== NOT EXECUTED 6a18: eb0002ad bl 74d4 <_Thread_Stack_Free> <== NOT EXECUTED 6a1c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 6a20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 6a24: e1a00001 mov r0, r1 6a28: e1a01004 mov r1, r4 6a2c: eb000288 bl 7454 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 6a30: e1540000 cmp r4, r0 6a34: 93a03000 movls r3, #0 ; 0x0 6a38: 83a03001 movhi r3, #1 ; 0x1 6a3c: e3500000 cmp r0, #0 ; 0x0 6a40: 03833001 orreq r3, r3, #1 ; 0x1 6a44: e3530000 cmp r3, #0 ; 0x0 6a48: e1a0c000 mov ip, r0 6a4c: 0a000014 beq 6aa4 <_Thread_Initialize+0x188> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( !extension_status ) { 6a50: e1a00006 mov r0, r6 6a54: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 6a58: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 6a5c: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED 6a60: eb0004c5 bl 7d7c <_Workspace_Allocate> <== NOT EXECUTED (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 6a64: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED 6a68: 0a000011 beq 6ab4 <_Thread_Initialize+0x198> <== NOT EXECUTED * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6a6c: e5943000 ldr r3, [r4] <== NOT EXECUTED 6a70: e3730001 cmn r3, #1 ; 0x1 <== NOT EXECUTED return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 6a74: e5857110 str r7, [r5, #272] <== NOT EXECUTED * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6a78: 0affffc2 beq 6988 <_Thread_Initialize+0x6c> <== NOT EXECUTED 6a7c: e1a02006 mov r2, r6 <== NOT EXECUTED 6a80: e1a01007 mov r1, r7 <== NOT EXECUTED the_thread->extensions[i] = NULL; 6a84: e1a00006 mov r0, r6 <== NOT EXECUTED * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6a88: e5943000 ldr r3, [r4] <== NOT EXECUTED the_thread->extensions[i] = NULL; 6a8c: e7810102 str r0, [r1, r2, lsl #2] <== NOT EXECUTED * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6a90: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 6a94: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED 6a98: e1530002 cmp r3, r2 <== NOT EXECUTED 6a9c: 8afffff9 bhi 6a88 <_Thread_Initialize+0x16c> <== NOT EXECUTED 6aa0: eaffffb8 b 6988 <_Thread_Initialize+0x6c> <== NOT EXECUTED if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 6aa4: e3a03001 mov r3, #1 ; 0x1 6aa8: e5c530c0 strb r3, [r5, #192] actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 6aac: e59520cc ldr r2, [r5, #204] 6ab0: eaffffa6 b 6950 <_Thread_Initialize+0x34> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 6ab4: e1a00005 mov r0, r5 <== NOT EXECUTED 6ab8: eb000285 bl 74d4 <_Thread_Stack_Free> <== NOT EXECUTED 6abc: e1a00007 mov r0, r7 <== NOT EXECUTED 6ac0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00007edc <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 7edc: e5903010 ldr r3, [r0, #16] 7ee0: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 7ee4: e92d4070 push {r4, r5, r6, lr} 7ee8: e1a04000 mov r4, r0 7eec: e1a05001 mov r5, r1 7ef0: e1a06002 mov r6, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 7ef4: 13a00000 movne r0, #0 ; 0x0 7ef8: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 7efc: eb000089 bl 8128 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 7f00: e1a02006 mov r2, r6 7f04: e1a01005 mov r1, r5 7f08: e1a00004 mov r0, r4 7f0c: eb000de4 bl b6a4 <_Thread_Reset> _Thread_Load_environment( the_thread ); 7f10: e1a00004 mov r0, r4 7f14: eb000cf8 bl b2fc <_Thread_Load_environment> _Thread_Ready( the_thread ); 7f18: e1a00004 mov r0, r4 7f1c: eb000d9b bl b590 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 7f20: e1a00004 mov r0, r4 7f24: eb000208 bl 874c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 7f28: e59f301c ldr r3, [pc, #28] ; 7f4c <_Thread_Restart+0x70> 7f2c: e5932000 ldr r2, [r3] 7f30: e1540002 cmp r4, r2 7f34: 13a00001 movne r0, #1 ; 0x1 7f38: 18bd8070 popne {r4, r5, r6, pc} #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 7f3c: e28400d0 add r0, r4, #208 ; 0xd0 7f40: eb00032e bl 8c00 <_CPU_Context_restore> 7f44: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 7f48: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00008ce0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 8ce0: e92d0030 push {r4, r5} 8ce4: e20110ff and r1, r1, #255 ; 0xff 8ce8: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 8cec: e10f5000 mrs r5, CPSR 8cf0: e38530c0 orr r3, r5, #192 ; 0xc0 8cf4: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 8cf8: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; 8cfc: 13a03000 movne r3, #0 ; 0x0 8d00: 15803070 strne r3, [r0, #112] ISR_Level level; States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) 8d04: 1a000006 bne 8d24 <_Thread_Resume+0x44> the_thread->suspend_count = 0; else the_thread->suspend_count--; 8d08: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED 8d0c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 8d10: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 8d14: e5803070 str r3, [r0, #112] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 8d18: 0a000001 beq 8d24 <_Thread_Resume+0x44> <== NOT EXECUTED _ISR_Enable( level ); 8d1c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 8d20: ea000003 b 8d34 <_Thread_Resume+0x54> <== NOT EXECUTED return; } current_state = the_thread->current_state; 8d24: e5943010 ldr r3, [r4, #16] if ( current_state & STATES_SUSPENDED ) { 8d28: e3130002 tst r3, #2 ; 0x2 8d2c: 1a000002 bne 8d3c <_Thread_Resume+0x5c> _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 8d30: e129f005 msr CPSR_fc, r5 } 8d34: e8bd0030 pop {r4, r5} 8d38: e12fff1e bx lr 8d3c: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8d40: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 8d44: e5843010 str r3, [r4, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8d48: 1afffff8 bne 8d30 <_Thread_Resume+0x50> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8d4c: e5940090 ldr r0, [r4, #144] 8d50: e1d429b6 ldrh r2, [r4, #150] 8d54: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 8d58: e594108c ldr r1, [r4, #140] 8d5c: e1833002 orr r3, r3, r2 8d60: e1c030b0 strh r3, [r0] _Priority_Major_bit_map |= the_priority_map->ready_major; 8d64: e59fc07c ldr ip, [pc, #124] ; 8de8 <_Thread_Resume+0x108> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8d68: e2813004 add r3, r1, #4 ; 0x4 8d6c: e5843000 str r3, [r4] 8d70: e1dc20b0 ldrh r2, [ip] 8d74: e1d439b4 ldrh r3, [r4, #148] old_last_node = the_chain->last; 8d78: e5910008 ldr r0, [r1, #8] 8d7c: e1822003 orr r2, r2, r3 the_chain->last = the_node; 8d80: e5814008 str r4, [r1, #8] 8d84: e1cc20b0 strh r2, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 8d88: e5840004 str r0, [r4, #4] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 8d8c: e5804000 str r4, [r0] _ISR_Flash( level ); 8d90: e10f3000 mrs r3, CPSR 8d94: e129f005 msr CPSR_fc, r5 8d98: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 8d9c: e59fc048 ldr ip, [pc, #72] ; 8dec <_Thread_Resume+0x10c> 8da0: e59c3000 ldr r3, [ip] 8da4: e5940014 ldr r0, [r4, #20] 8da8: e5932014 ldr r2, [r3, #20] 8dac: e1500002 cmp r0, r2 8db0: 2affffde bcs 8d30 <_Thread_Resume+0x50> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8db4: e59f3034 ldr r3, [pc, #52] ; 8df0 <_Thread_Resume+0x110> 8db8: e5932000 ldr r2, [r3] 8dbc: e5d21076 ldrb r1, [r2, #118] 8dc0: e3510000 cmp r1, #0 ; 0x0 _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 8dc4: e58c4000 str r4, [ip] if ( _Thread_Executing->is_preemptible || 8dc8: 0a000003 beq 8ddc <_Thread_Resume+0xfc> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 8dcc: e59f3020 ldr r3, [pc, #32] ; 8df4 <_Thread_Resume+0x114> 8dd0: e3a02001 mov r2, #1 ; 0x1 8dd4: e5c32000 strb r2, [r3] 8dd8: eaffffd4 b 8d30 <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8ddc: e3500000 cmp r0, #0 ; 0x0 8de0: 1affffd2 bne 8d30 <_Thread_Resume+0x50> 8de4: eafffff8 b 8dcc <_Thread_Resume+0xec> <== NOT EXECUTED =============================================================================== 000073b8 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 73b8: e92d0030 push {r4, r5} ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 73bc: e590408c ldr r4, [r0, #140] _ISR_Disable( level ); 73c0: e10f5000 mrs r5, CPSR 73c4: e38530c0 orr r3, r5, #192 ; 0xc0 73c8: e129f003 msr CPSR_fc, r3 old_state = the_thread->current_state; 73cc: e590c010 ldr ip, [r0, #16] the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 73d0: e38c3004 orr r3, ip, #4 ; 0x4 if ( _States_Is_ready( old_state ) ) { 73d4: e35c0000 cmp ip, #0 ; 0x0 ready = the_thread->ready; _ISR_Disable( level ); old_state = the_thread->current_state; the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 73d8: e5803010 str r3, [r0, #16] if ( _States_Is_ready( old_state ) ) { 73dc: 1a000007 bne 7400 <_Thread_Set_transient+0x48> if ( _Chain_Has_only_one_node( ready ) ) { 73e0: e5942000 ldr r2, [r4] 73e4: e5943008 ldr r3, [r4, #8] 73e8: e1520003 cmp r2, r3 73ec: 0a000006 beq 740c <_Thread_Set_transient+0x54> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 73f0: e5902004 ldr r2, [r0, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 73f4: e5903000 ldr r3, [r0] <== NOT EXECUTED previous = the_node->previous; next->previous = previous; previous->next = next; 73f8: e5823000 str r3, [r2] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 73fc: e5832004 str r2, [r3, #4] <== NOT EXECUTED } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 7400: e129f005 msr CPSR_fc, r5 } 7404: e8bd0030 pop {r4, r5} 7408: e12fff1e bx lr RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 740c: e5901090 ldr r1, [r0, #144] 7410: e1d029ba ldrh r2, [r0, #154] 7414: e1d130b0 ldrh r3, [r1] 7418: e0033002 and r3, r3, r2 741c: e1c130b0 strh r3, [r1] if ( *the_priority_map->minor == 0 ) 7420: e1d120b0 ldrh r2, [r1] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7424: e2843004 add r3, r4, #4 ; 0x4 7428: e3520000 cmp r2, #0 ; 0x0 742c: e8841008 stm r4, {r3, ip} the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 7430: e5844008 str r4, [r4, #8] 7434: 1afffff1 bne 7400 <_Thread_Set_transient+0x48> _Priority_Major_bit_map &= the_priority_map->block_major; 7438: e59f1010 ldr r1, [pc, #16] ; 7450 <_Thread_Set_transient+0x98><== NOT EXECUTED 743c: e1d029b8 ldrh r2, [r0, #152] <== NOT EXECUTED 7440: e1d130b0 ldrh r3, [r1] <== NOT EXECUTED 7444: e0033002 and r3, r3, r2 <== NOT EXECUTED 7448: e1c130b0 strh r3, [r1] <== NOT EXECUTED 744c: eaffffeb b 7400 <_Thread_Set_transient+0x48> <== NOT EXECUTED =============================================================================== 00007454 <_Thread_Stack_Allocate>: * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 7454: e59f3070 ldr r3, [pc, #112] ; 74cc <_Thread_Stack_Allocate+0x78> 7458: e5932000 ldr r2, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 745c: e59f306c ldr r3, [pc, #108] ; 74d0 <_Thread_Stack_Allocate+0x7c> * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 7460: e592c020 ldr ip, [r2, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 7464: e5932000 ldr r2, [r3] 7468: e92d4030 push {r4, r5, lr} 746c: e1510002 cmp r1, r2 7470: 21a04001 movcs r4, r1 7474: 31a04002 movcc r4, r2 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 7478: e35c0000 cmp ip, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 747c: e1a05000 mov r5, r0 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 7480: 0a000008 beq 74a8 <_Thread_Stack_Allocate+0x54> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 7484: e1a00004 mov r0, r4 <== NOT EXECUTED 7488: e1a0e00f mov lr, pc <== NOT EXECUTED 748c: e12fff1c bx ip <== NOT EXECUTED 7490: e1a03000 mov r3, r0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 7494: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 7498: 11a00004 movne r0, r4 <== NOT EXECUTED 749c: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 74a0: e58530cc str r3, [r5, #204] <== NOT EXECUTED return the_stack_size; } 74a4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 74a8: e2844004 add r4, r4, #4 ; 0x4 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 74ac: e1a00004 mov r0, r4 74b0: eb000231 bl 7d7c <_Workspace_Allocate> 74b4: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 74b8: e3530000 cmp r3, #0 ; 0x0 74bc: 11a00004 movne r0, r4 74c0: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 74c4: e58530cc str r3, [r5, #204] return the_stack_size; } 74c8: e8bd8030 pop {r4, r5, pc} =============================================================================== 000074d4 <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 74d4: e5d030c0 ldrb r3, [r0, #192] 74d8: e3530000 cmp r3, #0 ; 0x0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 74dc: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 74e0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _Configuration_Table->stack_free_hook ) 74e4: e59f3028 ldr r3, [pc, #40] ; 7514 <_Thread_Stack_Free+0x40> 74e8: e5932000 ldr r2, [r3] 74ec: e5923024 ldr r3, [r2, #36] 74f0: e3530000 cmp r3, #0 ; 0x0 74f4: 0a000003 beq 7508 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 74f8: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 74fc: e1a0e00f mov lr, pc <== NOT EXECUTED 7500: e12fff13 bx r3 <== NOT EXECUTED 7504: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 7508: e59000c8 ldr r0, [r0, #200] } 750c: e49de004 pop {lr} ; (ldr lr, [sp], #4) if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 7510: ea000215 b 7d6c <_Workspace_Free> =============================================================================== 000075b0 <_Thread_Tickle_timeslice>: void _Thread_Tickle_timeslice( void ) { Thread_Control *executing; executing = _Thread_Executing; 75b0: e59f3084 ldr r3, [pc, #132] ; 763c <_Thread_Tickle_timeslice+0x8c> * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 75b4: e92d4010 push {r4, lr} Thread_Control *executing; executing = _Thread_Executing; 75b8: e5934000 ldr r4, [r3] /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 75bc: e5d42076 ldrb r2, [r4, #118] 75c0: e3520000 cmp r2, #0 ; 0x0 75c4: 08bd8010 popeq {r4, pc} return; if ( !_States_Is_ready( executing->current_state ) ) 75c8: e5943010 ldr r3, [r4, #16] 75cc: e3530000 cmp r3, #0 ; 0x0 75d0: 18bd8010 popne {r4, pc} /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 75d4: e594307c ldr r3, [r4, #124] 75d8: e3530001 cmp r3, #1 ; 0x1 75dc: 38bd8010 popcc {r4, pc} 75e0: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 75e4: 9a00000a bls 7614 <_Thread_Tickle_timeslice+0x64> <== NOT EXECUTED 75e8: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 75ec: 18bd8010 popne {r4, pc} <== NOT EXECUTED executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 75f0: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED 75f4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 75f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 75fc: e5843078 str r3, [r4, #120] <== NOT EXECUTED 7600: 18bd8010 popne {r4, pc} <== NOT EXECUTED (*executing->budget_callout)( executing ); 7604: e1a00004 mov r0, r4 <== NOT EXECUTED 7608: e1a0e00f mov lr, pc <== NOT EXECUTED 760c: e594f080 ldr pc, [r4, #128] <== NOT EXECUTED 7610: e8bd8010 pop {r4, pc} <== NOT EXECUTED case THREAD_CPU_BUDGET_ALGORITHM_NONE: break; case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: if ( (int)(--executing->cpu_time_budget) <= 0 ) { 7614: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED 7618: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 761c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 7620: e5843078 str r3, [r4, #120] <== NOT EXECUTED 7624: c8bd8010 popgt {r4, pc} <== NOT EXECUTED _Thread_Reset_timeslice(); 7628: eb000c83 bl a83c <_Thread_Reset_timeslice> <== NOT EXECUTED executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 762c: e59f300c ldr r3, [pc, #12] ; 7640 <_Thread_Tickle_timeslice+0x90><== NOT EXECUTED 7630: e5932000 ldr r2, [r3] <== NOT EXECUTED 7634: e5842078 str r2, [r4, #120] <== NOT EXECUTED 7638: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00007644 <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 7644: e59f3094 ldr r3, [pc, #148] ; 76e0 <_Thread_Yield_processor+0x9c><== NOT EXECUTED 7648: e5930000 ldr r0, [r3] <== NOT EXECUTED * ready chain * select heir */ void _Thread_Yield_processor( void ) { 764c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 7650: e590c08c ldr ip, [r0, #140] <== NOT EXECUTED _ISR_Disable( level ); 7654: e10f4000 mrs r4, CPSR <== NOT EXECUTED 7658: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED 765c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ( !_Chain_Has_only_one_node( ready ) ) { 7660: e59c2000 ldr r2, [ip] <== NOT EXECUTED 7664: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED 7668: e1520003 cmp r2, r3 <== NOT EXECUTED 766c: 0a000016 beq 76cc <_Thread_Yield_processor+0x88> <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 7670: e8900006 ldm r0, {r1, r2} <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 7674: e28c3004 add r3, ip, #4 ; 0x4 <== NOT EXECUTED Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 7678: e5821000 str r1, [r2] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 767c: e5812004 str r2, [r1, #4] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 7680: e5803000 str r3, [r0] <== NOT EXECUTED old_last_node = the_chain->last; 7684: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED the_chain->last = the_node; 7688: e58c0008 str r0, [ip, #8] <== NOT EXECUTED old_last_node->next = the_node; the_node->previous = old_last_node; 768c: e5803004 str r3, [r0, #4] <== NOT EXECUTED Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 7690: e5830000 str r0, [r3] <== NOT EXECUTED _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 7694: e10f3000 mrs r3, CPSR <== NOT EXECUTED 7698: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 769c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ( _Thread_Is_heir( executing ) ) 76a0: e59f103c ldr r1, [pc, #60] ; 76e4 <_Thread_Yield_processor+0xa0><== NOT EXECUTED 76a4: e5913000 ldr r3, [r1] <== NOT EXECUTED 76a8: e1500003 cmp r0, r3 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 76ac: 059c3000 ldreq r3, [ip] <== NOT EXECUTED 76b0: 05813000 streq r3, [r1] <== NOT EXECUTED _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = TRUE; 76b4: e59f302c ldr r3, [pc, #44] ; 76e8 <_Thread_Yield_processor+0xa4><== NOT EXECUTED 76b8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 76bc: e5c32000 strb r2, [r3] <== NOT EXECUTED _ISR_Enable( level ); 76c0: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED } 76c4: e8bd0010 pop {r4} <== NOT EXECUTED 76c8: e12fff1e bx lr <== NOT EXECUTED if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) 76cc: e59f3010 ldr r3, [pc, #16] ; 76e4 <_Thread_Yield_processor+0xa0><== NOT EXECUTED 76d0: e5932000 ldr r2, [r3] <== NOT EXECUTED 76d4: e1500002 cmp r0, r2 <== NOT EXECUTED 76d8: 1afffff5 bne 76b4 <_Thread_Yield_processor+0x70> <== NOT EXECUTED 76dc: eafffff7 b 76c0 <_Thread_Yield_processor+0x7c> <== NOT EXECUTED =============================================================================== 00006238 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 6238: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 623c: e92d4010 push {r4, lr} <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 6240: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 6244: e1a04001 mov r4, r1 <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 6248: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 624c: e5841044 str r1, [r4, #68] <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 6250: 0a000006 beq 6270 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 6254: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 6258: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED 625c: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED 6260: e1a00004 mov r0, r4 <== NOT EXECUTED 6264: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 6268: e8bd4010 pop {r4, lr} <== NOT EXECUTED 626c: ea000070 b 6434 <_Thread_Clear_state> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 6270: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 6274: e5843050 str r3, [r4, #80] <== NOT EXECUTED * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 6278: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 627c: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 6280: eb000667 bl 7c24 <_Watchdog_Remove> <== NOT EXECUTED 6284: eafffff3 b 6258 <_Thread_blocking_operation_Cancel+0x20> <== NOT EXECUTED =============================================================================== 00006e1c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6e1c: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl} */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6e20: e281303c add r3, r1, #60 ; 0x3c Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 6e24: e5914014 ldr r4, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6e28: e1a07001 mov r7, r1 6e2c: e1a08000 mov r8, r0 6e30: e5813038 str r3, [r1, #56] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 6e34: e2810038 add r0, r1, #56 ; 0x38 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 6e38: e3a01000 mov r1, #0 ; 0x0 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 6e3c: e3140020 tst r4, #32 ; 0x20 6e40: e587103c str r1, [r7, #60] RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 6e44: e1a01324 lsr r1, r4, #6 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6e48: e1a0a002 mov sl, r2 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 6e4c: 11a02201 lslne r2, r1, #4 6e50: 10423101 subne r3, r2, r1, lsl #2 6e54: 10882003 addne r2, r8, r3 the_chain->last = _Chain_Head(the_chain); 6e58: e5870040 str r0, [r7, #64] _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 6e5c: e5986038 ldr r6, [r8, #56] 6e60: 159f91d4 ldrne r9, [pc, #468] ; 703c <_Thread_queue_Enqueue_priority+0x220> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 6e64: 12820008 addne r0, r2, #8 ; 0x8 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 6e68: 1a000028 bne 6f10 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6e6c: e1a03081 lsl r3, r1, #1 6e70: e0833001 add r3, r3, r1 6e74: e2833001 add r3, r3, #1 ; 0x1 6e78: e1a02201 lsl r2, r1, #4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 6e7c: e0422101 sub r2, r2, r1, lsl #2 6e80: e1a03103 lsl r3, r3, #2 6e84: e0880003 add r0, r8, r3 6e88: e0882002 add r2, r8, r2 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 6e8c: e10f5000 mrs r5, CPSR 6e90: e38530c0 orr r3, r5, #192 ; 0xc0 6e94: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 6e98: e5921000 ldr r1, [r2] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6e9c: e1510000 cmp r1, r0 6ea0: 1a00000f bne 6ee4 <_Thread_queue_Enqueue_priority+0xc8> 6ea4: ea000061 b 7030 <_Thread_queue_Enqueue_priority+0x214> search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 6ea8: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 6eac: e1510000 cmp r1, r0 6eb0: 0a00000e beq 6ef0 <_Thread_queue_Enqueue_priority+0xd4> break; search_priority = search_thread->current_priority; 6eb4: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 6eb8: e154000c cmp r4, ip 6ebc: 9a00000b bls 6ef0 <_Thread_queue_Enqueue_priority+0xd4> break; #endif _ISR_Flash( level ); 6ec0: e10f3000 mrs r3, CPSR 6ec4: e129f005 msr CPSR_fc, r5 6ec8: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 6ecc: e5913010 ldr r3, [r1, #16] 6ed0: e1160003 tst r6, r3 6ed4: 0a000049 beq 7000 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 6ed8: e5911000 ldr r1, [r1] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6edc: e1510000 cmp r1, r0 6ee0: 0a000002 beq 6ef0 <_Thread_queue_Enqueue_priority+0xd4> search_priority = search_thread->current_priority; 6ee4: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 6ee8: e154000c cmp r4, ip 6eec: 8affffed bhi 6ea8 <_Thread_queue_Enqueue_priority+0x8c> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6ef0: e1a06005 mov r6, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6ef4: e5980030 ldr r0, [r8, #48] 6ef8: e3500001 cmp r0, #1 ; 0x1 6efc: 0a000034 beq 6fd4 <_Thread_queue_Enqueue_priority+0x1b8> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 6f00: e58a6000 str r6, [sl] <== NOT EXECUTED return the_thread_queue->sync_state; } 6f04: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} 6f08: e12fff1e bx lr if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 6f0c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6f10: e5d93000 ldrb r3, [r9] 6f14: e283c001 add ip, r3, #1 ; 0x1 _ISR_Disable( level ); 6f18: e10f5000 mrs r5, CPSR 6f1c: e38530c0 orr r3, r5, #192 ; 0xc0 6f20: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 6f24: e5901000 ldr r1, [r0] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6f28: e1520001 cmp r2, r1 6f2c: 0a000018 beq 6f94 <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 6f30: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6f34: e154000c cmp r4, ip 6f38: 2a000015 bcs 6f94 <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6f3c: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 6f40: e1520001 cmp r2, r1 6f44: 1a00000f bne 6f88 <_Thread_queue_Enqueue_priority+0x16c> 6f48: ea000011 b 6f94 <_Thread_queue_Enqueue_priority+0x178> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 6f4c: e10f3000 mrs r3, CPSR 6f50: e129f005 msr CPSR_fc, r5 6f54: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 6f58: e5913010 ldr r3, [r1, #16] 6f5c: e1160003 tst r6, r3 6f60: 0affffe9 beq 6f0c <_Thread_queue_Enqueue_priority+0xf0> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 6f64: e5911004 ldr r1, [r1, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6f68: e1510002 cmp r1, r2 6f6c: 0a000008 beq 6f94 <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 6f70: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6f74: e154000c cmp r4, ip 6f78: 2a000005 bcs 6f94 <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6f7c: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 6f80: e1510002 cmp r1, r2 <== NOT EXECUTED 6f84: 0a000002 beq 6f94 <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED break; search_priority = search_thread->current_priority; 6f88: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6f8c: e154000c cmp r4, ip 6f90: 3affffed bcc 6f4c <_Thread_queue_Enqueue_priority+0x130> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6f94: e5980030 ldr r0, [r8, #48] 6f98: e3500001 cmp r0, #1 ; 0x1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6f9c: e1a06005 mov r6, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6fa0: 1affffd6 bne 6f00 <_Thread_queue_Enqueue_priority+0xe4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 6fa4: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 6fa8: e154000c cmp r4, ip if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 6fac: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 6fb0: 0a000014 beq 7008 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 6fb4: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 6fb8: e5871004 str r1, [r7, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 6fbc: e5873000 str r3, [r7] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6fc0: e5878044 str r8, [r7, #68] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 6fc4: e5817000 str r7, [r1] next_node->previous = the_node; 6fc8: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6fcc: e129f005 msr CPSR_fc, r5 6fd0: eaffffcb b 6f04 <_Thread_queue_Enqueue_priority+0xe8> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 6fd4: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 6fd8: e154000c cmp r4, ip if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 6fdc: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 6fe0: 0a000008 beq 7008 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 6fe4: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6fe8: e887000a stm r7, {r1, r3} the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6fec: e5878044 str r8, [r7, #68] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 6ff0: e5837000 str r7, [r3] search_node->previous = the_node; 6ff4: e5817004 str r7, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6ff8: e129f005 msr CPSR_fc, r5 6ffc: eaffffc0 b 6f04 <_Thread_queue_Enqueue_priority+0xe8> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 7000: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 7004: eaffffa0 b 6e8c <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED 7008: e281303c add r3, r1, #60 ; 0x3c _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 700c: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7010: e5873000 str r3, [r7] the_node->previous = previous_node; 7014: e5872004 str r2, [r7, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7018: e5878044 str r8, [r7, #68] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 701c: e5827000 str r7, [r2] search_node->previous = the_node; 7020: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 7024: e129f006 msr CPSR_fc, r6 7028: e3a00001 mov r0, #1 ; 0x1 702c: eaffffb4 b 6f04 <_Thread_queue_Enqueue_priority+0xe8> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7030: e1a06005 mov r6, r5 7034: e3e0c000 mvn ip, #0 ; 0x0 7038: eaffffad b 6ef4 <_Thread_queue_Enqueue_priority+0xd8> =============================================================================== 0000b290 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { b290: e92d4010 push {r4, lr} b294: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); b298: e10f0000 mrs r0, CPSR b29c: e38030c0 orr r3, r0, #192 ; 0xc0 b2a0: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { b2a4: e5913010 ldr r3, [r1, #16] b2a8: e3c334ff bic r3, r3, #-16777216 ; 0xff000000 b2ac: e3c3373f bic r3, r3, #16515072 ; 0xfc0000 b2b0: e3c33c41 bic r3, r3, #16640 ; 0x4100 b2b4: e3c3301f bic r3, r3, #31 ; 0x1f b2b8: e3530000 cmp r3, #0 ; 0x0 b2bc: 0a00000f beq b300 <_Thread_queue_Extract_fifo+0x70> _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { b2c0: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; b2c4: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; b2c8: e5911000 ldr r1, [r1] b2cc: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; b2d0: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; b2d4: e5821000 str r1, [r2] b2d8: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; b2dc: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { b2e0: 0a000008 beq b308 <_Thread_queue_Extract_fifo+0x78> _ISR_Enable( level ); b2e4: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); b2e8: e3a01201 mov r1, #268435456 ; 0x10000000 b2ec: e2811bff add r1, r1, #261120 ; 0x3fc00 b2f0: e1a00004 mov r0, r4 b2f4: e2811ffe add r1, r1, #1016 ; 0x3f8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } b2f8: e8bd4010 pop {r4, lr} b2fc: eaffec4c b 6434 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); b300: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } b304: e8bd8010 pop {r4, pc} <== NOT EXECUTED b308: e3a03003 mov r3, #3 ; 0x3 b30c: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); b310: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); b314: e2840048 add r0, r4, #72 ; 0x48 b318: ebfff241 bl 7c24 <_Watchdog_Remove> b31c: eafffff1 b b2e8 <_Thread_queue_Extract_fifo+0x58> =============================================================================== 0000a5f8 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { a5f8: e92d4070 push {r4, r5, r6, lr} a5fc: e1a04001 mov r4, r1 a600: e20260ff and r6, r2, #255 ; 0xff Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); a604: e10fc000 mrs ip, CPSR a608: e38c30c0 orr r3, ip, #192 ; 0xc0 a60c: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { a610: e5913010 ldr r3, [r1, #16] a614: e3c334ff bic r3, r3, #-16777216 ; 0xff000000 a618: e3c3373f bic r3, r3, #16515072 ; 0xfc0000 a61c: e3c33c41 bic r3, r3, #16640 ; 0x4100 a620: e3c3301f bic r3, r3, #31 ; 0x1f a624: e3530000 cmp r3, #0 ; 0x0 a628: 0a000023 beq a6bc <_Thread_queue_Extract_priority_helper+0xc4> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a62c: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a630: e284303c add r3, r4, #60 ; 0x3c a634: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; a638: e894000c ldm r4, {r2, r3} new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; a63c: 05823004 streq r3, [r2, #4] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; a640: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a644: 0a00000e beq a684 <_Thread_queue_Extract_priority_helper+0x8c> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; a648: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; a64c: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; a650: e5821004 str r1, [r2, #4] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; a654: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a658: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a65c: e5942038 ldr r2, [r4, #56] a660: e5943040 ldr r3, [r4, #64] a664: e1520003 cmp r2, r3 a668: 0a000005 beq a684 <_Thread_queue_Extract_priority_helper+0x8c> new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a66c: e281203c add r2, r1, #60 ; 0x3c new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = a670: e2813038 add r3, r1, #56 ; 0x38 a674: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; a678: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; a67c: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a680: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { a684: e3560000 cmp r6, #0 ; 0x0 a688: 1a000009 bne a6b4 <_Thread_queue_Extract_priority_helper+0xbc> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a68c: e5943050 ldr r3, [r4, #80] a690: e3530002 cmp r3, #2 ; 0x2 a694: 0a00000a beq a6c4 <_Thread_queue_Extract_priority_helper+0xcc> _ISR_Enable( level ); a698: e129f00c msr CPSR_fc, ip a69c: e3a01201 mov r1, #268435456 ; 0x10000000 a6a0: e2811bff add r1, r1, #261120 ; 0x3fc00 a6a4: e1a00004 mov r0, r4 a6a8: e2811ffe add r1, r1, #1016 ; 0x3f8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a6ac: e8bd4070 pop {r4, r5, r6, lr} a6b0: eaffef5f b 6434 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); a6b4: e129f00c msr CPSR_fc, ip a6b8: e8bd8070 pop {r4, r5, r6, pc} Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); a6bc: e129f00c msr CPSR_fc, ip <== NOT EXECUTED a6c0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED a6c4: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED a6c8: e5843050 str r3, [r4, #80] <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); a6cc: e129f00c msr CPSR_fc, ip <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); a6d0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a6d4: ebfff552 bl 7c24 <_Watchdog_Remove> <== NOT EXECUTED a6d8: eaffffef b a69c <_Thread_queue_Extract_priority_helper+0xa4><== NOT EXECUTED =============================================================================== 0000a6dc <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { a6dc: e1a01000 mov r1, r0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; a6e0: e5900044 ldr r0, [r0, #68] * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && a6e4: e590c030 ldr ip, [r0, #48] a6e8: e35c0000 cmp ip, #0 ; 0x0 a6ec: 0a000003 beq a700 <_Thread_queue_Process_timeout+0x24> a6f0: e59f302c ldr r3, [pc, #44] ; a724 <_Thread_queue_Process_timeout+0x48><== NOT EXECUTED a6f4: e5932000 ldr r2, [r3] <== NOT EXECUTED a6f8: e1510002 cmp r1, r2 <== NOT EXECUTED a6fc: 0a000002 beq a70c <_Thread_queue_Process_timeout+0x30> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a700: e590303c ldr r3, [r0, #60] a704: e5813034 str r3, [r1, #52] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); a708: eaffffb4 b a5e0 <_Thread_queue_Extract> * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { a70c: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a710: 1590303c ldrne r3, [r0, #60] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; a714: 13a02002 movne r2, #2 ; 0x2 <== NOT EXECUTED */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a718: 15813034 strne r3, [r1, #52] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; a71c: 15802030 strne r2, [r0, #48] <== NOT EXECUTED a720: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00012c24 <_Timer_Server_body>: * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 12c24: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c28: e59f01cc ldr r0, [pc, #460] ; 12dfc <_Timer_Server_body+0x1d8> 12c2c: e59f81cc ldr r8, [pc, #460] ; 12e00 <_Timer_Server_body+0x1dc> 12c30: e5902000 ldr r2, [r0] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c34: e59f01c8 ldr r0, [pc, #456] ; 12e04 <_Timer_Server_body+0x1e0> 12c38: e5983000 ldr r3, [r8] * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 12c3c: e24dd00c sub sp, sp, #12 ; 0xc /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c40: e59f91c0 ldr r9, [pc, #448] ; 12e08 <_Timer_Server_body+0x1e4> _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c44: e59fb1c0 ldr fp, [pc, #448] ; 12e0c <_Timer_Server_body+0x1e8> 12c48: e5901000 ldr r1, [r0] 12c4c: e2833001 add r3, r3, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12c50: e28d5004 add r5, sp, #4 ; 0x4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 12c54: e3a04000 mov r4, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12c58: e1a0600d mov r6, sp /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c5c: e5892000 str r2, [r9] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c60: e58b1000 str r1, [fp] 12c64: e5883000 str r3, [r8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c68: e58d5000 str r5, [sp] the_chain->permanent_null = NULL; 12c6c: e98d2010 stmib sp, {r4, sp} /* * Insert the timers that were inserted before we got to run. * This should be done with dispatching disabled. */ _Thread_Disable_dispatch(); _Timer_Server_process_insertions(); 12c70: ebffffce bl 12bb0 <_Timer_Server_process_insertions> _Thread_Enable_dispatch(); 12c74: eb000b48 bl 1599c <_Thread_Enable_dispatch> 12c78: e59fa190 ldr sl, [pc, #400] ; 12e10 <_Timer_Server_body+0x1ec> if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 12c7c: e1a07004 mov r7, r4 12c80: e5983000 ldr r3, [r8] 12c84: e2833001 add r3, r3, #1 ; 0x1 12c88: e5883000 str r3, [r8] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 12c8c: e3a01008 mov r1, #8 ; 0x8 12c90: e59a0000 ldr r0, [sl] 12c94: eb000e27 bl 16538 <_Thread_Set_state> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 12c98: e59f2174 ldr r2, [pc, #372] ; 12e14 <_Timer_Server_body+0x1f0> _Timer_Server_reset_ticks_timer(); 12c9c: e59f0174 ldr r0, [pc, #372] ; 12e18 <_Timer_Server_body+0x1f4> 12ca0: e5923000 ldr r3, [r2] 12ca4: e1530000 cmp r3, r0 12ca8: 0a000006 beq 12cc8 <_Timer_Server_body+0xa4> 12cac: e59f215c ldr r2, [pc, #348] ; 12e10 <_Timer_Server_body+0x1ec> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cb0: e5933010 ldr r3, [r3, #16] 12cb4: e5921000 ldr r1, [r2] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12cb8: e59f015c ldr r0, [pc, #348] ; 12e1c <_Timer_Server_body+0x1f8> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cbc: e5813054 str r3, [r1, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12cc0: e2811048 add r1, r1, #72 ; 0x48 12cc4: eb0010ff bl 170c8 <_Watchdog_Insert> 12cc8: e59f0150 ldr r0, [pc, #336] ; 12e20 <_Timer_Server_body+0x1fc> _Timer_Server_reset_seconds_timer(); 12ccc: e59f2150 ldr r2, [pc, #336] ; 12e24 <_Timer_Server_body+0x200> 12cd0: e5903000 ldr r3, [r0] 12cd4: e1530002 cmp r3, r2 12cd8: 0a000004 beq 12cf0 <_Timer_Server_body+0xcc> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cdc: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12ce0: e59f1140 ldr r1, [pc, #320] ; 12e28 <_Timer_Server_body+0x204><== NOT EXECUTED 12ce4: e59f0140 ldr r0, [pc, #320] ; 12e2c <_Timer_Server_body+0x208><== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12ce8: e581300c str r3, [r1, #12] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12cec: eb0010f5 bl 170c8 <_Watchdog_Insert> <== NOT EXECUTED _Thread_Enable_dispatch(); 12cf0: eb000b29 bl 1599c <_Thread_Enable_dispatch> 12cf4: e5983000 ldr r3, [r8] 12cf8: e2833001 add r3, r3, #1 ; 0x1 12cfc: e5883000 str r3, [r8] /* * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 12d00: e59a0000 ldr r0, [sl] 12d04: e2800048 add r0, r0, #72 ; 0x48 12d08: eb00115d bl 17284 <_Watchdog_Remove> _Timer_Server_stop_seconds_timer(); 12d0c: e59f0114 ldr r0, [pc, #276] ; 12e28 <_Timer_Server_body+0x204> 12d10: eb00115b bl 17284 <_Watchdog_Remove> ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 12d14: e59f30e0 ldr r3, [pc, #224] ; 12dfc <_Timer_Server_body+0x1d8> if ( snapshot >= _Timer_Server_ticks_last_time ) 12d18: e5991000 ldr r1, [r9] ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 12d1c: e593c000 ldr ip, [r3] if ( snapshot >= _Timer_Server_ticks_last_time ) 12d20: e15c0001 cmp ip, r1 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 12d24: 31e03001 mvncc r3, r1 Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; 12d28: 2061100c rsbcs r1, r1, ip else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 12d2c: 3083100c addcc r1, r3, ip _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 12d30: e59f00dc ldr r0, [pc, #220] ; 12e14 <_Timer_Server_body+0x1f0> 12d34: e1a0200d mov r2, sp if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 12d38: e589c000 str ip, [r9] _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 12d3c: eb0010b3 bl 17010 <_Watchdog_Adjust_to_chain> /* * 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 _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 12d40: e59f00bc ldr r0, [pc, #188] ; 12e04 <_Timer_Server_body+0x1e0> if ( snapshot > _Timer_Server_seconds_last_time ) { 12d44: e59b2000 ldr r2, [fp] /* * 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 _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 12d48: e5904000 ldr r4, [r0] if ( snapshot > _Timer_Server_seconds_last_time ) { 12d4c: e1540002 cmp r4, r2 12d50: 8a00001f bhi 12dd4 <_Timer_Server_body+0x1b0> * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); } else if ( snapshot < _Timer_Server_seconds_last_time ) { 12d54: 3a000023 bcc 12de8 <_Timer_Server_body+0x1c4> * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); } _Timer_Server_seconds_last_time = snapshot; 12d58: e58b4000 str r4, [fp] _Timer_Server_process_seconds_chain( &to_fire ); /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12d5c: ebffff93 bl 12bb0 <_Timer_Server_process_insertions> /* * Enable dispatching to process the set that are ready "to fire." */ _Thread_Enable_dispatch(); 12d60: eb000b0d bl 1599c <_Thread_Enable_dispatch> */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 12d64: e10f1000 mrs r1, CPSR 12d68: e38130c0 orr r3, r1, #192 ; 0xc0 12d6c: e129f003 msr CPSR_fc, r3 12d70: e59d2000 ldr r2, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 12d74: e1550002 cmp r5, r2 12d78: 0a000013 beq 12dcc <_Timer_Server_body+0x1a8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 12d7c: e5923000 ldr r3, [r2] the_chain->first = new_first; 12d80: e58d3000 str r3, [sp] new_first->previous = _Chain_Head(the_chain); 12d84: e5836004 str r6, [r3, #4] 12d88: ea000002 b 12d98 <_Timer_Server_body+0x174> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 12d8c: e5933000 ldr r3, [r3] <== NOT EXECUTED the_chain->first = new_first; 12d90: e58d3000 str r3, [sp] <== NOT EXECUTED new_first->previous = _Chain_Head(the_chain); 12d94: e5836004 str r6, [r3, #4] <== NOT EXECUTED if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 12d98: e5827008 str r7, [r2, #8] _ISR_Enable( level ); 12d9c: e129f001 msr CPSR_fc, r1 (*watch->routine)( watch->id, watch->user_data ); 12da0: e2820020 add r0, r2, #32 ; 0x20 12da4: e8900003 ldm r0, {r0, r1} 12da8: e1a0e00f mov lr, pc 12dac: e592f01c ldr pc, [r2, #28] */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 12db0: e10f1000 mrs r1, CPSR 12db4: e38130c0 orr r3, r1, #192 ; 0xc0 12db8: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 12dbc: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 12dc0: e1550003 cmp r5, r3 watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire ); 12dc4: e1a02003 mov r2, r3 12dc8: 1affffef bne 12d8c <_Timer_Server_body+0x168> if ( watch == NULL ) { _ISR_Enable( level ); 12dcc: e129f001 msr CPSR_fc, r1 12dd0: eaffffaa b 12c80 <_Timer_Server_body+0x5c> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); 12dd4: e0621004 rsb r1, r2, r4 12dd8: e59f0040 ldr r0, [pc, #64] ; 12e20 <_Timer_Server_body+0x1fc> 12ddc: e1a0200d mov r2, sp 12de0: eb00108a bl 17010 <_Watchdog_Adjust_to_chain> 12de4: eaffffdb b 12d58 <_Timer_Server_body+0x134> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); 12de8: e0642002 rsb r2, r4, r2 <== NOT EXECUTED 12dec: e59f002c ldr r0, [pc, #44] ; 12e20 <_Timer_Server_body+0x1fc><== NOT EXECUTED 12df0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 12df4: eb001056 bl 16f54 <_Watchdog_Adjust> <== NOT EXECUTED 12df8: eaffffd6 b 12d58 <_Timer_Server_body+0x134> <== NOT EXECUTED =============================================================================== 00012bb0 <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 12bb0: e52de004 push {lr} ; (str lr, [sp, #-4]!) Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 12bb4: e59f005c ldr r0, [pc, #92] ; 12c18 <_Timer_Server_process_insertions+0x68> 12bb8: eb000283 bl 135cc <_Chain_Get> if ( the_timer == NULL ) 12bbc: e3500000 cmp r0, #0 ; 0x0 12bc0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 12bc4: e5903038 ldr r3, [r0, #56] 12bc8: e3530001 cmp r3, #1 ; 0x1 12bcc: 0a00000c beq 12c04 <_Timer_Server_process_insertions+0x54> _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 12bd0: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 12bd4: 0a000005 beq 12bf0 <_Timer_Server_process_insertions+0x40> <== NOT EXECUTED } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12bd8: ebfffff4 bl 12bb0 <_Timer_Server_process_insertions> <== NOT EXECUTED static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 12bdc: e59f0034 ldr r0, [pc, #52] ; 12c18 <_Timer_Server_process_insertions+0x68> 12be0: eb000279 bl 135cc <_Chain_Get> if ( the_timer == NULL ) 12be4: e3500000 cmp r0, #0 ; 0x0 12be8: 1afffff5 bne 12bc4 <_Timer_Server_process_insertions+0x14> 12bec: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 12bf0: e2801010 add r1, r0, #16 ; 0x10 <== NOT EXECUTED 12bf4: e59f0020 ldr r0, [pc, #32] ; 12c1c <_Timer_Server_process_insertions+0x6c><== NOT EXECUTED 12bf8: eb001132 bl 170c8 <_Watchdog_Insert> <== NOT EXECUTED } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12bfc: ebffffeb bl 12bb0 <_Timer_Server_process_insertions> <== NOT EXECUTED 12c00: eafffff5 b 12bdc <_Timer_Server_process_insertions+0x2c> <== NOT EXECUTED the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 12c04: e2801010 add r1, r0, #16 ; 0x10 12c08: e59f0010 ldr r0, [pc, #16] ; 12c20 <_Timer_Server_process_insertions+0x70> 12c0c: eb00112d bl 170c8 <_Watchdog_Insert> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12c10: ebffffe6 bl 12bb0 <_Timer_Server_process_insertions> 12c14: eafffff0 b 12bdc <_Timer_Server_process_insertions+0x2c> =============================================================================== 000095ac <_Timespec_Divide_by_integer>: void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 95ac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; 95b0: e3a0c5ee mov ip, #998244352 ; 0x3b800000 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 95b4: e5907000 ldr r7, [r0] <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 95b8: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED 95bc: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 95c0: e1a08fc7 asr r8, r7, #31 <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 95c4: e086579c umull r5, r6, ip, r7 <== NOT EXECUTED 95c8: e026689c mla r6, ip, r8, r6 <== NOT EXECUTED t += time->tv_nsec; 95cc: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED 95d0: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 95d4: e0950003 adds r0, r5, r3 <== NOT EXECUTED 95d8: e1a07001 mov r7, r1 <== NOT EXECUTED 95dc: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 95e0: e1a0a002 mov sl, r2 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 95e4: e0a61004 adc r1, r6, r4 <== NOT EXECUTED 95e8: e1a02007 mov r2, r7 <== NOT EXECUTED 95ec: e1a03008 mov r3, r8 <== NOT EXECUTED 95f0: eb0033c5 bl 1650c <__udivdi3> <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 95f4: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED 95f8: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED 95fc: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED 9600: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 9604: e1a04000 mov r4, r0 <== NOT EXECUTED 9608: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 960c: eb0033be bl 1650c <__udivdi3> <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 9610: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED 9614: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 9618: e58a0000 str r0, [sl] <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 961c: e1a01005 mov r1, r5 <== NOT EXECUTED 9620: e1a00004 mov r0, r4 <== NOT EXECUTED 9624: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED 9628: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 962c: eb0034fe bl 16a2c <__umoddi3> <== NOT EXECUTED 9630: e58a0004 str r0, [sl, #4] <== NOT EXECUTED } 9634: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00009c88 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 9c88: e92d4010 push {r4, lr} 9c8c: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); 9c90: eb0009d9 bl c3fc <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 9c94: e5943024 ldr r3, [r4, #36] 9c98: e3530000 cmp r3, #0 ; 0x0 9c9c: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); 9ca0: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } 9ca4: e8bd4010 pop {r4, lr} <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 9ca8: ea0009d3 b c3fc <_Chain_Extract> <== NOT EXECUTED =============================================================================== 000098d4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 98d4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 98d8: e1a07000 mov r7, r0 98dc: e1a04002 mov r4, r2 ISR_Level level; _ISR_Disable( level ); 98e0: e10fc000 mrs ip, CPSR 98e4: e38c30c0 orr r3, ip, #192 ; 0xc0 98e8: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 98ec: e1a06000 mov r6, r0 98f0: e4960004 ldr r0, [r6], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 98f4: e1500006 cmp r0, r6 98f8: 0a000019 beq 9964 <_Watchdog_Adjust+0x90> switch ( direction ) { 98fc: e3510000 cmp r1, #0 ; 0x0 9900: 1a000019 bne 996c <_Watchdog_Adjust+0x98> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 9904: e3520000 cmp r2, #0 ; 0x0 9908: 0a000015 beq 9964 <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 990c: e5905010 ldr r5, [r0, #16] 9910: e1520005 cmp r2, r5 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 9914: e1a01000 mov r1, r0 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 9918: 23a08001 movcs r8, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 991c: 2a000005 bcs 9938 <_Watchdog_Adjust+0x64> 9920: ea000017 b 9984 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 9924: e0544005 subs r4, r4, r5 9928: 0a00000d beq 9964 <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 992c: e5915010 ldr r5, [r1, #16] 9930: e1550004 cmp r5, r4 9934: 8a000012 bhi 9984 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 9938: e5818010 str r8, [r1, #16] _ISR_Enable( level ); 993c: e129f00c msr CPSR_fc, ip _Watchdog_Tickle( header ); 9940: e1a00007 mov r0, r7 9944: eb0000ab bl 9bf8 <_Watchdog_Tickle> _ISR_Disable( level ); 9948: e10fc000 mrs ip, CPSR 994c: e38c30c0 orr r3, ip, #192 ; 0xc0 9950: e129f003 msr CPSR_fc, r3 9954: e5973000 ldr r3, [r7] if ( _Chain_Is_empty( header ) ) 9958: e1560003 cmp r6, r3 995c: e1a01003 mov r1, r3 9960: 1affffef bne 9924 <_Watchdog_Adjust+0x50> } break; } } _ISR_Enable( level ); 9964: e129f00c msr CPSR_fc, ip } 9968: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 996c: e3510001 cmp r1, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 9970: 05903010 ldreq r3, [r0, #16] 9974: 00833002 addeq r3, r3, r2 9978: 05803010 streq r3, [r0, #16] } break; } } _ISR_Enable( level ); 997c: e129f00c msr CPSR_fc, ip } 9980: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 9984: e0643005 rsb r3, r4, r5 9988: e5813010 str r3, [r1, #16] 998c: eafffff4 b 9964 <_Watchdog_Adjust+0x90> =============================================================================== 00007a68 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7a68: e59f3144 ldr r3, [pc, #324] ; 7bb4 <_Watchdog_Insert+0x14c><== NOT EXECUTED void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 7a6c: e92d01f0 push {r4, r5, r6, r7, r8} <== NOT EXECUTED 7a70: e1a04001 mov r4, r1 <== NOT EXECUTED Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7a74: e5935000 ldr r5, [r3] <== NOT EXECUTED _ISR_Disable( level ); 7a78: e10f6000 mrs r6, CPSR <== NOT EXECUTED 7a7c: e38630c0 orr r3, r6, #192 ; 0xc0 <== NOT EXECUTED 7a80: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 7a84: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 7a88: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 7a8c: 1a000041 bne 7b98 <_Watchdog_Insert+0x130> <== NOT EXECUTED _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 7a90: e59f8120 ldr r8, [pc, #288] ; 7bb8 <_Watchdog_Insert+0x150><== NOT EXECUTED 7a94: e5983000 ldr r3, [r8] <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7a98: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED _Watchdog_Sync_count++; 7a9c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7aa0: e5812008 str r2, [r1, #8] <== NOT EXECUTED _Watchdog_Sync_count++; 7aa4: e5883000 str r3, [r8] <== NOT EXECUTED 7aa8: e59f710c ldr r7, [pc, #268] ; 7bbc <_Watchdog_Insert+0x154><== NOT EXECUTED restart: delta_interval = the_watchdog->initial; 7aac: e594c00c ldr ip, [r4, #12] <== NOT EXECUTED */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7ab0: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 7ab4: e5902000 ldr r2, [r0] <== NOT EXECUTED ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7ab8: 0a000023 beq 7b4c <_Watchdog_Insert+0xe4> <== NOT EXECUTED 7abc: e5923000 ldr r3, [r2] <== NOT EXECUTED 7ac0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 7ac4: 0a000020 beq 7b4c <_Watchdog_Insert+0xe4> <== NOT EXECUTED break; if ( delta_interval < after->delta_interval ) { 7ac8: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED 7acc: e15c0001 cmp ip, r1 <== NOT EXECUTED 7ad0: 3a000032 bcc 7ba0 <_Watchdog_Insert+0x138> <== NOT EXECUTED * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 7ad4: e10f3000 mrs r3, CPSR <== NOT EXECUTED 7ad8: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 7adc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7ae0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 7ae4: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 7ae8: 1a000023 bne 7b7c <_Watchdog_Insert+0x114> <== NOT EXECUTED goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7aec: e5973000 ldr r3, [r7] <== NOT EXECUTED 7af0: e1550003 cmp r5, r3 <== NOT EXECUTED if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7af4: 2061c00c rsbcs ip, r1, ip <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7af8: 2a000010 bcs 7b40 <_Watchdog_Insert+0xd8> <== NOT EXECUTED 7afc: ea00002a b 7bac <_Watchdog_Insert+0x144> <== NOT EXECUTED */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b00: e5923000 ldr r3, [r2] <== NOT EXECUTED 7b04: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 7b08: 0a00000f beq 7b4c <_Watchdog_Insert+0xe4> <== NOT EXECUTED break; if ( delta_interval < after->delta_interval ) { 7b0c: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED 7b10: e151000c cmp r1, ip <== NOT EXECUTED 7b14: 8a000021 bhi 7ba0 <_Watchdog_Insert+0x138> <== NOT EXECUTED * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 7b18: e10f3000 mrs r3, CPSR <== NOT EXECUTED 7b1c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 7b20: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7b24: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 7b28: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7b2c: e061c00c rsb ip, r1, ip <== NOT EXECUTED * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7b30: 1a000011 bne 7b7c <_Watchdog_Insert+0x114> <== NOT EXECUTED goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7b34: e5973000 ldr r3, [r7] <== NOT EXECUTED 7b38: e1550003 cmp r5, r3 <== NOT EXECUTED 7b3c: 3a00001a bcc 7bac <_Watchdog_Insert+0x144> <== NOT EXECUTED */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b40: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 7b44: e5922000 ldr r2, [r2] <== NOT EXECUTED 7b48: 1affffec bne 7b00 <_Watchdog_Insert+0x98> <== NOT EXECUTED _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 7b4c: e5921004 ldr r1, [r2, #4] <== NOT EXECUTED the_watchdog->start_time = _Watchdog_Ticks_since_boot; 7b50: e59f3068 ldr r3, [pc, #104] ; 7bc0 <_Watchdog_Insert+0x158><== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 7b54: e5910000 ldr r0, [r1] <== NOT EXECUTED 7b58: e5932000 ldr r2, [r3] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 7b5c: e3a03002 mov r3, #2 ; 0x2 <== NOT EXECUTED after_node->next = the_node; 7b60: e5814000 str r4, [r1] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 7b64: e5841004 str r1, [r4, #4] <== NOT EXECUTED 7b68: e5842014 str r2, [r4, #20] <== NOT EXECUTED 7b6c: e5843008 str r3, [r4, #8] <== NOT EXECUTED } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 7b70: e584c010 str ip, [r4, #16] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 7b74: e5804004 str r4, [r0, #4] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 7b78: e5840000 str r0, [r4] <== NOT EXECUTED _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 7b7c: e5875000 str r5, [r7] <== NOT EXECUTED _Watchdog_Sync_count--; 7b80: e5983000 ldr r3, [r8] <== NOT EXECUTED 7b84: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 7b88: e5883000 str r3, [r8] <== NOT EXECUTED _ISR_Enable( level ); 7b8c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED } 7b90: e8bd01f0 pop {r4, r5, r6, r7, r8} <== NOT EXECUTED 7b94: e12fff1e bx lr <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 7b98: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 7b9c: eafffffb b 7b90 <_Watchdog_Insert+0x128> <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 7ba0: e06c3001 rsb r3, ip, r1 <== NOT EXECUTED 7ba4: e5823010 str r3, [r2, #16] <== NOT EXECUTED 7ba8: eaffffe7 b 7b4c <_Watchdog_Insert+0xe4> <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 7bac: e5875000 str r5, [r7] <== NOT EXECUTED 7bb0: eaffffbd b 7aac <_Watchdog_Insert+0x44> <== NOT EXECUTED =============================================================================== 00007c24 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 7c24: e92d0030 push {r4, r5} <== NOT EXECUTED ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 7c28: e10f5000 mrs r5, CPSR <== NOT EXECUTED 7c2c: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 7c30: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED previous_state = the_watchdog->state; 7c34: e590c008 ldr ip, [r0, #8] <== NOT EXECUTED switch ( previous_state ) { 7c38: e35c0001 cmp ip, #1 ; 0x1 <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 7c3c: 03a03000 moveq r3, #0 ; 0x0 <== NOT EXECUTED 7c40: 05803008 streq r3, [r0, #8] <== NOT EXECUTED Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 7c44: 0a000000 beq 7c4c <_Watchdog_Remove+0x28> <== NOT EXECUTED 7c48: 2a000006 bcs 7c68 <_Watchdog_Remove+0x44> <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 7c4c: e59f306c ldr r3, [pc, #108] ; 7cc0 <_Watchdog_Remove+0x9c> <== NOT EXECUTED 7c50: e5932000 ldr r2, [r3] <== NOT EXECUTED 7c54: e5802018 str r2, [r0, #24] <== NOT EXECUTED _ISR_Enable( level ); 7c58: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED return( previous_state ); } 7c5c: e1a0000c mov r0, ip <== NOT EXECUTED 7c60: e8bd0030 pop {r4, r5} <== NOT EXECUTED 7c64: e12fff1e bx lr <== NOT EXECUTED Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 7c68: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED 7c6c: 8afffff6 bhi 7c4c <_Watchdog_Remove+0x28> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 7c70: e5904000 ldr r4, [r0] <== NOT EXECUTED case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 7c74: e5943000 ldr r3, [r4] <== NOT EXECUTED break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 7c78: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 7c7c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED next_watchdog->delta_interval += the_watchdog->delta_interval; 7c80: 15943010 ldrne r3, [r4, #16] <== NOT EXECUTED break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 7c84: e5802008 str r2, [r0, #8] <== NOT EXECUTED next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) next_watchdog->delta_interval += the_watchdog->delta_interval; 7c88: 15902010 ldrne r2, [r0, #16] <== NOT EXECUTED 7c8c: 10833002 addne r3, r3, r2 <== NOT EXECUTED 7c90: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if ( _Watchdog_Sync_count ) 7c94: e59f3028 ldr r3, [pc, #40] ; 7cc4 <_Watchdog_Remove+0xa0> <== NOT EXECUTED 7c98: e5932000 ldr r2, [r3] <== NOT EXECUTED 7c9c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; 7ca0: 159f3020 ldrne r3, [pc, #32] ; 7cc8 <_Watchdog_Remove+0xa4><== NOT EXECUTED 7ca4: 159f2020 ldrne r2, [pc, #32] ; 7ccc <_Watchdog_Remove+0xa8><== NOT EXECUTED 7ca8: 15931000 ldrne r1, [r3] <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 7cac: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED 7cb0: 15821000 strne r1, [r2] <== NOT EXECUTED next->previous = previous; previous->next = next; 7cb4: e5834000 str r4, [r3] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 7cb8: e5843004 str r3, [r4, #4] <== NOT EXECUTED 7cbc: eaffffe2 b 7c4c <_Watchdog_Remove+0x28> <== NOT EXECUTED =============================================================================== 00007d7c <_Workspace_Allocate>: * _Workspace_Allocate */ void *_Workspace_Allocate( size_t size ) { 7d7c: e1a01000 mov r1, r0 return _Heap_Allocate( &_Workspace_Area, size ); 7d80: e59f0000 ldr r0, [pc, #0] ; 7d88 <_Workspace_Allocate+0xc> 7d84: ea0008e4 b a11c <_Heap_Allocate> =============================================================================== 00007d6c <_Workspace_Free>: * _Workspace_Free */ bool _Workspace_Free( void *block ) { 7d6c: e1a01000 mov r1, r0 <== NOT EXECUTED return _Heap_Free( &_Workspace_Area, block ); 7d70: e59f0000 ldr r0, [pc, #0] ; 7d78 <_Workspace_Free+0xc> <== NOT EXECUTED 7d74: ea00091a b a1e4 <_Heap_Free> <== NOT EXECUTED =============================================================================== 00007db4 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7db4: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7db8: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7dbc: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7dc0: 0a000010 beq 7e08 <_Workspace_Handler_initialization+0x54> 7dc4: e214c003 ands ip, r4, #3 ; 0x3 7dc8: 1a00000e bne 7e08 <_Workspace_Handler_initialization+0x54> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 7dcc: e59f3054 ldr r3, [pc, #84] ; 7e28 <_Workspace_Handler_initialization+0x74> 7dd0: e5932000 ldr r2, [r3] 7dd4: e5d21028 ldrb r1, [r2, #40] 7dd8: e3510000 cmp r1, #0 ; 0x0 7ddc: 1a00000d bne 7e18 <_Workspace_Handler_initialization+0x64> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 7de0: e1a01004 mov r1, r4 7de4: e1a02005 mov r2, r5 7de8: e59f003c ldr r0, [pc, #60] ; 7e2c <_Workspace_Handler_initialization+0x78> 7dec: e3a03004 mov r3, #4 ; 0x4 7df0: ebfff665 bl 578c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 7df4: e3500000 cmp r0, #0 ; 0x0 7df8: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 7dfc: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 7e00: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 7e04: ebfff6eb bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 7e08: e3a00000 mov r0, #0 ; 0x0 7e0c: e3a01001 mov r1, #1 ; 0x1 7e10: e3a02002 mov r2, #2 ; 0x2 7e14: ebfff6e7 bl 59b8 <_Internal_error_Occurred> TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 7e18: e1a0100c mov r1, ip <== NOT EXECUTED 7e1c: e1a02005 mov r2, r5 <== NOT EXECUTED 7e20: eb000f6d bl bbdc <== NOT EXECUTED 7e24: eaffffed b 7de0 <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED =============================================================================== 00008dc0 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 8dc0: e1a03002 mov r3, r2 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 8dc4: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 8dc8: eaffffe9 b 8d74 <__assert_func> <== NOT EXECUTED =============================================================================== 00017278 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 17278: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1727c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00013bac <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 13bac: e1a04000 mov r4, r0 13bb0: eb00023e bl 144b0 <___DTOR_END__> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 13bb4: ebffffe2 bl 13b44 rtems_shutdown_executive(status); 13bb8: e1a00004 mov r0, r4 13bbc: eb000040 bl 13cc4 13bc0: eafffffe b 13bc0 <_exit+0x14> <== NOT EXECUTED =============================================================================== 00017120 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 17120: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 17124: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 000091e8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 91e8: eaffffe4 b 9180 <== NOT EXECUTED =============================================================================== 00017270 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 17270: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 17274: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00013b2c <_lseek_r>: int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 13b2c: e1a00001 mov r0, r1 <== NOT EXECUTED 13b30: e1a01002 mov r1, r2 <== NOT EXECUTED 13b34: e1a02003 mov r2, r3 <== NOT EXECUTED 13b38: eaffffbf b 13a3c <== NOT EXECUTED =============================================================================== 00001d80 <_open_r>: const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 1d80: e1a00001 mov r0, r1 <== NOT EXECUTED 1d84: e1a01002 mov r1, r2 <== NOT EXECUTED 1d88: e1a02003 mov r2, r3 <== NOT EXECUTED 1d8c: eaffff55 b 1ae8 <== NOT EXECUTED =============================================================================== 00013c98 <_read_r>: int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 13c98: e1a00001 mov r0, r1 <== NOT EXECUTED 13c9c: e1a01002 mov r1, r2 <== NOT EXECUTED 13ca0: e1a02003 mov r2, r3 <== NOT EXECUTED 13ca4: eaffffc6 b 13bc4 <== NOT EXECUTED =============================================================================== 00013ca8 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 13ca8: e1a00001 mov r0, r1 <== NOT EXECUTED 13cac: e1a01002 mov r1, r2 <== NOT EXECUTED 13cb0: ea000012 b 13d00 <== NOT EXECUTED =============================================================================== 00008f30 : ) { rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 8f30: e59f309c ldr r3, [pc, #156] ; 8fd4 8f34: e5932000 ldr r2, [r3] 8f38: e1500002 cmp r0, r2 #include int close( int fd ) { 8f3c: e92d4030 push {r4, r5, lr} rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 8f40: 2a00001e bcs 8fc0 iop = rtems_libio_iop(fd); 8f44: e59f208c ldr r2, [pc, #140] ; 8fd8 8f48: e1a03200 lsl r3, r0, #4 8f4c: e0433100 sub r3, r3, r0, lsl #2 8f50: e5921000 ldr r1, [r2] 8f54: e0833000 add r3, r3, r0 8f58: e1a03103 lsl r3, r3, #2 8f5c: e0814003 add r4, r1, r3 rtems_libio_check_is_open(iop); 8f60: e594200c ldr r2, [r4, #12] 8f64: e3120c01 tst r2, #256 ; 0x100 8f68: 0a000014 beq 8fc0 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 8f6c: e5943030 ldr r3, [r4, #48] 8f70: e5933004 ldr r3, [r3, #4] 8f74: e3530000 cmp r3, #0 ; 0x0 8f78: 01a05003 moveq r5, r3 8f7c: 0a000003 beq 8f90 rc = (*iop->handlers->close_h)( iop ); 8f80: e1a00004 mov r0, r4 8f84: e1a0e00f mov lr, pc 8f88: e12fff13 bx r3 8f8c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &iop->pathinfo ); 8f90: e5943018 ldr r3, [r4, #24] 8f94: e3530000 cmp r3, #0 ; 0x0 8f98: 0a000004 beq 8fb0 8f9c: e593301c ldr r3, [r3, #28] 8fa0: e3530000 cmp r3, #0 ; 0x0 8fa4: 12840010 addne r0, r4, #16 ; 0x10 8fa8: 11a0e00f movne lr, pc 8fac: 112fff13 bxne r3 rtems_libio_free( iop ); 8fb0: e1a00004 mov r0, r4 8fb4: eb0000e9 bl 9360 return rc; } 8fb8: e1a00005 mov r0, r5 8fbc: e8bd8030 pop {r4, r5, pc} rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 8fc0: eb0008fc bl b3b8 <__errno> <== NOT EXECUTED 8fc4: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 8fc8: e5803000 str r3, [r0] <== NOT EXECUTED 8fcc: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 8fd0: eafffff8 b 8fb8 <== NOT EXECUTED =============================================================================== 0000a974 : rtems_libio_t *iop, off_t length ) { return 0; } a974: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a978: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000a9a8 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a9a8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED a9ac: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; a9b0: e88d0007 stm sp, {r0, r1, r2} <== NOT EXECUTED the_jnode = iop->file_info; a9b4: e590302c ldr r3, [r0, #44] <== NOT EXECUTED status = rtems_io_control( a9b8: e1a0200d mov r2, sp <== NOT EXECUTED a9bc: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED a9c0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED a9c4: eb00017f bl afc8 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a9c8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; a9cc: 059d000c ldreq r0, [sp, #12] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a9d0: 1a000001 bne a9dc <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; } a9d4: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED a9d8: e8bd8000 pop {pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); a9dc: ebffffe6 bl a97c <== NOT EXECUTED a9e0: eafffffb b a9d4 <== NOT EXECUTED =============================================================================== 0000a96c : off_t offset, int whence ) { return offset; } a96c: e1a00001 mov r0, r1 <== NOT EXECUTED a970: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000aa40 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { aa40: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; aa44: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { aa48: e24dd018 sub sp, sp, #24 ; 0x18 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; aa4c: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; aa50: e58d3004 str r3, [sp, #4] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; aa54: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; aa58: e58d200c str r2, [sp, #12] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; aa5c: e58d3014 str r3, [sp, #20] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; aa60: e58d1008 str r1, [sp, #8] <== NOT EXECUTED args.count = count; args.flags = iop->flags; aa64: e58dc010 str ip, [sp, #16] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; aa68: e58d0000 str r0, [sp] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; aa6c: e590302c ldr r3, [r0, #44] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( aa70: e1a0200d mov r2, sp <== NOT EXECUTED aa74: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED aa78: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED aa7c: eb00017b bl b070 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) aa80: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; aa84: 059d0014 ldreq r0, [sp, #20] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) aa88: 1a000001 bne aa94 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } aa8c: e28dd018 add sp, sp, #24 ; 0x18 <== NOT EXECUTED aa90: e8bd8000 pop {pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); aa94: ebffffb8 bl a97c <== NOT EXECUTED aa98: eafffffb b aa8c <== NOT EXECUTED =============================================================================== 0000a9e4 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a9e4: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a9e8: e5903008 ldr r3, [r0, #8] ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a9ec: e24dd018 sub sp, sp, #24 ; 0x18 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; a9f0: e590c00c ldr ip, [r0, #12] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a9f4: e58d3004 str r3, [sp, #4] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a9f8: e3a03000 mov r3, #0 ; 0x0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; a9fc: e58d200c str r2, [sp, #12] args.flags = iop->flags; args.bytes_moved = 0; aa00: e58d3014 str r3, [sp, #20] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; aa04: e58d1008 str r1, [sp, #8] args.count = count; args.flags = iop->flags; aa08: e58dc010 str ip, [sp, #16] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; aa0c: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; aa10: e590302c ldr r3, [r0, #44] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( aa14: e1a0200d mov r2, sp aa18: e2830050 add r0, r3, #80 ; 0x50 aa1c: e8900003 ldm r0, {r0, r1} aa20: eb0001a7 bl b0c4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) aa24: e3500000 cmp r0, #0 ; 0x0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; aa28: 059d0014 ldreq r0, [sp, #20] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) aa2c: 1a000001 bne aa38 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } aa30: e28dd018 add sp, sp, #24 ; 0x18 aa34: e8bd8000 pop {pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); aa38: ebffffcf bl a97c <== NOT EXECUTED aa3c: eafffffb b aa30 <== NOT EXECUTED =============================================================================== 00002f7c : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2f7c: e59030b4 ldr r3, [r0, #180] 2f80: e3530000 cmp r3, #0 ; 0x0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2f84: e92d4030 push {r4, r5, lr} 2f88: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2f8c: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 2f90: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2f94: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2f98: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 2f9c: e5902084 ldr r2, [r0, #132] <== NOT EXECUTED 2fa0: e5903080 ldr r3, [r0, #128] <== NOT EXECUTED 2fa4: e1520003 cmp r2, r3 <== NOT EXECUTED 2fa8: 0a00000f beq 2fec <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2fac: e3a05002 mov r5, #2 ; 0x2 <== NOT EXECUTED 2fb0: e5845094 str r5, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 2fb4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2fb8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2fbc: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 2fc0: e1a02001 mov r2, r1 <== NOT EXECUTED 2fc4: eb00060c bl 47fc <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2fc8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2fcc: 1a000008 bne 2ff4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 2fd0: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2fd4: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2fd8: e129f003 msr CPSR_fc, r3 <== 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) { 2fdc: e5942084 ldr r2, [r4, #132] <== NOT EXECUTED 2fe0: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 2fe4: e1520003 cmp r2, r3 <== NOT EXECUTED 2fe8: 1afffff0 bne 2fb0 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 2fec: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 2ff0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 2ff4: eb0007bc bl 4eec <== NOT EXECUTED =============================================================================== 00002a20 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2a20: e92d4010 push {r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2a24: e591303c ldr r3, [r1, #60] <== NOT EXECUTED 2a28: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2a2c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 2a30: e1a04001 mov r4, r1 <== NOT EXECUTED 2a34: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2a38: 0a000006 beq 2a58 <== NOT EXECUTED 2a3c: e59f305c ldr r3, [pc, #92] ; 2aa0 <== NOT EXECUTED 2a40: e5932000 ldr r2, [r3] <== NOT EXECUTED 2a44: e7d21000 ldrb r1, [r2, r0] <== NOT EXECUTED 2a48: e2503009 subs r3, r0, #9 ; 0x9 <== NOT EXECUTED 2a4c: 13a03001 movne r3, #1 ; 0x1 <== NOT EXECUTED 2a50: e01332a1 ands r3, r3, r1, lsr #5 <== NOT EXECUTED 2a54: 1a000003 bne 2a68 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2a58: e1a01004 mov r1, r4 <== NOT EXECUTED 2a5c: ebffff96 bl 28bc <== NOT EXECUTED } } 2a60: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 2a64: e8bd8010 pop {r4, pc} <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2a68: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED 2a6c: 0afffff9 beq 2a58 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2a70: e220c040 eor ip, r0, #64 ; 0x40 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2a74: e3a0305e mov r3, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 2a78: e28d0002 add r0, sp, #2 ; 0x2 <== NOT EXECUTED 2a7c: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 2a80: e1a02004 mov r2, r4 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2a84: e5cd3002 strb r3, [sp, #2] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 2a88: e5cdc003 strb ip, [sp, #3] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 2a8c: ebffff42 bl 279c <== NOT EXECUTED tty->column += 2; 2a90: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2a94: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 2a98: e5843028 str r3, [r4, #40] <== NOT EXECUTED 2a9c: eaffffef b 2a60 <== NOT EXECUTED =============================================================================== 00002aa4 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 2aa4: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 2aa8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 2aac: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 2ab0: e1a04000 mov r4, r0 <== NOT EXECUTED 2ab4: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 2ab8: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 2abc: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 2ac0: 0590103c ldreq r1, [r0, #60] <== NOT EXECUTED 2ac4: 1a000019 bne 2b30 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2ac8: e59f81a8 ldr r8, [pc, #424] ; 2c78 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2acc: e2430001 sub r0, r3, #1 ; 0x1 <== NOT EXECUTED 2ad0: e5840020 str r0, [r4, #32] <== NOT EXECUTED 2ad4: e594c01c ldr ip, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2ad8: e3110008 tst r1, #8 ; 0x8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2adc: e7dc5000 ldrb r5, [ip, r0] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2ae0: 0a00000b beq 2b14 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2ae4: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 2ae8: 1a000001 bne 2af4 <== NOT EXECUTED 2aec: e3110010 tst r1, #16 ; 0x10 <== NOT EXECUTED 2af0: 0a00005c beq 2c68 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 2af4: e3550009 cmp r5, #9 ; 0x9 <== NOT EXECUTED 2af8: 0a000037 beq 2bdc <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2afc: e5983000 ldr r3, [r8] <== NOT EXECUTED 2b00: e7d32005 ldrb r2, [r3, r5] <== NOT EXECUTED 2b04: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 2b08: 0a000028 beq 2bb0 <== NOT EXECUTED 2b0c: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 2b10: 1a000017 bne 2b74 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2b14: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 2b18: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2b1c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2b20: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2b24: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2b28: e594103c ldr r1, [r4, #60] <== NOT EXECUTED 2b2c: eaffffe6 b 2acc <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 2b30: e590103c ldr r1, [r0, #60] <== NOT EXECUTED 2b34: e2112008 ands r2, r1, #8 ; 0x8 <== NOT EXECUTED tty->ccount = 0; 2b38: 05802020 streq r2, [r0, #32] <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 2b3c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2b40: e2112010 ands r2, r1, #16 ; 0x10 <== NOT EXECUTED 2b44: 1affffdf bne 2ac8 <== NOT EXECUTED tty->ccount = 0; 2b48: e5802020 str r2, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2b4c: e1a01004 mov r1, r4 <== NOT EXECUTED 2b50: e5d00044 ldrb r0, [r0, #68] <== NOT EXECUTED 2b54: ebffffb1 bl 2a20 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2b58: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 2b5c: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 2b60: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED echo ('\n', tty); 2b64: e1a01004 mov r1, r4 <== NOT EXECUTED 2b68: e3a0000a mov r0, #10 ; 0xa <== NOT EXECUTED } } if (!lineFlag) break; } } 2b6c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 2b70: eaffffaa b 2a20 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 2b74: e1a02004 mov r2, r4 <== NOT EXECUTED 2b78: e59f00fc ldr r0, [pc, #252] ; 2c7c <== NOT EXECUTED 2b7c: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 2b80: ebffff05 bl 279c <== NOT EXECUTED if (tty->column) 2b84: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2b88: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 2b8c: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 2b90: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2b94: e5983000 ldr r3, [r8] <== NOT EXECUTED 2b98: e7d32005 ldrb r2, [r3, r5] <== NOT EXECUTED 2b9c: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 2ba0: 0a000002 beq 2bb0 <== NOT EXECUTED 2ba4: e594103c ldr r1, [r4, #60] <== NOT EXECUTED 2ba8: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 2bac: 0affffd8 beq 2b14 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2bb0: e59f00c4 ldr r0, [pc, #196] ; 2c7c <== NOT EXECUTED 2bb4: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 2bb8: e1a02004 mov r2, r4 <== NOT EXECUTED 2bbc: ebfffef6 bl 279c <== NOT EXECUTED if (tty->column) 2bc0: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2bc4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 2bc8: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 2bcc: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } } } if (!lineFlag) 2bd0: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 2bd4: 1affffd0 bne 2b1c <== NOT EXECUTED 2bd8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2bdc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 2be0: e594502c ldr r5, [r4, #44] <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2be4: 0a000010 beq 2c2c <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 2be8: e5986000 ldr r6, [r8] <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2bec: e2011c02 and r1, r1, #512 ; 0x200 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 2bf0: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2bf4: e7dc3002 ldrb r3, [ip, r2] <== NOT EXECUTED if (c == '\t') { 2bf8: e3530009 cmp r3, #9 ; 0x9 <== NOT EXECUTED col = (col | 7) + 1; 2bfc: 03853007 orreq r3, r5, #7 ; 0x7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2c00: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; 2c04: 02835001 addeq r5, r3, #1 ; 0x1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 2c08: 0a000005 beq 2c24 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2c0c: e7d63003 ldrb r3, [r6, r3] <== NOT EXECUTED 2c10: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 2c14: 02855001 addeq r5, r5, #1 ; 0x1 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 2c18: 0a000001 beq 2c24 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2c1c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED col += 2; 2c20: 12855002 addne r5, r5, #2 ; 0x2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2c24: e1500002 cmp r0, r2 <== NOT EXECUTED 2c28: 1afffff1 bne 2bf4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2c2c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2c30: e1530005 cmp r3, r5 <== NOT EXECUTED 2c34: daffffb6 ble 2b14 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 2c38: e59f0040 ldr r0, [pc, #64] ; 2c80 <== NOT EXECUTED 2c3c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 2c40: e1a02004 mov r2, r4 <== NOT EXECUTED 2c44: ebfffed4 bl 279c <== NOT EXECUTED tty->column--; 2c48: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2c4c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2c50: e1530005 cmp r3, r5 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 2c54: e5843028 str r3, [r4, #40] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2c58: cafffff6 bgt 2c38 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2c5c: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 2c60: 1affffad bne 2b1c <== NOT EXECUTED 2c64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 2c68: e5d40043 ldrb r0, [r4, #67] <== NOT EXECUTED 2c6c: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 2c70: 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); 2c74: eaffff69 b 2a20 <== NOT EXECUTED =============================================================================== 00008fe4 : void free( void *ptr ) { MSBUMP(free_calls, 1); 8fe4: e59f2084 ldr r2, [pc, #132] ; 9070 8fe8: e592300c ldr r3, [r2, #12] 8fec: e92d4030 push {r4, r5, lr} 8ff0: e2833001 add r3, r3, #1 ; 0x1 if ( !ptr ) 8ff4: e2505000 subs r5, r0, #0 ; 0x0 void free( void *ptr ) { MSBUMP(free_calls, 1); 8ff8: e582300c str r3, [r2, #12] if ( !ptr ) 8ffc: 08bd8030 popeq {r4, r5, pc} /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 9000: e59f306c ldr r3, [pc, #108] ; 9074 9004: e5932000 ldr r2, [r3] 9008: e3520003 cmp r2, #3 ; 0x3 900c: 0a000011 beq 9058 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 9010: e59f3060 ldr r3, [pc, #96] ; 9078 9014: e5933000 ldr r3, [r3] 9018: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 901c: 11a00005 movne r0, r5 9020: 11a0e00f movne lr, pc 9024: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 9028: e59f404c ldr r4, [pc, #76] ; 907c 902c: e1a01005 mov r1, r5 9030: e1a00004 mov r0, r4 9034: eb000507 bl a458 <_Protected_heap_Free> 9038: e3500000 cmp r0, #0 ; 0x0 903c: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 9040: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 9044: e59f0034 ldr r0, [pc, #52] ; 9080 <== NOT EXECUTED 9048: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 904c: e1a01005 mov r1, r5 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 9050: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 9054: eaffe447 b 2178 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 9058: eb000127 bl 94fc 905c: e3500000 cmp r0, #0 ; 0x0 9060: 1affffea bne 9010 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 9064: e1a00005 mov r0, r5 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 9068: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 906c: ea000135 b 9548 <== NOT EXECUTED =============================================================================== 00013930 : int fstat( int fd, struct stat *sbuf ) { 13930: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 13934: e2515000 subs r5, r1, #0 ; 0x0 13938: 0a000027 beq 139dc /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 1393c: e59f30ac ldr r3, [pc, #172] ; 139f0 13940: e5932000 ldr r2, [r3] 13944: e1500002 cmp r0, r2 13948: 2a000019 bcs 139b4 1394c: e59f20a0 ldr r2, [pc, #160] ; 139f4 13950: e1a03200 lsl r3, r0, #4 13954: e0433100 sub r3, r3, r0, lsl #2 13958: e5921000 ldr r1, [r2] 1395c: e0833000 add r3, r3, r0 13960: e1a03103 lsl r3, r3, #2 13964: e0814003 add r4, r1, r3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 13968: e594200c ldr r2, [r4, #12] 1396c: e3120c01 tst r2, #256 ; 0x100 13970: 0a00000f beq 139b4 if ( !iop->handlers ) 13974: e5943030 ldr r3, [r4, #48] 13978: e3530000 cmp r3, #0 ; 0x0 1397c: 0a00000c beq 139b4 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 13980: e5933018 ldr r3, [r3, #24] 13984: e3530000 cmp r3, #0 ; 0x0 13988: 0a00000e beq 139c8 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 1398c: e3a01000 mov r1, #0 ; 0x0 13990: e3a0204c mov r2, #76 ; 0x4c 13994: e1a00005 mov r0, r5 13998: ebffe08f bl bbdc return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 1399c: e2840010 add r0, r4, #16 ; 0x10 139a0: e1a01005 mov r1, r5 139a4: e5943030 ldr r3, [r4, #48] 139a8: e1a0e00f mov lr, pc 139ac: e593f018 ldr pc, [r3, #24] } 139b0: e8bd8030 pop {r4, r5, pc} iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 139b4: ebffde7f bl b3b8 <__errno> <== NOT EXECUTED 139b8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 139bc: e5803000 str r3, [r0] <== NOT EXECUTED 139c0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 139c4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 139c8: ebffde7a bl b3b8 <__errno> <== NOT EXECUTED 139cc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 139d0: e5803000 str r3, [r0] <== NOT EXECUTED 139d4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 139d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 139dc: ebffde75 bl b3b8 <__errno> <== NOT EXECUTED 139e0: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 139e4: e5803000 str r3, [r0] <== NOT EXECUTED 139e8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 139ec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009084 : int ftruncate( int fd, off_t length ) { 9084: e92d4030 push {r4, r5, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 9088: e59f30e8 ldr r3, [pc, #232] ; 9178 <== NOT EXECUTED 908c: e5932000 ldr r2, [r3] <== NOT EXECUTED 9090: e1500002 cmp r0, r2 <== NOT EXECUTED int ftruncate( int fd, off_t length ) { 9094: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED 9098: e1a05001 mov r5, r1 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 909c: 2a000021 bcs 9128 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 90a0: e59f20d4 ldr r2, [pc, #212] ; 917c <== NOT EXECUTED 90a4: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED 90a8: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED 90ac: e5921000 ldr r1, [r2] <== NOT EXECUTED 90b0: e0833000 add r3, r3, r0 <== NOT EXECUTED 90b4: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 90b8: e0814003 add r4, r1, r3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 90bc: e594200c ldr r2, [r4, #12] <== NOT EXECUTED 90c0: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 90c4: 0a000017 beq 9128 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 90c8: e284c010 add ip, r4, #16 ; 0x10 <== NOT EXECUTED 90cc: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED 90d0: e88d000f stm sp, {r0, r1, r2, r3} <== NOT EXECUTED if ( !loc.ops->node_type_h ) 90d4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 90d8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 90dc: 0a00001b beq 9150 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 90e0: e1a0000d mov r0, sp <== NOT EXECUTED 90e4: e1a0e00f mov lr, pc <== NOT EXECUTED 90e8: e12fff13 bx r3 <== NOT EXECUTED 90ec: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 90f0: 0a00001b beq 9164 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 90f4: e594300c ldr r3, [r4, #12] <== NOT EXECUTED 90f8: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 90fc: 0a00000e beq 913c <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 9100: e5943030 ldr r3, [r4, #48] <== NOT EXECUTED 9104: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 9108: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 910c: 0a00000f beq 9150 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 9110: e1a00004 mov r0, r4 <== NOT EXECUTED 9114: e1a01005 mov r1, r5 <== NOT EXECUTED 9118: e1a0e00f mov lr, pc <== NOT EXECUTED 911c: e12fff13 bx r3 <== NOT EXECUTED } 9120: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 9124: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 9128: eb0008a2 bl b3b8 <__errno> <== NOT EXECUTED 912c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 9130: e5803000 str r3, [r0] <== NOT EXECUTED 9134: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9138: eafffff8 b 9120 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 913c: eb00089d bl b3b8 <__errno> <== NOT EXECUTED 9140: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 9144: e5803000 str r3, [r0] <== NOT EXECUTED 9148: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 914c: eafffff3 b 9120 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 9150: eb000898 bl b3b8 <__errno> <== NOT EXECUTED 9154: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9158: e5803000 str r3, [r0] <== NOT EXECUTED 915c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9160: eaffffee b 9120 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 9164: eb000893 bl b3b8 <__errno> <== NOT EXECUTED 9168: e3a03015 mov r3, #21 ; 0x15 <== NOT EXECUTED 916c: e5803000 str r3, [r0] <== NOT EXECUTED 9170: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9174: eaffffe9 b 9120 <== NOT EXECUTED =============================================================================== 00017118 : */ pid_t getpid( void ) { return _Objects_Local_node; } 17118: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 1711c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00009180 : int gettimeofday( struct timeval *tp, void * __tz ) { 9180: e92d4030 push {r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 9184: e2505000 subs r5, r0, #0 ; 0x0 int gettimeofday( struct timeval *tp, void * __tz ) { 9188: e24dd008 sub sp, sp, #8 ; 0x8 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 918c: 0a00000f beq 91d0 ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 9190: e10f4000 mrs r4, CPSR 9194: e38430c0 orr r3, r4, #192 ; 0xc0 9198: e129f003 msr CPSR_fc, r3 _TOD_Get( &now ); 919c: e1a0000d mov r0, sp 91a0: ebfff126 bl 5640 <_TOD_Get> _ISR_Enable(level); 91a4: e129f004 msr CPSR_fc, r4 time->tv_sec = now.tv_sec; 91a8: e59d3000 ldr r3, [sp] 91ac: e5853000 str r3, [r5] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 91b0: e59d2004 ldr r2, [sp, #4] 91b4: e59f1028 ldr r1, [pc, #40] ; 91e4 91b8: e0830291 umull r0, r3, r1, r2 91bc: e1a03323 lsr r3, r3, #6 91c0: e5853004 str r3, [r5, #4] 91c4: e3a00000 mov r0, #0 ; 0x0 * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 91c8: e28dd008 add sp, sp, #8 ; 0x8 91cc: e8bd8030 pop {r4, r5, pc} void * __tz ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 91d0: eb000878 bl b3b8 <__errno> <== NOT EXECUTED 91d4: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 91d8: e5803000 str r3, [r0] <== NOT EXECUTED 91dc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 91e0: eafffff8 b 91c8 <== NOT EXECUTED =============================================================================== 0000967c : */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 967c: e59f3010 ldr r3, [pc, #16] ; 9694 the_chain->permanent_null = NULL; 9680: e3a00000 mov r0, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 9684: e2832004 add r2, r3, #4 ; 0x4 9688: e5832000 str r2, [r3] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 968c: e9830009 stmib r3, {r0, r3} int init_fs_mount_table(void) { rtems_chain_initialize_empty ( &rtems_filesystem_mount_table_control ); return 0; } 9690: e12fff1e bx lr ... =============================================================================== 00002c84 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2c84: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2c88: e1a05001 mov r5, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 2c8c: e5911030 ldr r1, [r1, #48] <== NOT EXECUTED 2c90: e3110020 tst r1, #32 ; 0x20 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2c94: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 2c98: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 2c9c: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 2ca0: 0a000006 beq 2cc0 <== NOT EXECUTED c = tolower (c); 2ca4: e59f3190 ldr r3, [pc, #400] ; 2e3c <== NOT EXECUTED 2ca8: e5932000 ldr r2, [r3] <== NOT EXECUTED 2cac: e7d23004 ldrb r3, [r2, r4] <== NOT EXECUTED 2cb0: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 2cb4: e1a00004 mov r0, r4 <== NOT EXECUTED 2cb8: 12840020 addne r0, r4, #32 ; 0x20 <== NOT EXECUTED 2cbc: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 2cc0: e354000d cmp r4, #13 ; 0xd <== NOT EXECUTED 2cc4: 0a000034 beq 2d9c <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 2cc8: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 2ccc: 0a000010 beq 2d14 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2cd0: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 2cd4: 1a000011 bne 2d20 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2cd8: e59f2160 ldr r2, [pc, #352] ; 2e40 <== NOT EXECUTED 2cdc: e5923000 ldr r3, [r2] <== NOT EXECUTED 2ce0: e5951020 ldr r1, [r5, #32] <== NOT EXECUTED 2ce4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 2ce8: e1510003 cmp r1, r3 <== NOT EXECUTED 2cec: aa00002c bge 2da4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2cf0: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 2cf4: e3130008 tst r3, #8 ; 0x8 <== NOT EXECUTED 2cf8: 1a00002f bne 2dbc <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 2cfc: e595301c ldr r3, [r5, #28] <== NOT EXECUTED 2d00: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED 2d04: e7c34001 strb r4, [r3, r1] <== NOT EXECUTED 2d08: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2d0c: e5852020 str r2, [r5, #32] <== NOT EXECUTED 2d10: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2d14: e3110040 tst r1, #64 ; 0x40 <== NOT EXECUTED 2d18: 03a0400a moveq r4, #10 ; 0xa <== NOT EXECUTED 2d1c: 13a0400d movne r4, #13 ; 0xd <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2d20: e595203c ldr r2, [r5, #60] <== NOT EXECUTED 2d24: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 2d28: 0affffea beq 2cd8 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2d2c: e5d53043 ldrb r3, [r5, #67] <== NOT EXECUTED 2d30: e1530004 cmp r3, r4 <== NOT EXECUTED 2d34: 0a000036 beq 2e14 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2d38: e5d53044 ldrb r3, [r5, #68] <== NOT EXECUTED 2d3c: e1530004 cmp r3, r4 <== NOT EXECUTED 2d40: 0a000038 beq 2e28 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2d44: e5d53045 ldrb r3, [r5, #69] <== NOT EXECUTED 2d48: e1530004 cmp r3, r4 <== NOT EXECUTED 2d4c: 0a00002e beq 2e0c <== NOT EXECUTED return 1; } else if (c == '\n') { 2d50: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 2d54: 0a000022 beq 2de4 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 2d58: e5d5304c ldrb r3, [r5, #76] <== NOT EXECUTED 2d5c: e1530004 cmp r3, r4 <== NOT EXECUTED 2d60: 0a000002 beq 2d70 <== NOT EXECUTED 2d64: e5d53051 ldrb r3, [r5, #81] <== NOT EXECUTED 2d68: e1530004 cmp r3, r4 <== NOT EXECUTED 2d6c: 1affffd9 bne 2cd8 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 2d70: e3120008 tst r2, #8 ; 0x8 <== NOT EXECUTED echo (c, tty); 2d74: 11a00004 movne r0, r4 <== NOT EXECUTED 2d78: 11a01005 movne r1, r5 <== NOT EXECUTED 2d7c: 1bffff27 blne 2a20 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2d80: e285201c add r2, r5, #28 ; 0x1c <== NOT EXECUTED 2d84: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 2d88: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 2d8c: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED 2d90: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2d94: e5851020 str r1, [r5, #32] <== NOT EXECUTED 2d98: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 2d9c: e3110080 tst r1, #128 ; 0x80 <== NOT EXECUTED 2da0: 0a000001 beq 2dac <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 2da4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } return 0; } 2da8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 2dac: e3110c01 tst r1, #256 ; 0x100 <== NOT EXECUTED 2db0: 03a0400d moveq r4, #13 ; 0xd <== NOT EXECUTED 2db4: 13a0400a movne r4, #10 ; 0xa <== NOT EXECUTED 2db8: eaffffd8 b 2d20 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 2dbc: e1a00004 mov r0, r4 <== NOT EXECUTED 2dc0: e1a01005 mov r1, r5 <== NOT EXECUTED 2dc4: ebffff15 bl 2a20 <== NOT EXECUTED 2dc8: e5951020 ldr r1, [r5, #32] <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2dcc: e595301c ldr r3, [r5, #28] <== NOT EXECUTED 2dd0: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED 2dd4: e7c34001 strb r4, [r3, r1] <== NOT EXECUTED 2dd8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2ddc: e5852020 str r2, [r5, #32] <== NOT EXECUTED 2de0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 2de4: e3120048 tst r2, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 2de8: 11a00004 movne r0, r4 <== NOT EXECUTED 2dec: 11a01005 movne r1, r5 <== NOT EXECUTED 2df0: 1bffff0a blne 2a20 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2df4: e285101c add r1, r5, #28 ; 0x1c <== NOT EXECUTED 2df8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 2dfc: e2820001 add r0, r2, #1 ; 0x1 <== NOT EXECUTED 2e00: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED 2e04: e7c13002 strb r3, [r1, r2] <== NOT EXECUTED 2e08: e5850020 str r0, [r5, #32] <== NOT EXECUTED 2e0c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2e10: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 2e14: e1a00005 mov r0, r5 <== NOT EXECUTED 2e18: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2e1c: ebffff20 bl 2aa4 <== NOT EXECUTED 2e20: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2e24: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 2e28: e1a00005 mov r0, r5 <== NOT EXECUTED 2e2c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 2e30: ebffff1b bl 2aa4 <== NOT EXECUTED 2e34: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2e38: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 00017268 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 17268: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1726c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00013a3c : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 13a3c: e59f30e0 ldr r3, [pc, #224] ; 13b24 <== NOT EXECUTED 13a40: e593c000 ldr ip, [r3] <== NOT EXECUTED 13a44: e150000c cmp r0, ip <== NOT EXECUTED off_t lseek( int fd, off_t offset, int whence ) { 13a48: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 13a4c: e1a0c002 mov ip, r2 <== NOT EXECUTED 13a50: e1a0e001 mov lr, r1 <== NOT EXECUTED rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 13a54: 2a000028 bcs 13afc <== NOT EXECUTED iop = rtems_libio_iop( fd ); 13a58: e59f20c8 ldr r2, [pc, #200] ; 13b28 <== NOT EXECUTED 13a5c: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED 13a60: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED 13a64: e5921000 ldr r1, [r2] <== NOT EXECUTED 13a68: e0833000 add r3, r3, r0 <== NOT EXECUTED 13a6c: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 13a70: e0814003 add r4, r1, r3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 13a74: e594200c ldr r2, [r4, #12] <== NOT EXECUTED 13a78: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 13a7c: 0a00001e beq 13afc <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 13a80: e5945030 ldr r5, [r4, #48] <== NOT EXECUTED 13a84: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 13a88: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 13a8c: 0a00001f beq 13b10 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 13a90: e35c0001 cmp ip, #1 ; 0x1 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; 13a94: e5946008 ldr r6, [r4, #8] <== NOT EXECUTED switch ( whence ) { 13a98: 0a000014 beq 13af0 <== NOT EXECUTED 13a9c: e35c0002 cmp ip, #2 ; 0x2 <== NOT EXECUTED 13aa0: 0a000007 beq 13ac4 <== NOT EXECUTED 13aa4: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED case SEEK_SET: iop->offset = offset; 13aa8: 0584e008 streq lr, [r4, #8] <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 13aac: 0a000007 beq 13ad0 <== NOT EXECUTED case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 13ab0: ebffde40 bl b3b8 <__errno> <== NOT EXECUTED 13ab4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 13ab8: e5803000 str r3, [r0] <== NOT EXECUTED 13abc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13ac0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 13ac4: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 13ac8: e08e3003 add r3, lr, r3 <== NOT EXECUTED 13acc: e5843008 str r3, [r4, #8] <== NOT EXECUTED /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 13ad0: e1a0100e mov r1, lr <== NOT EXECUTED 13ad4: e1a0200c mov r2, ip <== NOT EXECUTED 13ad8: e1a00004 mov r0, r4 <== NOT EXECUTED 13adc: e1a0e00f mov lr, pc <== NOT EXECUTED 13ae0: e595f014 ldr pc, [r5, #20] <== NOT EXECUTED if ( status == (off_t) -1 ) 13ae4: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED iop->offset = old_offset; 13ae8: 05846008 streq r6, [r4, #8] <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 13aec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 13af0: e08e3006 add r3, lr, r6 <== NOT EXECUTED 13af4: e5843008 str r3, [r4, #8] <== NOT EXECUTED 13af8: eafffff4 b 13ad0 <== NOT EXECUTED off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 13afc: ebffde2d bl b3b8 <__errno> <== NOT EXECUTED 13b00: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 13b04: e5803000 str r3, [r0] <== NOT EXECUTED 13b08: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13b0c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 13b10: ebffde28 bl b3b8 <__errno> <== NOT EXECUTED 13b14: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 13b18: e5803000 str r3, [r0] <== NOT EXECUTED 13b1c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13b20: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0000957c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 957c: e59f20d0 ldr r2, [pc, #208] ; 9654 9580: e5923004 ldr r3, [r2, #4] 9584: e2833001 add r3, r3, #1 ; 0x1 9588: e92d4070 push {r4, r5, r6, lr} 958c: e5823004 str r3, [r2, #4] 9590: e1a06000 mov r6, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 9594: ebffffef bl 9558 /* * Validate the parameters */ if ( !size ) 9598: e3560000 cmp r6, #0 ; 0x0 959c: 0a00001c beq 9614 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 95a0: e59f30b0 ldr r3, [pc, #176] ; 9658 95a4: e5932000 ldr r2, [r3] 95a8: e3520003 cmp r2, #3 ; 0x3 95ac: 0a000015 beq 9608 * Try to give a segment in the current heap if there is not * enough space then try to grow the heap. * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 95b0: e59f00a4 ldr r0, [pc, #164] ; 965c 95b4: e1a01006 mov r1, r6 95b8: eb000397 bl a41c <_Protected_heap_Allocate> if ( !return_this ) { 95bc: e2504000 subs r4, r0, #0 ; 0x0 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 95c0: 11a05004 movne r5, r4 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { 95c4: 0a000015 beq 9620 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 95c8: e59f3090 ldr r3, [pc, #144] ; 9660 95cc: e5933000 ldr r3, [r3] 95d0: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_dirty_helper)( return_this, size ); 95d4: 11a01006 movne r1, r6 95d8: 11a00005 movne r0, r5 95dc: 11a0e00f movne lr, pc 95e0: 112fff13 bxne r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 95e4: e59f3078 ldr r3, [pc, #120] ; 9664 95e8: e5933000 ldr r3, [r3] 95ec: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 95f0: 11a00005 movne r0, r5 95f4: 11a0e00f movne lr, pc 95f8: 1593f004 ldrne pc, [r3, #4] 95fc: e1a04005 mov r4, r5 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 9600: e1a00004 mov r0, r4 9604: e8bd8070 pop {r4, r5, r6, pc} return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 9608: ebffffbb bl 94fc 960c: e3500000 cmp r0, #0 ; 0x0 9610: 1affffe6 bne 95b0 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 9614: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 9618: e1a00004 mov r0, r4 <== NOT EXECUTED 961c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 9620: e59f3040 ldr r3, [pc, #64] ; 9668 9624: e5933000 ldr r3, [r3] 9628: e3530000 cmp r3, #0 ; 0x0 962c: 0a000004 beq 9644 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 9630: e1a00006 mov r0, r6 <== NOT EXECUTED 9634: e1a0e00f mov lr, pc <== NOT EXECUTED 9638: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 963c: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 9640: 1affffe0 bne 95c8 <== NOT EXECUTED errno = ENOMEM; 9644: eb00075b bl b3b8 <__errno> 9648: e3a0300c mov r3, #12 ; 0xc 964c: e5803000 str r3, [r0] 9650: eaffffea b 9600 =============================================================================== 00009548 : } void malloc_deferred_free( void *pointer ) { 9548: e1a01000 mov r1, r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 954c: e59f0000 ldr r0, [pc, #0] ; 9554 <== NOT EXECUTED 9550: eaffef3b b 5244 <_Chain_Append> <== NOT EXECUTED =============================================================================== 00009558 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 9558: e52de004 push {lr} ; (str lr, [sp, #-4]!) 955c: ea000000 b 9564 /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 9560: ebfffe9f bl 8fe4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 9564: e59f000c ldr r0, [pc, #12] ; 9578 9568: eb000259 bl 9ed4 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 956c: e3500000 cmp r0, #0 ; 0x0 9570: 1afffffa bne 9560 free(to_be_freed); } 9574: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 000094fc : rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 94fc: e59f3020 ldr r3, [pc, #32] ; 9524 9500: e5932000 ldr r2, [r3] 9504: e3520000 cmp r2, #0 ; 0x0 9508: 13a00000 movne r0, #0 ; 0x0 950c: 112fff1e bxne lr return false; if ( _ISR_Nest_level > 0 ) 9510: e59f3010 ldr r3, [pc, #16] ; 9528 9514: e5932000 ldr r2, [r3] 9518: e2720001 rsbs r0, r2, #1 ; 0x1 951c: 33a00000 movcc r0, #0 ; 0x0 return false; return true; } 9520: e12fff1e bx lr =============================================================================== 000080c8 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 80c8: e59f2008 ldr r2, [pc, #8] ; 80d8 80cc: e59f1008 ldr r1, [pc, #8] ; 80dc 80d0: e1a03002 mov r3, r2 80d4: ea000255 b 8a30 =============================================================================== 0000167c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 167c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 1680: e1a08001 mov r8, r1 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) { 1684: e2011a0f and r1, r1, #61440 ; 0xf000 1688: e3510901 cmp r1, #16384 ; 0x4000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 168c: e24dd018 sub sp, sp, #24 ; 0x18 1690: e1a05000 mov r5, r0 1694: e1a06002 mov r6, r2 1698: e1a07003 mov r7, r3 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) { 169c: 0a00000d beq 16d8 16a0: 9a000008 bls 16c8 16a4: e3510a06 cmp r1, #24576 ; 0x6000 <== NOT EXECUTED 16a8: 0a00000a beq 16d8 <== NOT EXECUTED 16ac: e3510902 cmp r1, #32768 ; 0x8000 <== NOT EXECUTED 16b0: 0a000008 beq 16d8 <== NOT EXECUTED case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 16b4: eb00273f bl b3b8 <__errno> <== NOT EXECUTED 16b8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 16bc: e5803000 str r3, [r0] <== NOT EXECUTED 16c0: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 16c4: ea00003c b 17bc <== NOT EXECUTED int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) { 16c8: e3510a01 cmp r1, #4096 ; 0x1000 16cc: 0a000036 beq 17ac 16d0: e3510a02 cmp r1, #8192 ; 0x2000 16d4: 1afffff6 bne 16b4 break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } if ( S_ISFIFO(mode) ) 16d8: e3510a01 cmp r1, #4096 ; 0x1000 16dc: 0a000032 beq 17ac rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 16e0: e5d53000 ldrb r3, [r5] 16e4: e353005c cmp r3, #92 ; 0x5c 16e8: 1353002f cmpne r3, #47 ; 0x2f 16ec: 13a0e000 movne lr, #0 ; 0x0 16f0: 03a0e001 moveq lr, #1 ; 0x1 16f4: 1a000033 bne 17c8 16f8: e59f30f0 ldr r3, [pc, #240] ; 17f0 16fc: e593c000 ldr ip, [r3] 1700: e28cc014 add ip, ip, #20 ; 0x14 1704: e89c000f ldm ip, {r0, r1, r2, r3} 1708: e28d4004 add r4, sp, #4 ; 0x4 170c: e884000f stm r4, {r0, r1, r2, r3} 1710: e3a02001 mov r2, #1 ; 0x1 if ( !temp_loc.ops->evalformake_h ) { 1714: e59d300c ldr r3, [sp, #12] 1718: e5933004 ldr r3, [r3, #4] 171c: e3530000 cmp r3, #0 ; 0x0 1720: 0a000021 beq 17ac rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 1724: e0850002 add r0, r5, r2 1728: e1a01004 mov r1, r4 172c: e28d2014 add r2, sp, #20 ; 0x14 1730: e1a0e00f mov lr, pc 1734: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 1738: e3500000 cmp r0, #0 ; 0x0 173c: 1a00001d bne 17b8 return -1; if ( !temp_loc.ops->mknod_h ) { 1740: e59d300c ldr r3, [sp, #12] 1744: e593c014 ldr ip, [r3, #20] 1748: e35c0000 cmp ip, #0 ; 0x0 174c: 0a000011 beq 1798 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1750: e1a03007 mov r3, r7 1754: e58d4000 str r4, [sp] 1758: e59d0014 ldr r0, [sp, #20] 175c: e1a01008 mov r1, r8 1760: e1a02006 mov r2, r6 1764: e1a0e00f mov lr, pc 1768: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 176c: e59d300c ldr r3, [sp, #12] 1770: e3530000 cmp r3, #0 ; 0x0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1774: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 1778: 0a00000f beq 17bc 177c: e593301c ldr r3, [r3, #28] 1780: e3530000 cmp r3, #0 ; 0x0 1784: 0a00000c beq 17bc 1788: e1a00004 mov r0, r4 <== NOT EXECUTED 178c: e1a0e00f mov lr, pc <== NOT EXECUTED 1790: e12fff13 bx r3 <== NOT EXECUTED 1794: ea000008 b 17bc <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 1798: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 179c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 17a0: 11a00004 movne r0, r4 <== NOT EXECUTED 17a4: 11a0e00f movne lr, pc <== NOT EXECUTED 17a8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 17ac: eb002701 bl b3b8 <__errno> <== NOT EXECUTED 17b0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17b4: e5803000 str r3, [r0] <== NOT EXECUTED 17b8: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 17bc: e1a00005 mov r0, r5 17c0: e28dd018 add sp, sp, #24 ; 0x18 17c4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} } if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 17c8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 17cc: 0affffc9 beq 16f8 <== NOT EXECUTED 17d0: e59f3018 ldr r3, [pc, #24] ; 17f0 <== NOT EXECUTED 17d4: e593c000 ldr ip, [r3] <== NOT EXECUTED 17d8: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 17dc: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED 17e0: e28d4004 add r4, sp, #4 ; 0x4 <== NOT EXECUTED 17e4: e884000f stm r4, {r0, r1, r2, r3} <== NOT EXECUTED 17e8: e1a0200e mov r2, lr <== NOT EXECUTED 17ec: eaffffc8 b 1714 <== NOT EXECUTED =============================================================================== 00009698 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 9698: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 969c: e251a000 subs sl, r1, #0 ; 0x0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 96a0: e24dd010 sub sp, sp, #16 ; 0x10 96a4: e1a09000 mov r9, r0 96a8: e1a07002 mov r7, r2 96ac: e1a05003 mov r5, r3 96b0: e59d6030 ldr r6, [sp, #48] /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 96b4: 0a000093 beq 9908 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 96b8: e3520001 cmp r2, #1 ; 0x1 96bc: 8a000091 bhi 9908 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 96c0: e59a4024 ldr r4, [sl, #36] 96c4: e3540000 cmp r4, #0 ; 0x0 96c8: 0a000032 beq 9798 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 96cc: e3530000 cmp r3, #0 ; 0x0 96d0: 03a00064 moveq r0, #100 ; 0x64 96d4: 0a000002 beq 96e4 size += strlen( device ) + 1; 96d8: e1a00003 mov r0, r3 <== NOT EXECUTED 96dc: eb000c6b bl c890 <== NOT EXECUTED 96e0: e2800065 add r0, r0, #101 ; 0x65 <== NOT EXECUTED temp_mt_entry = malloc( size ); 96e4: ebffffa4 bl 957c if ( !temp_mt_entry ) { 96e8: e3500000 cmp r0, #0 ; 0x0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 96ec: e1a04000 mov r4, r0 96f0: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 96f4: 0a000088 beq 991c return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 96f8: e3550000 cmp r5, #0 ; 0x0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 96fc: e5807028 str r7, [r0, #40] if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 9700: e5840024 str r0, [r4, #36] if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 9704: 05805060 streq r5, [r0, #96] return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 9708: 0a000004 beq 9720 temp_mt_entry->dev = 970c: e2803064 add r3, r0, #100 ; 0x64 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 9710: e1a00003 mov r0, r3 <== NOT EXECUTED 9714: e1a01005 mov r1, r5 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 9718: e5843060 str r3, [r4, #96] <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 971c: eb000c2d bl c7d8 <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 9720: e3560000 cmp r6, #0 ; 0x0 9724: 0a000024 beq 97bc if ( rtems_filesystem_evaluate_path( 9728: e1a00006 mov r0, r6 <== NOT EXECUTED 972c: e3a01007 mov r1, #7 ; 0x7 <== NOT EXECUTED 9730: e1a0200d mov r2, sp <== NOT EXECUTED 9734: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 9738: ebffdf15 bl 1394 <== NOT EXECUTED 973c: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 9740: e1a0500d mov r5, sp <== NOT EXECUTED 9744: 0a000017 beq 97a8 <== NOT EXECUTED /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 9748: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 974c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 9750: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 9754: 0a00005d beq 98d0 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 9758: e1a0000d mov r0, sp <== NOT EXECUTED 975c: e1a0e00f mov lr, pc <== NOT EXECUTED 9760: e12fff13 bx r3 <== NOT EXECUTED 9764: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 9768: 0a00002c beq 9820 <== NOT EXECUTED errno = ENOTDIR; 976c: eb000711 bl b3b8 <__errno> <== NOT EXECUTED 9770: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 9774: e5803000 str r3, [r0] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 9778: e1a00004 mov r0, r4 <== NOT EXECUTED 977c: ebfffe18 bl 8fe4 <== NOT EXECUTED 9780: e1a0500d mov r5, sp <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 9784: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 9788: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 978c: 1a000053 bne 98e0 <== NOT EXECUTED 9790: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9794: ea000006 b 97b4 <== NOT EXECUTED return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 9798: eb000706 bl b3b8 <__errno> <== NOT EXECUTED 979c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 97a0: e5803000 str r3, [r0] <== NOT EXECUTED 97a4: e1a08004 mov r8, r4 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 97a8: e1a00008 mov r0, r8 <== NOT EXECUTED 97ac: ebfffe0c bl 8fe4 <== NOT EXECUTED 97b0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 97b4: e28dd010 add sp, sp, #16 ; 0x10 97b8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 97bc: e5846018 str r6, [r4, #24] temp_mt_entry->mt_fs_root.handlers = NULL; 97c0: e584601c str r6, [r4, #28] temp_mt_entry->mt_fs_root.ops = NULL; 97c4: e5846020 str r6, [r4, #32] temp_mt_entry->mt_point_node.node_access = NULL; 97c8: e5846008 str r6, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 97cc: e584600c str r6, [r4, #12] temp_mt_entry->mt_point_node.ops = NULL; 97d0: e5846010 str r6, [r4, #16] temp_mt_entry->mt_point_node.mt_entry = NULL; 97d4: e5846014 str r6, [r4, #20] 97d8: e1a05006 mov r5, r6 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 97dc: e1a00004 mov r0, r4 97e0: e1a0e00f mov lr, pc 97e4: e59af024 ldr pc, [sl, #36] 97e8: e2506000 subs r6, r0, #0 ; 0x0 97ec: 0a00002b beq 98a0 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 97f0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 97f4: e5933028 ldr r3, [r3, #40] <== NOT EXECUTED 97f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 97fc: 11a00004 movne r0, r4 <== NOT EXECUTED 9800: 11a0e00f movne lr, pc <== NOT EXECUTED 9804: 112fff13 bxne r3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 9808: e1a00004 mov r0, r4 <== NOT EXECUTED 980c: ebfffdf4 bl 8fe4 <== NOT EXECUTED if ( loc_to_free ) 9810: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 9814: 1affffda bne 9784 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 9818: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 981c: eaffffe4 b 97b4 <== NOT EXECUTED /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 9820: e59f1108 ldr r1, [pc, #264] ; 9930 <== NOT EXECUTED 9824: e4912004 ldr r2, [r1], #4 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 9828: e1520001 cmp r2, r1 <== NOT EXECUTED 982c: 0a000033 beq 9900 <== NOT EXECUTED the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 9830: e59d0000 ldr r0, [sp] <== NOT EXECUTED 9834: e5923018 ldr r3, [r2, #24] <== NOT EXECUTED 9838: e1530000 cmp r3, r0 <== NOT EXECUTED 983c: 1a000003 bne 9850 <== NOT EXECUTED 9840: ea00001e b 98c0 <== NOT EXECUTED 9844: e5923018 ldr r3, [r2, #24] <== NOT EXECUTED 9848: e1530000 cmp r3, r0 <== NOT EXECUTED 984c: 0a00001b beq 98c0 <== NOT EXECUTED * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 9850: e5922000 ldr r2, [r2] <== NOT EXECUTED /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 9854: e1520001 cmp r2, r1 <== NOT EXECUTED 9858: 1afffff9 bne 9844 <== NOT EXECUTED * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 985c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 9860: e593c020 ldr ip, [r3, #32] <== NOT EXECUTED * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 9864: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 9868: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 986c: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 9870: e5840008 str r0, [r4, #8] <== NOT EXECUTED temp_mt_entry->mt_point_node.handlers = loc.handlers; 9874: e584200c str r2, [r4, #12] <== NOT EXECUTED temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 9878: e5841014 str r1, [r4, #20] <== NOT EXECUTED * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 987c: e5843010 str r3, [r4, #16] <== NOT EXECUTED /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 9880: 0a000012 beq 98d0 <== NOT EXECUTED errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 9884: e1a00004 mov r0, r4 <== NOT EXECUTED 9888: e1a0e00f mov lr, pc <== NOT EXECUTED 988c: e12fff1c bx ip <== NOT EXECUTED 9890: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED goto cleanup_and_bail; 9894: 01a0500d moveq r5, sp <== NOT EXECUTED if ( !loc.ops->mount_h ){ errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 9898: 0affffcf beq 97dc <== NOT EXECUTED 989c: eaffffb5 b 9778 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 98a0: e59f0088 ldr r0, [pc, #136] ; 9930 98a4: e1a01004 mov r1, r4 98a8: ebffee65 bl 5244 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 98ac: e3590000 cmp r9, #0 ; 0x0 98b0: 01a00009 moveq r0, r9 *mt_entry = temp_mt_entry; 98b4: 15894000 strne r4, [r9] 98b8: 11a00006 movne r0, r6 98bc: eaffffbc b 97b4 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 98c0: eb0006bc bl b3b8 <__errno> <== NOT EXECUTED 98c4: e3a03010 mov r3, #16 ; 0x10 <== NOT EXECUTED 98c8: e5803000 str r3, [r0] <== NOT EXECUTED 98cc: eaffffa9 b 9778 <== NOT EXECUTED * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 98d0: eb0006b8 bl b3b8 <__errno> <== NOT EXECUTED 98d4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 98d8: e5803000 str r3, [r0] <== NOT EXECUTED 98dc: eaffffa5 b 9778 <== NOT EXECUTED cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 98e0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 98e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 98e8: 0affffa8 beq 9790 <== NOT EXECUTED 98ec: e1a00005 mov r0, r5 <== NOT EXECUTED 98f0: e1a0e00f mov lr, pc <== NOT EXECUTED 98f4: e12fff13 bx r3 <== NOT EXECUTED 98f8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 98fc: eaffffac b 97b4 <== NOT EXECUTED 9900: e59d0000 ldr r0, [sp] <== NOT EXECUTED 9904: eaffffd4 b 985c <== NOT EXECUTED * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 9908: eb0006aa bl b3b8 <__errno> <== NOT EXECUTED 990c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 9910: e5803000 str r3, [r0] <== NOT EXECUTED 9914: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9918: eaffffa5 b 97b4 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 991c: eb0006a5 bl b3b8 <__errno> <== NOT EXECUTED 9920: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 9924: e5803000 str r3, [r0] <== NOT EXECUTED 9928: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 992c: eaffffa0 b 97b4 <== NOT EXECUTED =============================================================================== 00001880 : */ int newlib_free_buffers( FILE *fp ) { 1880: e92d4010 push {r4, lr} 1884: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 1888: eb002797 bl b6ec 188c: e3500002 cmp r0, #2 ; 0x2 1890: 9a000003 bls 18a4 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 1894: e1a00004 mov r0, r4 <== NOT EXECUTED 1898: eb002717 bl b4fc <== NOT EXECUTED } return 0; } 189c: e3a00000 mov r0, #0 ; 0x0 18a0: e8bd8010 pop {r4, pc} { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 18a4: e1d430bc ldrh r3, [r4, #12] 18a8: e3130080 tst r3, #128 ; 0x80 18ac: 0afffffa beq 189c free( fp->_bf._base ); 18b0: e5940010 ldr r0, [r4, #16] 18b4: eb001dca bl 8fe4 fp->_flags &= ~__SMBF; 18b8: e1d430bc ldrh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 18bc: e3a02000 mov r2, #0 ; 0x0 case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 18c0: e3c33080 bic r3, r3, #128 ; 0x80 fp->_bf._base = fp->_p = (unsigned char *) NULL; 18c4: e5842010 str r2, [r4, #16] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 18c8: e1c430bc strh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 18cc: e5842000 str r2, [r4] break; default: fclose(fp); } return 0; } 18d0: e3a00000 mov r0, #0 ; 0x0 18d4: e8bd8010 pop {r4, pc} =============================================================================== 0000202c : void *pargp ) { rtems_device_driver status; if ( !initialized ) { 202c: e59fc040 ldr ip, [pc, #64] ; 2074 2030: e5dc2000 ldrb r2, [ip] 2034: e3520000 cmp r2, #0 ; 0x0 rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 2038: e92d4010 push {r4, lr} 203c: e1a04000 mov r4, r0 rtems_device_driver status; if ( !initialized ) { 2040: 0a000001 beq 204c NULL_major = major; } return RTEMS_SUCCESSFUL; } 2044: e3a00000 mov r0, #0 ; 0x0 2048: e8bd8010 pop {r4, pc} ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 204c: e3a03001 mov r3, #1 ; 0x1 status = rtems_io_register_name( 2050: e59f0020 ldr r0, [pc, #32] ; 2078 2054: e1a01004 mov r1, r4 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 2058: e5cc3000 strb r3, [ip] status = rtems_io_register_name( 205c: eb00004b bl 2190 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 2060: e3500000 cmp r0, #0 ; 0x0 rtems_fatal_error_occurred(status); NULL_major = major; 2064: 059f3010 ldreq r3, [pc, #16] ; 207c 2068: 05834000 streq r4, [r3] "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 206c: 0afffff4 beq 2044 rtems_fatal_error_occurred(status); 2070: eb000ff5 bl 604c <== NOT EXECUTED =============================================================================== 00001ae8 : int open( const char *pathname, int flags, ... ) { 1ae8: e92d000e push {r1, r2, r3} 1aec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1af0: e24dd010 sub sp, sp, #16 ; 0x10 1af4: e59da034 ldr sl, [sp, #52] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 1af8: e28a3001 add r3, sl, #1 ; 0x1 if ( ( status & _FREAD ) == _FREAD ) 1afc: e2132001 ands r2, r3, #1 ; 0x1 1b00: 01a04002 moveq r4, r2 1b04: 13a04004 movne r4, #4 ; 0x4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 1b08: e3130002 tst r3, #2 ; 0x2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 1b0c: 13844002 orrne r4, r4, #2 ; 0x2 int open( const char *pathname, int flags, ... ) { 1b10: e1a09000 mov r9, r0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1b14: e59db038 ldr fp, [sp, #56] * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 1b18: eb001e26 bl 93b8 if ( iop == 0 ) { 1b1c: e2506000 subs r6, r0, #0 ; 0x0 1b20: 03a05017 moveq r5, #23 ; 0x17 1b24: 0a000030 beq 1bec /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1b28: e1a01004 mov r1, r4 1b2c: e1a00009 mov r0, r9 1b30: e1a0200d mov r2, sp 1b34: e3a03001 mov r3, #1 ; 0x1 1b38: ebfffe15 bl 1394 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 1b3c: e3700001 cmn r0, #1 ; 0x1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1b40: e1a0700d mov r7, sp pathname, eval_flags, &loc, true ); if ( status == -1 ) { 1b44: 0a000040 beq 1c4c if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1b48: e20a3c0a and r3, sl, #2560 ; 0xa00 1b4c: e3530c0a cmp r3, #2560 ; 0xa00 1b50: 01a0400d moveq r4, sp 1b54: 03a05011 moveq r5, #17 ; 0x11 1b58: 0a000055 beq 1cb4 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1b5c: e89d000c ldm sp, {r2, r3} 1b60: e5863030 str r3, [r6, #48] iop->file_info = loc.node_access; 1b64: e586202c str r2, [r6, #44] iop->flags |= rtems_libio_fcntl_flags( flags ); 1b68: e1a0000a mov r0, sl 1b6c: e596400c ldr r4, [r6, #12] 1b70: eb001e54 bl 94c8 iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 1b74: e5963030 ldr r3, [r6, #48] 1b78: e5938000 ldr r8, [r3] * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1b7c: e1805004 orr r5, r0, r4 iop->pathinfo = loc; 1b80: e897000f ldm r7, {r0, r1, r2, r3} 1b84: e286c010 add ip, r6, #16 ; 0x10 if ( !iop->handlers->open_h ) { 1b88: e3580000 cmp r8, #0 ; 0x0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1b8c: e88c000f stm ip, {r0, r1, r2, r3} * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1b90: e586500c str r5, [r6, #12] iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 1b94: 0a000044 beq 1cac rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 1b98: e1a01009 mov r1, r9 1b9c: e1a0300b mov r3, fp 1ba0: e1a00006 mov r0, r6 1ba4: e1a0200a mov r2, sl 1ba8: e1a0e00f mov lr, pc 1bac: e12fff18 bx r8 if ( rc ) 1bb0: e2505000 subs r5, r0, #0 ; 0x0 1bb4: 11a0400d movne r4, sp 1bb8: 0a00000f beq 1bfc done: va_end(ap); if ( rc ) { if ( iop ) rtems_libio_free( iop ); 1bbc: e1a00006 mov r0, r6 <== NOT EXECUTED 1bc0: eb001de6 bl 9360 <== NOT EXECUTED if ( loc_to_free ) 1bc4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 1bc8: 0a000007 beq 1bec <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 1bcc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 1bd0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1bd4: 0a000004 beq 1bec <== NOT EXECUTED 1bd8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1bdc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1be0: 11a00004 movne r0, r4 <== NOT EXECUTED 1be4: 11a0e00f movne lr, pc <== NOT EXECUTED 1be8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( rc ); 1bec: eb0025f1 bl b3b8 <__errno> 1bf0: e5805000 str r5, [r0] 1bf4: e3e00000 mvn r0, #0 ; 0x0 1bf8: ea00000f b 1c3c /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1bfc: e31a0b01 tst sl, #1024 ; 0x400 1c00: 1a000034 bne 1cd8 1c04: e59f4170 ldr r4, [pc, #368] ; 1d7c if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1c08: e5941000 ldr r1, [r4] 1c0c: e0611006 rsb r1, r1, r6 1c10: e1a01141 asr r1, r1, #2 1c14: e1a02301 lsl r2, r1, #6 1c18: e0422101 sub r2, r2, r1, lsl #2 1c1c: e1a03302 lsl r3, r2, #6 1c20: e0623003 rsb r3, r2, r3 1c24: e1a00603 lsl r0, r3, #12 1c28: e0833000 add r3, r3, r0 1c2c: e0833001 add r3, r3, r1 1c30: e1a03203 lsl r3, r3, #4 1c34: e0613003 rsb r3, r1, r3 1c38: e0410103 sub r0, r1, r3, lsl #2 } 1c3c: e28dd010 add sp, sp, #16 ; 0x10 1c40: e8bd4ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1c44: e28dd00c add sp, sp, #12 ; 0xc 1c48: e12fff1e bx lr status = rtems_filesystem_evaluate_path( pathname, eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 1c4c: eb0025d9 bl b3b8 <__errno> <== NOT EXECUTED 1c50: e5900000 ldr r0, [r0] <== NOT EXECUTED 1c54: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 1c58: 1a000018 bne 1cc0 <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1c5c: e21a3c02 ands r3, sl, #512 ; 0x200 <== NOT EXECUTED 1c60: 01a05000 moveq r5, r0 <== NOT EXECUTED 1c64: 01a04003 moveq r4, r3 <== NOT EXECUTED 1c68: 0a000011 beq 1cb4 <== NOT EXECUTED rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1c6c: e1a00009 mov r0, r9 <== NOT EXECUTED 1c70: e38b1902 orr r1, fp, #32768 ; 0x8000 <== NOT EXECUTED 1c74: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 1c78: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1c7c: ebfffe7e bl 167c <== NOT EXECUTED if ( rc ) { 1c80: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1c84: 1a00000d bne 1cc0 <== NOT EXECUTED rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true ); 1c88: e1a00009 mov r0, r9 <== NOT EXECUTED 1c8c: e1a01004 mov r1, r4 <== NOT EXECUTED 1c90: e1a0200d mov r2, sp <== NOT EXECUTED 1c94: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 1c98: ebfffdbd bl 1394 <== NOT EXECUTED if ( status != 0 ) { /* The file did not exist */ 1c9c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1ca0: 13a0500d movne r5, #13 ; 0xd <== NOT EXECUTED 1ca4: 1a000002 bne 1cb4 <== NOT EXECUTED 1ca8: eaffffab b 1b5c <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1cac: e1a0400d mov r4, sp <== NOT EXECUTED 1cb0: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 1cb4: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 1cb8: 0affffc1 beq 1bc4 <== NOT EXECUTED 1cbc: eaffffbe b 1bbc <== NOT EXECUTED } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 1cc0: eb0025bc bl b3b8 <__errno> <== NOT EXECUTED 1cc4: e5905000 ldr r5, [r0] <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 1cc8: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 1ccc: 0affffcc beq 1c04 <== NOT EXECUTED 1cd0: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 1cd4: eafffff6 b 1cb4 <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 1cd8: e59f409c ldr r4, [pc, #156] ; 1d7c <== NOT EXECUTED 1cdc: e5942000 ldr r2, [r4] <== NOT EXECUTED 1ce0: e0622006 rsb r2, r2, r6 <== NOT EXECUTED 1ce4: e1a02142 asr r2, r2, #2 <== NOT EXECUTED 1ce8: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED 1cec: e0433102 sub r3, r3, r2, lsl #2 <== NOT EXECUTED 1cf0: e1a00303 lsl r0, r3, #6 <== NOT EXECUTED 1cf4: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 1cf8: e1a01600 lsl r1, r0, #12 <== NOT EXECUTED 1cfc: e0800001 add r0, r0, r1 <== NOT EXECUTED 1d00: e0800002 add r0, r0, r2 <== NOT EXECUTED 1d04: e1a00200 lsl r0, r0, #4 <== NOT EXECUTED 1d08: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 1d0c: e1a01005 mov r1, r5 <== NOT EXECUTED 1d10: e0420100 sub r0, r2, r0, lsl #2 <== NOT EXECUTED 1d14: eb001cda bl 9084 <== NOT EXECUTED if ( rc ) { 1d18: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 1d1c: 0affffb9 beq 1c08 <== NOT EXECUTED if(errno) rc = errno; 1d20: eb0025a4 bl b3b8 <__errno> <== NOT EXECUTED 1d24: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d28: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d2c: 1a00000f bne 1d70 <== NOT EXECUTED close( iop - rtems_libio_iops ); 1d30: e5942000 ldr r2, [r4] <== NOT EXECUTED 1d34: e0622006 rsb r2, r2, r6 <== NOT EXECUTED 1d38: e1a02142 asr r2, r2, #2 <== NOT EXECUTED 1d3c: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED 1d40: e0433102 sub r3, r3, r2, lsl #2 <== NOT EXECUTED 1d44: e1a00303 lsl r0, r3, #6 <== NOT EXECUTED 1d48: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 1d4c: e1a01600 lsl r1, r0, #12 <== NOT EXECUTED 1d50: e0800001 add r0, r0, r1 <== NOT EXECUTED 1d54: e0800002 add r0, r0, r2 <== NOT EXECUTED 1d58: e1a00200 lsl r0, r0, #4 <== NOT EXECUTED 1d5c: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 1d60: e0420100 sub r0, r2, r0, lsl #2 <== NOT EXECUTED 1d64: eb001c71 bl 8f30 <== NOT EXECUTED 1d68: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 1d6c: eaffffd5 b 1cc8 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 1d70: eb002590 bl b3b8 <__errno> <== NOT EXECUTED 1d74: e5905000 ldr r5, [r0] <== NOT EXECUTED 1d78: eaffffec b 1d30 <== NOT EXECUTED =============================================================================== 00001a80 : int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1a80: e3a01000 mov r1, #0 ; 0x0 /* * This is a replaceable stub */ void open_dev_console(void) { 1a84: e52de004 push {lr} ; (str lr, [sp, #-4]!) int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1a88: e59f004c ldr r0, [pc, #76] ; 1adc 1a8c: e1a02001 mov r2, r1 1a90: eb000014 bl 1ae8 1a94: e3700001 cmn r0, #1 ; 0x1 1a98: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1a9c: e59f0038 ldr r0, [pc, #56] ; 1adc 1aa0: e3a01001 mov r1, #1 ; 0x1 1aa4: e3a02000 mov r2, #0 ; 0x0 1aa8: eb00000e bl 1ae8 1aac: e3700001 cmn r0, #1 ; 0x1 1ab0: 0a000007 beq 1ad4 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1ab4: e59f0020 ldr r0, [pc, #32] ; 1adc 1ab8: e3a01001 mov r1, #1 ; 0x1 1abc: e3a02000 mov r2, #0 ; 0x0 1ac0: eb000008 bl 1ae8 1ac4: e3700001 cmn r0, #1 ; 0x1 1ac8: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( error_code | '2' ); 1acc: e59f000c ldr r0, [pc, #12] ; 1ae0 <== NOT EXECUTED 1ad0: eb000d05 bl 4eec <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | '1' ); 1ad4: e59f0008 ldr r0, [pc, #8] ; 1ae4 <== NOT EXECUTED 1ad8: eb000d03 bl 4eec <== NOT EXECUTED =============================================================================== 000028bc : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 28bc: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 28c0: e5912034 ldr r2, [r1, #52] /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 28c4: e24dd004 sub sp, sp, #4 ; 0x4 int i; if (tty->termios.c_oflag & OPOST) { 28c8: e3120001 tst r2, #1 ; 0x1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 28cc: e1a04001 mov r4, r1 28d0: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 28d4: 0a000016 beq 2934 switch (c) { 28d8: e5dd1000 ldrb r1, [sp] 28dc: e2413008 sub r3, r1, #8 ; 0x8 28e0: e3530005 cmp r3, #5 ; 0x5 28e4: 979ff103 ldrls pc, [pc, r3, lsl #2] 28e8: ea000017 b 294c 28ec: 00002994 .word 0x00002994 28f0: 000029d8 .word 0x000029d8 28f4: 000029a8 .word 0x000029a8 28f8: 0000294c .word 0x0000294c <== NOT EXECUTED 28fc: 0000294c .word 0x0000294c <== NOT EXECUTED 2900: 00002904 .word 0x00002904 <== NOT EXECUTED tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 2904: e3120010 tst r2, #16 ; 0x10 <== NOT EXECUTED 2908: 0a000002 beq 2918 <== NOT EXECUTED 290c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2910: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2914: 0a00000a beq 2944 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2918: e2123008 ands r3, r2, #8 ; 0x8 <== NOT EXECUTED 291c: 0a00001a beq 298c <== NOT EXECUTED c = '\n'; 2920: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 2924: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { c = '\n'; 2928: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) tty->column = 0; 292c: 1243300a subne r3, r3, #10 ; 0xa <== NOT EXECUTED 2930: 15843028 strne r3, [r4, #40] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 2934: e1a02004 mov r2, r4 2938: e1a0000d mov r0, sp 293c: e3a01001 mov r1, #1 ; 0x1 2940: ebffff95 bl 279c } 2944: e28dd004 add sp, sp, #4 ; 0x4 2948: e8bd8010 pop {r4, pc} if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 294c: e3120002 tst r2, #2 ; 0x2 2950: 059f00bc ldreq r0, [pc, #188] ; 2a14 2954: 0a000006 beq 2974 c = toupper(c); 2958: e59f00b4 ldr r0, [pc, #180] ; 2a14 <== NOT EXECUTED 295c: e5902000 ldr r2, [r0] <== NOT EXECUTED 2960: e7d23001 ldrb r3, [r2, r1] <== NOT EXECUTED 2964: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 2968: 12411020 subne r1, r1, #32 ; 0x20 <== NOT EXECUTED 296c: e5cd1000 strb r1, [sp] <== NOT EXECUTED 2970: e5dd1000 ldrb r1, [sp] <== NOT EXECUTED if (!iscntrl(c)) 2974: e5903000 ldr r3, [r0] 2978: e7d32001 ldrb r2, [r3, r1] 297c: e3120020 tst r2, #32 ; 0x20 2980: 1affffeb bne 2934 tty->column++; 2984: e5943028 ldr r3, [r4, #40] 2988: e2833001 add r3, r3, #1 ; 0x1 298c: e5843028 str r3, [r4, #40] 2990: eaffffe7 b 2934 } tty->column += i; break; case '\b': if (tty->column > 0) 2994: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2998: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 299c: c2433001 subgt r3, r3, #1 ; 0x1 <== NOT EXECUTED 29a0: c5843028 strgt r3, [r4, #40] <== NOT EXECUTED 29a4: eaffffe2 b 2934 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 29a8: e3120020 tst r2, #32 ; 0x20 tty->column = 0; 29ac: 13a03000 movne r3, #0 ; 0x0 29b0: 15843028 strne r3, [r4, #40] if (tty->termios.c_oflag & ONLCR) { 29b4: e3120004 tst r2, #4 ; 0x4 29b8: 0affffdd beq 2934 rtems_termios_puts ("\r", 1, tty); 29bc: e59f0054 ldr r0, [pc, #84] ; 2a18 29c0: e3a01001 mov r1, #1 ; 0x1 29c4: e1a02004 mov r2, r4 29c8: ebffff73 bl 279c tty->column = 0; 29cc: e3a03000 mov r3, #0 ; 0x0 29d0: e5843028 str r3, [r4, #40] 29d4: eaffffd6 b 2934 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 29d8: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 29dc: e2023b06 and r3, r2, #6144 ; 0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 29e0: e2012007 and r2, r1, #7 ; 0x7 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 29e4: e3530b06 cmp r3, #6144 ; 0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 29e8: e2620008 rsb r0, r2, #8 ; 0x8 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 29ec: 10803001 addne r3, r0, r1 <== NOT EXECUTED 29f0: 15843028 strne r3, [r4, #40] <== NOT EXECUTED tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 29f4: 1affffce bne 2934 <== NOT EXECUTED tty->column += i; 29f8: e0803001 add r3, r0, r1 <== NOT EXECUTED 29fc: e5843028 str r3, [r4, #40] <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 2a00: e1a01000 mov r1, r0 <== NOT EXECUTED 2a04: e1a02004 mov r2, r4 <== NOT EXECUTED 2a08: e59f000c ldr r0, [pc, #12] ; 2a1c <== NOT EXECUTED 2a0c: ebffff62 bl 279c <== NOT EXECUTED 2a10: eaffffcb b 2944 <== NOT EXECUTED =============================================================================== 00013bc4 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 13bc4: e59f30c4 ldr r3, [pc, #196] ; 13c90 <== NOT EXECUTED 13bc8: e593c000 ldr ip, [r3] <== NOT EXECUTED 13bcc: e150000c cmp r0, ip <== NOT EXECUTED ssize_t read( int fd, void *buffer, size_t count ) { 13bd0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 13bd4: e1a06001 mov r6, r1 <== NOT EXECUTED 13bd8: e1a05002 mov r5, r2 <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 13bdc: 2a00001c bcs 13c54 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 13be0: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED 13be4: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED 13be8: e0833000 add r3, r3, r0 <== NOT EXECUTED 13bec: e59f00a0 ldr r0, [pc, #160] ; 13c94 <== NOT EXECUTED 13bf0: e590c000 ldr ip, [r0] <== NOT EXECUTED 13bf4: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 13bf8: e08c4003 add r4, ip, r3 <== NOT EXECUTED rtems_libio_check_is_open( iop ); 13bfc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED 13c00: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 13c04: 0a000012 beq 13c54 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 13c08: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 13c0c: 0a00001a beq 13c7c <== NOT EXECUTED rtems_libio_check_count( count ); 13c10: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 13c14: 01a00002 moveq r0, r2 <== NOT EXECUTED 13c18: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF ); 13c1c: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 13c20: 0a00000b beq 13c54 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 13c24: e5943030 ldr r3, [r4, #48] <== NOT EXECUTED 13c28: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 13c2c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 13c30: 0a00000c beq 13c68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 13c34: e1a00004 mov r0, r4 <== NOT EXECUTED 13c38: e1a0e00f mov lr, pc <== NOT EXECUTED 13c3c: e12fff13 bx r3 <== NOT EXECUTED if ( rc > 0 ) 13c40: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED iop->offset += rc; 13c44: c5943008 ldrgt r3, [r4, #8] <== NOT EXECUTED 13c48: c0833000 addgt r3, r3, r0 <== NOT EXECUTED 13c4c: c5843008 strgt r3, [r4, #8] <== NOT EXECUTED return rc; } 13c50: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF ); 13c54: ebffddd7 bl b3b8 <__errno> <== NOT EXECUTED 13c58: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 13c5c: e5803000 str r3, [r0] <== NOT EXECUTED 13c60: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13c64: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 13c68: ebffddd2 bl b3b8 <__errno> <== NOT EXECUTED 13c6c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 13c70: e5803000 str r3, [r0] <== NOT EXECUTED 13c74: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13c78: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); 13c7c: ebffddcd bl b3b8 <__errno> <== NOT EXECUTED 13c80: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 13c84: e5803000 str r3, [r0] <== NOT EXECUTED 13c88: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13c8c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00013d00 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 13d00: e92d40f0 push {r4, r5, r6, r7, lr} /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 13d04: e59f3114 ldr r3, [pc, #276] ; 13e20 { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 13d08: e59f7114 ldr r7, [pc, #276] ; 13e24 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 13d0c: e593c000 ldr ip, [r3] { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 13d10: e5972010 ldr r2, [r7, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 13d14: e35c0003 cmp ip, #3 ; 0x3 { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 13d18: e2822001 add r2, r2, #1 ; 0x1 13d1c: e24dd004 sub sp, sp, #4 ; 0x4 13d20: e5872010 str r2, [r7, #16] 13d24: e1a04000 mov r4, r0 13d28: e1a06001 mov r6, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 13d2c: 0a00001f beq 13db0 } /* * Continue with realloc(). */ if ( !ptr ) 13d30: e3540000 cmp r4, #0 ; 0x0 13d34: 0a000010 beq 13d7c return malloc( size ); if ( !size ) { 13d38: e3560000 cmp r6, #0 ; 0x0 13d3c: 0a000012 beq 13d8c free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 13d40: e59f00e0 ldr r0, [pc, #224] ; 13e28 13d44: e1a01004 mov r1, r4 13d48: e1a0200d mov r2, sp 13d4c: eb00006d bl 13f08 <_Protected_heap_Get_block_size> 13d50: e2505000 subs r5, r0, #0 ; 0x0 13d54: 0a000010 beq 13d9c #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, resize ) ) { 13d58: e59f00c8 ldr r0, [pc, #200] ; 13e28 13d5c: e1a01004 mov r1, r4 13d60: e1a02006 mov r2, r6 13d64: eb000078 bl 13f4c <_Protected_heap_Resize_block> 13d68: e3500000 cmp r0, #0 ; 0x0 13d6c: 0a00001b beq 13de0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 13d70: e1a00004 mov r0, r4 13d74: e28dd004 add sp, sp, #4 ; 0x4 13d78: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 13d7c: e1a00006 mov r0, r6 <== NOT EXECUTED 13d80: ebffd5fd bl 957c <== NOT EXECUTED 13d84: e1a04000 mov r4, r0 <== NOT EXECUTED 13d88: eafffff8 b 13d70 <== NOT EXECUTED if ( !size ) { free( ptr ); 13d8c: e1a00004 mov r0, r4 <== NOT EXECUTED 13d90: ebffd493 bl 8fe4 <== NOT EXECUTED 13d94: e1a04006 mov r4, r6 <== NOT EXECUTED 13d98: eafffff4 b 13d70 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 13d9c: ebffdd85 bl b3b8 <__errno> 13da0: e3a03016 mov r3, #22 ; 0x16 13da4: e5803000 str r3, [r0] 13da8: e1a04005 mov r4, r5 13dac: eaffffef b 13d70 /* * 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) 13db0: e59f3074 ldr r3, [pc, #116] ; 13e2c 13db4: e5932000 ldr r2, [r3] 13db8: e3520000 cmp r2, #0 ; 0x0 13dbc: 0a000001 beq 13dc8 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 13dc0: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 13dc4: eaffffe9 b 13d70 <== NOT EXECUTED if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 13dc8: e59f3060 ldr r3, [pc, #96] ; 13e30 13dcc: e5932000 ldr r2, [r3] 13dd0: e3520000 cmp r2, #0 ; 0x0 13dd4: 0affffd5 beq 13d30 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 13dd8: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 13ddc: eaffffe3 b 13d70 <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 13de0: e1a00006 mov r0, r6 13de4: ebffd5e4 bl 957c MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 13de8: e5973004 ldr r3, [r7, #4] if ( !new_area ) { 13dec: e2505000 subs r5, r0, #0 ; 0x0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 13df0: e2433001 sub r3, r3, #1 ; 0x1 13df4: e5873004 str r3, [r7, #4] if ( !new_area ) { 13df8: 0afffff0 beq 13dc0 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 13dfc: e59d2000 ldr r2, [sp] 13e00: e1a01004 mov r1, r4 13e04: e1560002 cmp r6, r2 13e08: 31a02006 movcc r2, r6 13e0c: ebffdf33 bl bae0 free( ptr ); 13e10: e1a00004 mov r0, r4 13e14: ebffd472 bl 8fe4 13e18: e1a04005 mov r4, r5 13e1c: eaffffd3 b 13d70 =============================================================================== 0000ad04 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { ad04: e92d41f0 push {r4, r5, r6, r7, r8, lr} ad08: e3a06000 mov r6, #0 ; 0x0 ad0c: e1a08000 mov r8, r0 ad10: e1a07001 mov r7, r1 ad14: e3a04001 mov r4, #1 ; 0x1 ad18: e1a05006 mov r5, r6 ad1c: ea000002 b ad2c uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ad20: e3550020 cmp r5, #32 ; 0x20 ad24: e1a04084 lsl r4, r4, #1 ad28: 0a000009 beq ad54 if (b & remote_value) ad2c: e1140007 tst r4, r7 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ad30: e2855001 add r5, r5, #1 ; 0x1 if (b & remote_value) ad34: 0afffff9 beq ad20 local_value |= rtems_assoc_local_by_remote(ap, b); ad38: e1a01004 mov r1, r4 <== NOT EXECUTED ad3c: e1a00008 mov r0, r8 <== NOT EXECUTED ad40: eb000005 bl ad5c <== NOT EXECUTED ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ad44: e3550020 cmp r5, #32 ; 0x20 <== NOT EXECUTED if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); ad48: e1866000 orr r6, r6, r0 <== NOT EXECUTED ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ad4c: e1a04084 lsl r4, r4, #1 <== NOT EXECUTED ad50: 1afffff5 bne ad2c <== NOT EXECUTED if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } ad54: e1a00006 mov r0, r6 ad58: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 0000cc80 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } cc80: e59f0000 ldr r0, [pc, #0] ; cc88 <== NOT EXECUTED cc84: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000acf4 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { acf4: e92d4010 push {r4, lr} acf8: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); acfc: eb000006 bl ad1c if (nap) ad00: e3500000 cmp r0, #0 ; 0x0 ad04: 0a000001 beq ad10 return nap->name; return rtems_assoc_name_bad(local_value); } ad08: e5900000 ldr r0, [r0] ad0c: e8bd8010 pop {r4, pc} nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); ad10: e1a00004 mov r0, r4 <== NOT EXECUTED } ad14: e8bd4010 pop {r4, lr} <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); ad18: ea0007d8 b cc80 <== NOT EXECUTED =============================================================================== 0000b320 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { b320: e92d4030 push {r4, r5, lr} b324: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) b328: e5900000 ldr r0, [r0] b32c: e3500000 cmp r0, #0 ; 0x0 const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { b330: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) b334: 01a04000 moveq r4, r0 b338: 0a000013 beq b38c b33c: e59f105c ldr r1, [pc, #92] ; b3a0 b340: eb0004ea bl c6f0 b344: e3500000 cmp r0, #0 ; 0x0 b348: 13a02000 movne r2, #0 ; 0x0 b34c: 1a00000b bne b380 default_ap = ap++; for ( ; ap->name; ap++) b350: e594300c ldr r3, [r4, #12] <== NOT EXECUTED b354: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; b358: e284300c add r3, r4, #12 ; 0xc <== NOT EXECUTED for ( ; ap->name; ap++) b35c: 0a00000a beq b38c <== NOT EXECUTED b360: e1a02004 mov r2, r4 <== NOT EXECUTED b364: e1a04003 mov r4, r3 <== NOT EXECUTED if (ap->local_value == local_value) b368: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED b36c: e1530005 cmp r3, r5 <== NOT EXECUTED b370: 0a000005 beq b38c <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) b374: e5b4300c ldr r3, [r4, #12]! b378: e3530000 cmp r3, #0 ; 0x0 b37c: 0a000004 beq b394 if (ap->local_value == local_value) b380: e5943004 ldr r3, [r4, #4] b384: e1530005 cmp r3, r5 b388: 1afffff9 bne b374 return ap; return default_ap; } b38c: e1a00004 mov r0, r4 b390: e8bd8030 pop {r4, r5, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) b394: e1a04002 mov r4, r2 if (ap->local_value == local_value) return ap; return default_ap; } b398: e1a00004 mov r0, r4 b39c: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000ad70 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ad70: e92d4030 push {r4, r5, lr} ad74: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ad78: e5900000 ldr r0, [r0] ad7c: e3500000 cmp r0, #0 ; 0x0 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ad80: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ad84: 01a04000 moveq r4, r0 ad88: 0a000013 beq addc ad8c: e59f105c ldr r1, [pc, #92] ; adf0 ad90: eb000656 bl c6f0 ad94: e3500000 cmp r0, #0 ; 0x0 ad98: 13a02000 movne r2, #0 ; 0x0 ad9c: 1a00000b bne add0 default_ap = ap++; for ( ; ap->name; ap++) ada0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED ada4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ada8: e284300c add r3, r4, #12 ; 0xc <== NOT EXECUTED for ( ; ap->name; ap++) adac: 0a00000a beq addc <== NOT EXECUTED adb0: e1a02004 mov r2, r4 <== NOT EXECUTED adb4: e1a04003 mov r4, r3 <== NOT EXECUTED if (ap->remote_value == remote_value) adb8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED adbc: e1530005 cmp r3, r5 <== NOT EXECUTED adc0: 0a000005 beq addc <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) adc4: e5b4300c ldr r3, [r4, #12]! adc8: e3530000 cmp r3, #0 ; 0x0 adcc: 0a000004 beq ade4 if (ap->remote_value == remote_value) add0: e5943008 ldr r3, [r4, #8] add4: e1530005 cmp r3, r5 add8: 1afffff9 bne adc4 return ap; return default_ap; } addc: e1a00004 mov r0, r4 ade0: e8bd8030 pop {r4, r5, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ade4: e1a04002 mov r4, r2 <== NOT EXECUTED if (ap->remote_value == remote_value) return ap; return default_ap; } ade8: e1a00004 mov r0, r4 <== NOT EXECUTED adec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 0000adf4 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { adf4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); adf8: eb000148 bl b320 <== NOT EXECUTED if (nap) adfc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return nap->remote_value; ae00: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } ae04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00003f0c : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 3f0c: e92d4010 push {r4, lr} if ( !time_buffer ) 3f10: e2514000 subs r4, r1, #0 ; 0x0 3f14: 03a00009 moveq r0, #9 ; 0x9 3f18: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 3f1c: e3500004 cmp r0, #4 ; 0x4 3f20: 979ff100 ldrls pc, [pc, r0, lsl #2] 3f24: ea000004 b 3f3c 3f28: 00003f44 .word 0x00003f44 3f2c: 00003f50 .word 0x00003f50 3f30: 3f5c .short 0x3f5c 3f32: 0000 .short 0x0000 3f34: 00003f6c .word 0x00003f6c 3f38: 00003f7c .word 0x00003f7c 3f3c: e3a0000a mov r0, #10 ; 0xa 3f40: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3f44: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f48: e8bd4010 pop {r4, lr} if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3f4c: ea000027 b 3ff0 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3f50: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f54: e8bd4010 pop {r4, lr} switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3f58: ea00000a b 3f88 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 3f5c: eb00001f bl 3fe0 3f60: e5840000 str r0, [r4] 3f64: e3a00000 mov r0, #0 ; 0x0 3f68: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 3f6c: eb000013 bl 3fc0 3f70: e5840000 str r0, [r4] 3f74: e3a00000 mov r0, #0 ; 0x0 3f78: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3f7c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f80: e8bd4010 pop {r4, lr} *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3f84: ea00004c b 40bc =============================================================================== 00003fc0 : #include #include #include rtems_interval rtems_clock_get_ticks_per_second(void) { 3fc0: e59f3014 ldr r3, [pc, #20] ; 3fdc <== NOT EXECUTED 3fc4: e3a0093d mov r0, #999424 ; 0xf4000 <== NOT EXECUTED 3fc8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3fcc: e5931000 ldr r1, [r3] <== NOT EXECUTED 3fd0: e2800d09 add r0, r0, #576 ; 0x240 <== NOT EXECUTED 3fd4: eb003822 bl 12064 <__aeabi_uidiv> <== NOT EXECUTED return TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick; } 3fd8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED ... =============================================================================== 00003ff0 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 3ff0: e92d4030 push {r4, r5, lr} rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 3ff4: e2505000 subs r5, r0, #0 ; 0x0 #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 3ff8: e24dd034 sub sp, sp, #52 ; 0x34 rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 3ffc: 02800009 addeq r0, r0, #9 ; 0x9 4000: 0a000028 beq 40a8 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 4004: e59f30a4 ldr r3, [pc, #164] ; 40b0 4008: e5d32000 ldrb r2, [r3] 400c: e3520000 cmp r2, #0 ; 0x0 4010: 03a0000b moveq r0, #11 ; 0xb 4014: 0a000023 beq 40a8 ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 4018: e10f4000 mrs r4, CPSR 401c: e38430c0 orr r3, r4, #192 ; 0xc0 4020: e129f003 msr CPSR_fc, r3 _TOD_Get( &now ); 4024: e28d0024 add r0, sp, #36 ; 0x24 4028: eb000584 bl 5640 <_TOD_Get> _ISR_Enable(level); 402c: e129f004 msr CPSR_fc, r4 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4030: e59f107c ldr r1, [pc, #124] ; 40b4 4034: e59d3028 ldr r3, [sp, #40] 4038: e0820391 umull r0, r2, r1, r3 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 403c: e59d3024 ldr r3, [sp, #36] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4040: e1a02322 lsr r2, r2, #6 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 4044: e1a0100d mov r1, sp 4048: e28d002c add r0, sp, #44 ; 0x2c _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 404c: e58d302c str r3, [sp, #44] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4050: e58d2030 str r2, [sp, #48] 4054: eb001e9f bl bad8 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 4058: e59d2014 ldr r2, [sp, #20] tmbuf->month = time.tm_mon + 1; 405c: e59d3010 ldr r3, [sp, #16] /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 4060: e2822e76 add r2, r2, #1888 ; 0x760 4064: e282200c add r2, r2, #12 ; 0xc tmbuf->month = time.tm_mon + 1; 4068: e2833001 add r3, r3, #1 ; 0x1 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 406c: e885000c stm r5, {r2, r3} tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 4070: e59d200c ldr r2, [sp, #12] tmbuf->hour = time.tm_hour; 4074: e59d3008 ldr r3, [sp, #8] gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 4078: e5852008 str r2, [r5, #8] tmbuf->hour = time.tm_hour; 407c: e585300c str r3, [r5, #12] tmbuf->minute = time.tm_min; 4080: e59d2004 ldr r2, [sp, #4] tmbuf->second = time.tm_sec; 4084: e59d3000 ldr r3, [sp] /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; 4088: e5852010 str r2, [r5, #16] tmbuf->second = time.tm_sec; 408c: e5853014 str r3, [r5, #20] tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 4090: e59f2020 ldr r2, [pc, #32] ; 40b8 4094: e59d0030 ldr r0, [sp, #48] 4098: e5921000 ldr r1, [r2] 409c: eb0037f0 bl 12064 <__aeabi_uidiv> 40a0: e5850018 str r0, [r5, #24] 40a4: e3a00000 mov r0, #0 ; 0x0 return RTEMS_SUCCESSFUL; } 40a8: e28dd034 add sp, sp, #52 ; 0x34 40ac: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000a97c : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { a97c: e92d4010 push {r4, lr} <== NOT EXECUTED a980: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) a984: e59f0018 ldr r0, [pc, #24] ; a9a4 <== NOT EXECUTED a988: eb000119 bl adf4 <== NOT EXECUTED a98c: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED a990: 0a000001 beq a99c <== NOT EXECUTED { errno = rc; a994: eb000287 bl b3b8 <__errno> <== NOT EXECUTED a998: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } a99c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED a9a0: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00002630 : int rtems_error( int error_flag, const char *printf_format, ... ) { 2630: e92d000e push {r1, r2, r3} <== NOT EXECUTED 2634: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 2638: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 263c: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 2640: ebffff7b bl 2434 <== NOT EXECUTED va_end(arglist); return chars_written; } 2644: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 2648: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 264c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 000012ec : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 12ec: e92d4030 push {r4, r5, lr} <== NOT EXECUTED rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 12f0: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 12f4: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED 12f8: e1a0e000 mov lr, r0 <== NOT EXECUTED rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 12fc: 0a00001e beq 137c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 1300: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 1304: e593c000 ldr ip, [r3] <== NOT EXECUTED 1308: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED 130c: 0a000015 beq 1368 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 1310: e891000f ldm r1, {r0, r1, r2, r3} <== NOT EXECUTED 1314: e88d000f stm sp, {r0, r1, r2, r3} <== NOT EXECUTED result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 1318: e1a0100e mov r1, lr <== NOT EXECUTED 131c: e59f006c ldr r0, [pc, #108] ; 1390 <== NOT EXECUTED 1320: e1a0200d mov r2, sp <== NOT EXECUTED 1324: e1a0e00f mov lr, pc <== NOT EXECUTED 1328: e12fff1c bx ip <== NOT EXECUTED if (result != 0){ 132c: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 1330: e1a0400d mov r4, sp <== NOT EXECUTED result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 1334: 13e05000 mvnne r5, #0 ; 0x0 <== NOT EXECUTED 1338: 1a000007 bne 135c <== NOT EXECUTED return -1; } rtems_filesystem_freenode( &parent ); 133c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1340: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1344: 0a000004 beq 135c <== NOT EXECUTED 1348: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 134c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1350: 11a0000d movne r0, sp <== NOT EXECUTED 1354: 11a0e00f movne lr, pc <== NOT EXECUTED 1358: 112fff13 bxne r3 <== NOT EXECUTED return result; } 135c: e1a00005 mov r0, r5 <== NOT EXECUTED 1360: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 1364: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1368: eb002812 bl b3b8 <__errno> <== NOT EXECUTED 136c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1370: e5803000 str r3, [r0] <== NOT EXECUTED 1374: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 1378: eafffff7 b 135c <== NOT EXECUTED { rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 137c: eb00280d bl b3b8 <__errno> <== NOT EXECUTED 1380: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 1384: e5803000 str r3, [r0] <== NOT EXECUTED 1388: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 138c: eafffff2 b 135c <== NOT EXECUTED =============================================================================== 00001394 : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1394: e92d40f0 push {r4, r5, r6, r7, lr} /* * Verify Input parameters. */ if ( !pathname ) 1398: e2505000 subs r5, r0, #0 ; 0x0 const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 139c: e1a07001 mov r7, r1 13a0: e1a04002 mov r4, r2 13a4: e1a06003 mov r6, r3 /* * Verify Input parameters. */ if ( !pathname ) 13a8: 0a000043 beq 14bc rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 13ac: e3520000 cmp r2, #0 ; 0x0 13b0: 0a000046 beq 14d0 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 13b4: e5d53000 ldrb r3, [r5] 13b8: e353005c cmp r3, #92 ; 0x5c 13bc: 1353002f cmpne r3, #47 ; 0x2f 13c0: 13a0e000 movne lr, #0 ; 0x0 13c4: 03a0e001 moveq lr, #1 ; 0x1 13c8: 1a000028 bne 1470 13cc: e59f3110 ldr r3, [pc, #272] ; 14e4 13d0: e593c000 ldr ip, [r3] 13d4: e28cc014 add ip, ip, #20 ; 0x14 13d8: e89c000f ldm ip, {r0, r1, r2, r3} 13dc: e884000f stm r4, {r0, r1, r2, r3} 13e0: e3a02001 mov r2, #1 ; 0x1 if ( !pathloc->ops->evalpath_h ) 13e4: e5943008 ldr r3, [r4, #8] 13e8: e5933000 ldr r3, [r3] 13ec: e3530000 cmp r3, #0 ; 0x0 13f0: 0a00002c beq 14a8 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 13f4: e0850002 add r0, r5, r2 13f8: e1a01007 mov r1, r7 13fc: e1a02004 mov r2, r4 1400: e1a0e00f mov lr, pc 1404: e12fff13 bx r3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 1408: e2703001 rsbs r3, r0, #1 ; 0x1 140c: 33a03000 movcc r3, #0 ; 0x0 1410: e3560000 cmp r6, #0 ; 0x0 1414: 03a03000 moveq r3, #0 ; 0x0 1418: e3530000 cmp r3, #0 ; 0x0 141c: 08bd80f0 popeq {r4, r5, r6, r7, pc} if ( !pathloc->ops->node_type_h ){ 1420: e5942008 ldr r2, [r4, #8] 1424: e5923010 ldr r3, [r2, #16] 1428: e3530000 cmp r3, #0 ; 0x0 142c: 0a000018 beq 1494 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1430: e1a00004 mov r0, r4 1434: e1a0e00f mov lr, pc 1438: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 143c: e2400003 sub r0, r0, #3 ; 0x3 1440: e3500001 cmp r0, #1 ; 0x1 1444: 83a00000 movhi r0, #0 ; 0x0 1448: 88bd80f0 pophi {r4, r5, r6, r7, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 144c: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED 1450: e5923034 ldr r3, [r2, #52] <== NOT EXECUTED 1454: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1458: 0a00000d beq 1494 <== NOT EXECUTED * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 145c: e1a00004 mov r0, r4 <== NOT EXECUTED 1460: e1a01007 mov r1, r7 <== NOT EXECUTED 1464: e1a0e00f mov lr, pc <== NOT EXECUTED 1468: e12fff13 bx r3 <== NOT EXECUTED } } return result; } 146c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 1470: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1474: 0affffd4 beq 13cc <== NOT EXECUTED 1478: e59f3064 ldr r3, [pc, #100] ; 14e4 <== NOT EXECUTED 147c: e593c000 ldr ip, [r3] <== NOT EXECUTED 1480: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 1484: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED 1488: e884000f stm r4, {r0, r1, r2, r3} <== NOT EXECUTED 148c: e1a0200e mov r2, lr <== NOT EXECUTED 1490: eaffffd3 b 13e4 <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 1494: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1498: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 149c: 11a00004 movne r0, r4 <== NOT EXECUTED 14a0: 11a0e00f movne lr, pc <== NOT EXECUTED 14a4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 14a8: eb0027c2 bl b3b8 <__errno> <== NOT EXECUTED 14ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 14b0: e5803000 str r3, [r0] <== NOT EXECUTED 14b4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 14bc: eb0027bd bl b3b8 <__errno> <== NOT EXECUTED 14c0: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 14c4: e5803000 str r3, [r0] <== NOT EXECUTED 14c8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14cc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 14d0: eb0027b8 bl b3b8 <__errno> <== NOT EXECUTED 14d4: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 14d8: e5803000 str r3, [r0] <== NOT EXECUTED 14dc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14e0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00008dcc : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8dcc: e92d4070 push {r4, r5, r6, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8dd0: e59f60fc ldr r6, [pc, #252] ; 8ed4 8dd4: e5962000 ldr r2, [r6] 8dd8: e3a03012 mov r3, #18 ; 0x12 8ddc: e5823024 str r3, [r2, #36] * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8de0: e24dd018 sub sp, sp, #24 ; 0x18 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 8de4: eb000224 bl 967c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8de8: e59f30e8 ldr r3, [pc, #232] ; 8ed8 8dec: e5932000 ldr r2, [r3] 8df0: e3520000 cmp r2, #0 ; 0x0 8df4: 0a00002a beq 8ea4 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 8df8: e59f30dc ldr r3, [pc, #220] ; 8edc 8dfc: e5930000 ldr r0, [r3] status = mount( 8e00: e890100e ldm r0, {r1, r2, r3, ip} 8e04: e28d0014 add r0, sp, #20 ; 0x14 8e08: e58dc000 str ip, [sp] 8e0c: eb000221 bl 9698 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 8e10: e3700001 cmn r0, #1 ; 0x1 8e14: 0a000026 beq 8eb4 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8e18: e59de014 ldr lr, [sp, #20] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8e1c: e5965000 ldr r5, [r6] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8e20: e28ee018 add lr, lr, #24 ; 0x18 8e24: e89e000f ldm lr, {r0, r1, r2, r3} 8e28: e285c014 add ip, r5, #20 ; 0x14 8e2c: e88c000f stm ip, {r0, r1, r2, r3} /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 8e30: e28d4004 add r4, sp, #4 ; 0x4 8e34: e3a01000 mov r1, #0 ; 0x0 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8e38: e3a03000 mov r3, #0 ; 0x0 8e3c: e1c532b8 strh r3, [r5, #40] * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 8e40: e1a02004 mov r2, r4 8e44: e1a03001 mov r3, r1 8e48: e59f0090 ldr r0, [pc, #144] ; 8ee0 8e4c: ebffe150 bl 1394 rtems_filesystem_root = loc; 8e50: e596c000 ldr ip, [r6] 8e54: e894000f ldm r4, {r0, r1, r2, r3} 8e58: e28cc014 add ip, ip, #20 ; 0x14 8e5c: e88c000f stm ip, {r0, r1, r2, r3} /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 8e60: e3a01000 mov r1, #0 ; 0x0 8e64: e1a02004 mov r2, r4 8e68: e1a03001 mov r3, r1 8e6c: e59f006c ldr r0, [pc, #108] ; 8ee0 8e70: ebffe147 bl 1394 rtems_filesystem_current = loc; 8e74: e596c000 ldr ip, [r6] 8e78: e894000f ldm r4, {r0, r1, r2, r3} 8e7c: e28cc004 add ip, ip, #4 ; 0x4 8e80: e88c000f stm ip, {r0, r1, r2, r3} * * 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); 8e84: e3a01f7f mov r1, #508 ; 0x1fc 8e88: e2811003 add r1, r1, #3 ; 0x3 8e8c: e59f0050 ldr r0, [pc, #80] ; 8ee4 8e90: eb0001f5 bl 966c if ( status != 0 ) 8e94: e3500000 cmp r0, #0 ; 0x0 8e98: 1a000009 bne 8ec4 * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ #endif } 8e9c: e28dd018 add sp, sp, #24 ; 0x18 8ea0: e8bd8070 pop {r4, r5, r6, pc} /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 8ea4: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 8ea8: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 8eac: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 8eb0: ebfff00d bl 4eec <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 8eb4: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 8eb8: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 8ebc: e2800002 add r0, r0, #2 ; 0x2 <== NOT EXECUTED 8ec0: ebfff009 bl 4eec <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 8ec4: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 8ec8: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 8ecc: e2800003 add r0, r0, #3 ; 0x3 <== NOT EXECUTED 8ed0: ebfff005 bl 4eec <== NOT EXECUTED =============================================================================== 00004d90 : Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures( rtems_configuration_table *configuration_table ) { 4d90: e92d40f0 push {r4, r5, r6, r7, lr} 4d94: e1a06000 mov r6, r0 /* * Dispatching and interrupts are disabled until the end of the * initialization sequence. This prevents an inadvertent context * switch before the executive is initialized. */ _ISR_Disable( bsp_level ); 4d98: e10f2000 mrs r2, CPSR 4d9c: e38230c0 orr r3, r2, #192 ; 0xc0 4da0: e129f003 msr CPSR_fc, r3 /* * Make sure the parameters were not NULL. */ if ( configuration_table == NULL ) 4da4: e3500000 cmp r0, #0 ; 0x0 4da8: 0a000033 beq 4e7c ); /* * Provide pointers just for later convenience. */ _Configuration_Table = configuration_table; 4dac: e59f30d4 ldr r3, [pc, #212] ; 4e88 RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( bool is_multiprocessing ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; 4db0: e59f70d4 ldr r7, [pc, #212] ; 4e8c /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize( _Thread_Dispatch ); 4db4: e59f00d4 ldr r0, [pc, #212] ; 4e90 ); /* * Provide pointers just for later convenience. */ _Configuration_Table = configuration_table; 4db8: e5836000 str r6, [r3] 4dbc: e3a04000 mov r4, #0 ; 0x0 /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize( _Thread_Dispatch ); 4dc0: eb000c70 bl 7f88 <_CPU_Initialize> 4dc4: e5874000 str r4, [r7] /* * Do this as early as possible to insure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 4dc8: eb00140b bl 9dfc <_Debug_Manager_initialization> _API_extensions_Initialization(); 4dcc: eb00009f bl 5050 <_API_extensions_Initialization> * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 4dd0: e59f30bc ldr r3, [pc, #188] ; 4e94 4dd4: e3a05001 mov r5, #1 ; 0x1 /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization( 4dd8: e8960003 ldm r6, {r0, r1} 4ddc: e5835000 str r5, [r3] 4de0: eb000bf3 bl 7db4 <_Workspace_Handler_initialization> (void *)configuration_table->work_space_start, configuration_table->work_space_size ); _User_extensions_Handler_initialization( 4de4: e2860038 add r0, r6, #56 ; 0x38 4de8: e8900003 ldm r0, {r0, r1} 4dec: eb000a72 bl 77bc <_User_extensions_Handler_initialization> configuration_table->number_of_initial_extensions, configuration_table->User_extension_table ); _ISR_Handler_initialization(); 4df0: eb000302 bl 5a00 <_ISR_Handler_initialization> _Objects_Handler_initialization( 4df4: eb0004cf bl 6138 <_Objects_Handler_initialization> _Configuration_MP_table->maximum_nodes, _Configuration_MP_table->maximum_global_objects #endif ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 4df8: e59f3098 ldr r3, [pc, #152] ; 4e98 4dfc: e59f2098 ldr r2, [pc, #152] ; 4e9c /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 4e00: e1a00005 mov r0, r5 _Configuration_MP_table->maximum_nodes, _Configuration_MP_table->maximum_global_objects #endif ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 4e04: e5832004 str r2, [r3, #4] /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 4e08: eb0000f2 bl 51d8 <_API_Mutex_Initialization> _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 4e0c: e59f008c ldr r0, [pc, #140] ; 4ea0 4e10: eb0000c6 bl 5130 <_API_Mutex_Allocate> RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; 4e14: e59f3088 ldr r3, [pc, #136] ; 4ea4 4e18: e1c340b0 strh r4, [r3] 4e1c: e59f3084 ldr r3, [pc, #132] ; 4ea8 for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 4e20: e3a02000 mov r2, #0 ; 0x0 4e24: e18320b4 strh r2, [r3, r4] 4e28: e2844002 add r4, r4, #2 ; 0x2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 4e2c: e3540020 cmp r4, #32 ; 0x20 4e30: 1afffffa bne 4e20 _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 4e34: eb000b62 bl 7bc4 <_Watchdog_Handler_initialization> _TOD_Handler_initialization( configuration_table->microseconds_per_tick ); 4e38: e596000c ldr r0, [r6, #12] 4e3c: eb00021a bl 56ac <_TOD_Handler_initialization> _Thread_Handler_initialization( 4e40: e5961008 ldr r1, [r6, #8] 4e44: e5960010 ldr r0, [r6, #16] 4e48: eb00071f bl 6acc <_Thread_Handler_initialization> ); #endif /* MANAGERS */ _RTEMS_API_Initialize( configuration_table ); 4e4c: e1a00006 mov r0, r6 4e50: eb000061 bl 4fdc <_RTEMS_API_Initialize> _Extension_Manager_initialization( configuration_table->maximum_extensions ); 4e54: e5960008 ldr r0, [r6, #8] 4e58: eb000013 bl 4eac <_Extension_Manager_initialization> _IO_Manager_initialization( 4e5c: e596202c ldr r2, [r6, #44] 4e60: e5960034 ldr r0, [r6, #52] 4e64: e5961030 ldr r1, [r6, #48] 4e68: eb000033 bl 4f3c <_IO_Manager_initialization> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 4e6c: e3a03001 mov r3, #1 ; 0x1 4e70: e5873000 str r3, [r7] _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 4e74: e8bd40f0 pop {r4, r5, r6, r7, lr} * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 4e78: ea0005d2 b 65c8 <_Thread_Create_idle> /* * Make sure the parameters were not NULL. */ if ( configuration_table == NULL ) _Internal_error_Occurred( 4e7c: e1a02000 mov r2, r0 <== NOT EXECUTED 4e80: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 4e84: eb0002cb bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED =============================================================================== 000011b0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 11b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 11b4: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); 11b8: e1a0200d mov r2, sp <== NOT EXECUTED 11bc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 11c0: e1a05001 mov r5, r1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); 11c4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 11c8: e1a07000 mov r7, r0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); 11cc: eb000070 bl 1394 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 11d0: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 11d4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 11d8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); 11dc: e1a0800d mov r8, sp <== NOT EXECUTED 11e0: e1a04000 mov r4, r0 <== NOT EXECUTED the_jnode = loc.node_access; 11e4: e59d6000 ldr r6, [sp] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 11e8: 0a000013 beq 123c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 11ec: e1a0000d mov r0, sp <== NOT EXECUTED 11f0: e1a0e00f mov lr, pc <== NOT EXECUTED 11f4: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 11f8: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 11fc: 03540000 cmpeq r4, #0 ; 0x0 <== NOT EXECUTED 1200: 03a04000 moveq r4, #0 ; 0x0 <== NOT EXECUTED 1204: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED 1208: 0a000015 beq 1264 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 120c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1210: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1214: 0a000025 beq 12b0 <== NOT EXECUTED 1218: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 121c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1220: 0a000022 beq 12b0 <== NOT EXECUTED 1224: e1a0000d mov r0, sp <== NOT EXECUTED 1228: e1a0e00f mov lr, pc <== NOT EXECUTED 122c: e12fff13 bx r3 <== NOT EXECUTED 1230: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED rtems_filesystem_freenode( &loc ); #endif return RTEMS_SUCCESSFUL; } 1234: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 1238: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 123c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1240: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1244: 11a0000d movne r0, sp <== NOT EXECUTED 1248: 11a0e00f movne lr, pc <== NOT EXECUTED 124c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1250: eb002858 bl b3b8 <__errno> <== NOT EXECUTED 1254: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1258: e5803000 str r3, [r0] <== NOT EXECUTED 125c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1260: eafffff3 b 1234 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 1264: e5857000 str r7, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 1268: e1a00007 mov r0, r7 <== NOT EXECUTED 126c: eb002d87 bl c890 <== NOT EXECUTED 1270: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 1274: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 1278: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 127c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 1280: e5963054 ldr r3, [r6, #84] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1284: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 1288: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 128c: 0a000009 beq 12b8 <== NOT EXECUTED 1290: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1294: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1298: 0a000006 beq 12b8 <== NOT EXECUTED 129c: e1a0000d mov r0, sp <== NOT EXECUTED 12a0: e1a0e00f mov lr, pc <== NOT EXECUTED 12a4: e12fff13 bx r3 <== NOT EXECUTED 12a8: e1a00004 mov r0, r4 <== NOT EXECUTED 12ac: eaffffe0 b 1234 <== NOT EXECUTED 12b0: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED 12b4: eaffffde b 1234 <== NOT EXECUTED 12b8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12bc: eaffffdc b 1234 <== NOT EXECUTED =============================================================================== 000062dc : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 62dc: e251c000 subs ip, r1, #0 ; 0x0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 62e0: e92d00f0 push {r4, r5, r6, r7} 62e4: e1a06000 mov r6, r0 62e8: e1a07002 mov r7, r2 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 62ec: 0a00003e beq 63ec return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 62f0: e3520000 cmp r2, #0 ; 0x0 62f4: 0a00003c beq 63ec return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 62f8: e59c3000 ldr r3, [ip] 62fc: e3530000 cmp r3, #0 ; 0x0 6300: 0a000036 beq 63e0 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 6304: e3a03000 mov r3, #0 ; 0x0 6308: e5873000 str r3, [r7] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 630c: e59f20e0 ldr r2, [pc, #224] ; 63f4 6310: e5922000 ldr r2, [r2] 6314: e1520006 cmp r2, r6 6318: 93a0000a movls r0, #10 ; 0xa 631c: 9a00002b bls 63d0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 6320: e3560000 cmp r6, #0 ; 0x0 6324: 1a00001d bne 63a0 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 6328: e2526001 subs r6, r2, #1 ; 0x1 632c: 0a000029 beq 63d8 6330: e1a03282 lsl r3, r2, #5 6334: e0433182 sub r3, r3, r2, lsl #3 6338: e59f20b8 ldr r2, [pc, #184] ; 63f8 633c: e5921000 ldr r1, [r2] 6340: e2433018 sub r3, r3, #24 ; 0x18 6344: e0811003 add r1, r1, r3 6348: ea000002 b 6358 634c: e2566001 subs r6, r6, #1 ; 0x1 6350: e2411018 sub r1, r1, #24 ; 0x18 6354: 0a00001f beq 63d8 if ( !_IO_Driver_address_table[major].initialization_entry && 6358: e5913000 ldr r3, [r1] 635c: e3530000 cmp r3, #0 ; 0x0 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 6360: e1a05001 mov r5, r1 if ( !_IO_Driver_address_table[major].initialization_entry && 6364: 1afffff8 bne 634c 6368: e5913004 ldr r3, [r1, #4] 636c: e3530000 cmp r3, #0 ; 0x0 6370: 1afffff5 bne 634c if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 6374: e8bc000f ldm ip!, {r0, r1, r2, r3} 6378: e1a04005 mov r4, r5 637c: e8a4000f stmia r4!, {r0, r1, r2, r3} 6380: e89c0003 ldm ip, {r0, r1} 6384: e8840003 stm r4, {r0, r1} *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 6388: e3a01000 mov r1, #0 ; 0x0 638c: e1a00006 mov r0, r6 6390: e1a02001 mov r2, r1 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 6394: e5876000 str r6, [r7] return rtems_io_initialize( major, 0, NULL ); } 6398: e8bd00f0 pop {r4, r5, r6, r7} _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 639c: eaffff58 b 6104 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 63a0: e59f2050 ldr r2, [pc, #80] ; 63f8 63a4: e1a03286 lsl r3, r6, #5 63a8: e5921000 ldr r1, [r2] 63ac: e0433186 sub r3, r3, r6, lsl #3 63b0: e7912003 ldr r2, [r1, r3] 63b4: e3520000 cmp r2, #0 ; 0x0 63b8: e0815003 add r5, r1, r3 63bc: 1a000002 bne 63cc 63c0: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 63c4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 63c8: 0affffe9 beq 6374 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63cc: e3a0000c mov r0, #12 ; 0xc } 63d0: e8bd00f0 pop {r4, r5, r6, r7} 63d4: e12fff1e bx lr _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63d8: e3a00005 mov r0, #5 ; 0x5 63dc: eafffffb b 63d0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 63e0: e59c3004 ldr r3, [ip, #4] 63e4: e3530000 cmp r3, #0 ; 0x0 63e8: 1affffc5 bne 6304 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63ec: e3a00009 mov r0, #9 ; 0x9 63f0: eafffff6 b 63d0 =============================================================================== 000014e8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 14e8: e92d4010 push {r4, lr} rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 14ec: e59f40b4 ldr r4, [pc, #180] ; 15a8 14f0: e5940000 ldr r0, [r4] 14f4: e3500000 cmp r0, #0 ; 0x0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 14f8: e24dd004 sub sp, sp, #4 ; 0x4 rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 14fc: 0a00001a beq 156c { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1500: e3a01034 mov r1, #52 ; 0x34 1504: eb001e77 bl 8ee8 1508: e59f309c ldr r3, [pc, #156] ; 15ac sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 150c: e3500000 cmp r0, #0 ; 0x0 int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1510: e5830000 str r0, [r3] 1514: e1a02000 mov r2, r0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1518: 0a00001f beq 159c rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 151c: e5941000 ldr r1, [r4] rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1520: e59f3088 ldr r3, [pc, #136] ; 15b0 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 1524: e3510001 cmp r1, #1 ; 0x1 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1528: e5830000 str r0, [r3] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 152c: 0a00000c beq 1564 1530: e2803034 add r3, r0, #52 ; 0x34 1534: e3a02001 mov r2, #1 ; 0x1 iop->data1 = iop + 1; 1538: e2822001 add r2, r2, #1 ; 0x1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 153c: e1520001 cmp r2, r1 iop->data1 = iop + 1; 1540: e503300c str r3, [r3, #-12] 1544: e2833034 add r3, r3, #52 ; 0x34 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 1548: 1afffffa bne 1538 154c: e1a03202 lsl r3, r2, #4 1550: e0433102 sub r3, r3, r2, lsl #2 1554: e0833002 add r3, r3, r2 1558: e1a03103 lsl r3, r3, #2 155c: e2433034 sub r3, r3, #52 ; 0x34 1560: e0802003 add r2, r0, r3 iop->data1 = iop + 1; iop->data1 = NULL; 1564: e3a03000 mov r3, #0 ; 0x0 1568: e5823028 str r3, [r2, #40] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 156c: e59fc040 ldr ip, [pc, #64] ; 15b4 1570: e59f0040 ldr r0, [pc, #64] ; 15b8 1574: e3a01001 mov r1, #1 ; 0x1 1578: e3a02054 mov r2, #84 ; 0x54 157c: e3a03000 mov r3, #0 ; 0x0 1580: e58dc000 str ip, [sp] 1584: eb000bf8 bl 456c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1588: e3500000 cmp r0, #0 ; 0x0 158c: 1a000004 bne 15a4 /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); } 1590: e28dd004 add sp, sp, #4 ; 0x4 1594: e8bd4010 pop {r4, lr} /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 1598: ea001e0b b 8dcc if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 159c: e280001a add r0, r0, #26 ; 0x1a <== NOT EXECUTED 15a0: eb000e51 bl 4eec <== NOT EXECUTED RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 15a4: eb000e50 bl 4eec <== NOT EXECUTED =============================================================================== 00009238 : */ int rtems_libio_is_file_open( void *node_access ) { 9238: e92d4030 push {r4, r5, lr} <== NOT EXECUTED rtems_libio_t *iop; int result=0; int i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 923c: e59f507c ldr r5, [pc, #124] ; 92c0 <== NOT EXECUTED 9240: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 9244: e1a02001 mov r2, r1 <== NOT EXECUTED */ int rtems_libio_is_file_open( void *node_access ) { 9248: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_libio_t *iop; int result=0; int i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 924c: e5950000 ldr r0, [r5] <== NOT EXECUTED 9250: ebffed69 bl 47fc <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 9254: e59f3068 ldr r3, [pc, #104] ; 92c4 <== NOT EXECUTED 9258: e5930000 ldr r0, [r3] <== NOT EXECUTED 925c: e59f3064 ldr r3, [pc, #100] ; 92c8 <== NOT EXECUTED 9260: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 9264: e5932000 ldr r2, [r3] <== NOT EXECUTED 9268: 0a00000a beq 9298 <== NOT EXECUTED 926c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 9270: e592300c ldr r3, [r2, #12] <== NOT EXECUTED 9274: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 9278: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 927c: 0a000002 beq 928c <== NOT EXECUTED /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 9280: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 9284: e1530004 cmp r3, r4 <== NOT EXECUTED 9288: 0a000007 beq 92ac <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 928c: e1510000 cmp r1, r0 <== NOT EXECUTED 9290: e2822034 add r2, r2, #52 ; 0x34 <== NOT EXECUTED 9294: 3afffff5 bcc 9270 <== NOT EXECUTED 9298: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 929c: e5950000 ldr r0, [r5] <== NOT EXECUTED 92a0: ebffed9c bl 4918 <== NOT EXECUTED return result; } 92a4: e1a00004 mov r0, r4 <== NOT EXECUTED 92a8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 92ac: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 92b0: e5950000 ldr r0, [r5] <== NOT EXECUTED 92b4: ebffed97 bl 4918 <== NOT EXECUTED return result; } 92b8: e1a00004 mov r0, r4 <== NOT EXECUTED 92bc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 000092cc : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 92cc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED rtems_libio_t *iop; int result = 0; int i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 92d0: e59f507c ldr r5, [pc, #124] ; 9354 <== NOT EXECUTED 92d4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 92d8: e1a02001 mov r2, r1 <== NOT EXECUTED */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 92dc: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_libio_t *iop; int result = 0; int i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 92e0: e5950000 ldr r0, [r5] <== NOT EXECUTED 92e4: ebffed44 bl 47fc <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 92e8: e59f3068 ldr r3, [pc, #104] ; 9358 <== NOT EXECUTED 92ec: e5930000 ldr r0, [r3] <== NOT EXECUTED 92f0: e59f3064 ldr r3, [pc, #100] ; 935c <== NOT EXECUTED 92f4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 92f8: e5932000 ldr r2, [r3] <== NOT EXECUTED 92fc: 0a00000a beq 932c <== NOT EXECUTED 9300: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 9304: e592300c ldr r3, [r2, #12] <== NOT EXECUTED 9308: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 930c: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 9310: 0a000002 beq 9320 <== NOT EXECUTED /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 9314: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 9318: e1530004 cmp r3, r4 <== NOT EXECUTED 931c: 0a000007 beq 9340 <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 9320: e1510000 cmp r1, r0 <== NOT EXECUTED 9324: e2822034 add r2, r2, #52 ; 0x34 <== NOT EXECUTED 9328: 3afffff5 bcc 9304 <== NOT EXECUTED 932c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 9330: e5950000 ldr r0, [r5] <== NOT EXECUTED 9334: ebffed77 bl 4918 <== NOT EXECUTED return result; } 9338: e1a00004 mov r0, r4 <== NOT EXECUTED 933c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 9340: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 9344: e5950000 ldr r0, [r5] <== NOT EXECUTED 9348: ebffed72 bl 4918 <== NOT EXECUTED return result; } 934c: e1a00004 mov r0, r4 <== NOT EXECUTED 9350: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 000091f8 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 91f8: e2003006 and r3, r0, #6 ; 0x6 <== NOT EXECUTED 91fc: e3530006 cmp r3, #6 ; 0x6 <== NOT EXECUTED */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 9200: e1a02000 mov r2, r0 <== NOT EXECUTED uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 9204: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 9208: 0a000003 beq 921c <== NOT EXECUTED fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 920c: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 9210: 01a03122 lsreq r3, r2, #2 <== NOT EXECUTED 9214: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 9218: 02030001 andeq r0, r3, #1 ; 0x1 <== 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 ) { 921c: e3120001 tst r2, #1 ; 0x1 <== NOT EXECUTED fcntl_flags |= O_NONBLOCK; 9220: 13800901 orrne r0, r0, #16384 ; 0x4000 <== NOT EXECUTED } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 9224: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED fcntl_flags |= O_APPEND; 9228: 13800008 orrne r0, r0, #8 ; 0x8 <== NOT EXECUTED } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 922c: e3120b01 tst r2, #1024 ; 0x400 <== NOT EXECUTED fcntl_flags |= O_CREAT; 9230: 13800c02 orrne r0, r0, #512 ; 0x200 <== NOT EXECUTED } return fcntl_flags; } 9234: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000260c : void rtems_panic( const char *printf_format, ... ) { 260c: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 2610: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 2614: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 2618: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 261c: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED 2620: ebffff83 bl 2434 <== NOT EXECUTED va_end(arglist); } 2624: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 2628: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 262c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000ba60 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { ba60: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) ba64: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { ba68: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) ba6c: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED ba70: 0a000007 beq ba94 <== NOT EXECUTED ba74: e1a01000 mov r1, r0 <== NOT EXECUTED ba78: e1a0200d mov r2, sp <== NOT EXECUTED ba7c: e59f004c ldr r0, [pc, #76] ; bad0 <== NOT EXECUTED ba80: ebfff054 bl 7bd8 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ba84: e59d6000 ldr r6, [sp] <== NOT EXECUTED ba88: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED ba8c: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED ba90: 0a000001 beq ba9c <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ba94: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED ba98: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *statistics = the_period->Statistics; ba9c: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED baa0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED baa4: e1a04005 mov r4, r5 <== NOT EXECUTED baa8: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED baac: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED bab0: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED bab4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED bab8: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED babc: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED bac0: e8840003 stm r4, {r0, r1} <== NOT EXECUTED _Thread_Enable_dispatch(); bac4: ebfff288 bl 84ec <_Thread_Enable_dispatch> <== NOT EXECUTED bac8: e1a00006 mov r0, r6 <== NOT EXECUTED bacc: eafffff0 b ba94 <== NOT EXECUTED =============================================================================== 0000bad4 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { bad4: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) bad8: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { badc: e24dd00c sub sp, sp, #12 ; 0xc Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) bae0: 03a00009 moveq r0, #9 ; 0x9 bae4: 0a000016 beq bb44 bae8: e1a01000 mov r1, r0 baec: e28d2008 add r2, sp, #8 ; 0x8 baf0: e59f0084 ldr r0, [pc, #132] ; bb7c baf4: ebfff037 bl 7bd8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { baf8: e59d3008 ldr r3, [sp, #8] bafc: e3530000 cmp r3, #0 ; 0x0 bb00: e1a06000 mov r6, r0 bb04: 13a00004 movne r0, #4 ; 0x4 bb08: 1a00000d bne bb44 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); bb0c: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED bb10: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED bb14: 01a02003 moveq r2, r3 <== NOT EXECUTED bb18: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED status->state = the_period->state; bb1c: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED if ( status->state == RATE_MONOTONIC_INACTIVE ) { bb20: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); bb24: e885000c stm r5, {r2, r3} <== NOT EXECUTED status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { bb28: 1a000007 bne bb4c <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; bb2c: e5853014 str r3, [r5, #20] <== NOT EXECUTED status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; bb30: e5853008 str r3, [r5, #8] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; bb34: e585300c str r3, [r5, #12] <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; bb38: e5853010 str r3, [r5, #16] <== NOT EXECUTED the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); bb3c: ebfff26a bl 84ec <_Thread_Enable_dispatch> <== NOT EXECUTED bb40: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } bb44: e28dd00c add sp, sp, #12 ; 0xc bb48: e8bd8070 pop {r4, r5, r6, pc} * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); bb4c: e1a0000d mov r0, sp <== NOT EXECUTED bb50: ebffed9a bl 71c0 <_TOD_Get_uptime> <== NOT EXECUTED #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( bb54: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED bb58: e1a0100d mov r1, sp <== NOT EXECUTED bb5c: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED bb60: ebfff6ce bl 96a0 <_Timespec_Subtract> <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( bb64: e1a0100d mov r1, sp <== NOT EXECUTED bb68: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED bb6c: e59f000c ldr r0, [pc, #12] ; bb80 <== NOT EXECUTED * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); bb70: e1a0400d mov r4, sp <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( bb74: ebfff6c9 bl 96a0 <_Timespec_Subtract> <== NOT EXECUTED bb78: eaffffef b bb3c <== NOT EXECUTED =============================================================================== 00005d48 : } } void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 5d48: e59f1004 ldr r1, [pc, #4] ; 5d54 <== NOT EXECUTED 5d4c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5d50: eaffff71 b 5b1c <== NOT EXECUTED =============================================================================== 00005b1c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 5b1c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 5b20: e2516000 subs r6, r1, #0 ; 0x0 <== NOT EXECUTED */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 5b24: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED 5b28: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 5b2c: 0a000042 beq 5c3c <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); 5b30: e59f11e4 ldr r1, [pc, #484] ; 5d1c <== NOT EXECUTED 5b34: e1a0e00f mov lr, pc <== NOT EXECUTED 5b38: e12fff16 bx r6 <== NOT EXECUTED #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 5b3c: e59f11dc ldr r1, [pc, #476] ; 5d20 <== NOT EXECUTED 5b40: e1a00007 mov r0, r7 <== NOT EXECUTED 5b44: e1a0e00f mov lr, pc <== NOT EXECUTED 5b48: e12fff16 bx r6 <== NOT EXECUTED #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 5b4c: e59f11d0 ldr r1, [pc, #464] ; 5d24 <== NOT EXECUTED 5b50: e1a00007 mov r0, r7 <== NOT EXECUTED 5b54: e1a0e00f mov lr, pc <== NOT EXECUTED 5b58: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 5b5c: e59f81c4 ldr r8, [pc, #452] ; 5d28 <== NOT EXECUTED Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 5b60: e59f11c4 ldr r1, [pc, #452] ; 5d2c <== NOT EXECUTED 5b64: e1a00007 mov r0, r7 <== NOT EXECUTED 5b68: e1a0e00f mov lr, pc <== NOT EXECUTED 5b6c: e12fff16 bx r6 <== NOT EXECUTED #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 5b70: e1a00007 mov r0, r7 <== NOT EXECUTED 5b74: e59f11b4 ldr r1, [pc, #436] ; 5d30 <== NOT EXECUTED 5b78: e1a0e00f mov lr, pc <== NOT EXECUTED 5b7c: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 5b80: e5985008 ldr r5, [r8, #8] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 5b84: e598300c ldr r3, [r8, #12] <== NOT EXECUTED 5b88: e1550003 cmp r5, r3 <== NOT EXECUTED 5b8c: 8a00002a bhi 5c3c <== NOT EXECUTED _Timespec_Divide_by_integer( &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 5b90: e59fa19c ldr sl, [pc, #412] ; 5d34 <== NOT EXECUTED 5b94: e28d9010 add r9, sp, #16 ; 0x10 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 5b98: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED 5b9c: ea000003 b 5bb0 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 5ba0: e598300c ldr r3, [r8, #12] <== NOT EXECUTED id++ ) { 5ba4: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 5ba8: e1530005 cmp r3, r5 <== NOT EXECUTED 5bac: 3a000022 bcc 5c3c <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 5bb0: e1a00005 mov r0, r5 <== NOT EXECUTED 5bb4: e1a01009 mov r1, r9 <== NOT EXECUTED 5bb8: eb0017a8 bl ba60 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) 5bbc: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 5bc0: 1afffff6 bne 5ba0 <== NOT EXECUTED continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 5bc4: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED 5bc8: e1a00005 mov r0, r5 <== NOT EXECUTED 5bcc: eb0017c0 bl bad4 <== NOT EXECUTED continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 5bd0: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED 5bd4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 5bd8: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED if ( the_status.owner ) { 5bdc: 1a00004a bne 5d0c <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, 5be0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 5be4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 5be8: e58d3000 str r3, [sp] <== NOT EXECUTED 5bec: e58d2004 str r2, [sp, #4] <== NOT EXECUTED 5bf0: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED 5bf4: e1a02005 mov r2, r5 <== NOT EXECUTED 5bf8: e59f1138 ldr r1, [pc, #312] ; 5d38 <== NOT EXECUTED 5bfc: e1a00007 mov r0, r7 <== NOT EXECUTED 5c00: e1a0e00f mov lr, pc <== NOT EXECUTED 5c04: e12fff16 bx r6 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 5c08: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 5c0c: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 5c10: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED 5c14: e1a0200b mov r2, fp <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 5c18: 1a000009 bne 5c44 <== NOT EXECUTED (*print)( context, "\n" ); 5c1c: e1a00007 mov r0, r7 <== NOT EXECUTED 5c20: e59f1114 ldr r1, [pc, #276] ; 5d3c <== NOT EXECUTED 5c24: e1a0e00f mov lr, pc <== NOT EXECUTED 5c28: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 5c2c: e598300c ldr r3, [r8, #12] <== NOT EXECUTED id++ ) { 5c30: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 5c34: e1530005 cmp r3, r5 <== NOT EXECUTED 5c38: 2affffdc bcs 5bb0 <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 5c3c: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED 5c40: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 5c44: eb000e58 bl 95ac <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 5c48: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED 5c4c: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED 5c50: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 5c54: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED 5c58: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED 5c5c: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED 5c60: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED 5c64: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED 5c68: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED 5c6c: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 5c70: e58d2000 str r2, [sp] <== NOT EXECUTED 5c74: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED 5c78: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED 5c7c: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 5c80: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED 5c84: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED 5c88: e58d000c str r0, [sp, #12] <== NOT EXECUTED 5c8c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 5c90: e59f10a8 ldr r1, [pc, #168] ; 5d40 <== NOT EXECUTED 5c94: e1a00007 mov r0, r7 <== NOT EXECUTED 5c98: e1a0e00f mov lr, pc <== NOT EXECUTED 5c9c: e12fff16 bx r6 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 5ca0: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED 5ca4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 5ca8: e1a0200b mov r2, fp <== NOT EXECUTED 5cac: eb000e3e bl 95ac <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 5cb0: e59d103c ldr r1, [sp, #60] <== NOT EXECUTED 5cb4: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED 5cb8: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 5cbc: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 5cc0: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED 5cc4: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED 5cc8: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED 5ccc: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED 5cd0: e59d2038 ldr r2, [sp, #56] <== NOT EXECUTED 5cd4: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 5cd8: e58d2000 str r2, [sp] <== NOT EXECUTED 5cdc: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED 5ce0: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED 5ce4: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 5ce8: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED 5cec: e58d000c str r0, [sp, #12] <== NOT EXECUTED 5cf0: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED 5cf4: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED 5cf8: e1a00007 mov r0, r7 <== NOT EXECUTED 5cfc: e59f1040 ldr r1, [pc, #64] ; 5d44 <== NOT EXECUTED 5d00: e1a0e00f mov lr, pc <== NOT EXECUTED 5d04: e12fff16 bx r6 <== NOT EXECUTED 5d08: eaffffa4 b 5ba0 <== NOT EXECUTED #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 5d0c: e28d206b add r2, sp, #107 ; 0x6b <== NOT EXECUTED 5d10: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 5d14: eb000070 bl 5edc <== NOT EXECUTED 5d18: eaffffb0 b 5be0 <== NOT EXECUTED =============================================================================== 00005d58 : 5d58: e59f3040 ldr r3, [pc, #64] ; 5da0 <== NOT EXECUTED 5d5c: e5932000 ldr r2, [r3] <== NOT EXECUTED 5d60: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 5d64: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 5d68: e5832000 str r2, [r3] <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 5d6c: e59f5030 ldr r5, [pc, #48] ; 5da4 <== NOT EXECUTED 5d70: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 5d74: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 5d78: e1540003 cmp r4, r3 <== NOT EXECUTED 5d7c: 8a000005 bhi 5d98 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 5d80: e1a00004 mov r0, r4 <== NOT EXECUTED 5d84: eb000007 bl 5da8 <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 5d88: e595300c ldr r3, [r5, #12] <== NOT EXECUTED id++ ) { 5d8c: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 5d90: e1530004 cmp r3, r4 <== NOT EXECUTED 5d94: 2afffff9 bcs 5d80 <== NOT EXECUTED /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 5d98: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 5d9c: ea0009d2 b 84ec <_Thread_Enable_dispatch> <== NOT EXECUTED =============================================================================== 00005da8 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( Objects_Id id ) { 5da8: e92d4010 push {r4, lr} <== NOT EXECUTED 5dac: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 5db0: e1a01000 mov r1, r0 <== NOT EXECUTED 5db4: e1a0200d mov r2, sp <== NOT EXECUTED 5db8: e59f005c ldr r0, [pc, #92] ; 5e1c <== NOT EXECUTED 5dbc: eb000785 bl 7bd8 <_Objects_Get> <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 5dc0: e59d4000 ldr r4, [sp] <== NOT EXECUTED 5dc4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 5dc8: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 5dcc: 1a000010 bne 5e14 <== NOT EXECUTED case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 5dd0: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED 5dd4: e5803078 str r3, [r0, #120] <== NOT EXECUTED 5dd8: e5804054 str r4, [r0, #84] <== NOT EXECUTED 5ddc: e5804058 str r4, [r0, #88] <== NOT EXECUTED 5de0: e5804064 str r4, [r0, #100] <== NOT EXECUTED 5de4: e5804068 str r4, [r0, #104] <== NOT EXECUTED 5de8: e580406c str r4, [r0, #108] <== NOT EXECUTED 5dec: e5804070 str r4, [r0, #112] <== NOT EXECUTED 5df0: e580407c str r4, [r0, #124] <== NOT EXECUTED 5df4: e5804080 str r4, [r0, #128] <== NOT EXECUTED 5df8: e5804084 str r4, [r0, #132] <== NOT EXECUTED 5dfc: e5804088 str r4, [r0, #136] <== NOT EXECUTED 5e00: e580305c str r3, [r0, #92] <== NOT EXECUTED 5e04: e5803060 str r3, [r0, #96] <== NOT EXECUTED 5e08: e5803074 str r3, [r0, #116] <== NOT EXECUTED _Thread_Enable_dispatch(); 5e0c: eb0009b6 bl 84ec <_Thread_Enable_dispatch> <== NOT EXECUTED 5e10: e1a00004 mov r0, r4 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5e14: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 5e18: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 000110cc : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 110cc: e92d41f0 push {r4, r5, r6, r7, r8, lr} Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 110d0: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 110d4: e1a04000 mov r4, r0 110d8: e24dd008 sub sp, sp, #8 ; 0x8 110dc: e1a06002 mov r6, r2 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 110e0: 03a04009 moveq r4, #9 ; 0x9 110e4: 0a000020 beq 1116c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 110e8: e59f80a0 ldr r8, [pc, #160] ; 11190 110ec: e5980000 ldr r0, [r8] 110f0: eb000902 bl 13500 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 110f4: e1a01004 mov r1, r4 110f8: e59f0094 ldr r0, [pc, #148] ; 11194 110fc: e1a0200d mov r2, sp 11100: eb000fcf bl 15044 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 11104: e59d4000 ldr r4, [sp] 11108: e3540000 cmp r4, #0 ; 0x0 1110c: e1a05000 mov r5, r0 11110: 1a000018 bne 11178 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 11114: e1a01007 mov r1, r7 11118: e1a02006 mov r2, r6 1111c: e2800068 add r0, r0, #104 ; 0x68 11120: e28d3004 add r3, sp, #4 ; 0x4 11124: eb000c14 bl 1417c <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 11128: e3500001 cmp r0, #1 ; 0x1 1112c: 03a04009 moveq r4, #9 ; 0x9 11130: 0a00000b beq 11164 11134: 2a000007 bcs 11158 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11138: e59d1004 ldr r1, [sp, #4] 1113c: e5952054 ldr r2, [r5, #84] the_region->maximum_segment_size += amount_extended; 11140: e595305c ldr r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11144: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 11148: e0833001 add r3, r3, r1 1114c: e585305c str r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11150: e5852054 str r2, [r5, #84] 11154: ea000002 b 11164 starting_address, length, &amount_extended ); switch ( heap_status ) { 11158: e3500002 cmp r0, #2 ; 0x2 1115c: 0a000009 beq 11188 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 11160: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11164: e5980000 ldr r0, [r8] 11168: eb000900 bl 13570 <_API_Mutex_Unlock> return return_status; } 1116c: e1a00004 mov r0, r4 11170: e28dd008 add sp, sp, #8 ; 0x8 11174: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 11178: e3540001 cmp r4, #1 ; 0x1 1117c: 03a04004 moveq r4, #4 ; 0x4 11180: 1afffff6 bne 11160 11184: eafffff6 b 11164 switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 11188: e3a04018 mov r4, #24 ; 0x18 1118c: eafffff4 b 11164 =============================================================================== 000114b4 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 114b4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 114b8: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 114bc: e24dd010 sub sp, sp, #16 ; 0x10 114c0: e1a04000 mov r4, r0 114c4: e1a05001 mov r5, r1 114c8: e1a06002 mov r6, r2 uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 114cc: 0a000028 beq 11574 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 114d0: e59f70b4 ldr r7, [pc, #180] ; 1158c 114d4: e5970000 ldr r0, [r7] 114d8: eb000808 bl 13500 <_API_Mutex_Lock> 114dc: e1a01004 mov r1, r4 114e0: e59f00a8 ldr r0, [pc, #168] ; 11590 114e4: e28d2008 add r2, sp, #8 ; 0x8 114e8: eb000ed5 bl 15044 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 114ec: e59d3008 ldr r3, [sp, #8] 114f0: e3530000 cmp r3, #0 ; 0x0 114f4: e1a08000 mov r8, r0 114f8: 0a000007 beq 1151c 114fc: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11500: e5970000 ldr r0, [r7] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 11504: 03a04004 moveq r4, #4 ; 0x4 11508: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1150c: eb000817 bl 13570 <_API_Mutex_Unlock> return return_status; } 11510: e1a00004 mov r0, r4 11514: e28dd010 add sp, sp, #16 ; 0x10 11518: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1151c: e1a01005 mov r1, r5 11520: e28d3004 add r3, sp, #4 ; 0x4 11524: e28dc00c add ip, sp, #12 ; 0xc 11528: e1a02006 mov r2, r6 1152c: e2800068 add r0, r0, #104 ; 0x68 11530: e58dc000 str ip, [sp] 11534: eb000c9b bl 147a8 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11538: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 1153c: e2505000 subs r5, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11540: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 11544: 1a000005 bne 11560 11548: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED 1154c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 11550: 1a000009 bne 1157c <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 11554: e5970000 ldr r0, [r7] <== NOT EXECUTED 11558: eb000804 bl 13570 <_API_Mutex_Unlock> <== NOT EXECUTED 1155c: eaffffeb b 11510 <== NOT EXECUTED 11560: e5970000 ldr r0, [r7] 11564: eb000801 bl 13570 <_API_Mutex_Unlock> return 11568: e3550001 cmp r5, #1 ; 0x1 1156c: 03a0400d moveq r4, #13 ; 0xd 11570: 0affffe6 beq 11510 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 11574: e3a04009 mov r4, #9 ; 0x9 11578: eaffffe4 b 11510 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 1157c: e1a00008 mov r0, r8 <== NOT EXECUTED 11580: eb001f16 bl 191e0 <_Region_Process_queue> <== NOT EXECUTED 11584: e1a04005 mov r4, r5 <== NOT EXECUTED 11588: eaffffe0 b 11510 <== NOT EXECUTED =============================================================================== 0000456c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 456c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 4570: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 4574: e24dd018 sub sp, sp, #24 ; 0x18 4578: e1a06001 mov r6, r1 457c: e1a04002 mov r4, r2 4580: e1a08003 mov r8, r3 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 4584: 02800003 addeq r0, r0, #3 ; 0x3 4588: 0a000037 beq 466c return RTEMS_INVALID_NAME; if ( !id ) 458c: e59d3038 ldr r3, [sp, #56] 4590: e3530000 cmp r3, #0 ; 0x0 4594: 03a00009 moveq r0, #9 ; 0x9 4598: 0a000033 beq 466c return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 459c: e21230c0 ands r3, r2, #192 ; 0xc0 45a0: 02025030 andeq r5, r2, #48 ; 0x30 45a4: 1a000032 bne 4674 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45a8: e3550000 cmp r5, #0 ; 0x0 45ac: 0a000002 beq 45bc 45b0: e3560001 cmp r6, #1 ; 0x1 45b4: 83a0000a movhi r0, #10 ; 0xa 45b8: 8a00002b bhi 466c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45bc: e59f218c ldr r2, [pc, #396] ; 4750 45c0: e5923000 ldr r3, [r2] 45c4: e2833001 add r3, r3, #1 ; 0x1 45c8: e5823000 str r3, [r2] * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 45cc: e59f9180 ldr r9, [pc, #384] ; 4754 45d0: e1a00009 mov r0, r9 45d4: eb000511 bl 5a20 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45d8: e2507000 subs r7, r0, #0 ; 0x0 45dc: 0a000048 beq 4704 * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 45e0: e3550000 cmp r5, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45e4: e5874010 str r4, [r7, #16] * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 45e8: 0a00002e beq 46a8 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 45ec: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45f0: 13a03002 movne r3, #2 ; 0x2 45f4: 158d3008 strne r3, [sp, #8] */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 45f8: 1a000007 bne 461c the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 45fc: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 4600: 13a03003 movne r3, #3 ; 0x3 4604: 158d3008 strne r3, [sp, #8] if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4608: 1a000003 bne 461c the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 460c: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 4610: 13a03001 movne r3, #1 ; 0x1 4614: 158d3008 strne r3, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 4618: 058d3008 streq r3, [sp, #8] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 461c: e3550010 cmp r5, #16 ; 0x10 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 4620: 13a03002 movne r3, #2 ; 0x2 the_mutex_attributes.only_owner_release = FALSE; 4624: 13a02000 movne r2, #0 ; 0x0 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 4628: 158d3000 strne r3, [sp] the_mutex_attributes.only_owner_release = FALSE; 462c: 15cd2004 strbne r2, [sp, #4] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 4630: 0a000036 beq 4710 the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 4634: e3560001 cmp r6, #1 ; 0x1 4638: 13a02000 movne r2, #0 ; 0x0 463c: 03a02001 moveq r2, #1 ; 0x1 4640: e2870014 add r0, r7, #20 ; 0x14 4644: e1a0100d mov r1, sp } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 4648: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 464c: eb000308 bl 5274 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 4650: e3500006 cmp r0, #6 ; 0x6 4654: 1a000020 bne 46dc */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 4658: e59f00f4 ldr r0, [pc, #244] ; 4754 <== NOT EXECUTED 465c: e1a01007 mov r1, r7 <== NOT EXECUTED 4660: eb0005db bl 5dd4 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 4664: eb000879 bl 6850 <_Thread_Enable_dispatch> <== NOT EXECUTED 4668: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 466c: e28dd018 add sp, sp, #24 ; 0x18 4670: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 4674: e2025030 and r5, r2, #48 ; 0x30 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4678: e3550010 cmp r5, #16 ; 0x10 467c: 0a000003 beq 4690 4680: e3550020 cmp r5, #32 ; 0x20 4684: 0a000001 beq 4690 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4688: e3a0000b mov r0, #11 ; 0xb 468c: eafffff6 b 466c #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4690: e3140004 tst r4, #4 ; 0x4 4694: 0afffffb beq 4688 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4698: e35300c0 cmp r3, #192 ; 0xc0 469c: 1affffc1 bne 45a8 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 46a0: e3a0000b mov r0, #11 ; 0xb 46a4: eafffff0 b 466c _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 46a8: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 46ac: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46b0: e3a0c000 mov ip, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 46b4: 158d3014 strne r3, [sp, #20] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 46b8: e1a02006 mov r2, r6 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 46bc: e3e03000 mvn r3, #0 ; 0x0 */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 46c0: e2870014 add r0, r7, #20 ; 0x14 46c4: e28d1010 add r1, sp, #16 ; 0x10 } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; else the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 46c8: 058d5014 streq r5, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 46cc: e58d3010 str r3, [sp, #16] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 46d0: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46d4: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 46d8: eb0003b9 bl 55c4 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46dc: e5971008 ldr r1, [r7, #8] 46e0: e599201c ldr r2, [r9, #28] 46e4: e1a03801 lsl r3, r1, #16 46e8: e7827723 str r7, [r2, r3, lsr #14] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 46ec: e59d3038 ldr r3, [sp, #56] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46f0: e587a00c str sl, [r7, #12] 46f4: e5831000 str r1, [r3] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 46f8: eb000854 bl 6850 <_Thread_Enable_dispatch> 46fc: e3a00000 mov r0, #0 ; 0x0 4700: eaffffd9 b 466c _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 4704: eb000851 bl 6850 <_Thread_Enable_dispatch> 4708: e3a00005 mov r0, #5 ; 0x5 470c: eaffffd6 b 466c if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 4710: e59d2008 ldr r2, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4714: e3a03000 mov r3, #0 ; 0x0 4718: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 471c: e3520003 cmp r2, #3 ; 0x3 4720: 979ff102 ldrls pc, [pc, r2, lsl #2] 4724: eaffffc2 b 4634 <== NOT EXECUTED 4728: 00004744 .word 0x00004744 <== NOT EXECUTED 472c: 00004744 .word 0x00004744 <== NOT EXECUTED 4730: 00004738 .word 0x00004738 <== NOT EXECUTED 4734: 00004738 .word 0x00004738 <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 4738: e3a03001 mov r3, #1 ; 0x1 473c: e5cd3004 strb r3, [sp, #4] 4740: eaffffbb b 4634 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 4744: e3a03000 mov r3, #0 ; 0x0 4748: e5cd3004 strb r3, [sp, #4] 474c: eaffffb8 b 4634 =============================================================================== 000118bc : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 118bc: e52de004 push {lr} ; (str lr, [sp, #-4]!) 118c0: e24dd004 sub sp, sp, #4 ; 0x4 118c4: e1a01000 mov r1, r0 RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 118c8: e1a0200d mov r2, sp 118cc: e59f004c ldr r0, [pc, #76] ; 11920 118d0: eb000dec bl 15088 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 118d4: e59d1000 ldr r1, [sp] 118d8: e3510000 cmp r1, #0 ; 0x0 118dc: 13a00004 movne r0, #4 ; 0x4 118e0: 1a000008 bne 11908 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 118e4: e5903010 ldr r3, [r0, #16] 118e8: e2133030 ands r3, r3, #48 ; 0x30 118ec: 1a000007 bne 11910 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 118f0: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 118f4: e1a01003 mov r1, r3 <== NOT EXECUTED 118f8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 118fc: eb00093d bl 13df8 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 11900: eb001025 bl 1599c <_Thread_Enable_dispatch> 11904: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11908: e28dd004 add sp, sp, #4 ; 0x4 1190c: e8bd8000 pop {pc} the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 11910: e2800014 add r0, r0, #20 ; 0x14 11914: e3a02001 mov r2, #1 ; 0x1 11918: eb000862 bl 13aa8 <_CORE_mutex_Flush> 1191c: eafffff7 b 11900 =============================================================================== 00013cc4 : */ void rtems_shutdown_executive( uint32_t result ) { 13cc4: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 13cc8: e59f2028 ldr r2, [pc, #40] ; 13cf8 13ccc: e5923000 ldr r3, [r2] 13cd0: e3530004 cmp r3, #4 ; 0x4 */ void rtems_shutdown_executive( uint32_t result ) { 13cd4: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 13cd8: 0a000004 beq 13cf0 13cdc: e3a03004 mov r3, #4 ; 0x4 Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 13ce0: e1a0000d mov r0, sp 13ce4: e59f1010 ldr r1, [pc, #16] ; 13cfc 13ce8: e5823000 str r3, [r2] 13cec: ebffd04f bl 7e30 <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 13cf0: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 13cf4: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00001d34 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 1d34: e1a0c00d mov ip, sp <== NOT EXECUTED 1d38: e92dd830 push {r4, r5, fp, ip, lr, pc} <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 1d3c: e59f407c ldr r4, [pc, #124] ; 1dc0 <== NOT EXECUTED 1d40: e5943000 ldr r3, [r4] <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 1d44: e59300c8 ldr r0, [r3, #200] <== NOT EXECUTED /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 1d48: e24cb004 sub fp, ip, #4 ; 0x4 <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 1d4c: e15b0000 cmp fp, r0 <== NOT EXECUTED 1d50: 33a05000 movcc r5, #0 ; 0x0 <== NOT EXECUTED 1d54: 3a000004 bcc 1d6c <== NOT EXECUTED 1d58: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 1d5c: e0803003 add r3, r0, r3 <== NOT EXECUTED 1d60: e15b0003 cmp fp, r3 <== NOT EXECUTED 1d64: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED 1d68: 93a05001 movls r5, #1 ; 0x1 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 1d6c: e59f3050 ldr r3, [pc, #80] ; 1dc4 <== NOT EXECUTED 1d70: e5932000 ldr r2, [r3] <== NOT EXECUTED 1d74: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1d78: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED 1d7c: 1a000008 bne 1da4 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 1d80: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 1d84: 0a000002 beq 1d94 <== NOT EXECUTED 1d88: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 1d8c: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 1d90: 189da830 ldmne sp, {r4, r5, fp, sp, pc} <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 1d94: e5940000 ldr r0, [r4] <== NOT EXECUTED 1d98: ebffffc9 bl 1cc4 <== NOT EXECUTED 1d9c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return true; } 1da0: e89da830 ldm sp, {r4, r5, fp, sp, pc} <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 1da4: e59f101c ldr r1, [pc, #28] ; 1dc8 <== NOT EXECUTED 1da8: e2800008 add r0, r0, #8 ; 0x8 <== NOT EXECUTED 1dac: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 1db0: eb002cb3 bl d084 <== NOT EXECUTED 1db4: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED 1db8: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED 1dbc: eaffffef b 1d80 <== NOT EXECUTED =============================================================================== 00001cb4 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 1cb4: e59f1004 ldr r1, [pc, #4] ; 1cc0 <== NOT EXECUTED 1cb8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1cbc: eaffffe1 b 1c48 <== NOT EXECUTED =============================================================================== 00001c48 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 1c48: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED print_context = context; 1c4c: e59f704c ldr r7, [pc, #76] ; 1ca0 <== NOT EXECUTED print_handler = print; 1c50: e59f604c ldr r6, [pc, #76] ; 1ca4 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 1c54: e1a04001 mov r4, r1 <== NOT EXECUTED 1c58: e1a05000 mov r5, r0 <== NOT EXECUTED print_context = context; print_handler = print; 1c5c: e5861000 str r1, [r6] <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 1c60: e5870000 str r0, [r7] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 1c64: e59f103c ldr r1, [pc, #60] ; 1ca8 <== NOT EXECUTED 1c68: e1a0e00f mov lr, pc <== NOT EXECUTED 1c6c: e12fff14 bx r4 <== NOT EXECUTED (*print)( context, 1c70: e59f1034 ldr r1, [pc, #52] ; 1cac <== NOT EXECUTED 1c74: e1a00005 mov r0, r5 <== NOT EXECUTED 1c78: e1a0e00f mov lr, pc <== NOT EXECUTED 1c7c: e12fff14 bx r4 <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 1c80: e59f0028 ldr r0, [pc, #40] ; 1cb0 <== NOT EXECUTED 1c84: eb001401 bl 6c90 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 1c88: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1c8c: ebffff93 bl 1ae0 <== NOT EXECUTED print_context = NULL; 1c90: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED print_handler = NULL; 1c94: e5863000 str r3, [r6] <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 1c98: e5873000 str r3, [r7] <== NOT EXECUTED print_handler = NULL; } 1c9c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00001dcc : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 1dcc: e1a0c00d mov ip, sp 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; 1dd0: e59020c8 ldr r2, [r0, #200] */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 1dd4: e92dd810 push {r4, fp, ip, lr, pc} 1dd8: e24cb004 sub fp, ip, #4 ; 0x4 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 1ddc: e15b0002 cmp fp, r2 */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 1de0: e1a04000 mov r4, r0 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 1de4: e2820008 add r0, r2, #8 ; 0x8 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 1de8: 3a000003 bcc 1dfc return false; } if ( sp > (the_stack->area + the_stack->size) ) { 1dec: e59430c4 ldr r3, [r4, #196] 1df0: e0823003 add r3, r2, r3 1df4: e15b0003 cmp fp, r3 1df8: 9a000007 bls 1e1c /* * 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, 1dfc: e59f1034 ldr r1, [pc, #52] ; 1e38 <== NOT EXECUTED 1e00: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 1e04: eb002c9e bl d084 <== NOT EXECUTED 1e08: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED 1e0c: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 1e10: e1a00004 mov r0, r4 } } 1e14: e89d6810 ldm sp, {r4, fp, sp, lr} pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 1e18: eaffffa9 b 1cc4 /* * 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, 1e1c: e59f1014 ldr r1, [pc, #20] ; 1e38 1e20: e3a02010 mov r2, #16 ; 0x10 1e24: eb002c96 bl d084 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 1e28: e3500000 cmp r0, #0 ; 0x0 1e2c: 13a01000 movne r1, #0 ; 0x0 1e30: 1afffff6 bne 1e10 1e34: e89da810 ldm sp, {r4, fp, sp, pc} =============================================================================== 000021e0 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 21e0: e59f3018 ldr r3, [pc, #24] ; 2200 <== NOT EXECUTED 21e4: e5830000 str r0, [r3] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 21e8: e59f0014 ldr r0, [pc, #20] ; 2204 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 21ec: e59f3014 ldr r3, [pc, #20] ; 2208 <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; 21f0: e5801000 str r1, [r0] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 21f4: e5832000 str r2, [r3] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 21f8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 21fc: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00003800 : } } rtems_status_code rtems_termios_close (void *arg) { 3800: e92d4070 push {r4, r5, r6, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3804: e59f6188 ldr r6, [pc, #392] ; 3994 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3808: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 380c: e3a01000 mov r1, #0 ; 0x0 } } rtems_status_code rtems_termios_close (void *arg) { 3810: 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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3814: e1a02001 mov r2, r1 3818: e5960000 ldr r0, [r6] rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 381c: e5934028 ldr r4, [r3, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3820: eb0003f5 bl 47fc if (sc != RTEMS_SUCCESSFUL) 3824: e3500000 cmp r0, #0 ; 0x0 3828: 1a000046 bne 3948 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 382c: e5943008 ldr r3, [r4, #8] 3830: e2433001 sub r3, r3, #1 ; 0x1 3834: e3530000 cmp r3, #0 ; 0x0 3838: e5843008 str r3, [r4, #8] 383c: 1a000030 bne 3904 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3840: e59430cc ldr r3, [r4, #204] 3844: e59f214c ldr r2, [pc, #332] ; 3998 3848: e1a03183 lsl r3, r3, #3 384c: e2833001 add r3, r3, #1 ; 0x1 3850: e7923103 ldr r3, [r2, r3, lsl #2] 3854: e3530000 cmp r3, #0 ; 0x0 3858: 0a00003b beq 394c /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 385c: e1a00004 mov r0, r4 <== NOT EXECUTED 3860: e1a0e00f mov lr, pc <== NOT EXECUTED 3864: e12fff13 bx r3 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 3868: e59430b4 ldr r3, [r4, #180] 386c: e3530002 cmp r3, #2 ; 0x2 3870: 0a00002a beq 3920 tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 3874: e594309c ldr r3, [r4, #156] 3878: e3530000 cmp r3, #0 ; 0x0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 387c: 11a02005 movne r2, r5 3880: 1284000c addne r0, r4, #12 ; 0xc 3884: 18900003 ldmne r0, {r0, r1} 3888: 11a0e00f movne lr, pc 388c: 112fff13 bxne r3 if (tty->forw == NULL) { 3890: e5941000 ldr r1, [r4] 3894: e3510000 cmp r1, #0 ; 0x0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 3898: 15943004 ldrne r3, [r4, #4] 389c: 15813004 strne r3, [r1, #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) { 38a0: 0a00002c beq 3958 } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 38a4: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 38a8: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 38ac: 15821000 strne r1, [r2] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 38b0: 0a000032 beq 3980 <== NOT EXECUTED } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 38b4: e5940014 ldr r0, [r4, #20] 38b8: eb0003a6 bl 4758 rtems_semaphore_delete (tty->osem); 38bc: e5940018 ldr r0, [r4, #24] 38c0: eb0003a4 bl 4758 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 38c4: e594008c ldr r0, [r4, #140] 38c8: eb0003a2 bl 4758 if ((tty->device.pollRead == NULL) || 38cc: e59430a0 ldr r3, [r4, #160] 38d0: e3530000 cmp r3, #0 ; 0x0 38d4: 0a00000e beq 3914 38d8: e59430b4 ldr r3, [r4, #180] 38dc: e3530002 cmp r3, #2 ; 0x2 38e0: 0a00000b beq 3914 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 38e4: e5940058 ldr r0, [r4, #88] 38e8: eb0015bd bl 8fe4 free (tty->rawOutBuf.theBuf); 38ec: e594007c ldr r0, [r4, #124] 38f0: eb0015bb bl 8fe4 free (tty->cbuf); 38f4: e594001c ldr r0, [r4, #28] 38f8: eb0015b9 bl 8fe4 free (tty); 38fc: e1a00004 mov r0, r4 3900: eb0015b7 bl 8fe4 } rtems_semaphore_release (rtems_termios_ttyMutex); 3904: e5960000 ldr r0, [r6] 3908: eb000402 bl 4918 return RTEMS_SUCCESSFUL; } 390c: e3a00000 mov r0, #0 ; 0x0 3910: e8bd8070 pop {r4, r5, r6, pc} rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3914: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED 3918: eb00038e bl 4758 <== NOT EXECUTED 391c: eafffff0 b 38e4 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 3920: e59400c4 ldr r0, [r4, #196] <== NOT EXECUTED 3924: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3928: eb000275 bl 4304 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 392c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3930: 1a000004 bne 3948 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 3934: e59400c8 ldr r0, [r4, #200] <== NOT EXECUTED 3938: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 393c: eb000270 bl 4304 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3940: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3944: 0affffca beq 3874 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3948: eb000567 bl 4eec <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 394c: e1a00004 mov r0, r4 3950: ebfffd89 bl 2f7c 3954: eaffffc3 b 3868 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; 3958: e5942004 ldr r2, [r4, #4] 395c: e59f3038 ldr r3, [pc, #56] ; 399c if ( rtems_termios_ttyTail != NULL ) { 3960: e3520000 cmp r2, #0 ; 0x0 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; 3964: e5832000 str r2, [r3] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 3968: 15821000 strne r1, [r2] 396c: 15941000 ldrne r1, [r4] } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { 3970: 1affffcb bne 38a4 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3974: e59f3024 ldr r3, [pc, #36] ; 39a0 3978: e5832000 str r2, [r3] 397c: eaffffcc b 38b4 3980: e59f3018 ldr r3, [pc, #24] ; 39a0 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { 3984: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3988: e5831000 str r1, [r3] <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 398c: 15812004 strne r2, [r1, #4] <== NOT EXECUTED 3990: eaffffc7 b 38b4 <== NOT EXECUTED =============================================================================== 00002428 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2428: e5903090 ldr r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 242c: e590c0b4 ldr ip, [r0, #180] <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2430: e0833001 add r3, r3, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2434: e35c0002 cmp ip, #2 ; 0x2 <== NOT EXECUTED * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 2438: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 243c: e5803090 str r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2440: 0a00000b beq 2474 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 2444: e59030cc ldr r3, [r0, #204] <== NOT EXECUTED 2448: e3530005 cmp r3, #5 ; 0x5 <== NOT EXECUTED 244c: 1a000006 bne 246c <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2450: e59f3034 ldr r3, [pc, #52] ; 248c <== NOT EXECUTED 2454: e59330b4 ldr r3, [r3, #180] <== NOT EXECUTED 2458: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 245c: 11a0e00f movne lr, pc <== NOT EXECUTED 2460: 112fff13 bxne r3 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 2464: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2468: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 246c: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 2470: eaffff68 b 2218 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 2474: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 2478: e1a0100c mov r1, ip <== NOT EXECUTED 247c: eb0007a0 bl 4304 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 2480: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2484: 0afffff6 beq 2464 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2488: eb000a97 bl 4eec <== NOT EXECUTED =============================================================================== 00002490 : 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) { 2490: e59030cc ldr r3, [r0, #204] <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 2494: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 2498: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED 249c: e59f62f4 ldr r6, [pc, #756] ; 2798 <== NOT EXECUTED 24a0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 24a4: e7963203 ldr r3, [r6, r3, lsl #4] <== NOT EXECUTED 24a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 24ac: e24dd00c sub sp, sp, #12 ; 0xc <== NOT EXECUTED 24b0: e1a05000 mov r5, r0 <== NOT EXECUTED 24b4: e1a08001 mov r8, r1 <== NOT EXECUTED 24b8: e1a07002 mov r7, r2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 24bc: 0a000020 beq 2544 <== NOT EXECUTED while (len--) { 24c0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 24c4: 0a00000c beq 24fc <== NOT EXECUTED 24c8: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 24cc: ea000003 b 24e0 <== NOT EXECUTED 24d0: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 24d4: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED 24d8: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 24dc: e7963203 ldr r3, [r6, r3, lsl #4] <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 24e0: e7d80004 ldrb r0, [r8, r4] <== NOT EXECUTED 24e4: e1a01005 mov r1, r5 <== NOT EXECUTED 24e8: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED 24ec: e1a0e00f mov lr, pc <== NOT EXECUTED 24f0: e12fff13 bx r3 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 24f4: e1540007 cmp r4, r7 <== NOT EXECUTED 24f8: 1afffff4 bne 24d0 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 24fc: e59540e4 ldr r4, [r5, #228] <== NOT EXECUTED 2500: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 2504: 1a00000a bne 2534 <== NOT EXECUTED 2508: e59530dc ldr r3, [r5, #220] <== NOT EXECUTED 250c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2510: 0a000007 beq 2534 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2514: e2850030 add r0, r5, #48 ; 0x30 <== NOT EXECUTED 2518: e59510e0 ldr r1, [r5, #224] <== NOT EXECUTED 251c: e1a0e00f mov lr, pc <== NOT EXECUTED 2520: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 2524: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 2528: e58530e4 str r3, [r5, #228] <== NOT EXECUTED 252c: e1a09004 mov r9, r4 <== NOT EXECUTED 2530: ea000000 b 2538 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2534: e3a09000 mov r9, #0 ; 0x0 <== NOT EXECUTED } 2538: e1a00009 mov r0, r9 <== NOT EXECUTED 253c: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 2540: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2544: e1a09003 mov r9, r3 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 2548: e280204a add r2, r0, #74 ; 0x4a <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 254c: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2550: e2577001 subs r7, r7, #1 ; 0x1 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 2554: e58d2000 str r2, [sp] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2558: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 255c: e1a0b009 mov fp, r9 <== NOT EXECUTED 2560: e1a0a009 mov sl, r9 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2564: 3a000049 bcc 2690 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 2568: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 256c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 2570: e7d8600a ldrb r6, [r8, sl] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 2574: 0a000008 beq 259c <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 2578: e5d5204a ldrb r2, [r5, #74] <== NOT EXECUTED 257c: e1520006 cmp r2, r6 <== NOT EXECUTED 2580: 0a000048 beq 26a8 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 2584: e5d53049 ldrb r3, [r5, #73] <== NOT EXECUTED 2588: e1530006 cmp r3, r6 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 258c: 059530b8 ldreq r3, [r5, #184] <== NOT EXECUTED 2590: 03c33010 biceq r3, r3, #16 ; 0x10 <== NOT EXECUTED 2594: 058530b8 streq r3, [r5, #184] <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 2598: 0a00004a beq 26c8 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 259c: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED 25a0: 1a000048 bne 26c8 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 25a4: e5950060 ldr r0, [r5, #96] <== NOT EXECUTED 25a8: e5951064 ldr r1, [r5, #100] <== NOT EXECUTED 25ac: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 25b0: eb003eef bl 12174 <__umodsi3> <== NOT EXECUTED 25b4: e1a04000 mov r4, r0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 25b8: e10f2000 mrs r2, CPSR <== NOT EXECUTED 25bc: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 25c0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 25c4: e58d2004 str r2, [sp, #4] <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 25c8: e595305c ldr r3, [r5, #92] <== NOT EXECUTED 25cc: e5950064 ldr r0, [r5, #100] <== NOT EXECUTED 25d0: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 25d4: e5951064 ldr r1, [r5, #100] <== NOT EXECUTED 25d8: e0800004 add r0, r0, r4 <== NOT EXECUTED 25dc: eb003ee4 bl 12174 <__umodsi3> <== NOT EXECUTED 25e0: e59530c0 ldr r3, [r5, #192] <== NOT EXECUTED 25e4: e1500003 cmp r0, r3 <== NOT EXECUTED 25e8: 9a000010 bls 2630 <== NOT EXECUTED 25ec: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 25f0: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 25f4: 1a00000d bne 2630 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 25f8: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 25fc: e3822001 orr r2, r2, #1 ; 0x1 <== NOT EXECUTED 2600: e58520b8 str r2, [r5, #184] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 2604: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 2608: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 260c: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED 2610: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 2614: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 2618: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 261c: 0a000044 beq 2734 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 2620: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 2624: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2628: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 262c: 0a00004f beq 2770 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 2630: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 2634: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 2638: e595305c ldr r3, [r5, #92] <== NOT EXECUTED 263c: e1530004 cmp r3, r4 <== NOT EXECUTED dropped++; 2640: 02899001 addeq r9, r9, #1 ; 0x1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2644: 0a00000e beq 2684 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2648: e5953058 ldr r3, [r5, #88] <== NOT EXECUTED 264c: e7c36004 strb r6, [r3, r4] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2650: e59520e4 ldr r2, [r5, #228] <== NOT EXECUTED 2654: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2658: e5854060 str r4, [r5, #96] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 265c: 1a000008 bne 2684 <== NOT EXECUTED 2660: e59530dc ldr r3, [r5, #220] <== NOT EXECUTED 2664: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2668: 0a000005 beq 2684 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 266c: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 2670: e59510e0 ldr r1, [r5, #224] <== NOT EXECUTED 2674: e1a0e00f mov lr, pc <== NOT EXECUTED 2678: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 267c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2680: e58520e4 str r2, [r5, #228] <== NOT EXECUTED 2684: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2688: e2577001 subs r7, r7, #1 ; 0x1 <== NOT EXECUTED 268c: 2affffb5 bcs 2568 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 2690: e5953078 ldr r3, [r5, #120] <== NOT EXECUTED 2694: e0833009 add r3, r3, r9 <== NOT EXECUTED 2698: e5853078 str r3, [r5, #120] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 269c: e5950068 ldr r0, [r5, #104] <== NOT EXECUTED 26a0: eb00089c bl 4918 <== NOT EXECUTED 26a4: eaffffa3 b 2538 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 26a8: e5d53049 ldrb r3, [r5, #73] <== NOT EXECUTED 26ac: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 26b0: 059530b8 ldreq r3, [r5, #184] <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 26b4: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 26b8: 02233010 eoreq r3, r3, #16 ; 0x10 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 26bc: 13833010 orrne r3, r3, #16 ; 0x10 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 26c0: 058530b8 streq r3, [r5, #184] <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 26c4: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 26c8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 26cc: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 26d0: e3530020 cmp r3, #32 ; 0x20 <== NOT EXECUTED 26d4: 0a000002 beq 26e4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 26d8: e3a0b001 mov fp, #1 ; 0x1 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 26dc: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED 26e0: eaffffe8 b 2688 <== NOT EXECUTED } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); 26e4: e10f4000 mrs r4, CPSR <== NOT EXECUTED 26e8: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED 26ec: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 26f0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 26f4: e5952094 ldr r2, [r5, #148] <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 26f8: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 26fc: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2700: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2704: 1a000002 bne 2714 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 2708: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 270c: e3a0b001 mov fp, #1 ; 0x1 <== NOT EXECUTED 2710: eafffff1 b 26dc <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 2714: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED 2718: e595107c ldr r1, [r5, #124] <== NOT EXECUTED 271c: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 2720: e0811003 add r1, r1, r3 <== NOT EXECUTED 2724: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2728: e1a0e00f mov lr, pc <== NOT EXECUTED 272c: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 2730: eafffff4 b 2708 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 2734: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 2738: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 273c: 1a000002 bne 274c <== NOT EXECUTED 2740: e5953094 ldr r3, [r5, #148] <== NOT EXECUTED 2744: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2748: 1affffb8 bne 2630 <== 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; 274c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 2750: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 2754: e58530b8 str r3, [r5, #184] <== NOT EXECUTED (*tty->device.write)(tty->minor, 2758: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 275c: e59d1000 ldr r1, [sp] <== NOT EXECUTED 2760: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2764: e1a0e00f mov lr, pc <== NOT EXECUTED 2768: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 276c: eaffffaf b 2630 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2770: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2774: e59520ac ldr r2, [r5, #172] <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2778: e3833004 orr r3, r3, #4 ; 0x4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 277c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2780: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2784: 0affffa9 beq 2630 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 2788: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 278c: e1a0e00f mov lr, pc <== NOT EXECUTED 2790: e12fff12 bx r2 <== NOT EXECUTED 2794: eaffffa5 b 2630 <== NOT EXECUTED =============================================================================== 00002198 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 2198: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 219c: e59fc034 ldr ip, [pc, #52] ; 21d8 21a0: e59c3000 ldr r3, [ip] 21a4: e3530000 cmp r3, #0 ; 0x0 struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 21a8: e24dd004 sub sp, sp, #4 ; 0x4 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 21ac: 0a000001 beq 21b8 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 21b0: e28dd004 add sp, sp, #4 ; 0x4 21b4: e8bd8000 pop {pc} /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 21b8: e59f001c ldr r0, [pc, #28] ; 21dc 21bc: e3a01001 mov r1, #1 ; 0x1 21c0: e3a02054 mov r2, #84 ; 0x54 21c4: e58dc000 str ip, [sp] 21c8: eb0008e7 bl 456c rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 21cc: e3500000 cmp r0, #0 ; 0x0 21d0: 0afffff6 beq 21b0 rtems_fatal_error_occurred (sc); 21d4: eb000b44 bl 4eec <== NOT EXECUTED =============================================================================== 00003404 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 3404: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3408: e5903000 ldr r3, [r0] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 340c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3410: e5935028 ldr r5, [r3, #40] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3414: e580100c str r1, [r0, #12] <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 3418: e1a06000 mov r6, r0 <== NOT EXECUTED 341c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 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); 3420: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 3424: e1a02001 mov r2, r1 <== NOT EXECUTED 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; 3428: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 342c: eb0004f2 bl 47fc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 3430: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED 3434: 1a00000a bne 3464 <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 3438: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED 343c: e3520004 cmp r2, #4 ; 0x4 <== NOT EXECUTED 3440: 0a000021 beq 34cc <== NOT EXECUTED 3444: 8a00000a bhi 3474 <== NOT EXECUTED 3448: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 344c: 0a000064 beq 35e4 <== NOT EXECUTED 3450: 9a00004b bls 3584 <== NOT EXECUTED if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 3454: e1a00005 mov r0, r5 <== NOT EXECUTED 3458: ebfffec7 bl 2f7c <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 345c: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 3460: eb00052c bl 4918 <== NOT EXECUTED args->ioctl_return = sc; 3464: e586700c str r7, [r6, #12] <== NOT EXECUTED return sc; } 3468: e1a00007 mov r0, r7 <== NOT EXECUTED 346c: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 3470: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3474: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED 3478: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED 347c: e283313d add r3, r3, #1073741839 ; 0x4000000f <== NOT EXECUTED 3480: e1520003 cmp r2, r3 <== NOT EXECUTED 3484: 0a00004a beq 35b4 <== NOT EXECUTED 3488: 8a000017 bhi 34ec <== NOT EXECUTED 348c: e3520005 cmp r2, #5 ; 0x5 <== NOT EXECUTED 3490: 0a000011 beq 34dc <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3494: e59520cc ldr r2, [r5, #204] <== NOT EXECUTED 3498: e59f3358 ldr r3, [pc, #856] ; 37f8 <== NOT EXECUTED 349c: e1a02282 lsl r2, r2, #5 <== NOT EXECUTED 34a0: e0833002 add r3, r3, r2 <== NOT EXECUTED 34a4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 34a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 34ac: 03a0700a moveq r7, #10 ; 0xa <== NOT EXECUTED 34b0: 0affffe9 beq 345c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 34b4: e1a00005 mov r0, r5 <== NOT EXECUTED 34b8: e1a01006 mov r1, r6 <== NOT EXECUTED 34bc: e1a0e00f mov lr, pc <== NOT EXECUTED 34c0: e12fff13 bx r3 <== NOT EXECUTED 34c4: e1a07000 mov r7, r0 <== NOT EXECUTED 34c8: eaffffe3 b 345c <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 34cc: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 34d0: e58530e0 str r3, [r5, #224] <== NOT EXECUTED 34d4: e58520dc str r2, [r5, #220] <== NOT EXECUTED 34d8: eaffffdf b 345c <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 34dc: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 34e0: e58530d8 str r3, [r5, #216] <== NOT EXECUTED 34e4: e58520d4 str r2, [r5, #212] <== NOT EXECUTED 34e8: eaffffdb b 345c <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 34ec: e3a03a47 mov r3, #290816 ; 0x47000 <== NOT EXECUTED 34f0: e2833e41 add r3, r3, #1040 ; 0x410 <== NOT EXECUTED 34f4: e2833129 add r3, r3, #1073741834 ; 0x4000000a <== NOT EXECUTED 34f8: e1520003 cmp r2, r3 <== NOT EXECUTED 34fc: 0a00001c beq 3574 <== NOT EXECUTED 3500: e3a03a47 mov r3, #290816 ; 0x47000 <== NOT EXECUTED 3504: e2833e41 add r3, r3, #1040 ; 0x410 <== NOT EXECUTED 3508: e283312e add r3, r3, #-2147483637 ; 0x8000000b <== NOT EXECUTED 350c: e1520003 cmp r2, r3 <== NOT EXECUTED 3510: 1affffdf bne 3494 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3514: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 3518: e59f42d8 ldr r4, [pc, #728] ; 37f8 <== NOT EXECUTED 351c: e1a03183 lsl r3, r3, #3 <== NOT EXECUTED 3520: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 3524: e7943103 ldr r3, [r4, r3, lsl #2] <== NOT EXECUTED 3528: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 352c: 0a000003 beq 3540 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3530: e1a00005 mov r0, r5 <== NOT EXECUTED 3534: e1a0e00f mov lr, pc <== NOT EXECUTED 3538: e12fff13 bx r3 <== NOT EXECUTED 353c: e1a07000 mov r7, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3540: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED 3544: e5932000 ldr r2, [r3] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3548: e7941282 ldr r1, [r4, r2, lsl #5] <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 354c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3550: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3554: e58530d0 str r3, [r5, #208] <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 3558: e58520cc str r2, [r5, #204] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 355c: 0affffbe beq 345c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3560: e1a00005 mov r0, r5 <== NOT EXECUTED 3564: e1a0e00f mov lr, pc <== NOT EXECUTED 3568: e12fff11 bx r1 <== NOT EXECUTED 356c: e1a07000 mov r7, r0 <== NOT EXECUTED 3570: eaffffb9 b 345c <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 3574: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED 3578: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 357c: e5823000 str r3, [r2] <== NOT EXECUTED 3580: eaffffb5 b 345c <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3584: e3520001 cmp r2, #1 ; 0x1 <== NOT EXECUTED 3588: 1affffc1 bne 3494 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 358c: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED 3590: e285c030 add ip, r5, #48 ; 0x30 <== NOT EXECUTED 3594: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3598: e1a0e004 mov lr, r4 <== NOT EXECUTED 359c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 35a0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 35a4: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 35a8: e59c3000 ldr r3, [ip] <== NOT EXECUTED 35ac: e58e3000 str r3, [lr] <== NOT EXECUTED 35b0: eaffffa9 b 345c <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 35b4: e5952060 ldr r2, [r5, #96] <== NOT EXECUTED 35b8: e595305c ldr r3, [r5, #92] <== NOT EXECUTED if ( rawnc < 0 ) 35bc: e0521003 subs r1, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 35c0: 45953064 ldrmi r3, [r5, #100] <== NOT EXECUTED 35c4: 40811003 addmi r1, r1, r3 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 35c8: e2852020 add r2, r5, #32 ; 0x20 <== NOT EXECUTED 35cc: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 35d0: e0423003 sub r3, r2, r3 <== NOT EXECUTED 35d4: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED 35d8: e0833001 add r3, r3, r1 <== NOT EXECUTED 35dc: e5823000 str r3, [r2] <== NOT EXECUTED 35e0: eaffff9d b 345c <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 35e4: e596c008 ldr ip, [r6, #8] <== NOT EXECUTED 35e8: e1a0e00c mov lr, ip <== NOT EXECUTED 35ec: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 35f0: e2854030 add r4, r5, #48 ; 0x30 <== NOT EXECUTED 35f4: e1a0c004 mov ip, r4 <== NOT EXECUTED 35f8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 35fc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3600: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3604: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3608: e59e2000 ldr r2, [lr] <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 360c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3610: e58c2000 str r2, [ip] <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3614: 0a000012 beq 3664 <== NOT EXECUTED 3618: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 361c: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 3620: 1a00000f bne 3664 <== NOT EXECUTED !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3624: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3628: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 362c: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3630: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 3634: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 3638: 0a000009 beq 3664 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 363c: e10f8000 mrs r8, CPSR <== NOT EXECUTED 3640: e38830c0 orr r3, r8, #192 ; 0xc0 <== NOT EXECUTED 3644: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 3648: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 364c: e5952094 ldr r2, [r5, #148] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3650: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3654: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3658: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 365c: 1a00005d bne 37d8 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 3660: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 3664: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3668: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 366c: 0a000008 beq 3694 <== NOT EXECUTED 3670: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 3674: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 3678: 1a000005 bne 3694 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 367c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3680: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3684: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 3688: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 368c: e3c22002 bic r2, r2, #2 ; 0x2 <== NOT EXECUTED 3690: e58520b8 str r2, [r5, #184] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 3694: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3698: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 369c: 05951038 ldreq r1, [r5, #56] <== NOT EXECUTED 36a0: 0a000012 beq 36f0 <== NOT EXECUTED 36a4: e5951038 ldr r1, [r5, #56] <== NOT EXECUTED 36a8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 36ac: ba00003d blt 37a8 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 36b0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 36b4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 36b8: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 36bc: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 36c0: e3120004 tst r2, #4 ; 0x4 <== NOT EXECUTED 36c4: 0a000006 beq 36e4 <== NOT EXECUTED 36c8: e59530b0 ldr r3, [r5, #176] <== NOT EXECUTED 36cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 36d0: 0a000003 beq 36e4 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 36d4: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 36d8: e1a0e00f mov lr, pc <== NOT EXECUTED 36dc: e12fff13 bx r3 <== NOT EXECUTED 36e0: e5951038 ldr r1, [r5, #56] <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 36e4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 36e8: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED 36ec: e58530b8 str r3, [r5, #184] <== 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) { 36f0: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 36f4: ba00002b blt 37a8 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 36f8: e5952030 ldr r2, [r5, #48] <== NOT EXECUTED 36fc: e3120a01 tst r2, #4096 ; 0x1000 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 3700: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 3704: 13833b01 orrne r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3708: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 370c: e3120b01 tst r2, #1024 ; 0x400 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 3710: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 3714: 13833c02 orrne r3, r3, #512 ; 0x200 <== NOT EXECUTED 3718: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED 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) { 371c: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 3720: e2138002 ands r8, r3, #2 ; 0x2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3724: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3728: 15853074 strne r3, [r5, #116] <== NOT EXECUTED /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 372c: 1585306c strne r3, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3730: 15853070 strne r3, [r5, #112] <== NOT EXECUTED 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) { 3734: 0a000007 beq 3758 <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 3738: e59530a8 ldr r3, [r5, #168] <== NOT EXECUTED 373c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3740: 0affff45 beq 345c <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 3744: e1a01004 mov r1, r4 <== NOT EXECUTED 3748: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 374c: e1a0e00f mov lr, pc <== NOT EXECUTED 3750: e12fff13 bx r3 <== NOT EXECUTED 3754: eaffff40 b 345c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 3758: e1a0100d mov r1, sp <== NOT EXECUTED 375c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3760: eb0001e9 bl 3f0c <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 3764: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3768: e5d50046 ldrb r0, [r5, #70] <== NOT EXECUTED 376c: e0010093 mul r1, r3, r0 <== NOT EXECUTED 3770: e59f2084 ldr r2, [pc, #132] ; 37fc <== NOT EXECUTED 3774: e083c192 umull ip, r3, r2, r1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 3778: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 377c: e1a021a3 lsr r2, r3, #3 <== NOT EXECUTED 3780: e5852054 str r2, [r5, #84] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 3784: 0a00000b beq 37b8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 3788: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 378c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3790: 01a03002 moveq r3, r2 <== NOT EXECUTED 3794: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3798: e585806c str r8, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 379c: e5853074 str r3, [r5, #116] <== NOT EXECUTED rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 37a0: e5852070 str r2, [r5, #112] <== NOT EXECUTED 37a4: eaffffe3 b 3738 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 37a8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 37ac: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED 37b0: e58530b8 str r3, [r5, #184] <== NOT EXECUTED 37b4: eaffffcf b 36f8 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 37b8: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED 37bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 37c0: 03a03001 moveq r3, #1 ; 0x1 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 37c4: 15850074 strne r0, [r5, #116] <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 37c8: 1585006c strne r0, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 37cc: 15850070 strne r0, [r5, #112] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 37d0: 0585306c streq r3, [r5, #108] <== NOT EXECUTED 37d4: eaffffd7 b 3738 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 37d8: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED 37dc: e595107c ldr r1, [r5, #124] <== NOT EXECUTED 37e0: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 37e4: e0811003 add r1, r1, r3 <== NOT EXECUTED 37e8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 37ec: e1a0e00f mov lr, pc <== NOT EXECUTED 37f0: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 37f4: eaffff99 b 3660 <== NOT EXECUTED =============================================================================== 000039a4 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 39a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 39a8: e59fb434 ldr fp, [pc, #1076] ; 3de4 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 39ac: e24dd00c sub sp, sp, #12 ; 0xc 39b0: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 39b4: e3a01000 mov r1, #0 ; 0x0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 39b8: e58d2008 str r2, [sp, #8] 39bc: e1a07000 mov r7, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 39c0: e1a02001 mov r2, r1 39c4: e59b0000 ldr r0, [fp] rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 39c8: e1a04003 mov r4, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 39cc: eb00038a bl 47fc RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 39d0: e2509000 subs r9, r0, #0 ; 0x0 39d4: 1a000021 bne 3a60 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 39d8: e59f5408 ldr r5, [pc, #1032] ; 3de8 39dc: e5956000 ldr r6, [r5] 39e0: e3560000 cmp r6, #0 ; 0x0 39e4: 1a000003 bne 39f8 39e8: ea00001f b 3a6c 39ec: e5966000 ldr r6, [r6] <== NOT EXECUTED 39f0: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 39f4: 0a00001c beq 3a6c <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 39f8: e596300c ldr r3, [r6, #12] 39fc: e1530007 cmp r3, r7 3a00: 1afffff9 bne 39ec 3a04: e5963010 ldr r3, [r6, #16] 3a08: e153000a cmp r3, sl 3a0c: 1afffff6 bne 39ec */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3a10: e59d1008 ldr r1, [sp, #8] if (!tty->refcount++) { 3a14: e5963008 ldr r3, [r6, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3a18: e5912000 ldr r2, [r1] if (!tty->refcount++) { 3a1c: e3530000 cmp r3, #0 ; 0x0 3a20: e2833001 add r3, r3, #1 ; 0x1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3a24: e5826028 str r6, [r2, #40] if (!tty->refcount++) { 3a28: e5863008 str r3, [r6, #8] 3a2c: 1a000009 bne 3a58 if (tty->device.firstOpen) 3a30: e5963098 ldr r3, [r6, #152] 3a34: e3530000 cmp r3, #0 ; 0x0 (*tty->device.firstOpen)(major, minor, arg); 3a38: 11a00007 movne r0, r7 3a3c: 11a0100a movne r1, sl 3a40: 159d2008 ldrne r2, [sp, #8] 3a44: 11a0e00f movne lr, pc 3a48: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3a4c: e59630b4 ldr r3, [r6, #180] 3a50: e3530002 cmp r3, #2 ; 0x2 3a54: 0a0000a1 beq 3ce0 (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 3a58: e59b0000 ldr r0, [fp] 3a5c: eb0003ad bl 4918 return RTEMS_SUCCESSFUL; } 3a60: e1a00009 mov r0, r9 3a64: e28dd00c add sp, sp, #12 ; 0xc 3a68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3a6c: e3a00001 mov r0, #1 ; 0x1 3a70: e3a010e8 mov r1, #232 ; 0xe8 3a74: eb00151b bl 8ee8 if (tty == NULL) { 3a78: e3500000 cmp r0, #0 ; 0x0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3a7c: e1a08000 mov r8, r0 3a80: e1a06000 mov r6, r0 if (tty == NULL) { 3a84: 0a0000a8 beq 3d2c return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 3a88: e59f335c ldr r3, [pc, #860] ; 3dec 3a8c: e5932000 ldr r2, [r3] 3a90: e5882064 str r2, [r8, #100] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3a94: e5980064 ldr r0, [r8, #100] 3a98: eb0016b7 bl 957c if (tty->rawInBuf.theBuf == NULL) { 3a9c: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3aa0: e5880058 str r0, [r8, #88] if (tty->rawInBuf.theBuf == NULL) { 3aa4: 0a00009e beq 3d24 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 3aa8: e59f3340 ldr r3, [pc, #832] ; 3df0 3aac: e5932000 ldr r2, [r3] 3ab0: e5882088 str r2, [r8, #136] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3ab4: e5980088 ldr r0, [r8, #136] 3ab8: eb0016af bl 957c if (tty->rawOutBuf.theBuf == NULL) { 3abc: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3ac0: e588007c str r0, [r8, #124] if (tty->rawOutBuf.theBuf == NULL) { 3ac4: 0a000094 beq 3d1c return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3ac8: e59f3324 ldr r3, [pc, #804] ; 3df4 3acc: e5930000 ldr r0, [r3] 3ad0: eb0016a9 bl 957c if (tty->cbuf == NULL) { 3ad4: e3500000 cmp r0, #0 ; 0x0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3ad8: e588001c str r0, [r8, #28] if (tty->cbuf == NULL) { 3adc: 0a00008c beq 3d14 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3ae0: e5952000 ldr r2, [r5] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3ae4: e3a03000 mov r3, #0 ; 0x0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3ae8: e3520000 cmp r2, #0 ; 0x0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3aec: e888000c stm r8, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 3af0: 15828004 strne r8, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3af4: e58830d4 str r3, [r8, #212] tty->tty_snd.sw_arg = NULL; 3af8: e58830d8 str r3, [r8, #216] tty->tty_rcv.sw_pfn = NULL; 3afc: e58830dc str r3, [r8, #220] tty->tty_rcv.sw_arg = NULL; 3b00: e58830e0 str r3, [r8, #224] tty->tty_rcvwakeup = 0; 3b04: e58830e4 str r3, [r8, #228] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3b08: e59f12e8 ldr r1, [pc, #744] ; 3df8 tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3b0c: e59f22e8 ldr r2, [pc, #744] ; 3dfc tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3b10: e5d10000 ldrb r0, [r1] tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3b14: e5923000 ldr r3, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3b18: e3800315 orr r0, r0, #1409286144 ; 0x54000000 tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3b1c: e3530000 cmp r3, #0 ; 0x0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3b20: e3800852 orr r0, r0, #5373952 ; 0x520000 tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 3b24: 05828000 streq r8, [r2] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3b28: e5858000 str r8, [r5] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3b2c: e288c014 add ip, r8, #20 ; 0x14 3b30: e3a03000 mov r3, #0 ; 0x0 3b34: e3800c69 orr r0, r0, #26880 ; 0x6900 3b38: e3a01001 mov r1, #1 ; 0x1 3b3c: e3a02054 mov r2, #84 ; 0x54 3b40: e58dc000 str ip, [sp] rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 3b44: e588a010 str sl, [r8, #16] tty->major = major; 3b48: e588700c str r7, [r8, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3b4c: eb000286 bl 456c rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 3b50: e2503000 subs r3, r0, #0 ; 0x0 3b54: 1a00006d bne 3d10 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 3b58: e59f2298 ldr r2, [pc, #664] ; 3df8 3b5c: e5d20000 ldrb r0, [r2] 3b60: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3b64: e3800852 orr r0, r0, #5373952 ; 0x520000 3b68: e288c018 add ip, r8, #24 ; 0x18 3b6c: e3a01001 mov r1, #1 ; 0x1 3b70: e3800c6f orr r0, r0, #28416 ; 0x6f00 3b74: e3a02054 mov r2, #84 ; 0x54 3b78: e58dc000 str ip, [sp] 3b7c: eb00027a bl 456c rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 3b80: e2501000 subs r1, r0, #0 ; 0x0 3b84: 1a000061 bne 3d10 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 3b88: e59f3268 ldr r3, [pc, #616] ; 3df8 3b8c: e5d30000 ldrb r0, [r3] 3b90: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3b94: e3800852 orr r0, r0, #5373952 ; 0x520000 3b98: e288c08c add ip, r8, #140 ; 0x8c 3b9c: e3800b1e orr r0, r0, #30720 ; 0x7800 3ba0: e3a02020 mov r2, #32 ; 0x20 3ba4: e1a03001 mov r3, r1 3ba8: e58dc000 str ip, [sp] 3bac: eb00026e bl 456c rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3bb0: e2505000 subs r5, r0, #0 ; 0x0 3bb4: 1a000055 bne 3d10 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3bb8: e1a0c004 mov ip, r4 3bbc: e8bc000f ldm ip!, {r0, r1, r2, r3} 3bc0: e288e098 add lr, r8, #152 ; 0x98 3bc4: e8ae000f stmia lr!, {r0, r1, r2, r3} 3bc8: e89c000f ldm ip, {r0, r1, r2, r3} 3bcc: e88e000f stm lr, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3bd0: e59830b4 ldr r3, [r8, #180] 3bd4: e3530002 cmp r3, #2 ; 0x2 RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 3bd8: e5885094 str r5, [r8, #148] tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3bdc: 0a000064 beq 3d74 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 3be0: e59830a0 ldr r3, [r8, #160] 3be4: e3530000 cmp r3, #0 ; 0x0 3be8: 0a000053 beq 3d3c 3bec: e59830b4 ldr r3, [r8, #180] 3bf0: e3530002 cmp r3, #2 ; 0x2 3bf4: 0a000050 beq 3d3c tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 3bf8: e3a04000 mov r4, #0 ; 0x0 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 3bfc: e58840b8 str r4, [r8, #184] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3c00: e59f21f0 ldr r2, [pc, #496] ; 3df8 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3c04: e5985064 ldr r5, [r8, #100] tty->highwater = tty->rawInBuf.Size * 3/4; 3c08: e5983064 ldr r3, [r8, #100] /* * Bump name characer */ if (c++ == 'z') 3c0c: e5d21000 ldrb r1, [r2] tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 3c10: e1a02083 lsl r2, r3, #1 3c14: e0822003 add r2, r2, r3 3c18: e1a02122 lsr r2, r2, #2 3c1c: e58820c0 str r2, [r8, #192] /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3c20: e3a03b06 mov r3, #6144 ; 0x1800 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3c24: e59f21cc ldr r2, [pc, #460] ; 3df8 3c28: e351007a cmp r1, #122 ; 0x7a /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3c2c: e2833005 add r3, r3, #5 ; 0x5 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3c30: e2811001 add r1, r1, #1 ; 0x1 3c34: e5c21000 strb r1, [r2] /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3c38: e5883034 str r3, [r8, #52] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 3c3c: e3a03003 mov r3, #3 ; 0x3 3c40: e5c83041 strb r3, [r8, #65] tty->termios.c_cc[VQUIT] = '\034'; 3c44: e3a0201c mov r2, #28 ; 0x1c tty->termios.c_cc[VERASE] = '\177'; 3c48: e283307c add r3, r3, #124 ; 0x7c tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 3c4c: e5c82042 strb r2, [r8, #66] tty->termios.c_cc[VERASE] = '\177'; 3c50: e5c83043 strb r3, [r8, #67] tty->termios.c_cc[VKILL] = '\025'; 3c54: e2422007 sub r2, r2, #7 ; 0x7 tty->termios.c_cc[VEOF] = '\004'; 3c58: e243307b sub r3, r3, #123 ; 0x7b tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 3c5c: e5c82044 strb r2, [r8, #68] tty->termios.c_cc[VEOF] = '\004'; 3c60: e5c83045 strb r3, [r8, #69] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3c64: e2422004 sub r2, r2, #4 ; 0x4 tty->termios.c_cc[VSTOP] = '\023'; 3c68: e283300f add r3, r3, #15 ; 0xf tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3c6c: e5c82049 strb r2, [r8, #73] tty->termios.c_cc[VSTOP] = '\023'; 3c70: e5c8304a strb r3, [r8, #74] tty->termios.c_cc[VSUSP] = '\032'; 3c74: e2822009 add r2, r2, #9 ; 0x9 tty->termios.c_cc[VREPRINT] = '\022'; 3c78: e2433001 sub r3, r3, #1 ; 0x1 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 3c7c: e5c8204b strb r2, [r8, #75] tty->termios.c_cc[VREPRINT] = '\022'; 3c80: e5c8304d strb r3, [r8, #77] tty->termios.c_cc[VDISCARD] = '\017'; 3c84: e242200b sub r2, r2, #11 ; 0xb tty->termios.c_cc[VWERASE] = '\027'; 3c88: e2833005 add r3, r3, #5 ; 0x5 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 3c8c: e5c8204e strb r2, [r8, #78] tty->termios.c_cc[VWERASE] = '\027'; 3c90: e5c8304f strb r3, [r8, #79] tty->termios.c_cc[VLNEXT] = '\026'; 3c94: e2822007 add r2, r2, #7 ; 0x7 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3c98: e3a00c25 mov r0, #9472 ; 0x2500 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3c9c: e3a0ce8b mov ip, #2224 ; 0x8b0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3ca0: e3a0ec82 mov lr, #33280 ; 0x8200 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3ca4: 059f314c ldreq r3, [pc, #332] ; 3df8 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 3ca8: e5c82050 strb r2, [r8, #80] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3cac: e2800002 add r0, r0, #2 ; 0x2 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3cb0: e28cc00d add ip, ip, #13 ; 0xd tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3cb4: e28ee03b add lr, lr, #59 ; 0x3b /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3cb8: e1a050a5 lsr r5, r5, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3cbc: 0282204b addeq r2, r2, #75 ; 0x4b } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3cc0: e5880030 str r0, [r8, #48] tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3cc4: e588c038 str ip, [r8, #56] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3cc8: e588e03c str lr, [r8, #60] /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3ccc: e58850bc str r5, [r8, #188] tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 3cd0: e5c8404c strb r4, [r8, #76] tty->termios.c_cc[VEOL2] = '\000'; 3cd4: e5c84051 strb r4, [r8, #81] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3cd8: 05c32000 strbeq r2, [r3] 3cdc: eaffff4b b 3a10 (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 3ce0: e59600c4 ldr r0, [r6, #196] <== NOT EXECUTED 3ce4: e59f1114 ldr r1, [pc, #276] ; 3e00 <== NOT EXECUTED 3ce8: e1a02006 mov r2, r6 <== NOT EXECUTED 3cec: eb0003df bl 4c70 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3cf0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3cf4: 1a000005 bne 3d10 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 3cf8: e1a02006 mov r2, r6 <== NOT EXECUTED 3cfc: e59600c8 ldr r0, [r6, #200] <== NOT EXECUTED 3d00: e59f10fc ldr r1, [pc, #252] ; 3e04 <== NOT EXECUTED 3d04: eb0003d9 bl 4c70 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3d08: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3d0c: 0affff51 beq 3a58 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3d10: eb000475 bl 4eec <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 3d14: e598007c ldr r0, [r8, #124] <== NOT EXECUTED 3d18: eb0014b1 bl 8fe4 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 3d1c: e5980058 ldr r0, [r8, #88] <== NOT EXECUTED 3d20: eb0014af bl 8fe4 <== NOT EXECUTED free(tty); 3d24: e1a00008 mov r0, r8 <== NOT EXECUTED 3d28: eb0014ad bl 8fe4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 3d2c: e59b0000 ldr r0, [fp] <== NOT EXECUTED 3d30: eb0002f8 bl 4918 <== NOT EXECUTED 3d34: e3a0901a mov r9, #26 ; 0x1a <== NOT EXECUTED 3d38: eaffff48 b 3a60 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 3d3c: e59f30b4 ldr r3, [pc, #180] ; 3df8 <== NOT EXECUTED 3d40: e5d30000 ldrb r0, [r3] <== NOT EXECUTED 3d44: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 3d48: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3d4c: e3800852 orr r0, r0, #5373952 ; 0x520000 <== NOT EXECUTED 3d50: e288c068 add ip, r8, #104 ; 0x68 <== NOT EXECUTED 3d54: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED 3d58: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 3d5c: e1a03001 mov r3, r1 <== NOT EXECUTED 3d60: e58dc000 str ip, [sp] <== NOT EXECUTED 3d64: eb000200 bl 456c <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3d68: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3d6c: 0affffa1 beq 3bf8 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3d70: eb00045d bl 4eec <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 3d74: e59f107c ldr r1, [pc, #124] ; 3df8 <== NOT EXECUTED 3d78: e5d10000 ldrb r0, [r1] <== NOT EXECUTED 3d7c: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 3d80: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 3d84: e288c0c8 add ip, r8, #200 ; 0xc8 <== NOT EXECUTED 3d88: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 3d8c: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 3d90: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3d94: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3d98: e88d1020 stm sp, {r5, ip} <== NOT EXECUTED 3d9c: eb000306 bl 49bc <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 3da0: e250e000 subs lr, r0, #0 ; 0x0 <== NOT EXECUTED 3da4: 1affffd9 bne 3d10 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 3da8: e59f2048 ldr r2, [pc, #72] ; 3df8 <== NOT EXECUTED 3dac: e5d20000 ldrb r0, [r2] <== NOT EXECUTED 3db0: e3800452 orr r0, r0, #1375731712 ; 0x52000000 <== NOT EXECUTED 3db4: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 3db8: e288c0c4 add ip, r8, #196 ; 0xc4 <== NOT EXECUTED 3dbc: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 3dc0: e3a01009 mov r1, #9 ; 0x9 <== NOT EXECUTED 3dc4: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3dc8: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3dcc: e58de000 str lr, [sp] <== NOT EXECUTED 3dd0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3dd4: eb0002f8 bl 49bc <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 3dd8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3ddc: 0affff7f beq 3be0 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3de0: eb000441 bl 4eec <== NOT EXECUTED =============================================================================== 0000279c : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 279c: e59230b4 ldr r3, [r2, #180] 27a0: e3530000 cmp r3, #0 ; 0x0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 27a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 27a8: e1a04002 mov r4, r2 27ac: e1a0b000 mov fp, r0 27b0: e1a09001 mov r9, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 27b4: 0a00003a beq 28a4 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 27b8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 27bc: e5928080 ldr r8, [r2, #128] <== NOT EXECUTED while (len) { 27c0: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 27c4: e3a0a000 mov sl, #0 ; 0x0 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 27c8: e3a07002 mov r7, #2 ; 0x2 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 27cc: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 27d0: e2880001 add r0, r8, #1 ; 0x1 <== NOT EXECUTED 27d4: eb003e66 bl 12174 <__umodsi3> <== NOT EXECUTED 27d8: e1a08000 mov r8, r0 <== NOT EXECUTED rtems_interrupt_disable (level); 27dc: e10f5000 mrs r5, CPSR <== NOT EXECUTED 27e0: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 27e4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 27e8: e5946084 ldr r6, [r4, #132] <== NOT EXECUTED 27ec: e1560000 cmp r6, r0 <== NOT EXECUTED 27f0: 1a00000d bne 282c <== NOT EXECUTED tty->rawOutBufState = rob_wait; 27f4: e5847094 str r7, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 27f8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 27fc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2800: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 2804: e1a02001 mov r2, r1 <== NOT EXECUTED 2808: eb0007fb bl 47fc <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 280c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2810: 1a00001a bne 2880 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 2814: e10f5000 mrs r5, CPSR <== NOT EXECUTED 2818: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 281c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2820: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 2824: e1530006 cmp r3, r6 <== NOT EXECUTED 2828: 0afffff1 beq 27f4 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 282c: e5940080 ldr r0, [r4, #128] <== NOT EXECUTED 2830: e7db100a ldrb r1, [fp, sl] <== NOT EXECUTED 2834: e594307c ldr r3, [r4, #124] <== NOT EXECUTED 2838: e7c31000 strb r1, [r3, r0] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 283c: e5942094 ldr r2, [r4, #148] <== NOT EXECUTED 2840: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 2844: e5848080 str r8, [r4, #128] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 2848: 1a000007 bne 286c <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 284c: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2850: e3130010 tst r3, #16 ; 0x10 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 2854: 159430b8 ldrne r3, [r4, #184] <== NOT EXECUTED 2858: 13833020 orrne r3, r3, #32 ; 0x20 <== NOT EXECUTED 285c: 158430b8 strne r3, [r4, #184] <== NOT EXECUTED } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 2860: 0a000007 beq 2884 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 2864: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 2868: e5843094 str r3, [r4, #148] <== NOT EXECUTED } rtems_interrupt_enable (level); 286c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 2870: e2599001 subs r9, r9, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; 2874: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 2878: 1affffd3 bne 27cc <== NOT EXECUTED 287c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 2880: eb000999 bl 4eec <== NOT EXECUTED tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 2884: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 2888: e594107c ldr r1, [r4, #124] <== NOT EXECUTED 288c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2890: e0811003 add r1, r1, r3 <== NOT EXECUTED 2894: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED 2898: e1a0e00f mov lr, pc <== NOT EXECUTED 289c: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 28a0: eaffffef b 2864 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 28a4: e1a01000 mov r1, r0 28a8: e1a02009 mov r2, r9 28ac: e5940010 ldr r0, [r4, #16] 28b0: e1a0e00f mov lr, pc 28b4: e594f0a4 ldr pc, [r4, #164] 28b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00002ff8 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2ff8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2ffc: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3000: e1a0a000 mov sl, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3004: e5934028 ldr r4, [r3, #40] <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3008: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; 300c: e59a3008 ldr r3, [sl, #8] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3010: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3014: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3018: e1a02001 mov r2, r1 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 301c: e59a700c ldr r7, [sl, #12] <== NOT EXECUTED char *buffer = args->buffer; 3020: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3024: eb0005f4 bl 47fc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 3028: e250b000 subs fp, r0, #0 ; 0x0 <== NOT EXECUTED 302c: 1a00000f bne 3070 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 3030: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 3034: e59f23c0 ldr r2, [pc, #960] ; 33fc <== NOT EXECUTED 3038: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 303c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 3040: e7923183 ldr r3, [r2, r3, lsl #3] <== NOT EXECUTED 3044: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3048: 0a00000b beq 307c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 304c: e1a0100a mov r1, sl <== NOT EXECUTED 3050: e1a00004 mov r0, r4 <== NOT EXECUTED 3054: e1a0e00f mov lr, pc <== NOT EXECUTED 3058: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 305c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3060: e1a0b000 mov fp, r0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 3064: e58430e4 str r3, [r4, #228] <== NOT EXECUTED rtems_semaphore_release (tty->isem); 3068: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 306c: eb000629 bl 4918 <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 3070: e1a0000b mov r0, fp <== NOT EXECUTED 3074: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 3078: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 307c: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 3080: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3084: e1520003 cmp r2, r3 <== NOT EXECUTED 3088: 0a00001b beq 30fc <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 308c: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 3090: 0a000011 beq 30dc <== NOT EXECUTED 3094: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 3098: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 309c: e1520003 cmp r2, r3 <== NOT EXECUTED 30a0: aa00000d bge 30dc <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30a8: e1a01002 mov r1, r2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30ac: e0620003 rsb r0, r2, r3 <== NOT EXECUTED 30b0: ea000002 b 30c0 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30b4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30b8: e1530001 cmp r3, r1 <== NOT EXECUTED 30bc: da000006 ble 30dc <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30c0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 30c4: e7d32001 ldrb r2, [r3, r1] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30c8: e2577001 subs r7, r7, #1 ; 0x1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30cc: e7c02001 strb r2, [r0, r1] <== NOT EXECUTED 30d0: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 30d4: e5841024 str r1, [r4, #36] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30d8: 1afffff5 bne 30b4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 30dc: e59a300c ldr r3, [sl, #12] <== NOT EXECUTED 30e0: e0673003 rsb r3, r7, r3 <== NOT EXECUTED 30e4: e58a3014 str r3, [sl, #20] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 30e8: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30ec: e58420e4 str r2, [r4, #228] <== NOT EXECUTED rtems_semaphore_release (tty->isem); 30f0: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 30f4: eb000607 bl 4918 <== NOT EXECUTED 30f8: eaffffdc b 3070 <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 30fc: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 3100: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED if (tty->device.pollRead != NULL 3104: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 3108: e584302c str r3, [r4, #44] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 310c: e584b020 str fp, [r4, #32] <== NOT EXECUTED 3110: e584b024 str fp, [r4, #36] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 3114: e1a01002 mov r1, r2 <== NOT EXECUTED 3118: 0a000002 beq 3128 <== NOT EXECUTED 311c: e59430b4 ldr r3, [r4, #180] <== NOT EXECUTED 3120: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3124: 0a000060 beq 32ac <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 3128: e2843049 add r3, r4, #73 ; 0x49 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 312c: e3a06c02 mov r6, #512 ; 0x200 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 3130: e5945074 ldr r5, [r4, #116] <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 3134: e58d3004 str r3, [sp, #4] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3138: e59f92c0 ldr r9, [pc, #704] ; 3400 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 313c: e2866002 add r6, r6, #2 ; 0x2 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 3140: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3144: e594205c ldr r2, [r4, #92] <== NOT EXECUTED 3148: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 314c: e1520003 cmp r2, r3 <== NOT EXECUTED 3150: 0a000037 beq 3234 <== NOT EXECUTED 3154: e5993000 ldr r3, [r9] <== NOT EXECUTED 3158: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 315c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3160: e1520003 cmp r2, r3 <== NOT EXECUTED 3164: aa000032 bge 3234 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 3168: e594005c ldr r0, [r4, #92] <== NOT EXECUTED 316c: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 3170: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 3174: eb003bfe bl 12174 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 3178: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED 317c: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 3180: e584005c str r0, [r4, #92] <== NOT EXECUTED 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; 3184: e1a02000 mov r2, r0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 3188: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 318c: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 3190: e0800003 add r0, r0, r3 <== NOT EXECUTED 3194: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 3198: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 319c: eb003bf4 bl 12174 <__umodsi3> <== NOT EXECUTED 31a0: e59430bc ldr r3, [r4, #188] <== NOT EXECUTED 31a4: e1500003 cmp r0, r3 <== NOT EXECUTED 31a8: 2a000014 bcs 3200 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 31ac: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED 31b0: e3c22001 bic r2, r2, #1 ; 0x1 <== NOT EXECUTED 31b4: e58420b8 str r2, [r4, #184] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 31b8: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 31bc: e3c33f7f bic r3, r3, #508 ; 0x1fc <== NOT EXECUTED 31c0: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED 31c4: e1a03b03 lsl r3, r3, #22 <== NOT EXECUTED 31c8: e1a03b23 lsr r3, r3, #22 <== NOT EXECUTED 31cc: e1530006 cmp r3, r6 <== NOT EXECUTED 31d0: 0a000029 beq 327c <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 31d4: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 31d8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 31dc: 0a000007 beq 3200 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 31e0: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 31e4: e59420b0 ldr r2, [r4, #176] <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 31e8: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 31ec: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 31f0: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 31f4: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 31f8: 11a0e00f movne lr, pc <== NOT EXECUTED 31fc: 112fff12 bxne r2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 3200: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 3204: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 3208: 0a000012 beq 3258 <== NOT EXECUTED if (siproc (c, tty)) 320c: e1a00005 mov r0, r5 <== NOT EXECUTED 3210: e1a01004 mov r1, r4 <== NOT EXECUTED 3214: ebffff0a bl 2e44 <== NOT EXECUTED 3218: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 321c: 1a000014 bne 3274 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3220: e594205c ldr r2, [r4, #92] <== NOT EXECUTED 3224: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 3228: e1520003 cmp r2, r3 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 322c: e5945070 ldr r5, [r4, #112] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3230: 1affffc7 bne 3154 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 3234: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 3238: 0affff93 beq 308c <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 323c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 3240: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3244: e1a02005 mov r2, r5 <== NOT EXECUTED 3248: eb00056b bl 47fc <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 324c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3250: 0affffbb beq 3144 <== NOT EXECUTED 3254: eaffff8c b 308c <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 3258: e1a00005 mov r0, r5 <== NOT EXECUTED 325c: e1a01004 mov r1, r4 <== NOT EXECUTED 3260: ebfffef7 bl 2e44 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3264: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 3268: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 326c: e1530002 cmp r3, r2 <== NOT EXECUTED 3270: baffffea blt 3220 <== NOT EXECUTED 3274: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED 3278: eaffffe8 b 3220 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 327c: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 3280: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3284: 0a000002 beq 3294 <== NOT EXECUTED 3288: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 328c: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 3290: 0affffcf beq 31d4 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 3294: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3298: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 329c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 32a0: e1a0e00f mov lr, pc <== NOT EXECUTED 32a4: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 32a8: eaffffd4 b 3200 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 32ac: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 32b0: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 32b4: 1a000032 bne 3384 <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 32b8: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 32bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 32c0: 1a000006 bne 32e0 <== NOT EXECUTED 32c4: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 32c8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 32cc: 0a000003 beq 32e0 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 32d0: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 32d4: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 32d8: eb00030b bl 3f0c <== NOT EXECUTED 32dc: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED else { siproc (n, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 32e0: e28d600c add r6, sp, #12 ; 0xc <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 32e4: e28d5008 add r5, sp, #8 ; 0x8 <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 32e8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 32ec: e1a0e00f mov lr, pc <== NOT EXECUTED 32f0: e12fff12 bx r2 <== NOT EXECUTED if (n < 0) { 32f4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 32f8: aa000010 bge 3340 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 32fc: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 3300: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3304: 0a00002f beq 33c8 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 3308: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 330c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3310: 0a000002 beq 3320 <== NOT EXECUTED 3314: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3318: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 331c: 1a00002c bne 33d4 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 3320: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3324: eb00066c bl 4cdc <== NOT EXECUTED 3328: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 332c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3330: e1a0e00f mov lr, pc <== NOT EXECUTED 3334: e12fff12 bx r2 <== NOT EXECUTED if (n < 0) { 3338: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 333c: baffffee blt 32fc <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 3340: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 3344: e1a01004 mov r1, r4 <== NOT EXECUTED 3348: ebfffebd bl 2e44 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 334c: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 3350: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3354: e1530002 cmp r3, r2 <== NOT EXECUTED 3358: aaffff4b bge 308c <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 335c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3360: 0a000002 beq 3370 <== NOT EXECUTED 3364: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 3368: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 336c: 1a000010 bne 33b4 <== NOT EXECUTED 3370: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED 3374: eaffffdb b 32e8 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 3378: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 337c: eb000656 bl 4cdc <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3380: e59410a0 ldr r1, [r4, #160] <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 3384: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3388: e1a0e00f mov lr, pc <== NOT EXECUTED 338c: e12fff11 bx r1 <== NOT EXECUTED if (n < 0) { 3390: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 3394: e1a01004 mov r1, r4 <== NOT EXECUTED 3398: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { 339c: bafffff5 blt 3378 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 33a0: ebfffea7 bl 2e44 <== NOT EXECUTED 33a4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 33a8: 1affff37 bne 308c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 33ac: e59410a0 ldr r1, [r4, #160] <== NOT EXECUTED 33b0: eafffff3 b 3384 <== NOT EXECUTED else { siproc (n, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 33b4: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 33b8: e1a01006 mov r1, r6 <== NOT EXECUTED 33bc: eb0002d2 bl 3f0c <== NOT EXECUTED 33c0: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED 33c4: eaffffc7 b 32e8 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 33c8: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 33cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 33d0: 0affff2d beq 308c <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 33d4: e1a01005 mov r1, r5 <== NOT EXECUTED 33d8: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 33dc: eb0002ca bl 3f0c <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 33e0: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 33e4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 33e8: e5941054 ldr r1, [r4, #84] <== NOT EXECUTED 33ec: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 33f0: e1530001 cmp r3, r1 <== NOT EXECUTED 33f4: 9affffc9 bls 3320 <== NOT EXECUTED 33f8: eaffff23 b 308c <== NOT EXECUTED =============================================================================== 00002218 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 2218: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 221c: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 2220: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 2224: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 2228: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 222c: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED 2230: e1530002 cmp r3, r2 <== NOT EXECUTED * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 2234: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 2238: e1a04000 mov r4, r0 <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 223c: 0a000038 beq 2324 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 2240: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 2244: e2033003 and r3, r3, #3 ; 0x3 <== NOT EXECUTED 2248: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 224c: 0a000051 beq 2398 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 2250: e5902080 ldr r2, [r0, #128] <== NOT EXECUTED 2254: e5903084 ldr r3, [r0, #132] <== NOT EXECUTED 2258: e1520003 cmp r2, r3 <== NOT EXECUTED 225c: 0a00002a beq 230c <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 2260: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2264: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 2268: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; 226c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 2270: e590c090 ldr ip, [r0, #144] <== NOT EXECUTED tty->t_dqlen = 0; 2274: e5803090 str r3, [r0, #144] <== NOT EXECUTED rtems_interrupt_enable(level); 2278: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 227c: e5900084 ldr r0, [r0, #132] <== NOT EXECUTED 2280: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 2284: e08c0000 add r0, ip, r0 <== NOT EXECUTED 2288: eb003fb9 bl 12174 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 228c: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 2290: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 2294: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 2298: e5840084 str r0, [r4, #132] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 229c: 0a00005a beq 240c <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 22a0: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 22a4: e1530006 cmp r3, r6 <== NOT EXECUTED 22a8: 0a00002f beq 236c <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 22ac: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 22b0: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 22b4: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 22b8: 0a000048 beq 23e0 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 22bc: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 22c0: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 22c4: 85943088 ldrhi r3, [r4, #136] <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 22c8: 95943080 ldrls r3, [r4, #128] <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 22cc: 80665003 rsbhi r5, r6, r3 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 22d0: 90665003 rsbls r5, r6, r3 <== NOT EXECUTED /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 22d4: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 22d8: e594107c ldr r1, [r4, #124] <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 22dc: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 22e0: 13a05001 movne r5, #1 ; 0x1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 22e4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 22e8: e5843094 str r3, [r4, #148] <== NOT EXECUTED (*tty->device.write)(tty->minor, 22ec: e0811006 add r1, r1, r6 <== NOT EXECUTED 22f0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 22f4: e1a02005 mov r2, r5 <== NOT EXECUTED 22f8: e1a0e00f mov lr, pc <== NOT EXECUTED 22fc: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 2300: e5846084 str r6, [r4, #132] <== NOT EXECUTED } return nToSend; } 2304: e1a00005 mov r0, r5 <== NOT EXECUTED 2308: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 230c: e5903094 ldr r3, [r0, #148] <== NOT EXECUTED 2310: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 2314: 0a00003f beq 2418 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2318: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 231c: e1a00005 mov r0, r5 <== NOT EXECUTED 2320: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 2324: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 2328: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 232c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2330: e1a0e00f mov lr, pc <== NOT EXECUTED 2334: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 2338: e10f1000 mrs r1, CPSR <== NOT EXECUTED 233c: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2340: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 2344: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2348: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 234c: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2350: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 2354: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2358: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 235c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 2360: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 2364: e1a00005 mov r0, r5 <== NOT EXECUTED 2368: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 236c: e59420d4 ldr r2, [r4, #212] <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2370: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2374: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2378: e5845094 str r5, [r4, #148] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 237c: 01a05002 moveq r5, r2 <== NOT EXECUTED 2380: 0affffde beq 2300 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 2384: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2388: e59410d8 ldr r1, [r4, #216] <== NOT EXECUTED 238c: e1a0e00f mov lr, pc <== NOT EXECUTED 2390: e12fff12 bx r2 <== NOT EXECUTED 2394: eaffffd9 b 2300 <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 2398: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 239c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 23a0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 23a4: e1a0e00f mov lr, pc <== NOT EXECUTED 23a8: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 23ac: e10f1000 mrs r1, CPSR <== NOT EXECUTED 23b0: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 23b4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 23b8: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 23bc: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 23c0: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 23c4: e3c33002 bic r3, r3, #2 ; 0x2 <== NOT EXECUTED 23c8: e58430b8 str r3, [r4, #184] <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 23cc: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 23d0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 23d4: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 23d8: e1a00005 mov r0, r5 <== NOT EXECUTED 23dc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 23e0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 23e4: e38320c0 orr r2, r3, #192 ; 0xc0 <== NOT EXECUTED 23e8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 23ec: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 23f0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 23f4: e3822020 orr r2, r2, #32 ; 0x20 <== NOT EXECUTED 23f8: e58420b8 str r2, [r4, #184] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 23fc: e5841094 str r1, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable(level); 2400: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2404: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 2408: eaffffbc b 2300 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 240c: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 2410: eb000940 bl 4918 <== NOT EXECUTED 2414: eaffffa1 b 22a0 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2418: e590008c ldr r0, [r0, #140] <== NOT EXECUTED 241c: eb00093d bl 4918 <== NOT EXECUTED 2420: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 2424: eaffffbc b 231c <== NOT EXECUTED =============================================================================== 00003e7c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 3e7c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3e80: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 3e84: e1a04000 mov r4, r0 <== NOT EXECUTED 3e88: e28d6007 add r6, sp, #7 ; 0x7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3e8c: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED 3e90: e1a0300d mov r3, sp <== NOT EXECUTED 3e94: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 3e98: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3e9c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3ea0: eb0000b6 bl 4180 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3ea4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ea8: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 3eac: 1a000012 bne 3efc <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3eb0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3eb4: e1a0e00f mov lr, pc <== NOT EXECUTED 3eb8: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED 3ebc: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 3ec0: e3730001 cmn r3, #1 ; 0x1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3ec4: e1a01006 mov r1, r6 <== NOT EXECUTED 3ec8: e1a00004 mov r0, r4 <== NOT EXECUTED 3ecc: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 3ed0: 0affffee beq 3e90 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 3ed4: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 3ed8: ebfff96c bl 2490 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3edc: e1a0300d mov r3, sp <== NOT EXECUTED 3ee0: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 3ee4: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3ee8: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3eec: eb0000a3 bl 4180 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3ef0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ef4: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 3ef8: 0affffec beq 3eb0 <== NOT EXECUTED tty->rxTaskId = 0; 3efc: e58470c4 str r7, [r4, #196] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3f00: e1a00007 mov r0, r7 <== NOT EXECUTED 3f04: eb0002fb bl 4af8 <== NOT EXECUTED 3f08: eaffffe0 b 3e90 <== NOT EXECUTED =============================================================================== 0000220c : void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 220c: e59000c4 ldr r0, [r0, #196] <== NOT EXECUTED 2210: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 2214: ea00083a b 4304 <== NOT EXECUTED =============================================================================== 00003e08 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3e08: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3e0c: e59f7064 ldr r7, [pc, #100] ; 3e78 <== NOT EXECUTED 3e10: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 3e14: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 3e18: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 3e1c: e1a0300d mov r3, sp <== NOT EXECUTED 3e20: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 3e24: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3e28: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3e2c: eb0000d3 bl 4180 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 3e30: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3e34: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); 3e38: e1a00004 mov r0, r4 <== NOT EXECUTED rtems_event_receive((TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 3e3c: 1a000009 bne 3e68 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 3e40: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 3e44: e1a03283 lsl r3, r3, #5 <== NOT EXECUTED 3e48: e0873003 add r3, r7, r3 <== NOT EXECUTED 3e4c: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 3e50: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 3e54: 11a0e00f movne lr, pc <== NOT EXECUTED 3e58: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 3e5c: e1a00004 mov r0, r4 <== NOT EXECUTED 3e60: ebfff8ec bl 2218 <== NOT EXECUTED 3e64: eaffffec b 3e1c <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 3e68: e58460c8 str r6, [r4, #200] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3e6c: e1a00006 mov r0, r6 <== NOT EXECUTED 3e70: eb000320 bl 4af8 <== NOT EXECUTED 3e74: eaffffe8 b 3e1c <== NOT EXECUTED =============================================================================== 00002ea8 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2ea8: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2eac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2eb0: e5935028 ldr r5, [r3, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2eb4: e3a01000 mov r1, #0 ; 0x0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2eb8: e1a06000 mov r6, 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); 2ebc: e1a02001 mov r2, r1 2ec0: e5950018 ldr r0, [r5, #24] 2ec4: eb00064c bl 47fc if (sc != RTEMS_SUCCESSFUL) 2ec8: e250a000 subs sl, r0, #0 ; 0x0 2ecc: 1a00000d bne 2f08 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2ed0: e59520cc ldr r2, [r5, #204] 2ed4: e59f309c ldr r3, [pc, #156] ; 2f78 2ed8: e1a02282 lsl r2, r2, #5 2edc: e0833002 add r3, r3, r2 2ee0: e593300c ldr r3, [r3, #12] 2ee4: e3530000 cmp r3, #0 ; 0x0 2ee8: 0a000008 beq 2f10 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2eec: e1a01006 mov r1, r6 <== NOT EXECUTED 2ef0: e1a00005 mov r0, r5 <== NOT EXECUTED 2ef4: e1a0e00f mov lr, pc <== NOT EXECUTED 2ef8: e12fff13 bx r3 <== NOT EXECUTED 2efc: e1a0a000 mov sl, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2f00: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 2f04: eb000683 bl 4918 <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 2f08: e1a0000a mov r0, sl <== NOT EXECUTED 2f0c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2f10: e5953034 ldr r3, [r5, #52] 2f14: e3130001 tst r3, #1 ; 0x1 2f18: 0a000011 beq 2f64 uint32_t count = args->count; 2f1c: e596800c ldr r8, [r6, #12] char *buffer = args->buffer; while (count--) 2f20: e3580000 cmp r8, #0 ; 0x0 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 2f24: e5967008 ldr r7, [r6, #8] while (count--) 2f28: 01a0300a moveq r3, sl 2f2c: 0a000007 beq 2f50 2f30: e1a0400a mov r4, sl oproc (*buffer++, tty); 2f34: e7d70004 ldrb r0, [r7, r4] 2f38: e1a01005 mov r1, r5 2f3c: e2844001 add r4, r4, #1 ; 0x1 2f40: ebfffe5d bl 28bc return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2f44: e1580004 cmp r8, r4 2f48: 1afffff9 bne 2f34 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 2f4c: e596300c ldr r3, [r6, #12] 2f50: e5863014 str r3, [r6, #20] } rtems_semaphore_release (tty->osem); 2f54: e5950018 ldr r0, [r5, #24] 2f58: eb00066e bl 4918 return sc; } 2f5c: e1a0000a mov r0, sl 2f60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 2f64: e2860008 add r0, r6, #8 ; 0x8 <== NOT EXECUTED 2f68: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2f6c: e1a02005 mov r2, r5 <== NOT EXECUTED 2f70: ebfffe09 bl 279c <== NOT EXECUTED 2f74: eafffff4 b 2f4c <== NOT EXECUTED =============================================================================== 000124c8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 124c8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 124cc: e2518000 subs r8, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 124d0: e1a06000 mov r6, r0 124d4: e24dd004 sub sp, sp, #4 ; 0x4 124d8: e1a05002 mov r5, r2 124dc: e1a07003 mov r7, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 124e0: 03a0000a moveq r0, #10 ; 0xa 124e4: 0a000020 beq 1256c return RTEMS_INVALID_NUMBER; if ( !routine ) 124e8: e3520000 cmp r2, #0 ; 0x0 124ec: 03a00009 moveq r0, #9 ; 0x9 124f0: 0a00001d beq 1256c RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 124f4: e59f0088 ldr r0, [pc, #136] ; 12584 124f8: e1a01006 mov r1, r6 124fc: e1a0200d mov r2, sp 12500: eb000ae0 bl 15088 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12504: e59d3000 ldr r3, [sp] 12508: e3530000 cmp r3, #0 ; 0x0 1250c: e1a04000 mov r4, r0 12510: 13a00004 movne r0, #4 ; 0x4 12514: 1a000014 bne 1256c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12518: e284a010 add sl, r4, #16 ; 0x10 1251c: e1a0000a mov r0, sl 12520: eb001357 bl 17284 <_Watchdog_Remove> _ISR_Disable( level ); 12524: e10f2000 mrs r2, CPSR 12528: e38230c0 orr r3, r2, #192 ; 0xc0 1252c: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 12530: e5943018 ldr r3, [r4, #24] 12534: e3530000 cmp r3, #0 ; 0x0 12538: 1a00000d bne 12574 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1253c: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 12540: e584502c str r5, [r4, #44] the_watchdog->id = id; 12544: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 12548: e5847034 str r7, [r4, #52] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 1254c: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 12550: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12554: e59f002c ldr r0, [pc, #44] ; 12588 12558: e1a0100a mov r1, sl Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1255c: e584801c str r8, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12560: eb0012d8 bl 170c8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 12564: eb000d0c bl 1599c <_Thread_Enable_dispatch> 12568: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1256c: e28dd004 add sp, sp, #4 ; 0x4 12570: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 12574: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _Thread_Enable_dispatch(); 12578: eb000d07 bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED 1257c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12580: eafffff9 b 1256c <== NOT EXECUTED =============================================================================== 0001258c : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1258c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 12590: e59fc0d4 ldr ip, [pc, #212] ; 1266c 12594: e5dc4000 ldrb r4, [ip] 12598: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1259c: e1a07000 mov r7, r0 125a0: e24dd004 sub sp, sp, #4 ; 0x4 125a4: e1a04001 mov r4, r1 125a8: e1a06002 mov r6, r2 125ac: e1a09003 mov r9, r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 125b0: 03a0000b moveq r0, #11 ; 0xb 125b4: 1a000001 bne 125c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 125b8: e28dd004 add sp, sp, #4 ; 0x4 125bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 125c0: e1a00001 mov r0, r1 125c4: ebfff52d bl fa80 <_TOD_Validate> 125c8: e3500000 cmp r0, #0 ; 0x0 125cc: 0a000009 beq 125f8 return RTEMS_INVALID_CLOCK; if ( !routine ) 125d0: e3560000 cmp r6, #0 ; 0x0 125d4: 03a00009 moveq r0, #9 ; 0x9 125d8: 0afffff6 beq 125b8 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 125dc: e1a00004 mov r0, r4 125e0: ebfff4ec bl f998 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch ) 125e4: e59fb084 ldr fp, [pc, #132] ; 12670 125e8: e59b3000 ldr r3, [fp] 125ec: e1500003 cmp r0, r3 return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 125f0: e1a0a000 mov sl, r0 if ( seconds <= _TOD_Seconds_since_epoch ) 125f4: 8a000001 bhi 12600 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 125f8: e3a00014 mov r0, #20 ; 0x14 <== NOT EXECUTED 125fc: eaffffed b 125b8 <== NOT EXECUTED 12600: e59f006c ldr r0, [pc, #108] ; 12674 12604: e1a01007 mov r1, r7 12608: e1a0200d mov r2, sp 1260c: eb000a9d bl 15088 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12610: e59d8000 ldr r8, [sp] 12614: e3580000 cmp r8, #0 ; 0x0 12618: e1a05000 mov r5, r0 1261c: 13a00004 movne r0, #4 ; 0x4 12620: 1affffe4 bne 125b8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12624: e2854010 add r4, r5, #16 ; 0x10 12628: e1a00004 mov r0, r4 1262c: eb001314 bl 17284 <_Watchdog_Remove> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 12630: e5857030 str r7, [r5, #48] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12634: e59b3000 ldr r3, [fp] the_timer->the_class = TIMER_TIME_OF_DAY; 12638: e3a02002 mov r2, #2 ; 0x2 1263c: e063300a rsb r3, r3, sl _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12640: e59f0030 ldr r0, [pc, #48] ; 12678 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12644: e585301c str r3, [r5, #28] 12648: e5852038 str r2, [r5, #56] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1264c: e1a01004 mov r1, r4 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 12650: e585602c str r6, [r5, #44] the_watchdog->id = id; the_watchdog->user_data = user_data; 12654: e5859034 str r9, [r5, #52] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12658: e5858018 str r8, [r5, #24] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1265c: eb001299 bl 170c8 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); 12660: eb000ccd bl 1599c <_Thread_Enable_dispatch> 12664: e1a00008 mov r0, r8 12668: eaffffd2 b 125b8 =============================================================================== 000129cc : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 129cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 129d0: e3500000 cmp r0, #0 ; 0x0 129d4: e24dd010 sub sp, sp, #16 ; 0x10 129d8: e1a07001 mov r7, r1 129dc: e1a06002 mov r6, r2 129e0: 1a000002 bne 129f0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 129e4: e3a00013 mov r0, #19 ; 0x13 } return status; } 129e8: e28dd010 add sp, sp, #16 ; 0x10 129ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 129f0: e59f3144 ldr r3, [pc, #324] ; 12b3c 129f4: e5d32000 ldrb r2, [r3] 129f8: e1500002 cmp r0, r2 129fc: 8a00004a bhi 12b2c 12a00: e1a08000 mov r8, r0 <== NOT EXECUTED 12a04: e59f3134 ldr r3, [pc, #308] ; 12b40 12a08: e5932000 ldr r2, [r3] 12a0c: e2822001 add r2, r2, #1 ; 0x1 12a10: e5832000 str r2, [r3] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 12a14: e59fa128 ldr sl, [pc, #296] ; 12b44 12a18: e5da5000 ldrb r5, [sl] initialized = true; 12a1c: e3a03001 mov r3, #1 ; 0x1 12a20: e5ca3000 strb r3, [sl] _Thread_Enable_dispatch(); 12a24: eb000bdc bl 1599c <_Thread_Enable_dispatch> if ( tmpInitialized ) 12a28: e3550000 cmp r5, #0 ; 0x0 12a2c: 13a0000e movne r0, #14 ; 0xe 12a30: 1affffec bne 129e8 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12a34: e59f410c ldr r4, [pc, #268] ; 12b48 12a38: e284c004 add ip, r4, #4 ; 0x4 12a3c: e584c000 str ip, [r4] * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 12a40: e386e902 orr lr, r6, #32768 ; 0x8000 12a44: e28dc00c add ip, sp, #12 ; 0xc the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12a48: e5844008 str r4, [r4, #8] 12a4c: e1a01008 mov r1, r8 12a50: e58de000 str lr, [sp] 12a54: e58dc004 str ip, [sp, #4] 12a58: e1a02007 mov r2, r7 12a5c: e59f00e8 ldr r0, [pc, #232] ; 12b4c 12a60: e3a03c01 mov r3, #256 ; 0x100 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 12a64: e5845004 str r5, [r4, #4] 12a68: ebfffc60 bl 11bf0 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 12a6c: e3500000 cmp r0, #0 ; 0x0 initialized = false; 12a70: 15ca5000 strbne r5, [sl] /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 12a74: 1affffdb bne 129e8 * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 12a78: e59d200c ldr r2, [sp, #12] RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 12a7c: e59fc0cc ldr ip, [pc, #204] ; 12b50 12a80: e1a03802 lsl r3, r2, #16 12a84: e58d2008 str r2, [sp, #8] 12a88: e1dc21b0 ldrh r2, [ip, #16] 12a8c: e1a01823 lsr r1, r3, #16 12a90: e1520001 cmp r2, r1 12a94: 259c301c ldrcs r3, [ip, #28] 12a98: 27939101 ldrcs r9, [r3, r1, lsl #2] the_watchdog->routine = routine; 12a9c: e59f30b0 ldr r3, [pc, #176] ; 12b54 12aa0: 31a09000 movcc r9, r0 12aa4: e5893064 str r3, [r9, #100] /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 12aa8: e59fe0a8 ldr lr, [pc, #168] ; 12b58 12aac: e59f30a8 ldr r3, [pc, #168] ; 12b5c */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12ab0: e59f40a8 ldr r4, [pc, #168] ; 12b60 the_watchdog->id = id; 12ab4: e59f50a8 ldr r5, [pc, #168] ; 12b64 12ab8: e59d2008 ldr r2, [sp, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12abc: e59f60a4 ldr r6, [pc, #164] ; 12b68 12ac0: e583e000 str lr, [r3] * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 12ac4: e59fc0a0 ldr ip, [pc, #160] ; 12b6c the_watchdog->routine = routine; 12ac8: e59f3084 ldr r3, [pc, #132] ; 12b54 the_chain->permanent_null = NULL; 12acc: e3a0b000 mov fp, #0 ; 0x0 _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 12ad0: e1a00002 mov r0, r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12ad4: e2847004 add r7, r4, #4 ; 0x4 12ad8: e2858004 add r8, r5, #4 ; 0x4 the_watchdog->id = id; 12adc: e5892068 str r2, [r9, #104] the_watchdog->user_data = user_data; 12ae0: e589b06c str fp, [r9, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12ae4: e589b050 str fp, [r9, #80] 12ae8: e59f1080 ldr r1, [pc, #128] ; 12b70 12aec: e1a0200b mov r2, fp * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 12af0: e58c9000 str r9, [ip] 12af4: e5847000 str r7, [r4] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12af8: e5844008 str r4, [r4, #8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12afc: e5858000 str r8, [r5] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12b00: e5855008 str r5, [r5, #8] the_watchdog->routine = routine; 12b04: e586301c str r3, [r6, #28] the_watchdog->id = id; the_watchdog->user_data = user_data; 12b08: e586b024 str fp, [r6, #36] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 12b0c: e584b004 str fp, [r4, #4] 12b10: e585b004 str fp, [r5, #4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12b14: e586b008 str fp, [r6, #8] the_watchdog->routine = routine; the_watchdog->id = id; 12b18: e5860020 str r0, [r6, #32] _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 12b1c: ebfffd8e bl 1215c id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 12b20: e3500000 cmp r0, #0 ; 0x0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 12b24: 15cab000 strbne fp, [sl] 12b28: eaffffae b 129e8 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 12b2c: e3700001 cmn r0, #1 ; 0x1 12b30: 03a08000 moveq r8, #0 ; 0x0 12b34: 0affffb2 beq 12a04 12b38: eaffffa9 b 129e4 =============================================================================== 00012714 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 12714: e92d4030 push {r4, r5, lr} 12718: e24dd004 sub sp, sp, #4 ; 0x4 1271c: e1a01000 mov r1, r0 12720: e1a0200d mov r2, sp 12724: e59f00a8 ldr r0, [pc, #168] ; 127d4 12728: eb000a56 bl 15088 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1272c: e59d3000 ldr r3, [sp] 12730: e3530000 cmp r3, #0 ; 0x0 12734: e1a04000 mov r4, r0 12738: 13a00004 movne r0, #4 ; 0x4 1273c: 1a00000a bne 1276c case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 12740: e5943038 ldr r3, [r4, #56] 12744: e3530004 cmp r3, #4 ; 0x4 12748: 979ff103 ldrls pc, [pc, r3, lsl #2] 1274c: ea000011 b 12798 <== NOT EXECUTED 12750: 000127b0 .word 0x000127b0 <== NOT EXECUTED 12754: 00012774 .word 0x00012774 <== NOT EXECUTED 12758: 000127a4 .word 0x000127a4 <== NOT EXECUTED 1275c: 000127a4 .word 0x000127a4 <== NOT EXECUTED 12760: 000127a4 .word 0x000127a4 <== NOT EXECUTED _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 12764: eb000c8c bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED 12768: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1276c: e28dd004 add sp, sp, #4 ; 0x4 12770: e8bd8030 pop {r4, r5, pc} case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 12774: e59f505c ldr r5, [pc, #92] ; 127d8 <== NOT EXECUTED 12778: e5953000 ldr r3, [r5] <== NOT EXECUTED 1277c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 12780: 0afffff7 beq 12764 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 12784: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED 12788: eb0012bd bl 17284 <_Watchdog_Remove> <== NOT EXECUTED (*_Timer_Server_schedule_operation)( the_timer ); 1278c: e1a00004 mov r0, r4 <== NOT EXECUTED 12790: e1a0e00f mov lr, pc <== NOT EXECUTED 12794: e595f000 ldr pc, [r5] <== NOT EXECUTED case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 12798: eb000c7f bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED 1279c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 127a0: eafffff1 b 1276c <== NOT EXECUTED (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 127a4: eb000c7c bl 1599c <_Thread_Enable_dispatch> 127a8: e3a0000b mov r0, #11 ; 0xb 127ac: eaffffee b 1276c switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 127b0: e2844010 add r4, r4, #16 ; 0x10 127b4: e1a00004 mov r0, r4 127b8: eb0012b1 bl 17284 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 127bc: e59f0018 ldr r0, [pc, #24] ; 127dc 127c0: e1a01004 mov r1, r4 127c4: eb00123f bl 170c8 <_Watchdog_Insert> case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 127c8: eb000c73 bl 1599c <_Thread_Enable_dispatch> 127cc: e3a00000 mov r0, #0 ; 0x0 127d0: eaffffe5 b 1276c =============================================================================== 000127e0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 127e0: e92d41f0 push {r4, r5, r6, r7, r8, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 127e4: e59fc0d0 ldr ip, [pc, #208] ; 128bc 127e8: e59c4000 ldr r4, [ip] 127ec: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 127f0: e1a07000 mov r7, r0 127f4: e24dd004 sub sp, sp, #4 ; 0x4 127f8: e1a06001 mov r6, r1 127fc: e1a05002 mov r5, r2 12800: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 12804: 03a0000e moveq r0, #14 ; 0xe 12808: 0a000005 beq 12824 return RTEMS_INCORRECT_STATE; if ( !routine ) 1280c: e3520000 cmp r2, #0 ; 0x0 12810: 03a00009 moveq r0, #9 ; 0x9 12814: 0a000002 beq 12824 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 12818: e3510000 cmp r1, #0 ; 0x0 1281c: 03a0000a moveq r0, #10 ; 0xa 12820: 1a000001 bne 1282c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12824: e28dd004 add sp, sp, #4 ; 0x4 12828: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 1282c: e59f008c ldr r0, [pc, #140] ; 128c0 12830: e1a01007 mov r1, r7 12834: e1a0200d mov r2, sp 12838: eb000a12 bl 15088 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1283c: e59d3000 ldr r3, [sp] 12840: e3530000 cmp r3, #0 ; 0x0 12844: e1a04000 mov r4, r0 12848: 13a00004 movne r0, #4 ; 0x4 1284c: 1afffff4 bne 12824 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12850: e2840010 add r0, r4, #16 ; 0x10 12854: eb00128a bl 17284 <_Watchdog_Remove> _ISR_Disable( level ); 12858: e10f1000 mrs r1, CPSR 1285c: e38130c0 orr r3, r1, #192 ; 0xc0 12860: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 12864: e5942018 ldr r2, [r4, #24] 12868: e3520000 cmp r2, #0 ; 0x0 1286c: 1a00000e bne 128ac /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 12870: e3a03001 mov r3, #1 ; 0x1 12874: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12878: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 1287c: e584502c str r5, [r4, #44] the_watchdog->id = id; 12880: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 12884: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 12888: e584601c str r6, [r4, #28] _ISR_Enable( level ); 1288c: e129f001 msr CPSR_fc, r1 /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 12890: e59f302c ldr r3, [pc, #44] ; 128c4 12894: e1a00004 mov r0, r4 12898: e1a0e00f mov lr, pc 1289c: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 128a0: eb000c3d bl 1599c <_Thread_Enable_dispatch> 128a4: e3a00000 mov r0, #0 ; 0x0 128a8: eaffffdd b 12824 * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 128ac: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_Enable_dispatch(); 128b0: eb000c39 bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED 128b4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 128b8: eaffffd9 b 12824 <== NOT EXECUTED =============================================================================== 000128c8 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 128c8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 128cc: e59fc0e4 ldr ip, [pc, #228] ; 129b8 128d0: e59c4000 ldr r4, [ip] 128d4: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 128d8: e1a06000 mov r6, r0 128dc: e24dd004 sub sp, sp, #4 ; 0x4 128e0: e1a04001 mov r4, r1 128e4: e1a05002 mov r5, r2 128e8: e1a0a003 mov sl, r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 128ec: 03a0000e moveq r0, #14 ; 0xe 128f0: 0a00000c beq 12928 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 128f4: e59f30c0 ldr r3, [pc, #192] ; 129bc 128f8: e5d32000 ldrb r2, [r3] 128fc: e3520000 cmp r2, #0 ; 0x0 12900: 03a0000b moveq r0, #11 ; 0xb 12904: 0a000007 beq 12928 return RTEMS_NOT_DEFINED; if ( !routine ) 12908: e3550000 cmp r5, #0 ; 0x0 1290c: 03a00009 moveq r0, #9 ; 0x9 12910: 0a000004 beq 12928 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 12914: e1a00001 mov r0, r1 12918: ebfff458 bl fa80 <_TOD_Validate> 1291c: e3500000 cmp r0, #0 ; 0x0 12920: 1a000002 bne 12930 */ (*_Timer_Server_schedule_operation)( the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 12924: e3a00014 mov r0, #20 ; 0x14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12928: e28dd004 add sp, sp, #4 ; 0x4 1292c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 12930: e1a00004 mov r0, r4 12934: ebfff417 bl f998 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch ) 12938: e59f9080 ldr r9, [pc, #128] ; 129c0 1293c: e5993000 ldr r3, [r9] 12940: e1500003 cmp r0, r3 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 12944: e1a08000 mov r8, r0 if ( seconds <= _TOD_Seconds_since_epoch ) 12948: 9afffff5 bls 12924 1294c: e59f0070 ldr r0, [pc, #112] ; 129c4 12950: e1a01006 mov r1, r6 12954: e1a0200d mov r2, sp 12958: eb0009ca bl 15088 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1295c: e59d7000 ldr r7, [sp] 12960: e3570000 cmp r7, #0 ; 0x0 12964: e1a04000 mov r4, r0 12968: 13a00004 movne r0, #4 ; 0x4 1296c: 1affffed bne 12928 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12970: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED 12974: eb001242 bl 17284 <_Watchdog_Remove> <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 12978: e5846030 str r6, [r4, #48] <== NOT EXECUTED the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 1297c: e5993000 ldr r3, [r9] <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 12980: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 12984: e0633008 rsb r3, r3, r8 <== NOT EXECUTED /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 12988: e1a00004 mov r0, r4 <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 1298c: e5842038 str r2, [r4, #56] <== NOT EXECUTED _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 12990: e584301c str r3, [r4, #28] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 12994: e584502c str r5, [r4, #44] <== NOT EXECUTED /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 12998: e59f3028 ldr r3, [pc, #40] ; 129c8 <== NOT EXECUTED the_watchdog->id = id; the_watchdog->user_data = user_data; 1299c: e584a034 str sl, [r4, #52] <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 129a0: e5847018 str r7, [r4, #24] <== NOT EXECUTED 129a4: e1a0e00f mov lr, pc <== NOT EXECUTED 129a8: e593f000 ldr pc, [r3] <== NOT EXECUTED _Thread_Enable_dispatch(); 129ac: eb000bfa bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED 129b0: e1a00007 mov r0, r7 <== NOT EXECUTED 129b4: eaffffdb b 12928 <== NOT EXECUTED =============================================================================== 00002434 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 2434: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 2438: e2109202 ands r9, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 243c: e1a05000 mov r5, r0 <== NOT EXECUTED 2440: e1a06001 mov r6, r1 <== NOT EXECUTED 2444: e1a0a002 mov sl, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 2448: 0a00000c beq 2480 <== NOT EXECUTED { if (rtems_panic_in_progress++) 244c: e59f1190 ldr r1, [pc, #400] ; 25e4 <== NOT EXECUTED 2450: e5913000 ldr r3, [r1] <== NOT EXECUTED 2454: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2458: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 245c: e5813000 str r3, [r1] <== NOT EXECUTED 2460: 0a000003 beq 2474 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2464: e59f217c ldr r2, [pc, #380] ; 25e8 <== NOT EXECUTED 2468: e5923000 ldr r3, [r2] <== NOT EXECUTED 246c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 2470: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 2474: e5913000 ldr r3, [r1] <== NOT EXECUTED 2478: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 247c: ca00002f bgt 2540 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 2480: e59f8164 ldr r8, [pc, #356] ; 25ec <== NOT EXECUTED 2484: e5983000 ldr r3, [r8] <== NOT EXECUTED 2488: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 248c: eb002bc2 bl d39c <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 2490: e2150101 ands r0, r5, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 2494: e3c54207 bic r4, r5, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 2498: 01a07000 moveq r7, r0 <== NOT EXECUTED 249c: 1a000037 bne 2580 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 24a0: e5983000 ldr r3, [r8] <== NOT EXECUTED 24a4: e1a01006 mov r1, r6 <== NOT EXECUTED 24a8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 24ac: e1a0200a mov r2, sl <== NOT EXECUTED 24b0: eb00403a bl 125a0 <== NOT EXECUTED if (status) 24b4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 24b8: e1a06000 mov r6, r0 <== NOT EXECUTED if (status) 24bc: 1a000021 bne 2548 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 24c0: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 24c4: 0a00000b beq 24f8 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 24c8: da000004 ble 24e0 <== NOT EXECUTED 24cc: e1a00007 mov r0, r7 <== NOT EXECUTED 24d0: eb003089 bl e6fc <== NOT EXECUTED 24d4: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 24d8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 24dc: 1a000032 bne 25ac <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 24e0: e5983000 ldr r3, [r8] <== NOT EXECUTED 24e4: e59f1104 ldr r1, [pc, #260] ; 25f0 <== NOT EXECUTED 24e8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 24ec: e1a02007 mov r2, r7 <== NOT EXECUTED 24f0: eb002c82 bl d700 <== NOT EXECUTED 24f4: e0866000 add r6, r6, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 24f8: e5983000 ldr r3, [r8] <== NOT EXECUTED 24fc: e59f10f0 ldr r1, [pc, #240] ; 25f4 <== NOT EXECUTED 2500: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 2504: eb002c7d bl d700 <== NOT EXECUTED (void) fflush(stderr); 2508: e5983000 ldr r3, [r8] <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 250c: e1a04000 mov r4, r0 <== NOT EXECUTED (void) fflush(stderr); 2510: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 2514: eb002ba0 bl d39c <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 2518: e3150203 tst r5, #805306368 ; 0x30000000 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 251c: 00840006 addeq r0, r4, r6 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 2520: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 2524: e3590000 cmp r9, #0 ; 0x0 <== NOT EXECUTED 2528: 0a000029 beq 25d4 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 252c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2530: e59f10c0 ldr r1, [pc, #192] ; 25f8 <== NOT EXECUTED 2534: eb00003d bl 2630 <== NOT EXECUTED _exit(local_errno); 2538: e1a00007 mov r0, r7 <== NOT EXECUTED 253c: eb00019f bl 2bc0 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); abort(); 2540: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } } return chars_written; } 2544: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2548: e59f309c ldr r3, [pc, #156] ; 25ec <== NOT EXECUTED 254c: e5932000 ldr r2, [r3] <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 2550: e1a01004 mov r1, r4 <== NOT EXECUTED 2554: e59f00a0 ldr r0, [pc, #160] ; 25fc <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2558: e592400c ldr r4, [r2, #12] <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 255c: eb0021e4 bl acf4 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2560: e59f1098 ldr r1, [pc, #152] ; 2600 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 2564: e1a02000 mov r2, r0 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2568: e1a00004 mov r0, r4 <== NOT EXECUTED 256c: eb002c63 bl d700 <== NOT EXECUTED if (local_errno) 2570: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2574: e0866000 add r6, r6, r0 <== NOT EXECUTED if (local_errno) 2578: 0affffde beq 24f8 <== NOT EXECUTED 257c: eaffffd1 b 24c8 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 2580: eb002ac5 bl d09c <__errno> <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 2584: e5983000 ldr r3, [r8] <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 2588: e5907000 ldr r7, [r0] <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 258c: e1a01006 mov r1, r6 <== NOT EXECUTED 2590: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 2594: e1a0200a mov r2, sl <== NOT EXECUTED 2598: eb004000 bl 125a0 <== NOT EXECUTED if (status) 259c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 25a0: e1a06000 mov r6, r0 <== NOT EXECUTED if (status) 25a4: 0affffc5 beq 24c0 <== NOT EXECUTED 25a8: eaffffe6 b 2548 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 25ac: e5983000 ldr r3, [r8] <== NOT EXECUTED 25b0: e1a00007 mov r0, r7 <== NOT EXECUTED 25b4: e593400c ldr r4, [r3, #12] <== NOT EXECUTED 25b8: eb00304f bl e6fc <== NOT EXECUTED 25bc: e59f1040 ldr r1, [pc, #64] ; 2604 <== NOT EXECUTED 25c0: e1a02000 mov r2, r0 <== NOT EXECUTED 25c4: e1a00004 mov r0, r4 <== NOT EXECUTED 25c8: eb002c4c bl d700 <== NOT EXECUTED 25cc: e0866000 add r6, r6, r0 <== NOT EXECUTED 25d0: eaffffc8 b 24f8 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 25d4: e59f102c ldr r1, [pc, #44] ; 2608 <== NOT EXECUTED 25d8: e1a00009 mov r0, r9 <== NOT EXECUTED 25dc: eb000013 bl 2630 <== NOT EXECUTED abort(); 25e0: eb002aa4 bl d078 <== NOT EXECUTED =============================================================================== 00002e44 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2e44: e591303c ldr r3, [r1, #60] <== NOT EXECUTED 2e48: e3c33f61 bic r3, r3, #388 ; 0x184 <== NOT EXECUTED 2e4c: e3c33003 bic r3, r3, #3 ; 0x3 <== NOT EXECUTED 2e50: e1a03a03 lsl r3, r3, #20 <== NOT EXECUTED 2e54: e1a03a23 lsr r3, r3, #20 <== NOT EXECUTED 2e58: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2e5c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2e60: e1a05001 mov r5, r1 <== NOT EXECUTED 2e64: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2e68: 1a000002 bne 2e78 <== 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); 2e6c: e1a00004 mov r0, r4 <== NOT EXECUTED } return i; } 2e70: 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); 2e74: eaffff82 b 2c84 <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2e78: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2e7c: e1a02001 mov r2, r1 <== NOT EXECUTED 2e80: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 2e84: eb00065c bl 47fc <== NOT EXECUTED i = iproc (c, tty); 2e88: e1a01005 mov r1, r5 <== NOT EXECUTED 2e8c: e1a00004 mov r0, r4 <== NOT EXECUTED 2e90: ebffff7b bl 2c84 <== NOT EXECUTED 2e94: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2e98: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 2e9c: eb00069d bl 4918 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2ea0: e1a00004 mov r0, r4 <== NOT EXECUTED 2ea4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 00001d90 : */ void vprintk( const char *fmt, va_list ap ) { 1d90: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1d94: e1a08000 mov r8, r0 char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 1d98: e5d00000 ldrb r0, [r0] 1d9c: e3500000 cmp r0, #0 ; 0x0 */ void vprintk( const char *fmt, va_list ap ) { 1da0: e24dd01c sub sp, sp, #28 ; 0x1c 1da4: e1a07001 mov r7, r1 char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 1da8: 0a0000a1 beq 2034 1dac: e59fa3bc ldr sl, [pc, #956] ; 2170 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 1db0: e3500025 cmp r0, #37 ; 0x25 1db4: 1a000059 bne 1f20 fmt++; if (*fmt == '0' ) { 1db8: e5d80001 ldrb r0, [r8, #1] sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; 1dbc: e2881001 add r1, r8, #1 ; 0x1 if (*fmt == '0' ) { 1dc0: e3500030 cmp r0, #48 ; 0x30 lead = '0'; fmt++; 1dc4: 05f10001 ldrbeq r0, [r1, #1]! width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; if (*fmt == '0' ) { 1dc8: 13a09020 movne r9, #32 ; 0x20 lead = '0'; fmt++; 1dcc: 03a09030 moveq r9, #48 ; 0x30 } if (*fmt == '-' ) { 1dd0: e350002d cmp r0, #45 ; 0x2d minus = 1; fmt++; 1dd4: 05f10001 ldrbeq r0, [r1, #1]! 1dd8: 03a03001 moveq r3, #1 ; 0x1 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 1ddc: 13a02000 movne r2, #0 ; 0x0 minus = 1; fmt++; 1de0: 058d3000 streq r3, [sp] } while (*fmt >= '0' && *fmt <= '9' ) { 1de4: e2403030 sub r3, r0, #48 ; 0x30 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 1de8: 158d2000 strne r2, [sp] minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 1dec: e3530009 cmp r3, #9 ; 0x9 1df0: 83a04000 movhi r4, #0 ; 0x0 1df4: 81a08001 movhi r8, r1 1df8: 81a0b004 movhi fp, r4 1dfc: 8a00000b bhi 1e30 1e00: e3a04000 mov r4, #0 ; 0x0 width *= 10; width += (*fmt - '0'); 1e04: e1a03184 lsl r3, r4, #3 1e08: e1a02084 lsl r2, r4, #1 1e0c: e0822003 add r2, r2, r3 1e10: e0822000 add r2, r2, r0 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 1e14: e5f10001 ldrb r0, [r1, #1]! 1e18: e2403030 sub r3, r0, #48 ; 0x30 1e1c: e3530009 cmp r3, #9 ; 0x9 width *= 10; width += (*fmt - '0'); 1e20: e2424030 sub r4, r2, #48 ; 0x30 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 1e24: 9afffff6 bls 1e04 1e28: e1a0b004 mov fp, r4 1e2c: e1a08001 mov r8, r1 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 1e30: e350006c cmp r0, #108 ; 0x6c lflag = 1; c = *++fmt; 1e34: 05d10001 ldrbeq r0, [r1, #1] } switch (c) { 1e38: e2403044 sub r3, r0, #68 ; 0x44 fmt++; } if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; 1e3c: 02818001 addeq r8, r1, #1 ; 0x1 } switch (c) { 1e40: e3530034 cmp r3, #52 ; 0x34 1e44: 979ff103 ldrls pc, [pc, r3, lsl #2] 1e48: ea000034 b 1f20 1e4c: 0000203c .word 0x0000203c 1e50: 00001f20 .word 0x00001f20 1e54: 00001f20 .word 0x00001f20 1e58: 00001f20 .word 0x00001f20 1e5c: 00001f20 .word 0x00001f20 1e60: 0000203c .word 0x0000203c 1e64: 00001f20 .word 0x00001f20 1e68: 00001f20 .word 0x00001f20 1e6c: 00001f20 .word 0x00001f20 1e70: 00001f20 .word 0x00001f20 1e74: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1e78: 00001f40 .word 0x00001f40 <== NOT EXECUTED 1e7c: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1e80: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1e84: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1e88: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1e8c: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1e90: 00002130 .word 0x00002130 <== NOT EXECUTED 1e94: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1e98: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1e9c: 00002164 .word 0x00002164 <== NOT EXECUTED 1ea0: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ea4: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ea8: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1eac: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1eb0: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1eb4: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1eb8: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ebc: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ec0: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ec4: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ec8: 00002118 .word 0x00002118 <== NOT EXECUTED 1ecc: 0000203c .word 0x0000203c <== NOT EXECUTED 1ed0: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ed4: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ed8: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1edc: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ee0: 0000203c .word 0x0000203c <== NOT EXECUTED 1ee4: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ee8: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1eec: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ef0: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ef4: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1ef8: 00001f40 .word 0x00001f40 <== NOT EXECUTED 1efc: 00002164 .word 0x00002164 <== NOT EXECUTED 1f00: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1f04: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1f08: 00002074 .word 0x00002074 <== NOT EXECUTED 1f0c: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1f10: 00002130 .word 0x00002130 <== NOT EXECUTED 1f14: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1f18: 00001f20 .word 0x00001f20 <== NOT EXECUTED 1f1c: 00002164 .word 0x00002164 <== NOT EXECUTED if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 1f20: e1a0e00f mov lr, pc 1f24: e59af000 ldr pc, [sl] 1f28: e58d7004 str r7, [sp, #4] ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 1f2c: e5f80001 ldrb r0, [r8, #1]! 1f30: e3500000 cmp r0, #0 ; 0x0 1f34: 0a00003e beq 2034 1f38: e59d7004 ldr r7, [sp, #4] 1f3c: eaffff9b b 1db0 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 1f40: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1f44: e3a06008 mov r6, #8 ; 0x8 <== NOT EXECUTED break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 1f48: e5975000 ldr r5, [r7] 1f4c: e2877004 add r7, r7, #4 ; 0x4 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 1f50: e0133fa5 ands r3, r3, r5, lsr #31 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 1f54: e58d7004 str r7, [sp, #4] { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 1f58: 1a00003e bne 2058 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 1f5c: e1a00005 mov r0, r5 1f60: e1a01006 mov r1, r6 1f64: eb00403e bl 12064 <__aeabi_uidiv> 1f68: e3500000 cmp r0, #0 ; 0x0 1f6c: 01a04000 moveq r4, r0 1f70: 03a07001 moveq r7, #1 ; 0x1 1f74: 0a000010 beq 1fbc 1f78: e1a02005 mov r2, r5 1f7c: e3a04000 mov r4, #0 ; 0x0 1f80: e1a05000 mov r5, r0 1f84: ea000000 b 1f8c 1f88: e1a05000 mov r5, r0 toPrint[count++] = (num - (n*base)); 1f8c: e0030596 mul r3, r6, r5 1f90: e0633002 rsb r3, r3, r2 1f94: e28d2008 add r2, sp, #8 ; 0x8 1f98: e7c23004 strb r3, [r2, r4] num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 1f9c: e1a00005 mov r0, r5 1fa0: e1a01006 mov r1, r6 1fa4: eb00402e bl 12064 <__aeabi_uidiv> 1fa8: e3500000 cmp r0, #0 ; 0x0 1fac: e1a02005 mov r2, r5 toPrint[count++] = (num - (n*base)); 1fb0: e2844001 add r4, r4, #1 ; 0x1 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 1fb4: 1afffff3 bne 1f88 1fb8: e2847001 add r7, r4, #1 ; 0x1 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 1fbc: e28d201c add r2, sp, #28 ; 0x1c 1fc0: e0823004 add r3, r2, r4 for (n=maxwidth ; n > count; n-- ) 1fc4: e157000b cmp r7, fp 1fc8: e1a0600b mov r6, fp count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 1fcc: e5435014 strb r5, [r3, #-20] for (n=maxwidth ; n > count; n-- ) 1fd0: 2a000006 bcs 1ff0 1fd4: e20940ff and r4, r9, #255 ; 0xff 1fd8: e2466001 sub r6, r6, #1 ; 0x1 BSP_output_char(lead); 1fdc: e1a00004 mov r0, r4 1fe0: e1a0e00f mov lr, pc 1fe4: e59af000 ldr pc, [sl] toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 1fe8: e1570006 cmp r7, r6 1fec: 3afffff9 bcc 1fd8 BSP_output_char(lead); for (n = 0; n < count; n++) { 1ff0: e3570000 cmp r7, #0 ; 0x0 1ff4: 0affffcc beq 1f2c 1ff8: e28d301c add r3, sp, #28 ; 0x1c 1ffc: e3a04000 mov r4, #0 ; 0x0 2000: e0835007 add r5, r3, r7 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 2004: e0643005 rsb r3, r4, r5 2008: e5532015 ldrb r2, [r3, #-21] 200c: e59f3160 ldr r3, [pc, #352] ; 2174 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 2010: e2844001 add r4, r4, #1 ; 0x1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 2014: e7d30002 ldrb r0, [r3, r2] 2018: e1a0e00f mov lr, pc 201c: e59af000 ldr pc, [sl] toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 2020: e1570004 cmp r7, r4 2024: 8afffff6 bhi 2004 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2028: e5f80001 ldrb r0, [r8, #1]! 202c: e3500000 cmp r0, #0 ; 0x0 2030: 1affffc0 bne 1f38 base, sign, width, lead); } else { BSP_output_char(*fmt); } } } 2034: e28dd01c add sp, sp, #28 ; 0x1c 2038: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 203c: e5975000 ldr r5, [r7] if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2040: e3a03001 mov r3, #1 ; 0x1 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 2044: e2877004 add r7, r7, #4 ; 0x4 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 2048: e0133fa5 ands r3, r3, r5, lsr #31 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 204c: e3a0600a mov r6, #10 ; 0xa BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 2050: e58d7004 str r7, [sp, #4] { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 2054: 0affffc0 beq 1f5c BSP_output_char('-'); 2058: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED 205c: e1a0e00f mov lr, pc <== NOT EXECUTED 2060: e59af000 ldr pc, [sl] <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 2064: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 2068: e2655000 rsb r5, r5, #0 ; 0x0 <== NOT EXECUTED if (maxwidth) maxwidth--; 206c: 124bb001 subne fp, fp, #1 ; 0x1 <== NOT EXECUTED 2070: eaffffb9 b 1f5c <== NOT EXECUTED case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 2074: e5979000 ldr r9, [r7] /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2078: e5d93000 ldrb r3, [r9] case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 207c: e2877004 add r7, r7, #4 ; 0x4 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2080: e3530000 cmp r3, #0 ; 0x0 case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 2084: e58d7004 str r7, [sp, #4] /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2088: 01a06003 moveq r6, r3 208c: 0a000004 beq 20a4 2090: e3a06000 mov r6, #0 ; 0x0 2094: e2866001 add r6, r6, #1 ; 0x1 2098: e7d93006 ldrb r3, [r9, r6] 209c: e3530000 cmp r3, #0 ; 0x0 20a0: 1afffffb bne 2094 ; /* leading spaces */ if ( !minus ) 20a4: e59d2000 ldr r2, [sp] 20a8: e3520000 cmp r2, #0 ; 0x0 20ac: 0a000022 beq 213c for ( i=len ; i 20c0: e5d90000 ldrb r0, [r9] 20c4: e3500000 cmp r0, #0 ; 0x0 20c8: 0a000005 beq 20e4 20cc: e1a04009 mov r4, r9 BSP_output_char(*str); 20d0: e1a0e00f mov lr, pc 20d4: e59af000 ldr pc, [sl] if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 20e4: e59d3000 ldr r3, [sp] 20e8: e3530000 cmp r3, #0 ; 0x0 20ec: 0affff8e beq 1f2c for ( i=len ; i 20f8: e1a04006 mov r4, r6 20fc: e2844001 add r4, r4, #1 ; 0x1 BSP_output_char(' '); 2100: e3a00020 mov r0, #32 ; 0x20 2104: e1a0e00f mov lr, pc 2108: e59af000 ldr pc, [sl] for ( i=0 ; i 2114: eaffff84 b 1f2c BSP_output_char(' '); } break; case 'c': BSP_output_char(va_arg(ap, int)); 2118: e5d70000 ldrb r0, [r7] <== NOT EXECUTED 211c: e2877004 add r7, r7, #4 ; 0x4 <== NOT EXECUTED 2120: e58d7004 str r7, [sp, #4] <== NOT EXECUTED 2124: e1a0e00f mov lr, pc <== NOT EXECUTED 2128: e59af000 ldr pc, [sl] <== NOT EXECUTED 212c: eaffff7e b 1f2c <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2130: e3a03000 mov r3, #0 ; 0x0 2134: e3a0600a mov r6, #10 ; 0xa 2138: eaffff82 b 1f48 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 2144: e1a05006 mov r5, r6 <== NOT EXECUTED 2148: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED BSP_output_char(' '); 214c: e3a00020 mov r0, #32 ; 0x20 <== NOT EXECUTED 2150: e1a0e00f mov lr, pc <== NOT EXECUTED 2154: e59af000 ldr pc, [sl] <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NOT EXECUTED 2160: eaffffd4 b 20b8 <== NOT EXECUTED break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 2164: e3a03000 mov r3, #0 ; 0x0 2168: e3a06010 mov r6, #16 ; 0x10 216c: eaffff75 b 1f48 =============================================================================== 00013e34 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 13e34: e59f30c4 ldr r3, [pc, #196] ; 13f00 13e38: e593c000 ldr ip, [r3] 13e3c: e150000c cmp r0, ip ssize_t write( int fd, const void *buffer, size_t count ) { 13e40: e92d4070 push {r4, r5, r6, lr} 13e44: e1a06001 mov r6, r1 13e48: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 13e4c: 2a00001c bcs 13ec4 iop = rtems_libio_iop( fd ); 13e50: e1a03200 lsl r3, r0, #4 13e54: e0433100 sub r3, r3, r0, lsl #2 13e58: e0833000 add r3, r3, r0 13e5c: e59f00a0 ldr r0, [pc, #160] ; 13f04 13e60: e590c000 ldr ip, [r0] 13e64: e1a03103 lsl r3, r3, #2 13e68: e08c4003 add r4, ip, r3 rtems_libio_check_is_open( iop ); 13e6c: e594300c ldr r3, [r4, #12] 13e70: e3130c01 tst r3, #256 ; 0x100 13e74: 0a000012 beq 13ec4 rtems_libio_check_buffer( buffer ); 13e78: e3510000 cmp r1, #0 ; 0x0 13e7c: 0a00001a beq 13eec rtems_libio_check_count( count ); 13e80: e3520000 cmp r2, #0 ; 0x0 13e84: 01a00002 moveq r0, r2 13e88: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 13e8c: e3130004 tst r3, #4 ; 0x4 13e90: 0a00000b beq 13ec4 /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 13e94: e5943030 ldr r3, [r4, #48] 13e98: e593300c ldr r3, [r3, #12] 13e9c: e3530000 cmp r3, #0 ; 0x0 13ea0: 0a00000c beq 13ed8 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 13ea4: e1a00004 mov r0, r4 13ea8: e1a0e00f mov lr, pc 13eac: e12fff13 bx r3 if ( rc > 0 ) 13eb0: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 13eb4: c5943008 ldrgt r3, [r4, #8] 13eb8: c0833000 addgt r3, r3, r0 13ebc: c5843008 strgt r3, [r4, #8] return rc; } 13ec0: e8bd8070 pop {r4, r5, r6, pc} rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 13ec4: ebffdd3b bl b3b8 <__errno> <== NOT EXECUTED 13ec8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 13ecc: e5803000 str r3, [r0] <== NOT EXECUTED 13ed0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13ed4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 13ed8: ebffdd36 bl b3b8 <__errno> <== NOT EXECUTED 13edc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 13ee0: e5803000 str r3, [r0] <== NOT EXECUTED 13ee4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13ee8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); 13eec: ebffdd31 bl b3b8 <__errno> <== NOT EXECUTED 13ef0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 13ef4: e5803000 str r3, [r0] <== NOT EXECUTED 13ef8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13efc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED