40009638 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 40009638: c2 02 00 00 ld [ %o0 ], %g1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4000963c: c4 02 20 0c ld [ %o0 + 0xc ], %g2 switch( node->type ) { 40009640: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 40009644: 80 a0 60 06 cmp %g1, 6 40009648: 18 80 00 0a bgu 40009670 4000964c: c8 00 a0 2c ld [ %g2 + 0x2c ], %g4 40009650: 83 28 60 02 sll %g1, 2, %g1 40009654: 05 10 00 25 sethi %hi(0x40009400), %g2 40009658: 84 10 a2 1c or %g2, 0x21c, %g2 ! 4000961c 4000965c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40009660: 81 c0 c0 00 jmp %g3 40009664: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 40009668: c2 01 20 08 ld [ %g4 + 8 ], %g1 4000966c: c2 22 20 04 st %g1, [ %o0 + 4 ] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 40009670: 81 c3 e0 08 retl 40009674: 90 10 20 00 clr %o0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 40009678: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 4000967c: c2 22 20 04 st %g1, [ %o0 + 4 ] <== NOT EXECUTED break; } return 0; } 40009680: 81 c3 e0 08 retl <== NOT EXECUTED 40009684: 90 10 20 00 clr %o0 <== NOT EXECUTED case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 40009688: 03 10 00 5c sethi %hi(0x40017000), %g1 <== NOT EXECUTED 4000968c: 82 10 60 cc or %g1, 0xcc, %g1 ! 400170cc <== NOT EXECUTED 40009690: c2 22 20 04 st %g1, [ %o0 + 4 ] <== NOT EXECUTED loc->handlers = fs_info->memfile_handlers; break; } return 0; } 40009694: 81 c3 e0 08 retl <== NOT EXECUTED 40009698: 90 10 20 00 clr %o0 <== NOT EXECUTED switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4000969c: 03 10 00 5c sethi %hi(0x40017000), %g1 400096a0: 82 10 60 94 or %g1, 0x94, %g1 ! 40017094 400096a4: c2 22 20 04 st %g1, [ %o0 + 4 ] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 400096a8: 81 c3 e0 08 retl 400096ac: 90 10 20 00 clr %o0 4001fdbc : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4001fdbc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 4001fdc0: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 4001fdc4: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 4001fdc8: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED jnode->st_gid = group; 4001fdcc: f4 34 20 3a sth %i2, [ %l0 + 0x3a ] <== NOT EXECUTED IMFS_update_ctime( jnode ); 4001fdd0: 7f ff 96 72 call 40005798 <== NOT EXECUTED 4001fdd4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001fdd8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4001fddc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED return 0; } 4001fde0: 81 c7 e0 08 ret <== NOT EXECUTED 4001fde4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000c1c0 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000c1c0: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; if ( parent_loc != NULL ) 4000c1c4: a2 96 20 00 orcc %i0, 0, %l1 4000c1c8: 02 80 00 03 be 4000c1d4 4000c1cc: a0 10 20 00 clr %l0 parent = parent_loc->node_access; 4000c1d0: e0 04 40 00 ld [ %l1 ], %l0 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000c1d4: 90 10 20 01 mov 1, %o0 4000c1d8: 7f ff f8 a8 call 4000a478 4000c1dc: 92 10 20 5c mov 0x5c, %o1 if ( !node ) 4000c1e0: b0 92 20 00 orcc %o0, 0, %i0 4000c1e4: 02 80 00 2e be 4000c29c 4000c1e8: 82 10 20 01 mov 1, %g1 * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4000c1ec: 92 10 00 1a mov %i2, %o1 4000c1f0: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; 4000c1f4: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] node->type = type; 4000c1f8: f2 26 20 48 st %i1, [ %i0 + 0x48 ] strncpy( node->name, name, IMFS_NAME_MAX ); 4000c1fc: 40 00 07 66 call 4000df94 4000c200: 90 06 20 0c add %i0, 0xc, %o0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000c204: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000c208: c4 00 63 cc ld [ %g1 + 0x3cc ], %g2 ! 40017fcc /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000c20c: 90 07 bf f0 add %fp, -16, %o0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000c210: c2 10 a0 24 lduh [ %g2 + 0x24 ], %g1 /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000c214: 92 10 20 00 clr %o1 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000c218: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 4000c21c: c0 36 20 38 clrh [ %i0 + 0x38 ] /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000c220: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000c224: 7f ff f9 4d call 4000a758 4000c228: c0 36 20 3a clrh [ %i0 + 0x3a ] node->stat_atime = (time_t) tv.tv_sec; 4000c22c: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 4000c230: 80 a6 60 06 cmp %i1, 6 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; 4000c234: c2 26 20 44 st %g1, [ %i0 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4000c238: c2 26 20 3c st %g1, [ %i0 + 0x3c ] /* * Set the type specific information */ switch (type) { 4000c23c: 08 80 00 1a bleu 4000c2a4 4000c240: c2 26 20 40 st %g1, [ %i0 + 0x40 ] node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; default: assert(0); 4000c244: 11 10 00 5c sethi %hi(0x40017000), %o0 <== NOT EXECUTED 4000c248: 15 10 00 5c sethi %hi(0x40017000), %o2 <== NOT EXECUTED 4000c24c: 17 10 00 5a sethi %hi(0x40016800), %o3 <== NOT EXECUTED 4000c250: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED 4000c254: 94 12 a3 80 or %o2, 0x380, %o2 <== NOT EXECUTED 4000c258: 96 12 e3 40 or %o3, 0x340, %o3 <== NOT EXECUTED 4000c25c: 7f ff d7 08 call 40001e7c <__assert_func> <== NOT EXECUTED 4000c260: 92 10 20 74 mov 0x74, %o1 <== NOT EXECUTED case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 4000c264: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED 4000c268: c2 26 20 4c st %g1, [ %i0 + 0x4c ] <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000c26c: 80 a4 20 00 cmp %l0, 0 4000c270: 02 80 00 0b be 4000c29c 4000c274: 90 04 20 4c add %l0, 0x4c, %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4000c278: 7f ff e7 e9 call 4000621c <_Chain_Append> 4000c27c: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; 4000c280: c2 04 60 0c ld [ %l1 + 0xc ], %g1 * 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; 4000c284: e0 26 20 08 st %l0, [ %i0 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 4000c288: c6 00 60 2c ld [ %g1 + 0x2c ], %g3 node->st_ino = ++fs_info->ino_count; 4000c28c: c4 00 c0 00 ld [ %g3 ], %g2 4000c290: 84 00 a0 01 inc %g2 4000c294: c4 20 c0 00 st %g2, [ %g3 ] 4000c298: c4 26 20 34 st %g2, [ %i0 + 0x34 ] } return node; } 4000c29c: 81 c7 e0 08 ret 4000c2a0: 81 e8 00 00 restore /* * Set the type specific information */ switch (type) { 4000c2a4: 83 2e 60 02 sll %i1, 2, %g1 4000c2a8: 05 10 00 30 sethi %hi(0x4000c000), %g2 4000c2ac: 84 10 a1 a4 or %g2, 0x1a4, %g2 ! 4000c1a4 4000c2b0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000c2b4: 81 c0 c0 00 jmp %g3 4000c2b8: 01 00 00 00 nop node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000c2bc: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000c2c0: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000c2c4: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED node->info.file.indirect = 0; 4000c2c8: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED node->info.file.doubly_indirect = 0; 4000c2cc: c0 26 20 54 clr [ %i0 + 0x54 ] <== NOT EXECUTED node->info.file.triply_indirect = 0; 4000c2d0: 10 bf ff e7 b 4000c26c <== NOT EXECUTED 4000c2d4: c0 26 20 58 clr [ %i0 + 0x58 ] <== NOT EXECUTED 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; 4000c2d8: c2 07 20 04 ld [ %i4 + 4 ], %g1 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000c2dc: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 4000c2e0: c2 26 20 50 st %g1, [ %i0 + 0x50 ] case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000c2e4: 10 bf ff e2 b 4000c26c 4000c2e8: c4 26 20 4c st %g2, [ %i0 + 0x4c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000c2ec: 82 06 20 50 add %i0, 0x50, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000c2f0: 84 06 20 4c add %i0, 0x4c, %g2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000c2f4: c0 26 20 50 clr [ %i0 + 0x50 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000c2f8: c2 26 20 4c st %g1, [ %i0 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000c2fc: 10 bf ff dc b 4000c26c 4000c300: c4 26 20 54 st %g2, [ %i0 + 0x54 ] 4000981c : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000981c: 9d e3 bf 70 save %sp, -144, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 40009820: e0 06 80 00 ld [ %i2 ], %l0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 40009824: 03 10 00 5f sethi %hi(0x40017c00), %g1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 40009828: a4 10 20 00 clr %l2 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000982c: aa 10 63 cc or %g1, 0x3cc, %l5 40009830: a6 07 bf d0 add %fp, -48, %l3 40009834: a8 07 bf f4 add %fp, -12, %l4 * 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 ); 40009838: 90 06 00 12 add %i0, %l2, %o0 4000983c: 92 10 00 13 mov %l3, %o1 40009840: 40 00 01 b7 call 40009f1c 40009844: 94 10 00 14 mov %l4, %o2 i += len; if ( !pathloc->node_access ) 40009848: c6 06 80 00 ld [ %i2 ], %g3 * 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 ); 4000984c: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 40009850: 80 a0 e0 00 cmp %g3, 0 40009854: 02 80 00 67 be 400099f0 40009858: d6 07 bf f4 ld [ %fp + -12 ], %o3 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000985c: 80 a2 20 00 cmp %o0, 0 40009860: 12 80 00 19 bne 400098c4 40009864: a4 04 80 0b add %l2, %o3, %l2 * 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 ) { 40009868: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 4000986c: 80 a0 60 01 cmp %g1, 1 40009870: 12 80 00 73 bne 40009a3c 40009874: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 40009878: c4 00 e0 58 ld [ %g3 + 0x58 ], %g2 4000987c: 80 a0 a0 00 cmp %g2, 0 40009880: 02 80 00 6f be 40009a3c 40009884: 90 24 80 0b sub %l2, %o3, %o0 newloc = node->info.directory.mt_fs->mt_fs_root; 40009888: c8 00 a0 20 ld [ %g2 + 0x20 ], %g4 <== NOT EXECUTED *pathloc = newloc; 4000988c: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 <== 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; 40009890: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 40009894: da 01 00 00 ld [ %g4 ], %o5 <== 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; 40009898: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 <== NOT EXECUTED *pathloc = newloc; 4000989c: c6 26 a0 0c st %g3, [ %i2 + 0xc ] <== NOT EXECUTED 400098a0: c2 26 a0 04 st %g1, [ %i2 + 4 ] <== NOT EXECUTED 400098a4: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 400098a8: 90 06 00 08 add %i0, %o0, %o0 <== NOT EXECUTED */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 400098ac: c8 26 a0 08 st %g4, [ %i2 + 8 ] <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 400098b0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400098b4: 9f c3 40 00 call %o5 <== NOT EXECUTED 400098b8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 400098bc: 81 c7 e0 08 ret <== NOT EXECUTED 400098c0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 400098c4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400098c8: 80 a0 60 01 cmp %g1, 1 400098cc: 02 80 00 3d be 400099c0 400098d0: a0 10 00 03 mov %g3, %l0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 400098d4: 80 a4 60 03 cmp %l1, 3 <== NOT EXECUTED 400098d8: 02 80 00 0a be 40009900 400098dc: 80 a4 60 04 cmp %l1, 4 400098e0: 02 80 00 31 be 400099a4 400098e4: 80 a4 60 02 cmp %l1, 2 400098e8: 02 80 00 1c be 40009958 400098ec: 80 a4 60 04 cmp %l1, 4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 400098f0: 12 bf ff d3 bne 4000983c 400098f4: 90 06 00 12 add %i0, %l2, %o0 * 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 ) { 400098f8: 10 bf ff dd b 4000986c <== NOT EXECUTED 400098fc: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 40009900: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 40009904: 80 a0 60 03 cmp %g1, 3 40009908: 02 80 00 40 be 40009a08 4000990c: 80 a0 60 04 cmp %g1, 4 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 40009910: 02 80 00 5f be 40009a8c 40009914: 90 10 00 1a mov %i2, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 40009918: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000991c: 80 a0 60 01 cmp %g1, 1 40009920: 12 80 00 41 bne 40009a24 40009924: 01 00 00 00 nop /* * 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 ) { 40009928: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 4000992c: 80 a0 e0 00 cmp %g3, 0 40009930: 32 80 00 4d bne,a 40009a64 40009934: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 <== NOT EXECUTED /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 40009938: 90 10 00 10 mov %l0, %o0 4000993c: 40 00 01 4a call 40009e64 40009940: 92 10 00 13 mov %l3, %o1 if ( !node ) 40009944: a0 92 20 00 orcc %o0, 0, %l0 40009948: 02 80 00 2a be 400099f0 4000994c: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; 40009950: 10 bf ff ba b 40009838 40009954: e0 26 80 00 st %l0, [ %i2 ] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 40009958: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED 4000995c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 <== NOT EXECUTED 40009960: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40009964: 02 bf ff b6 be 4000983c <== NOT EXECUTED 40009968: 90 06 00 12 add %i0, %l2, %o0 <== NOT EXECUTED /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000996c: d8 06 a0 0c ld [ %i2 + 0xc ], %o4 <== NOT EXECUTED 40009970: c2 03 20 18 ld [ %o4 + 0x18 ], %g1 <== NOT EXECUTED 40009974: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40009978: 22 80 00 4c be,a 40009aa8 <== NOT EXECUTED 4000997c: c8 03 20 10 ld [ %o4 + 0x10 ], %g4 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 40009980: e0 00 e0 08 ld [ %g3 + 8 ], %l0 <== NOT EXECUTED 40009984: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40009988: 32 bf ff ad bne,a 4000983c <== NOT EXECUTED 4000998c: e0 26 80 00 st %l0, [ %i2 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); 40009990: 40 00 0c 3f call 4000ca8c <__errno> <== NOT EXECUTED 40009994: 01 00 00 00 nop <== NOT EXECUTED 40009998: e2 22 00 00 st %l1, [ %o0 ] <== NOT EXECUTED 4000999c: 10 80 00 07 b 400099b8 <== NOT EXECUTED 400099a0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 400099a4: 40 00 0c 3a call 4000ca8c <__errno> <== NOT EXECUTED 400099a8: 01 00 00 00 nop <== NOT EXECUTED 400099ac: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED 400099b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400099b4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 400099b8: 81 c7 e0 08 ret 400099bc: 91 e8 00 08 restore %g0, %o0, %o0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400099c0: c2 10 e0 2e lduh [ %g3 + 0x2e ], %g1 400099c4: 80 88 60 40 btst 0x40, %g1 400099c8: 12 bf ff c4 bne 400098d8 400099cc: 80 a4 60 03 cmp %l1, 3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 400099d0: 40 00 0c 2f call 4000ca8c <__errno> <== NOT EXECUTED 400099d4: 01 00 00 00 nop <== NOT EXECUTED 400099d8: 82 10 20 0d mov 0xd, %g1 ! d <== NOT EXECUTED 400099dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400099e0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return result; } 400099e4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400099e8: 81 c7 e0 08 ret <== NOT EXECUTED 400099ec: 81 e8 00 00 restore <== NOT EXECUTED * 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 ); 400099f0: 40 00 0c 27 call 4000ca8c <__errno> <== NOT EXECUTED 400099f4: 01 00 00 00 nop <== NOT EXECUTED 400099f8: 82 10 20 02 mov 2, %g1 ! 2 <== NOT EXECUTED 400099fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009a00: 10 bf ff ee b 400099b8 <== NOT EXECUTED 40009a04: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 40009a08: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 40009a0c: 7f ff ff 30 call 400096cc <== NOT EXECUTED 40009a10: 92 10 20 00 clr %o1 <== NOT EXECUTED node = pathloc->node_access; 40009a14: e0 06 80 00 ld [ %i2 ], %l0 <== NOT EXECUTED if ( !node ) 40009a18: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40009a1c: 32 bf ff c0 bne,a 4000991c <== NOT EXECUTED 40009a20: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40009a24: 40 00 0c 1a call 4000ca8c <__errno> <== NOT EXECUTED 40009a28: 01 00 00 00 nop <== NOT EXECUTED 40009a2c: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 40009a30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009a34: 10 bf ff e1 b 400099b8 <== NOT EXECUTED 40009a38: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 40009a3c: 7f ff fe ff call 40009638 40009a40: 90 10 00 1a mov %i2, %o0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 40009a44: c2 06 80 00 ld [ %i2 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 40009a48: 87 2e 60 06 sll %i1, 6, %g3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 40009a4c: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 40009a50: 84 08 c0 02 and %g3, %g2, %g2 40009a54: 80 a0 c0 02 cmp %g3, %g2 40009a58: 12 bf ff de bne 400099d0 40009a5c: 01 00 00 00 nop 40009a60: 30 bf ff d6 b,a 400099b8 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 40009a64: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1 <== 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; 40009a68: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 40009a6c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== 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; 40009a70: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 40009a74: da 01 00 00 ld [ %g4 ], %o5 <== NOT EXECUTED * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 40009a78: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 40009a7c: 90 24 80 08 sub %l2, %o0, %o0 <== NOT EXECUTED * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 40009a80: c4 26 a0 04 st %g2, [ %i2 + 4 ] <== NOT EXECUTED 40009a84: 10 bf ff 89 b 400098a8 <== NOT EXECUTED 40009a88: c6 26 80 00 st %g3, [ %i2 ] <== 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 ); 40009a8c: 7f ff ff 2b call 40009738 <== NOT EXECUTED 40009a90: 92 10 20 00 clr %o1 <== NOT EXECUTED node = pathloc->node_access; if ( result == -1 ) 40009a94: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40009a98: 02 bf ff c8 be 400099b8 <== NOT EXECUTED 40009a9c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 40009aa0: 10 bf ff 9e b 40009918 <== NOT EXECUTED 40009aa4: a0 10 00 01 mov %g1, %l0 <== 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; *pathloc = newloc; 40009aa8: c2 03 20 14 ld [ %o4 + 0x14 ], %g1 <== 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; 40009aac: c4 03 20 0c ld [ %o4 + 0xc ], %g2 <== NOT EXECUTED 40009ab0: c6 03 20 08 ld [ %o4 + 8 ], %g3 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); 40009ab4: da 01 00 00 ld [ %g4 ], %o5 <== NOT EXECUTED 40009ab8: 90 24 80 0b sub %l2, %o3, %o0 <== 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; *pathloc = newloc; 40009abc: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED 40009ac0: c4 26 a0 04 st %g2, [ %i2 + 4 ] <== NOT EXECUTED 40009ac4: 10 bf ff 79 b 400098a8 <== NOT EXECUTED 40009ac8: c6 26 80 00 st %g3, [ %i2 ] <== NOT EXECUTED 40009b98 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 40009b98: 9d e3 bf 70 save %sp, -144, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 40009b9c: e2 06 40 00 ld [ %i1 ], %l1 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 40009ba0: a4 10 00 18 mov %i0, %l2 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 40009ba4: 03 10 00 5f sethi %hi(0x40017c00), %g1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 40009ba8: b0 10 20 00 clr %i0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 40009bac: aa 10 63 cc or %g1, 0x3cc, %l5 40009bb0: a6 07 bf d0 add %fp, -48, %l3 40009bb4: a8 07 bf f4 add %fp, -12, %l4 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 40009bb8: 90 04 80 18 add %l2, %i0, %o0 40009bbc: 92 10 00 13 mov %l3, %o1 40009bc0: 40 00 00 d7 call 40009f1c 40009bc4: 94 10 00 14 mov %l4, %o2 40009bc8: a0 10 00 08 mov %o0, %l0 i += len; if ( !pathloc->node_access ) 40009bcc: d0 06 40 00 ld [ %i1 ], %o0 40009bd0: 80 a2 20 00 cmp %o0, 0 40009bd4: 02 80 00 61 be 40009d58 40009bd8: d8 07 bf f4 ld [ %fp + -12 ], %o4 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 40009bdc: 80 a4 20 00 cmp %l0, 0 40009be0: 32 80 00 09 bne,a 40009c04 40009be4: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 40009be8: 40 00 0b a9 call 4000ca8c <__errno> <== NOT EXECUTED 40009bec: 01 00 00 00 nop <== NOT EXECUTED 40009bf0: 82 10 20 11 mov 0x11, %g1 ! 11 <== NOT EXECUTED 40009bf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009bf8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009bfc: 81 c7 e0 08 ret 40009c00: 91 e8 00 08 restore %g0, %o0, %o0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 40009c04: 80 a0 60 01 cmp %g1, 1 40009c08: 02 80 00 5b be 40009d74 40009c0c: a2 10 00 08 mov %o0, %l1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 40009c10: 80 a4 20 02 cmp %l0, 2 <== NOT EXECUTED 40009c14: 02 80 00 2d be 40009cc8 40009c18: b0 06 00 0c add %i0, %o4, %i0 40009c1c: 80 a4 20 02 cmp %l0, 2 40009c20: 08 80 00 0e bleu 40009c58 40009c24: 80 a4 20 00 cmp %l0, 0 40009c28: 80 a4 20 03 cmp %l0, 3 40009c2c: 02 80 00 0f be 40009c68 40009c30: 80 a4 20 04 cmp %l0, 4 40009c34: 12 bf ff e2 bne 40009bbc <== NOT EXECUTED 40009c38: 90 04 80 18 add %l2, %i0, %o0 <== 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 ); 40009c3c: 40 00 0b 94 call 4000ca8c <__errno> <== NOT EXECUTED 40009c40: 01 00 00 00 nop <== NOT EXECUTED 40009c44: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED 40009c48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009c4c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009c50: 81 c7 e0 08 ret <== NOT EXECUTED 40009c54: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 40009c58: 02 bf ff e4 be 40009be8 40009c5c: 90 04 80 18 add %l2, %i0, %o0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 40009c60: 10 bf ff d8 b 40009bc0 40009c64: 92 10 00 13 mov %l3, %o1 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 40009c68: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 40009c6c: 80 a0 60 03 cmp %g1, 3 40009c70: 02 80 00 6e be 40009e28 40009c74: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 40009c78: 22 80 00 6d be,a 40009e2c 40009c7c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 40009c80: 80 a2 20 00 cmp %o0, 0 40009c84: 02 80 00 54 be 40009dd4 40009c88: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 40009c8c: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 40009c90: 80 a0 60 01 cmp %g1, 1 40009c94: 12 80 00 50 bne 40009dd4 40009c98: 01 00 00 00 nop /* * 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 ) { 40009c9c: c6 02 20 58 ld [ %o0 + 0x58 ], %g3 40009ca0: 80 a0 e0 00 cmp %g3, 0 40009ca4: 32 80 00 52 bne,a 40009dec 40009ca8: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 <== NOT EXECUTED /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 40009cac: 40 00 00 6e call 40009e64 40009cb0: 92 10 00 13 mov %l3, %o1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 40009cb4: a2 92 20 00 orcc %o0, 0, %l1 40009cb8: 02 80 00 17 be 40009d14 40009cbc: c2 07 bf f4 ld [ %fp + -12 ], %g1 done = true; else pathloc->node_access = node; 40009cc0: 10 bf ff be b 40009bb8 40009cc4: e2 26 40 00 st %l1, [ %i1 ] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 40009cc8: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED 40009ccc: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 <== NOT EXECUTED 40009cd0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 40009cd4: 22 bf ff ba be,a 40009bbc <== NOT EXECUTED 40009cd8: 90 04 80 18 add %l2, %i0, %o0 <== NOT EXECUTED /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 40009cdc: c6 06 60 0c ld [ %i1 + 0xc ], %g3 <== NOT EXECUTED 40009ce0: c2 00 e0 18 ld [ %g3 + 0x18 ], %g1 <== NOT EXECUTED 40009ce4: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40009ce8: 22 80 00 58 be,a 40009e48 <== NOT EXECUTED 40009cec: c8 00 e0 10 ld [ %g3 + 0x10 ], %g4 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 40009cf0: e2 02 20 08 ld [ %o0 + 8 ], %l1 <== NOT EXECUTED 40009cf4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40009cf8: 32 bf ff b0 bne,a 40009bb8 <== NOT EXECUTED 40009cfc: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); 40009d00: 40 00 0b 63 call 4000ca8c <__errno> <== NOT EXECUTED 40009d04: 01 00 00 00 nop <== NOT EXECUTED 40009d08: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 40009d0c: 10 bf ff bc b 40009bfc <== NOT EXECUTED 40009d10: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 40009d14: 82 26 00 01 sub %i0, %g1, %g1 40009d18: 82 04 80 01 add %l2, %g1, %g1 40009d1c: c2 26 80 00 st %g1, [ %i2 ] /* * 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++) { 40009d20: c2 4c 80 18 ldsb [ %l2 + %i0 ], %g1 40009d24: 80 a0 60 00 cmp %g1, 0 40009d28: 12 80 00 07 bne 40009d44 40009d2c: 84 04 80 18 add %l2, %i0, %g2 40009d30: 30 80 00 1c b,a 40009da0 40009d34: c2 48 a0 01 ldsb [ %g2 + 1 ], %g1 <== NOT EXECUTED 40009d38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009d3c: 02 80 00 19 be 40009da0 <== NOT EXECUTED 40009d40: 84 00 a0 01 inc %g2 <== NOT EXECUTED if ( !IMFS_is_separator( path[ i ] ) ) 40009d44: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 40009d48: 02 bf ff fb be 40009d34 <== NOT EXECUTED 40009d4c: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 40009d50: 22 bf ff fa be,a 40009d38 <== NOT EXECUTED 40009d54: c2 48 a0 01 ldsb [ %g2 + 1 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); 40009d58: 40 00 0b 4d call 4000ca8c <__errno> <== NOT EXECUTED 40009d5c: 01 00 00 00 nop <== NOT EXECUTED 40009d60: 82 10 20 02 mov 2, %g1 ! 2 <== NOT EXECUTED 40009d64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009d68: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009d6c: 81 c7 e0 08 ret <== NOT EXECUTED 40009d70: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 40009d74: c2 12 20 2e lduh [ %o0 + 0x2e ], %g1 40009d78: 80 88 60 40 btst 0x40, %g1 40009d7c: 12 bf ff a6 bne 40009c14 40009d80: 80 a4 20 02 cmp %l0, 2 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 40009d84: 40 00 0b 42 call 4000ca8c <__errno> <== NOT EXECUTED 40009d88: 01 00 00 00 nop <== NOT EXECUTED 40009d8c: 82 10 20 0d mov 0xd, %g1 ! d <== NOT EXECUTED 40009d90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009d94: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return result; } 40009d98: 81 c7 e0 08 ret <== NOT EXECUTED 40009d9c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 40009da0: 7f ff fe 26 call 40009638 40009da4: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 40009da8: d2 06 40 00 ld [ %i1 ], %o1 if ( node->type != IMFS_DIRECTORY ) 40009dac: c2 02 60 48 ld [ %o1 + 0x48 ], %g1 40009db0: 80 a0 60 01 cmp %g1, 1 40009db4: 12 80 00 08 bne 40009dd4 40009db8: 01 00 00 00 nop /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 40009dbc: c2 12 60 2e lduh [ %o1 + 0x2e ], %g1 40009dc0: 82 08 60 c0 and %g1, 0xc0, %g1 40009dc4: 80 a0 60 c0 cmp %g1, 0xc0 40009dc8: 12 bf ff ef bne 40009d84 40009dcc: 01 00 00 00 nop 40009dd0: 30 bf ff 8b b,a 40009bfc /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40009dd4: 40 00 0b 2e call 4000ca8c <__errno> <== NOT EXECUTED 40009dd8: 01 00 00 00 nop <== NOT EXECUTED 40009ddc: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 40009de0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009de4: 10 bf ff 86 b 40009bfc <== NOT EXECUTED 40009de8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 40009dec: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1 <== 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; 40009df0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009df4: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40009df8: da 01 20 04 ld [ %g4 + 4 ], %o5 <== 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; 40009dfc: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3 <== NOT EXECUTED *pathloc = newloc; 40009e00: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009e04: 90 26 00 08 sub %i0, %o0, %o0 <== NOT EXECUTED * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 40009e08: c4 26 60 04 st %g2, [ %i1 + 4 ] <== NOT EXECUTED 40009e0c: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009e10: 90 04 80 08 add %l2, %o0, %o0 <== NOT EXECUTED * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 40009e14: c8 26 60 08 st %g4, [ %i1 + 8 ] <== NOT EXECUTED return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009e18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009e1c: 9f c3 40 00 call %o5 <== NOT EXECUTED 40009e20: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40009e24: 30 bf ff 76 b,a 40009bfc <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 40009e28: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40009e2c: 7f ff ff 28 call 40009acc <== NOT EXECUTED 40009e30: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( result == -1 ) 40009e34: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40009e38: 02 bf ff 71 be 40009bfc <== NOT EXECUTED 40009e3c: 01 00 00 00 nop <== NOT EXECUTED 40009e40: 10 bf ff 90 b 40009c80 <== NOT EXECUTED 40009e44: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 40009e48: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 40009e4c: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009e50: da 01 20 04 ld [ %g4 + 4 ], %o5 <== NOT EXECUTED if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 40009e54: c6 00 e0 08 ld [ %g3 + 8 ], %g3 <== NOT EXECUTED *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009e58: 90 26 00 0c sub %i0, %o4, %o0 <== NOT EXECUTED if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 40009e5c: 10 bf ff eb b 40009e08 <== NOT EXECUTED 40009e60: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED 400096cc : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 400096cc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = node->node_access; 400096d0: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 400096d4: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 <== NOT EXECUTED 400096d8: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 400096dc: 12 80 00 14 bne 4000972c <== NOT EXECUTED 400096e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 400096e4: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 <== NOT EXECUTED IMFS_Set_handlers( node ); 400096e8: 7f ff ff d4 call 40009638 <== NOT EXECUTED 400096ec: c2 26 00 00 st %g1, [ %i0 ] <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400096f0: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 400096f4: 87 2e 60 06 sll %i1, 6, %g3 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400096f8: c2 10 a0 2e lduh [ %g2 + 0x2e ], %g1 <== NOT EXECUTED 400096fc: 82 08 c0 01 and %g3, %g1, %g1 <== NOT EXECUTED 40009700: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40009704: 02 80 00 08 be 40009724 <== NOT EXECUTED 40009708: 01 00 00 00 nop <== 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 ); 4000970c: 40 00 0c e0 call 4000ca8c <__errno> <== NOT EXECUTED 40009710: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009714: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40009718: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000971c: 81 c7 e0 08 ret <== NOT EXECUTED 40009720: 81 e8 00 00 restore <== NOT EXECUTED return result; } 40009724: 81 c7 e0 08 ret <== NOT EXECUTED 40009728: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 4000972c: 7f ff f1 cc call 40005e5c <== NOT EXECUTED 40009730: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40009734: 01 00 00 00 nop 40009acc : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009acc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40009ad0: 25 10 00 5f sethi %hi(0x40017c00), %l2 <== NOT EXECUTED 40009ad4: 10 80 00 07 b 40009af0 <== NOT EXECUTED 40009ad8: a2 14 a3 cc or %l2, 0x3cc, %l1 ! 40017fcc <== NOT EXECUTED */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 40009adc: 02 80 00 23 be 40009b68 <== NOT EXECUTED 40009ae0: 82 00 7f fd add %g1, -3, %g1 <== NOT EXECUTED result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 40009ae4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009ae8: 18 80 00 1c bgu 40009b58 <== NOT EXECUTED 40009aec: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 40009af0: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 40009af4: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 40009af8: c2 10 a0 26 lduh [ %g2 + 0x26 ], %g1 <== NOT EXECUTED 40009afc: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009b00: c2 30 a0 26 sth %g1, [ %g2 + 0x26 ] <== NOT EXECUTED if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 40009b04: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 40009b08: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED 40009b0c: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40009b10: 18 80 00 1b bgu 40009b7c <== NOT EXECUTED 40009b14: 01 00 00 00 nop <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 40009b18: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 40009b1c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40009b20: 12 bf ff ef bne 40009adc <== NOT EXECUTED 40009b24: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED result = IMFS_evaluate_hard_link( node, flags ); 40009b28: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009b2c: 7f ff fe e8 call 400096cc <== NOT EXECUTED 40009b30: 92 10 00 19 mov %i1, %o1 <== 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 ) ) ); 40009b34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40009b38: 12 80 00 09 bne 40009b5c <== NOT EXECUTED 40009b3c: c2 04 a3 cc ld [ %l2 + 0x3cc ], %g1 <== NOT EXECUTED 40009b40: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 40009b44: 82 00 7f fd add %g1, -3, %g1 <== NOT EXECUTED 40009b48: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009b4c: 28 bf ff ea bleu,a 40009af4 <== NOT EXECUTED 40009b50: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED 40009b54: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 40009b58: c2 04 a3 cc ld [ %l2 + 0x3cc ], %g1 <== NOT EXECUTED 40009b5c: c0 30 60 26 clrh [ %g1 + 0x26 ] <== NOT EXECUTED return result; } 40009b60: 81 c7 e0 08 ret <== NOT EXECUTED 40009b64: 91 e8 00 08 restore %g0, %o0, %o0 <== 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 ); 40009b68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009b6c: 7f ff fe f3 call 40009738 <== NOT EXECUTED 40009b70: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 40009b74: 10 bf ff f1 b 40009b38 <== NOT EXECUTED 40009b78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 40009b7c: 40 00 0b c4 call 4000ca8c <__errno> <== NOT EXECUTED 40009b80: c0 30 a0 26 clrh [ %g2 + 0x26 ] <== NOT EXECUTED 40009b84: 82 10 20 5c mov 0x5c, %g1 <== NOT EXECUTED 40009b88: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009b8c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED */ rtems_filesystem_link_counts = 0; return result; } 40009b90: 81 c7 e0 08 ret <== NOT EXECUTED 40009b94: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400096b0 : */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 400096b0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400096b4: 93 2a 60 06 sll %o1, 6, %o1 <== NOT EXECUTED 400096b8: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 <== NOT EXECUTED 400096bc: 84 2a 40 02 andn %o1, %g2, %g2 <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 400096c0: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED 400096c4: 81 c3 e0 08 retl <== NOT EXECUTED 400096c8: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40009738 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009738: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = node->node_access; 4000973c: c8 06 00 00 ld [ %i0 ], %g4 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 40009740: c2 01 20 48 ld [ %g4 + 0x48 ], %g1 <== NOT EXECUTED 40009744: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 40009748: 12 80 00 30 bne 40009808 <== NOT EXECUTED 4000974c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 40009750: c2 01 20 08 ld [ %g4 + 8 ], %g1 <== NOT EXECUTED 40009754: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009758: 02 80 00 2e be 40009810 <== NOT EXECUTED 4000975c: 01 00 00 00 nop <== 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; 40009760: c2 26 00 00 st %g1, [ %i0 ] <== NOT EXECUTED rtems_filesystem_get_sym_start_loc( 40009764: d0 01 20 4c ld [ %g4 + 0x4c ], %o0 <== NOT EXECUTED 40009768: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 4000976c: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 40009770: 02 80 00 06 be 40009788 <== NOT EXECUTED 40009774: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 40009778: 02 80 00 04 be 40009788 <== NOT EXECUTED 4000977c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009780: 12 80 00 0e bne 400097b8 <== NOT EXECUTED 40009784: 9a 10 20 00 clr %o5 <== NOT EXECUTED 40009788: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 4000978c: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 ! 40017fcc <== NOT EXECUTED 40009790: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED 40009794: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 40009798: c2 26 00 00 st %g1, [ %i0 ] <== NOT EXECUTED 4000979c: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 <== NOT EXECUTED 400097a0: c4 26 20 04 st %g2, [ %i0 + 4 ] <== NOT EXECUTED 400097a4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 400097a8: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED 400097ac: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 <== NOT EXECUTED 400097b0: c4 26 20 0c st %g2, [ %i0 + 0xc ] <== NOT EXECUTED 400097b4: d0 01 20 4c ld [ %g4 + 0x4c ], %o0 <== NOT EXECUTED /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 400097b8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400097bc: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 400097c0: 40 00 00 17 call 4000981c <== NOT EXECUTED 400097c4: 90 02 00 0d add %o0, %o5, %o0 <== NOT EXECUTED 400097c8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 400097cc: 7f ff ff 9b call 40009638 <== NOT EXECUTED 400097d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400097d4: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 400097d8: 87 2e 60 06 sll %i1, 6, %g3 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400097dc: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 <== NOT EXECUTED 400097e0: 84 08 c0 02 and %g3, %g2, %g2 <== NOT EXECUTED 400097e4: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 400097e8: 02 80 00 06 be 40009800 <== NOT EXECUTED 400097ec: 01 00 00 00 nop <== 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 ); 400097f0: 40 00 0c a7 call 4000ca8c <__errno> <== NOT EXECUTED 400097f4: a0 10 3f ff mov -1, %l0 ! ffffffff <== NOT EXECUTED 400097f8: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 400097fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 40009800: 81 c7 e0 08 ret <== NOT EXECUTED 40009804: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 40009808: 7f ff f1 95 call 40005e5c <== NOT EXECUTED 4000980c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 40009810: 7f ff f1 93 call 40005e5c <== NOT EXECUTED 40009814: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 40009818: 01 00 00 00 nop 4000c304 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000c304: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED #endif /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) 4000c308: 83 2e 60 10 sll %i1, 0x10, %g1 <== NOT EXECUTED 4000c30c: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED 4000c310: 82 08 7e 00 and %g1, -512, %g1 <== NOT EXECUTED 4000c314: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c318: 12 80 00 0e bne 4000c350 <== NOT EXECUTED 4000c31c: f0 06 00 00 ld [ %i0 ], %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; 4000c320: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 <== NOT EXECUTED IMFS_update_ctime( jnode ); 4000c324: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) rtems_set_errno_and_return_minus_one( EPERM ); jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; 4000c328: 82 08 7e 00 and %g1, -512, %g1 <== NOT EXECUTED 4000c32c: 82 16 40 01 or %i1, %g1, %g1 <== NOT EXECUTED IMFS_update_ctime( jnode ); 4000c330: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c334: 7f ff f9 09 call 4000a758 <== NOT EXECUTED 4000c338: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] <== NOT EXECUTED 4000c33c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4000c340: 84 10 20 00 clr %g2 <== NOT EXECUTED 4000c344: c2 26 20 44 st %g1, [ %i0 + 0x44 ] <== NOT EXECUTED return 0; } 4000c348: 81 c7 e0 08 ret <== NOT EXECUTED 4000c34c: 91 e8 00 02 restore %g0, %g2, %o0 <== 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 ); 4000c350: 40 00 01 cf call 4000ca8c <__errno> <== NOT EXECUTED 4000c354: 01 00 00 00 nop <== NOT EXECUTED 4000c358: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 4000c35c: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 4000c360: 10 bf ff fa b 4000c348 <== NOT EXECUTED 4000c364: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002eff0 : int cmd, rtems_libio_t *iop ) { return 0; } 4002eff0: 81 c3 e0 08 retl <== NOT EXECUTED 4002eff4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002eff8 : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } 4002eff8: 81 c3 e0 08 retl <== NOT EXECUTED 4002effc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009e64 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 40009e64: 9d e3 bf 98 save %sp, -104, %sp /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 40009e68: 80 a6 20 00 cmp %i0, 0 40009e6c: 02 80 00 15 be 40009ec0 40009e70: 80 a6 60 00 cmp %i1, 0 if ( !name ) 40009e74: 02 80 00 11 be 40009eb8 40009e78: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 40009e7c: 13 10 00 5c sethi %hi(0x40017000), %o1 40009e80: 40 00 0f d3 call 4000ddcc 40009e84: 92 12 60 68 or %o1, 0x68, %o1 ! 40017068 40009e88: 80 a2 20 00 cmp %o0, 0 40009e8c: 02 80 00 09 be 40009eb0 40009e90: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 40009e94: 13 10 00 5c sethi %hi(0x40017000), %o1 40009e98: 40 00 0f cd call 4000ddcc 40009e9c: 92 12 60 70 or %o1, 0x70, %o1 ! 40017070 40009ea0: 80 a2 20 00 cmp %o0, 0 40009ea4: 32 80 00 0f bne,a 40009ee0 40009ea8: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 return directory->Parent; 40009eac: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 40009eb0: 81 c7 e0 08 ret <== NOT EXECUTED 40009eb4: 81 e8 00 00 restore <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 40009eb8: 81 c7 e0 08 ret 40009ebc: 91 e8 20 00 restore %g0, 0, %o0 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 40009ec0: 11 10 00 5c sethi %hi(0x40017000), %o0 <== NOT EXECUTED 40009ec4: 15 10 00 5c sethi %hi(0x40017000), %o2 <== NOT EXECUTED 40009ec8: 17 10 00 5c sethi %hi(0x40017000), %o3 <== NOT EXECUTED 40009ecc: 90 12 20 08 or %o0, 8, %o0 <== NOT EXECUTED 40009ed0: 94 12 a0 78 or %o2, 0x78, %o2 <== NOT EXECUTED 40009ed4: 96 12 e0 58 or %o3, 0x58, %o3 <== NOT EXECUTED 40009ed8: 7f ff df e9 call 40001e7c <__assert_func> <== NOT EXECUTED 40009edc: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40009ee0: b0 06 20 50 add %i0, 0x50, %i0 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 40009ee4: 80 a4 00 18 cmp %l0, %i0 40009ee8: 12 80 00 06 bne 40009f00 40009eec: 90 10 00 19 mov %i1, %o0 40009ef0: 30 bf ff f2 b,a 40009eb8 40009ef4: 80 a4 00 18 cmp %l0, %i0 40009ef8: 02 bf ff f0 be 40009eb8 40009efc: 90 10 00 19 mov %i1, %o0 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 40009f00: 40 00 0f b3 call 4000ddcc 40009f04: 92 04 20 0c add %l0, 0xc, %o1 40009f08: 80 a2 20 00 cmp %o0, 0 40009f0c: 32 bf ff fa bne,a 40009ef4 40009f10: e0 04 00 00 ld [ %l0 ], %l0 40009f14: 81 c7 e0 08 ret 40009f18: 91 e8 00 10 restore %g0, %l0, %o0 40020790 : int IMFS_freenodinfo( rtems_filesystem_location_info_t *pathloc /* IN */ ) { return 0; } 40020790: 81 c3 e0 08 retl <== NOT EXECUTED 40020794: 90 10 20 00 clr %o0 <== NOT EXECUTED 40020798 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40020798: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4002079c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 400207a0: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED 400207a4: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 <== NOT EXECUTED /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 400207a8: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 <== NOT EXECUTED loc = temp_mt_entry->mt_fs_root; 400207ac: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 400207b0: c4 3f bf f0 std %g2, [ %fp + -16 ] <== NOT EXECUTED /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 400207b4: c0 26 20 18 clr [ %i0 + 0x18 ] <== NOT EXECUTED 400207b8: a2 07 bf e8 add %fp, -24, %l1 <== NOT EXECUTED do { next = jnode->Parent; loc.node_access = (void *)jnode; 400207bc: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 400207c0: f0 04 20 08 ld [ %l0 + 8 ], %i0 <== NOT EXECUTED loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 400207c4: 7f ff fd e8 call 4001ff64 <== NOT EXECUTED 400207c8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( jnode->type != IMFS_DIRECTORY ) { 400207cc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 400207d0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400207d4: 12 80 00 17 bne 40020830 <== NOT EXECUTED 400207d8: 84 04 20 50 add %l0, 0x50, %g2 <== NOT EXECUTED result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 400207dc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 400207e0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400207e4: 02 80 00 13 be 40020830 <== NOT EXECUTED 400207e8: 01 00 00 00 nop <== NOT EXECUTED result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 400207ec: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 400207f0: 02 80 00 0e be 40020828 <== NOT EXECUTED 400207f4: 01 00 00 00 nop <== NOT EXECUTED if ( jnode->type == IMFS_DIRECTORY ) { 400207f8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 400207fc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40020800: 32 bf ff f0 bne,a 400207c0 <== NOT EXECUTED 40020804: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 40020808: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 <== NOT EXECUTED 4002080c: 82 04 20 50 add %l0, 0x50, %g1 <== NOT EXECUTED 40020810: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40020814: 22 bf ff eb be,a 400207c0 <== NOT EXECUTED 40020818: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4002081c: a0 90 a0 00 orcc %g2, 0, %l0 <== NOT EXECUTED 40020820: 32 bf ff e8 bne,a 400207c0 <== NOT EXECUTED 40020824: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED return 0; } 40020828: 81 c7 e0 08 ret <== NOT EXECUTED 4002082c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( &loc ); 40020830: 7f ff 91 e4 call 40004fc0 <== NOT EXECUTED 40020834: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if (result != 0) 40020838: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002083c: 02 bf ff ec be 400207ec <== NOT EXECUTED 40020840: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 40020844: 81 c7 e0 08 ret <== NOT EXECUTED 40020848: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40009f1c : IMFS_token_types IMFS_get_token( const char *path, char *token, int *token_len ) { 40009f1c: 9d e3 bf 98 save %sp, -104, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 40009f20: c4 0e 00 00 ldub [ %i0 ], %g2 while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 40009f24: 87 28 a0 18 sll %g2, 0x18, %g3 40009f28: 83 38 e0 18 sra %g3, 0x18, %g1 40009f2c: 80 a0 60 2f cmp %g1, 0x2f 40009f30: 02 80 00 28 be 40009fd0 40009f34: 80 a0 60 5c cmp %g1, 0x5c 40009f38: 02 80 00 26 be 40009fd0 40009f3c: 80 a0 60 00 cmp %g1, 0 40009f40: 02 80 00 2c be 40009ff0 40009f44: 86 10 20 00 clr %g3 token[i] = c; 40009f48: c4 2e 40 00 stb %g2, [ %i1 ] return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 40009f4c: 86 00 e0 01 inc %g3 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 40009f50: c2 4e 00 03 ldsb [ %i0 + %g3 ], %g1 40009f54: 80 a0 60 2f cmp %g1, 0x2f 40009f58: 02 80 00 07 be 40009f74 40009f5c: c4 0e 00 03 ldub [ %i0 + %g3 ], %g2 40009f60: 80 a0 60 5c cmp %g1, 0x5c 40009f64: 02 80 00 04 be 40009f74 40009f68: 80 a0 60 00 cmp %g1, 0 40009f6c: 12 80 00 12 bne 40009fb4 40009f70: 80 a0 e0 20 cmp %g3, 0x20 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 40009f74: 82 06 40 03 add %i1, %g3, %g1 40009f78: c4 48 7f ff ldsb [ %g1 + -1 ], %g2 40009f7c: 80 a0 a0 00 cmp %g2, 0 40009f80: 32 80 00 02 bne,a 40009f88 40009f84: c0 2e 40 03 clrb [ %i1 + %g3 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 40009f88: c6 26 80 00 st %g3, [ %i2 ] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 40009f8c: 90 10 00 19 mov %i1, %o0 40009f90: 13 10 00 5b sethi %hi(0x40016c00), %o1 40009f94: b0 10 20 02 mov 2, %i0 40009f98: 40 00 0f 8d call 4000ddcc 40009f9c: 92 12 61 c8 or %o1, 0x1c8, %o1 40009fa0: 80 a2 20 00 cmp %o0, 0 40009fa4: 12 80 00 18 bne 4000a004 40009fa8: 90 10 00 19 mov %i1, %o0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 40009fac: 81 c7 e0 08 ret <== NOT EXECUTED 40009fb0: 81 e8 00 00 restore <== NOT EXECUTED /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 40009fb4: 14 bf ff f1 bg 40009f78 40009fb8: 82 06 40 03 add %i1, %g3, %g1 token[i] = c; if ( i == IMFS_NAME_MAX ) 40009fbc: 80 a0 e0 20 cmp %g3, 0x20 40009fc0: 12 bf ff e3 bne 40009f4c 40009fc4: c4 2e 40 03 stb %g2, [ %i1 + %g3 ] 40009fc8: 81 c7 e0 08 ret <== NOT EXECUTED 40009fcc: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 40009fd0: c4 2e 40 00 stb %g2, [ %i1 ] if ( token[i] != '\0' ) { 40009fd4: 80 a0 e0 00 cmp %g3, 0 40009fd8: 82 10 20 01 mov 1, %g1 40009fdc: 02 80 00 06 be 40009ff4 40009fe0: b0 10 20 01 mov 1, %i0 /* * Set token_len to the number of characters copied. */ *token_len = i; 40009fe4: c2 26 80 00 st %g1, [ %i2 ] 40009fe8: 81 c7 e0 08 ret 40009fec: 81 e8 00 00 restore /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 40009ff0: c4 2e 40 00 stb %g2, [ %i1 ] type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 40009ff4: 82 10 20 00 clr %g1 /* * Set token_len to the number of characters copied. */ *token_len = i; 40009ff8: c2 26 80 00 st %g1, [ %i2 ] type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 40009ffc: 81 c7 e0 08 ret 4000a000: 91 e8 20 00 restore %g0, 0, %o0 */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4000a004: 13 10 00 5c sethi %hi(0x40017000), %o1 4000a008: 40 00 0f 71 call 4000ddcc 4000a00c: 92 12 60 90 or %o1, 0x90, %o1 ! 40017090 <__func__.5177+0x18> 4000a010: 80 a0 00 08 cmp %g0, %o0 4000a014: 82 60 20 00 subx %g0, 0, %g1 4000a018: b0 08 60 02 and %g1, 2, %i0 type = IMFS_CURRENT_DIR; } return type; } 4000a01c: 81 c7 e0 08 ret 4000a020: 91 ee 20 01 restore %i0, 1, %o0 40004bdc : int IMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 40004bdc: 13 10 01 11 sethi %hi(0x40044400), %o1 <== NOT EXECUTED 40004be0: 15 10 01 1a sethi %hi(0x40046800), %o2 <== NOT EXECUTED 40004be4: 17 10 01 1a sethi %hi(0x40046800), %o3 <== NOT EXECUTED 40004be8: 92 12 63 1c or %o1, 0x31c, %o1 <== NOT EXECUTED 40004bec: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED 40004bf0: 96 12 e0 48 or %o3, 0x48, %o3 <== NOT EXECUTED 40004bf4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40004bf8: 40 00 00 03 call 40004c04 <== NOT EXECUTED 40004bfc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40004c00: 01 00 00 00 nop 4000a024 : 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 ) { 4000a024: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 4000a028: 03 10 00 5e sethi %hi(0x40017800), %g1 4000a02c: c6 00 62 ac ld [ %g1 + 0x2ac ], %g3 ! 40017aac * 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) { 4000a030: 84 10 20 20 mov 0x20, %g2 4000a034: 80 a0 e0 10 cmp %g3, 0x10 4000a038: 02 80 00 09 be 4000a05c 4000a03c: 82 10 20 00 clr %g1 4000a040: 80 a0 c0 02 cmp %g3, %g2 4000a044: 02 80 00 06 be 4000a05c 4000a048: 82 00 60 01 inc %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 4000a04c: 80 a0 60 05 cmp %g1, 5 4000a050: 12 bf ff fc bne 4000a040 4000a054: 85 28 a0 01 sll %g2, 1, %g2 4000a058: 86 10 20 80 mov 0x80, %g3 <== NOT EXECUTED bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4000a05c: 03 10 00 61 sethi %hi(0x40018400), %g1 * 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( 4000a060: 98 10 20 00 clr %o4 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4000a064: c6 20 61 d8 st %g3, [ %g1 + 0x1d8 ] * 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( 4000a068: 92 10 20 01 mov 1, %o1 4000a06c: 90 10 20 00 clr %o0 4000a070: 15 10 00 5b sethi %hi(0x40016c00), %o2 4000a074: 17 00 00 10 sethi %hi(0x4000), %o3 4000a078: 94 12 a0 90 or %o2, 0x90, %o2 4000a07c: 40 00 08 51 call 4000c1c0 4000a080: 96 12 e1 ed or %o3, 0x1ed, %o3 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; 4000a084: 94 10 20 30 mov 0x30, %o2 * 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( 4000a088: d0 26 20 18 st %o0, [ %i0 + 0x18 ] ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 4000a08c: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4000a090: f6 26 20 1c st %i3, [ %i0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4000a094: 13 10 00 5c sethi %hi(0x40017000), %o1 4000a098: 90 06 20 30 add %i0, 0x30, %o0 4000a09c: 40 00 0c 6e call 4000d254 4000a0a0: 92 12 63 00 or %o1, 0x300, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000a0a4: 90 10 20 01 mov 1, %o0 4000a0a8: 40 00 00 f4 call 4000a478 4000a0ac: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 4000a0b0: 80 a2 20 00 cmp %o0, 0 4000a0b4: 02 80 00 0a be 4000a0dc 4000a0b8: 82 10 20 01 mov 1, %g1 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; 4000a0bc: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000a0c0: c2 22 00 00 st %g1, [ %o0 ] 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; 4000a0c4: d0 26 20 2c st %o0, [ %i0 + 0x2c ] * 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; 4000a0c8: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000a0cc: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 4000a0d0: f4 22 20 04 st %i2, [ %o0 + 4 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 4000a0d4: 81 c7 e0 08 ret 4000a0d8: 91 e8 20 00 restore %g0, 0, %o0 /* * 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); 4000a0dc: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 <== NOT EXECUTED 4000a0e0: 40 00 01 2c call 4000a590 <== NOT EXECUTED 4000a0e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000a0e8: 40 00 0a 69 call 4000ca8c <__errno> <== NOT EXECUTED 4000a0ec: 01 00 00 00 nop <== NOT EXECUTED 4000a0f0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000a0f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a0f8: 81 c7 e0 08 ret <== NOT EXECUTED 4000a0fc: 81 e8 00 00 restore <== NOT EXECUTED 40004ce0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40004ce0: 9d e3 bf 58 save %sp, -168, %sp <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 40004ce4: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40004ce8: c2 27 bf dc st %g1, [ %fp + -36 ] <== NOT EXECUTED if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40004cec: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 <== NOT EXECUTED 40004cf0: 80 a0 a0 07 cmp %g2, 7 <== NOT EXECUTED 40004cf4: 18 80 00 1b bgu 40004d60 <== NOT EXECUTED 40004cf8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 40004cfc: a0 07 bf b8 add %fp, -72, %l0 <== NOT EXECUTED 40004d00: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40004d04: 7f ff ff 74 call 40004ad4 <== NOT EXECUTED 40004d08: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * Create a new link node. */ new_node = IMFS_create_node( 40004d0c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40004d10: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40004d14: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004d18: 17 00 00 28 sethi %hi(0xa000), %o3 <== NOT EXECUTED 40004d1c: 98 07 bf dc add %fp, -36, %o4 <== NOT EXECUTED 40004d20: 40 00 6c 39 call 4001fe04 <== NOT EXECUTED 40004d24: 96 12 e1 ff or %o3, 0x1ff, %o3 <== NOT EXECUTED new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40004d28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004d2c: 02 80 00 13 be 40004d78 <== NOT EXECUTED 40004d30: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 40004d34: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40004d38: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 40004d3c: 92 10 20 00 clr %o1 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40004d40: 82 00 60 01 inc %g1 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 40004d44: 40 00 02 95 call 40005798 <== NOT EXECUTED 40004d48: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] <== NOT EXECUTED 40004d4c: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 40004d50: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40004d54: c4 20 60 44 st %g2, [ %g1 + 0x44 ] <== NOT EXECUTED return 0; } 40004d58: 81 c7 e0 08 ret <== NOT EXECUTED 40004d5c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 40004d60: 40 00 b2 f4 call 40031930 <__errno> <== NOT EXECUTED 40004d64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004d68: 82 10 20 1f mov 0x1f, %g1 <== NOT EXECUTED 40004d6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004d70: 81 c7 e0 08 ret <== NOT EXECUTED 40004d74: 81 e8 00 00 restore <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 40004d78: 40 00 b2 ee call 40031930 <__errno> <== NOT EXECUTED 40004d7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004d80: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004d84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004d88: 81 c7 e0 08 ret <== NOT EXECUTED 40004d8c: 81 e8 00 00 restore <== NOT EXECUTED 40028710 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40028710: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40028714: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 40028718: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4002871c: 02 80 00 17 be 40028778 <== NOT EXECUTED 40028720: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40028724: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 40028728: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4002872c: 32 80 00 1b bne,a 40028798 <== NOT EXECUTED 40028730: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 40028734: 7f ff fe 74 call 40028104 <== NOT EXECUTED 40028738: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED if ( *block_entry_ptr ) 4002873c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 40028740: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED if ( *block_entry_ptr ) 40028744: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028748: 02 80 00 04 be 40028758 <== NOT EXECUTED 4002874c: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 40028750: 81 c7 e0 08 ret <== NOT EXECUTED 40028754: 81 e8 00 00 restore <== NOT EXECUTED #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 40028758: 7f ff fe 5e call 400280d0 <== NOT EXECUTED 4002875c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if ( !memory ) 40028760: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028764: 02 bf ff fb be 40028750 <== NOT EXECUTED 40028768: 01 00 00 00 nop <== NOT EXECUTED return 1; *block_entry_ptr = memory; 4002876c: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED return 0; } 40028770: 81 c7 e0 08 ret <== NOT EXECUTED 40028774: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 40028778: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED 4002877c: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028780: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028784: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028788: 94 12 a2 78 or %o2, 0x278, %o2 <== NOT EXECUTED 4002878c: 96 12 e1 38 or %o3, 0x138, %o3 <== NOT EXECUTED 40028790: 7f ff 72 ab call 4000523c <__assert_func> <== NOT EXECUTED 40028794: 92 10 21 69 mov 0x169, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40028798: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 4002879c: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 400287a0: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 400287a4: 94 12 a2 78 or %o2, 0x278, %o2 <== NOT EXECUTED 400287a8: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 400287ac: 7f ff 72 a4 call 4000523c <__assert_func> <== NOT EXECUTED 400287b0: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 400287b4: 01 00 00 00 nop 400287b8 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 400287b8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 400287bc: a6 96 20 00 orcc %i0, 0, %l3 <== NOT EXECUTED 400287c0: 02 80 00 44 be 400288d0 <== NOT EXECUTED 400287c4: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400287c8: c2 04 e0 48 ld [ %l3 + 0x48 ], %g1 <== NOT EXECUTED 400287cc: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 400287d0: 12 80 00 47 bne 400288ec <== NOT EXECUTED 400287d4: 03 10 01 2e sethi %hi(0x4004b800), %g1 <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 400287d8: e2 00 61 48 ld [ %g1 + 0x148 ], %l1 ! 4004b948 <== NOT EXECUTED 400287dc: a1 34 60 02 srl %l1, 2, %l0 <== NOT EXECUTED 400287e0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400287e4: 7f ff 6a 7f call 400031e0 <.umul> <== NOT EXECUTED 400287e8: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED 400287ec: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400287f0: 7f ff 6a 7c call 400031e0 <.umul> <== NOT EXECUTED 400287f4: 90 02 20 01 inc %o0 <== NOT EXECUTED 400287f8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 400287fc: 7f ff 6a 79 call 400031e0 <.umul> <== NOT EXECUTED 40028800: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40028804: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40028808: 1a 80 00 2c bcc 400288b8 <== NOT EXECUTED 4002880c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 40028810: e0 04 e0 4c ld [ %l3 + 0x4c ], %l0 <== NOT EXECUTED 40028814: 80 a6 40 10 cmp %i1, %l0 <== NOT EXECUTED 40028818: 04 80 00 26 ble 400288b0 <== NOT EXECUTED 4002881c: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028820: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40028824: 40 00 65 b5 call 40041ef8 <.div> <== NOT EXECUTED 40028828: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002882c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028830: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028834: 40 00 65 b1 call 40041ef8 <.div> <== NOT EXECUTED 40028838: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4002883c: 80 a4 80 08 cmp %l2, %o0 <== NOT EXECUTED 40028840: 0a 80 00 0f bcs 4002887c <== NOT EXECUTED 40028844: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 40028848: 10 80 00 05 b 4002885c <== NOT EXECUTED 4002884c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40028850: 80 a4 80 10 cmp %l2, %l0 <== NOT EXECUTED 40028854: 2a 80 00 0b bcs,a 40028880 <== NOT EXECUTED 40028858: f2 24 e0 4c st %i1, [ %l3 + 0x4c ] <== NOT EXECUTED if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4002885c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40028860: 7f ff ff ac call 40028710 <== NOT EXECUTED 40028864: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40028868: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002886c: 22 bf ff f9 be,a 40028850 <== NOT EXECUTED 40028870: a0 04 20 01 inc %l0 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { 40028874: 10 80 00 09 b 40028898 <== NOT EXECUTED 40028878: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4002887c: f2 24 e0 4c st %i1, [ %l3 + 0x4c ] <== NOT EXECUTED return 0; } 40028880: 81 c7 e0 08 ret <== NOT EXECUTED 40028884: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 40028888: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4002888c: 7f ff fe cb call 400283b8 <== NOT EXECUTED 40028890: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 40028894: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED 40028898: 08 bf ff fc bleu 40028888 <== NOT EXECUTED 4002889c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 400288a0: 40 00 24 24 call 40031930 <__errno> <== NOT EXECUTED 400288a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400288a8: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 400288ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400288b0: 81 c7 e0 08 ret <== NOT EXECUTED 400288b4: 81 e8 00 00 restore <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 400288b8: 40 00 24 1e call 40031930 <__errno> <== NOT EXECUTED 400288bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400288c0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400288c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400288c8: 81 c7 e0 08 ret <== NOT EXECUTED 400288cc: 81 e8 00 00 restore <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 400288d0: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 400288d4: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 400288d8: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 400288dc: 94 12 a2 90 or %o2, 0x290, %o2 <== NOT EXECUTED 400288e0: 96 12 e1 38 or %o3, 0x138, %o3 <== NOT EXECUTED 400288e4: 7f ff 72 56 call 4000523c <__assert_func> <== NOT EXECUTED 400288e8: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400288ec: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 400288f0: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 400288f4: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 400288f8: 94 12 a2 90 or %o2, 0x290, %o2 <== NOT EXECUTED 400288fc: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 40028900: 7f ff 72 4f call 4000523c <__assert_func> <== NOT EXECUTED 40028904: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 40028908: 01 00 00 00 nop 40028104 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40028104: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40028108: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4002810c: 02 80 00 32 be 400281d4 <== NOT EXECUTED 40028110: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40028114: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 40028118: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4002811c: 12 80 00 35 bne 400281f0 <== NOT EXECUTED 40028120: 03 10 01 2e sethi %hi(0x4004b800), %g1 <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40028124: c4 00 61 48 ld [ %g1 + 0x148 ], %g2 ! 4004b948 <== NOT EXECUTED 40028128: a3 30 a0 02 srl %g2, 2, %l1 <== NOT EXECUTED 4002812c: 82 04 7f ff add %l1, -1, %g1 <== NOT EXECUTED 40028130: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40028134: 08 80 00 20 bleu 400281b4 <== NOT EXECUTED 40028138: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4002813c: 90 04 60 01 add %l1, 1, %o0 <== NOT EXECUTED 40028140: 7f ff 6c 28 call 400031e0 <.umul> <== NOT EXECUTED 40028144: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40028148: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 4002814c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40028150: 18 80 00 3f bgu 4002824c <== NOT EXECUTED 40028154: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40028158: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4002815c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40028160: 40 00 68 10 call 400421a0 <.urem> <== NOT EXECUTED 40028164: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40028168: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4002816c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40028170: 40 00 67 60 call 40041ef0 <.udiv> <== NOT EXECUTED 40028174: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40028178: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4002817c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40028180: 02 80 00 29 be 40028224 <== NOT EXECUTED 40028184: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( !p ) { 40028188: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002818c: 02 80 00 6b be 40028338 <== NOT EXECUTED 40028190: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 40028194: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED 40028198: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 4002819c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400281a0: 02 80 00 5f be 4002831c <== NOT EXECUTED 400281a4: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 400281a8: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 400281ac: 81 c7 e0 08 ret <== NOT EXECUTED 400281b0: 91 e8 80 01 restore %g2, %g1, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 400281b4: 02 80 00 16 be 4002820c <== NOT EXECUTED 400281b8: d0 06 20 50 ld [ %i0 + 0x50 ], %o0 <== NOT EXECUTED if ( !p ) { 400281bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400281c0: 02 80 00 50 be 40028300 <== NOT EXECUTED 400281c4: 01 00 00 00 nop <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 400281c8: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED 400281cc: 81 c7 e0 08 ret <== NOT EXECUTED 400281d0: 91 ea 00 01 restore %o0, %g1, %o0 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 400281d4: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 400281d8: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 400281dc: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 400281e0: 94 12 a1 f0 or %o2, 0x1f0, %o2 <== NOT EXECUTED 400281e4: 96 12 e1 38 or %o3, 0x138, %o3 <== NOT EXECUTED 400281e8: 7f ff 74 15 call 4000523c <__assert_func> <== NOT EXECUTED 400281ec: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 400281f0: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 400281f4: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 400281f8: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 400281fc: 94 12 a1 f0 or %o2, 0x1f0, %o2 <== NOT EXECUTED 40028200: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 40028204: 7f ff 74 0e call 4000523c <__assert_func> <== NOT EXECUTED 40028208: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 4002820c: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40028210: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028214: 02 80 00 0c be 40028244 <== NOT EXECUTED 40028218: b0 02 00 01 add %o0, %g1, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4002821c: 81 c7 e0 08 ret <== NOT EXECUTED 40028220: 81 e8 00 00 restore <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 40028224: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028228: 02 80 00 07 be 40028244 <== NOT EXECUTED 4002822c: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40028230: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 40028234: 87 2c a0 02 sll %l2, 2, %g3 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40028238: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002823c: 12 bf ff f8 bne 4002821c <== NOT EXECUTED 40028240: b0 00 80 03 add %g2, %g3, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40028244: 81 c7 e0 08 ret <== NOT EXECUTED 40028248: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4002824c: 90 02 20 01 inc %o0 <== NOT EXECUTED 40028250: 7f ff 6b e4 call 400031e0 <.umul> <== NOT EXECUTED 40028254: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40028258: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 4002825c: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40028260: 18 bf ff f9 bgu 40028244 <== NOT EXECUTED 40028264: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40028268: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4002826c: 40 00 67 cd call 400421a0 <.urem> <== NOT EXECUTED 40028270: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40028274: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40028278: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4002827c: 40 00 67 1d call 40041ef0 <.udiv> <== NOT EXECUTED 40028280: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40028284: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40028288: 40 00 67 1a call 40041ef0 <.udiv> <== NOT EXECUTED 4002828c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40028290: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40028294: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40028298: 40 00 67 c2 call 400421a0 <.urem> <== NOT EXECUTED 4002829c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 400282a0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 400282a4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 400282a8: 02 80 00 2b be 40028354 <== NOT EXECUTED 400282ac: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) { 400282b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400282b4: 02 80 00 3a be 4002839c <== NOT EXECUTED 400282b8: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 400282bc: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 400282c0: c8 02 00 01 ld [ %o0 + %g1 ], %g4 <== NOT EXECUTED if ( !p1 ) { 400282c4: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 400282c8: 02 80 00 2e be 40028380 <== NOT EXECUTED 400282cc: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 400282d0: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 400282d4: d0 01 00 01 ld [ %g4 + %g1 ], %o0 <== NOT EXECUTED if ( !p2 ) { 400282d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400282dc: 12 bf ff bb bne 400281c8 <== NOT EXECUTED 400282e0: a0 01 00 01 add %g4, %g1, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 400282e4: 7f ff ff 7b call 400280d0 <== NOT EXECUTED 400282e8: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 400282ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400282f0: 02 bf ff d5 be 40028244 <== NOT EXECUTED 400282f4: 01 00 00 00 nop <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 400282f8: 10 bf ff b4 b 400281c8 <== NOT EXECUTED 400282fc: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40028300: 7f ff ff 74 call 400280d0 <== NOT EXECUTED 40028304: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40028308: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002830c: 02 bf ff ce be 40028244 <== NOT EXECUTED 40028310: 01 00 00 00 nop <== NOT EXECUTED return 0; info->indirect = p; 40028314: 10 bf ff ad b 400281c8 <== NOT EXECUTED 40028318: d0 26 20 50 st %o0, [ %i0 + 0x50 ] <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 4002831c: 7f ff ff 6d call 400280d0 <== NOT EXECUTED 40028320: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40028324: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40028328: 02 bf ff c7 be 40028244 <== NOT EXECUTED 4002832c: 01 00 00 00 nop <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40028330: 10 bf ff 9e b 400281a8 <== NOT EXECUTED 40028334: c4 24 00 00 st %g2, [ %l0 ] <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40028338: 7f ff ff 66 call 400280d0 <== NOT EXECUTED 4002833c: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40028340: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028344: 02 bf ff c0 be 40028244 <== NOT EXECUTED 40028348: 01 00 00 00 nop <== NOT EXECUTED return 0; info->doubly_indirect = p; 4002834c: 10 bf ff 92 b 40028194 <== NOT EXECUTED 40028350: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 40028354: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028358: 02 bf ff bb be 40028244 <== NOT EXECUTED 4002835c: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 40028360: d0 02 00 01 ld [ %o0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 40028364: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028368: 02 bf ff b7 be 40028244 <== NOT EXECUTED 4002836c: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40028370: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED 40028374: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED 40028378: 81 c7 e0 08 ret <== NOT EXECUTED 4002837c: 91 e8 c0 02 restore %g3, %g2, %o0 <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 40028380: 7f ff ff 54 call 400280d0 <== NOT EXECUTED 40028384: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40028388: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 4002838c: 02 bf ff ae be 40028244 <== NOT EXECUTED 40028390: 01 00 00 00 nop <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40028394: 10 bf ff cf b 400282d0 <== NOT EXECUTED 40028398: c8 24 00 00 st %g4, [ %l0 ] <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4002839c: 7f ff ff 4d call 400280d0 <== NOT EXECUTED 400283a0: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 400283a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400283a8: 02 bf ff a7 be 40028244 <== NOT EXECUTED 400283ac: 01 00 00 00 nop <== NOT EXECUTED return 0; info->triply_indirect = p; 400283b0: 10 bf ff c3 b 400282bc <== NOT EXECUTED 400283b4: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED 40028d44 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40028d44: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40028d48: a6 96 20 00 orcc %i0, 0, %l3 <== NOT EXECUTED 40028d4c: 02 80 00 8c be 40028f7c <== NOT EXECUTED 40028d50: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 40028d54: c4 04 e0 48 ld [ %l3 + 0x48 ], %g2 <== NOT EXECUTED 40028d58: 82 00 bf fb add %g2, -5, %g1 <== NOT EXECUTED 40028d5c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40028d60: 18 80 00 95 bgu 40028fb4 <== NOT EXECUTED 40028d64: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 40028d68: 02 80 00 8c be 40028f98 <== NOT EXECUTED 40028d6c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 40028d70: 02 80 00 7d be 40028f64 <== NOT EXECUTED 40028d74: 80 a0 a0 06 cmp %g2, 6 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 40028d78: 02 80 00 57 be 40028ed4 <== NOT EXECUTED 40028d7c: 82 06 c0 19 add %i3, %i1, %g1 <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 40028d80: c4 04 e0 4c ld [ %l3 + 0x4c ], %g2 <== NOT EXECUTED 40028d84: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40028d88: 08 80 00 3d bleu 40028e7c <== NOT EXECUTED 40028d8c: a4 20 80 19 sub %g2, %i1, %l2 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40028d90: 2b 10 01 2e sethi %hi(0x4004b800), %l5 <== NOT EXECUTED 40028d94: f6 05 61 48 ld [ %l5 + 0x148 ], %i3 ! 4004b948 <== NOT EXECUTED 40028d98: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40028d9c: 40 00 65 03 call 400421a8 <.rem> <== NOT EXECUTED 40028da0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028da4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40028da8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028dac: 40 00 64 53 call 40041ef8 <.div> <== NOT EXECUTED 40028db0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( start_offset ) { 40028db4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028db8: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40028dbc: a8 15 61 48 or %l5, 0x148, %l4 <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 40028dc0: a2 10 00 1a mov %i2, %l1 <== NOT EXECUTED 40028dc4: 12 80 00 30 bne 40028e84 <== NOT EXECUTED 40028dc8: a0 10 20 00 clr %l0 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40028dcc: f6 05 61 48 ld [ %l5 + 0x148 ], %i3 <== NOT EXECUTED while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40028dd0: 80 a4 80 1b cmp %l2, %i3 <== NOT EXECUTED 40028dd4: 0a 80 00 15 bcs 40028e28 <== NOT EXECUTED 40028dd8: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40028ddc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40028de0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40028de4: 7f ff fc c8 call 40028104 <== NOT EXECUTED 40028de8: 94 10 20 00 clr %o2 <== NOT EXECUTED assert( block_ptr ); 40028dec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028df0: 22 80 00 56 be,a 40028f48 <== NOT EXECUTED 40028df4: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 40028df8: d2 02 00 00 ld [ %o0 ], %o1 <== NOT EXECUTED 40028dfc: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40028e00: 40 00 2c b9 call 400340e4 <== NOT EXECUTED 40028e04: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40028e08: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 40028e0c: a4 24 80 1b sub %l2, %i3, %l2 <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 40028e10: a2 04 40 1b add %l1, %i3, %l1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40028e14: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 40028e18: b2 06 60 01 inc %i1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40028e1c: 08 bf ff f0 bleu 40028ddc <== NOT EXECUTED 40028e20: a0 04 00 1b add %l0, %i3, %l0 <== NOT EXECUTED * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 40028e24: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40028e28: 02 80 00 0d be 40028e5c <== NOT EXECUTED 40028e2c: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40028e30: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40028e34: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40028e38: 7f ff fc b3 call 40028104 <== NOT EXECUTED 40028e3c: 94 10 20 00 clr %o2 <== NOT EXECUTED assert( block_ptr ); 40028e40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028e44: 02 80 00 6b be 40028ff0 <== NOT EXECUTED 40028e48: b0 04 80 10 add %l2, %l0, %i0 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 40028e4c: d2 02 00 00 ld [ %o0 ], %o1 <== NOT EXECUTED 40028e50: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40028e54: 40 00 2c a4 call 400340e4 <== NOT EXECUTED 40028e58: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED copied += my_length; } IMFS_update_atime( the_jnode ); 40028e5c: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 40028e60: 7f ff 72 4e call 40005798 <== NOT EXECUTED 40028e64: 92 10 20 00 clr %o1 <== NOT EXECUTED 40028e68: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED return copied; 40028e6c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 40028e70: c2 24 e0 3c st %g1, [ %l3 + 0x3c ] <== NOT EXECUTED return copied; } 40028e74: 81 c7 e0 08 ret <== NOT EXECUTED 40028e78: 91 e8 00 0a restore %g0, %o2, %o0 <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 40028e7c: 10 bf ff c5 b 40028d90 <== NOT EXECUTED 40028e80: a4 10 00 1b mov %i3, %l2 <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40028e84: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40028e88: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40028e8c: 7f ff fc 9e call 40028104 <== NOT EXECUTED 40028e90: 94 10 20 00 clr %o2 <== NOT EXECUTED assert( block_ptr ); 40028e94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028e98: 02 80 00 4e be 40028fd0 <== NOT EXECUTED 40028e9c: 92 26 c0 18 sub %i3, %i0, %o1 <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 40028ea0: 80 a4 80 09 cmp %l2, %o1 <== NOT EXECUTED 40028ea4: 18 80 00 1e bgu 40028f1c <== NOT EXECUTED 40028ea8: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 40028eac: d2 02 00 00 ld [ %o0 ], %o1 <== NOT EXECUTED dest += to_copy; 40028eb0: a2 06 80 0a add %i2, %o2, %l1 <== NOT EXECUTED to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 40028eb4: 92 02 40 18 add %o1, %i0, %o1 <== NOT EXECUTED dest += to_copy; block++; 40028eb8: b2 06 60 01 inc %i1 <== NOT EXECUTED my_length -= to_copy; 40028ebc: a4 24 80 0a sub %l2, %o2, %l2 <== NOT EXECUTED 40028ec0: a0 10 00 0a mov %o2, %l0 <== NOT EXECUTED to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 40028ec4: 40 00 2c 88 call 400340e4 <== NOT EXECUTED 40028ec8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40028ecc: 10 bf ff c1 b 40028dd0 <== NOT EXECUTED 40028ed0: f6 05 61 48 ld [ %l5 + 0x148 ], %i3 <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 40028ed4: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED 40028ed8: b0 20 40 19 sub %g1, %i1, %i0 <== NOT EXECUTED 40028edc: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED 40028ee0: 18 80 00 08 bgu 40028f00 <== NOT EXECUTED 40028ee4: d2 04 e0 50 ld [ %l3 + 0x50 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 40028ee8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 40028eec: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 40028ef0: 40 00 2c 7d call 400340e4 <== NOT EXECUTED 40028ef4: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 40028ef8: 10 bf ff da b 40028e60 <== NOT EXECUTED 40028efc: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 40028f00: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 40028f04: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 40028f08: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 40028f0c: 40 00 2c 76 call 400340e4 <== NOT EXECUTED 40028f10: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 40028f14: 10 bf ff d3 b 40028e60 <== NOT EXECUTED 40028f18: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 40028f1c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 40028f20: d2 02 00 00 ld [ %o0 ], %o1 <== NOT EXECUTED dest += to_copy; 40028f24: a2 06 80 0a add %i2, %o2, %l1 <== NOT EXECUTED to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 40028f28: 92 02 40 18 add %o1, %i0, %o1 <== NOT EXECUTED dest += to_copy; block++; 40028f2c: b2 06 60 01 inc %i1 <== NOT EXECUTED my_length -= to_copy; 40028f30: a4 24 80 0a sub %l2, %o2, %l2 <== NOT EXECUTED 40028f34: a0 10 00 0a mov %o2, %l0 <== NOT EXECUTED to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 40028f38: 40 00 2c 6b call 400340e4 <== NOT EXECUTED 40028f3c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40028f40: 10 bf ff a4 b 40028dd0 <== NOT EXECUTED 40028f44: f6 05 61 48 ld [ %l5 + 0x148 ], %i3 <== NOT EXECUTED while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40028f48: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028f4c: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028f50: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028f54: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 40028f58: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED 40028f5c: 7f ff 70 b8 call 4000523c <__assert_func> <== NOT EXECUTED 40028f60: 92 10 22 a5 mov 0x2a5, %o1 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 40028f64: 40 00 22 73 call 40031930 <__errno> <== NOT EXECUTED 40028f68: 01 00 00 00 nop <== NOT EXECUTED 40028f6c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40028f70: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 40028f74: 10 bf ff c0 b 40028e74 <== NOT EXECUTED 40028f78: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40028f7c: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028f80: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028f84: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028f88: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 40028f8c: 96 12 e1 38 or %o3, 0x138, %o3 <== NOT EXECUTED 40028f90: 7f ff 70 ab call 4000523c <__assert_func> <== NOT EXECUTED 40028f94: 92 10 22 4a mov 0x24a, %o1 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 40028f98: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028f9c: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028fa0: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028fa4: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 40028fa8: 96 12 e1 e8 or %o3, 0x1e8, %o3 <== NOT EXECUTED 40028fac: 7f ff 70 a4 call 4000523c <__assert_func> <== NOT EXECUTED 40028fb0: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 40028fb4: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028fb8: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028fbc: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028fc0: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 40028fc4: 96 12 e1 98 or %o3, 0x198, %o3 <== NOT EXECUTED 40028fc8: 7f ff 70 9d call 4000523c <__assert_func> <== NOT EXECUTED 40028fcc: 92 10 22 4f mov 0x24f, %o1 <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40028fd0: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED 40028fd4: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028fd8: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028fdc: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028fe0: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 40028fe4: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED 40028fe8: 7f ff 70 95 call 4000523c <__assert_func> <== NOT EXECUTED 40028fec: 92 10 22 94 mov 0x294, %o1 <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40028ff0: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED 40028ff4: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028ff8: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028ffc: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40029000: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 40029004: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED 40029008: 7f ff 70 8d call 4000523c <__assert_func> <== NOT EXECUTED 4002900c: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED 40029010: 01 00 00 00 nop 4002846c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4002846c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40028470: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40028474: 02 80 00 5f be 400285f0 <== NOT EXECUTED 40028478: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002847c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 40028480: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40028484: 12 80 00 62 bne 4002860c <== NOT EXECUTED 40028488: 23 10 01 2e sethi %hi(0x4004b800), %l1 <== NOT EXECUTED * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4002848c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 40028490: c4 04 61 48 ld [ %l1 + 0x148 ], %g2 <== NOT EXECUTED * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40028494: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 40028498: a5 30 a0 02 srl %g2, 2, %l2 <== NOT EXECUTED * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4002849c: 02 80 00 05 be 400284b0 <== NOT EXECUTED 400284a0: aa 14 61 48 or %l1, 0x148, %l5 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); 400284a4: 90 06 20 50 add %i0, 0x50, %o0 <== NOT EXECUTED 400284a8: 7f ff ff d0 call 400283e8 <== NOT EXECUTED 400284ac: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED } if ( info->doubly_indirect ) { 400284b0: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED 400284b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400284b8: 02 80 00 19 be 4002851c <== NOT EXECUTED 400284bc: c2 04 61 48 ld [ %l1 + 0x148 ], %g1 <== NOT EXECUTED for ( i=0 ; i <== NOT EXECUTED 400284cc: 82 10 20 00 clr %g1 <== NOT EXECUTED 400284d0: 10 80 00 03 b 400284dc <== NOT EXECUTED 400284d4: a0 10 20 00 clr %l0 <== NOT EXECUTED 400284d8: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 400284dc: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED 400284e0: c2 02 00 02 ld [ %o0 + %g2 ], %g1 <== NOT EXECUTED 400284e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400284e8: 02 80 00 04 be 400284f8 <== NOT EXECUTED 400284ec: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 400284f0: 7f ff ff be call 400283e8 <== NOT EXECUTED 400284f4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 4002850c: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 40028510: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 40028514: 7f ff ff b5 call 400283e8 <== NOT EXECUTED 40028518: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 4002851c: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED 40028520: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028524: 02 80 00 31 be 400285e8 <== NOT EXECUTED 40028528: c2 04 61 48 ld [ %l1 + 0x148 ], %g1 <== NOT EXECUTED for ( i=0 ; i <== NOT EXECUTED 40028538: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 4002853c: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40028540: a8 10 20 00 clr %l4 <== NOT EXECUTED 40028544: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40028548: 02 80 00 25 be 400285dc <== NOT EXECUTED 4002854c: a6 10 20 00 clr %l3 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 40028560: 82 10 20 00 clr %g1 <== NOT EXECUTED 40028564: a0 10 20 00 clr %l0 <== NOT EXECUTED if ( p[j] ) { 40028568: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED 4002856c: c2 04 40 02 ld [ %l1 + %g2 ], %g1 <== NOT EXECUTED 40028570: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028574: 02 80 00 04 be 40028584 <== NOT EXECUTED 40028578: 90 04 40 02 add %l1, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4002857c: 7f ff ff 9b call 400283e8 <== NOT EXECUTED 40028580: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 40028598: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED 4002859c: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 400285a0: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED 400285a4: 7f ff ff 91 call 400283e8 <== NOT EXECUTED 400285a8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 400285c0: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 400285c4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 400285c8: a7 2d 20 02 sll %l4, 2, %l3 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 400285cc: e2 02 00 13 ld [ %o0 + %l3 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 400285d0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400285d4: 32 bf ff e0 bne,a 40028554 <== NOT EXECUTED 400285d8: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 400285dc: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 400285e0: 7f ff ff 82 call 400283e8 <== NOT EXECUTED 400285e4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 400285e8: 81 c7 e0 08 ret <== NOT EXECUTED 400285ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 400285f0: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 400285f4: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 400285f8: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 400285fc: 94 12 a2 40 or %o2, 0x240, %o2 <== NOT EXECUTED 40028600: 96 12 e1 38 or %o3, 0x138, %o3 <== NOT EXECUTED 40028604: 7f ff 73 0e call 4000523c <__assert_func> <== NOT EXECUTED 40028608: 92 10 21 ec mov 0x1ec, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002860c: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028610: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028614: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028618: 94 12 a2 40 or %o2, 0x240, %o2 <== NOT EXECUTED 4002861c: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 40028620: 7f ff 73 07 call 4000523c <__assert_func> <== NOT EXECUTED 40028624: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED 40028628: 01 00 00 00 nop 400283b8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 400283b8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED block_p *block_entry_ptr; block_p ptr; block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400283bc: 94 10 20 00 clr %o2 <== NOT EXECUTED 400283c0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400283c4: 7f ff ff 50 call 40028104 <== NOT EXECUTED 400283c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 400283cc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 400283d0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED block_p *block_entry_ptr; block_p ptr; block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ptr = *block_entry_ptr; *block_entry_ptr = 0; 400283d4: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 400283d8: 7f ff ff 35 call 400280ac <== NOT EXECUTED 400283dc: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 400283e0: 81 c7 e0 08 ret <== NOT EXECUTED 400283e4: 81 e8 00 00 restore <== NOT EXECUTED 400289d8 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 400289d8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 400289dc: a2 96 20 00 orcc %i0, 0, %l1 <== NOT EXECUTED 400289e0: 02 80 00 83 be 40028bec <== NOT EXECUTED 400289e4: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400289e8: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 <== NOT EXECUTED 400289ec: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 400289f0: 12 80 00 78 bne 40028bd0 <== NOT EXECUTED 400289f4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 400289f8: 02 80 00 84 be 40028c08 <== NOT EXECUTED 400289fc: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 40028a00: 02 80 00 6e be 40028bb8 <== NOT EXECUTED 40028a04: 92 06 c0 19 add %i3, %i1, %o1 <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 40028a08: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED 40028a0c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 40028a10: 18 80 00 4d bgu 40028b44 <== NOT EXECUTED 40028a14: 27 10 01 2e sethi %hi(0x4004b800), %l3 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40028a18: e0 04 e1 48 ld [ %l3 + 0x148 ], %l0 ! 4004b948 <== NOT EXECUTED 40028a1c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40028a20: 40 00 65 e2 call 400421a8 <.rem> <== NOT EXECUTED 40028a24: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028a28: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40028a2c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028a30: 40 00 65 32 call 40041ef8 <.div> <== NOT EXECUTED 40028a34: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( start_offset ) { 40028a38: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40028a3c: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED if ( start_offset ) { 40028a40: 12 80 00 2e bne 40028af8 <== NOT EXECUTED 40028a44: a4 14 e1 48 or %l3, 0x148, %l2 <== NOT EXECUTED 40028a48: a0 10 00 1a mov %i2, %l0 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40028a4c: f4 04 e1 48 ld [ %l3 + 0x148 ], %i2 <== NOT EXECUTED while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40028a50: 80 a6 c0 1a cmp %i3, %i2 <== NOT EXECUTED 40028a54: 0a 80 00 14 bcs 40028aa4 <== NOT EXECUTED 40028a58: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40028a5c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40028a60: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40028a64: 7f ff fd a8 call 40028104 <== NOT EXECUTED 40028a68: 94 10 20 00 clr %o2 <== NOT EXECUTED assert( block_ptr ); 40028a6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028a70: 02 80 00 4a be 40028b98 <== NOT EXECUTED 40028a74: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 40028a78: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 40028a7c: 40 00 2d 9a call 400340e4 <== NOT EXECUTED 40028a80: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40028a84: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 40028a88: b6 26 c0 1a sub %i3, %i2, %i3 <== NOT EXECUTED return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; 40028a8c: a0 04 00 1a add %l0, %i2, %l0 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40028a90: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; 40028a94: b2 06 60 01 inc %i1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40028a98: 08 bf ff f1 bleu 40028a5c <== NOT EXECUTED 40028a9c: b0 06 00 1a add %i0, %i2, %i0 <== NOT EXECUTED */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 40028aa0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40028aa4: 02 80 00 0e be 40028adc <== NOT EXECUTED 40028aa8: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40028aac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40028ab0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40028ab4: 7f ff fd 94 call 40028104 <== NOT EXECUTED 40028ab8: 94 10 20 00 clr %o2 <== NOT EXECUTED assert( block_ptr ); 40028abc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028ac0: 02 80 00 61 be 40028c44 <== NOT EXECUTED 40028ac4: b0 06 00 1b add %i0, %i3, %i0 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 40028ac8: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 40028acc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40028ad0: 40 00 2d 85 call 400340e4 <== NOT EXECUTED 40028ad4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 40028ad8: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 40028adc: 7f ff 73 2f call 40005798 <== NOT EXECUTED 40028ae0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40028ae4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40028ae8: c2 24 60 3c st %g1, [ %l1 + 0x3c ] <== NOT EXECUTED 40028aec: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED return copied; } 40028af0: 81 c7 e0 08 ret <== NOT EXECUTED 40028af4: 81 e8 00 00 restore <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40028af8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40028afc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40028b00: 7f ff fd 81 call 40028104 <== NOT EXECUTED 40028b04: 94 10 20 00 clr %o2 <== NOT EXECUTED assert( block_ptr ); 40028b08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028b0c: 02 80 00 46 be 40028c24 <== NOT EXECUTED 40028b10: 94 24 00 18 sub %l0, %i0, %o2 <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 40028b14: 80 a2 80 1b cmp %o2, %i3 <== NOT EXECUTED 40028b18: 18 80 00 16 bgu 40028b70 <== NOT EXECUTED 40028b1c: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; 40028b20: a0 06 80 0a add %i2, %o2, %l0 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 40028b24: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED src += to_copy; block++; 40028b28: b2 06 60 01 inc %i1 <== NOT EXECUTED my_length -= to_copy; 40028b2c: b6 26 c0 0a sub %i3, %o2, %i3 <== NOT EXECUTED copied += to_copy; 40028b30: b0 10 00 0a mov %o2, %i0 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 40028b34: 40 00 2d 6c call 400340e4 <== NOT EXECUTED 40028b38: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40028b3c: 10 bf ff c5 b 40028a50 <== NOT EXECUTED 40028b40: f4 04 e1 48 ld [ %l3 + 0x148 ], %i2 <== NOT EXECUTED * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 40028b44: 7f ff ff 1d call 400287b8 <== NOT EXECUTED 40028b48: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( status ) 40028b4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028b50: 02 bf ff b2 be 40028a18 <== NOT EXECUTED 40028b54: 27 10 01 2e sethi %hi(0x4004b800), %l3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 40028b58: 40 00 23 76 call 40031930 <__errno> <== NOT EXECUTED 40028b5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028b60: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40028b64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028b68: 81 c7 e0 08 ret <== NOT EXECUTED 40028b6c: 81 e8 00 00 restore <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 40028b70: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 40028b74: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED src += to_copy; 40028b78: a0 06 80 0a add %i2, %o2, %l0 <== NOT EXECUTED block++; 40028b7c: b2 06 60 01 inc %i1 <== NOT EXECUTED my_length -= to_copy; 40028b80: b6 26 c0 0a sub %i3, %o2, %i3 <== NOT EXECUTED copied += to_copy; 40028b84: b0 10 00 0a mov %o2, %i0 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 40028b88: 40 00 2d 57 call 400340e4 <== NOT EXECUTED 40028b8c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40028b90: 10 bf ff b0 b 40028a50 <== NOT EXECUTED 40028b94: f4 04 e1 48 ld [ %l3 + 0x148 ], %i2 <== NOT EXECUTED while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40028b98: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED 40028b9c: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028ba0: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028ba4: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028ba8: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 40028bac: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED 40028bb0: 7f ff 71 a3 call 4000523c <__assert_func> <== NOT EXECUTED 40028bb4: 92 10 23 2e mov 0x32e, %o1 <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 40028bb8: 40 00 23 5e call 40031930 <__errno> <== NOT EXECUTED 40028bbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028bc0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40028bc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028bc8: 81 c7 e0 08 ret <== NOT EXECUTED 40028bcc: 81 e8 00 00 restore <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40028bd0: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028bd4: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028bd8: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028bdc: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 40028be0: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 40028be4: 7f ff 71 96 call 4000523c <__assert_func> <== NOT EXECUTED 40028be8: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40028bec: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028bf0: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028bf4: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028bf8: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 40028bfc: 96 12 e1 38 or %o3, 0x138, %o3 <== NOT EXECUTED 40028c00: 7f ff 71 8f call 4000523c <__assert_func> <== NOT EXECUTED 40028c04: 92 10 22 e1 mov 0x2e1, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 40028c08: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028c0c: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028c10: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028c14: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 40028c18: 96 12 e1 80 or %o3, 0x180, %o3 <== NOT EXECUTED 40028c1c: 7f ff 71 88 call 4000523c <__assert_func> <== NOT EXECUTED 40028c20: 92 10 22 ed mov 0x2ed, %o1 <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40028c24: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED 40028c28: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028c2c: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028c30: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028c34: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 40028c38: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED 40028c3c: 7f ff 71 80 call 4000523c <__assert_func> <== NOT EXECUTED 40028c40: 92 10 23 1a mov 0x31a, %o1 <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40028c44: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED 40028c48: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028c4c: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028c50: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028c54: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 40028c58: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED 40028c5c: 7f ff 71 78 call 4000523c <__assert_func> <== NOT EXECUTED 40028c60: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 40028c64: 01 00 00 00 nop 4000a100 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a100: 9d e3 bf 60 save %sp, -160, %sp 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 ); 4000a104: 90 10 00 18 mov %i0, %o0 4000a108: 94 07 bf f4 add %fp, -12, %o2 4000a10c: b0 07 bf c0 add %fp, -64, %i0 4000a110: 7f ff ff 83 call 40009f1c 4000a114: 92 10 00 18 mov %i0, %o1 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000a118: b3 2e 60 10 sll %i1, 0x10, %i1 4000a11c: 03 00 00 3c sethi %hi(0xf000), %g1 4000a120: 97 36 60 10 srl %i1, 0x10, %o3 4000a124: 05 00 00 10 sethi %hi(0x4000), %g2 4000a128: 86 0a c0 01 and %o3, %g1, %g3 4000a12c: 80 a0 c0 02 cmp %g3, %g2 4000a130: 02 80 00 1f be 4000a1ac 4000a134: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000a138: 03 00 00 20 sethi %hi(0x8000), %g1 4000a13c: 80 a0 c0 01 cmp %g3, %g1 4000a140: 02 80 00 12 be 4000a188 4000a144: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000a148: 03 00 00 18 sethi %hi(0x6000), %g1 4000a14c: 80 a0 c0 01 cmp %g3, %g1 4000a150: 02 80 00 0b be 4000a17c 4000a154: 03 00 00 08 sethi %hi(0x2000), %g1 4000a158: 80 a0 c0 01 cmp %g3, %g1 4000a15c: 22 80 00 09 be,a 4000a180 4000a160: f4 27 bf e4 st %i2, [ %fp + -28 ] type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000a164: 40 00 0a 4a call 4000ca8c <__errno> <== NOT EXECUTED 4000a168: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a16c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000a170: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a174: 81 c7 e0 08 ret <== NOT EXECUTED 4000a178: 81 e8 00 00 restore <== NOT EXECUTED type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 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 ); 4000a17c: f4 27 bf e4 st %i2, [ %fp + -28 ] <== NOT EXECUTED 4000a180: f6 27 bf e8 st %i3, [ %fp + -24 ] 4000a184: 92 10 20 02 mov 2, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 4000a188: 94 10 00 18 mov %i0, %o2 4000a18c: 98 07 bf e4 add %fp, -28, %o4 4000a190: 40 00 08 0c call 4000c1c0 4000a194: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000a198: 80 a2 20 00 cmp %o0, 0 4000a19c: 02 80 00 06 be 4000a1b4 4000a1a0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4000a1a4: 81 c7 e0 08 ret 4000a1a8: 81 e8 00 00 restore 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 ); 4000a1ac: 10 bf ff f7 b 4000a188 4000a1b0: 92 10 20 01 mov 1, %o1 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000a1b4: 40 00 0a 36 call 4000ca8c <__errno> <== NOT EXECUTED 4000a1b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a1bc: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000a1c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000a1c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a1c8: 81 e8 00 00 restore <== NOT EXECUTED 40004e5c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004e5c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004e60: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004e64: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 <== NOT EXECUTED 40004e68: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40004e6c: 12 80 00 05 bne 40004e80 <== NOT EXECUTED 40004e70: 01 00 00 00 nop <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 40004e74: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] <== NOT EXECUTED return 0; } 40004e78: 81 c7 e0 08 ret <== NOT EXECUTED 40004e7c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004e80: 40 00 b2 ac call 40031930 <__errno> <== NOT EXECUTED 40004e84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004e88: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40004e8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004e90: 81 c7 e0 08 ret <== NOT EXECUTED 40004e94: 81 e8 00 00 restore <== NOT EXECUTED 40004ea4 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 40004ea4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *node; int i; node = loc->node_access; 40004ea8: c8 06 00 00 ld [ %i0 ], %g4 <== NOT EXECUTED if ( node->type != IMFS_SYM_LINK ) 40004eac: c2 01 20 48 ld [ %g4 + 0x48 ], %g1 <== NOT EXECUTED 40004eb0: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 40004eb4: 12 80 00 19 bne 40004f18 <== NOT EXECUTED 40004eb8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40004ebc: 02 80 00 15 be 40004f10 <== NOT EXECUTED 40004ec0: 86 10 20 00 clr %g3 <== NOT EXECUTED 40004ec4: c2 01 20 4c ld [ %g4 + 0x4c ], %g1 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 40004ec8: b0 10 20 00 clr %i0 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40004ecc: c4 48 40 00 ldsb [ %g1 ], %g2 <== NOT EXECUTED 40004ed0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004ed4: 12 80 00 08 bne 40004ef4 <== NOT EXECUTED 40004ed8: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 40004edc: 30 80 00 13 b,a 40004f28 <== NOT EXECUTED 40004ee0: c2 01 20 4c ld [ %g4 + 0x4c ], %g1 <== NOT EXECUTED 40004ee4: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 <== NOT EXECUTED 40004ee8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004eec: 02 80 00 07 be 40004f08 <== NOT EXECUTED 40004ef0: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; 40004ef4: c2 2e 40 03 stb %g1, [ %i1 + %g3 ] <== NOT EXECUTED node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40004ef8: b0 06 20 01 inc %i0 <== NOT EXECUTED 40004efc: 80 a6 80 18 cmp %i2, %i0 <== NOT EXECUTED 40004f00: 18 bf ff f8 bgu 40004ee0 <== NOT EXECUTED 40004f04: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 40004f08: 81 c7 e0 08 ret <== NOT EXECUTED 40004f0c: 81 e8 00 00 restore <== NOT EXECUTED 40004f10: 81 c7 e0 08 ret <== NOT EXECUTED 40004f14: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 40004f18: 40 00 b2 86 call 40031930 <__errno> <== NOT EXECUTED 40004f1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004f20: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004f24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004f28: 81 c7 e0 08 ret <== NOT EXECUTED 40004f2c: 81 e8 00 00 restore <== NOT EXECUTED 4000a1d8 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000a1d8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000a1dc: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4000a1e0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000a1e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a1e8: 22 80 00 06 be,a 4000a200 <== NOT EXECUTED 4000a1ec: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4000a1f0: 40 00 04 a0 call 4000b470 <_Chain_Extract> <== NOT EXECUTED 4000a1f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000a1f8: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000a1fc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED IMFS_update_ctime( the_jnode ); 4000a200: 92 10 20 00 clr %o1 <== NOT EXECUTED /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000a204: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED IMFS_update_ctime( the_jnode ); 4000a208: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4000a20c: 40 00 01 53 call 4000a758 <== NOT EXECUTED 4000a210: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] <== NOT EXECUTED 4000a214: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== 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) ) { 4000a218: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000a21c: 40 00 01 89 call 4000a840 <== NOT EXECUTED 4000a220: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4000a224: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a228: 12 80 00 12 bne 4000a270 <== NOT EXECUTED 4000a22c: 01 00 00 00 nop <== NOT EXECUTED 4000a230: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 4000a234: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a238: 12 80 00 0e bne 4000a270 <== NOT EXECUTED 4000a23c: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000a240: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 ! 40017fcc <== NOT EXECUTED 4000a244: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED 4000a248: c2 00 e0 04 ld [ %g3 + 4 ], %g1 <== NOT EXECUTED 4000a24c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000a250: 22 80 00 02 be,a 4000a258 <== NOT EXECUTED 4000a254: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000a258: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 4000a25c: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000a260: 22 80 00 06 be,a 4000a278 <== NOT EXECUTED 4000a264: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 4000a268: 40 00 00 ca call 4000a590 <== NOT EXECUTED 4000a26c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } return 0; } 4000a270: 81 c7 e0 08 ret <== NOT EXECUTED 4000a274: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4000a278: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a27c: 02 bf ff fb be 4000a268 <== NOT EXECUTED 4000a280: 01 00 00 00 nop <== NOT EXECUTED free( (void*) the_jnode->info.sym_link.name ); 4000a284: 40 00 00 c3 call 4000a590 <== NOT EXECUTED 4000a288: 01 00 00 00 nop <== NOT EXECUTED 4000a28c: 30 bf ff f7 b,a 4000a268 <== NOT EXECUTED 4000a290 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000a290: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000a294: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 4000a298: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000a29c: 80 a0 60 04 cmp %g1, 4 4000a2a0: 22 80 00 11 be,a 4000a2e4 4000a2a4: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000a2a8: 14 80 00 0b bg 4000a2d4 4000a2ac: 80 a0 60 06 cmp %g1, 6 4000a2b0: 80 a0 60 02 cmp %g1, 2 4000a2b4: 22 80 00 1e be,a 4000a32c 4000a2b8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 case IMFS_SYM_LINK: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000a2bc: 40 00 09 f4 call 4000ca8c <__errno> <== NOT EXECUTED 4000a2c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a2c4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000a2c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a2cc: 81 c7 e0 08 ret <== NOT EXECUTED 4000a2d0: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000a2d4: 14 bf ff fa bg 4000a2bc <== NOT EXECUTED 4000a2d8: 01 00 00 00 nop <== 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; 4000a2dc: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 <== NOT EXECUTED 4000a2e0: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000a2e4: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000a2e8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000a2ec: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000a2f0: c4 26 60 08 st %g2, [ %i1 + 8 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4000a2f4: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4000a2f8: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4000a2fc: c2 36 60 0e sth %g1, [ %i1 + 0xe ] buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4000a300: c4 26 60 24 st %g2, [ %i1 + 0x24 ] } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4000a304: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4000a308: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4000a30c: c2 36 60 10 sth %g1, [ %i1 + 0x10 ] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4000a310: c4 26 60 2c st %g2, [ %i1 + 0x2c ] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4000a314: c4 16 20 3a lduh [ %i0 + 0x3a ], %g2 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4000a318: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4000a31c: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4000a320: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 4000a324: 81 c7 e0 08 ret 4000a328: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000a32c: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4000a330: c2 26 60 04 st %g1, [ %i1 + 4 ] 4000a334: 10 bf ff ec b 4000a2e4 4000a338: c4 26 40 00 st %g2, [ %i1 ] 40004f30 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40004f30: 9d e3 bf 60 save %sp, -160, %sp <== NOT EXECUTED /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 40004f34: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40004f38: a0 07 bf c0 add %fp, -64, %l0 <== NOT EXECUTED 40004f3c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 40004f40: 7f ff fe e5 call 40004ad4 <== NOT EXECUTED 40004f44: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 40004f48: 40 00 c7 50 call 40036c88 <== NOT EXECUTED 40004f4c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40004f50: d0 27 bf e4 st %o0, [ %fp + -28 ] <== NOT EXECUTED if (info.sym_link.name == NULL) { 40004f54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004f58: 02 80 00 14 be 40004fa8 <== NOT EXECUTED 40004f5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Create a new link node. */ new_node = IMFS_create_node( 40004f60: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40004f64: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED 40004f68: 17 00 00 28 sethi %hi(0xa000), %o3 <== NOT EXECUTED 40004f6c: 98 07 bf e4 add %fp, -28, %o4 <== NOT EXECUTED 40004f70: 96 12 e1 ff or %o3, 0x1ff, %o3 <== NOT EXECUTED 40004f74: 40 00 6b a4 call 4001fe04 <== NOT EXECUTED 40004f78: b0 10 20 00 clr %i0 <== NOT EXECUTED new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 40004f7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004f80: 12 80 00 08 bne 40004fa0 <== NOT EXECUTED 40004f84: d0 07 bf e4 ld [ %fp + -28 ], %o0 <== NOT EXECUTED free( info.sym_link.name); 40004f88: 40 00 01 d9 call 400056ec <== NOT EXECUTED 40004f8c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 40004f90: 40 00 b2 68 call 40031930 <__errno> <== NOT EXECUTED 40004f94: 01 00 00 00 nop <== NOT EXECUTED 40004f98: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40004f9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40004fa0: 81 c7 e0 08 ret <== NOT EXECUTED 40004fa4: 81 e8 00 00 restore <== NOT EXECUTED * Duplicate link name */ info.sym_link.name = strdup( link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one( ENOMEM); 40004fa8: 40 00 b2 62 call 40031930 <__errno> <== NOT EXECUTED 40004fac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004fb0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004fb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004fb8: 81 c7 e0 08 ret <== NOT EXECUTED 40004fbc: 81 e8 00 00 restore <== NOT EXECUTED 40004fc0 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 40004fc0: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 40004fc4: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 40004fc8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 40004fcc: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40004fd0: 32 80 00 1b bne,a 4000503c <== NOT EXECUTED 40004fd4: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED if ( !node->info.hard_link.link_node ) 40004fd8: c8 04 20 4c ld [ %l0 + 0x4c ], %g4 <== NOT EXECUTED 40004fdc: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 40004fe0: 02 80 00 1c be 40005050 <== NOT EXECUTED 40004fe4: a2 07 bf e0 add %fp, -32, %l1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 40004fe8: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40004fec: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED 40004ff0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 <== NOT EXECUTED 40004ff4: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 40004ff8: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; 40004ffc: c8 27 bf e0 st %g4, [ %fp + -32 ] <== NOT EXECUTED IMFS_Set_handlers( &the_link ); 40005000: 40 00 6b d9 call 4001ff64 <== NOT EXECUTED 40005004: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 40005008: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 <== NOT EXECUTED 4000500c: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 40005010: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40005014: 02 80 00 15 be 40005068 <== NOT EXECUTED 40005018: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 4000501c: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40005020: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] <== NOT EXECUTED IMFS_update_ctime( node->info.hard_link.link_node ); 40005024: 40 00 01 dd call 40005798 <== NOT EXECUTED 40005028: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000502c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 <== NOT EXECUTED 40005030: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005034: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] <== NOT EXECUTED /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 40005038: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED 4000503c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 40005040: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005044: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return result; } 40005048: 81 c7 e0 08 ret <== NOT EXECUTED 4000504c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 40005050: 40 00 b2 38 call 40031930 <__errno> <== NOT EXECUTED 40005054: 01 00 00 00 nop <== NOT EXECUTED 40005058: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000505c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005060: 10 bf ff fa b 40005048 <== NOT EXECUTED 40005064: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( &the_link ); 40005068: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 4000506c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 40005070: 9f c0 80 00 call %g2 <== NOT EXECUTED 40005074: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( result != 0 ) 40005078: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000507c: 02 bf ff ef be 40005038 <== NOT EXECUTED 40005080: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40005084: 30 bf ff f1 b,a 40005048 <== NOT EXECUTED 40005088 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40005088: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4000508c: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40005090: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 <== NOT EXECUTED 40005094: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40005098: 12 80 00 09 bne 400050bc <== NOT EXECUTED 4000509c: 01 00 00 00 nop <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 400050a0: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 <== NOT EXECUTED 400050a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400050a8: 02 80 00 0b be 400050d4 <== NOT EXECUTED 400050ac: 01 00 00 00 nop <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 400050b0: c0 20 a0 58 clr [ %g2 + 0x58 ] <== NOT EXECUTED return 0; } 400050b4: 81 c7 e0 08 ret <== NOT EXECUTED 400050b8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 400050bc: 40 00 b2 1d call 40031930 <__errno> <== NOT EXECUTED 400050c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400050c4: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400050c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400050cc: 81 c7 e0 08 ret <== NOT EXECUTED 400050d0: 81 e8 00 00 restore <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 400050d4: 40 00 b2 17 call 40031930 <__errno> <== NOT EXECUTED 400050d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400050dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400050e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400050e4: 81 c7 e0 08 ret <== NOT EXECUTED 400050e8: 81 e8 00 00 restore <== NOT EXECUTED 400050ec : time_t modtime /* IN */ ) { IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 400050ec: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; return 0; } 400050f0: 90 10 20 00 clr %o0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; 400050f4: d4 20 60 40 st %o2, [ %g1 + 0x40 ] <== NOT EXECUTED return 0; } 400050f8: 81 c3 e0 08 retl <== NOT EXECUTED 400050fc: d2 20 60 3c st %o1, [ %g1 + 0x3c ] <== NOT EXECUTED 400021e0 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 400021e0: 9d e3 bf 98 save %sp, -104, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 400021e4: 03 10 00 61 sethi %hi(0x40018400), %g1 400021e8: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 ! 400184c4 400021ec: 80 a0 60 00 cmp %g1, 0 400021f0: 02 80 00 05 be 40002204 400021f4: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 400021f8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 400021fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002200: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 40002204: 40 00 22 3f call 4000ab00 40002208: a0 10 00 18 mov %i0, %l0 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 4000220c: 03 10 00 61 sethi %hi(0x40018400), %g1 40002210: c2 00 60 c8 ld [ %g1 + 0xc8 ], %g1 ! 400184c8 40002214: 80 a0 60 00 cmp %g1, 0 40002218: 02 80 00 06 be 40002230 4000221c: 90 10 00 18 mov %i0, %o0 starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 40002220: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40002224: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002228: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4000222c: a0 10 00 08 mov %o0, %l0 <== 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() ) 40002230: 03 10 00 62 sethi %hi(0x40018800), %g1 40002234: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400188b8 <_Configuration_Table> 40002238: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 4000223c: 80 a0 e0 00 cmp %g3, 0 40002240: 12 80 00 10 bne 40002280 40002244: 90 10 00 10 mov %l0, %o0 void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 40002248: 92 10 00 10 mov %l0, %o1 4000224c: 11 10 00 61 sethi %hi(0x40018400), %o0 40002250: 94 10 00 19 mov %i1, %o2 40002254: 90 12 22 50 or %o0, 0x250, %o0 40002258: 40 00 11 5e call 400067d0 <_Heap_Initialize> 4000225c: 96 10 20 08 mov 8, %o3 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 40002260: 80 a2 20 00 cmp %o0, 0 40002264: 02 80 00 0c be 40002294 40002268: 05 10 00 61 sethi %hi(0x40018400), %g2 rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 4000226c: c2 00 a2 a8 ld [ %g2 + 0x2a8 ], %g1 ! 400186a8 40002270: 82 06 40 01 add %i1, %g1, %g1 40002274: c2 20 a2 a8 st %g1, [ %g2 + 0x2a8 ] } 40002278: 81 c7 e0 08 ret 4000227c: 81 e8 00 00 restore * 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 ); 40002280: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002284: 40 00 2c 2d call 4000d338 <== NOT EXECUTED 40002288: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 4000228c: 10 bf ff f0 b 4000224c <== NOT EXECUTED 40002290: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) rtems_fatal_error_occurred( status ); 40002294: 40 00 0e f2 call 40005e5c <== NOT EXECUTED 40002298: 01 00 00 00 nop 4000229c: 01 00 00 00 nop 40003e18 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 40003e18: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 40003e1c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40003e20: 02 80 00 39 be 40003f04 <== NOT EXECUTED 40003e24: 2b 10 01 2e sethi %hi(0x4004b800), %l5 <== NOT EXECUTED return; if ( !print_handler ) 40003e28: e8 05 61 44 ld [ %l5 + 0x144 ], %l4 ! 4004b944 <== NOT EXECUTED 40003e2c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40003e30: 02 80 00 35 be 40003f04 <== NOT EXECUTED 40003e34: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 40003e38: 02 80 00 3b be 40003f24 <== NOT EXECUTED 40003e3c: a4 06 20 c4 add %i0, 0xc4, %l2 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 40003e40: ec 06 21 48 ld [ %i0 + 0x148 ], %l6 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 40003e44: e0 04 a0 04 ld [ %l2 + 4 ], %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40003e48: c2 04 80 00 ld [ %l2 ], %g1 <== 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); 40003e4c: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40003e50: a6 00 7f f0 add %g1, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40003e54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003e58: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40003e5c: 7f ff ff d6 call 40003db4 <== NOT EXECUTED 40003e60: a0 04 00 13 add %l0, %l3, %l0 <== NOT EXECUTED if ( high_water_mark ) 40003e64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003e68: 02 80 00 40 be 40003f68 <== NOT EXECUTED 40003e6c: ae 24 00 08 sub %l0, %o0, %l7 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 40003e70: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40003e74: 02 80 00 35 be 40003f48 <== NOT EXECUTED 40003e78: 03 10 01 2e sethi %hi(0x4004b800), %g1 <== NOT EXECUTED (*print_handler)( 40003e7c: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED 40003e80: e2 00 61 40 ld [ %g1 + 0x140 ], %l1 <== NOT EXECUTED 40003e84: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED 40003e88: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 40003e8c: b0 10 61 40 or %g1, 0x140, %i0 <== NOT EXECUTED 40003e90: 40 00 16 52 call 400097d8 <== NOT EXECUTED 40003e94: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003e98: 13 10 01 11 sethi %hi(0x40044400), %o1 <== NOT EXECUTED 40003e9c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 40003ea0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40003ea4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003ea8: 9f c5 00 00 call %l4 <== NOT EXECUTED 40003eac: 92 12 60 d8 or %o1, 0xd8, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 40003eb0: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 40003eb4: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 40003eb8: c4 05 61 44 ld [ %l5 + 0x144 ], %g2 <== NOT EXECUTED 40003ebc: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 40003ec0: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 40003ec4: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 40003ec8: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 40003ecc: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 40003ed0: 13 10 01 11 sethi %hi(0x40044400), %o1 <== NOT EXECUTED 40003ed4: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003ed8: 92 12 60 f8 or %o1, 0xf8, %o1 ! 400444f8 <__func__.4755+0x260> <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 40003edc: 03 10 01 2e sethi %hi(0x4004b800), %g1 <== NOT EXECUTED 40003ee0: c4 00 61 3c ld [ %g1 + 0x13c ], %g2 ! 4004b93c <== NOT EXECUTED 40003ee4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003ee8: 02 80 00 09 be 40003f0c <== NOT EXECUTED 40003eec: c2 05 61 44 ld [ %l5 + 0x144 ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40003ef0: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 40003ef4: 13 10 01 11 sethi %hi(0x40044400), %o1 <== NOT EXECUTED 40003ef8: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED 40003efc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003f00: 92 12 61 28 or %o1, 0x128, %o1 <== NOT EXECUTED 40003f04: 81 c7 e0 08 ret <== NOT EXECUTED 40003f08: 81 e8 00 00 restore <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 40003f0c: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 40003f10: 13 10 01 11 sethi %hi(0x40044400), %o1 <== NOT EXECUTED 40003f14: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003f18: 92 12 61 18 or %o1, 0x118, %o1 ! 40044518 <__func__.4755+0x280> <== NOT EXECUTED 40003f1c: 81 c7 e0 08 ret <== NOT EXECUTED 40003f20: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 40003f24: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED 40003f28: 82 10 61 8c or %g1, 0x18c, %g1 ! 4005e98c <== NOT EXECUTED 40003f2c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40003f30: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003f34: 02 bf ff f4 be 40003f04 <== NOT EXECUTED 40003f38: a4 10 00 01 mov %g1, %l2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 40003f3c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003f40: 10 bf ff c1 b 40003e44 <== NOT EXECUTED 40003f44: ac 10 20 00 clr %l6 <== 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 ); 40003f48: d0 00 61 40 ld [ %g1 + 0x140 ], %o0 <== NOT EXECUTED 40003f4c: 13 10 01 11 sethi %hi(0x40044400), %o1 <== NOT EXECUTED 40003f50: b0 10 61 40 or %g1, 0x140, %i0 <== NOT EXECUTED 40003f54: 92 12 60 e8 or %o1, 0xe8, %o1 <== NOT EXECUTED 40003f58: 9f c5 00 00 call %l4 <== NOT EXECUTED 40003f5c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED } (*print_handler)( 40003f60: 10 bf ff d5 b 40003eb4 <== NOT EXECUTED 40003f64: d6 04 80 00 ld [ %l2 ], %o3 <== 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 ) 40003f68: 10 bf ff c2 b 40003e70 <== NOT EXECUTED 40003f6c: ae 10 20 00 clr %l7 <== NOT EXECUTED 40003db4 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 40003db4: 82 10 00 08 mov %o0, %g1 <== 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++) 40003db8: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40003dbc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40003dc0: 86 02 00 09 add %o0, %o1, %g3 <== NOT EXECUTED 40003dc4: 80 a2 00 03 cmp %o0, %g3 <== NOT EXECUTED 40003dc8: 3a 80 00 12 bcc,a 40003e10 <== NOT EXECUTED 40003dcc: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) 40003dd0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40003dd4: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== NOT EXECUTED 40003dd8: 82 10 61 a5 or %g1, 0x1a5, %g1 ! a5a5a5a5 <== NOT EXECUTED 40003ddc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003de0: 22 80 00 07 be,a 40003dfc <== NOT EXECUTED 40003de4: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40003de8: 30 80 00 0a b,a 40003e10 <== NOT EXECUTED 40003dec: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003df0: 12 80 00 08 bne 40003e10 <== NOT EXECUTED 40003df4: 01 00 00 00 nop <== 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++) 40003df8: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40003dfc: 80 a0 c0 08 cmp %g3, %o0 <== NOT EXECUTED 40003e00: 38 bf ff fb bgu,a 40003dec <== NOT EXECUTED 40003e04: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 40003e08: 81 c3 e0 08 retl <== NOT EXECUTED 40003e0c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40003e10: 81 c3 e0 08 retl <== NOT EXECUTED 40003e14: 01 00 00 00 nop 40003fe4 : */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 40003fe4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 40003fe8: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 40003fec: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40003ff0: 11 10 01 11 sethi %hi(0x40044400), %o0 <== NOT EXECUTED 40003ff4: 40 00 0b a4 call 40006e84 <== NOT EXECUTED 40003ff8: 90 12 21 98 or %o0, 0x198, %o0 ! 40044598 <__func__.4755+0x300> <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 40003ffc: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 40004000: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 40004004: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED 40004008: 11 10 01 11 sethi %hi(0x40044400), %o0 <== NOT EXECUTED 4000400c: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 40004010: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40004014: 40 00 0b 9c call 40006e84 <== NOT EXECUTED 40004018: 94 02 40 0a add %o1, %o2, %o2 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 4000401c: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 40004020: 22 80 00 04 be,a 40004030 <== NOT EXECUTED 40004024: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED " Damaged pattern begins at 0x%08lx and is %d bytes long\n", (unsigned long) Stack_check_Get_pattern_area(stack), PATTERN_SIZE_BYTES); } rtems_fatal_error_occurred( 0x81 ); 40004028: 40 00 18 40 call 4000a128 <== NOT EXECUTED 4000402c: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { printk( 40004030: 11 10 01 11 sethi %hi(0x40044400), %o0 <== NOT EXECUTED 40004034: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40004038: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 4000403c: 40 00 0b 92 call 40006e84 <== NOT EXECUTED 40004040: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40004044: 30 bf ff f9 b,a 40004028 <== NOT EXECUTED 40006068 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40006068: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4000606c: 03 10 00 62 sethi %hi(0x40018800), %g1 40006070: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 40018a64 <_API_extensions_List> 40006074: 82 10 62 64 or %g1, 0x264, %g1 40006078: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 4000607c: 80 a4 00 11 cmp %l0, %l1 40006080: 02 80 00 0c be 400060b0 <_API_extensions_Run_postdriver+0x48> 40006084: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40006088: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000608c: 80 a0 60 00 cmp %g1, 0 40006090: 22 80 00 05 be,a 400060a4 <_API_extensions_Run_postdriver+0x3c> 40006094: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40006098: 9f c0 40 00 call %g1 4000609c: 01 00 00 00 nop 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 ) { 400060a0: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400060a4: 80 a4 00 11 cmp %l0, %l1 400060a8: 32 bf ff f9 bne,a 4000608c <_API_extensions_Run_postdriver+0x24> 400060ac: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 400060b0: 81 c7 e0 08 ret 400060b4: 81 e8 00 00 restore 400060b8 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 400060b8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400060bc: 03 10 00 62 sethi %hi(0x40018800), %g1 400060c0: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 40018a64 <_API_extensions_List> 400060c4: 82 10 62 64 or %g1, 0x264, %g1 400060c8: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400060cc: 80 a4 00 11 cmp %l0, %l1 400060d0: 02 80 00 0d be 40006104 <_API_extensions_Run_postswitch+0x4c> 400060d4: 03 10 00 62 sethi %hi(0x40018800), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 400060d8: a4 10 60 e0 or %g1, 0xe0, %l2 ! 400188e0 <_Thread_Executing> !_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 ) 400060dc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400060e0: 80 a0 60 00 cmp %g1, 0 400060e4: 22 80 00 05 be,a 400060f8 <_API_extensions_Run_postswitch+0x40> 400060e8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 400060ec: 9f c0 40 00 call %g1 400060f0: d0 04 80 00 ld [ %l2 ], %o0 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 ) { 400060f4: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400060f8: 80 a4 00 11 cmp %l0, %l1 400060fc: 32 bf ff f9 bne,a 400060e0 <_API_extensions_Run_postswitch+0x28> 40006100: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 40006104: 81 c7 e0 08 ret 40006108: 81 e8 00 00 restore 40006018 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40006018: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4000601c: 03 10 00 62 sethi %hi(0x40018800), %g1 40006020: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 40018a64 <_API_extensions_List> 40006024: 82 10 62 64 or %g1, 0x264, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40006028: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 4000602c: 80 a4 00 11 cmp %l0, %l1 40006030: 02 80 00 0c be 40006060 <_API_extensions_Run_predriver+0x48> 40006034: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 40006038: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000603c: 80 a0 60 00 cmp %g1, 0 40006040: 22 80 00 05 be,a 40006054 <_API_extensions_Run_predriver+0x3c> 40006044: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40006048: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000604c: 01 00 00 00 nop <== 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 ) { 40006050: e0 04 00 00 ld [ %l0 ], %l0 <== 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 ) ; 40006054: 80 a4 00 11 cmp %l0, %l1 40006058: 32 bf ff f9 bne,a 4000603c <_API_extensions_Run_predriver+0x24> 4000605c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40006060: 81 c7 e0 08 ret 40006064: 81 e8 00 00 restore 40012604 <_CORE_message_queue_Broadcast>: size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 40012604: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 40012608: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 4001260c: a4 10 00 18 mov %i0, %l2 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 40012610: 80 a0 40 1a cmp %g1, %i2 40012614: 0a 80 00 17 bcs 40012670 <_CORE_message_queue_Broadcast+0x6c> 40012618: b0 10 20 01 mov 1, %i0 * 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 ) { 4001261c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40012620: 80 a0 60 00 cmp %g1, 0 40012624: 02 80 00 0a be 4001264c <_CORE_message_queue_Broadcast+0x48> 40012628: a2 10 20 00 clr %l1 *count = 0; 4001262c: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 40012630: 81 c7 e0 08 ret <== NOT EXECUTED 40012634: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40012638: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 4001263c: 40 00 20 30 call 4001a6fc 40012640: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40012644: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 40012648: f4 20 40 00 st %i2, [ %g1 ] * 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))) { 4001264c: 40 00 0a 05 call 40014e60 <_Thread_queue_Dequeue> 40012650: 90 10 00 12 mov %l2, %o0 40012654: 92 10 00 19 mov %i1, %o1 40012658: a0 10 00 08 mov %o0, %l0 4001265c: 80 a2 20 00 cmp %o0, 0 40012660: 12 bf ff f6 bne 40012638 <_CORE_message_queue_Broadcast+0x34> 40012664: 94 10 00 1a mov %i2, %o2 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 40012668: e2 27 40 00 st %l1, [ %i5 ] 4001266c: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40012670: 81 c7 e0 08 ret 40012674: 81 e8 00 00 restore 400170cc <_CORE_message_queue_Insert_message>: 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 ) { 400170cc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 400170d0: 03 20 00 00 sethi %hi(0x80000000), %g1 400170d4: 80 a6 80 01 cmp %i2, %g1 400170d8: 02 80 00 41 be 400171dc <_CORE_message_queue_Insert_message+0x110> 400170dc: f4 26 60 08 st %i2, [ %i1 + 8 ] 400170e0: 82 00 7c 00 add %g1, -1024, %g1 400170e4: 82 10 63 ff or %g1, 0x3ff, %g1 400170e8: 80 a6 80 01 cmp %i2, %g1 400170ec: 02 80 00 2a be 40017194 <_CORE_message_queue_Insert_message+0xc8> 400170f0: 84 06 20 54 add %i0, 0x54, %g2 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; 400170f4: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { 400170f8: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 400170fc: 32 80 00 22 bne,a 40017184 <_CORE_message_queue_Insert_message+0xb8> <== NOT EXECUTED 40017100: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40017104: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 40017108: 7f ff ad 12 call 40002550 <== NOT EXECUTED 4001710c: 01 00 00 00 nop <== NOT EXECUTED if ( the_message_queue->number_of_pending_messages++ == 0 ) notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 40017110: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 40017114: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40017118: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4001711c: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40017120: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED 40017124: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 40017128: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED 4001712c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40017130: 84 00 a0 01 inc %g2 <== 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; 40017134: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED 40017138: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED 4001713c: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 40017140: 7f ff ad 08 call 40002560 <== NOT EXECUTED 40017144: 01 00 00 00 nop <== 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 ) 40017148: 80 8c 20 ff btst 0xff, %l0 <== NOT EXECUTED 4001714c: 02 80 00 08 be 4001716c <_CORE_message_queue_Insert_message+0xa0> 40017150: 01 00 00 00 nop 40017154: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 40017158: 80 a0 60 00 cmp %g1, 0 4001715c: 02 80 00 04 be 4001716c <_CORE_message_queue_Insert_message+0xa0> 40017160: 01 00 00 00 nop (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 40017164: 9f c0 40 00 call %g1 <== NOT EXECUTED 40017168: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 4001716c: 81 c7 e0 08 ret 40017170: 81 e8 00 00 restore 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 ) ) { 40017174: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED 40017178: 22 bf ff e4 be,a 40017108 <_CORE_message_queue_Insert_message+0x3c> <== NOT EXECUTED 4001717c: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 40017180: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40017184: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 40017188: 36 bf ff fb bge,a 40017174 <_CORE_message_queue_Insert_message+0xa8> <== NOT EXECUTED 4001718c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 40017190: 30 bf ff de b,a 40017108 <_CORE_message_queue_Insert_message+0x3c> <== NOT EXECUTED the_message->priority = submit_type; switch ( submit_type ) { case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 40017194: 7f ff ac ef call 40002550 40017198: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 4001719c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400171a0: 82 06 20 54 add %i0, 0x54, %g1 400171a4: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 400171a8: c6 06 20 58 ld [ %i0 + 0x58 ], %g3 the_chain->last = the_node; 400171ac: f2 26 20 58 st %i1, [ %i0 + 0x58 ] 400171b0: 80 a0 00 02 cmp %g0, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 400171b4: c6 26 60 04 st %g3, [ %i1 + 4 ] 400171b8: 82 60 3f ff subx %g0, -1, %g1 400171bc: 84 00 a0 01 inc %g2 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; 400171c0: f2 20 c0 00 st %i1, [ %g3 ] 400171c4: a0 10 00 01 mov %g1, %l0 400171c8: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 400171cc: 7f ff ac e5 call 40002560 400171d0: 01 00 00 00 nop * 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 ) 400171d4: 10 bf ff de b 4001714c <_CORE_message_queue_Insert_message+0x80> 400171d8: 80 8c 20 ff btst 0xff, %l0 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 ); 400171dc: 7f ff ac dd call 40002550 400171e0: 01 00 00 00 nop if ( the_message_queue->number_of_pending_messages++ == 0 ) 400171e4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400171e8: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 400171ec: 82 06 20 50 add %i0, 0x50, %g1 { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; 400171f0: f2 26 20 50 st %i1, [ %i0 + 0x50 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400171f4: c2 26 60 04 st %g1, [ %i1 + 4 ] 400171f8: 80 a0 00 02 cmp %g0, %g2 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 400171fc: f2 20 e0 04 st %i1, [ %g3 + 4 ] 40017200: 82 60 3f ff subx %g0, -1, %g1 40017204: 84 00 a0 01 inc %g2 Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 40017208: c6 26 40 00 st %g3, [ %i1 ] 4001720c: a0 10 00 01 mov %g1, %l0 40017210: c4 26 20 48 st %g2, [ %i0 + 0x48 ] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 40017214: 7f ff ac d3 call 40002560 40017218: 01 00 00 00 nop * 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 ) 4001721c: 10 bf ff cc b 4001714c <_CORE_message_queue_Insert_message+0x80> 40017220: 80 8c 20 ff btst 0xff, %l0 40013e58 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40013e58: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 40013e5c: 27 10 00 a4 sethi %hi(0x40029000), %l3 40013e60: e2 04 e3 80 ld [ %l3 + 0x380 ], %l1 ! 40029380 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 40013e64: a4 10 00 19 mov %i1, %l2 Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 40013e68: 7f ff b9 ba call 40002550 40013e6c: c0 24 60 34 clr [ %l1 + 0x34 ] */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40013e70: f2 06 20 50 ld [ %i0 + 0x50 ], %i1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40013e74: 82 06 20 54 add %i0, 0x54, %g1 40013e78: 80 a6 40 01 cmp %i1, %g1 40013e7c: 02 80 00 21 be 40013f00 <_CORE_message_queue_Seize+0xa8> 40013e80: 84 06 20 50 add %i0, 0x50, %g2 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 40013e84: c6 06 40 00 ld [ %i1 ], %g3 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 40013e88: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_chain->first = new_first; 40013e8c: c6 26 20 50 st %g3, [ %i0 + 0x50 ] 40013e90: 82 00 7f ff add %g1, -1, %g1 40013e94: c2 26 20 48 st %g1, [ %i0 + 0x48 ] new_first->previous = _Chain_Head(the_chain); 40013e98: c4 20 e0 04 st %g2, [ %g3 + 4 ] _ISR_Enable( level ); 40013e9c: 7f ff b9 b1 call 40002560 40013ea0: a2 06 60 10 add %i1, 0x10, %l1 *size_p = the_message->Contents.size; 40013ea4: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 40013ea8: c4 04 e3 80 ld [ %l3 + 0x380 ], %g2 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; 40013eac: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 40013eb0: c2 06 60 08 ld [ %i1 + 8 ], %g1 40013eb4: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40013eb8: 92 10 00 11 mov %l1, %o1 40013ebc: 40 00 14 7f call 400190b8 40013ec0: 90 10 00 1a mov %i2, %o0 * * 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 ); 40013ec4: 7f ff e9 5c call 4000e434 <_Thread_queue_Dequeue> 40013ec8: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 40013ecc: 80 a2 20 00 cmp %o0, 0 40013ed0: 02 80 00 1f be 40013f4c <_CORE_message_queue_Seize+0xf4> 40013ed4: 01 00 00 00 nop * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; the_message->Contents.size = (size_t) the_thread->Wait.option; 40013ed8: d4 02 20 30 ld [ %o0 + 0x30 ], %o2 <== 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; 40013edc: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 40013ee0: d4 26 60 0c st %o2, [ %i1 + 0xc ] <== 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; 40013ee4: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED 40013ee8: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED 40013eec: 40 00 14 73 call 400190b8 <== NOT EXECUTED 40013ef0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 40013ef4: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED 40013ef8: 40 00 0c 75 call 400170cc <_CORE_message_queue_Insert_message> <== NOT EXECUTED 40013efc: 81 e8 00 00 restore <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 40013f00: 80 8f 20 ff btst 0xff, %i4 40013f04: 02 80 00 0c be 40013f34 <_CORE_message_queue_Seize+0xdc> 40013f08: 82 10 20 01 mov 1, %g1 40013f0c: c2 26 20 30 st %g1, [ %i0 + 0x30 ] _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; 40013f10: f6 24 60 28 st %i3, [ %l1 + 0x28 ] 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; 40013f14: f0 24 60 44 st %i0, [ %l1 + 0x44 ] executing->Wait.id = id; 40013f18: e4 24 60 20 st %l2, [ %l1 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 40013f1c: f4 24 60 2c st %i2, [ %l1 + 0x2c ] executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 40013f20: 7f ff b9 90 call 40002560 40013f24: 35 10 00 3a sethi %hi(0x4000e800), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40013f28: b2 10 00 1d mov %i5, %i1 40013f2c: 7f ff e9 a6 call 4000e5c4 <_Thread_queue_Enqueue_with_handler> 40013f30: 95 ee a2 1c restore %i2, 0x21c, %o2 ); return; } if ( !wait ) { _ISR_Enable( level ); 40013f34: 7f ff b9 8b call 40002560 40013f38: 01 00 00 00 nop executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 40013f3c: 82 10 20 04 mov 4, %g1 ! 4 40013f40: c2 24 60 34 st %g1, [ %l1 + 0x34 ] 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 ); } 40013f44: 81 c7 e0 08 ret 40013f48: 81 e8 00 00 restore 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 ); 40013f4c: 7f ff e2 25 call 4000c7e0 <_Chain_Append> 40013f50: 91 ee 20 68 restore %i0, 0x68, %o0 40013f54: 01 00 00 00 nop 40013f58 <_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 ) { 40013f58: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40013f5c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 40013f60: a2 10 00 18 mov %i0, %l1 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40013f64: 80 a0 40 1a cmp %g1, %i2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 40013f68: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40013f6c: 0a 80 00 22 bcs 40013ff4 <_CORE_message_queue_Submit+0x9c> 40013f70: b0 10 20 01 mov 1, %i0 /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 40013f74: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40013f78: 80 a0 a0 00 cmp %g2, 0 40013f7c: 02 80 00 22 be 40014004 <_CORE_message_queue_Submit+0xac> 40013f80: 01 00 00 00 nop /* * 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 < 40013f84: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40013f88: 80 a0 40 02 cmp %g1, %g2 40013f8c: 18 80 00 2b bgu 40014038 <_CORE_message_queue_Submit+0xe0> 40013f90: 80 a4 a0 00 cmp %l2, 0 * 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 ) { 40013f94: 02 80 00 18 be 40013ff4 <_CORE_message_queue_Submit+0x9c> 40013f98: b0 10 20 02 mov 2, %i0 /* * 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() ) { 40013f9c: 03 10 00 a4 sethi %hi(0x40029000), %g1 <== NOT EXECUTED 40013fa0: c4 00 63 5c ld [ %g1 + 0x35c ], %g2 ! 4002935c <_ISR_Nest_level> <== NOT EXECUTED 40013fa4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013fa8: 32 80 00 13 bne,a 40013ff4 <_CORE_message_queue_Submit+0x9c> <== NOT EXECUTED 40013fac: b0 10 20 03 mov 3, %i0 <== 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; 40013fb0: 03 10 00 a4 sethi %hi(0x40029000), %g1 <== NOT EXECUTED _ISR_Disable( level ); 40013fb4: 7f ff b9 67 call 40002550 <== NOT EXECUTED 40013fb8: e0 00 63 80 ld [ %g1 + 0x380 ], %l0 ! 40029380 <_Thread_Executing> <== NOT EXECUTED 40013fbc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40013fc0: c2 24 60 30 st %g1, [ %l1 + 0x30 ] <== 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; 40013fc4: fa 24 20 24 st %i5, [ %l0 + 0x24 ] <== 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; 40013fc8: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 40013fcc: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 40013fd0: f4 24 20 30 st %i2, [ %l0 + 0x30 ] <== 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; 40013fd4: e2 24 20 44 st %l1, [ %l0 + 0x44 ] <== 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 ); 40013fd8: 7f ff b9 62 call 40002560 <== NOT EXECUTED 40013fdc: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40013fe0: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED 40013fe4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40013fe8: 15 10 00 3a sethi %hi(0x4000e800), %o2 <== NOT EXECUTED 40013fec: 7f ff e9 76 call 4000e5c4 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 40013ff0: 94 12 a2 1c or %o2, 0x21c, %o2 ! 4000ea1c <_Thread_queue_Timeout> <== NOT EXECUTED 40013ff4: 81 c7 e0 08 ret 40013ff8: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 40013ffc: 81 c7 e0 08 ret <== NOT EXECUTED 40014000: 91 e8 20 03 restore %g0, 3, %o0 <== 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 ); 40014004: 7f ff e9 0c call 4000e434 <_Thread_queue_Dequeue> 40014008: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 4001400c: a0 92 20 00 orcc %o0, 0, %l0 40014010: 02 80 00 1b be 4001407c <_CORE_message_queue_Submit+0x124> 40014014: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40014018: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 4001401c: 40 00 14 27 call 400190b8 40014020: 94 10 00 1a mov %i2, %o2 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40014024: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 40014028: fa 24 20 24 st %i5, [ %l0 + 0x24 ] _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 4001402c: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40014030: 81 c7 e0 08 ret 40014034: 91 e8 20 00 restore %g0, 0, %o0 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 *) 40014038: 7f ff e1 f6 call 4000c810 <_Chain_Get> 4001403c: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40014040: a0 92 20 00 orcc %o0, 0, %l0 40014044: 02 bf ff ee be 40013ffc <_CORE_message_queue_Submit+0xa4> 40014048: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4001404c: 94 10 00 1a mov %i2, %o2 40014050: 40 00 14 1a call 400190b8 40014054: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40014058: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 4001405c: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40014060: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40014064: 92 10 00 10 mov %l0, %o1 40014068: 94 10 00 1d mov %i5, %o2 4001406c: 40 00 0c 18 call 400170cc <_CORE_message_queue_Insert_message> 40014070: b0 10 20 00 clr %i0 40014074: 81 c7 e0 08 ret 40014078: 81 e8 00 00 restore * 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 ); if ( the_thread ) { 4001407c: 10 bf ff c2 b 40013f84 <_CORE_message_queue_Submit+0x2c> 40014080: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4000b544 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4000b544: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000b548: 03 10 00 62 sethi %hi(0x40018800), %g1 4000b54c: c6 00 60 e0 ld [ %g1 + 0xe0 ], %g3 ! 400188e0 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000b550: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000b554: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000b558: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000b55c: 80 a0 60 00 cmp %g1, 0 4000b560: 22 80 00 12 be,a 4000b5a8 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000b564: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 4000b568: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000b56c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000b570: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 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; 4000b574: c2 26 20 60 st %g1, [ %i0 + 0x60 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4000b578: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000b57c: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000b580: 80 a0 a0 02 cmp %g2, 2 4000b584: 02 80 00 0e be 4000b5bc <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000b588: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000b58c: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 4000b590: 22 80 00 0d be,a 4000b5c4 <_CORE_mutex_Seize_interrupt_trylock+0x80> <== NOT EXECUTED 4000b594: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 4000b598: 7f ff d9 e6 call 40001d30 4000b59c: b0 10 20 00 clr %i0 4000b5a0: 81 c7 e0 08 ret 4000b5a4: 81 e8 00 00 restore /* * 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 ) ) { 4000b5a8: 80 a0 c0 01 cmp %g3, %g1 4000b5ac: 22 80 00 2a be,a 4000b654 <_CORE_mutex_Seize_interrupt_trylock+0x110> 4000b5b0: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000b5b4: 81 c7 e0 08 ret 4000b5b8: 91 e8 20 01 restore %g0, 1, %o0 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b5bc: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000b5c0: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b5c4: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000b5c8: 12 bf ff f4 bne 4000b598 <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000b5cc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000b5d0: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 <== NOT EXECUTED current = executing->current_priority; 4000b5d4: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000b5d8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000b5dc: 02 80 00 2f be 4000b698 <_CORE_mutex_Seize_interrupt_trylock+0x154> <== NOT EXECUTED 4000b5e0: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000b5e4: 1a 80 00 11 bcc 4000b628 <_CORE_mutex_Seize_interrupt_trylock+0xe4> <== NOT EXECUTED 4000b5e8: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b5ec: 05 10 00 62 sethi %hi(0x40018800), %g2 <== NOT EXECUTED 4000b5f0: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000b5f4: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000b5f8: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000b5fc: 7f ff d9 cd call 40001d30 <== NOT EXECUTED 4000b600: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 4000b604: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED 4000b608: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 4000b60c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000b610: 7f ff ef 82 call 40007418 <_Thread_Change_priority> <== NOT EXECUTED 4000b614: b0 10 20 00 clr %i0 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000b618: 7f ff f0 fa call 40007a00 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000b61c: 01 00 00 00 nop <== NOT EXECUTED 4000b620: 81 c7 e0 08 ret <== NOT EXECUTED 4000b624: 81 e8 00 00 restore <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000b628: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4000b62c: c0 26 20 54 clr [ %i0 + 0x54 ] <== 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; 4000b630: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 4000b634: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000b638: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4000b63c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b640: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000b644: 7f ff d9 bb call 40001d30 <== NOT EXECUTED 4000b648: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b64c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b650: 81 e8 00 00 restore <== 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 ) { 4000b654: 80 a0 60 00 cmp %g1, 0 4000b658: 22 80 00 0a be,a 4000b680 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 4000b65c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000b660: 80 a0 60 01 cmp %g1, 1 4000b664: 12 bf ff d4 bne 4000b5b4 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000b668: 82 10 20 02 mov 2, %g1 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; 4000b66c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 4000b670: 7f ff d9 b0 call 40001d30 4000b674: b0 10 20 00 clr %i0 4000b678: 81 c7 e0 08 ret 4000b67c: 81 e8 00 00 restore * 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++; 4000b680: 82 00 60 01 inc %g1 4000b684: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000b688: 7f ff d9 aa call 40001d30 4000b68c: b0 10 20 00 clr %i0 4000b690: 81 c7 e0 08 ret 4000b694: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000b698: 7f ff d9 a6 call 40001d30 <== NOT EXECUTED 4000b69c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b6a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b6a4: 81 e8 00 00 restore <== NOT EXECUTED 40006488 <_CORE_mutex_Surrender>: CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 40006488: 9d e3 bf 98 save %sp, -104, %sp * 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 ) { 4000648c: c2 0e 20 44 ldub [ %i0 + 0x44 ], %g1 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 40006490: a0 10 00 18 mov %i0, %l0 * 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 ) { 40006494: 80 a0 60 00 cmp %g1, 0 40006498: 02 80 00 07 be 400064b4 <_CORE_mutex_Surrender+0x2c> 4000649c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 400064a0: 03 10 00 62 sethi %hi(0x40018800), %g1 400064a4: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400188e0 <_Thread_Executing> 400064a8: 80 a2 00 02 cmp %o0, %g2 400064ac: 12 80 00 2e bne 40006564 <_CORE_mutex_Surrender+0xdc> 400064b0: b0 10 20 03 mov 3, %i0 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 400064b4: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400064b8: 80 a0 60 00 cmp %g1, 0 400064bc: 02 80 00 22 be 40006544 <_CORE_mutex_Surrender+0xbc> 400064c0: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 400064c4: 80 a0 60 00 cmp %g1, 0 400064c8: 12 80 00 21 bne 4000654c <_CORE_mutex_Surrender+0xc4> 400064cc: c2 24 20 54 st %g1, [ %l0 + 0x54 ] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400064d0: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400064d4: 80 a0 a0 02 cmp %g2, 2 400064d8: 02 80 00 31 be 4000659c <_CORE_mutex_Surrender+0x114> 400064dc: 80 a0 a0 03 cmp %g2, 3 400064e0: 22 80 00 30 be,a 400065a0 <_CORE_mutex_Surrender+0x118> 400064e4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 400064e8: c0 24 20 5c clr [ %l0 + 0x5c ] /* * 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 ) || 400064ec: 80 a0 a0 02 cmp %g2, 2 400064f0: 02 80 00 1f be 4000656c <_CORE_mutex_Surrender+0xe4> 400064f4: c0 24 20 60 clr [ %l0 + 0x60 ] 400064f8: 80 a0 a0 03 cmp %g2, 3 400064fc: 22 80 00 1d be,a 40006570 <_CORE_mutex_Surrender+0xe8> 40006500: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED /* * 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 ) ) ) { 40006504: 40 00 06 1a call 40007d6c <_Thread_queue_Dequeue> 40006508: 90 10 00 10 mov %l0, %o0 4000650c: 86 92 20 00 orcc %o0, 0, %g3 40006510: 02 80 00 37 be 400065ec <_CORE_mutex_Surrender+0x164> 40006514: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40006518: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 4000651c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40006520: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 40006524: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 40006528: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 4000652c: 80 a0 a0 02 cmp %g2, 2 40006530: 02 80 00 2a be 400065d8 <_CORE_mutex_Surrender+0x150> 40006534: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 40006538: 80 a0 a0 03 cmp %g2, 3 4000653c: 22 80 00 1c be,a 400065ac <_CORE_mutex_Surrender+0x124> 40006540: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 40006544: 81 c7 e0 08 ret 40006548: 91 e8 20 00 restore %g0, 0, %o0 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000654c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40006550: 80 a0 60 00 cmp %g1, 0 40006554: 02 bf ff fc be 40006544 <_CORE_mutex_Surrender+0xbc> 40006558: 80 a0 60 01 cmp %g1, 1 4000655c: 12 bf ff dd bne 400064d0 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 40006560: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 40006564: 81 c7 e0 08 ret 40006568: 81 e8 00 00 restore _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 && 4000656c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006570: 80 a0 60 00 cmp %g1, 0 40006574: 12 bf ff e4 bne 40006504 <_CORE_mutex_Surrender+0x7c> 40006578: 01 00 00 00 nop 4000657c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40006580: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40006584: 80 a2 40 01 cmp %o1, %g1 40006588: 02 bf ff df be 40006504 <_CORE_mutex_Surrender+0x7c> 4000658c: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40006590: 40 00 03 a2 call 40007418 <_Thread_Change_priority> 40006594: 94 10 20 01 mov 1, %o2 ! 1 40006598: 30 bf ff db b,a 40006504 <_CORE_mutex_Surrender+0x7c> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 4000659c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400065a0: 82 00 7f ff add %g1, -1, %g1 400065a4: 10 bf ff d1 b 400064e8 <_CORE_mutex_Surrender+0x60> 400065a8: c2 22 20 1c st %g1, [ %o0 + 0x1c ] #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++; if (the_mutex->Attributes.priority_ceiling < 400065ac: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED 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++; 400065b0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400065b4: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 400065b8: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED 400065bc: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 400065c0: 1a bf ff e1 bcc 40006544 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED 400065c4: 94 10 20 00 clr %o2 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 400065c8: 40 00 03 94 call 40007418 <_Thread_Change_priority> <== NOT EXECUTED 400065cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400065d0: 81 c7 e0 08 ret <== NOT EXECUTED 400065d4: 81 e8 00 00 restore <== 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++; 400065d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 400065dc: 82 00 60 01 inc %g1 400065e0: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 400065e4: 81 c7 e0 08 ret 400065e8: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 400065ec: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 400065f0: 81 c7 e0 08 ret 400065f4: 91 e8 20 00 restore %g0, 0, %o0 40024ba8 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 40024ba8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 40024bac: 7f ff 7c 6a call 40003d54 <== NOT EXECUTED 40024bb0: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40024bb4: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40024bb8: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40024bbc: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 40024bc0: f2 20 60 04 st %i1, [ %g1 + 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; 40024bc4: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 40024bc8: 7f ff 7c 67 call 40003d64 <== NOT EXECUTED 40024bcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40024bd0: 01 00 00 00 nop 4000b404 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000b404: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 4000b408: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 400188e4 <_Debug_Level> <== NOT EXECUTED 4000b40c: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 4000b410: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000b414: 81 c3 e0 08 retl <== NOT EXECUTED 4000b418: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40005260 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40005260: 9d e3 bf 98 save %sp, -104, %sp 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 ]; 40005264: f2 06 21 5c ld [ %i0 + 0x15c ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40005268: 7f ff f2 ae call 40001d20 4000526c: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40005270: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 40005274: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40005278: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4000527c: 9a 88 c0 04 andcc %g3, %g4, %o5 40005280: 02 80 00 28 be 40005320 <_Event_Surrender+0xc0> 40005284: 03 10 00 62 sethi %hi(0x40018800), %g1 /* * 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() && 40005288: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 400188bc <_ISR_Nest_level> 4000528c: 80 a0 a0 00 cmp %g2, 0 40005290: 22 80 00 08 be,a 400052b0 <_Event_Surrender+0x50> 40005294: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40005298: 03 10 00 62 sethi %hi(0x40018800), %g1 4000529c: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400188e0 <_Thread_Executing> 400052a0: 80 a6 00 02 cmp %i0, %g2 400052a4: 02 80 00 2a be 4000534c <_Event_Surrender+0xec> 400052a8: 19 10 00 62 sethi %hi(0x40018800), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 400052ac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400052b0: 80 88 61 00 btst 0x100, %g1 400052b4: 02 80 00 19 be 40005318 <_Event_Surrender+0xb8> 400052b8: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 400052bc: 02 80 00 04 be 400052cc <_Event_Surrender+0x6c> 400052c0: 80 8c 60 02 btst 2, %l1 400052c4: 02 80 00 15 be 40005318 <_Event_Surrender+0xb8> 400052c8: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400052cc: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400052d0: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 /* * 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 ); 400052d4: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 400052d8: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400052dc: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 400052e0: 7f ff f2 94 call 40001d30 400052e4: 90 10 00 10 mov %l0, %o0 400052e8: 7f ff f2 8e call 40001d20 400052ec: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 400052f0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400052f4: 80 a0 60 02 cmp %g1, 2 400052f8: 02 80 00 0c be 40005328 <_Event_Surrender+0xc8> 400052fc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40005300: 90 10 00 10 mov %l0, %o0 40005304: 7f ff f2 8b call 40001d30 40005308: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000530c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005310: 40 00 08 bf call 4000760c <_Thread_Clear_state> 40005314: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40005318: 7f ff f2 86 call 40001d30 <== NOT EXECUTED 4000531c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 40005320: 7f ff f2 84 call 40001d30 40005324: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40005328: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000532c: 7f ff f2 81 call 40001d30 40005330: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40005334: 40 00 0e b0 call 40008df4 <_Watchdog_Remove> 40005338: 90 06 20 48 add %i0, 0x48, %o0 4000533c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40005340: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005344: 40 00 08 b2 call 4000760c <_Thread_Clear_state> 40005348: 81 e8 00 00 restore /* * 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() && 4000534c: c2 03 22 f4 ld [ %o4 + 0x2f4 ], %g1 40005350: 80 a0 60 01 cmp %g1, 1 40005354: 02 80 00 07 be 40005370 <_Event_Surrender+0x110> 40005358: 80 a0 c0 0d cmp %g3, %o5 4000535c: c2 03 22 f4 ld [ %o4 + 0x2f4 ], %g1 40005360: 80 a0 60 02 cmp %g1, 2 40005364: 32 bf ff d3 bne,a 400052b0 <_Event_Surrender+0x50> 40005368: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _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) ) { 4000536c: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 40005370: 02 80 00 04 be 40005380 <_Event_Surrender+0x120> 40005374: 80 8c 60 02 btst 2, %l1 40005378: 02 80 00 09 be 4000539c <_Event_Surrender+0x13c> <== NOT EXECUTED 4000537c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40005380: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005384: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 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 ); 40005388: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 4000538c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005390: 82 10 20 03 mov 3, %g1 ((_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; 40005394: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005398: c2 23 22 f4 st %g1, [ %o4 + 0x2f4 ] } _ISR_Enable( level ); 4000539c: 7f ff f2 65 call 40001d30 400053a0: 91 e8 00 10 restore %g0, %l0, %o0 400053a4: 01 00 00 00 nop 400053a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 400053a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400053ac: 90 10 00 18 mov %i0, %o0 400053b0: 40 00 09 a2 call 40007a38 <_Thread_Get> 400053b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 400053b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400053bc: 80 a0 60 00 cmp %g1, 0 400053c0: 12 80 00 19 bne 40005424 <_Event_Timeout+0x7c> 400053c4: b0 10 00 08 mov %o0, %i0 * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 400053c8: 7f ff f2 56 call 40001d20 400053cc: 01 00 00 00 nop 400053d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 400053d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400053d8: 80 a0 60 00 cmp %g1, 0 400053dc: 02 80 00 14 be 4000542c <_Event_Timeout+0x84> 400053e0: 03 10 00 62 sethi %hi(0x40018800), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 400053e4: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400188e0 <_Thread_Executing> 400053e8: 80 a6 00 02 cmp %i0, %g2 400053ec: 02 80 00 18 be 4000544c <_Event_Timeout+0xa4> 400053f0: c0 26 20 24 clr [ %i0 + 0x24 ] (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 400053f4: 82 10 20 06 mov 6, %g1 400053f8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400053fc: 7f ff f2 4d call 40001d30 40005400: 90 10 00 03 mov %g3, %o0 40005404: 90 10 00 18 mov %i0, %o0 40005408: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000540c: 40 00 08 80 call 4000760c <_Thread_Clear_state> 40005410: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40005414: 05 10 00 62 sethi %hi(0x40018800), %g2 40005418: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> 4000541c: 82 00 7f ff add %g1, -1, %g1 40005420: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] 40005424: 81 c7 e0 08 ret 40005428: 81 e8 00 00 restore 4000542c: 05 10 00 62 sethi %hi(0x40018800), %g2 <== NOT EXECUTED 40005430: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40005434: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40005438: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4000543c: 7f ff f2 3d call 40001d30 <== NOT EXECUTED 40005440: 01 00 00 00 nop <== NOT EXECUTED 40005444: 81 c7 e0 08 ret <== NOT EXECUTED 40005448: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 4000544c: 05 10 00 62 sethi %hi(0x40018800), %g2 40005450: c2 00 a2 f4 ld [ %g2 + 0x2f4 ], %g1 ! 40018af4 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 40005454: 80 a0 60 01 cmp %g1, 1 40005458: 38 bf ff e8 bgu,a 400053f8 <_Event_Timeout+0x50> 4000545c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40005460: 82 10 20 02 mov 2, %g1 40005464: c2 20 a2 f4 st %g1, [ %g2 + 0x2f4 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 40005468: 10 bf ff e4 b 400053f8 <_Event_Timeout+0x50> 4000546c: 82 10 20 06 mov 6, %g1 4000970c <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 4000970c: 9d e3 bf 98 save %sp, -104, %sp uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 40009710: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 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); 40009714: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40009718: 90 10 00 19 mov %i1, %o0 4000971c: 92 10 00 16 mov %l6, %o1 40009720: 40 00 01 82 call 40009d28 <_Heap_Calc_block_size> 40009724: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 40009728: ae 92 20 00 orcc %o0, 0, %l7 4000972c: 02 80 00 69 be 400098d0 <_Heap_Allocate_aligned+0x1c4> 40009730: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 40009734: 80 a6 a0 00 cmp %i2, 0 40009738: 22 80 00 02 be,a 40009740 <_Heap_Allocate_aligned+0x34> 4000973c: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 40009740: e2 05 60 08 ld [ %l5 + 8 ], %l1 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; 40009744: 80 a5 40 11 cmp %l5, %l1 40009748: 02 80 00 62 be 400098d0 <_Heap_Allocate_aligned+0x1c4> 4000974c: a8 10 20 00 clr %l4 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40009750: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 40009754: 92 10 00 1a mov %i2, %o1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40009758: a4 08 7f fe and %g1, -2, %l2 /* 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; 4000975c: a6 04 40 12 add %l1, %l2, %l3 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. */ 40009760: 80 a5 c0 12 cmp %l7, %l2 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; 40009764: a0 24 c0 19 sub %l3, %i1, %l0 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. */ 40009768: 18 80 00 22 bgu 400097f0 <_Heap_Allocate_aligned+0xe4> 4000976c: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 40009770: 40 00 3e 07 call 40018f8c <.urem> 40009774: 01 00 00 00 nop _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 40009778: 92 10 00 16 mov %l6, %o1 4000977c: b0 24 00 08 sub %l0, %o0, %i0 40009780: 40 00 3e 03 call 40018f8c <.urem> 40009784: 90 10 00 18 mov %i0, %o0 40009788: a0 04 60 08 add %l1, 8, %l0 4000978c: 84 26 00 08 sub %i0, %o0, %g2 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) { 40009790: 80 a4 00 02 cmp %l0, %g2 40009794: 38 80 00 18 bgu,a 400097f4 <_Heap_Allocate_aligned+0xe8> 40009798: e2 04 60 08 ld [ %l1 + 8 ], %l1 /* 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) { 4000979c: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 400097a0: 82 20 80 10 sub %g2, %l0, %g1 400097a4: 80 a0 40 1d cmp %g1, %i5 400097a8: 1a 80 00 1e bcc 40009820 <_Heap_Allocate_aligned+0x114> 400097ac: 80 a6 20 00 cmp %i0, 0 '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) { 400097b0: 82 26 00 10 sub %i0, %l0, %g1 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 400097b4: 90 10 00 10 mov %l0, %o0 400097b8: 92 10 00 1a mov %i2, %o1 400097bc: 80 a5 80 01 cmp %l6, %g1 400097c0: 18 80 00 17 bgu 4000981c <_Heap_Allocate_aligned+0x110> 400097c4: 84 10 00 10 mov %l0, %g2 400097c8: 40 00 3d f1 call 40018f8c <.urem> 400097cc: 01 00 00 00 nop /* 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) { 400097d0: 84 10 00 10 mov %l0, %g2 *value = r ? v - r + a : v; 400097d4: 88 92 20 00 orcc %o0, 0, %g4 400097d8: 86 10 20 00 clr %g3 400097dc: 12 80 00 35 bne 400098b0 <_Heap_Allocate_aligned+0x1a4> 400097e0: 90 10 00 10 mov %l0, %o0 400097e4: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 400097e8: 38 80 00 0d bgu,a 4000981c <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 400097ec: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED /* 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) 400097f0: e2 04 60 08 ld [ %l1 + 8 ], %l1 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; 400097f4: 80 a5 40 11 cmp %l5, %l1 400097f8: 12 bf ff d6 bne 40009750 <_Heap_Allocate_aligned+0x44> 400097fc: a8 05 20 01 inc %l4 40009800: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 40009804: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 40009808: 80 a0 40 14 cmp %g1, %l4 4000980c: 2a 80 00 02 bcs,a 40009814 <_Heap_Allocate_aligned+0x108> 40009810: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 40009814: 81 c7 e0 08 ret 40009818: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 4000981c: 80 a6 20 00 cmp %i0, 0 40009820: 22 bf ff f5 be,a 400097f4 <_Heap_Allocate_aligned+0xe8> 40009824: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED /* 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; 40009828: 82 04 e0 08 add %l3, 8, %g1 4000982c: 88 20 40 02 sub %g1, %g2, %g4 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; 40009830: 84 24 80 04 sub %l2, %g4, %g2 _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) { 40009834: 80 a0 80 1d cmp %g2, %i5 40009838: 2a 80 00 29 bcs,a 400098dc <_Heap_Allocate_aligned+0x1d0> 4000983c: c6 04 60 08 ld [ %l1 + 8 ], %g3 /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 40009840: 82 10 a0 01 or %g2, 1, %g1 40009844: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( void *base, uint32_t offset ) { return (void *)((char *)base + offset); 40009848: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 4000984c: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 40009850: c8 24 60 04 st %g4, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40009854: 84 04 40 04 add %l1, %g4, %g2 _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 40009858: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000985c: 82 10 60 01 or %g1, 1, %g1 40009860: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 40009864: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 40009868: c2 05 60 34 ld [ %l5 + 0x34 ], %g1 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; 4000986c: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 40009870: 80 a0 c0 01 cmp %g3, %g1 40009874: 1a 80 00 03 bcc 40009880 <_Heap_Allocate_aligned+0x174> 40009878: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 4000987c: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 40009880: c2 05 60 40 ld [ %l5 + 0x40 ], %g1 _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; 40009884: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 40009888: c4 05 60 48 ld [ %l5 + 0x48 ], %g2 _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; 4000988c: 82 00 60 01 inc %g1 _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; 40009890: 86 00 e0 01 inc %g3 stats->allocs += 1; 40009894: 84 00 a0 01 inc %g2 _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; 40009898: 86 00 c0 14 add %g3, %l4, %g3 _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; 4000989c: c2 25 60 40 st %g1, [ %l5 + 0x40 ] _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; 400098a0: c4 25 60 48 st %g2, [ %l5 + 0x48 ] _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; 400098a4: c6 25 60 4c st %g3, [ %l5 + 0x4c ] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 400098a8: 10 bf ff d7 b 40009804 <_Heap_Allocate_aligned+0xf8> 400098ac: 90 10 00 18 mov %i0, %o0 ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; *value = r ? v - r + a : v; 400098b0: 82 04 00 1a add %l0, %i2, %g1 400098b4: 90 20 40 04 sub %g1, %g4, %o0 400098b8: 86 22 00 10 sub %o0, %l0, %g3 /* 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) { 400098bc: 80 a5 80 03 cmp %l6, %g3 400098c0: 28 bf ff cd bleu,a 400097f4 <_Heap_Allocate_aligned+0xe8> 400098c4: e2 04 60 08 ld [ %l1 + 8 ], %l1 400098c8: 10 bf ff d5 b 4000981c <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 400098cc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 400098d0: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 400098d4: 81 c7 e0 08 ret <== NOT EXECUTED 400098d8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 400098dc: c4 04 60 0c ld [ %l1 + 0xc ], %g2 /* 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; 400098e0: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 400098e4: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 400098e8: 82 00 7f ff add %g1, -1, %g1 { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 400098ec: c6 20 a0 08 st %g3, [ %g2 + 8 ] 400098f0: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 400098f4: 10 bf ff d8 b 40009854 <_Heap_Allocate_aligned+0x148> 400098f8: 88 10 00 12 mov %l2, %g4 4002fd9c <_Heap_Get_information>: Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 4002fd9c: d6 02 20 24 ld [ %o0 + 0x24 ], %o3 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 4002fda0: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 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; 4002fda4: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 4002fda8: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 4002fdac: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 4002fdb0: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 4002fdb4: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 4002fdb8: 80 a0 40 0b cmp %g1, %o3 4002fdbc: 02 80 00 26 be 4002fe54 <_Heap_Get_information+0xb8> 4002fdc0: c0 22 60 10 clr [ %o1 + 0x10 ] 4002fdc4: 10 80 00 0e b 4002fdfc <_Heap_Get_information+0x60> 4002fdc8: d8 00 60 04 ld [ %g1 + 4 ], %o4 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; 4002fdcc: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 4002fdd0: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 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++; 4002fdd4: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 4002fdd8: 84 00 80 04 add %g2, %g4, %g2 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++; 4002fddc: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 4002fde0: 80 a0 c0 04 cmp %g3, %g4 4002fde4: 1a 80 00 03 bcc 4002fdf0 <_Heap_Get_information+0x54> 4002fde8: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 4002fdec: c8 22 60 10 st %g4, [ %o1 + 0x10 ] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 4002fdf0: 80 a2 c0 0d cmp %o3, %o5 4002fdf4: 02 80 00 18 be 4002fe54 <_Heap_Get_information+0xb8> 4002fdf8: 82 10 00 0d mov %o5, %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4002fdfc: 88 0b 3f fe and %o4, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4002fe00: 9a 00 40 04 add %g1, %g4, %o5 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4002fe04: d8 03 60 04 ld [ %o5 + 4 ], %o4 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) ) { 4002fe08: 80 8b 20 01 btst 1, %o4 4002fe0c: 32 bf ff f0 bne,a 4002fdcc <_Heap_Get_information+0x30> 4002fe10: c2 02 60 0c ld [ %o1 + 0xc ], %g1 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++; 4002fe14: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 4002fe18: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 4002fe1c: c6 02 60 04 ld [ %o1 + 4 ], %g3 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++; 4002fe20: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 4002fe24: 84 00 80 04 add %g2, %g4, %g2 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++; 4002fe28: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 4002fe2c: 80 a0 c0 04 cmp %g3, %g4 4002fe30: 1a 80 00 03 bcc 4002fe3c <_Heap_Get_information+0xa0> 4002fe34: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 4002fe38: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 4002fe3c: c2 03 40 00 ld [ %o5 ], %g1 4002fe40: 80 a0 40 04 cmp %g1, %g4 4002fe44: 02 bf ff ec be 4002fdf4 <_Heap_Get_information+0x58> 4002fe48: 80 a2 c0 0d cmp %o3, %o5 4002fe4c: 81 c3 e0 08 retl <== NOT EXECUTED 4002fe50: 90 10 20 01 mov 1, %o0 <== 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; 4002fe54: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 4002fe58: 90 10 20 00 clr %o0 4002fe5c: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 4002fe60: 81 c3 e0 08 retl 4002fe64: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40016394 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40016394: 9d e3 bf 98 save %sp, -104, %sp 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; 40016398: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 4001639c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 400163a0: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 400163a4: c0 27 00 00 clr [ %i4 ] /* 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); 400163a8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 400163ac: 7f ff f6 34 call 40013c7c <.urem> 400163b0: 90 10 00 19 mov %i1, %o0 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 ); 400163b4: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 400163b8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 /* 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); 400163bc: 82 06 7f f8 add %i1, -8, %g1 400163c0: a2 20 40 08 sub %g1, %o0, %l1 _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)) 400163c4: 80 a4 40 04 cmp %l1, %g4 400163c8: 84 60 3f ff subx %g0, -1, %g2 400163cc: 80 a0 c0 11 cmp %g3, %l1 400163d0: 82 60 3f ff subx %g0, -1, %g1 400163d4: 80 88 80 01 btst %g2, %g1 400163d8: 02 80 00 2f be 40016494 <_Heap_Resize_block+0x100> 400163dc: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400163e0: da 04 60 04 ld [ %l1 + 4 ], %o5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 400163e4: b0 0b 7f fe and %o5, -2, %i0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400163e8: a4 04 40 18 add %l1, %i0, %l2 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) || 400163ec: 80 a4 80 04 cmp %l2, %g4 400163f0: 84 60 3f ff subx %g0, -1, %g2 400163f4: 80 a0 c0 12 cmp %g3, %l2 400163f8: 82 60 3f ff subx %g0, -1, %g1 400163fc: 80 88 80 01 btst %g2, %g1 40016400: 02 80 00 25 be 40016494 <_Heap_Resize_block+0x100> 40016404: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40016408: c2 04 a0 04 ld [ %l2 + 4 ], %g1 4001640c: 80 88 60 01 btst 1, %g1 40016410: 02 80 00 21 be 40016494 <_Heap_Resize_block+0x100> 40016414: ae 08 7f fe and %g1, -2, %l7 !_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) || 40016418: 80 a0 c0 12 cmp %g3, %l2 4001641c: a8 10 20 01 mov 1, %l4 40016420: 02 80 00 04 be 40016430 <_Heap_Resize_block+0x9c> 40016424: 82 04 80 17 add %l2, %l7, %g1 40016428: c2 00 60 04 ld [ %g1 + 4 ], %g1 4001642c: a8 08 60 01 and %g1, 1, %l4 _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) 40016430: 82 24 80 19 sub %l2, %i1, %g1 40016434: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 40016438: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 4001643c: 80 a0 40 1a cmp %g1, %i2 40016440: 1a 80 00 17 bcc 4001649c <_Heap_Resize_block+0x108> 40016444: b6 0b 60 01 and %o5, 1, %i3 /* 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 */ 40016448: 80 8d 20 ff btst 0xff, %l4 4001644c: 12 80 00 10 bne 4001648c <_Heap_Resize_block+0xf8> 40016450: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40016454: 92 10 00 15 mov %l5, %o1 40016458: 7f ff f6 09 call 40013c7c <.urem> 4001645c: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40016460: 80 a2 20 00 cmp %o0, 0 40016464: 02 80 00 05 be 40016478 <_Heap_Resize_block+0xe4> 40016468: 80 a4 00 16 cmp %l0, %l6 4001646c: 82 04 00 15 add %l0, %l5, %g1 40016470: a0 20 40 08 sub %g1, %o0, %l0 40016474: 80 a4 00 16 cmp %l0, %l6 40016478: 0a 80 00 2e bcs 40016530 <_Heap_Resize_block+0x19c> 4001647c: 90 10 00 10 mov %l0, %o0 else { uint32_t add_block_size = size - old_user_size; _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) 40016480: 80 a5 c0 08 cmp %l7, %o0 40016484: 1a 80 00 32 bcc 4001654c <_Heap_Resize_block+0x1b8> 40016488: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 4001648c: 81 c7 e0 08 ret 40016490: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 40016494: 81 c7 e0 08 ret 40016498: 91 e8 20 02 restore %g0, 2, %o0 --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 4001649c: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 400164a0: 92 10 00 15 mov %l5, %o1 400164a4: 7f ff f5 f6 call 40013c7c <.urem> 400164a8: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 400164ac: a0 a4 00 08 subcc %l0, %o0, %l0 400164b0: 22 80 00 1c be,a 40016520 <_Heap_Resize_block+0x18c> 400164b4: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 /* 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; 400164b8: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 400164bc: 80 a5 80 02 cmp %l6, %g2 400164c0: 18 80 00 1e bgu 40016538 <_Heap_Resize_block+0x1a4> 400164c4: 82 25 80 02 sub %l6, %g2, %g1 _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) { 400164c8: 80 8d 20 ff btst 0xff, %l4 400164cc: 12 80 00 2a bne 40016574 <_Heap_Resize_block+0x1e0> 400164d0: 80 a5 80 10 cmp %l6, %l0 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; 400164d4: 82 10 80 1b or %g2, %i3, %g1 400164d8: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400164dc: 86 04 40 02 add %l1, %g2, %g3 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 400164e0: d8 04 a0 0c ld [ %l2 + 0xc ], %o4 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; 400164e4: 88 04 00 17 add %l0, %l7, %g4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 400164e8: da 04 a0 08 ld [ %l2 + 8 ], %o5 _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; 400164ec: c8 24 80 17 st %g4, [ %l2 + %l7 ] _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; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 400164f0: 84 11 20 01 or %g4, 1, %g2 400164f4: c4 20 e0 04 st %g2, [ %g3 + 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; 400164f8: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 400164fc: da 20 e0 08 st %o5, [ %g3 + 8 ] 40016500: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 40016504: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 40016508: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 4001650c: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 40016510: c6 23 60 0c st %g3, [ %o5 + 0xc ] 40016514: c6 23 20 08 st %g3, [ %o4 + 8 ] 40016518: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 4001651c: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 40016520: 82 00 60 01 inc %g1 40016524: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 40016528: 81 c7 e0 08 ret 4001652c: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 40016530: 10 bf ff d4 b 40016480 <_Heap_Resize_block+0xec> 40016534: 90 10 00 16 mov %l6, %o0 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) { 40016538: a0 a4 00 01 subcc %l0, %g1, %l0 4001653c: 12 bf ff e3 bne 400164c8 <_Heap_Resize_block+0x134> 40016540: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 40016544: 10 bf ff f7 b 40016520 <_Heap_Resize_block+0x18c> 40016548: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 _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 = 4001654c: 92 10 00 12 mov %l2, %o1 40016550: 7f ff c1 01 call 40006954 <_Heap_Block_allocate> 40016554: 90 10 00 13 mov %l3, %o0 _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; 40016558: 90 02 00 18 add %o0, %i0, %o0 4001655c: 90 12 00 1b or %o0, %i3, %o0 40016560: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 40016564: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40016568: 82 00 7f ff add %g1, -1, %g1 4001656c: 10 bf ff ec b 4001651c <_Heap_Resize_block+0x188> 40016570: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] 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) { 40016574: 38 bf ff eb bgu,a 40016520 <_Heap_Resize_block+0x18c> <== NOT EXECUTED 40016578: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 4001657c: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40016580: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 40016584: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 40016588: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 4001658c: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 40016590: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40016594: c4 04 e0 50 ld [ %l3 + 0x50 ], %g2 <== 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 */ 40016598: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4001659c: 84 00 bf ff add %g2, -1, %g2 <== 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 */ 400165a0: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 400165a4: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 400165a8: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 400165ac: 7f ff d4 9a call 4000b814 <_Heap_Free> <== NOT EXECUTED 400165b0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 400165b4: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 400165b8: 10 bf ff d9 b 4001651c <_Heap_Resize_block+0x188> <== NOT EXECUTED 400165bc: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 4000f118 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4000f118: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000f11c: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 4000f120: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000f124: 06 80 00 8c bl 4000f354 <_Heap_Walk+0x23c> 4000f128: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 4000f12c: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000f130: 80 88 60 01 btst 1, %g1 4000f134: 02 80 00 81 be 4000f338 <_Heap_Walk+0x220> 4000f138: a6 10 20 00 clr %l3 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) { 4000f13c: c4 04 40 00 ld [ %l1 ], %g2 4000f140: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000f144: 80 a0 80 01 cmp %g2, %g1 4000f148: 02 80 00 08 be 4000f168 <_Heap_Walk+0x50> 4000f14c: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 4000f150: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000f154: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f158: 90 12 22 f0 or %o0, 0x2f0, %o0 <== NOT EXECUTED 4000f15c: 7f ff d9 d5 call 400058b0 <== NOT EXECUTED 4000f160: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 4000f164: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 4000f168: 22 80 00 63 be,a 4000f2f4 <_Heap_Walk+0x1dc> 4000f16c: a2 10 00 16 mov %l6, %l1 <== NOT EXECUTED 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)) { 4000f170: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f174: c8 04 60 04 ld [ %l1 + 4 ], %g4 4000f178: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4000f17c: a4 09 3f fe and %g4, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000f180: a0 04 40 12 add %l1, %l2, %l0 4000f184: 80 a4 00 01 cmp %l0, %g1 4000f188: 84 60 3f ff subx %g0, -1, %g2 4000f18c: 80 a0 c0 10 cmp %g3, %l0 4000f190: 82 60 3f ff subx %g0, -1, %g1 4000f194: 80 88 80 01 btst %g2, %g1 4000f198: 02 80 00 77 be 4000f374 <_Heap_Walk+0x25c> 4000f19c: 03 10 00 70 sethi %hi(0x4001c000), %g1 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"); printk("PASS: %d !the_block not in the free list", source); 4000f1a0: 05 10 00 70 sethi %hi(0x4001c000), %g2 { /* 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"); 4000f1a4: ba 10 63 20 or %g1, 0x320, %i5 printk("PASS: %d !the_block not in the free list", source); 4000f1a8: ae 10 a3 b0 or %g2, 0x3b0, %l7 printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 4000f1ac: 03 10 00 70 sethi %hi(0x4001c000), %g1 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000f1b0: 05 10 00 70 sethi %hi(0x4001c000), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000f1b4: a8 09 20 01 and %g4, 1, %l4 error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 4000f1b8: b8 10 63 80 or %g1, 0x380, %i4 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000f1bc: b6 10 a3 50 or %g2, 0x350, %i3 4000f1c0: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 4000f1c4: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000f1c8: 80 88 60 01 btst 1, %g1 4000f1cc: 12 80 00 20 bne 4000f24c <_Heap_Walk+0x134> 4000f1d0: 80 a4 e0 00 cmp %l3, 0 if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 4000f1d4: c2 04 00 00 ld [ %l0 ], %g1 4000f1d8: 80 a0 40 12 cmp %g1, %l2 4000f1dc: 02 80 00 07 be 4000f1f8 <_Heap_Walk+0xe0> 4000f1e0: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000f1e4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000f1e8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f1ec: 7f ff d9 b1 call 400058b0 <== NOT EXECUTED 4000f1f0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 4000f1f4: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 4000f1f8: 32 80 00 0a bne,a 4000f220 <_Heap_Walk+0x108> 4000f1fc: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 4000f200: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 4000f204: 12 80 00 49 bne 4000f328 <_Heap_Walk+0x210> <== NOT EXECUTED 4000f208: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000f20c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000f210: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f214: 7f ff d9 a7 call 400058b0 <== NOT EXECUTED 4000f218: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000f21c: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 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) 4000f220: 80 a0 40 11 cmp %g1, %l1 4000f224: 02 80 00 0a be 4000f24c <_Heap_Walk+0x134> 4000f228: 80 a4 e0 00 cmp %l3, 0 4000f22c: 80 a6 00 01 cmp %i0, %g1 4000f230: 02 80 00 58 be 4000f390 <_Heap_Walk+0x278> 4000f234: 80 a0 40 11 cmp %g1, %l1 block = block->next; 4000f238: c2 00 60 08 ld [ %g1 + 8 ], %g1 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) 4000f23c: 80 a0 40 11 cmp %g1, %l1 4000f240: 12 bf ff fc bne 4000f230 <_Heap_Walk+0x118> 4000f244: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 4000f248: 80 a4 e0 00 cmp %l3, 0 4000f24c: 32 80 00 58 bne,a 4000f3ac <_Heap_Walk+0x294> 4000f250: 27 10 00 70 sethi %hi(0x4001c000), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000f254: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000f258: 80 a0 40 12 cmp %g1, %l2 4000f25c: 18 80 00 40 bgu 4000f35c <_Heap_Walk+0x244> 4000f260: 11 10 00 70 sethi %hi(0x4001c000), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 4000f264: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4000f268: 40 00 27 49 call 40018f8c <.urem> 4000f26c: 90 10 00 12 mov %l2, %o0 4000f270: 80 a2 20 00 cmp %o0, 0 4000f274: 12 80 00 15 bne 4000f2c8 <_Heap_Walk+0x1b0> 4000f278: 80 a4 e0 00 cmp %l3, 0 printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 4000f27c: 12 80 00 17 bne 4000f2d8 <_Heap_Walk+0x1c0> 4000f280: 80 a5 80 10 cmp %l6, %l0 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 ) { 4000f284: 02 80 00 1c be 4000f2f4 <_Heap_Walk+0x1dc> 4000f288: a2 10 00 16 mov %l6, %l1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f28c: c8 04 20 04 ld [ %l0 + 4 ], %g4 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)) { 4000f290: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000f294: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4000f298: a4 09 3f fe and %g4, -2, %l2 4000f29c: a0 04 00 12 add %l0, %l2, %l0 4000f2a0: 80 a4 00 01 cmp %l0, %g1 4000f2a4: 84 60 3f ff subx %g0, -1, %g2 4000f2a8: 80 a0 c0 10 cmp %g3, %l0 4000f2ac: 82 60 3f ff subx %g0, -1, %g1 4000f2b0: 80 88 80 01 btst %g2, %g1 4000f2b4: 02 80 00 2f be 4000f370 <_Heap_Walk+0x258> 4000f2b8: a8 09 20 01 and %g4, 1, %l4 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000f2bc: a2 10 00 15 mov %l5, %l1 4000f2c0: 10 bf ff c1 b 4000f1c4 <_Heap_Walk+0xac> 4000f2c4: aa 10 00 10 mov %l0, %l5 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); 4000f2c8: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f2cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f2d0: 7f ff d9 78 call 400058b0 <== NOT EXECUTED 4000f2d4: 90 12 20 08 or %o0, 8, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 4000f2d8: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 4000f2dc: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f2e0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f2e4: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED 4000f2e8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000f2ec: 7f ff d9 71 call 400058b0 <== NOT EXECUTED 4000f2f0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 4000f2f4: d6 06 20 10 ld [ %i0 + 0x10 ], %o3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f2f8: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000f2fc: 94 08 7f fe and %g1, -2, %o2 4000f300: 80 a2 c0 0a cmp %o3, %o2 4000f304: 02 80 00 07 be 4000f320 <_Heap_Walk+0x208> 4000f308: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 4000f30c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f310: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000f314: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000f318: 7f ff d9 66 call 400058b0 <== NOT EXECUTED 4000f31c: 90 12 20 70 or %o0, 0x70, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 4000f320: 81 c7 e0 08 ret 4000f324: 81 e8 00 00 restore 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"); 4000f328: 7f ff d9 62 call 400058b0 <== NOT EXECUTED 4000f32c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000f330: 10 bf ff b8 b 4000f210 <_Heap_Walk+0xf8> <== NOT EXECUTED 4000f334: 90 10 00 1c mov %i4, %o0 <== 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); 4000f338: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000f33c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f340: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED 4000f344: 7f ff d9 5b call 400058b0 <== NOT EXECUTED 4000f348: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000f34c: 10 bf ff 7d b 4000f140 <_Heap_Walk+0x28> <== NOT EXECUTED 4000f350: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 4000f354: 10 bf ff 76 b 4000f12c <_Heap_Walk+0x14> <== NOT EXECUTED 4000f358: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED } if (do_dump || error) printk("\n"); if (the_size < the_heap->min_block_size) { printk("PASS: %d !block size is too small\n", source); 4000f35c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f360: 7f ff d9 54 call 400058b0 <== NOT EXECUTED 4000f364: 90 12 23 e0 or %o0, 0x3e0, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 4000f368: 10 bf ff dd b 4000f2dc <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000f36c: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000f370: a2 10 00 15 mov %l5, %l1 <== 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); 4000f374: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4000f378: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000f37c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f380: 7f ff d9 4c call 400058b0 <== NOT EXECUTED 4000f384: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 4000f388: 10 bf ff d5 b 4000f2dc <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000f38c: 96 10 00 16 mov %l6, %o3 <== 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) { 4000f390: 02 bf ff ae be 4000f248 <_Heap_Walk+0x130> <== NOT EXECUTED 4000f394: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 4000f398: 12 80 00 0a bne 4000f3c0 <_Heap_Walk+0x2a8> <== NOT EXECUTED 4000f39c: 27 10 00 70 sethi %hi(0x4001c000), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000f3a0: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4000f3a4: 7f ff d9 43 call 400058b0 <== NOT EXECUTED 4000f3a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000f3ac: 90 14 e3 20 or %l3, 0x320, %o0 <== NOT EXECUTED 4000f3b0: 7f ff d9 40 call 400058b0 <== NOT EXECUTED 4000f3b4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000f3b8: 10 bf ff a8 b 4000f258 <_Heap_Walk+0x140> <== NOT EXECUTED 4000f3bc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== 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"); 4000f3c0: 7f ff d9 3c call 400058b0 <== NOT EXECUTED 4000f3c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000f3c8: 10 bf ff f7 b 4000f3a4 <_Heap_Walk+0x28c> <== NOT EXECUTED 4000f3cc: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40006ac4 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40006ac4: 9d e3 bf 98 save %sp, -104, %sp * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 40006ac8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40006acc: a0 10 00 18 mov %i0, %l0 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 40006ad0: 80 a0 60 00 cmp %g1, 0 40006ad4: 02 80 00 1d be 40006b48 <_Objects_Allocate+0x84> 40006ad8: b0 10 20 00 clr %i0 /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40006adc: a2 04 20 20 add %l0, 0x20, %l1 40006ae0: 40 00 12 6e call 4000b498 <_Chain_Get> 40006ae4: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 40006ae8: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 40006aec: 80 a0 60 00 cmp %g1, 0 40006af0: 02 80 00 16 be 40006b48 <_Objects_Allocate+0x84> 40006af4: b0 10 00 08 mov %o0, %i0 /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 40006af8: 80 a2 20 00 cmp %o0, 0 40006afc: 02 80 00 15 be 40006b50 <_Objects_Allocate+0x8c> 40006b00: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40006b04: c4 06 20 08 ld [ %i0 + 8 ], %g2 40006b08: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b0c: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40006b10: 03 00 00 3f sethi %hi(0xfc00), %g1 40006b14: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006b18: 84 08 80 01 and %g2, %g1, %g2 40006b1c: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b20: 40 00 33 ab call 400139cc <.udiv> 40006b24: 90 20 80 08 sub %g2, %o0, %o0 40006b28: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 40006b2c: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 40006b30: c2 14 20 2c lduh [ %l0 + 0x2c ], %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b34: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 40006b38: 82 00 7f ff add %g1, -1, %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b3c: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 40006b40: c2 34 20 2c sth %g1, [ %l0 + 0x2c ] block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006b44: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 40006b48: 81 c7 e0 08 ret 40006b4c: 81 e8 00 00 restore * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 40006b50: 40 00 00 14 call 40006ba0 <_Objects_Extend_information> 40006b54: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40006b58: 40 00 12 50 call 4000b498 <_Chain_Get> 40006b5c: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 40006b60: b0 92 20 00 orcc %o0, 0, %i0 40006b64: 32 bf ff e9 bne,a 40006b08 <_Objects_Allocate+0x44> 40006b68: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 40006b6c: 81 c7 e0 08 ret <== NOT EXECUTED 40006b70: 81 e8 00 00 restore <== NOT EXECUTED 40006ba0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40006ba0: 9d e3 bf 88 save %sp, -120, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 40006ba4: c4 06 20 08 ld [ %i0 + 8 ], %g2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 40006ba8: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40006bac: 03 00 00 3f sethi %hi(0xfc00), %g1 40006bb0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006bb4: a8 08 80 01 and %g2, %g1, %l4 40006bb8: 80 a5 40 14 cmp %l5, %l4 40006bbc: 1a 80 00 79 bcc 40006da0 <_Objects_Extend_information+0x200> 40006bc0: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40006bc4: a6 10 00 14 mov %l4, %l3 40006bc8: a4 10 20 00 clr %l2 40006bcc: a2 10 20 00 clr %l1 40006bd0: ac 10 20 01 mov 1, %l6 40006bd4: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40006bd8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006bdc: 80 a0 60 00 cmp %g1, 0 40006be0: 12 80 00 8d bne 40006e14 <_Objects_Extend_information+0x274> 40006be4: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40006be8: 90 02 00 14 add %o0, %l4, %o0 40006bec: 90 02 00 1d add %o0, %i5, %o0 40006bf0: 40 00 08 f0 call 40008fb0 <_Workspace_Allocate_or_fatal_error> 40006bf4: 91 2a 20 02 sll %o0, 2, %o0 40006bf8: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006bfc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40006c00: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006c04: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40006c08: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006c0c: 18 80 00 94 bgu 40006e5c <_Objects_Extend_information+0x2bc> 40006c10: a0 05 80 02 add %l6, %g2, %l0 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006c14: 80 a5 20 00 cmp %l4, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006c18: 84 10 20 00 clr %g2 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006c1c: 02 80 00 08 be 40006c3c <_Objects_Extend_information+0x9c> 40006c20: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 40006c24: 83 28 a0 02 sll %g2, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006c28: 84 00 a0 01 inc %g2 40006c2c: 80 a0 80 14 cmp %g2, %l4 40006c30: 0a bf ff fd bcs 40006c24 <_Objects_Extend_information+0x84> 40006c34: c0 24 00 01 clr [ %l0 + %g1 ] 40006c38: ab 2c a0 02 sll %l2, 2, %l5 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40006c3c: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006c40: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006c44: 86 04 c0 01 add %l3, %g1, %g3 40006c48: 80 a4 c0 03 cmp %l3, %g3 40006c4c: 1a 80 00 0a bcc 40006c74 <_Objects_Extend_information+0xd4> 40006c50: c0 25 c0 15 clr [ %l7 + %l5 ] 40006c54: 83 2c e0 02 sll %l3, 2, %g1 40006c58: 84 04 00 01 add %l0, %g1, %g2 40006c5c: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 40006c60: c0 20 80 00 clr [ %g2 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 40006c64: 82 00 60 01 inc %g1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006c68: 80 a0 40 03 cmp %g1, %g3 40006c6c: 0a bf ff fd bcs 40006c60 <_Objects_Extend_information+0xc0> 40006c70: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40006c74: 7f ff ec 2b call 40001d20 40006c78: 01 00 00 00 nop 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( 40006c7c: c2 06 00 00 ld [ %i0 ], %g1 40006c80: c8 16 20 04 lduh [ %i0 + 4 ], %g4 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 40006c84: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006c88: 89 29 20 1b sll %g4, 0x1b, %g4 40006c8c: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40006c90: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 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( 40006c94: 87 30 e0 10 srl %g3, 0x10, %g3 40006c98: 05 00 00 40 sethi %hi(0x10000), %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40006c9c: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006ca0: 83 28 60 18 sll %g1, 0x18, %g1 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; 40006ca4: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40006ca8: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40006cac: ee 26 20 34 st %l7, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006cb0: 82 10 40 04 or %g1, %g4, %g1 40006cb4: 82 10 40 03 or %g1, %g3, %g1 40006cb8: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40006cbc: 7f ff ec 1d call 40001d30 40006cc0: 01 00 00 00 nop if ( old_tables ) 40006cc4: 80 a4 20 00 cmp %l0, 0 40006cc8: 22 80 00 05 be,a 40006cdc <_Objects_Extend_information+0x13c> 40006ccc: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 40006cd0: 40 00 08 aa call 40008f78 <_Workspace_Free> 40006cd4: 90 10 00 10 mov %l0, %o0 40006cd8: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40006cdc: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006ce0: 80 a0 60 00 cmp %g1, 0 40006ce4: 02 80 00 55 be 40006e38 <_Objects_Extend_information+0x298> 40006ce8: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 40006cec: 90 10 00 10 mov %l0, %o0 40006cf0: 40 00 32 fd call 400138e4 <.umul> 40006cf4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40006cf8: 40 00 08 a7 call 40008f94 <_Workspace_Allocate> 40006cfc: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006d00: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40006d04: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006d08: d2 00 40 14 ld [ %g1 + %l4 ], %o1 40006d0c: 80 a2 60 00 cmp %o1, 0 40006d10: 02 80 00 64 be 40006ea0 <_Objects_Extend_information+0x300> 40006d14: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006d18: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40006d1c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006d20: a0 10 00 13 mov %l3, %l0 40006d24: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006d28: a6 07 bf ec add %fp, -20, %l3 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40006d2c: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006d30: 40 00 11 ed call 4000b4e4 <_Chain_Initialize> 40006d34: 90 10 00 13 mov %l3, %o0 40006d38: 30 80 00 0c b,a 40006d68 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40006d3c: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40006d40: 83 28 60 18 sll %g1, 0x18, %g1 40006d44: 85 28 a0 1b sll %g2, 0x1b, %g2 40006d48: 82 10 40 12 or %g1, %l2, %g1 40006d4c: 82 10 40 02 or %g1, %g2, %g1 40006d50: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006d54: 92 10 00 08 mov %o0, %o1 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40006d58: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40006d5c: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006d60: 7f ff fd 2f call 4000621c <_Chain_Append> 40006d64: 90 10 00 11 mov %l1, %o0 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 40006d68: 40 00 11 cc call 4000b498 <_Chain_Get> 40006d6c: 90 10 00 13 mov %l3, %o0 40006d70: 80 a2 20 00 cmp %o0, 0 40006d74: 32 bf ff f2 bne,a 40006d3c <_Objects_Extend_information+0x19c> 40006d78: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006d7c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40006d80: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 40006d84: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006d88: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 40006d8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006d90: 82 00 40 04 add %g1, %g4, %g1 40006d94: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40006d98: 81 c7 e0 08 ret 40006d9c: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40006da0: 90 10 00 15 mov %l5, %o0 40006da4: 40 00 33 0a call 400139cc <.udiv> 40006da8: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40006dac: a4 92 20 00 orcc %o0, 0, %l2 40006db0: 02 80 00 3e be 40006ea8 <_Objects_Extend_information+0x308> 40006db4: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 40006db8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 40006dbc: c2 00 80 00 ld [ %g2 ], %g1 40006dc0: 80 a0 60 00 cmp %g1, 0 40006dc4: 12 80 00 08 bne 40006de4 <_Objects_Extend_information+0x244> 40006dc8: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40006dcc: 10 80 00 0c b 40006dfc <_Objects_Extend_information+0x25c> <== NOT EXECUTED 40006dd0: 80 a4 c0 15 cmp %l3, %l5 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40006dd4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40006dd8: 80 a0 60 00 cmp %g1, 0 40006ddc: 02 80 00 08 be 40006dfc <_Objects_Extend_information+0x25c> 40006de0: 80 a4 c0 15 cmp %l3, %l5 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006de4: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40006de8: a6 04 c0 10 add %l3, %l0, %l3 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006dec: 80 a4 80 11 cmp %l2, %l1 40006df0: 18 bf ff f9 bgu 40006dd4 <_Objects_Extend_information+0x234> 40006df4: 83 2c 60 02 sll %l1, 2, %g1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40006df8: 80 a4 c0 15 cmp %l3, %l5 40006dfc: 2a bf ff b9 bcs,a 40006ce0 <_Objects_Extend_information+0x140> 40006e00: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006e04: ac 04 a0 01 add %l2, 1, %l6 40006e08: 83 2d a0 01 sll %l6, 1, %g1 40006e0c: 10 bf ff 73 b 40006bd8 <_Objects_Extend_information+0x38> 40006e10: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 40006e14: 90 02 00 14 add %o0, %l4, %o0 40006e18: 90 02 00 1d add %o0, %i5, %o0 40006e1c: 40 00 08 5e call 40008f94 <_Workspace_Allocate> 40006e20: 91 2a 20 02 sll %o0, 2, %o0 block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 40006e24: ae 92 20 00 orcc %o0, 0, %l7 40006e28: 32 bf ff 76 bne,a 40006c00 <_Objects_Extend_information+0x60> 40006e2c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006e30: 81 c7 e0 08 ret <== NOT EXECUTED 40006e34: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 40006e38: 90 10 00 10 mov %l0, %o0 40006e3c: 40 00 32 aa call 400138e4 <.umul> 40006e40: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40006e44: 40 00 08 5b call 40008fb0 <_Workspace_Allocate_or_fatal_error> 40006e48: a9 2c 60 02 sll %l1, 2, %l4 40006e4c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40006e50: d0 24 00 14 st %o0, [ %l0 + %l4 ] 40006e54: 10 bf ff b1 b 40006d18 <_Objects_Extend_information+0x178> 40006e58: d2 00 40 14 ld [ %g1 + %l4 ], %o1 /* * 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, 40006e5c: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 40006e60: ab 2c a0 02 sll %l2, 2, %l5 40006e64: 90 10 00 17 mov %l7, %o0 40006e68: 40 00 18 fb call 4000d254 40006e6c: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40006e70: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40006e74: 94 10 00 15 mov %l5, %o2 40006e78: 40 00 18 f7 call 4000d254 40006e7c: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006e80: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40006e84: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40006e88: 94 05 00 0a add %l4, %o2, %o2 40006e8c: 90 10 00 10 mov %l0, %o0 40006e90: 40 00 18 f1 call 4000d254 40006e94: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40006e98: 10 bf ff 6a b 40006c40 <_Objects_Extend_information+0xa0> 40006e9c: c0 25 80 15 clr [ %l6 + %l5 ] 40006ea0: 81 c7 e0 08 ret <== NOT EXECUTED 40006ea4: 81 e8 00 00 restore <== NOT EXECUTED if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006ea8: 10 bf ff d4 b 40006df8 <_Objects_Extend_information+0x258> <== NOT EXECUTED 40006eac: a2 10 20 00 clr %l1 <== NOT EXECUTED 40006f60 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40006f60: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40006f64: 82 06 3f ff add %i0, -1, %g1 40006f68: 80 a0 60 03 cmp %g1, 3 40006f6c: 38 80 00 1e bgu,a 40006fe4 <_Objects_Get_information+0x84> 40006f70: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40006f74: 80 a6 60 00 cmp %i1, 0 40006f78: 12 80 00 04 bne 40006f88 <_Objects_Get_information+0x28> 40006f7c: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 40006f80: 81 c7 e0 08 ret 40006f84: 91 e8 20 00 restore %g0, 0, %o0 return NULL; if ( !the_class ) return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40006f88: 40 00 12 9f call 4000ba04 <_Objects_API_maximum_class> 40006f8c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40006f90: 80 a2 20 00 cmp %o0, 0 40006f94: 06 bf ff fb bl 40006f80 <_Objects_Get_information+0x20> 40006f98: 80 a2 00 19 cmp %o0, %i1 40006f9c: 2a 80 00 12 bcs,a 40006fe4 <_Objects_Get_information+0x84> 40006fa0: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 40006fa4: 85 2e 20 02 sll %i0, 2, %g2 40006fa8: 03 10 00 61 sethi %hi(0x40018400), %g1 40006fac: 82 10 63 80 or %g1, 0x380, %g1 ! 40018780 <_Objects_Information_table> 40006fb0: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40006fb4: 80 a0 a0 00 cmp %g2, 0 40006fb8: 02 80 00 0b be 40006fe4 <_Objects_Get_information+0x84> 40006fbc: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40006fc0: 83 2e 60 02 sll %i1, 2, %g1 40006fc4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40006fc8: 80 a6 20 00 cmp %i0, 0 40006fcc: 02 80 00 06 be 40006fe4 <_Objects_Get_information+0x84> 40006fd0: 01 00 00 00 nop * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 40006fd4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006fd8: 80 a0 60 00 cmp %g1, 0 40006fdc: 22 80 00 02 be,a 40006fe4 <_Objects_Get_information+0x84> 40006fe0: b0 10 20 00 clr %i0 return NULL; #endif return info; } 40006fe4: 81 c7 e0 08 ret 40006fe8: 81 e8 00 00 restore 40006fec <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 40006fec: 9d e3 bf 98 save %sp, -104, %sp #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 40006ff0: 03 00 00 3f sethi %hi(0xfc00), %g1 40006ff4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 40006ff8: 7f ff eb 4a call 40001d20 40006ffc: b2 0e 40 01 and %i1, %g1, %i1 if ( information->maximum >= index ) { 40007000: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007004: 80 a6 40 01 cmp %i1, %g1 40007008: 18 80 00 0b bgu 40007034 <_Objects_Get_isr_disable+0x48> 4000700c: 83 2e 60 02 sll %i1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 40007010: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40007014: f0 00 80 01 ld [ %g2 + %g1 ], %i0 40007018: 80 a6 20 00 cmp %i0, 0 4000701c: 02 80 00 0c be 4000704c <_Objects_Get_isr_disable+0x60> 40007020: 01 00 00 00 nop *location = OBJECTS_LOCAL; *level_p = level; 40007024: d0 26 c0 00 st %o0, [ %i3 ] #endif _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; 40007028: c0 26 80 00 clr [ %i2 ] 4000702c: 81 c7 e0 08 ret 40007030: 81 e8 00 00 restore } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 40007034: 7f ff eb 3f call 40001d30 40007038: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; 4000703c: 82 10 20 01 mov 1, %g1 40007040: c2 26 80 00 st %g1, [ %i2 ] _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 40007044: 81 c7 e0 08 ret 40007048: 81 e8 00 00 restore if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 4000704c: 7f ff eb 39 call 40001d30 <== NOT EXECUTED 40007050: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; 40007054: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40007058: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 4000705c: 81 c7 e0 08 ret <== NOT EXECUTED 40007060: 81 e8 00 00 restore <== NOT EXECUTED 400174f8 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 400174f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 400174fc: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40017500: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 40017504: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40017508: 22 80 00 02 be,a 40017510 <_Objects_Get_next+0x18> <== NOT EXECUTED 4001750c: f2 06 20 08 ld [ %i0 + 8 ], %i1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 40017510: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40017514: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40017518: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 4001751c: 82 0e 40 10 and %i1, %l0, %g1 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 40017520: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40017524: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 40017528: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001752c: 0a 80 00 0b bcs 40017558 <_Objects_Get_next+0x60> <== NOT EXECUTED 40017530: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 40017534: 7f ff d8 50 call 4000d674 <_Objects_Get> <== NOT EXECUTED 40017538: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 4001753c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40017540: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017544: 32 bf ff f6 bne,a 4001751c <_Objects_Get_next+0x24> <== NOT EXECUTED 40017548: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 4001754c: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40017550: 81 c7 e0 08 ret <== NOT EXECUTED 40017554: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 40017558: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001755c: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40017560: 90 10 20 00 clr %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 40017564: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40017568: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 4001756c: 81 c7 e0 08 ret <== NOT EXECUTED 40017570: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40008364 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 40008364: 9d e3 bf 90 save %sp, -112, %sp 40008368: 92 10 00 18 mov %i0, %o1 Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 4000836c: 80 a6 60 00 cmp %i1, 0 40008370: 02 80 00 24 be 40008400 <_Objects_Id_to_name+0x9c> 40008374: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40008378: 80 a2 60 00 cmp %o1, 0 4000837c: 02 80 00 26 be 40008414 <_Objects_Id_to_name+0xb0> 40008380: 03 10 00 72 sethi %hi(0x4001c800), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008384: 83 32 60 18 srl %o1, 0x18, %g1 40008388: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4000838c: 84 00 7f ff add %g1, -1, %g2 40008390: 80 a0 a0 03 cmp %g2, 3 40008394: 38 80 00 1b bgu,a 40008400 <_Objects_Id_to_name+0x9c> 40008398: b0 10 20 03 mov 3, %i0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 4000839c: 85 28 60 02 sll %g1, 2, %g2 400083a0: 03 10 00 71 sethi %hi(0x4001c400), %g1 400083a4: 82 10 63 c0 or %g1, 0x3c0, %g1 ! 4001c7c0 <_Objects_Information_table> 400083a8: c4 00 40 02 ld [ %g1 + %g2 ], %g2 400083ac: 80 a0 a0 00 cmp %g2, 0 400083b0: 02 80 00 16 be 40008408 <_Objects_Id_to_name+0xa4> 400083b4: 83 32 60 1b srl %o1, 0x1b, %g1 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 400083b8: 83 28 60 02 sll %g1, 2, %g1 400083bc: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 400083c0: 80 a2 20 00 cmp %o0, 0 400083c4: 02 80 00 0f be 40008400 <_Objects_Id_to_name+0x9c> 400083c8: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 400083cc: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 400083d0: 80 a0 60 00 cmp %g1, 0 400083d4: 12 80 00 0e bne 4000840c <_Objects_Id_to_name+0xa8> 400083d8: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 400083dc: 7f ff ff c5 call 400082f0 <_Objects_Get> 400083e0: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 400083e4: 80 a2 20 00 cmp %o0, 0 400083e8: 22 80 00 06 be,a 40008400 <_Objects_Id_to_name+0x9c> 400083ec: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 400083f0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 400083f4: b0 10 20 00 clr %i0 400083f8: 40 00 02 5b call 40008d64 <_Thread_Enable_dispatch> 400083fc: c2 26 40 00 st %g1, [ %i1 ] 40008400: 81 c7 e0 08 ret 40008404: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 40008408: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 4000840c: 81 c7 e0 08 ret <== NOT EXECUTED 40008410: 81 e8 00 00 restore <== NOT EXECUTED Objects_Locations ignored_location; if ( !name ) return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40008414: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 40008418: d2 00 a0 08 ld [ %g2 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000841c: 83 32 60 18 srl %o1, 0x18, %g1 40008420: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40008424: 84 00 7f ff add %g1, -1, %g2 40008428: 80 a0 a0 03 cmp %g2, 3 4000842c: 38 bf ff f5 bgu,a 40008400 <_Objects_Id_to_name+0x9c> 40008430: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 40008434: 10 bf ff db b 400083a0 <_Objects_Id_to_name+0x3c> 40008438: 85 28 60 02 sll %g1, 2, %g2 400071e4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 400071e4: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 400071e8: 80 a2 e0 00 cmp %o3, 0 400071ec: 02 80 00 20 be 4000726c <_Objects_Name_to_id_u32+0x88> 400071f0: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 400071f4: 80 a2 60 00 cmp %o1, 0 400071f8: 22 80 00 1d be,a 4000726c <_Objects_Name_to_id_u32+0x88> 400071fc: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007200: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 40007204: 85 28 60 10 sll %g1, 0x10, %g2 40007208: 80 a0 a0 00 cmp %g2, 0 4000720c: 22 80 00 18 be,a 4000726c <_Objects_Name_to_id_u32+0x88> 40007210: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40007214: 80 a2 a0 00 cmp %o2, 0 40007218: 12 80 00 17 bne 40007274 <_Objects_Name_to_id_u32+0x90> 4000721c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40007220: 89 30 a0 10 srl %g2, 0x10, %g4 40007224: 80 a1 20 00 cmp %g4, 0 40007228: 02 80 00 11 be 4000726c <_Objects_Name_to_id_u32+0x88> 4000722c: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007230: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 40007234: 86 10 20 01 mov 1, %g3 if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 40007238: 83 28 e0 02 sll %g3, 2, %g1 4000723c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 40007240: 80 a0 a0 00 cmp %g2, 0 40007244: 02 80 00 06 be 4000725c <_Objects_Name_to_id_u32+0x78> 40007248: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 4000724c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40007250: 80 a0 40 09 cmp %g1, %o1 40007254: 22 80 00 0f be,a 40007290 <_Objects_Name_to_id_u32+0xac> 40007258: c2 00 a0 08 ld [ %g2 + 8 ], %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 4000725c: 80 a0 c0 04 cmp %g3, %g4 40007260: 08 bf ff f7 bleu 4000723c <_Objects_Name_to_id_u32+0x58> 40007264: 83 28 e0 02 sll %g3, 2, %g1 40007268: 90 10 20 01 mov 1, %o0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 4000726c: 81 c3 e0 08 retl 40007270: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007274: 82 10 63 ff or %g1, 0x3ff, %g1 40007278: 80 a2 80 01 cmp %o2, %g1 4000727c: 02 bf ff e9 be 40007220 <_Objects_Name_to_id_u32+0x3c> 40007280: 80 a2 a0 01 cmp %o2, 1 40007284: 02 bf ff e7 be 40007220 <_Objects_Name_to_id_u32+0x3c> 40007288: 90 10 20 01 mov 1, %o0 4000728c: 30 bf ff f8 b,a 4000726c <_Objects_Name_to_id_u32+0x88> the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 40007290: 90 10 20 00 clr %o0 40007294: 81 c3 e0 08 retl 40007298: c2 22 c0 00 st %g1, [ %o3 ] 400071ac <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 400071ac: 9d e3 bf 98 save %sp, -104, %sp /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 400071b0: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 400071b4: 80 a0 60 00 cmp %g1, 0 400071b8: 22 80 00 09 be,a 400071dc <_Objects_Namespace_remove+0x30> 400071bc: c0 26 60 0c clr [ %i1 + 0xc ] 400071c0: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 400071c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400071c8: 22 80 00 05 be,a 400071dc <_Objects_Namespace_remove+0x30> <== NOT EXECUTED 400071cc: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 400071d0: 40 00 07 6a call 40008f78 <_Workspace_Free> <== NOT EXECUTED 400071d4: 01 00 00 00 nop <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 400071d8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } 400071dc: 81 c7 e0 08 ret 400071e0: 81 e8 00 00 restore 40008edc <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 40008edc: 9d e3 bf 98 save %sp, -104, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 40008ee0: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 40008ee4: 40 00 1d c8 call 40010604 40008ee8: 90 10 00 1a mov %i2, %o0 if ( information->is_string ) { 40008eec: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 40008ef0: 80 a0 60 00 cmp %g1, 0 40008ef4: 12 80 00 21 bne 40008f78 <_Objects_Set_name+0x9c> 40008ef8: a0 02 20 01 add %o0, 1, %l0 strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 40008efc: 03 08 08 08 sethi %hi(0x20202000), %g1 40008f00: 80 a4 20 00 cmp %l0, 0 40008f04: 02 80 00 19 be 40008f68 <_Objects_Set_name+0x8c> 40008f08: 82 10 60 20 or %g1, 0x20, %g1 40008f0c: c4 4e 80 00 ldsb [ %i2 ], %g2 40008f10: 03 00 08 08 sethi %hi(0x202000), %g1 40008f14: 87 28 a0 18 sll %g2, 0x18, %g3 40008f18: 82 10 60 20 or %g1, 0x20, %g1 40008f1c: 80 a4 20 01 cmp %l0, 1 40008f20: 02 80 00 12 be 40008f68 <_Objects_Set_name+0x8c> 40008f24: 82 10 c0 01 or %g3, %g1, %g1 40008f28: c4 4e a0 01 ldsb [ %i2 + 1 ], %g2 40008f2c: 03 00 00 08 sethi %hi(0x2000), %g1 40008f30: 85 28 a0 10 sll %g2, 0x10, %g2 40008f34: 82 10 60 20 or %g1, 0x20, %g1 40008f38: 84 10 80 03 or %g2, %g3, %g2 40008f3c: 80 a4 20 02 cmp %l0, 2 40008f40: 02 80 00 0a be 40008f68 <_Objects_Set_name+0x8c> 40008f44: 82 10 80 01 or %g2, %g1, %g1 40008f48: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 40008f4c: 80 a4 20 03 cmp %l0, 3 40008f50: 83 28 60 08 sll %g1, 8, %g1 40008f54: 84 10 80 01 or %g2, %g1, %g2 40008f58: 02 80 00 04 be 40008f68 <_Objects_Set_name+0x8c> 40008f5c: 82 10 a0 20 or %g2, 0x20, %g1 40008f60: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1 40008f64: 82 10 80 01 or %g2, %g1, %g1 40008f68: c2 26 60 0c st %g1, [ %i1 + 0xc ] 40008f6c: b0 10 20 01 mov 1, %i0 ); } return TRUE; } 40008f70: 81 c7 e0 08 ret 40008f74: 81 e8 00 00 restore length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 40008f78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40008f7c: 40 00 07 50 call 4000acbc <_Workspace_Allocate> <== NOT EXECUTED 40008f80: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !d ) 40008f84: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40008f88: 02 bf ff fa be 40008f70 <_Objects_Set_name+0x94> <== NOT EXECUTED 40008f8c: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 40008f90: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED 40008f94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008f98: 02 80 00 06 be 40008fb0 <_Objects_Set_name+0xd4> <== NOT EXECUTED 40008f9c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 40008fa0: 40 00 07 40 call 4000aca0 <_Workspace_Free> <== NOT EXECUTED 40008fa4: 01 00 00 00 nop <== NOT EXECUTED the_object->name.name_p = NULL; 40008fa8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED } strncpy( d, name, length ); 40008fac: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40008fb0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008fb4: 40 00 1d 5a call 4001051c <== NOT EXECUTED 40008fb8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED d[ length ] = '\0'; 40008fbc: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED the_object->name.name_p = d; 40008fc0: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED 40008fc4: 81 c7 e0 08 ret <== NOT EXECUTED 40008fc8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 400072a4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 400072a4: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 400072a8: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Search the list to find block or chunnk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; 400072ac: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 400072b0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 400072b4: 03 00 00 3f sethi %hi(0xfc00), %g1 400072b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400072bc: 92 10 00 10 mov %l0, %o1 400072c0: a4 08 80 01 and %g2, %g1, %l2 400072c4: 40 00 31 c2 call 400139cc <.udiv> 400072c8: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 400072cc: 80 a2 20 00 cmp %o0, 0 400072d0: 02 80 00 12 be 40007318 <_Objects_Shrink_information+0x74> 400072d4: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400072d8: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 400072dc: c2 00 c0 00 ld [ %g3 ], %g1 400072e0: 80 a4 00 01 cmp %l0, %g1 400072e4: 12 80 00 09 bne 40007308 <_Objects_Shrink_information+0x64> 400072e8: a2 10 20 04 mov 4, %l1 400072ec: 10 80 00 0d b 40007320 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 400072f0: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400072f4: a4 04 80 10 add %l2, %l0, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400072f8: 80 a4 00 01 cmp %l0, %g1 400072fc: 02 80 00 09 be 40007320 <_Objects_Shrink_information+0x7c> 40007300: 82 04 60 04 add %l1, 4, %g1 40007304: a2 10 00 01 mov %g1, %l1 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40007308: 84 00 a0 01 inc %g2 4000730c: 80 a2 00 02 cmp %o0, %g2 40007310: 38 bf ff f9 bgu,a 400072f4 <_Objects_Shrink_information+0x50> 40007314: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 40007318: 81 c7 e0 08 ret 4000731c: 81 e8 00 00 restore 40007320: 03 00 00 3f sethi %hi(0xfc00), %g1 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 40007324: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40007328: 10 80 00 0f b 40007364 <_Objects_Shrink_information+0xc0> 4000732c: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40007330: 82 04 80 01 add %l2, %g1, %g1 40007334: 80 a0 40 03 cmp %g1, %g3 40007338: 08 80 00 10 bleu 40007378 <_Objects_Shrink_information+0xd4> 4000733c: 90 10 00 02 mov %g2, %o0 if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 40007340: 40 00 10 4c call 4000b470 <_Chain_Extract> 40007344: e0 00 80 00 ld [ %g2 ], %l0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40007348: 80 a4 20 00 cmp %l0, 0 4000734c: 22 80 00 10 be,a 4000738c <_Objects_Shrink_information+0xe8> 40007350: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40007354: c2 04 00 00 ld [ %l0 ], %g1 40007358: 80 a0 60 00 cmp %g1, 0 4000735c: 02 80 00 0b be 40007388 <_Objects_Shrink_information+0xe4> 40007360: 84 10 00 10 mov %l0, %g2 40007364: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007368: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 4000736c: 80 a0 c0 12 cmp %g3, %l2 40007370: 3a bf ff f0 bcc,a 40007330 <_Objects_Shrink_information+0x8c> 40007374: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40007378: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 4000737c: 80 a4 20 00 cmp %l0, 0 40007380: 32 bf ff f6 bne,a 40007358 <_Objects_Shrink_information+0xb4> 40007384: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40007388: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 4000738c: 40 00 06 fb call 40008f78 <_Workspace_Free> 40007390: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40007394: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40007398: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4000739c: c0 20 80 11 clr [ %g2 + %l1 ] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 400073a0: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400073a4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 400073a8: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400073ac: 82 20 40 02 sub %g1, %g2, %g1 400073b0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400073b4: 81 c7 e0 08 ret 400073b8: 81 e8 00 00 restore 400253a0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 400253a0: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 400253a4: 80 a6 20 00 cmp %i0, 0 400253a8: 02 80 00 10 be 400253e8 <_Protected_heap_Get_information+0x48> 400253ac: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 400253b0: 02 80 00 0e be 400253e8 <_Protected_heap_Get_information+0x48> 400253b4: 23 10 01 7b sethi %hi(0x4005ec00), %l1 return false; _RTEMS_Lock_allocator(); 400253b8: 7f ff 94 2a call 4000a460 <_API_Mutex_Lock> 400253bc: d0 04 60 38 ld [ %l1 + 0x38 ], %o0 ! 4005ec38 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 400253c0: 90 10 00 18 mov %i0, %o0 400253c4: 40 00 2a 76 call 4002fd9c <_Heap_Get_information> 400253c8: 92 10 00 19 mov %i1, %o1 400253cc: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 400253d0: 7f ff 94 3a call 4000a4b8 <_API_Mutex_Unlock> 400253d4: d0 04 60 38 ld [ %l1 + 0x38 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 400253d8: 80 a0 00 10 cmp %g0, %l0 400253dc: 82 60 3f ff subx %g0, -1, %g1 400253e0: 81 c7 e0 08 ret 400253e4: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 400253e8: 81 c7 e0 08 ret <== NOT EXECUTED 400253ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000b220 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000b220: 9d e3 bf 90 save %sp, -112, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4000b224: f0 06 21 5c ld [ %i0 + 0x15c ], %i0 if ( !api ) 4000b228: 80 a6 20 00 cmp %i0, 0 4000b22c: 02 80 00 1f be 4000b2a8 <_RTEMS_tasks_Post_switch_extension+0x88> 4000b230: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000b234: 7f ff da bb call 40001d20 4000b238: 01 00 00 00 nop signal_set = asr->signals_posted; 4000b23c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 asr->signals_posted = 0; 4000b240: c0 26 20 14 clr [ %i0 + 0x14 ] _ISR_Enable( level ); 4000b244: 7f ff da bb call 40001d30 4000b248: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000b24c: 80 a4 a0 00 cmp %l2, 0 4000b250: 32 80 00 04 bne,a 4000b260 <_RTEMS_tasks_Post_switch_extension+0x40> 4000b254: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000b258: 81 c7 e0 08 ret <== NOT EXECUTED 4000b25c: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b260: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000b264: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b268: a2 07 bf f4 add %fp, -12, %l1 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000b26c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b270: 94 10 00 11 mov %l1, %o2 4000b274: 21 00 00 3f sethi %hi(0xfc00), %l0 4000b278: 40 00 04 8a call 4000c4a0 4000b27c: 92 14 23 ff or %l0, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000b280: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000b284: 9f c0 40 00 call %g1 4000b288: 90 10 00 12 mov %l2, %o0 asr->nest_level -= 1; 4000b28c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b290: d0 07 bf f4 ld [ %fp + -12 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000b294: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b298: 92 14 23 ff or %l0, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000b29c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b2a0: 40 00 04 80 call 4000c4a0 4000b2a4: 94 10 00 11 mov %l1, %o2 4000b2a8: 81 c7 e0 08 ret 4000b2ac: 81 e8 00 00 restore 40006db8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40006db8: 9d e3 bf 90 save %sp, -112, %sp 40006dbc: 11 10 00 74 sethi %hi(0x4001d000), %o0 40006dc0: 92 10 00 18 mov %i0, %o1 40006dc4: 90 12 21 74 or %o0, 0x174, %o0 40006dc8: 40 00 07 f3 call 40008d94 <_Objects_Get> 40006dcc: 94 07 bf f4 add %fp, -12, %o2 /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40006dd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006dd4: 80 a0 60 00 cmp %g1, 0 40006dd8: 12 80 00 11 bne 40006e1c <_Rate_monotonic_Timeout+0x64> 40006ddc: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40006de0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006de4: 03 00 00 10 sethi %hi(0x4000), %g1 40006de8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40006dec: 80 88 80 01 btst %g2, %g1 40006df0: 32 80 00 0d bne,a 40006e24 <_Rate_monotonic_Timeout+0x6c> 40006df4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 40006df8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40006dfc: 80 a0 60 01 cmp %g1, 1 40006e00: 02 80 00 12 be 40006e48 <_Rate_monotonic_Timeout+0x90> 40006e04: 82 10 20 04 mov 4, %g1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40006e08: c2 26 20 38 st %g1, [ %i0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006e0c: 05 10 00 74 sethi %hi(0x4001d000), %g2 40006e10: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 4001d2f0 <_Thread_Dispatch_disable_level> 40006e14: 82 00 7f ff add %g1, -1, %g1 40006e18: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] 40006e1c: 81 c7 e0 08 ret 40006e20: 81 e8 00 00 restore the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006e24: c2 06 20 08 ld [ %i0 + 8 ], %g1 40006e28: 80 a0 80 01 cmp %g2, %g1 40006e2c: 32 bf ff f4 bne,a 40006dfc <_Rate_monotonic_Timeout+0x44> 40006e30: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40006e34: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006e38: 40 00 09 41 call 4000933c <_Thread_Clear_state> 40006e3c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 40006e40: 10 80 00 05 b 40006e54 <_Rate_monotonic_Timeout+0x9c> 40006e44: 90 10 00 18 mov %i0, %o0 _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40006e48: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006e4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40006e50: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006e54: 7f ff fe 2e call 4000670c <_Rate_monotonic_Initiate_statistics> 40006e58: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006e5c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006e60: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006e64: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006e68: 11 10 00 74 sethi %hi(0x4001d000), %o0 40006e6c: 40 00 0f a8 call 4000ad0c <_Watchdog_Insert> 40006e70: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 4001d3d0 <_Watchdog_Ticks_chain> 40006e74: 30 bf ff e6 b,a 40006e0c <_Rate_monotonic_Timeout+0x54> 4000779c <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 4000779c: 9d e3 bf 78 save %sp, -136, %sp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 400077a0: 35 10 00 62 sethi %hi(0x40018800), %i2 400077a4: 7f ff fc c8 call 40006ac4 <_Objects_Allocate> 400077a8: 90 16 a1 80 or %i2, 0x180, %o0 ! 40018980 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400077ac: 37 10 00 62 sethi %hi(0x40018800), %i3 400077b0: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> /* * 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(); 400077b4: 39 10 00 62 sethi %hi(0x40018800), %i4 400077b8: 82 00 60 01 inc %g1 400077bc: d0 27 21 cc st %o0, [ %i4 + 0x1cc ] 400077c0: c2 26 e0 20 st %g1, [ %i3 + 0x20 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 400077c4: 33 10 00 62 sethi %hi(0x40018800), %i1 400077c8: c2 06 60 b8 ld [ %i1 + 0xb8 ], %g1 ! 400188b8 <_Configuration_Table> 400077cc: 05 10 00 5e sethi %hi(0x40017800), %g2 400077d0: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 400077d4: d6 00 a3 50 ld [ %g2 + 0x350 ], %o3 400077d8: 03 10 00 5b sethi %hi(0x40016c00), %g1 400077dc: 82 10 63 b0 or %g1, 0x3b0, %g1 ! 40016fb0 <_Status_Object_name_errors_to_status+0x18> 400077e0: c2 27 bf f4 st %g1, [ %fp + -12 ] 400077e4: 80 a2 c0 03 cmp %o3, %g3 400077e8: 1a 80 00 03 bcc 400077f4 <_Thread_Create_idle+0x58> 400077ec: d2 07 21 cc ld [ %i4 + 0x1cc ], %o1 400077f0: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 400077f4: 03 10 00 5e sethi %hi(0x40017800), %g1 400077f8: da 08 63 54 ldub [ %g1 + 0x354 ], %o5 ! 40017b54 400077fc: 84 07 bf f4 add %fp, -12, %g2 40007800: 82 10 20 01 mov 1, %g1 40007804: c0 23 a0 60 clr [ %sp + 0x60 ] 40007808: c0 23 a0 64 clr [ %sp + 0x64 ] 4000780c: c0 23 a0 68 clr [ %sp + 0x68 ] 40007810: 90 16 a1 80 or %i2, 0x180, %o0 40007814: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40007818: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 4000781c: 94 10 20 00 clr %o2 40007820: 40 00 00 b2 call 40007ae8 <_Thread_Initialize> 40007824: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 40007828: c4 06 60 b8 ld [ %i1 + 0xb8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000782c: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40007830: c6 07 21 cc ld [ %i4 + 0x1cc ], %g3 40007834: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40007838: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 4000783c: c2 26 e0 20 st %g1, [ %i3 + 0x20 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40007840: 05 10 00 62 sethi %hi(0x40018800), %g2 40007844: 03 10 00 62 sethi %hi(0x40018800), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40007848: b0 10 00 03 mov %g3, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 4000784c: c6 20 a0 e0 st %g3, [ %g2 + 0xe0 ] 40007850: c6 20 60 ac st %g3, [ %g1 + 0xac ] _Thread_Executing = _Thread_Idle; _Thread_Start( 40007854: b2 10 20 00 clr %i1 40007858: b6 10 20 00 clr %i3 4000785c: 40 00 03 ab call 40008708 <_Thread_Start> 40007860: 99 e8 20 00 restore %g0, 0, %o4 40007864: 01 00 00 00 nop 40007a38 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 40007a38: 86 10 00 08 mov %o0, %g3 uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40007a3c: 80 a2 20 00 cmp %o0, 0 40007a40: 02 80 00 1d be 40007ab4 <_Thread_Get+0x7c> 40007a44: 94 10 00 09 mov %o1, %o2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40007a48: 83 32 20 18 srl %o0, 0x18, %g1 40007a4c: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40007a50: 84 00 7f ff add %g1, -1, %g2 40007a54: 80 a0 a0 03 cmp %g2, 3 40007a58: 38 80 00 14 bgu,a 40007aa8 <_Thread_Get+0x70> 40007a5c: 82 10 20 01 mov 1, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007a60: 89 32 20 1b srl %o0, 0x1b, %g4 40007a64: 80 a1 20 01 cmp %g4, 1 40007a68: 12 80 00 0f bne 40007aa4 <_Thread_Get+0x6c> 40007a6c: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 40007a70: 03 10 00 61 sethi %hi(0x40018400), %g1 40007a74: 82 10 63 80 or %g1, 0x380, %g1 ! 40018780 <_Objects_Information_table> 40007a78: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 40007a7c: 80 a0 60 00 cmp %g1, 0 40007a80: 22 80 00 17 be,a 40007adc <_Thread_Get+0xa4> 40007a84: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 40007a88: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40007a8c: 80 a2 20 00 cmp %o0, 0 40007a90: 02 80 00 11 be 40007ad4 <_Thread_Get+0x9c> 40007a94: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007a98: 82 13 c0 00 mov %o7, %g1 40007a9c: 7f ff fd 72 call 40007064 <_Objects_Get> 40007aa0: 9e 10 40 00 mov %g1, %o7 goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 40007aa4: 82 10 20 01 mov 1, %g1 40007aa8: 90 10 20 00 clr %o0 40007aac: 81 c3 e0 08 retl 40007ab0: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007ab4: 03 10 00 62 sethi %hi(0x40018800), %g1 40007ab8: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 40018820 <_Thread_Dispatch_disable_level> 40007abc: 84 00 a0 01 inc %g2 40007ac0: c4 20 60 20 st %g2, [ %g1 + 0x20 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40007ac4: 03 10 00 62 sethi %hi(0x40018800), %g1 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40007ac8: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40007acc: 81 c3 e0 08 retl 40007ad0: d0 00 60 e0 ld [ %g1 + 0xe0 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 40007ad4: 81 c3 e0 08 retl <== NOT EXECUTED 40007ad8: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 40007adc: 81 c3 e0 08 retl 40007ae0: 90 10 20 00 clr %o0 4000c854 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000c854: 9d e3 bf 98 save %sp, -104, %sp #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4000c858: 03 10 00 62 sethi %hi(0x40018800), %g1 4000c85c: e2 00 60 e0 ld [ %g1 + 0xe0 ], %l1 ! 400188e0 <_Thread_Executing> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 4000c860: 3f 10 00 32 sethi %hi(0x4000c800), %i7 4000c864: be 17 e0 54 or %i7, 0x54, %i7 ! 4000c854 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000c868: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000c86c: 7f ff d5 31 call 40001d30 4000c870: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000c874: 05 10 00 61 sethi %hi(0x40018400), %g2 doneConstructors = 1; 4000c878: 82 10 20 01 mov 1, %g1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000c87c: e0 08 a2 14 ldub [ %g2 + 0x214 ], %l0 * 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 ); 4000c880: 90 10 00 11 mov %l1, %o0 4000c884: 7f ff f0 5f call 40008a00 <_User_extensions_Thread_begin> 4000c888: c2 28 a2 14 stb %g1, [ %g2 + 0x214 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000c88c: 7f ff ec 5d call 40007a00 <_Thread_Enable_dispatch> 4000c890: a1 2c 20 18 sll %l0, 0x18, %l0 /* * _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) */ 4000c894: 80 a4 20 00 cmp %l0, 0 4000c898: 02 80 00 1e be 4000c910 <_Thread_Handler+0xbc> 4000c89c: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000c8a0: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000c8a4: 80 a0 60 01 cmp %g1, 1 4000c8a8: 22 80 00 21 be,a 4000c92c <_Thread_Handler+0xd8> 4000c8ac: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000c8b0: 80 a0 60 01 cmp %g1, 1 4000c8b4: 1a 80 00 0c bcc 4000c8e4 <_Thread_Handler+0x90> 4000c8b8: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000c8bc: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000c8c0: 9f c0 40 00 call %g1 4000c8c4: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 4000c8c8: d0 24 60 28 st %o0, [ %l1 + 0x28 ] * 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 ); 4000c8cc: 7f ff f0 61 call 40008a50 <_User_extensions_Thread_exitted> 4000c8d0: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000c8d4: 90 10 20 00 clr %o0 4000c8d8: 92 10 20 01 mov 1, %o1 4000c8dc: 7f ff e8 4a call 40006a04 <_Internal_error_Occurred> 4000c8e0: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000c8e4: 22 80 00 16 be,a 4000c93c <_Thread_Handler+0xe8> <== NOT EXECUTED 4000c8e8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000c8ec: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000c8f0: 12 bf ff f7 bne 4000c8cc <_Thread_Handler+0x78> <== NOT EXECUTED 4000c8f4: 01 00 00 00 nop <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000c8f8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000c8fc: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000c900: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c904: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000c908: 10 bf ff f1 b 4000c8cc <_Thread_Handler+0x78> <== NOT EXECUTED 4000c90c: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED * 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 (); 4000c910: 40 00 2c 56 call 40017a68 <_init> 4000c914: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000c918: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000c91c: 80 a0 60 01 cmp %g1, 1 4000c920: 12 bf ff e5 bne 4000c8b4 <_Thread_Handler+0x60> 4000c924: 01 00 00 00 nop (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000c928: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000c92c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c930: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000c934: 10 bf ff e6 b 4000c8cc <_Thread_Handler+0x78> <== NOT EXECUTED 4000c938: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000c93c: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000c940: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c944: d2 04 60 a8 ld [ %l1 + 0xa8 ], %o1 <== NOT EXECUTED 4000c948: 10 bf ff e1 b 4000c8cc <_Thread_Handler+0x78> <== NOT EXECUTED 4000c94c: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED 40007ae8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40007ae8: 9d e3 bf 98 save %sp, -104, %sp 40007aec: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40007af0: 80 a6 a0 00 cmp %i2, 0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40007af4: e6 00 40 00 ld [ %g1 ], %l3 40007af8: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40007afc: 02 80 00 51 be 40007c40 <_Thread_Initialize+0x158> 40007b00: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1 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; 40007b04: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 40007b08: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40007b0c: 21 10 00 62 sethi %hi(0x40018800), %l0 40007b10: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 ! 400188c0 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40007b14: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 40007b18: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007b1c: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40007b20: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40007b24: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40007b28: c0 26 60 6c clr [ %i1 + 0x6c ] 40007b2c: 80 a0 60 00 cmp %g1, 0 40007b30: 12 80 00 32 bne 40007bf8 <_Thread_Initialize+0x110> 40007b34: c0 26 61 58 clr [ %i1 + 0x158 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 40007b38: c0 26 61 68 clr [ %i1 + 0x168 ] 40007b3c: b6 10 20 00 clr %i3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007b40: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40007b44: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007b48: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 40007b4c: 80 a4 a0 02 cmp %l2, 2 40007b50: 12 80 00 05 bne 40007b64 <_Thread_Initialize+0x7c> 40007b54: e4 26 60 b0 st %l2, [ %i1 + 0xb0 ] 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; 40007b58: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 40007b5c: c4 00 63 78 ld [ %g1 + 0x378 ], %g2 ! 40018778 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40007b60: c4 26 60 78 st %g2, [ %i1 + 0x78 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40007b64: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 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 ); 40007b68: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40007b6c: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40007b70: 82 10 20 01 mov 1, %g1 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 ); 40007b74: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40007b78: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 40007b7c: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 40007b80: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 40007b84: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40007b88: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40007b8c: 40 00 02 02 call 40008394 <_Thread_Set_priority> 40007b90: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007b94: c4 06 60 08 ld [ %i1 + 8 ], %g2 40007b98: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40007b9c: 03 00 00 3f sethi %hi(0xfc00), %g1 40007ba0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007ba4: 84 08 80 01 and %g2, %g1, %g2 40007ba8: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40007bac: e6 26 60 0c st %l3, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 40007bb0: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40007bb4: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007bb8: f2 20 c0 02 st %i1, [ %g3 + %g2 ] * 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 ); 40007bbc: 90 10 00 19 mov %i1, %o0 40007bc0: 40 00 03 cc call 40008af0 <_User_extensions_Thread_create> 40007bc4: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 40007bc8: 80 8a 20 ff btst 0xff, %o0 40007bcc: 12 80 00 09 bne 40007bf0 <_Thread_Initialize+0x108> 40007bd0: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40007bd4: 02 80 00 05 be 40007be8 <_Thread_Initialize+0x100> <== NOT EXECUTED 40007bd8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 40007bdc: 40 00 04 e7 call 40008f78 <_Workspace_Free> <== NOT EXECUTED 40007be0: 90 10 00 1b mov %i3, %o0 <== 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 ); 40007be4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007be8: 40 00 02 a7 call 40008684 <_Thread_Stack_Free> <== NOT EXECUTED 40007bec: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40007bf0: 81 c7 e0 08 ret 40007bf4: 81 e8 00 00 restore /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 40007bf8: 90 00 60 01 add %g1, 1, %o0 40007bfc: 40 00 04 e6 call 40008f94 <_Workspace_Allocate> 40007c00: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 40007c04: b6 92 20 00 orcc %o0, 0, %i3 40007c08: 02 80 00 19 be 40007c6c <_Thread_Initialize+0x184> 40007c0c: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40007c10: 88 80 60 01 addcc %g1, 1, %g4 40007c14: 02 bf ff cb be 40007b40 <_Thread_Initialize+0x58> 40007c18: f6 26 61 68 st %i3, [ %i1 + 0x168 ] 40007c1c: 84 10 20 00 clr %g2 40007c20: 86 10 00 1b mov %i3, %g3 the_thread->extensions[i] = NULL; 40007c24: 83 28 a0 02 sll %g2, 2, %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40007c28: 84 00 a0 01 inc %g2 40007c2c: 80 a0 80 04 cmp %g2, %g4 40007c30: 0a bf ff fd bcs 40007c24 <_Thread_Initialize+0x13c> 40007c34: c0 20 c0 01 clr [ %g3 + %g1 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007c38: 10 bf ff c3 b 40007b44 <_Thread_Initialize+0x5c> 40007c3c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40007c40: 90 10 00 19 mov %i1, %o0 40007c44: 40 00 02 74 call 40008614 <_Thread_Stack_Allocate> 40007c48: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40007c4c: 80 a2 20 00 cmp %o0, 0 40007c50: 02 80 00 09 be 40007c74 <_Thread_Initialize+0x18c> 40007c54: 80 a6 c0 08 cmp %i3, %o0 40007c58: 18 80 00 07 bgu 40007c74 <_Thread_Initialize+0x18c> 40007c5c: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 40007c60: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40007c64: 10 bf ff aa b 40007b0c <_Thread_Initialize+0x24> 40007c68: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40007c6c: 40 00 02 86 call 40008684 <_Thread_Stack_Free> <== NOT EXECUTED 40007c70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007c74: 81 c7 e0 08 ret 40007c78: 91 e8 20 00 restore %g0, 0, %o0 4000cbb4 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000cbb4: 9d e3 bf 98 save %sp, -104, %sp the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 4000cbb8: c4 1e 20 b0 ldd [ %i0 + 0xb0 ], %g2 Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000cbbc: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000cbc0: c4 26 20 7c st %g2, [ %i0 + 0x7c ] Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000cbc4: c2 2e 20 76 stb %g1, [ %i0 + 0x76 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 4000cbc8: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000cbcc: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000cbd0: f4 26 20 a8 st %i2, [ %i0 + 0xa8 ] Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4000cbd4: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000cbd8: c0 26 20 70 clr [ %i0 + 0x70 ] the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4000cbdc: 7f ff f0 74 call 40008dac <_Thread_queue_Extract_with_proxy> 4000cbe0: 90 10 00 18 mov %i0, %o0 4000cbe4: 80 8a 20 ff btst 0xff, %o0 4000cbe8: 32 80 00 07 bne,a 4000cc04 <_Thread_Reset+0x50> 4000cbec: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000cbf0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000cbf4: 80 a0 60 02 cmp %g1, 2 4000cbf8: 02 80 00 0c be 4000cc28 <_Thread_Reset+0x74> 4000cbfc: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000cc00: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 4000cc04: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000cc08: 80 a0 40 19 cmp %g1, %i1 4000cc0c: 02 80 00 05 be 4000cc20 <_Thread_Reset+0x6c> 4000cc10: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000cc14: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000cc18: 7f ff f0 e4 call 40008fa8 <_Thread_Set_priority> 4000cc1c: 81 e8 00 00 restore 4000cc20: 81 c7 e0 08 ret 4000cc24: 81 e8 00 00 restore the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4000cc28: 7f ff f3 8d call 40009a5c <_Watchdog_Remove> <== NOT EXECUTED 4000cc2c: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000cc30: 10 bf ff f5 b 4000cc04 <_Thread_Reset+0x50> <== NOT EXECUTED 4000cc34: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000be88 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000be88: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000be8c: 03 10 00 62 sethi %hi(0x40018800), %g1 4000be90: e0 00 60 e0 ld [ %g1 + 0xe0 ], %l0 ! 400188e0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000be94: 7f ff d7 a3 call 40001d20 4000be98: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000be9c: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000bea0: c4 04 40 00 ld [ %l1 ], %g2 4000bea4: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000bea8: 80 a0 80 01 cmp %g2, %g1 4000beac: 02 80 00 18 be 4000bf0c <_Thread_Reset_timeslice+0x84> 4000beb0: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000beb4: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000beb8: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000bebc: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000bec0: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000bec4: c4 20 e0 04 st %g2, [ %g3 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000bec8: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000becc: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000bed0: c2 24 20 04 st %g1, [ %l0 + 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; 4000bed4: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000bed8: 7f ff d7 96 call 40001d30 4000bedc: 01 00 00 00 nop 4000bee0: 7f ff d7 90 call 40001d20 4000bee4: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000bee8: 07 10 00 62 sethi %hi(0x40018800), %g3 4000beec: c2 00 e0 ac ld [ %g3 + 0xac ], %g1 ! 400188ac <_Thread_Heir> 4000bef0: 80 a4 00 01 cmp %l0, %g1 4000bef4: 02 80 00 08 be 4000bf14 <_Thread_Reset_timeslice+0x8c> 4000bef8: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 4000befc: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 4000bf00: c4 28 60 f0 stb %g2, [ %g1 + 0xf0 ] ! 400188f0 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000bf04: 7f ff d7 8b call 40001d30 <== NOT EXECUTED 4000bf08: 81 e8 00 00 restore <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000bf0c: 7f ff d7 89 call 40001d30 4000bf10: 81 e8 00 00 restore _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4000bf14: c2 04 40 00 ld [ %l1 ], %g1 4000bf18: c2 20 e0 ac st %g1, [ %g3 + 0xac ] _Context_Switch_necessary = TRUE; 4000bf1c: 03 10 00 62 sethi %hi(0x40018800), %g1 4000bf20: c4 28 60 f0 stb %g2, [ %g1 + 0xf0 ] ! 400188f0 <_Context_Switch_necessary> _ISR_Enable( level ); 4000bf24: 7f ff d7 83 call 40001d30 4000bf28: 81 e8 00 00 restore 4000bf2c: 01 00 00 00 nop 40009cdc <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 40009cdc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 40009ce0: 7f ff e3 2d call 40002994 40009ce4: 01 00 00 00 nop 40009ce8: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 40009cec: 80 8e 60 ff btst 0xff, %i1 40009cf0: 22 80 00 0d be,a 40009d24 <_Thread_Resume+0x48> 40009cf4: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 40009cf8: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 40009cfc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 40009d00: 80 88 60 02 btst 2, %g1 40009d04: 02 80 00 06 be 40009d1c <_Thread_Resume+0x40> 40009d08: 01 00 00 00 nop RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 40009d0c: 82 08 7f fd and %g1, -3, %g1 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 40009d10: 80 a0 60 00 cmp %g1, 0 40009d14: 02 80 00 0a be 40009d3c <_Thread_Resume+0x60> 40009d18: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 40009d1c: 7f ff e3 22 call 400029a4 40009d20: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 40009d24: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 40009d28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009d2c: 02 bf ff f4 be 40009cfc <_Thread_Resume+0x20> <== NOT EXECUTED 40009d30: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 40009d34: 7f ff e3 1c call 400029a4 <== NOT EXECUTED 40009d38: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40009d3c: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 40009d40: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 40009d44: c2 11 00 00 lduh [ %g4 ], %g1 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 40009d48: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 40009d4c: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 40009d50: 1b 10 00 93 sethi %hi(0x40024c00), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40009d54: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009d58: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 40009d5c: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 40009d60: c2 26 00 00 st %g1, [ %i0 ] 40009d64: c4 13 61 44 lduh [ %o5 + 0x144 ], %g2 old_last_node = the_chain->last; 40009d68: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 40009d6c: f0 20 e0 08 st %i0, [ %g3 + 8 ] 40009d70: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 40009d74: c8 26 20 04 st %g4, [ %i0 + 4 ] 40009d78: c4 33 61 44 sth %g2, [ %o5 + 0x144 ] 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; 40009d7c: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 40009d80: 7f ff e3 09 call 400029a4 40009d84: 90 10 00 10 mov %l0, %o0 40009d88: 7f ff e3 03 call 40002994 40009d8c: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 40009d90: 09 10 00 93 sethi %hi(0x40024c00), %g4 40009d94: c4 01 21 1c ld [ %g4 + 0x11c ], %g2 ! 40024d1c <_Thread_Heir> 40009d98: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 40009d9c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40009da0: 80 a0 c0 01 cmp %g3, %g1 40009da4: 1a bf ff de bcc 40009d1c <_Thread_Resume+0x40> 40009da8: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 40009dac: 03 10 00 93 sethi %hi(0x40024c00), %g1 40009db0: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 ! 40024d50 <_Thread_Executing> _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; 40009db4: f0 21 21 1c st %i0, [ %g4 + 0x11c ] if ( _Thread_Executing->is_preemptible || 40009db8: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 40009dbc: 80 a0 60 00 cmp %g1, 0 40009dc0: 02 80 00 06 be 40009dd8 <_Thread_Resume+0xfc> 40009dc4: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 40009dc8: 84 10 20 01 mov 1, %g2 40009dcc: 03 10 00 93 sethi %hi(0x40024c00), %g1 40009dd0: c4 28 61 60 stb %g2, [ %g1 + 0x160 ] ! 40024d60 <_Context_Switch_necessary> 40009dd4: 30 bf ff d2 b,a 40009d1c <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 40009dd8: 12 bf ff d1 bne 40009d1c <_Thread_Resume+0x40> 40009ddc: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 40009de0: 10 bf ff fc b 40009dd0 <_Thread_Resume+0xf4> <== NOT EXECUTED 40009de4: 03 10 00 93 sethi %hi(0x40024c00), %g1 <== NOT EXECUTED 40008614 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 40008614: 9d e3 bf 98 save %sp, -104, %sp 40008618: 03 10 00 5e sethi %hi(0x40017800), %g1 4000861c: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 40017b50 40008620: 80 a6 40 01 cmp %i1, %g1 40008624: 2a 80 00 02 bcs,a 4000862c <_Thread_Stack_Allocate+0x18> 40008628: b2 10 00 01 mov %g1, %i1 * 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 ) { 4000862c: 03 10 00 62 sethi %hi(0x40018800), %g1 40008630: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400188b8 <_Configuration_Table> 40008634: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 40008638: 80 a0 60 00 cmp %g1, 0 4000863c: 22 80 00 0a be,a 40008664 <_Thread_Stack_Allocate+0x50> 40008640: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 40008644: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008648: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000864c: d0 26 20 cc st %o0, [ %i0 + 0xcc ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 40008650: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40008654: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40008658: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 4000865c: 81 c7 e0 08 ret <== NOT EXECUTED 40008660: 81 e8 00 00 restore <== NOT EXECUTED * 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 ); 40008664: 40 00 02 4c call 40008f94 <_Workspace_Allocate> 40008668: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000866c: d0 26 20 cc st %o0, [ %i0 + 0xcc ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 40008670: 80 a0 00 08 cmp %g0, %o0 40008674: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40008678: b0 0e 40 18 and %i1, %i0, %i0 4000867c: 81 c7 e0 08 ret 40008680: 81 e8 00 00 restore 40008684 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 40008684: 9d e3 bf 98 save %sp, -104, %sp /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 40008688: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 4000868c: 80 a0 60 00 cmp %g1, 0 40008690: 02 80 00 09 be 400086b4 <_Thread_Stack_Free+0x30> 40008694: 03 10 00 62 sethi %hi(0x40018800), %g1 * 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 ) 40008698: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400188b8 <_Configuration_Table> 4000869c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 400086a0: 80 a0 60 00 cmp %g1, 0 400086a4: 22 80 00 06 be,a 400086bc <_Thread_Stack_Free+0x38> 400086a8: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 400086ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400086b0: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400086b4: 81 c7 e0 08 ret <== NOT EXECUTED 400086b8: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 400086bc: 40 00 02 2f call 40008f78 <_Workspace_Free> 400086c0: 81 e8 00 00 restore 400086c4: 01 00 00 00 nop 40008754 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 40008754: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 40008758: 03 10 00 62 sethi %hi(0x40018800), %g1 4000875c: e0 00 60 e0 ld [ %g1 + 0xe0 ], %l0 ! 400188e0 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 40008760: c4 0c 20 76 ldub [ %l0 + 0x76 ], %g2 40008764: 80 a0 a0 00 cmp %g2, 0 40008768: 02 80 00 23 be 400087f4 <_Thread_Tickle_timeslice+0xa0> 4000876c: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 40008770: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008774: 80 a0 60 00 cmp %g1, 0 40008778: 12 80 00 1f bne 400087f4 <_Thread_Tickle_timeslice+0xa0> 4000877c: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 40008780: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40008784: 80 a0 60 01 cmp %g1, 1 40008788: 0a 80 00 07 bcs 400087a4 <_Thread_Tickle_timeslice+0x50> 4000878c: 80 a0 60 02 cmp %g1, 2 40008790: 28 80 00 10 bleu,a 400087d0 <_Thread_Tickle_timeslice+0x7c> 40008794: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 40008798: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000879c: 22 80 00 04 be,a 400087ac <_Thread_Tickle_timeslice+0x58> <== NOT EXECUTED 400087a0: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED 400087a4: 81 c7 e0 08 ret 400087a8: 81 e8 00 00 restore executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 400087ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400087b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400087b4: 12 bf ff fc bne 400087a4 <_Thread_Tickle_timeslice+0x50> <== NOT EXECUTED 400087b8: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED (*executing->budget_callout)( executing ); 400087bc: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 400087c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400087c4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400087c8: 81 c7 e0 08 ret <== NOT EXECUTED 400087cc: 81 e8 00 00 restore <== 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 ) { 400087d0: 82 00 7f ff add %g1, -1, %g1 400087d4: 80 a0 60 00 cmp %g1, 0 400087d8: 14 bf ff f3 bg 400087a4 <_Thread_Tickle_timeslice+0x50> 400087dc: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 400087e0: 40 00 0d aa call 4000be88 <_Thread_Reset_timeslice> 400087e4: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 400087e8: 03 10 00 61 sethi %hi(0x40018400), %g1 400087ec: c4 00 63 78 ld [ %g1 + 0x378 ], %g2 ! 40018778 <_Thread_Ticks_per_timeslice> 400087f0: c4 24 20 78 st %g2, [ %l0 + 0x78 ] 400087f4: 81 c7 e0 08 ret 400087f8: 81 e8 00 00 restore 40007f94 <_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 ) { 40007f94: 9d e3 bf 98 save %sp, -104, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 40007f98: e4 06 60 14 ld [ %i1 + 0x14 ], %l2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007f9c: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40007fa0: 84 06 60 38 add %i1, 0x38, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007fa4: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 40007fa8: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 40007fac: c4 26 60 40 st %g2, [ %i1 + 0x40 ] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 40007fb0: ac 10 00 18 mov %i0, %l6 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 ) ) 40007fb4: 80 8c a0 20 btst 0x20, %l2 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 40007fb8: 83 34 a0 06 srl %l2, 6, %g1 40007fbc: 12 80 00 30 bne 4000807c <_Thread_queue_Enqueue_priority+0xe8> 40007fc0: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40007fc4: 85 28 60 04 sll %g1, 4, %g2 40007fc8: 83 28 60 02 sll %g1, 2, %g1 40007fcc: 82 20 80 01 sub %g2, %g1, %g1 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 40007fd0: b0 10 00 01 mov %g1, %i0 40007fd4: 82 05 80 01 add %l6, %g1, %g1 40007fd8: a6 00 60 04 add %g1, 4, %l3 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40007fdc: 7f ff e7 51 call 40001d20 40007fe0: 01 00 00 00 nop 40007fe4: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 40007fe8: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40007fec: 80 a4 00 13 cmp %l0, %l3 40007ff0: 32 80 00 18 bne,a 40008050 <_Thread_queue_Enqueue_priority+0xbc> 40007ff4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 40007ff8: 10 80 00 81 b 400081fc <_Thread_queue_Enqueue_priority+0x268> 40007ffc: a2 10 3f ff mov -1, %l1 if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40008000: 80 a4 00 13 cmp %l0, %l3 40008004: 02 80 00 17 be 40008060 <_Thread_queue_Enqueue_priority+0xcc> 40008008: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 4000800c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40008010: 80 a4 80 11 cmp %l2, %l1 40008014: 28 80 00 14 bleu,a 40008064 <_Thread_queue_Enqueue_priority+0xd0> 40008018: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 4000801c: 7f ff e7 45 call 40001d30 40008020: 90 10 00 14 mov %l4, %o0 40008024: 7f ff e7 3f call 40001d20 40008028: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000802c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008030: 80 8d 40 01 btst %l5, %g1 40008034: 02 80 00 6b be 400081e0 <_Thread_queue_Enqueue_priority+0x24c> 40008038: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 4000803c: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 40008040: 80 a4 00 13 cmp %l0, %l3 40008044: 02 80 00 07 be 40008060 <_Thread_queue_Enqueue_priority+0xcc> 40008048: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 4000804c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40008050: 80 a4 80 11 cmp %l2, %l1 40008054: 38 bf ff eb bgu,a 40008000 <_Thread_queue_Enqueue_priority+0x6c> 40008058: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 4000805c: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40008060: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 40008064: 80 a6 20 01 cmp %i0, 1 40008068: 02 80 00 47 be 40008184 <_Thread_queue_Enqueue_priority+0x1f0> 4000806c: 80 a4 80 11 cmp %l2, %l1 * 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; 40008070: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 40008074: 81 c7 e0 08 ret <== NOT EXECUTED 40008078: 81 e8 00 00 restore <== NOT EXECUTED 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; 4000807c: 85 28 60 04 sll %g1, 4, %g2 40008080: 83 28 60 02 sll %g1, 2, %g1 40008084: 82 20 80 01 sub %g2, %g1, %g1 40008088: 05 10 00 5e sethi %hi(0x40017800), %g2 4000808c: a6 06 00 01 add %i0, %g1, %l3 40008090: ae 10 a3 54 or %g2, 0x354, %l7 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40008094: b0 10 00 13 mov %l3, %i0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40008098: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 4000809c: 7f ff e7 21 call 40001d20 400080a0: a2 00 60 01 add %g1, 1, %l1 400080a4: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 400080a8: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 400080ac: 80 a4 c0 10 cmp %l3, %l0 400080b0: 22 80 00 25 be,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 400080b4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 400080b8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 400080bc: 80 a4 80 11 cmp %l2, %l1 400080c0: 3a 80 00 21 bcc,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 400080c4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 400080c8: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 400080cc: 80 a4 c0 10 cmp %l3, %l0 400080d0: 32 80 00 19 bne,a 40008134 <_Thread_queue_Enqueue_priority+0x1a0> 400080d4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400080d8: 10 80 00 1b b 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 400080dc: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 400080e0: 7f ff e7 14 call 40001d30 400080e4: 90 10 00 14 mov %l4, %o0 400080e8: 7f ff e7 0e call 40001d20 400080ec: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400080f0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400080f4: 80 8d 40 01 btst %l5, %g1 400080f8: 02 80 00 3d be 400081ec <_Thread_queue_Enqueue_priority+0x258> 400080fc: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 40008100: e0 04 20 04 ld [ %l0 + 4 ], %l0 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 ) ) { 40008104: 80 a4 00 13 cmp %l0, %l3 40008108: 22 80 00 0f be,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 4000810c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 40008110: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40008114: 80 a4 80 11 cmp %l2, %l1 40008118: 3a 80 00 0b bcc,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> 4000811c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40008120: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40008124: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 40008128: 22 80 00 07 be,a 40008144 <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 4000812c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 40008130: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 40008134: 80 a4 80 11 cmp %l2, %l1 40008138: 0a bf ff ea bcs 400080e0 <_Thread_queue_Enqueue_priority+0x14c> 4000813c: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40008140: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 40008144: 80 a6 20 01 cmp %i0, 1 40008148: 12 bf ff ca bne 40008070 <_Thread_queue_Enqueue_priority+0xdc> 4000814c: 90 10 00 14 mov %l4, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40008150: 80 a4 80 11 cmp %l2, %l1 40008154: 02 80 00 18 be 400081b4 <_Thread_queue_Enqueue_priority+0x220> 40008158: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4000815c: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40008160: e0 26 60 04 st %l0, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 40008164: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40008168: ec 26 60 44 st %l6, [ %i1 + 0x44 ] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 4000816c: f2 20 60 04 st %i1, [ %g1 + 4 ] 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; 40008170: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008174: 7f ff e6 ef call 40001d30 40008178: 01 00 00 00 nop 4000817c: 81 c7 e0 08 ret 40008180: 81 e8 00 00 restore THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40008184: 02 80 00 0c be 400081b4 <_Thread_queue_Enqueue_priority+0x220> 40008188: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 4000818c: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008190: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40008194: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40008198: ec 26 60 44 st %l6, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 4000819c: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 400081a0: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 400081a4: 7f ff e6 e3 call 40001d30 400081a8: 90 10 00 14 mov %l4, %o0 400081ac: 81 c7 e0 08 ret 400081b0: 81 e8 00 00 restore 400081b4: 82 04 20 3c add %l0, 0x3c, %g1 _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; 400081b8: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 400081bc: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 400081c0: c4 26 60 04 st %g2, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 400081c4: ec 26 60 44 st %l6, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 400081c8: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 400081cc: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 400081d0: 7f ff e6 d8 call 40001d30 400081d4: b0 10 20 01 mov 1, %i0 400081d8: 81 c7 e0 08 ret 400081dc: 81 e8 00 00 restore if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 400081e0: 7f ff e6 d4 call 40001d30 <== NOT EXECUTED 400081e4: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 400081e8: 30 bf ff 7d b,a 40007fdc <_Thread_queue_Enqueue_priority+0x48> <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 400081ec: 7f ff e6 d1 call 40001d30 <== NOT EXECUTED 400081f0: 90 10 00 14 mov %l4, %o0 <== 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; 400081f4: 10 bf ff aa b 4000809c <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 400081f8: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400081fc: 10 bf ff 9a b 40008064 <_Thread_queue_Enqueue_priority+0xd0> 40008200: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 4000c950 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000c950: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000c954: 7f ff d4 f3 call 40001d20 4000c958: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000c95c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000c960: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000c964: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000c968: 80 88 80 01 btst %g2, %g1 4000c96c: 02 80 00 19 be 4000c9d0 <_Thread_queue_Extract_fifo+0x80> 4000c970: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000c974: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000c978: c4 06 60 04 ld [ %i1 + 4 ], %g2 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000c97c: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000c980: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000c984: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000c988: 80 a0 e0 02 cmp %g3, 2 4000c98c: 02 80 00 07 be 4000c9a8 <_Thread_queue_Extract_fifo+0x58> 4000c990: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000c994: 7f ff d4 e7 call 40001d30 4000c998: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000c99c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000c9a0: 7f ff eb 1b call 4000760c <_Thread_Clear_state> 4000c9a4: 81 e8 00 00 restore 4000c9a8: 82 10 20 03 mov 3, %g1 4000c9ac: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000c9b0: 7f ff d4 e0 call 40001d30 4000c9b4: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000c9b8: 7f ff f1 0f call 40008df4 <_Watchdog_Remove> 4000c9bc: 90 06 60 48 add %i1, 0x48, %o0 4000c9c0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000c9c4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000c9c8: 7f ff eb 11 call 4000760c <_Thread_Clear_state> 4000c9cc: 81 e8 00 00 restore ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000c9d0: 7f ff d4 d8 call 40001d30 <== NOT EXECUTED 4000c9d4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c9d8: 01 00 00 00 nop 4000bc10 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000bc10: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4000bc14: 7f ff d8 43 call 40001d20 4000bc18: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000bc1c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000bc20: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000bc24: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000bc28: 80 88 80 01 btst %g2, %g1 4000bc2c: 02 80 00 23 be 4000bcb8 <_Thread_queue_Extract_priority_helper+0xa8> 4000bc30: 82 06 60 3c add %i1, 0x3c, %g1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bc34: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4000bc38: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000bc3c: 80 a0 c0 01 cmp %g3, %g1 4000bc40: 02 80 00 2a be 4000bce8 <_Thread_queue_Extract_priority_helper+0xd8> 4000bc44: c2 06 60 04 ld [ %i1 + 4 ], %g1 new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4000bc48: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000bc4c: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000bc50: c6 20 a0 04 st %g3, [ %g2 + 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; 4000bc54: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000bc58: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000bc5c: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000bc60: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000bc64: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000bc68: 80 a0 80 01 cmp %g2, %g1 4000bc6c: 02 80 00 07 be 4000bc88 <_Thread_queue_Extract_priority_helper+0x78> 4000bc70: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000bc74: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000bc78: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000bc7c: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000bc80: 82 00 e0 3c add %g3, 0x3c, %g1 4000bc84: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000bc88: 80 8e a0 ff btst 0xff, %i2 4000bc8c: 12 80 00 0d bne 4000bcc0 <_Thread_queue_Extract_priority_helper+0xb0> 4000bc90: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000bc94: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000bc98: 80 a0 60 02 cmp %g1, 2 4000bc9c: 02 80 00 0b be 4000bcc8 <_Thread_queue_Extract_priority_helper+0xb8> 4000bca0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000bca4: 7f ff d8 23 call 40001d30 4000bca8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000bcac: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000bcb0: 7f ff ee 57 call 4000760c <_Thread_Clear_state> 4000bcb4: 81 e8 00 00 restore 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 ); 4000bcb8: 7f ff d8 1e call 40001d30 <== NOT EXECUTED 4000bcbc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4000bcc0: 7f ff d8 1c call 40001d30 4000bcc4: 91 e8 00 08 restore %g0, %o0, %o0 4000bcc8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000bccc: 7f ff d8 19 call 40001d30 <== NOT EXECUTED 4000bcd0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000bcd4: 7f ff f4 48 call 40008df4 <_Watchdog_Remove> <== NOT EXECUTED 4000bcd8: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED 4000bcdc: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 4000bce0: 7f ff ee 4b call 4000760c <_Thread_Clear_state> <== NOT EXECUTED 4000bce4: 81 e8 00 00 restore <== NOT EXECUTED 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; 4000bce8: c2 20 a0 04 st %g1, [ %g2 + 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; 4000bcec: 10 bf ff e7 b 4000bc88 <_Thread_queue_Extract_priority_helper+0x78> 4000bcf0: c4 20 40 00 st %g2, [ %g1 ] 4000bcf4 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4000bcf4: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000bcf8: d0 02 20 44 ld [ %o0 + 0x44 ], %o0 * 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 && 4000bcfc: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000bd00: 80 a0 e0 00 cmp %g3, 0 4000bd04: 02 80 00 06 be 4000bd1c <_Thread_queue_Process_timeout+0x28> 4000bd08: 03 10 00 62 sethi %hi(0x40018800), %g1 4000bd0c: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400188e0 <_Thread_Executing> 4000bd10: 80 a2 40 02 cmp %o1, %g2 4000bd14: 02 80 00 07 be 4000bd30 <_Thread_queue_Process_timeout+0x3c> 4000bd18: 80 a0 e0 03 cmp %g3, 3 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; 4000bd1c: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000bd20: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000bd24: 82 13 c0 00 mov %o7, %g1 4000bd28: 7f ff ff af call 4000bbe4 <_Thread_queue_Extract> 4000bd2c: 9e 10 40 00 mov %g1, %o7 * 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 ) { 4000bd30: 02 80 00 06 be 4000bd48 <_Thread_queue_Process_timeout+0x54> 4000bd34: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000bd38: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000bd3c: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000bd40: 81 c3 e0 08 retl 4000bd44: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 4000bd48: 81 c3 e0 08 retl <== NOT EXECUTED 4000bd4c: 01 00 00 00 nop 400082d4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 400082d4: 9d e3 bf 90 save %sp, -112, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 400082d8: 80 a6 20 00 cmp %i0, 0 400082dc: 02 80 00 13 be 40008328 <_Thread_queue_Requeue+0x54> 400082e0: 01 00 00 00 nop /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 400082e4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 400082e8: 80 a4 20 01 cmp %l0, 1 400082ec: 02 80 00 04 be 400082fc <_Thread_queue_Requeue+0x28> 400082f0: 01 00 00 00 nop 400082f4: 81 c7 e0 08 ret <== NOT EXECUTED 400082f8: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 400082fc: 7f ff e6 89 call 40001d20 40008300: 01 00 00 00 nop 40008304: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40008308: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000830c: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008310: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40008314: 80 88 80 01 btst %g2, %g1 40008318: 12 80 00 06 bne 40008330 <_Thread_queue_Requeue+0x5c> 4000831c: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 40008320: 7f ff e6 84 call 40001d30 40008324: 90 10 00 11 mov %l1, %o0 40008328: 81 c7 e0 08 ret 4000832c: 81 e8 00 00 restore ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 40008330: 92 10 00 19 mov %i1, %o1 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; 40008334: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 40008338: 40 00 0e 36 call 4000bc10 <_Thread_queue_Extract_priority_helper> 4000833c: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 40008340: 90 10 00 18 mov %i0, %o0 40008344: 92 10 00 19 mov %i1, %o1 40008348: 7f ff ff 13 call 40007f94 <_Thread_queue_Enqueue_priority> 4000834c: 94 07 bf f4 add %fp, -12, %o2 40008350: 30 bf ff f4 b,a 40008320 <_Thread_queue_Requeue+0x4c> 40011aac <_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) { 40011aac: 9d e3 bf 98 save %sp, -104, %sp 40011ab0: 03 10 00 c8 sethi %hi(0x40032000), %g1 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 ); 40011ab4: 05 10 00 c8 sethi %hi(0x40032000), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40011ab8: a0 10 60 bc or %g1, 0xbc, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40011abc: 03 10 00 c8 sethi %hi(0x40032000), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40011ac0: a4 10 a0 b0 or %g2, 0xb0, %l2 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 ); 40011ac4: a2 10 60 9c or %g1, 0x9c, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40011ac8: 40 00 02 a4 call 40012558 <_Chain_Get> 40011acc: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40011ad0: 80 a2 20 00 cmp %o0, 0 40011ad4: 02 80 00 0f be 40011b10 <_Timer_Server_process_insertions+0x64> 40011ad8: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40011adc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40011ae0: 80 a0 60 01 cmp %g1, 1 40011ae4: 02 80 00 12 be 40011b2c <_Timer_Server_process_insertions+0x80> 40011ae8: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40011aec: 02 80 00 0b be 40011b18 <_Timer_Server_process_insertions+0x6c> 40011af0: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011af4: 7f ff ff ee call 40011aac <_Timer_Server_process_insertions> <== NOT EXECUTED 40011af8: 01 00 00 00 nop <== 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 ); 40011afc: 40 00 02 97 call 40012558 <_Chain_Get> 40011b00: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40011b04: 80 a2 20 00 cmp %o0, 0 40011b08: 32 bf ff f6 bne,a 40011ae0 <_Timer_Server_process_insertions+0x34> 40011b0c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 40011b10: 81 c7 e0 08 ret 40011b14: 81 e8 00 00 restore 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 ); 40011b18: 40 00 11 ea call 400162c0 <_Watchdog_Insert> 40011b1c: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011b20: 7f ff ff e3 call 40011aac <_Timer_Server_process_insertions> 40011b24: 01 00 00 00 nop 40011b28: 30 bf ff f5 b,a 40011afc <_Timer_Server_process_insertions+0x50> 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 ); 40011b2c: 92 02 20 10 add %o0, 0x10, %o1 40011b30: 40 00 11 e4 call 400162c0 <_Watchdog_Insert> 40011b34: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011b38: 7f ff ff dd call 40011aac <_Timer_Server_process_insertions> 40011b3c: 01 00 00 00 nop 40011b40: 30 bf ff ef b,a 40011afc <_Timer_Server_process_insertions+0x50> 4000a4f8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000a4f8: 9d e3 bf 98 save %sp, -104, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000a4fc: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000a500: de 06 60 04 ld [ %i1 + 4 ], %o7 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000a504: 91 38 60 1f sra %g1, 0x1f, %o0 4000a508: 92 10 00 01 mov %g1, %o1 4000a50c: 83 30 60 1d srl %g1, 0x1d, %g1 4000a510: 87 2a 60 03 sll %o1, 3, %g3 4000a514: 85 2a 20 03 sll %o0, 3, %g2 4000a518: 84 10 40 02 or %g1, %g2, %g2 4000a51c: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a520: 99 28 a0 05 sll %g2, 5, %o4 4000a524: 9b 28 e0 05 sll %g3, 5, %o5 4000a528: 98 10 40 0c or %g1, %o4, %o4 4000a52c: 9a a3 40 03 subcc %o5, %g3, %o5 4000a530: 83 33 60 1a srl %o5, 0x1a, %g1 4000a534: 98 63 00 02 subx %o4, %g2, %o4 4000a538: 97 2b 60 06 sll %o5, 6, %o3 4000a53c: 95 2b 20 06 sll %o4, 6, %o2 4000a540: 96 a2 c0 0d subcc %o3, %o5, %o3 4000a544: 94 10 40 0a or %g1, %o2, %o2 4000a548: 94 62 80 0c subx %o2, %o4, %o2 4000a54c: 96 82 c0 09 addcc %o3, %o1, %o3 4000a550: 94 42 80 08 addx %o2, %o0, %o2 4000a554: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a558: 85 2a a0 02 sll %o2, 2, %g2 4000a55c: 84 10 40 02 or %g1, %g2, %g2 4000a560: 87 2a e0 02 sll %o3, 2, %g3 4000a564: 96 82 c0 03 addcc %o3, %g3, %o3 4000a568: 94 42 80 02 addx %o2, %g2, %o2 4000a56c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a570: 85 2a a0 02 sll %o2, 2, %g2 4000a574: 84 10 40 02 or %g1, %g2, %g2 4000a578: 87 2a e0 02 sll %o3, 2, %g3 4000a57c: 96 82 c0 03 addcc %o3, %g3, %o3 4000a580: 94 42 80 02 addx %o2, %g2, %o2 4000a584: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a588: 85 2a a0 02 sll %o2, 2, %g2 4000a58c: 84 10 40 02 or %g1, %g2, %g2 4000a590: 87 2a e0 02 sll %o3, 2, %g3 4000a594: 96 82 c0 03 addcc %o3, %g3, %o3 4000a598: 94 42 80 02 addx %o2, %g2, %o2 4000a59c: 85 32 e0 17 srl %o3, 0x17, %g2 4000a5a0: 83 2a a0 09 sll %o2, 9, %g1 4000a5a4: 9b 2a e0 09 sll %o3, 9, %o5 4000a5a8: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000a5ac: 96 83 40 0f addcc %o5, %o7, %o3 4000a5b0: 85 3b e0 1f sra %o7, 0x1f, %g2 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 4000a5b4: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000a5b8: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000a5bc: 80 92 80 0b orcc %o2, %o3, %g0 4000a5c0: 02 80 00 5d be 4000a734 <_Timespec_Divide+0x23c> 4000a5c4: d0 06 00 00 ld [ %i0 ], %o0 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000a5c8: 92 10 00 08 mov %o0, %o1 4000a5cc: 83 32 60 1d srl %o1, 0x1d, %g1 4000a5d0: 9b 2a 60 03 sll %o1, 3, %o5 4000a5d4: 91 3a 20 1f sra %o0, 0x1f, %o0 4000a5d8: 99 2a 20 03 sll %o0, 3, %o4 4000a5dc: 98 10 40 0c or %g1, %o4, %o4 4000a5e0: 83 33 60 1b srl %o5, 0x1b, %g1 4000a5e4: 85 2b 20 05 sll %o4, 5, %g2 4000a5e8: 87 2b 60 05 sll %o5, 5, %g3 4000a5ec: 84 10 40 02 or %g1, %g2, %g2 4000a5f0: 86 a0 c0 0d subcc %g3, %o5, %g3 4000a5f4: 83 30 e0 1a srl %g3, 0x1a, %g1 4000a5f8: 84 60 80 0c subx %g2, %o4, %g2 4000a5fc: 9b 28 e0 06 sll %g3, 6, %o5 4000a600: 99 28 a0 06 sll %g2, 6, %o4 4000a604: 9a a3 40 03 subcc %o5, %g3, %o5 4000a608: 98 10 40 0c or %g1, %o4, %o4 4000a60c: 98 63 00 02 subx %o4, %g2, %o4 4000a610: 9a 83 40 09 addcc %o5, %o1, %o5 4000a614: 83 33 60 1e srl %o5, 0x1e, %g1 4000a618: 98 43 00 08 addx %o4, %o0, %o4 4000a61c: 87 2b 60 02 sll %o5, 2, %g3 4000a620: 85 2b 20 02 sll %o4, 2, %g2 4000a624: 9a 83 40 03 addcc %o5, %g3, %o5 4000a628: 84 10 40 02 or %g1, %g2, %g2 4000a62c: 83 33 60 1e srl %o5, 0x1e, %g1 4000a630: 98 43 00 02 addx %o4, %g2, %o4 4000a634: 87 2b 60 02 sll %o5, 2, %g3 4000a638: 85 2b 20 02 sll %o4, 2, %g2 4000a63c: 9a 83 40 03 addcc %o5, %g3, %o5 4000a640: 84 10 40 02 or %g1, %g2, %g2 4000a644: 83 33 60 1e srl %o5, 0x1e, %g1 4000a648: 98 43 00 02 addx %o4, %g2, %o4 4000a64c: 87 2b 60 02 sll %o5, 2, %g3 4000a650: 85 2b 20 02 sll %o4, 2, %g2 4000a654: 9a 83 40 03 addcc %o5, %g3, %o5 4000a658: 84 10 40 02 or %g1, %g2, %g2 4000a65c: 98 43 00 02 addx %o4, %g2, %o4 4000a660: 83 2b 20 09 sll %o4, 9, %g1 4000a664: 89 33 60 17 srl %o5, 0x17, %g4 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000a668: a6 10 00 12 mov %l2, %l3 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000a66c: a0 11 00 01 or %g4, %g1, %l0 4000a670: a3 2b 60 09 sll %o5, 9, %l1 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000a674: a2 84 40 13 addcc %l1, %l3, %l1 4000a678: 83 34 60 1e srl %l1, 0x1e, %g1 4000a67c: 87 2c 60 02 sll %l1, 2, %g3 4000a680: a5 3c a0 1f sra %l2, 0x1f, %l2 4000a684: a0 44 00 12 addx %l0, %l2, %l0 4000a688: 85 2c 20 02 sll %l0, 2, %g2 4000a68c: 84 10 40 02 or %g1, %g2, %g2 4000a690: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a694: 99 28 a0 05 sll %g2, 5, %o4 4000a698: 9b 28 e0 05 sll %g3, 5, %o5 4000a69c: 98 10 40 0c or %g1, %o4, %o4 4000a6a0: 9a a3 40 03 subcc %o5, %g3, %o5 4000a6a4: 98 63 00 02 subx %o4, %g2, %o4 4000a6a8: 9a 83 40 11 addcc %o5, %l1, %o5 4000a6ac: 83 33 60 1e srl %o5, 0x1e, %g1 4000a6b0: 98 43 00 10 addx %o4, %l0, %o4 4000a6b4: 87 2b 60 02 sll %o5, 2, %g3 4000a6b8: 85 2b 20 02 sll %o4, 2, %g2 4000a6bc: 9a 83 40 03 addcc %o5, %g3, %o5 4000a6c0: 84 10 40 02 or %g1, %g2, %g2 4000a6c4: 83 33 60 1e srl %o5, 0x1e, %g1 4000a6c8: 87 2b 60 02 sll %o5, 2, %g3 4000a6cc: 98 43 00 02 addx %o4, %g2, %o4 4000a6d0: 9a 83 40 03 addcc %o5, %g3, %o5 4000a6d4: 85 2b 20 02 sll %o4, 2, %g2 4000a6d8: 84 10 40 02 or %g1, %g2, %g2 4000a6dc: 83 33 60 1b srl %o5, 0x1b, %g1 4000a6e0: 98 43 00 02 addx %o4, %g2, %o4 4000a6e4: 99 2b 20 05 sll %o4, 5, %o4 4000a6e8: 98 10 40 0c or %g1, %o4, %o4 4000a6ec: 93 2b 60 05 sll %o5, 5, %o1 4000a6f0: 40 00 33 f4 call 400176c0 <__udivdi3> 4000a6f4: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000a6f8: 94 10 20 00 clr %o2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000a6fc: a0 10 00 08 mov %o0, %l0 4000a700: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000a704: 96 10 23 e8 mov 0x3e8, %o3 4000a708: 40 00 33 ee call 400176c0 <__udivdi3> 4000a70c: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000a710: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000a714: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000a718: 94 10 20 00 clr %o2 4000a71c: 92 10 00 11 mov %l1, %o1 4000a720: 40 00 34 c4 call 40017a30 <__umoddi3> 4000a724: 96 10 23 e8 mov 0x3e8, %o3 4000a728: d2 26 c0 00 st %o1, [ %i3 ] 4000a72c: 81 c7 e0 08 ret 4000a730: 81 e8 00 00 restore left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 4000a734: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000a738: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000a73c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a740: 81 e8 00 00 restore <== NOT EXECUTED 40014bb8 <_Timespec_From_ticks>: void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 40014bb8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 40014bbc: 03 10 00 a5 sethi %hi(0x40029400), %g1 <== NOT EXECUTED 40014bc0: d2 00 60 60 ld [ %g1 + 0x60 ], %o1 ! 40029460 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 40014bc4: 40 00 30 53 call 40020d10 <.umul> <== NOT EXECUTED 40014bc8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40014bcc: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 40014bd0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40014bd4: 7f ff b3 10 call 40001814 <.udiv> <== NOT EXECUTED 40014bd8: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 40014bdc: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 40014be0: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 40014be4: 40 00 30 85 call 40020df8 <.urem> <== NOT EXECUTED 40014be8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40014bec: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 40014bf0: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 40014bf4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40014bf8: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40014bfc: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED 40014c00: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 40014c04: 81 c7 e0 08 ret <== NOT EXECUTED 40014c08: 81 e8 00 00 restore <== NOT EXECUTED 40014c0c <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 40014c0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014c10: 02 80 00 0f be 40014c4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40014c14: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 40014c18: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40014c1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40014c20: 06 80 00 0b bl 40014c4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40014c24: 01 00 00 00 nop <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 40014c28: d0 02 20 04 ld [ %o0 + 4 ], %o0 <== NOT EXECUTED 40014c2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014c30: 06 80 00 07 bl 40014c4c <_Timespec_Is_valid+0x40> <== NOT EXECUTED 40014c34: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 <== NOT EXECUTED 40014c38: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <== NOT EXECUTED 40014c3c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40014c40: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 40014c44: 81 c3 e0 08 retl <== NOT EXECUTED 40014c48: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 40014c4c: 81 c3 e0 08 retl <== NOT EXECUTED 40014c50: 90 10 20 00 clr %o0 <== NOT EXECUTED 40014c54 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 40014c54: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 40014c58: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED 40014c5c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40014c60: 02 80 00 15 be 40014cb4 <_Timespec_To_ticks+0x60> <== NOT EXECUTED 40014c64: e4 06 20 04 ld [ %i0 + 4 ], %l2 <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 40014c68: 03 10 00 a5 sethi %hi(0x40029400), %g1 <== NOT EXECUTED 40014c6c: e2 00 60 60 ld [ %g1 + 0x60 ], %l1 ! 40029460 <_TOD_Microseconds_per_tick> <== NOT EXECUTED 40014c70: 11 00 03 d0 sethi %hi(0xf4000), %o0 <== NOT EXECUTED 40014c74: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40014c78: 7f ff b2 e7 call 40001814 <.udiv> <== NOT EXECUTED 40014c7c: 90 12 22 40 or %o0, 0x240, %o0 <== NOT EXECUTED 40014c80: 40 00 30 24 call 40020d10 <.umul> <== NOT EXECUTED 40014c84: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 40014c88: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 40014c8c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 40014c90: 7f ff b2 e1 call 40001814 <.udiv> <== NOT EXECUTED 40014c94: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40014c98: 7f ff b2 df call 40001814 <.udiv> <== NOT EXECUTED 40014c9c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 40014ca0: b0 82 00 10 addcc %o0, %l0, %i0 <== NOT EXECUTED 40014ca4: 22 80 00 02 be,a 40014cac <_Timespec_To_ticks+0x58> <== NOT EXECUTED 40014ca8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return ticks; return 1; } 40014cac: 81 c7 e0 08 ret <== NOT EXECUTED 40014cb0: 81 e8 00 00 restore <== NOT EXECUTED const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 40014cb4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40014cb8: 12 bf ff ec bne 40014c68 <_Timespec_To_ticks+0x14> <== NOT EXECUTED 40014cbc: b0 10 20 00 clr %i0 <== NOT EXECUTED if (ticks) return ticks; return 1; } 40014cc0: 81 c7 e0 08 ret <== NOT EXECUTED 40014cc4: 81 e8 00 00 restore <== NOT EXECUTED 4000bf30 <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 4000bf30: 9d e3 bf 98 save %sp, -104, %sp _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4000bf34: 11 10 00 62 sethi %hi(0x40018800), %o0 4000bf38: 92 10 00 18 mov %i0, %o1 4000bf3c: 7f ff e8 b8 call 4000621c <_Chain_Append> 4000bf40: 90 12 22 58 or %o0, 0x258, %o0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4000bf44: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000bf48: 80 a0 60 00 cmp %g1, 0 4000bf4c: 02 80 00 06 be 4000bf64 <_User_extensions_Add_API_set+0x34> 4000bf50: b2 06 20 08 add %i0, 8, %i1 the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 4000bf54: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Chain_Append( 4000bf58: 31 10 00 62 sethi %hi(0x40018800), %i0 4000bf5c: 7f ff e8 b0 call 4000621c <_Chain_Append> 4000bf60: 91 ee 20 24 restore %i0, 0x24, %o0 4000bf64: 81 c7 e0 08 ret <== NOT EXECUTED 4000bf68: 81 e8 00 00 restore <== NOT EXECUTED 4000f114 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 4000f114: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 4000f118: 40 00 13 09 call 40013d3c <_Chain_Extract> 4000f11c: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4000f120: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000f124: 80 a0 60 00 cmp %g1, 0 4000f128: 02 80 00 04 be 4000f138 <_User_extensions_Remove_set+0x24> 4000f12c: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 4000f130: 40 00 13 03 call 40013d3c <_Chain_Extract> <== NOT EXECUTED 4000f134: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 4000f138: 81 c7 e0 08 ret 4000f13c: 81 e8 00 00 restore 40008af0 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40008af0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 40008af4: 03 10 00 62 sethi %hi(0x40018800), %g1 40008af8: e0 00 62 58 ld [ %g1 + 0x258 ], %l0 ! 40018a58 <_User_extensions_List> 40008afc: 82 10 62 58 or %g1, 0x258, %g1 40008b00: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40008b04: 80 a4 00 11 cmp %l0, %l1 40008b08: 02 80 00 10 be 40008b48 <_User_extensions_Thread_create+0x58> 40008b0c: 03 10 00 62 sethi %hi(0x40018800), %g1 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 40008b10: a4 10 60 e0 or %g1, 0xe0, %l2 ! 400188e0 <_Thread_Executing> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 40008b14: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40008b18: 80 a0 60 00 cmp %g1, 0 40008b1c: 02 80 00 07 be 40008b38 <_User_extensions_Thread_create+0x48> 40008b20: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40008b24: 9f c0 40 00 call %g1 40008b28: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40008b2c: 80 8a 20 ff btst 0xff, %o0 40008b30: 02 80 00 08 be 40008b50 <_User_extensions_Thread_create+0x60> 40008b34: 01 00 00 00 nop User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 40008b38: e0 04 00 00 ld [ %l0 ], %l0 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40008b3c: 80 a4 00 11 cmp %l0, %l1 40008b40: 32 bf ff f6 bne,a 40008b18 <_User_extensions_Thread_create+0x28> 40008b44: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 40008b48: 81 c7 e0 08 ret 40008b4c: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 40008b50: 81 c7 e0 08 ret <== NOT EXECUTED 40008b54: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000aacc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000aacc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000aad0: 7f ff df b1 call 40002994 4000aad4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000aad8: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000aadc: a0 06 20 04 add %i0, 4, %l0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4000aae0: 80 a0 80 10 cmp %g2, %l0 4000aae4: 02 80 00 1f be 4000ab60 <_Watchdog_Adjust+0x94> 4000aae8: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000aaec: 12 80 00 1f bne 4000ab68 <_Watchdog_Adjust+0x9c> 4000aaf0: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000aaf4: 80 a6 a0 00 cmp %i2, 0 4000aaf8: 02 80 00 1a be 4000ab60 <_Watchdog_Adjust+0x94> 4000aafc: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000ab00: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000ab04: 80 a6 80 19 cmp %i2, %i1 4000ab08: 1a 80 00 0b bcc 4000ab34 <_Watchdog_Adjust+0x68> 4000ab0c: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 4000ab10: 10 80 00 1d b 4000ab84 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000ab14: 82 26 40 1a sub %i1, %i2, %g1 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000ab18: b4 a6 80 19 subcc %i2, %i1, %i2 4000ab1c: 02 80 00 11 be 4000ab60 <_Watchdog_Adjust+0x94> 4000ab20: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000ab24: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000ab28: 80 a6 40 1a cmp %i1, %i2 4000ab2c: 18 80 00 16 bgu 4000ab84 <_Watchdog_Adjust+0xb8> 4000ab30: 82 26 40 1a sub %i1, %i2, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4000ab34: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 4000ab38: 7f ff df 9b call 400029a4 4000ab3c: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000ab40: 40 00 00 b4 call 4000ae10 <_Watchdog_Tickle> 4000ab44: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000ab48: 7f ff df 93 call 40002994 4000ab4c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000ab50: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 4000ab54: 80 a4 00 01 cmp %l0, %g1 4000ab58: 12 bf ff f0 bne 4000ab18 <_Watchdog_Adjust+0x4c> 4000ab5c: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 4000ab60: 7f ff df 91 call 400029a4 4000ab64: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000ab68: 12 bf ff fe bne 4000ab60 <_Watchdog_Adjust+0x94> 4000ab6c: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000ab70: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000ab74: 82 00 40 1a add %g1, %i2, %g1 4000ab78: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 4000ab7c: 7f ff df 8a call 400029a4 4000ab80: 91 e8 00 08 restore %g0, %o0, %o0 _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; 4000ab84: 10 bf ff f7 b 4000ab60 <_Watchdog_Adjust+0x94> 4000ab88: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 400161f0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 400161f0: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 400161f4: a2 96 60 00 orcc %i1, 0, %l1 400161f8: 12 80 00 04 bne 40016208 <_Watchdog_Adjust_to_chain+0x18> 400161fc: 01 00 00 00 nop 40016200: 81 c7 e0 08 ret 40016204: 81 e8 00 00 restore return; } _ISR_Disable( level ); 40016208: 7f ff d3 ea call 4000b1b0 4001620c: 01 00 00 00 nop 40016210: a6 10 00 08 mov %o0, %l3 40016214: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40016218: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 4001621c: 80 a0 80 10 cmp %g2, %l0 40016220: 02 80 00 25 be 400162b4 <_Watchdog_Adjust_to_chain+0xc4> 40016224: a4 06 a0 04 add %i2, 4, %l2 40016228: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 4001622c: 80 a6 40 11 cmp %i1, %l1 40016230: 18 80 00 20 bgu 400162b0 <_Watchdog_Adjust_to_chain+0xc0> 40016234: 82 26 40 11 sub %i1, %l1, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 40016238: 10 80 00 15 b 4001628c <_Watchdog_Adjust_to_chain+0x9c> 4001623c: c0 20 a0 10 clr [ %g2 + 0x10 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 40016240: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 40016244: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40016248: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 4001624c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 40016250: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40016254: c2 20 a0 04 st %g1, [ %g2 + 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; 40016258: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 4001625c: 7f ff d3 d9 call 4000b1c0 40016260: 90 10 00 13 mov %l3, %o0 40016264: 7f ff d3 d3 call 4000b1b0 40016268: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4001626c: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40016270: 80 a4 00 02 cmp %l0, %g2 40016274: 02 80 00 10 be 400162b4 <_Watchdog_Adjust_to_chain+0xc4> 40016278: 01 00 00 00 nop 4001627c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40016280: 80 a0 60 00 cmp %g1, 0 40016284: 32 80 00 07 bne,a 400162a0 <_Watchdog_Adjust_to_chain+0xb0> 40016288: a2 a4 40 19 subcc %l1, %i1, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4001628c: 80 a4 00 02 cmp %l0, %g2 40016290: 32 bf ff ec bne,a 40016240 <_Watchdog_Adjust_to_chain+0x50> 40016294: c2 00 80 00 ld [ %g2 ], %g1 40016298: 10 bf ff ec b 40016248 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 4001629c: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 400162a0: 02 80 00 05 be 400162b4 <_Watchdog_Adjust_to_chain+0xc4> 400162a4: 01 00 00 00 nop 400162a8: 10 bf ff e1 b 4001622c <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 400162ac: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 400162b0: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 400162b4: 7f ff d3 c3 call 4000b1c0 400162b8: 91 e8 00 13 restore %g0, %l3, %o0 400162bc: 01 00 00 00 nop 40008c48 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40008c48: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 40008c4c: 03 10 00 62 sethi %hi(0x40018800), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40008c50: ac 10 00 18 mov %i0, %l6 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 40008c54: e6 00 60 bc ld [ %g1 + 0xbc ], %l3 _ISR_Disable( level ); 40008c58: 7f ff e4 32 call 40001d20 40008c5c: 01 00 00 00 nop 40008c60: b0 10 00 08 mov %o0, %i0 /* * 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 ) { 40008c64: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008c68: 80 a0 60 00 cmp %g1, 0 40008c6c: 12 80 00 4a bne 40008d94 <_Watchdog_Insert+0x14c> 40008c70: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 40008c74: 2b 10 00 62 sethi %hi(0x40018800), %l5 40008c78: c2 05 61 70 ld [ %l5 + 0x170 ], %g1 ! 40018970 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40008c7c: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40008c80: 82 00 60 01 inc %g1 40008c84: 2f 10 00 62 sethi %hi(0x40018800), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40008c88: c4 26 60 08 st %g2, [ %i1 + 8 ] 40008c8c: a8 15 e0 dc or %l7, 0xdc, %l4 _Watchdog_Sync_count++; 40008c90: c2 25 61 70 st %g1, [ %l5 + 0x170 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40008c94: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40008c98: e4 06 60 0c ld [ %i1 + 0xc ], %l2 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 40008c9c: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40008ca0: 80 a4 a0 00 cmp %l2, 0 40008ca4: 02 80 00 2b be 40008d50 <_Watchdog_Insert+0x108> 40008ca8: 03 10 00 62 sethi %hi(0x40018800), %g1 40008cac: c2 04 40 00 ld [ %l1 ], %g1 40008cb0: 80 a0 60 00 cmp %g1, 0 40008cb4: 02 80 00 27 be 40008d50 <_Watchdog_Insert+0x108> 40008cb8: 03 10 00 62 sethi %hi(0x40018800), %g1 break; if ( delta_interval < after->delta_interval ) { 40008cbc: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40008cc0: 80 a4 80 10 cmp %l2, %l0 40008cc4: 1a 80 00 13 bcc 40008d10 <_Watchdog_Insert+0xc8> 40008cc8: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40008ccc: 10 80 00 20 b 40008d4c <_Watchdog_Insert+0x104> 40008cd0: c2 24 60 10 st %g1, [ %l1 + 0x10 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40008cd4: c2 05 00 00 ld [ %l4 ], %g1 40008cd8: 80 a4 c0 01 cmp %l3, %g1 40008cdc: 0a 80 00 30 bcs 40008d9c <_Watchdog_Insert+0x154> 40008ce0: 01 00 00 00 nop */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40008ce4: a4 a4 80 10 subcc %l2, %l0, %l2 40008ce8: 02 80 00 19 be 40008d4c <_Watchdog_Insert+0x104> 40008cec: e2 04 40 00 ld [ %l1 ], %l1 40008cf0: c2 04 40 00 ld [ %l1 ], %g1 40008cf4: 80 a0 60 00 cmp %g1, 0 40008cf8: 02 80 00 16 be 40008d50 <_Watchdog_Insert+0x108> 40008cfc: 03 10 00 62 sethi %hi(0x40018800), %g1 break; if ( delta_interval < after->delta_interval ) { 40008d00: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40008d04: 80 a4 00 12 cmp %l0, %l2 40008d08: 18 80 00 10 bgu 40008d48 <_Watchdog_Insert+0x100> 40008d0c: 82 24 00 12 sub %l0, %l2, %g1 * 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 ); 40008d10: 7f ff e4 08 call 40001d30 40008d14: 90 10 00 18 mov %i0, %o0 40008d18: 7f ff e4 02 call 40001d20 40008d1c: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 40008d20: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008d24: 80 a0 60 01 cmp %g1, 1 40008d28: 02 bf ff eb be 40008cd4 <_Watchdog_Insert+0x8c> 40008d2c: 01 00 00 00 nop _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; 40008d30: e6 25 e0 dc st %l3, [ %l7 + 0xdc ] <== NOT EXECUTED _Watchdog_Sync_count--; 40008d34: c2 05 61 70 ld [ %l5 + 0x170 ], %g1 <== NOT EXECUTED 40008d38: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008d3c: c2 25 61 70 st %g1, [ %l5 + 0x170 ] <== NOT EXECUTED _ISR_Enable( level ); 40008d40: 7f ff e3 fc call 40001d30 <== NOT EXECUTED 40008d44: 81 e8 00 00 restore <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 40008d48: c2 24 60 10 st %g1, [ %l1 + 0x10 ] the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40008d4c: 03 10 00 62 sethi %hi(0x40018800), %g1 40008d50: c6 00 61 74 ld [ %g1 + 0x174 ], %g3 ! 40018974 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 40008d54: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40008d58: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40008d5c: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40008d60: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40008d64: c8 00 80 00 ld [ %g2 ], %g4 _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; 40008d68: e6 25 e0 dc st %l3, [ %l7 + 0xdc ] 40008d6c: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 40008d70: c2 05 61 70 ld [ %l5 + 0x170 ], %g1 after_node->next = the_node; 40008d74: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40008d78: c4 26 60 04 st %g2, [ %i1 + 4 ] 40008d7c: 82 00 7f ff add %g1, -1, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 40008d80: f2 21 20 04 st %i1, [ %g4 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 40008d84: c8 26 40 00 st %g4, [ %i1 ] 40008d88: c2 25 61 70 st %g1, [ %l5 + 0x170 ] _ISR_Enable( level ); 40008d8c: 7f ff e3 e9 call 40001d30 40008d90: 81 e8 00 00 restore * 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 ); 40008d94: 7f ff e3 e7 call 40001d30 <== NOT EXECUTED 40008d98: 81 e8 00 00 restore <== 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; 40008d9c: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40008da0: 10 bf ff bf b 40008c9c <_Watchdog_Insert+0x54> 40008da4: e4 06 60 0c ld [ %i1 + 0xc ], %l2 40008df4 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 40008df4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 40008df8: 7f ff e3 ca call 40001d20 40008dfc: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 40008e00: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 40008e04: 80 a6 20 01 cmp %i0, 1 40008e08: 02 80 00 2a be 40008eb0 <_Watchdog_Remove+0xbc> 40008e0c: 03 10 00 62 sethi %hi(0x40018800), %g1 40008e10: 1a 80 00 09 bcc 40008e34 <_Watchdog_Remove+0x40> 40008e14: 80 a6 20 03 cmp %i0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008e18: 03 10 00 62 sethi %hi(0x40018800), %g1 40008e1c: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 40018974 <_Watchdog_Ticks_since_boot> 40008e20: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 40008e24: 7f ff e3 c3 call 40001d30 40008e28: 01 00 00 00 nop return( previous_state ); } 40008e2c: 81 c7 e0 08 ret 40008e30: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 40008e34: 18 bf ff fa bgu 40008e1c <_Watchdog_Remove+0x28> 40008e38: 03 10 00 62 sethi %hi(0x40018800), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 40008e3c: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 40008e40: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 40008e44: c2 01 00 00 ld [ %g4 ], %g1 40008e48: 80 a0 60 00 cmp %g1, 0 40008e4c: 02 80 00 07 be 40008e68 <_Watchdog_Remove+0x74> 40008e50: 03 10 00 62 sethi %hi(0x40018800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 40008e54: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 40008e58: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40008e5c: 82 00 40 02 add %g1, %g2, %g1 40008e60: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 40008e64: 03 10 00 62 sethi %hi(0x40018800), %g1 40008e68: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40018970 <_Watchdog_Sync_count> 40008e6c: 80 a0 a0 00 cmp %g2, 0 40008e70: 22 80 00 07 be,a 40008e8c <_Watchdog_Remove+0x98> 40008e74: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 40008e78: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 40008e7c: c6 00 60 bc ld [ %g1 + 0xbc ], %g3 ! 400188bc <_ISR_Nest_level> <== NOT EXECUTED 40008e80: 05 10 00 62 sethi %hi(0x40018800), %g2 <== NOT EXECUTED 40008e84: c6 20 a0 dc st %g3, [ %g2 + 0xdc ] ! 400188dc <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 40008e88: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 40008e8c: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40008e90: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008e94: 03 10 00 62 sethi %hi(0x40018800), %g1 40008e98: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 40018974 <_Watchdog_Ticks_since_boot> 40008e9c: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 40008ea0: 7f ff e3 a4 call 40001d30 40008ea4: 01 00 00 00 nop return( previous_state ); } 40008ea8: 81 c7 e0 08 ret 40008eac: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008eb0: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 <== 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; 40008eb4: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008eb8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 40008ebc: 7f ff e3 9d call 40001d30 <== NOT EXECUTED 40008ec0: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 40008ec4: 81 c7 e0 08 ret <== NOT EXECUTED 40008ec8: 81 e8 00 00 restore <== NOT EXECUTED 40008fe4 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 40008fe4: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 40008fe8: 80 a6 20 00 cmp %i0, 0 40008fec: 02 80 00 15 be 40009040 <_Workspace_Handler_initialization+0x5c> 40008ff0: 80 8e 20 07 btst 7, %i0 40008ff4: 12 80 00 14 bne 40009044 <_Workspace_Handler_initialization+0x60> 40008ff8: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 40008ffc: 03 10 00 62 sethi %hi(0x40018800), %g1 40009000: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400188b8 <_Configuration_Table> 40009004: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 40009008: 80 a0 e0 00 cmp %g3, 0 4000900c: 32 80 00 11 bne,a 40009050 <_Workspace_Handler_initialization+0x6c> 40009010: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 40009014: 92 10 00 18 mov %i0, %o1 40009018: 94 10 00 19 mov %i1, %o2 4000901c: 11 10 00 62 sethi %hi(0x40018800), %o0 40009020: 96 10 20 08 mov 8, %o3 40009024: 7f ff f5 eb call 400067d0 <_Heap_Initialize> 40009028: 90 12 20 44 or %o0, 0x44, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000902c: 80 a2 20 00 cmp %o0, 0 40009030: 02 80 00 0d be 40009064 <_Workspace_Handler_initialization+0x80> 40009034: 92 10 20 01 mov 1, %o1 40009038: 81 c7 e0 08 ret 4000903c: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 40009040: 90 10 20 00 clr %o0 40009044: 92 10 20 01 mov 1, %o1 40009048: 7f ff f6 6f call 40006a04 <_Internal_error_Occurred> 4000904c: 94 10 20 02 mov 2, %o2 TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 40009050: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009054: 40 00 10 b9 call 4000d338 <== NOT EXECUTED 40009058: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 4000905c: 10 bf ff ef b 40009018 <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 40009060: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 40009064: 7f ff f6 68 call 40006a04 <_Internal_error_Occurred> <== NOT EXECUTED 40009068: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 4000906c: 01 00 00 00 nop 40001ec4 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 40001ec4: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 40001ec8: 94 10 20 00 clr %o2 <== NOT EXECUTED 40001ecc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40001ed0: 7f ff ff eb call 40001e7c <__assert_func> <== NOT EXECUTED 40001ed4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40001ed8: 01 00 00 00 nop 40001e7c <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 40001e7c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40001e80: 03 10 00 5b sethi %hi(0x40016c00), %g1 <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 40001e84: 9a 10 00 1a mov %i2, %o5 <== NOT EXECUTED 40001e88: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40001e8c: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED 40001e90: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40001e94: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 40001e98: 02 80 00 07 be 40001eb4 <__assert_func+0x38> <== NOT EXECUTED 40001e9c: 98 10 61 88 or %g1, 0x188, %o4 <== NOT EXECUTED 40001ea0: 11 10 00 5b sethi %hi(0x40016c00), %o0 <== NOT EXECUTED 40001ea4: 40 00 04 0a call 40002ecc <== NOT EXECUTED 40001ea8: 90 12 21 98 or %o0, 0x198, %o0 ! 40016d98 <__func__.4755+0x250> <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 40001eac: 40 00 0f ec call 40005e5c <== NOT EXECUTED 40001eb0: 90 10 20 00 clr %o0 <== NOT EXECUTED int line, const char *func, const char *failedexpr ) { printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40001eb4: 03 10 00 5b sethi %hi(0x40016c00), %g1 <== NOT EXECUTED 40001eb8: 9a 10 60 90 or %g1, 0x90, %o5 ! 40016c90 <__func__.4755+0x148> <== NOT EXECUTED 40001ebc: 10 bf ff f9 b 40001ea0 <__assert_func+0x24> <== NOT EXECUTED 40001ec0: 98 10 00 0d mov %o5, %o4 <== NOT EXECUTED 40023094 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 40023094: 81 c3 e0 08 retl <== NOT EXECUTED 40023098: 90 10 20 00 clr %o0 <== NOT EXECUTED 40015f68 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 40015f68: 9d e3 bf 98 save %sp, -104, %sp 40015f6c: 40 00 06 c6 call 40017a84 <_fini> 40015f70: 01 00 00 00 nop * 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(); 40015f74: 7f ff ff e1 call 40015ef8 40015f78: 01 00 00 00 nop rtems_shutdown_executive(status); 40015f7c: 40 00 00 52 call 400160c4 40015f80: 90 10 00 18 mov %i0, %o0 40015f84: 30 80 00 00 b,a 40015f84 <_exit+0x1c> <== NOT EXECUTED 4002f56c <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4002f56c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002f570: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002f574: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4002f578: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002f57c: 7f ff ff 6a call 4002f324 <== NOT EXECUTED 4002f580: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002f584: 01 00 00 00 nop 40022f04 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 40022f04: 81 c3 e0 08 retl <== NOT EXECUTED 40022f08: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000a7bc <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000a7bc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000a7c0: 7f ff ff e6 call 4000a758 <== NOT EXECUTED 4000a7c4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000a7c8: 01 00 00 00 nop 4002308c <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 4002308c: 81 c3 e0 08 retl <== NOT EXECUTED 40023090: 90 10 20 00 clr %o0 <== NOT EXECUTED 40022964 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 40022964: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40022968: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002296c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022970: 7f ff ff 59 call 400226d4 <== NOT EXECUTED 40022974: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022978: 01 00 00 00 nop 40015ec8 <_lseek_r>: int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 40015ec8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40015ecc: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40015ed0: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 40015ed4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40015ed8: 7f ff ff ba call 40015dc0 <== NOT EXECUTED 40015edc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40015ee0: 01 00 00 00 nop 40022bc8 <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40022bc8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40022bcc: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40022bd0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022bd4: 7f ff ff b3 call 40022aa0 <== NOT EXECUTED 40022bd8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022bdc: 01 00 00 00 nop 40002a2c <_open_r>: const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 40002a2c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40002a30: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40002a34: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 40002a38: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002a3c: 7f ff ff 38 call 4000271c <== NOT EXECUTED 40002a40: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40002a44: 01 00 00 00 nop <== NOT EXECUTED 40016074 <_read_r>: int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 40016074: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40016078: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4001607c: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 40016080: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40016084: 7f ff ff c1 call 40015f88 <== NOT EXECUTED 40016088: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001608c: 01 00 00 00 nop 40016090 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 40016090: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40016094: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40016098: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001609c: 40 00 00 17 call 400160f8 <== NOT EXECUTED 400160a0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400160a4: 01 00 00 00 nop 40043438 <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 40043438: 9d e3 bf 48 save %sp, -184, %sp <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 4004343c: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 40043440: 7f ff 0e eb call 40006fec <== NOT EXECUTED 40043444: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 40043448: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4004344c: 06 80 00 0f bl 40043488 <_rename_r+0x50> <== NOT EXECUTED 40043450: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED return s; s = link( old, new ); 40043454: 7f ff 7c a0 call 400226d4 <== NOT EXECUTED 40043458: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 4004345c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40043460: 06 80 00 0a bl 40043488 <_rename_r+0x50> <== NOT EXECUTED 40043464: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 40043468: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 4004346c: 07 00 00 10 sethi %hi(0x4000), %g3 <== NOT EXECUTED 40043470: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40043474: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40043478: 02 80 00 06 be 40043490 <_rename_r+0x58> <== NOT EXECUTED 4004347c: 01 00 00 00 nop <== NOT EXECUTED 40043480: 7f ff 80 ea call 40023828 <== NOT EXECUTED 40043484: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 40043488: 81 c7 e0 08 ret <== NOT EXECUTED 4004348c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( s < 0 ) return s; s = link( old, new ); if ( s < 0 ) return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 40043490: 7f ff 7f cb call 400233bc <== NOT EXECUTED 40043494: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 40043498: 81 c7 e0 08 ret <== NOT EXECUTED 4004349c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40007114 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40007114: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40007118: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4000711c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40007120: 7f ff ff b3 call 40006fec <== NOT EXECUTED 40007124: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40007128: 01 00 00 00 nop 4002398c <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 4002398c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40023990: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40023994: 7f ff ff a5 call 40023828 <== NOT EXECUTED 40023998: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002399c: 01 00 00 00 nop 40020a68 : int access( const char *path, int amode ) { 40020a68: 9d e3 bf 48 save %sp, -184, %sp <== NOT EXECUTED struct stat statbuf; if ( stat(path, &statbuf) ) 40020a6c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020a70: 7f ff 99 5f call 40006fec <== NOT EXECUTED 40020a74: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 40020a78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020a7c: 12 80 00 0f bne 40020ab8 <== NOT EXECUTED 40020a80: 80 8e 60 04 btst 4, %i1 <== NOT EXECUTED return -1; if ( amode & R_OK ) { 40020a84: 12 80 00 0a bne 40020aac <== NOT EXECUTED 40020a88: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 40020a8c: 80 8e 60 02 btst 2, %i1 <== NOT EXECUTED 40020a90: 12 80 00 10 bne 40020ad0 <== NOT EXECUTED 40020a94: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 40020a98: 80 8e 60 01 btst 1, %i1 <== NOT EXECUTED 40020a9c: 12 80 00 09 bne 40020ac0 <== NOT EXECUTED 40020aa0: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 40020aa4: 81 c7 e0 08 ret <== NOT EXECUTED 40020aa8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 40020aac: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40020ab0: 12 bf ff f8 bne 40020a90 <== NOT EXECUTED 40020ab4: 80 8e 60 02 btst 2, %i1 <== NOT EXECUTED if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 40020ab8: 81 c7 e0 08 ret <== NOT EXECUTED 40020abc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40020ac0: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED 40020ac4: 12 bf ff f8 bne 40020aa4 <== NOT EXECUTED 40020ac8: 01 00 00 00 nop <== NOT EXECUTED 40020acc: 30 bf ff fb b,a 40020ab8 <== NOT EXECUTED if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 40020ad0: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 40020ad4: 12 bf ff f2 bne 40020a9c <== NOT EXECUTED 40020ad8: 80 8e 60 01 btst 1, %i1 <== NOT EXECUTED 40020adc: 30 bf ff f7 b,a 40020ab8 <== NOT EXECUTED 40020d2c : #include int chdir( const char *pathname ) { 40020d2c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40020d30: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40020d34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020d38: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40020d3c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 40020d40: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40020d44: 7f ff 92 0c call 40005574 <== NOT EXECUTED 40020d48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 40020d4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020d50: 12 80 00 2f bne 40020e0c <== NOT EXECUTED 40020d54: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 40020d58: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40020d5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020d60: 22 80 00 2d be,a 40020e14 <== NOT EXECUTED 40020d64: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40020d68: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020d6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020d70: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 40020d74: 12 80 00 19 bne 40020dd8 <== NOT EXECUTED 40020d78: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 40020d7c: 21 10 01 29 sethi %hi(0x4004a400), %l0 <== NOT EXECUTED 40020d80: d0 04 20 e4 ld [ %l0 + 0xe4 ], %o0 ! 4004a4e4 <== NOT EXECUTED 40020d84: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED 40020d88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020d8c: 22 80 00 09 be,a 40020db0 <== NOT EXECUTED 40020d90: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40020d94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020d98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020d9c: 22 80 00 05 be,a 40020db0 <== NOT EXECUTED 40020da0: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40020da4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020da8: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 40020dac: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40020db0: c6 04 20 e4 ld [ %l0 + 0xe4 ], %g3 <== NOT EXECUTED 40020db4: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 40020db8: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 40020dbc: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 40020dc0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40020dc4: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 40020dc8: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 40020dcc: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED return 0; } 40020dd0: 81 c7 e0 08 ret <== NOT EXECUTED 40020dd4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 40020dd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020ddc: 02 80 00 08 be 40020dfc <== NOT EXECUTED 40020de0: 01 00 00 00 nop <== NOT EXECUTED 40020de4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020de8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020dec: 02 80 00 04 be 40020dfc <== NOT EXECUTED 40020df0: 01 00 00 00 nop <== NOT EXECUTED 40020df4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020df8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); 40020dfc: 40 00 42 cd call 40031930 <__errno> <== NOT EXECUTED 40020e00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020e04: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40020e08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40020e0c: 81 c7 e0 08 ret <== NOT EXECUTED 40020e10: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 40020e14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020e18: 02 80 00 04 be 40020e28 <== NOT EXECUTED 40020e1c: 01 00 00 00 nop <== NOT EXECUTED 40020e20: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020e24: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020e28: 40 00 42 c2 call 40031930 <__errno> <== NOT EXECUTED 40020e2c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020e30: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40020e34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40020e38: 81 c7 e0 08 ret <== NOT EXECUTED 40020e3c: 81 e8 00 00 restore <== NOT EXECUTED 400052f0 : int chmod( const char *path, mode_t mode ) { 400052f0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 400052f4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400052f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400052fc: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40005300: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 40005304: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40005308: 40 00 00 9b call 40005574 <== NOT EXECUTED 4000530c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( status != 0 ) 40005310: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005314: 12 80 00 16 bne 4000536c <== NOT EXECUTED 40005318: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers ){ 4000531c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005320: 22 80 00 25 be,a 400053b4 <== NOT EXECUTED 40005324: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 40005328: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000532c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005330: 02 80 00 11 be 40005374 <== NOT EXECUTED 40005334: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 40005338: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000533c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005340: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40005344: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005348: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000534c: 02 80 00 08 be 4000536c <== NOT EXECUTED 40005350: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40005354: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40005358: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000535c: 02 80 00 23 be 400053e8 <== NOT EXECUTED 40005360: 01 00 00 00 nop <== NOT EXECUTED 40005364: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005368: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 4000536c: 81 c7 e0 08 ret <== NOT EXECUTED 40005370: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 40005374: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005378: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000537c: 02 80 00 08 be 4000539c <== NOT EXECUTED 40005380: 01 00 00 00 nop <== NOT EXECUTED 40005384: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40005388: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000538c: 02 80 00 04 be 4000539c <== NOT EXECUTED 40005390: 01 00 00 00 nop <== NOT EXECUTED 40005394: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005398: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000539c: 40 00 b1 65 call 40031930 <__errno> <== NOT EXECUTED 400053a0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400053a4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400053a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400053ac: 81 c7 e0 08 ret <== NOT EXECUTED 400053b0: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 400053b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400053b8: 02 80 00 08 be 400053d8 <== NOT EXECUTED 400053bc: 01 00 00 00 nop <== NOT EXECUTED 400053c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400053c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400053c8: 02 80 00 04 be 400053d8 <== NOT EXECUTED 400053cc: 01 00 00 00 nop <== NOT EXECUTED 400053d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400053d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 400053d8: 40 00 b1 56 call 40031930 <__errno> <== NOT EXECUTED 400053dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400053e0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400053e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400053e8: 81 c7 e0 08 ret <== NOT EXECUTED 400053ec: 81 e8 00 00 restore <== NOT EXECUTED 40020e40 : int chown( const char *path, uid_t owner, gid_t group ) { 40020e40: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 40020e44: 92 10 20 00 clr %o1 <== NOT EXECUTED 40020e48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020e4c: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40020e50: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 40020e54: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40020e58: 7f ff 91 c7 call 40005574 <== NOT EXECUTED 40020e5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020e60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020e64: 12 80 00 15 bne 40020eb8 <== NOT EXECUTED 40020e68: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED return -1; if ( !loc.ops->chown_h ) { 40020e6c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 40020e70: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40020e74: 02 80 00 13 be 40020ec0 <== NOT EXECUTED 40020e78: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 40020e7c: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 40020e80: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40020e84: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED 40020e88: 9f c0 80 00 call %g2 <== NOT EXECUTED 40020e8c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40020e90: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40020e94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020e98: 02 80 00 08 be 40020eb8 <== NOT EXECUTED 40020e9c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40020ea0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020ea4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020ea8: 02 80 00 10 be 40020ee8 <== NOT EXECUTED 40020eac: 01 00 00 00 nop <== NOT EXECUTED 40020eb0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020eb4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 40020eb8: 81 c7 e0 08 ret <== NOT EXECUTED 40020ebc: 81 e8 00 00 restore <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 40020ec0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020ec4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020ec8: 02 80 00 04 be 40020ed8 <== NOT EXECUTED 40020ecc: 01 00 00 00 nop <== NOT EXECUTED 40020ed0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020ed4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020ed8: 40 00 42 96 call 40031930 <__errno> <== NOT EXECUTED 40020edc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020ee0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40020ee4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40020ee8: 81 c7 e0 08 ret <== NOT EXECUTED 40020eec: 81 e8 00 00 restore <== NOT EXECUTED 40020ef0 : #include int chroot( const char *pathname ) { 40020ef0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 40020ef4: 23 10 01 29 sethi %hi(0x4004a400), %l1 <== NOT EXECUTED 40020ef8: e0 04 60 e4 ld [ %l1 + 0xe4 ], %l0 ! 4004a4e4 <== NOT EXECUTED 40020efc: 03 10 01 7b sethi %hi(0x4005ec00), %g1 <== NOT EXECUTED 40020f00: 82 10 63 30 or %g1, 0x330, %g1 ! 4005ef30 <== NOT EXECUTED 40020f04: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40020f08: 02 80 00 24 be 40020f98 <== NOT EXECUTED 40020f0c: 01 00 00 00 nop <== NOT EXECUTED rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 40020f10: 7f ff ff 87 call 40020d2c <== NOT EXECUTED 40020f14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (result) { 40020f18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020f1c: 12 80 00 2b bne 40020fc8 <== NOT EXECUTED 40020f20: 11 10 01 14 sethi %hi(0x40045000), %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40020f24: 92 10 20 00 clr %o1 <== NOT EXECUTED 40020f28: 90 12 21 80 or %o0, 0x180, %o0 <== NOT EXECUTED 40020f2c: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED 40020f30: 7f ff 91 91 call 40005574 <== NOT EXECUTED 40020f34: 96 10 20 00 clr %o3 <== NOT EXECUTED 40020f38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020f3c: 12 80 00 23 bne 40020fc8 <== NOT EXECUTED 40020f40: d0 04 60 e4 ld [ %l1 + 0xe4 ], %o0 <== NOT EXECUTED /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 40020f44: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED 40020f48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020f4c: 22 80 00 09 be,a 40020f70 <== NOT EXECUTED 40020f50: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40020f54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020f58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020f5c: 22 80 00 05 be,a 40020f70 <== NOT EXECUTED 40020f60: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40020f64: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020f68: 90 02 20 14 add %o0, 0x14, %o0 <== NOT EXECUTED rtems_filesystem_root = loc; 40020f6c: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40020f70: c6 04 60 e4 ld [ %l1 + 0xe4 ], %g3 <== NOT EXECUTED 40020f74: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] <== NOT EXECUTED 40020f78: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 40020f7c: c4 20 e0 18 st %g2, [ %g3 + 0x18 ] <== NOT EXECUTED 40020f80: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40020f84: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED 40020f88: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 40020f8c: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] <== NOT EXECUTED return 0; } 40020f90: 81 c7 e0 08 ret <== NOT EXECUTED 40020f94: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 40020f98: 40 00 07 f0 call 40022f58 <== NOT EXECUTED 40020f9c: 01 00 00 00 nop <== NOT EXECUTED if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 40020fa0: c2 04 60 e4 ld [ %l1 + 0xe4 ], %g1 <== NOT EXECUTED 40020fa4: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 40020fa8: 12 bf ff da bne 40020f10 <== NOT EXECUTED 40020fac: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020fb0: 40 00 42 60 call 40031930 <__errno> <== NOT EXECUTED 40020fb4: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40020fb8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40020fbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40020fc0: 81 c7 e0 08 ret <== NOT EXECUTED 40020fc4: 81 e8 00 00 restore <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 40020fc8: 40 00 42 5a call 40031930 <__errno> <== NOT EXECUTED 40020fcc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020fd0: 40 00 42 58 call 40031930 <__errno> <== NOT EXECUTED 40020fd4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40020fd8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40020fdc: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 40020fe0: 81 c7 e0 08 ret <== NOT EXECUTED 40020fe4: 81 e8 00 00 restore <== NOT EXECUTED 4000a4cc : #include int close( int fd ) { 4000a4cc: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 4000a4d0: 03 10 00 5e sethi %hi(0x40017800), %g1 4000a4d4: c4 00 62 a8 ld [ %g1 + 0x2a8 ], %g2 ! 40017aa8 4000a4d8: 80 a6 00 02 cmp %i0, %g2 4000a4dc: 1a 80 00 23 bcc 4000a568 4000a4e0: 03 10 00 61 sethi %hi(0x40018400), %g1 iop = rtems_libio_iop(fd); 4000a4e4: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 ! 40018640 4000a4e8: 85 2e 20 02 sll %i0, 2, %g2 4000a4ec: 83 2e 20 04 sll %i0, 4, %g1 4000a4f0: 82 20 40 02 sub %g1, %g2, %g1 4000a4f4: 82 00 40 18 add %g1, %i0, %g1 4000a4f8: 83 28 60 02 sll %g1, 2, %g1 4000a4fc: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 4000a500: c4 06 20 0c ld [ %i0 + 0xc ], %g2 4000a504: 80 88 a1 00 btst 0x100, %g2 4000a508: 02 80 00 18 be 4000a568 4000a50c: 01 00 00 00 nop rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4000a510: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000a514: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000a518: 80 a0 60 00 cmp %g1, 0 4000a51c: 02 80 00 05 be 4000a530 4000a520: a0 10 20 00 clr %l0 rc = (*iop->handlers->close_h)( iop ); 4000a524: 9f c0 40 00 call %g1 4000a528: 90 10 00 18 mov %i0, %o0 4000a52c: a0 10 00 08 mov %o0, %l0 rtems_filesystem_freenode( &iop->pathinfo ); 4000a530: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000a534: 80 a0 60 00 cmp %g1, 0 4000a538: 02 80 00 08 be 4000a558 4000a53c: 01 00 00 00 nop 4000a540: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000a544: 80 a0 60 00 cmp %g1, 0 4000a548: 02 80 00 04 be 4000a558 4000a54c: 01 00 00 00 nop 4000a550: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a554: 90 06 20 10 add %i0, 0x10, %o0 <== NOT EXECUTED rtems_libio_free( iop ); 4000a558: 40 00 00 fc call 4000a948 4000a55c: 90 10 00 18 mov %i0, %o0 return rc; } 4000a560: 81 c7 e0 08 ret 4000a564: 91 e8 00 10 restore %g0, %l0, %o0 rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 4000a568: 40 00 09 49 call 4000ca8c <__errno> <== NOT EXECUTED 4000a56c: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED 4000a570: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4000a574: 10 bf ff fb b 4000a560 <== NOT EXECUTED 4000a578: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f0ec : * close a directory. */ int closedir( DIR *dirp ) { 4002f0ec: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int fd; if ( !dirp ) 4002f0f0: a0 96 20 00 orcc %i0, 0, %l0 <== NOT EXECUTED 4002f0f4: 02 80 00 0b be 4002f120 <== NOT EXECUTED 4002f0f8: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 4002f0fc: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 4002f100: f0 04 00 00 ld [ %l0 ], %i0 <== NOT EXECUTED dirp->dd_fd = -1; dirp->dd_loc = 0; 4002f104: c0 24 20 04 clr [ %l0 + 4 ] <== NOT EXECUTED (void)free((void *)dirp->dd_buf); 4002f108: 7f ff 59 79 call 400056ec <== NOT EXECUTED 4002f10c: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED (void)free((void *)dirp); 4002f110: 7f ff 59 77 call 400056ec <== NOT EXECUTED 4002f114: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return(close(fd)); 4002f118: 7f ff 58 b6 call 400053f0 <== NOT EXECUTED 4002f11c: 81 e8 00 00 restore <== NOT EXECUTED DIR *dirp ) { int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 4002f120: 40 00 0a 04 call 40031930 <__errno> <== NOT EXECUTED 4002f124: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002f128: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002f12c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); (void)free((void *)dirp); return(close(fd)); } 4002f130: 81 c7 e0 08 ret <== NOT EXECUTED 4002f134: 81 e8 00 00 restore <== NOT EXECUTED 4000c108 : */ int device_close( rtems_libio_t *iop ) { 4000c108: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000c10c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 4000c110: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 4000c114: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 4000c118: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 4000c11c: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 4000c120: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 4000c124: 94 07 bf ec add %fp, -20, %o2 4000c128: 40 00 01 47 call 4000c644 4000c12c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000c130: 80 a2 20 00 cmp %o0, 0 4000c134: 12 80 00 04 bne 4000c144 4000c138: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000c13c: 81 c7 e0 08 ret 4000c140: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000c144: 7f ff ff a1 call 4000bfc8 <== NOT EXECUTED 4000c148: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000c14c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c150: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000bfc0 : rtems_libio_t *iop, off_t length ) { return 0; } 4000bfc0: 81 c3 e0 08 retl <== NOT EXECUTED 4000bfc4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000bffc : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000bffc: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000c000: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4000c004: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 4000c008: f4 27 bf f0 st %i2, [ %fp + -16 ] <== NOT EXECUTED { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4000c00c: f0 27 bf e8 st %i0, [ %fp + -24 ] <== NOT EXECUTED args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000c010: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 4000c014: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 4000c018: 40 00 01 a1 call 4000c69c <== NOT EXECUTED 4000c01c: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c020: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c024: 12 80 00 05 bne 4000c038 <== NOT EXECUTED 4000c028: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; 4000c02c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 4000c030: 81 c7 e0 08 ret <== NOT EXECUTED 4000c034: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000c038: 7f ff ff e4 call 4000bfc8 <== NOT EXECUTED 4000c03c: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 4000c040: 81 c7 e0 08 ret <== NOT EXECUTED 4000c044: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000bfb8 : off_t offset, int whence ) { return offset; } 4000bfb8: 81 c3 e0 08 retl <== NOT EXECUTED 4000bfbc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000c154 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000c154: 9d e3 bf 88 save %sp, -120, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4000c158: c2 06 20 0c ld [ %i0 + 0xc ], %g1 { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000c15c: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 4000c160: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 4000c164: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 4000c168: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 4000c16c: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 4000c170: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 4000c174: 94 07 bf ec add %fp, -20, %o2 4000c178: 40 00 01 5f call 4000c6f4 4000c17c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c180: 80 a2 20 00 cmp %o0, 0 4000c184: 12 80 00 04 bne 4000c194 4000c188: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000c18c: 81 c7 e0 08 ret 4000c190: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000c194: 7f ff ff 8d call 4000bfc8 <== NOT EXECUTED 4000c198: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000c19c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c1a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c0a8 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000c0a8: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4000c0ac: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000c0b0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000c0b4: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4000c0b8: f2 27 bf e8 st %i1, [ %fp + -24 ] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000c0bc: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000c0c0: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 4000c0c4: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4000c0c8: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4000c0cc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 4000c0d0: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 4000c0d4: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 4000c0d8: 40 00 01 9d call 4000c74c <== NOT EXECUTED 4000c0dc: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c0e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c0e4: 12 80 00 05 bne 4000c0f8 <== NOT EXECUTED 4000c0e8: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000c0ec: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 4000c0f0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c0f4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000c0f8: 7f ff ff b4 call 4000bfc8 <== NOT EXECUTED 4000c0fc: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000c100: 81 c7 e0 08 ret <== NOT EXECUTED 4000c104: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c048 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000c048: 9d e3 bf 80 save %sp, -128, %sp args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4000c04c: c4 06 20 0c ld [ %i0 + 0xc ], %g2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000c050: c2 06 20 08 ld [ %i0 + 8 ], %g1 { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000c054: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4000c058: f2 27 bf e8 st %i1, [ %fp + -24 ] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000c05c: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 4000c060: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 4000c064: c4 27 bf f0 st %g2, [ %fp + -16 ] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4000c068: f0 27 bf e0 st %i0, [ %fp + -32 ] args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4000c06c: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 4000c070: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 4000c074: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 4000c078: 40 00 01 cb call 4000c7a4 4000c07c: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c080: 80 a2 20 00 cmp %o0, 0 4000c084: 12 80 00 05 bne 4000c098 4000c088: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000c08c: d0 07 bf f4 ld [ %fp + -12 ], %o0 } 4000c090: 81 c7 e0 08 ret 4000c094: 91 e8 00 08 restore %g0, %o0, %o0 the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000c098: 7f ff ff cc call 4000bfc8 <== NOT EXECUTED 4000c09c: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000c0a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c0a4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003db4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40003db4: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40003db8: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40003dbc: 80 a0 60 00 cmp %g1, 0 40003dc0: 12 80 00 04 bne 40003dd0 40003dc4: 01 00 00 00 nop 40003dc8: 81 c7 e0 08 ret 40003dcc: 81 e8 00 00 restore rtems_interrupt_disable (level); 40003dd0: 7f ff f7 d4 call 40001d20 <== NOT EXECUTED 40003dd4: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40003dd8: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40003ddc: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003de0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003de4: 02 80 00 14 be 40003e34 <== NOT EXECUTED 40003de8: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40003dec: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED 40003df0: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40003df4: 7f ff f7 cf call 40001d30 <== NOT EXECUTED 40003df8: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40003dfc: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40003e00: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003e04: 40 00 06 55 call 40005758 <== NOT EXECUTED 40003e08: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40003e0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003e10: 12 80 00 0b bne 40003e3c <== NOT EXECUTED 40003e14: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 40003e18: 7f ff f7 c2 call 40001d20 <== NOT EXECUTED 40003e1c: 01 00 00 00 nop <== 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) { 40003e20: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40003e24: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003e28: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003e2c: 32 bf ff f2 bne,a 40003df4 <== NOT EXECUTED 40003e30: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 40003e34: 7f ff f7 bf call 40001d30 <== NOT EXECUTED 40003e38: 91 e8 00 08 restore %g0, %o0, %o0 <== 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); 40003e3c: 40 00 08 08 call 40005e5c <== NOT EXECUTED 40003e40: 01 00 00 00 nop 40003e44: 01 00 00 00 nop 400037fc : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 400037fc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40003800: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003804: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003808: 02 80 00 0d be 4000383c <== NOT EXECUTED 4000380c: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40003810: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED 40003814: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 ! 40018018 <__ctype_ptr> <== NOT EXECUTED 40003818: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 4000381c: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED 40003820: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003824: 02 80 00 06 be 4000383c <== NOT EXECUTED 40003828: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 4000382c: 02 80 00 04 be 4000383c <== NOT EXECUTED 40003830: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40003834: 12 80 00 06 bne 4000384c <== NOT EXECUTED 40003838: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4000383c: 7f ff ff 8f call 40003678 <== NOT EXECUTED 40003840: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003844: 81 c7 e0 08 ret <== NOT EXECUTED 40003848: 81 e8 00 00 restore <== 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] = '^'; 4000384c: 84 10 20 5e mov 0x5e, %g2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 40003850: c2 2f bf f1 stb %g1, [ %fp + -15 ] <== 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] = '^'; 40003854: c4 2f bf f0 stb %g2, [ %fp + -16 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 40003858: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4000385c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003860: 7f ff ff 38 call 40003540 <== NOT EXECUTED 40003864: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40003868: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 4000386c: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 40003870: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 40003874: 81 c7 e0 08 ret <== NOT EXECUTED 40003878: 81 e8 00 00 restore <== NOT EXECUTED 40021b50 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40021b50: 03 10 01 78 sethi %hi(0x4005e000), %g1 <== NOT EXECUTED 40021b54: d0 00 61 9c ld [ %g1 + 0x19c ], %o0 ! 4005e19c <== NOT EXECUTED 40021b58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021b5c: 02 80 00 05 be 40021b70 <== NOT EXECUTED 40021b60: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40021b64: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40021b68: 40 00 3f ca call 40031a90 <== NOT EXECUTED 40021b6c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40021b70: 81 c3 e0 08 retl <== NOT EXECUTED 40021b74: 01 00 00 00 nop 40021b78 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40021b78: 03 10 01 78 sethi %hi(0x4005e000), %g1 <== NOT EXECUTED 40021b7c: d0 00 60 b4 ld [ %g1 + 0xb4 ], %o0 ! 4005e0b4 <== NOT EXECUTED 40021b80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021b84: 02 80 00 05 be 40021b98 <== NOT EXECUTED 40021b88: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 40021b8c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40021b90: 40 00 3f c0 call 40031a90 <== NOT EXECUTED 40021b94: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40021b98: 81 c3 e0 08 retl <== NOT EXECUTED 40021b9c: 01 00 00 00 nop 4000387c : * 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) { 4000387c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 40003880: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 <== NOT EXECUTED 40003884: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40003888: 02 80 00 80 be 40003a88 <== NOT EXECUTED 4000388c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 40003890: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003894: 12 80 00 28 bne 40003934 <== NOT EXECUTED 40003898: c8 06 20 3c ld [ %i0 + 0x3c ], %g4 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 4000389c: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED 400038a0: 05 10 00 5b sethi %hi(0x40016c00), %g2 <== NOT EXECUTED 400038a4: a4 10 60 18 or %g1, 0x18, %l2 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 400038a8: a6 10 a2 10 or %g2, 0x210, %l3 <== NOT EXECUTED 400038ac: 03 10 00 5b sethi %hi(0x40016c00), %g1 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 400038b0: a2 10 62 08 or %g1, 0x208, %l1 ! 40016e08 <__func__.4755+0x2c0> <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 400038b4: da 04 20 1c ld [ %l0 + 0x1c ], %o5 <== NOT EXECUTED 400038b8: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 400038bc: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 400038c0: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 400038c4: 02 80 00 13 be 40003910 <== NOT EXECUTED 400038c8: c2 0b 40 03 ldub [ %o5 + %g3 ], %g1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 400038cc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400038d0: 12 80 00 05 bne 400038e4 <== NOT EXECUTED 400038d4: b0 08 60 ff and %g1, 0xff, %i0 <== NOT EXECUTED 400038d8: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED 400038dc: 22 80 00 6d be,a 40003a90 <== NOT EXECUTED 400038e0: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 400038e4: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED 400038e8: 02 80 00 3f be 400039e4 <== NOT EXECUTED 400038ec: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 400038f0: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400038f4: c4 08 40 18 ldub [ %g1 + %i0 ], %g2 <== NOT EXECUTED 400038f8: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 400038fc: 02 80 00 2f be 400039b8 <== NOT EXECUTED 40003900: 11 10 00 5b sethi %hi(0x40016c00), %o0 <== NOT EXECUTED 40003904: 80 89 22 00 btst 0x200, %g4 <== NOT EXECUTED 40003908: 12 80 00 1a bne 40003970 <== NOT EXECUTED 4000390c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003910: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003914: 02 80 00 5d be 40003a88 <== NOT EXECUTED 40003918: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 4000391c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 40003920: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40003924: 02 80 00 59 be 40003a88 <== NOT EXECUTED 40003928: 01 00 00 00 nop <== NOT EXECUTED 4000392c: 10 bf ff e2 b 400038b4 <== NOT EXECUTED 40003930: c8 04 20 3c ld [ %l0 + 0x3c ], %g4 <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 40003934: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 40003938: 02 80 00 53 be 40003a84 <== NOT EXECUTED 4000393c: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 40003940: 12 bf ff d8 bne 400038a0 <== NOT EXECUTED 40003944: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40003948: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 4000394c: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40003950: 7f ff ff ab call 400037fc <== NOT EXECUTED 40003954: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40003958: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 4000395c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003960: 02 80 00 4a be 40003a88 <== NOT EXECUTED 40003964: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 40003968: 7f ff ff a5 call 400037fc <== NOT EXECUTED 4000396c: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40003970: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003974: 7f ff fe f3 call 40003540 <== NOT EXECUTED 40003978: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 4000397c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003980: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003984: 22 80 00 05 be,a 40003998 <== NOT EXECUTED 40003988: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED tty->column--; 4000398c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003990: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40003994: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 40003998: c4 08 40 18 ldub [ %g1 + %i0 ], %g2 <== NOT EXECUTED 4000399c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 400039a0: 02 80 00 06 be 400039b8 <== NOT EXECUTED 400039a4: 11 10 00 5b sethi %hi(0x40016c00), %o0 <== NOT EXECUTED 400039a8: c8 04 20 3c ld [ %l0 + 0x3c ], %g4 <== NOT EXECUTED 400039ac: 80 89 22 00 btst 0x200, %g4 <== NOT EXECUTED 400039b0: 02 bf ff d9 be 40003914 <== NOT EXECUTED 400039b4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 400039b8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 400039bc: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 400039c0: 7f ff fe e0 call 40003540 <== NOT EXECUTED 400039c4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 400039c8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 400039cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400039d0: 02 bf ff d1 be 40003914 <== NOT EXECUTED 400039d4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 400039d8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400039dc: 10 bf ff ce b 40003914 <== NOT EXECUTED 400039e0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 400039e4: 02 80 00 16 be 40003a3c <== NOT EXECUTED 400039e8: f0 04 20 2c ld [ %l0 + 0x2c ], %i0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 400039ec: d8 04 80 00 ld [ %l2 ], %o4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 400039f0: 88 09 22 00 and %g4, 0x200, %g4 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 400039f4: 10 80 00 07 b 40003a10 <== NOT EXECUTED 400039f8: 84 10 20 00 clr %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 400039fc: 32 80 00 02 bne,a 40003a04 <== NOT EXECUTED 40003a00: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003a04: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40003a08: 22 80 00 0e be,a 40003a40 <== NOT EXECUTED 40003a0c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 40003a10: c2 0b 40 02 ldub [ %o5 + %g2 ], %g1 <== NOT EXECUTED if (c == '\t') { 40003a14: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 40003a18: 02 80 00 18 be 40003a78 <== NOT EXECUTED 40003a1c: 84 00 a0 01 inc %g2 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 40003a20: c2 0b 00 01 ldub [ %o4 + %g1 ], %g1 <== NOT EXECUTED 40003a24: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003a28: 12 bf ff f5 bne 400039fc <== NOT EXECUTED 40003a2c: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003a30: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40003a34: 12 bf ff f7 bne 40003a10 <== NOT EXECUTED 40003a38: b0 06 20 01 inc %i0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003a3c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003a40: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40003a44: 04 bf ff b4 ble 40003914 <== NOT EXECUTED 40003a48: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40003a4c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003a50: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003a54: 7f ff fe bb call 40003540 <== NOT EXECUTED 40003a58: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 40003a5c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003a60: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003a64: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40003a68: 14 bf ff f9 bg 40003a4c <== NOT EXECUTED 40003a6c: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003a70: 10 bf ff a9 b 40003914 <== NOT EXECUTED 40003a74: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 40003a78: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 40003a7c: 10 bf ff e2 b 40003a04 <== NOT EXECUTED 40003a80: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 40003a84: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED 40003a88: 81 c7 e0 08 ret <== NOT EXECUTED 40003a8c: 81 e8 00 00 restore <== 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); 40003a90: 7f ff ff 5b call 400037fc <== NOT EXECUTED 40003a94: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED 40003a98: 01 00 00 00 nop 4002f138 : #include int fchdir( int fd ) { 4002f138: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 4002f13c: 03 10 01 26 sethi %hi(0x40049800), %g1 <== NOT EXECUTED 4002f140: c4 00 62 58 ld [ %g1 + 0x258 ], %g2 ! 40049a58 <== NOT EXECUTED 4002f144: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 4002f148: 1a 80 00 50 bcc 4002f288 <== NOT EXECUTED 4002f14c: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002f150: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4005e994 <== NOT EXECUTED 4002f154: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4002f158: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4002f15c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002f160: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4002f164: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002f168: b0 00 c0 01 add %g3, %g1, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002f16c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4002f170: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4002f174: 02 80 00 45 be 4002f288 <== NOT EXECUTED 4002f178: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4002f17c: 02 80 00 54 be 4002f2cc <== NOT EXECUTED 4002f180: 01 00 00 00 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4002f184: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4002f188: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002f18c: 02 80 00 56 be 4002f2e4 <== NOT EXECUTED 4002f190: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4002f194: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4002f198: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002f19c: 02 80 00 52 be 4002f2e4 <== NOT EXECUTED 4002f1a0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4002f1a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002f1a8: 90 06 20 10 add %i0, 0x10, %o0 <== NOT EXECUTED 4002f1ac: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4002f1b0: 12 80 00 30 bne 4002f270 <== NOT EXECUTED 4002f1b4: 21 10 01 29 sethi %hi(0x4004a400), %l0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4002f1b8: c6 04 20 e4 ld [ %l0 + 0xe4 ], %g3 ! 4004a4e4 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4002f1bc: 11 10 01 14 sethi %hi(0x40045000), %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4002f1c0: c4 00 e0 04 ld [ %g3 + 4 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4002f1c4: 90 12 21 80 or %o0, 0x180, %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4002f1c8: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4002f1cc: c2 00 e0 08 ld [ %g3 + 8 ], %g1 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4002f1d0: 92 10 20 00 clr %o1 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4002f1d4: c2 27 bf dc st %g1, [ %fp + -36 ] <== NOT EXECUTED 4002f1d8: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4002f1dc: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4002f1e0: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4002f1e4: c8 00 e0 10 ld [ %g3 + 0x10 ], %g4 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4002f1e8: 96 10 20 00 clr %o3 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4002f1ec: c8 27 bf e4 st %g4, [ %fp + -28 ] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4002f1f0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 4002f1f4: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 4002f1f8: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED 4002f1fc: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 4002f200: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4002f204: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 4002f208: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4002f20c: 7f ff 58 da call 40005574 <== NOT EXECUTED 4002f210: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED 4002f214: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002f218: 12 80 00 22 bne 4002f2a0 <== NOT EXECUTED 4002f21c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 4002f220: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002f224: 22 80 00 09 be,a 4002f248 <== NOT EXECUTED 4002f228: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 4002f22c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002f230: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002f234: 22 80 00 05 be,a 4002f248 <== NOT EXECUTED 4002f238: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 4002f23c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002f240: 90 07 bf d8 add %fp, -40, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4002f244: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 4002f248: c6 04 20 e4 ld [ %l0 + 0xe4 ], %g3 <== NOT EXECUTED 4002f24c: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 4002f250: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4002f254: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 4002f258: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4002f25c: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 4002f260: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 4002f264: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED return 0; } 4002f268: 81 c7 e0 08 ret <== NOT EXECUTED 4002f26c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 4002f270: 40 00 09 b0 call 40031930 <__errno> <== NOT EXECUTED 4002f274: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002f278: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 4002f27c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f280: 81 c7 e0 08 ret <== NOT EXECUTED 4002f284: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4002f288: 40 00 09 aa call 40031930 <__errno> <== NOT EXECUTED 4002f28c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002f290: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002f294: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f298: 81 c7 e0 08 ret <== NOT EXECUTED 4002f29c: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 4002f2a0: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED 4002f2a4: c6 04 20 e4 ld [ %l0 + 0xe4 ], %g3 <== NOT EXECUTED 4002f2a8: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 4002f2ac: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED 4002f2b0: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 4002f2b4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002f2b8: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 4002f2bc: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 4002f2c0: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED 4002f2c4: 81 c7 e0 08 ret <== NOT EXECUTED 4002f2c8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4002f2cc: 40 00 09 99 call 40031930 <__errno> <== NOT EXECUTED 4002f2d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002f2d4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002f2d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f2dc: 81 c7 e0 08 ret <== NOT EXECUTED 4002f2e0: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002f2e4: 40 00 09 93 call 40031930 <__errno> <== NOT EXECUTED 4002f2e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002f2ec: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002f2f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f2f4: 81 c7 e0 08 ret <== NOT EXECUTED 4002f2f8: 81 e8 00 00 restore <== NOT EXECUTED 40021250 : int fchmod( int fd, mode_t mode ) { 40021250: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40021254: 03 10 01 26 sethi %hi(0x40049800), %g1 <== NOT EXECUTED 40021258: c4 00 62 58 ld [ %g1 + 0x258 ], %g2 ! 40049a58 <== NOT EXECUTED 4002125c: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40021260: 1a 80 00 1b bcc 400212cc <== NOT EXECUTED 40021264: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40021268: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4005e994 <== NOT EXECUTED 4002126c: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40021270: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40021274: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40021278: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4002127c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40021280: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40021284: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 40021288: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4002128c: 02 80 00 10 be 400212cc <== NOT EXECUTED 40021290: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40021294: 02 80 00 14 be 400212e4 <== NOT EXECUTED 40021298: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 4002129c: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 <== NOT EXECUTED 400212a0: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 400212a4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400212a8: 02 80 00 15 be 400212fc <== NOT EXECUTED 400212ac: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 400212b0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 400212b4: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 400212b8: 90 00 e0 10 add %g3, 0x10, %o0 <== NOT EXECUTED 400212bc: 9f c0 80 00 call %g2 <== NOT EXECUTED 400212c0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 400212c4: 81 c7 e0 08 ret <== NOT EXECUTED 400212c8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 400212cc: 40 00 41 99 call 40031930 <__errno> <== NOT EXECUTED 400212d0: 01 00 00 00 nop <== NOT EXECUTED 400212d4: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400212d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400212dc: 10 bf ff fa b 400212c4 <== NOT EXECUTED 400212e0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400212e4: 40 00 41 93 call 40031930 <__errno> <== NOT EXECUTED 400212e8: 01 00 00 00 nop <== NOT EXECUTED 400212ec: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400212f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400212f4: 10 bf ff f4 b 400212c4 <== NOT EXECUTED 400212f8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400212fc: 40 00 41 8d call 40031930 <__errno> <== NOT EXECUTED 40021300: 01 00 00 00 nop <== NOT EXECUTED 40021304: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40021308: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002130c: 10 bf ff ee b 400212c4 <== NOT EXECUTED 40021310: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40021314 : int fchown( int fd, uid_t owner, gid_t group ) { 40021314: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40021318: 03 10 01 26 sethi %hi(0x40049800), %g1 <== NOT EXECUTED 4002131c: c4 00 62 58 ld [ %g1 + 0x258 ], %g2 ! 40049a58 <== NOT EXECUTED 40021320: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40021324: 1a 80 00 1b bcc 40021390 <== NOT EXECUTED 40021328: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002132c: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4005e994 <== NOT EXECUTED 40021330: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40021334: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40021338: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002133c: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 40021340: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40021344: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40021348: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 4002134c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40021350: 02 80 00 10 be 40021390 <== NOT EXECUTED 40021354: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40021358: 02 80 00 14 be 400213a8 <== NOT EXECUTED 4002135c: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 40021360: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40021364: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40021368: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002136c: 02 80 00 15 be 400213c0 <== NOT EXECUTED 40021370: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 40021374: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 40021378: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 4002137c: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40021380: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021384: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 40021388: 81 c7 e0 08 ret <== NOT EXECUTED 4002138c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40021390: 40 00 41 68 call 40031930 <__errno> <== NOT EXECUTED 40021394: 01 00 00 00 nop <== NOT EXECUTED 40021398: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4002139c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400213a0: 10 bf ff fa b 40021388 <== NOT EXECUTED 400213a4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400213a8: 40 00 41 62 call 40031930 <__errno> <== NOT EXECUTED 400213ac: 01 00 00 00 nop <== NOT EXECUTED 400213b0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400213b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400213b8: 10 bf ff f4 b 40021388 <== NOT EXECUTED 400213bc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400213c0: 40 00 41 5c call 40031930 <__errno> <== NOT EXECUTED 400213c4: 01 00 00 00 nop <== NOT EXECUTED 400213c8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400213cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400213d0: 10 bf ff ee b 40021388 <== NOT EXECUTED 400213d4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4002f324 : int fcntl( int fd, int cmd, ... ) { 4002f324: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4002f328: 03 10 01 26 sethi %hi(0x40049800), %g1 <== NOT EXECUTED 4002f32c: c8 00 62 58 ld [ %g1 + 0x258 ], %g4 ! 40049a58 <== NOT EXECUTED ... ) { int ret; va_list ap; va_start( ap, cmd ); 4002f330: 90 07 a0 4c add %fp, 0x4c, %o0 <== NOT EXECUTED 4002f334: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 4002f338: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 4002f33c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 4002f340: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4002f344: 80 a6 00 04 cmp %i0, %g4 <== NOT EXECUTED 4002f348: 1a 80 00 7c bcc 4002f538 <== NOT EXECUTED 4002f34c: d0 27 bf f4 st %o0, [ %fp + -12 ] <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002f350: 39 10 01 7a sethi %hi(0x4005e800), %i4 <== NOT EXECUTED 4002f354: da 07 21 94 ld [ %i4 + 0x194 ], %o5 ! 4005e994 <== NOT EXECUTED 4002f358: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4002f35c: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4002f360: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002f364: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4002f368: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002f36c: ba 03 40 01 add %o5, %g1, %i5 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002f370: d8 07 60 0c ld [ %i5 + 0xc ], %o4 <== NOT EXECUTED 4002f374: 80 8b 21 00 btst 0x100, %o4 <== NOT EXECUTED 4002f378: 02 80 00 70 be 4002f538 <== NOT EXECUTED 4002f37c: 80 a6 60 09 cmp %i1, 9 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4002f380: 08 80 00 08 bleu 4002f3a0 <== NOT EXECUTED 4002f384: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 4002f388: 40 00 09 6a call 40031930 <__errno> <== NOT EXECUTED 4002f38c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002f390: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002f394: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f398: 81 c7 e0 08 ret <== NOT EXECUTED 4002f39c: 81 e8 00 00 restore <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4002f3a0: 05 10 00 bc sethi %hi(0x4002f000), %g2 <== NOT EXECUTED 4002f3a4: 84 10 a2 fc or %g2, 0x2fc, %g2 ! 4002f2fc <== NOT EXECUTED 4002f3a8: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4002f3ac: 81 c0 c0 00 jmp %g3 <== NOT EXECUTED 4002f3b0: 01 00 00 00 nop <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4002f3b4: 40 00 09 5f call 40031930 <__errno> <== NOT EXECUTED 4002f3b8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4002f3bc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002f3c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f3c4: 81 c7 e0 08 ret <== NOT EXECUTED 4002f3c8: 81 e8 00 00 restore <== NOT EXECUTED case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 4002f3cc: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 4002f3d0: 7f ff 59 ff call 40005bcc <== NOT EXECUTED 4002f3d4: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 4002f3d8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 4002f3dc: 90 0a 22 01 and %o0, 0x201, %o0 <== NOT EXECUTED 4002f3e0: 82 08 7d fe and %g1, -514, %g1 <== NOT EXECUTED 4002f3e4: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4002f3e8: d0 27 60 0c st %o0, [ %i5 + 0xc ] <== NOT EXECUTED * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 4002f3ec: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED 4002f3f0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED 4002f3f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002f3f8: 02 bf ff e8 be 4002f398 <== NOT EXECUTED 4002f3fc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4002f400: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002f404: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if (err) { 4002f408: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED 4002f40c: 12 80 00 04 bne 4002f41c <== NOT EXECUTED 4002f410: 01 00 00 00 nop <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4002f414: 81 c7 e0 08 ret <== NOT EXECUTED 4002f418: 81 e8 00 00 restore <== NOT EXECUTED if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 4002f41c: 40 00 09 45 call 40031930 <__errno> <== NOT EXECUTED 4002f420: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002f424: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4002f428: 81 c7 e0 08 ret <== NOT EXECUTED 4002f42c: 81 e8 00 00 restore <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 4002f430: 7f ff 59 39 call 40005914 <== NOT EXECUTED 4002f434: 90 10 00 0c mov %o4, %o0 <== NOT EXECUTED 4002f438: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 4002f43c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4002f440: 36 bf ff ec bge,a 4002f3f0 <== NOT EXECUTED 4002f444: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4002f448: 81 c7 e0 08 ret <== NOT EXECUTED 4002f44c: 81 e8 00 00 restore <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 4002f450: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4002f454: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002f458: 02 80 00 2d be 4002f50c <== NOT EXECUTED 4002f45c: 82 0b 37 ff and %o4, -2049, %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 4002f460: 82 13 28 00 or %o4, 0x800, %g1 <== NOT EXECUTED 4002f464: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002f468: 10 bf ff e1 b 4002f3ec <== NOT EXECUTED 4002f46c: c2 27 60 0c st %g1, [ %i5 + 0xc ] <== NOT EXECUTED diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 4002f470: 83 33 20 0b srl %o4, 0xb, %g1 <== NOT EXECUTED 4002f474: 10 bf ff de b 4002f3ec <== NOT EXECUTED 4002f478: b0 08 60 01 and %g1, 1, %i0 <== NOT EXECUTED * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 4002f47c: c6 02 00 00 ld [ %o0 ], %g3 <== NOT EXECUTED if ( fd2 ) 4002f480: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4002f484: 02 80 00 33 be 4002f550 <== NOT EXECUTED 4002f488: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED diop = rtems_libio_iop( fd2 ); 4002f48c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002f490: 18 80 00 22 bgu 4002f518 <== NOT EXECUTED 4002f494: 96 10 20 00 clr %o3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4002f498: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4002f49c: c6 07 60 2c ld [ %i5 + 0x2c ], %g3 <== NOT EXECUTED diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4002f4a0: c2 22 20 10 st %g1, [ %o0 + 0x10 ] <== NOT EXECUTED 4002f4a4: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 <== NOT EXECUTED ret = (int) (diop - rtems_libio_iops); 4002f4a8: c8 07 21 94 ld [ %i4 + 0x194 ], %g4 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4002f4ac: c4 22 20 14 st %g2, [ %o0 + 0x14 ] <== NOT EXECUTED 4002f4b0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 4002f4b4: da 07 60 30 ld [ %i5 + 0x30 ], %o5 <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4002f4b8: c2 22 20 18 st %g1, [ %o0 + 0x18 ] <== NOT EXECUTED 4002f4bc: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 <== NOT EXECUTED ret = (int) (diop - rtems_libio_iops); 4002f4c0: 88 22 c0 04 sub %o3, %g4, %g4 <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4002f4c4: c6 22 20 2c st %g3, [ %o0 + 0x2c ] <== NOT EXECUTED diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 4002f4c8: 89 39 20 02 sra %g4, 2, %g4 <== NOT EXECUTED 4002f4cc: 87 29 20 02 sll %g4, 2, %g3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4002f4d0: c4 22 20 1c st %g2, [ %o0 + 0x1c ] <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 4002f4d4: da 22 20 30 st %o5, [ %o0 + 0x30 ] <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 4002f4d8: 85 29 20 06 sll %g4, 6, %g2 <== NOT EXECUTED } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; 4002f4dc: d8 22 20 0c st %o4, [ %o0 + 0xc ] <== NOT EXECUTED diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 4002f4e0: 84 20 80 03 sub %g2, %g3, %g2 <== NOT EXECUTED 4002f4e4: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 4002f4e8: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002f4ec: 87 28 60 0c sll %g1, 0xc, %g3 <== NOT EXECUTED 4002f4f0: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED 4002f4f4: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 4002f4f8: 83 28 60 04 sll %g1, 4, %g1 <== NOT EXECUTED 4002f4fc: 82 20 40 04 sub %g1, %g4, %g1 <== NOT EXECUTED 4002f500: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002f504: 10 bf ff ce b 4002f43c <== NOT EXECUTED 4002f508: b0 21 00 01 sub %g4, %g1, %i0 <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 4002f50c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002f510: 10 bf ff b7 b 4002f3ec <== NOT EXECUTED 4002f514: c2 27 60 0c st %g1, [ %i5 + 0xc ] <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 4002f518: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 4002f51c: 83 28 e0 04 sll %g3, 4, %g1 <== NOT EXECUTED 4002f520: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002f524: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED 4002f528: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002f52c: 90 03 40 01 add %o5, %g1, %o0 <== NOT EXECUTED 4002f530: 10 bf ff da b 4002f498 <== NOT EXECUTED 4002f534: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4002f538: 40 00 08 fe call 40031930 <__errno> <== NOT EXECUTED 4002f53c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002f540: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002f544: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f548: 81 c7 e0 08 ret <== NOT EXECUTED 4002f54c: 81 e8 00 00 restore <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 4002f550: 7f ff 59 61 call 40005ad4 <== NOT EXECUTED 4002f554: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( diop == 0 ) { 4002f558: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002f55c: 02 bf ff 8f be 4002f398 <== NOT EXECUTED 4002f560: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 4002f564: 10 bf ff cd b 4002f498 <== NOT EXECUTED 4002f568: d8 07 60 0c ld [ %i5 + 0xc ], %o4 <== NOT EXECUTED 400239b8 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 400239b8: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED 400239bc: c4 00 62 38 ld [ %g1 + 0x238 ], %g2 ! 4005ea38 <== NOT EXECUTED 400239c0: 82 10 62 38 or %g1, 0x238, %g1 <== NOT EXECUTED 400239c4: 86 00 60 04 add %g1, 4, %g3 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 400239c8: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 400239cc: 02 80 00 10 be 40023a0c <== NOT EXECUTED 400239d0: 01 00 00 00 nop <== NOT EXECUTED the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 400239d4: d2 02 60 0c ld [ %o1 + 0xc ], %o1 <== NOT EXECUTED 400239d8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED 400239dc: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 400239e0: 32 80 00 08 bne,a 40023a00 <== NOT EXECUTED 400239e4: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 400239e8: 81 c3 e0 08 retl <== NOT EXECUTED 400239ec: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 400239f0: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 400239f4: 02 80 00 08 be 40023a14 <== NOT EXECUTED 400239f8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 400239fc: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40023a00: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 40023a04: 32 bf ff fb bne,a 400239f0 <== NOT EXECUTED 40023a08: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED return true; } } return false; } 40023a0c: 81 c3 e0 08 retl <== NOT EXECUTED 40023a10: 90 10 20 00 clr %o0 <== NOT EXECUTED 40023a14: 81 c3 e0 08 retl <== NOT EXECUTED 40023a18: 01 00 00 00 nop 4000a590 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000a590: 9d e3 bf 98 save %sp, -104, %sp 4000a594: 05 10 00 61 sethi %hi(0x40018400), %g2 4000a598: 84 10 a2 a8 or %g2, 0x2a8, %g2 ! 400186a8 4000a59c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000a5a0: b2 10 00 18 mov %i0, %i1 4000a5a4: 82 00 60 01 inc %g1 if ( !ptr ) 4000a5a8: 80 a6 20 00 cmp %i0, 0 4000a5ac: 02 80 00 15 be 4000a600 4000a5b0: c2 20 a0 0c st %g1, [ %g2 + 0xc ] /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000a5b4: 03 10 00 62 sethi %hi(0x40018800), %g1 4000a5b8: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 ! 400189c4 <_System_state_Current> 4000a5bc: 80 a0 a0 03 cmp %g2, 3 4000a5c0: 02 80 00 17 be 4000a61c 4000a5c4: 03 10 00 61 sethi %hi(0x40018400), %g1 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000a5c8: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 ! 400184c4 4000a5cc: 80 a0 60 00 cmp %g1, 0 4000a5d0: 02 80 00 06 be 4000a5e8 4000a5d4: 37 10 00 61 sethi %hi(0x40018400), %i3 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000a5d8: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000a5dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a5e0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 4000a5e4: 37 10 00 61 sethi %hi(0x40018400), %i3 <== NOT EXECUTED 4000a5e8: 92 10 00 19 mov %i1, %o1 4000a5ec: 40 00 05 25 call 4000ba80 <_Protected_heap_Free> 4000a5f0: 90 16 e2 50 or %i3, 0x250, %o0 4000a5f4: 80 8a 20 ff btst 0xff, %o0 4000a5f8: 02 80 00 04 be 4000a608 4000a5fc: 82 16 e2 50 or %i3, 0x250, %g1 4000a600: 81 c7 e0 08 ret 4000a604: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000a608: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000a60c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000a610: 31 10 00 5c sethi %hi(0x40017000), %i0 <== NOT EXECUTED 4000a614: 7f ff e2 2e call 40002ecc <== NOT EXECUTED 4000a618: 91 ee 21 18 restore %i0, 0x118, %o0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000a61c: 40 00 01 2d call 4000aad0 4000a620: 01 00 00 00 nop 4000a624: 80 8a 20 ff btst 0xff, %o0 4000a628: 12 bf ff e8 bne 4000a5c8 4000a62c: 03 10 00 61 sethi %hi(0x40018400), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000a630: 40 00 01 3b call 4000ab1c <== NOT EXECUTED 4000a634: 81 e8 00 00 restore <== NOT EXECUTED 4000a638: 01 00 00 00 nop 40022e2c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 40022e2c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 40022e30: 03 10 01 7b sethi %hi(0x4005ec00), %g1 <== NOT EXECUTED 40022e34: 82 10 63 30 or %g1, 0x330, %g1 ! 4005ef30 <== NOT EXECUTED 40022e38: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40022e3c: 02 80 00 18 be 40022e9c <== NOT EXECUTED 40022e40: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 40022e44: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40022e48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022e4c: 22 80 00 09 be,a 40022e70 <== NOT EXECUTED 40022e50: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40022e54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022e58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022e5c: 22 80 00 05 be,a 40022e70 <== NOT EXECUTED 40022e60: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40022e64: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022e68: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 40022e6c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40022e70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022e74: 02 80 00 08 be 40022e94 <== NOT EXECUTED 40022e78: 01 00 00 00 nop <== NOT EXECUTED 40022e7c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022e80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022e84: 02 80 00 04 be 40022e94 <== NOT EXECUTED 40022e88: 01 00 00 00 nop <== NOT EXECUTED 40022e8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022e90: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 40022e94: 7f ff 8a 16 call 400056ec <== NOT EXECUTED 40022e98: 81 e8 00 00 restore <== NOT EXECUTED 40022e9c: 81 c7 e0 08 ret <== NOT EXECUTED 40022ea0: 81 e8 00 00 restore <== NOT EXECUTED 40015c4c : int fstat( int fd, struct stat *sbuf ) { 40015c4c: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40015c50: 92 96 60 00 orcc %i1, 0, %o1 40015c54: 02 80 00 3f be 40015d50 40015c58: 03 10 00 5e sethi %hi(0x40017800), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 40015c5c: c4 00 62 a8 ld [ %g1 + 0x2a8 ], %g2 ! 40017aa8 40015c60: 80 a6 00 02 cmp %i0, %g2 40015c64: 1a 80 00 2f bcc 40015d20 40015c68: 03 10 00 61 sethi %hi(0x40018400), %g1 40015c6c: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 ! 40018640 40015c70: 85 2e 20 02 sll %i0, 2, %g2 40015c74: 83 2e 20 04 sll %i0, 4, %g1 40015c78: 82 20 40 02 sub %g1, %g2, %g1 40015c7c: 82 00 40 18 add %g1, %i0, %g1 40015c80: 83 28 60 02 sll %g1, 2, %g1 40015c84: 86 00 c0 01 add %g3, %g1, %g3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 40015c88: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 40015c8c: 80 88 a1 00 btst 0x100, %g2 40015c90: 02 80 00 24 be 40015d20 40015c94: 01 00 00 00 nop if ( !iop->handlers ) 40015c98: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 40015c9c: 80 a0 60 00 cmp %g1, 0 40015ca0: 02 80 00 20 be 40015d20 40015ca4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 40015ca8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40015cac: 80 a0 60 00 cmp %g1, 0 40015cb0: 02 80 00 22 be 40015d38 40015cb4: 01 00 00 00 nop /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 40015cb8: c0 22 40 00 clr [ %o1 ] 40015cbc: c0 22 60 04 clr [ %o1 + 4 ] 40015cc0: c0 22 60 08 clr [ %o1 + 8 ] 40015cc4: c0 22 60 0c clr [ %o1 + 0xc ] 40015cc8: c0 22 60 10 clr [ %o1 + 0x10 ] 40015ccc: c0 22 60 14 clr [ %o1 + 0x14 ] 40015cd0: c0 22 60 18 clr [ %o1 + 0x18 ] 40015cd4: c0 22 60 1c clr [ %o1 + 0x1c ] 40015cd8: c0 22 60 20 clr [ %o1 + 0x20 ] 40015cdc: c0 22 60 24 clr [ %o1 + 0x24 ] 40015ce0: c0 22 60 28 clr [ %o1 + 0x28 ] 40015ce4: c0 22 60 2c clr [ %o1 + 0x2c ] 40015ce8: c0 22 60 30 clr [ %o1 + 0x30 ] 40015cec: c0 22 60 34 clr [ %o1 + 0x34 ] 40015cf0: c0 22 60 38 clr [ %o1 + 0x38 ] 40015cf4: c0 22 60 3c clr [ %o1 + 0x3c ] 40015cf8: c0 22 60 40 clr [ %o1 + 0x40 ] 40015cfc: c0 22 60 44 clr [ %o1 + 0x44 ] 40015d00: c0 22 60 48 clr [ %o1 + 0x48 ] 40015d04: c0 22 60 4c clr [ %o1 + 0x4c ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 40015d08: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 40015d0c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40015d10: 9f c0 80 00 call %g2 40015d14: 90 00 e0 10 add %g3, 0x10, %o0 } 40015d18: 81 c7 e0 08 ret 40015d1c: 91 e8 00 08 restore %g0, %o0, %o0 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 ); 40015d20: 7f ff db 5b call 4000ca8c <__errno> <== NOT EXECUTED 40015d24: 01 00 00 00 nop <== NOT EXECUTED 40015d28: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40015d2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015d30: 10 bf ff fa b 40015d18 <== NOT EXECUTED 40015d34: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015d38: 7f ff db 55 call 4000ca8c <__errno> <== NOT EXECUTED 40015d3c: 01 00 00 00 nop <== NOT EXECUTED 40015d40: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40015d44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015d48: 10 bf ff f4 b 40015d18 <== NOT EXECUTED 40015d4c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 40015d50: 7f ff db 4f call 4000ca8c <__errno> <== NOT EXECUTED 40015d54: 01 00 00 00 nop <== NOT EXECUTED 40015d58: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED 40015d5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015d60: 10 bf ff ee b 40015d18 <== NOT EXECUTED 40015d64: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4002150c : #include int fsync( int fd ) { 4002150c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40021510: 03 10 01 26 sethi %hi(0x40049800), %g1 <== NOT EXECUTED 40021514: c4 00 62 58 ld [ %g1 + 0x258 ], %g2 ! 40049a58 <== NOT EXECUTED 40021518: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 4002151c: 1a 80 00 1b bcc 40021588 <== NOT EXECUTED 40021520: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40021524: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4005e994 <== NOT EXECUTED 40021528: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4002152c: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40021530: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40021534: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 40021538: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002153c: 90 00 c0 01 add %g3, %g1, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40021540: c8 02 20 0c ld [ %o0 + 0xc ], %g4 <== NOT EXECUTED 40021544: 80 89 21 00 btst 0x100, %g4 <== NOT EXECUTED 40021548: 02 80 00 10 be 40021588 <== NOT EXECUTED 4002154c: 80 89 20 04 btst 4, %g4 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40021550: 02 80 00 14 be 400215a0 <== NOT EXECUTED 40021554: 01 00 00 00 nop <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) 40021558: c8 02 20 30 ld [ %o0 + 0x30 ], %g4 <== NOT EXECUTED 4002155c: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 40021560: 02 80 00 0a be 40021588 <== NOT EXECUTED 40021564: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 40021568: c8 01 20 28 ld [ %g4 + 0x28 ], %g4 <== NOT EXECUTED 4002156c: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 40021570: 02 80 00 12 be 400215b8 <== NOT EXECUTED 40021574: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 40021578: 9f c1 00 00 call %g4 <== NOT EXECUTED 4002157c: 01 00 00 00 nop <== NOT EXECUTED } 40021580: 81 c7 e0 08 ret <== NOT EXECUTED 40021584: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40021588: 40 00 40 ea call 40031930 <__errno> <== NOT EXECUTED 4002158c: 01 00 00 00 nop <== NOT EXECUTED 40021590: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40021594: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40021598: 10 bf ff fa b 40021580 <== NOT EXECUTED 4002159c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400215a0: 40 00 40 e4 call 40031930 <__errno> <== NOT EXECUTED 400215a4: 01 00 00 00 nop <== NOT EXECUTED 400215a8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400215ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400215b0: 10 bf ff f4 b 40021580 <== NOT EXECUTED 400215b4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400215b8: 40 00 40 de call 40031930 <__errno> <== NOT EXECUTED 400215bc: 01 00 00 00 nop <== NOT EXECUTED 400215c0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400215c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400215c8: 10 bf ff ee b 40021580 <== NOT EXECUTED 400215cc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4000a63c : int ftruncate( int fd, off_t length ) { 4000a63c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000a640: 03 10 00 5e sethi %hi(0x40017800), %g1 <== NOT EXECUTED 4000a644: c4 00 62 a8 ld [ %g1 + 0x2a8 ], %g2 ! 40017aa8 <== NOT EXECUTED 4000a648: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 4000a64c: 1a 80 00 2b bcc 4000a6f8 <== NOT EXECUTED 4000a650: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4000a654: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 ! 40018640 <== NOT EXECUTED 4000a658: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4000a65c: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4000a660: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000a664: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4000a668: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000a66c: b0 00 c0 01 add %g3, %g1, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4000a670: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 4000a674: 80 88 a1 00 btst 0x100, %g2 <== NOT EXECUTED 4000a678: 02 80 00 20 be 4000a6f8 <== NOT EXECUTED 4000a67c: 01 00 00 00 nop <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000a680: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 4000a684: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED 4000a688: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED 4000a68c: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 4000a690: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4000a694: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED 4000a698: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED if ( !loc.ops->node_type_h ) 4000a69c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4000a6a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a6a4: 02 80 00 21 be 4000a728 <== NOT EXECUTED 4000a6a8: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000a6ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a6b0: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 4000a6b4: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4000a6b8: 02 80 00 22 be 4000a740 <== NOT EXECUTED 4000a6bc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000a6c0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000a6c4: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 4000a6c8: 02 80 00 12 be 4000a710 <== NOT EXECUTED 4000a6cc: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4000a6d0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 4000a6d4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 4000a6d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a6dc: 02 80 00 13 be 4000a728 <== NOT EXECUTED 4000a6e0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4000a6e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000a6e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a6ec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED } 4000a6f0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a6f4: 91 e8 00 08 restore %g0, %o0, %o0 <== 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); 4000a6f8: 40 00 08 e5 call 4000ca8c <__errno> <== NOT EXECUTED 4000a6fc: 01 00 00 00 nop <== NOT EXECUTED 4000a700: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4000a704: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a708: 10 bf ff fa b 4000a6f0 <== NOT EXECUTED 4000a70c: 90 10 3f ff mov -1, %o0 <== 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 ); 4000a710: 40 00 08 df call 4000ca8c <__errno> <== NOT EXECUTED 4000a714: 01 00 00 00 nop <== NOT EXECUTED 4000a718: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000a71c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a720: 10 bf ff f4 b 4000a6f0 <== NOT EXECUTED 4000a724: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000a728: 40 00 08 d9 call 4000ca8c <__errno> <== NOT EXECUTED 4000a72c: 01 00 00 00 nop <== NOT EXECUTED 4000a730: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000a734: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a738: 10 bf ff ee b 4000a6f0 <== NOT EXECUTED 4000a73c: 90 10 3f ff mov -1, %o0 <== 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 ); 4000a740: 40 00 08 d3 call 4000ca8c <__errno> <== NOT EXECUTED 4000a744: 01 00 00 00 nop <== NOT EXECUTED 4000a748: 82 10 20 15 mov 0x15, %g1 ! 15 <== NOT EXECUTED 4000a74c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a750: 10 bf ff e8 b 4000a6f0 <== NOT EXECUTED 4000a754: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400216ec : char * getcwd ( char *pt, size_t size) { 400216ec: 9d e3 bf 30 save %sp, -208, %sp <== NOT EXECUTED * If no buffer specified by the user, allocate one as necessary. * If a buffer is specified, the size has to be non-zero. The path * is built from the end of the buffer backwards. */ if (pt) 400216f0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400216f4: 02 80 00 fa be 40021adc <== NOT EXECUTED 400216f8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 400216fc: ae 10 20 00 clr %l7 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 40021700: 02 80 00 f1 be 40021ac4 <== NOT EXECUTED 40021704: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; *bpt = '\0'; 40021708: c0 2e 7f ff clrb [ %i1 + -1 ] <== NOT EXECUTED * Allocate bytes (1024 - malloc space) for the string of "../"'s. * Should always be enough (it's 340 levels). If it's not, allocate * as necessary. Special * case the first stat, it's ".", not "..". */ if (!(up = (char *) malloc (upsize = 1024 - 4))) 4002170c: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 40021710: 7f ff 91 9b call 40005d7c <== NOT EXECUTED 40021714: b8 06 7f ff add %i1, -1, %i4 <== NOT EXECUTED 40021718: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4002171c: 02 80 00 0c be 4002174c <== NOT EXECUTED 40021720: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 40021724: c0 2c 60 01 clrb [ %l1 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 40021728: c2 2c 40 00 stb %g1, [ %l1 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 4002172c: ac 07 bf a8 add %fp, -88, %l6 <== NOT EXECUTED 40021730: 11 10 01 12 sethi %hi(0x40044800), %o0 <== NOT EXECUTED 40021734: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40021738: 7f ff 96 2d call 40006fec <== NOT EXECUTED 4002173c: 90 12 23 d0 or %o0, 0x3d0, %o0 <== NOT EXECUTED 40021740: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021744: 02 80 00 0e be 4002177c <== NOT EXECUTED 40021748: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 4002174c: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 40021750: 12 80 00 07 bne 4002176c <== NOT EXECUTED 40021754: 01 00 00 00 nop <== NOT EXECUTED free (pt); free (up); 40021758: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4002175c: 7f ff 8f e4 call 400056ec <== NOT EXECUTED 40021760: b0 10 20 00 clr %i0 <== NOT EXECUTED return (char *) NULL; } 40021764: 81 c7 e0 08 ret <== NOT EXECUTED 40021768: 81 e8 00 00 restore <== NOT EXECUTED err: if(dir) (void) _closedir (dir); if (ptsize) free (pt); 4002176c: 7f ff 8f e0 call 400056ec <== NOT EXECUTED 40021770: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40021774: 10 bf ff fa b 4002175c <== NOT EXECUTED 40021778: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; 4002177c: c4 07 bf ac ld [ %fp + -84 ], %g2 <== NOT EXECUTED root_ino = s.st_ino; 40021780: c6 07 bf b0 ld [ %fp + -80 ], %g3 <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; 40021784: c2 27 bf 98 st %g1, [ %fp + -104 ] <== NOT EXECUTED 40021788: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 4002178c: 82 04 64 00 add %l1, 0x400, %g1 <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 40021790: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; 40021794: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 40021798: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 4002179c: c4 27 bf 9c st %g2, [ %fp + -100 ] <== NOT EXECUTED 400217a0: 40 00 40 64 call 40031930 <__errno> <== NOT EXECUTED 400217a4: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED 400217a8: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED 400217ac: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 400217b0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400217b4: 7f ff 96 0e call 40006fec <== NOT EXECUTED 400217b8: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 400217bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400217c0: 12 bf ff e3 bne 4002174c <== NOT EXECUTED 400217c4: ea 07 bf a8 ld [ %fp + -88 ], %l5 <== NOT EXECUTED /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 400217c8: c6 07 bf 98 ld [ %fp + -104 ], %g3 <== NOT EXECUTED /* Stat the current level. */ if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; 400217cc: fa 07 bf b0 ld [ %fp + -80 ], %i5 <== NOT EXECUTED dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 400217d0: 80 a0 c0 15 cmp %g3, %l5 <== NOT EXECUTED 400217d4: 02 80 00 a8 be 40021a74 <== NOT EXECUTED 400217d8: f6 07 bf ac ld [ %fp + -84 ], %i3 <== NOT EXECUTED * Build pointer to the parent directory, allocating memory * as necessary. Max length is 3 for "../", the largest * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) 400217dc: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 400217e0: 82 04 a4 04 add %l2, 0x404, %g1 <== NOT EXECUTED 400217e4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400217e8: 08 80 00 5a bleu 40021950 <== NOT EXECUTED 400217ec: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 400217f0: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 400217f4: c0 2c a0 02 clrb [ %l2 + 2 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 400217f8: c4 2c 80 00 stb %g2, [ %l2 ] <== NOT EXECUTED *bup++ = '.'; 400217fc: c4 2c a0 01 stb %g2, [ %l2 + 1 ] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 40021800: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40021804: 40 00 05 66 call 40022d9c <== NOT EXECUTED 40021808: a0 04 a0 02 add %l2, 2, %l0 <== NOT EXECUTED 4002180c: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 40021810: 02 bf ff d0 be 40021750 <== NOT EXECUTED 40021814: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 40021818: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED 4002181c: 7f ff fe ef call 400213d8 <== NOT EXECUTED 40021820: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40021824: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021828: 12 80 00 34 bne 400218f8 <== NOT EXECUTED 4002182c: 86 10 20 2f mov 0x2f, %g3 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 40021830: c6 2c 00 00 stb %g3, [ %l0 ] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 40021834: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 40021838: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 4002183c: 02 80 00 4e be 40021974 <== NOT EXECUTED 40021840: a4 04 a0 03 add %l2, 3, %l2 <== NOT EXECUTED 40021844: a8 10 20 00 clr %l4 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 40021848: 40 00 06 17 call 400230a4 <== NOT EXECUTED 4002184c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40021850: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021854: 02 80 00 23 be 400218e0 <== NOT EXECUTED 40021858: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 4002185c: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED 40021860: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 40021864: 12 80 00 08 bne 40021884 <== NOT EXECUTED 40021868: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED 4002186c: c2 4a 20 0d ldsb [ %o0 + 0xd ], %g1 <== NOT EXECUTED 40021870: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021874: 02 bf ff f5 be 40021848 <== NOT EXECUTED 40021878: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 4002187c: 22 80 00 31 be,a 40021940 <== NOT EXECUTED 40021880: c2 4a 20 0e ldsb [ %o0 + 0xe ], %g1 <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 40021884: 40 00 56 cd call 400373b8 <== NOT EXECUTED 40021888: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002188c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40021890: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 40021894: 40 00 4a 4d call 400341c8 <== NOT EXECUTED 40021898: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 4002189c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400218a0: 7f ff 95 d3 call 40006fec <== NOT EXECUTED 400218a4: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 400218a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400218ac: 02 80 00 17 be 40021908 <== NOT EXECUTED 400218b0: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 400218b4: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 400218b8: 02 80 00 1e be 40021930 <== NOT EXECUTED 400218bc: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; errno = 0; 400218c0: 40 00 40 1c call 40031930 <__errno> <== NOT EXECUTED 400218c4: 01 00 00 00 nop <== NOT EXECUTED 400218c8: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 400218cc: 40 00 05 f6 call 400230a4 <== NOT EXECUTED 400218d0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400218d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400218d8: 32 bf ff e2 bne,a 40021860 <== NOT EXECUTED 400218dc: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED * If readdir set errno, use it, not any saved error; otherwise, * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) 400218e0: 40 00 40 14 call 40031930 <__errno> <== NOT EXECUTED 400218e4: 01 00 00 00 nop <== NOT EXECUTED 400218e8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400218ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400218f0: 02 80 00 5a be 40021a58 <== NOT EXECUTED 400218f4: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 400218f8: 40 00 35 fd call 4002f0ec <== NOT EXECUTED 400218fc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (ptsize) 40021900: 10 bf ff 94 b 40021750 <== NOT EXECUTED 40021904: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED if (!save_errno) save_errno = errno; errno = 0; continue; } if (s.st_dev == dev && s.st_ino == ino) 40021908: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 4002190c: 12 bf ff cf bne 40021848 <== NOT EXECUTED 40021910: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 40021914: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 40021918: 12 bf ff cc bne 40021848 <== NOT EXECUTED 4002191c: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 40021920: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 40021924: 12 bf ff c9 bne 40021848 <== NOT EXECUTED 40021928: 01 00 00 00 nop <== NOT EXECUTED 4002192c: 30 80 00 1f b,a 400219a8 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) { if (!save_errno) save_errno = errno; 40021930: 40 00 40 00 call 40031930 <__errno> <== NOT EXECUTED 40021934: 01 00 00 00 nop <== NOT EXECUTED 40021938: 10 bf ff e2 b 400218c0 <== NOT EXECUTED 4002193c: e8 02 00 00 ld [ %o0 ], %l4 <== NOT EXECUTED else for (;;) { if (!(dp = _readdir (dir))) goto notfound; if (ISDOT (dp)) 40021940: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021944: 02 bf ff c1 be 40021848 <== NOT EXECUTED 40021948: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED 4002194c: 30 bf ff ce b,a 40021884 <== NOT EXECUTED * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) { if (!(up = (char *) realloc (up, upsize *= 2))) 40021950: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 40021954: 40 00 06 4c call 40023284 <== NOT EXECUTED 40021958: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4002195c: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40021960: 02 bf ff 7b be 4002174c <== NOT EXECUTED 40021964: 82 04 40 1a add %l1, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 40021968: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED 4002196c: 10 bf ff a1 b 400217f0 <== NOT EXECUTED 40021970: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 40021974: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 40021978: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 4002197c: 12 bf ff b3 bne 40021848 <== NOT EXECUTED 40021980: a8 10 20 00 clr %l4 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 40021984: 40 00 05 c8 call 400230a4 <== NOT EXECUTED 40021988: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4002198c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021990: 02 bf ff d4 be 400218e0 <== NOT EXECUTED 40021994: a8 10 20 00 clr %l4 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 40021998: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4002199c: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 400219a0: 12 bf ff f9 bne 40021984 <== NOT EXECUTED 400219a4: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED /* * Check for length of the current name, preceding slash, * leading slash. */ if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2)) 400219a8: 40 00 56 84 call 400373b8 <== NOT EXECUTED 400219ac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400219b0: c6 07 bf 9c ld [ %fp + -100 ], %g3 <== NOT EXECUTED 400219b4: a8 27 00 18 sub %i4, %i0, %l4 <== NOT EXECUTED 400219b8: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 400219bc: 82 20 80 03 sub %g2, %g3, %g1 <== NOT EXECUTED 400219c0: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 400219c4: 80 a5 00 01 cmp %l4, %g1 <== NOT EXECUTED 400219c8: 18 80 00 13 bgu 40021a14 <== NOT EXECUTED 400219cc: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED { size_t len, off; if (!ptsize) 400219d0: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 400219d4: 02 80 00 49 be 40021af8 <== NOT EXECUTED 400219d8: 01 00 00 00 nop <== NOT EXECUTED errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 400219dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400219e0: af 2d e0 01 sll %l7, 1, %l7 <== NOT EXECUTED 400219e4: 40 00 06 28 call 40023284 <== NOT EXECUTED 400219e8: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 400219ec: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400219f0: 02 bf ff c2 be 400218f8 <== NOT EXECUTED 400219f4: 82 26 40 1c sub %i1, %i4, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 400219f8: 92 06 00 14 add %i0, %l4, %o1 <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 400219fc: b2 06 00 17 add %i0, %l7, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 40021a00: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40021a04: b8 26 40 01 sub %i1, %g1, %i4 <== NOT EXECUTED 40021a08: 40 00 49 f0 call 400341c8 <== NOT EXECUTED 40021a0c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 40021a10: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 40021a14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021a18: 12 80 00 04 bne 40021a28 <== NOT EXECUTED 40021a1c: 84 10 20 2f mov 0x2f, %g2 <== NOT EXECUTED *--bpt = '/'; 40021a20: b8 07 3f ff add %i4, -1, %i4 <== NOT EXECUTED 40021a24: c4 2f 00 00 stb %g2, [ %i4 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 40021a28: 40 00 56 64 call 400373b8 <== NOT EXECUTED 40021a2c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40021a30: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40021a34: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= strlen (dp->d_name); 40021a38: b8 27 00 08 sub %i4, %o0, %i4 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); (void) _closedir (dir); dir = 0; /* Truncate any file name. */ *bup = '\0'; 40021a3c: c0 27 bf 9c clr [ %fp + -100 ] <== NOT EXECUTED bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= strlen (dp->d_name); bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40021a40: 40 00 49 e2 call 400341c8 <== NOT EXECUTED 40021a44: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED (void) _closedir (dir); 40021a48: 40 00 35 a9 call 4002f0ec <== NOT EXECUTED 40021a4c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 40021a50: 10 bf ff 58 b 400217b0 <== NOT EXECUTED 40021a54: c0 2c 80 00 clrb [ %l2 ] <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 40021a58: 40 00 3f b6 call 40031930 <__errno> <== NOT EXECUTED 40021a5c: 01 00 00 00 nop <== NOT EXECUTED 40021a60: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40021a64: 22 80 00 16 be,a 40021abc <== NOT EXECUTED 40021a68: a8 10 20 02 mov 2, %l4 <== NOT EXECUTED 40021a6c: 10 bf ff a3 b 400218f8 <== NOT EXECUTED 40021a70: e8 22 00 00 st %l4, [ %o0 ] <== NOT EXECUTED /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 40021a74: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 40021a78: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 40021a7c: 12 bf ff 59 bne 400217e0 <== NOT EXECUTED 40021a80: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40021a84: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 40021a88: 80 a0 80 1d cmp %g2, %i5 <== NOT EXECUTED 40021a8c: 12 bf ff 56 bne 400217e4 <== NOT EXECUTED 40021a90: 82 04 a4 04 add %l2, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 40021a94: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 40021a98: 92 07 3f ff add %i4, -1, %o1 <== NOT EXECUTED 40021a9c: c2 2f 3f ff stb %g1, [ %i4 + -1 ] <== NOT EXECUTED /* * It's unclear that it's a requirement to copy the * path to the beginning of the buffer, but it's always * been that way and stuff would probably break. */ (void) bcopy (bpt, pt, ept - bpt); 40021aa0: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 40021aa4: 40 00 49 c9 call 400341c8 <== NOT EXECUTED 40021aa8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40021aac: 7f ff 8f 10 call 400056ec <== NOT EXECUTED 40021ab0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40021ab4: 81 c7 e0 08 ret <== NOT EXECUTED 40021ab8: 81 e8 00 00 restore <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 40021abc: 10 bf ff 8f b 400218f8 <== NOT EXECUTED 40021ac0: e8 22 00 00 st %l4, [ %o0 ] <== NOT EXECUTED if (pt) { ptsize = 0; if (!size) { errno = EINVAL; 40021ac4: 40 00 3f 9b call 40031930 <__errno> <== NOT EXECUTED 40021ac8: b0 10 20 00 clr %i0 <== NOT EXECUTED 40021acc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40021ad0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40021ad4: 81 c7 e0 08 ret <== NOT EXECUTED 40021ad8: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 40021adc: 7f ff 90 a8 call 40005d7c <== NOT EXECUTED 40021ae0: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 40021ae4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40021ae8: 02 bf ff 1f be 40021764 <== NOT EXECUTED 40021aec: b2 06 23 fc add %i0, 0x3fc, %i1 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 40021af0: 10 bf ff 06 b 40021708 <== NOT EXECUTED 40021af4: ae 10 23 fc mov 0x3fc, %l7 <== NOT EXECUTED { size_t len, off; if (!ptsize) { errno = ERANGE; 40021af8: 40 00 3f 8e call 40031930 <__errno> <== NOT EXECUTED 40021afc: 01 00 00 00 nop <== NOT EXECUTED 40021b00: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 40021b04: 10 bf ff 7d b 400218f8 <== NOT EXECUTED 40021b08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f588 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4002f588: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 4002f58c: 03 10 01 26 sethi %hi(0x40049800), %g1 <== NOT EXECUTED 4002f590: c4 00 62 58 ld [ %g1 + 0x258 ], %g2 ! 40049a58 <== NOT EXECUTED int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4002f594: 88 10 00 18 mov %i0, %g4 <== NOT EXECUTED /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 4002f598: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 4002f59c: 1a 80 00 0a bcc 4002f5c4 <== NOT EXECUTED 4002f5a0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002f5a4: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED 4002f5a8: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4005e994 <== NOT EXECUTED 4002f5ac: 85 29 20 02 sll %g4, 2, %g2 <== NOT EXECUTED 4002f5b0: 83 29 20 04 sll %g4, 4, %g1 <== NOT EXECUTED 4002f5b4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002f5b8: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 4002f5bc: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002f5c0: b0 00 c0 01 add %g3, %g1, %i0 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4002f5c4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 4002f5c8: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED 4002f5cc: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED 4002f5d0: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 4002f5d4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4002f5d8: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED 4002f5dc: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED if ( !loc.ops->node_type_h ) 4002f5e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4002f5e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002f5e8: 02 80 00 17 be 4002f644 <== NOT EXECUTED 4002f5ec: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 4002f5f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002f5f4: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 4002f5f8: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4002f5fc: 12 80 00 0c bne 4002f62c <== NOT EXECUTED 4002f600: 01 00 00 00 nop <== NOT EXECUTED /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 4002f604: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 4002f608: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4002f60c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002f610: 02 80 00 0d be 4002f644 <== NOT EXECUTED 4002f614: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 4002f618: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002f61c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002f620: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED } 4002f624: 81 c7 e0 08 ret <== NOT EXECUTED 4002f628: 91 e8 00 08 restore %g0, %o0, %o0 <== 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( ENOTDIR ); 4002f62c: 40 00 08 c1 call 40031930 <__errno> <== NOT EXECUTED 4002f630: 01 00 00 00 nop <== NOT EXECUTED 4002f634: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 4002f638: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f63c: 10 bf ff fa b 4002f624 <== NOT EXECUTED 4002f640: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002f644: 40 00 08 bb call 40031930 <__errno> <== NOT EXECUTED 4002f648: 01 00 00 00 nop <== NOT EXECUTED 4002f64c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4002f650: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002f654: 10 bf ff f4 b 4002f624 <== NOT EXECUTED 4002f658: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40021b0c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getegid( void ) { 40021b0c: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40021b10: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED return _POSIX_types_Egid; } 40021b14: 81 c3 e0 08 retl <== NOT EXECUTED 40021b18: d0 10 a0 2e lduh [ %g2 + 0x2e ], %o0 <== NOT EXECUTED 40021b1c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t geteuid( void ) { 40021b1c: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40021b20: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED return _POSIX_types_Euid; } 40021b24: 81 c3 e0 08 retl <== NOT EXECUTED 40021b28: d0 10 a0 2c lduh [ %g2 + 0x2c ], %o0 <== NOT EXECUTED 40021b2c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40021b2c: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40021b30: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED return _POSIX_types_Gid; } 40021b34: 81 c3 e0 08 retl <== NOT EXECUTED 40021b38: d0 10 a0 2a lduh [ %g2 + 0x2a ], %o0 <== NOT EXECUTED 40022214 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40022214: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 40022218: 7f ff ff b3 call 400220e4 <== NOT EXECUTED 4002221c: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 40022220: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED 40022224: 13 10 01 25 sethi %hi(0x40049400), %o1 <== NOT EXECUTED 40022228: 90 12 22 70 or %o0, 0x270, %o0 <== NOT EXECUTED 4002222c: 40 00 40 33 call 400322f8 <== NOT EXECUTED 40022230: 92 12 62 20 or %o1, 0x220, %o1 <== NOT EXECUTED 40022234: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40022238: 12 80 00 0b bne 40022264 <== NOT EXECUTED 4002223c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40022240: 30 80 00 27 b,a 400222dc <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 40022244: 40 00 52 3f call 40036b40 <== NOT EXECUTED 40022248: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4002224c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40022250: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); } if (match) { 40022254: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022258: 12 80 00 14 bne 400222a8 <== NOT EXECUTED 4002225c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40022260: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40022264: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40022268: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 4002226c: 7f ff fe d1 call 40021db0 <== NOT EXECUTED 40022270: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40022274: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022278: 02 80 00 11 be 400222bc <== NOT EXECUTED 4002227c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 40022280: 32 bf ff f1 bne,a 40022244 <== NOT EXECUTED 40022284: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 40022288: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002228c: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40022290: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40022294: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 40022298: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002229c: 02 bf ff f2 be 40022264 <== NOT EXECUTED 400222a0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 400222a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400222a8: 40 00 3d fa call 40031a90 <== NOT EXECUTED 400222ac: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 400222b0: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 400222b4: 81 c7 e0 08 ret <== NOT EXECUTED 400222b8: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 400222bc: 40 00 3d 9d call 40031930 <__errno> <== NOT EXECUTED 400222c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400222c4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400222c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 400222cc: 40 00 3d f1 call 40031a90 <== NOT EXECUTED 400222d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400222d4: 81 c7 e0 08 ret <== NOT EXECUTED 400222d8: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 400222dc: 40 00 3d 95 call 40031930 <__errno> <== NOT EXECUTED 400222e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400222e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400222e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400222ec: 81 c7 e0 08 ret <== NOT EXECUTED 400222f0: 81 e8 00 00 restore <== NOT EXECUTED 40021f30 : return NULL; return p; } struct group *getgrent() { 40021f30: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 40021f34: 03 10 01 78 sethi %hi(0x4005e000), %g1 <== NOT EXECUTED 40021f38: d0 00 61 9c ld [ %g1 + 0x19c ], %o0 ! 4005e19c <== NOT EXECUTED 40021f3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021f40: 02 80 00 0d be 40021f74 <== NOT EXECUTED 40021f44: 21 10 01 78 sethi %hi(0x4005e000), %l0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 40021f48: 15 10 01 78 sethi %hi(0x4005e000), %o2 <== NOT EXECUTED 40021f4c: 92 14 22 68 or %l0, 0x268, %o1 <== NOT EXECUTED 40021f50: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED 40021f54: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40021f58: 7f ff ff 96 call 40021db0 <== NOT EXECUTED 40021f5c: b0 14 22 68 or %l0, 0x268, %i0 <== NOT EXECUTED 40021f60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021f64: 02 80 00 04 be 40021f74 <== NOT EXECUTED 40021f68: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 40021f6c: 81 c7 e0 08 ret <== NOT EXECUTED 40021f70: 81 e8 00 00 restore <== NOT EXECUTED 40021f74: 81 c7 e0 08 ret <== NOT EXECUTED 40021f78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4002232c : } struct group *getgrgid( gid_t gid ) { 4002232c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 40022330: 13 10 01 78 sethi %hi(0x4005e000), %o1 <== NOT EXECUTED 40022334: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40022338: 92 12 62 68 or %o1, 0x268, %o1 <== NOT EXECUTED 4002233c: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40022340: 15 10 01 78 sethi %hi(0x4005e000), %o2 <== NOT EXECUTED 40022344: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40022348: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED 4002234c: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40022350: 7f ff ff e9 call 400222f4 <== NOT EXECUTED 40022354: b0 10 20 00 clr %i0 <== NOT EXECUTED 40022358: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002235c: 22 80 00 02 be,a 40022364 <== NOT EXECUTED 40022360: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40022364: 81 c7 e0 08 ret <== NOT EXECUTED 40022368: 81 e8 00 00 restore <== NOT EXECUTED 400222f4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 400222f4: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 400222f8: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 400222fc: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40022300: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40022304: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40022308: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 4002230c: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40022310: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40022314: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 40022318: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002231c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022320: 7f ff ff bd call 40022214 <== NOT EXECUTED 40022324: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022328: 01 00 00 00 nop 40022398 : } struct group *getgrnam( const char *name ) { 40022398: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 4002239c: 13 10 01 78 sethi %hi(0x4005e000), %o1 <== NOT EXECUTED 400223a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400223a4: 92 12 62 68 or %o1, 0x268, %o1 <== NOT EXECUTED 400223a8: 15 10 01 78 sethi %hi(0x4005e000), %o2 <== NOT EXECUTED 400223ac: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400223b0: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED 400223b4: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 400223b8: 7f ff ff ed call 4002236c <== NOT EXECUTED 400223bc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400223c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400223c4: 22 80 00 02 be,a 400223cc <== NOT EXECUTED 400223c8: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 400223cc: 81 c7 e0 08 ret <== NOT EXECUTED 400223d0: 81 e8 00 00 restore <== NOT EXECUTED 4002236c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002236c: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40022370: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 40022374: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 40022378: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002237c: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40022380: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 40022384: 92 10 20 00 clr %o1 <== NOT EXECUTED 40022388: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002238c: 7f ff ff a2 call 40022214 <== NOT EXECUTED 40022390: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022394: 01 00 00 00 nop 40022efc : */ pid_t getpid( void ) { return _Objects_Local_node; } 40022efc: 81 c3 e0 08 retl <== NOT EXECUTED 40022f00: 90 10 20 01 mov 1, %o0 ! 1 <== NOT EXECUTED 40022418 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40022418: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 4002241c: 7f ff ff 32 call 400220e4 <== NOT EXECUTED 40022420: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 40022424: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED 40022428: 13 10 01 25 sethi %hi(0x40049400), %o1 <== NOT EXECUTED 4002242c: 90 12 21 f8 or %o0, 0x1f8, %o0 <== NOT EXECUTED 40022430: 40 00 3f b2 call 400322f8 <== NOT EXECUTED 40022434: 92 12 62 20 or %o1, 0x220, %o1 <== NOT EXECUTED 40022438: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4002243c: 12 80 00 0b bne 40022468 <== NOT EXECUTED 40022440: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40022444: 30 80 00 27 b,a 400224e0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 40022448: 40 00 51 be call 40036b40 <== NOT EXECUTED 4002244c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40022450: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40022454: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); } if (match) { 40022458: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002245c: 12 80 00 14 bne 400224ac <== NOT EXECUTED 40022460: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 40022464: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40022468: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4002246c: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40022470: 7f ff fe c3 call 40021f7c <== NOT EXECUTED 40022474: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40022478: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002247c: 02 80 00 11 be 400224c0 <== NOT EXECUTED 40022480: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 40022484: 32 bf ff f1 bne,a 40022448 <== NOT EXECUTED 40022488: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 4002248c: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 40022490: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40022494: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40022498: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002249c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400224a0: 02 bf ff f2 be 40022468 <== NOT EXECUTED 400224a4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 400224a8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400224ac: 40 00 3d 79 call 40031a90 <== NOT EXECUTED 400224b0: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 400224b4: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 400224b8: 81 c7 e0 08 ret <== NOT EXECUTED 400224bc: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 400224c0: 40 00 3d 1c call 40031930 <__errno> <== NOT EXECUTED 400224c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400224c8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400224cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 400224d0: 40 00 3d 70 call 40031a90 <== NOT EXECUTED 400224d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400224d8: 81 c7 e0 08 ret <== NOT EXECUTED 400224dc: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 400224e0: 40 00 3d 14 call 40031930 <__errno> <== NOT EXECUTED 400224e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400224e8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400224ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400224f0: 81 c7 e0 08 ret <== NOT EXECUTED 400224f4: 81 e8 00 00 restore <== NOT EXECUTED 40022098 : return NULL; return p; } struct passwd *getpwent() { 40022098: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 4002209c: 03 10 01 78 sethi %hi(0x4005e000), %g1 <== NOT EXECUTED 400220a0: d0 00 60 b4 ld [ %g1 + 0xb4 ], %o0 ! 4005e0b4 <== NOT EXECUTED 400220a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400220a8: 02 80 00 0d be 400220dc <== NOT EXECUTED 400220ac: 21 10 01 78 sethi %hi(0x4005e000), %l0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 400220b0: 15 10 01 78 sethi %hi(0x4005e000), %o2 <== NOT EXECUTED 400220b4: 92 14 21 80 or %l0, 0x180, %o1 <== NOT EXECUTED 400220b8: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED 400220bc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400220c0: 7f ff ff af call 40021f7c <== NOT EXECUTED 400220c4: b0 14 21 80 or %l0, 0x180, %i0 <== NOT EXECUTED 400220c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400220cc: 02 80 00 04 be 400220dc <== NOT EXECUTED 400220d0: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 400220d4: 81 c7 e0 08 ret <== NOT EXECUTED 400220d8: 81 e8 00 00 restore <== NOT EXECUTED 400220dc: 81 c7 e0 08 ret <== NOT EXECUTED 400220e0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4002259c : } struct passwd *getpwnam( const char *name ) { 4002259c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 400225a0: 13 10 01 78 sethi %hi(0x4005e000), %o1 <== NOT EXECUTED 400225a4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400225a8: 92 12 61 80 or %o1, 0x180, %o1 <== NOT EXECUTED 400225ac: 15 10 01 78 sethi %hi(0x4005e000), %o2 <== NOT EXECUTED 400225b0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400225b4: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED 400225b8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 400225bc: 7f ff ff ed call 40022570 <== NOT EXECUTED 400225c0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400225c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400225c8: 22 80 00 02 be,a 400225d0 <== NOT EXECUTED 400225cc: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 400225d0: 81 c7 e0 08 ret <== NOT EXECUTED 400225d4: 81 e8 00 00 restore <== NOT EXECUTED 40022570 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40022570: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40022574: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 40022578: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 4002257c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40022580: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40022584: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 40022588: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002258c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022590: 7f ff ff a2 call 40022418 <== NOT EXECUTED 40022594: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022598: 01 00 00 00 nop 40022530 : } struct passwd *getpwuid( uid_t uid ) { 40022530: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 40022534: 13 10 01 78 sethi %hi(0x4005e000), %o1 <== NOT EXECUTED 40022538: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002253c: 92 12 61 80 or %o1, 0x180, %o1 <== NOT EXECUTED 40022540: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40022544: 15 10 01 78 sethi %hi(0x4005e000), %o2 <== NOT EXECUTED 40022548: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002254c: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED 40022550: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40022554: 7f ff ff e9 call 400224f8 <== NOT EXECUTED 40022558: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002255c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022560: 22 80 00 02 be,a 40022568 <== NOT EXECUTED 40022564: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40022568: 81 c7 e0 08 ret <== NOT EXECUTED 4002256c: 81 e8 00 00 restore <== NOT EXECUTED 400224f8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 400224f8: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 400224fc: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40022500: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40022504: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40022508: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002250c: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40022510: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40022514: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40022518: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 4002251c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40022520: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022524: 7f ff ff bd call 40022418 <== NOT EXECUTED 40022528: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002252c: 01 00 00 00 nop 4000a758 : int gettimeofday( struct timeval *tp, void * __tz ) { 4000a758: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000a75c: 80 a6 20 00 cmp %i0, 0 4000a760: 02 80 00 11 be 4000a7a4 4000a764: 01 00 00 00 nop ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 4000a768: 7f ff dd 6e call 40001d20 4000a76c: 01 00 00 00 nop 4000a770: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000a774: 7f ff ef cd call 400066a8 <_TOD_Get> 4000a778: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 4000a77c: 7f ff dd 6d call 40001d30 4000a780: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000a784: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 4000a788: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000a78c: 92 10 23 e8 mov 0x3e8, %o1 4000a790: 40 00 24 8f call 400139cc <.udiv> 4000a794: c2 26 00 00 st %g1, [ %i0 ] 4000a798: d0 26 20 04 st %o0, [ %i0 + 4 ] * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 4000a79c: 81 c7 e0 08 ret 4000a7a0: 91 e8 20 00 restore %g0, 0, %o0 void * __tz ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4000a7a4: 40 00 08 ba call 4000ca8c <__errno> <== NOT EXECUTED 4000a7a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a7ac: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000a7b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a7b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a7b8: 81 e8 00 00 restore <== NOT EXECUTED 40005824 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 40005824: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40005828: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED return _POSIX_types_Uid; } 4000582c: 81 c3 e0 08 retl <== NOT EXECUTED 40005830: d0 10 a0 28 lduh [ %g2 + 0x28 ], %o0 <== NOT EXECUTED 4002eca0 : * and associated memory. At present the imfs_dir_close simply * returns a successful completion status. */ return 0; } 4002eca0: 81 c3 e0 08 retl <== NOT EXECUTED 4002eca4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002eca8 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; 4002eca8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED buf->st_dev = 0ll; 4002ecac: c0 22 40 00 clr [ %o1 ] <== NOT EXECUTED buf->st_ino = the_jnode->st_ino; 4002ecb0: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED buf->st_mode = the_jnode->st_mode; 4002ecb4: c6 10 60 2e lduh [ %g1 + 0x2e ], %g3 <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; 4002ecb8: c4 22 60 08 st %g2, [ %o1 + 8 ] <== NOT EXECUTED buf->st_mode = the_jnode->st_mode; 4002ecbc: c6 32 60 0c sth %g3, [ %o1 + 0xc ] <== NOT EXECUTED buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; 4002ecc0: c0 22 60 3c clr [ %o1 + 0x3c ] <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4002ecc4: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 <== NOT EXECUTED buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; 4002ecc8: c0 22 60 40 clr [ %o1 + 0x40 ] <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; 4002eccc: c6 00 60 3c ld [ %g1 + 0x3c ], %g3 <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4002ecd0: c4 32 60 0e sth %g2, [ %o1 + 0xe ] <== NOT EXECUTED buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; 4002ecd4: c6 22 60 24 st %g3, [ %o1 + 0x24 ] <== NOT EXECUTED buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; 4002ecd8: c4 10 60 38 lduh [ %g1 + 0x38 ], %g2 <== NOT EXECUTED buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4002ecdc: c6 00 60 40 ld [ %g1 + 0x40 ], %g3 <== NOT EXECUTED buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; 4002ece0: c4 32 60 10 sth %g2, [ %o1 + 0x10 ] <== NOT EXECUTED buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4002ece4: c6 22 60 2c st %g3, [ %o1 + 0x2c ] <== NOT EXECUTED buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4002ece8: c4 10 60 3a lduh [ %g1 + 0x3a ], %g2 <== NOT EXECUTED buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4002ecec: c6 00 60 44 ld [ %g1 + 0x44 ], %g3 <== NOT EXECUTED buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4002ecf0: c4 32 60 12 sth %g2, [ %o1 + 0x12 ] <== NOT EXECUTED buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4002ecf4: c6 22 60 34 st %g3, [ %o1 + 0x34 ] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; 4002ecf8: c0 22 60 04 clr [ %o1 + 4 ] <== NOT EXECUTED buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; 4002ecfc: c0 22 60 18 clr [ %o1 + 0x18 ] <== NOT EXECUTED 4002ed00: c0 22 60 1c clr [ %o1 + 0x1c ] <== NOT EXECUTED buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_size = 0; 4002ed04: c0 22 60 20 clr [ %o1 + 0x20 ] <== NOT EXECUTED the_chain = &the_jnode->info.directory.Entries; /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; 4002ed08: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 <== NOT EXECUTED 4002ed0c: 82 00 60 50 add %g1, 0x50, %g1 <== NOT EXECUTED !rtems_chain_is_tail( the_chain, the_node ) ; 4002ed10: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4002ed14: 02 80 00 07 be 4002ed30 <== NOT EXECUTED 4002ed18: 86 10 20 00 clr %g3 <== NOT EXECUTED the_node = the_node->next ) { 4002ed1c: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED the_chain = &the_jnode->info.directory.Entries; /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; !rtems_chain_is_tail( the_chain, the_node ) ; 4002ed20: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4002ed24: 12 bf ff fe bne 4002ed1c <== NOT EXECUTED 4002ed28: 86 00 e1 0c add %g3, 0x10c, %g3 <== NOT EXECUTED 4002ed2c: c6 22 60 20 st %g3, [ %o1 + 0x20 ] <== NOT EXECUTED buf->st_size = buf->st_size + sizeof( struct dirent ); } return 0; } 4002ed30: 81 c3 e0 08 retl <== NOT EXECUTED 4002ed34: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002ed38 : off_t imfs_dir_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 4002ed38: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch( whence ) { 4002ed3c: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED 4002ed40: 08 80 00 08 bleu 4002ed60 <== NOT EXECUTED 4002ed44: b4 10 00 18 mov %i0, %i2 <== NOT EXECUTED break; case SEEK_END: /* Movement past the end of the directory via lseek */ /* is not a permitted operation */ default: rtems_set_errno_and_return_minus_one( EINVAL ); 4002ed48: 40 00 0a fa call 40031930 <__errno> <== NOT EXECUTED 4002ed4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ed50: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002ed54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return 0; } 4002ed58: 81 c7 e0 08 ret <== NOT EXECUTED 4002ed5c: 81 e8 00 00 restore <== NOT EXECUTED ) { switch( whence ) { case SEEK_SET: /* absolute move from the start of the file */ case SEEK_CUR: /* relative move */ iop->offset = (iop->offset/sizeof(struct dirent)) * 4002ed60: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 4002ed64: 92 10 21 0c mov 0x10c, %o1 <== NOT EXECUTED 4002ed68: 40 00 4c 62 call 40041ef0 <.udiv> <== NOT EXECUTED 4002ed6c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002ed70: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED 4002ed74: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4002ed78: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 4002ed7c: 82 20 40 08 sub %g1, %o0, %g1 <== NOT EXECUTED 4002ed80: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002ed84: c2 26 a0 08 st %g1, [ %i2 + 8 ] <== NOT EXECUTED 4002ed88: 81 c7 e0 08 ret <== NOT EXECUTED 4002ed8c: 81 e8 00 00 restore <== NOT EXECUTED 4002ec74 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 4002ec74: c4 02 20 2c ld [ %o0 + 0x2c ], %g2 <== NOT EXECUTED rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4002ec78: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 4002ec7c: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 <== NOT EXECUTED 4002ec80: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4002ec84: 02 80 00 04 be 4002ec94 <== NOT EXECUTED 4002ec88: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 4002ec8c: 81 c3 e0 08 retl <== NOT EXECUTED 4002ec90: 01 00 00 00 nop <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4002ec94: c0 20 e0 08 clr [ %g3 + 8 ] <== NOT EXECUTED return 0; } 4002ec98: 81 c3 e0 08 retl <== NOT EXECUTED 4002ec9c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002ee94 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4002ee94: 9d e3 be 88 save %sp, -376, %sp <== NOT EXECUTED int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 4002ee98: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4002ee9c: aa 10 00 18 mov %i0, %l5 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4002eea0: e2 00 60 4c ld [ %g1 + 0x4c ], %l1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4002eea4: a8 00 60 50 add %g1, 0x50, %l4 <== NOT EXECUTED 4002eea8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 4002eeac: 80 a4 40 14 cmp %l1, %l4 <== NOT EXECUTED 4002eeb0: 02 80 00 33 be 4002ef7c <== NOT EXECUTED 4002eeb4: b0 10 20 00 clr %i0 <== NOT EXECUTED /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 4002eeb8: e6 05 60 08 ld [ %l5 + 8 ], %l3 <== NOT EXECUTED /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 4002eebc: 40 00 4c 0d call 40041ef0 <.udiv> <== NOT EXECUTED 4002eec0: 92 10 21 0c mov 0x10c, %o1 <== NOT EXECUTED /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 4002eec4: b0 10 20 00 clr %i0 <== NOT EXECUTED bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 4002eec8: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED 4002eecc: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4002eed0: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 4002eed4: 82 20 40 08 sub %g1, %o0, %g1 <== NOT EXECUTED 4002eed8: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002eedc: a4 00 40 13 add %g1, %l3, %l2 <== NOT EXECUTED /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 4002eee0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4002eee4: 04 80 00 26 ble 4002ef7c <== NOT EXECUTED 4002eee8: b4 10 20 00 clr %i2 <== NOT EXECUTED } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 4002eeec: ba 10 21 0c mov 0x10c, %i5 <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 4002eef0: ae 07 be ec add %fp, -276, %l7 <== NOT EXECUTED 4002eef4: 10 80 00 08 b 4002ef14 <== NOT EXECUTED 4002eef8: ac 07 be f8 add %fp, -264, %l6 <== NOT EXECUTED last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 4002eefc: 80 a4 80 1a cmp %l2, %i2 <== NOT EXECUTED 4002ef00: 04 80 00 1f ble 4002ef7c <== NOT EXECUTED 4002ef04: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 4002ef08: 80 a4 40 14 cmp %l1, %l4 <== NOT EXECUTED 4002ef0c: 02 80 00 1e be 4002ef84 <== NOT EXECUTED 4002ef10: 01 00 00 00 nop <== NOT EXECUTED /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 4002ef14: 80 a4 c0 1a cmp %l3, %i2 <== NOT EXECUTED 4002ef18: 34 bf ff f9 bg,a 4002eefc <== NOT EXECUTED 4002ef1c: b4 06 a1 0c add %i2, 0x10c, %i2 <== NOT EXECUTED /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 4002ef20: f4 27 be f0 st %i2, [ %fp + -272 ] <== NOT EXECUTED tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 4002ef24: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 <== NOT EXECUTED tmp_dirent.d_namlen = strlen( the_jnode->name ); 4002ef28: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 4002ef2c: c2 27 be ec st %g1, [ %fp + -276 ] <== NOT EXECUTED } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 4002ef30: fa 37 be f4 sth %i5, [ %fp + -268 ] <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 4002ef34: 40 00 21 21 call 400373b8 <== NOT EXECUTED 4002ef38: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED strcpy( tmp_dirent.d_name, the_jnode->name ); 4002ef3c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 4002ef40: d0 37 be f6 sth %o0, [ %fp + -266 ] <== NOT EXECUTED strcpy( tmp_dirent.d_name, the_jnode->name ); 4002ef44: 40 00 1f 2f call 40036c00 <== NOT EXECUTED 4002ef48: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED memcpy( 4002ef4c: 90 06 40 18 add %i1, %i0, %o0 <== NOT EXECUTED 4002ef50: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 4002ef54: 40 00 14 64 call 400340e4 <== NOT EXECUTED 4002ef58: 94 10 21 0c mov 0x10c, %o2 <== NOT EXECUTED buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 4002ef5c: c2 05 60 08 ld [ %l5 + 8 ], %g1 <== NOT EXECUTED ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4002ef60: b4 06 a1 0c add %i2, 0x10c, %i2 <== NOT EXECUTED memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 4002ef64: 82 00 61 0c add %g1, 0x10c, %g1 <== NOT EXECUTED 4002ef68: c2 25 60 08 st %g1, [ %l5 + 8 ] <== NOT EXECUTED bytes_transferred = bytes_transferred + sizeof( struct dirent ); 4002ef6c: b0 06 21 0c add %i0, 0x10c, %i0 <== NOT EXECUTED last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 4002ef70: 80 a4 80 1a cmp %l2, %i2 <== NOT EXECUTED 4002ef74: 14 bf ff e5 bg 4002ef08 <== NOT EXECUTED 4002ef78: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED the_node = the_node->next; } /* Success */ return bytes_transferred; } 4002ef7c: 81 c7 e0 08 ret <== NOT EXECUTED 4002ef80: 81 e8 00 00 restore <== NOT EXECUTED 4002ef84: 81 c7 e0 08 ret <== NOT EXECUTED 4002ef88: 81 e8 00 00 restore <== NOT EXECUTED 4002ed90 : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4002ed90: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4002ed94: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 4002ed98: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 <== NOT EXECUTED 4002ed9c: 82 04 20 50 add %l0, 0x50, %g1 <== NOT EXECUTED 4002eda0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4002eda4: 12 80 00 30 bne 4002ee64 <== NOT EXECUTED 4002eda8: 01 00 00 00 nop <== NOT EXECUTED /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 4002edac: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4002edb0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4002edb4: 80 a4 00 02 cmp %l0, %g2 <== NOT EXECUTED 4002edb8: 02 80 00 31 be 4002ee7c <== NOT EXECUTED 4002edbc: 01 00 00 00 nop <== NOT EXECUTED /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4002edc0: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 4002edc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002edc8: 12 80 00 2d bne 4002ee7c <== NOT EXECUTED 4002edcc: 01 00 00 00 nop <== NOT EXECUTED /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4002edd0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4002edd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002edd8: 22 80 00 06 be,a 4002edf0 <== NOT EXECUTED 4002eddc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 4002ede0: 7f ff d7 68 call 40024b80 <_Chain_Extract> <== NOT EXECUTED 4002ede4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4002ede8: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4002edec: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED IMFS_update_ctime( the_jnode ); 4002edf0: 92 10 20 00 clr %o1 <== NOT EXECUTED /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4002edf4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED IMFS_update_ctime( the_jnode ); 4002edf8: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4002edfc: 7f ff 5a 67 call 40005798 <== NOT EXECUTED 4002ee00: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] <== NOT EXECUTED 4002ee04: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== 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) ) { 4002ee08: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002ee0c: 7f ff 5a d9 call 40005970 <== NOT EXECUTED 4002ee10: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4002ee14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002ee18: 12 80 00 11 bne 4002ee5c <== NOT EXECUTED 4002ee1c: 01 00 00 00 nop <== NOT EXECUTED 4002ee20: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 4002ee24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ee28: 12 80 00 0d bne 4002ee5c <== NOT EXECUTED 4002ee2c: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4002ee30: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 ! 4004a4e4 <== NOT EXECUTED 4002ee34: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED 4002ee38: c2 00 e0 04 ld [ %g3 + 4 ], %g1 <== NOT EXECUTED 4002ee3c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4002ee40: 22 80 00 02 be,a 4002ee48 <== NOT EXECUTED 4002ee44: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 4002ee48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002ee4c: 7f ff 5a 28 call 400056ec <== NOT EXECUTED 4002ee50: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002ee54: 81 c7 e0 08 ret <== NOT EXECUTED 4002ee58: 81 e8 00 00 restore <== NOT EXECUTED } return 0; } 4002ee5c: 81 c7 e0 08 ret <== NOT EXECUTED 4002ee60: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4002ee64: 40 00 0a b3 call 40031930 <__errno> <== NOT EXECUTED 4002ee68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ee6c: 82 10 20 5a mov 0x5a, %g1 <== NOT EXECUTED 4002ee70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ee74: 81 c7 e0 08 ret <== NOT EXECUTED 4002ee78: 81 e8 00 00 restore <== NOT EXECUTED /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4002ee7c: 40 00 0a ad call 40031930 <__errno> <== NOT EXECUTED 4002ee80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ee84: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED 4002ee88: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ee8c: 81 c7 e0 08 ret <== NOT EXECUTED 4002ee90: 81 e8 00 00 restore <== NOT EXECUTED 400220e4 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 400220e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 400220e8: 05 10 01 78 sethi %hi(0x4005e000), %g2 <== NOT EXECUTED 400220ec: c2 48 a0 b0 ldsb [ %g2 + 0xb0 ], %g1 ! 4005e0b0 <== NOT EXECUTED 400220f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400220f4: 02 80 00 04 be 40022104 <== NOT EXECUTED 400220f8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400220fc: 81 c7 e0 08 ret <== NOT EXECUTED 40022100: 81 e8 00 00 restore <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 40022104: 92 10 21 ff mov 0x1ff, %o1 <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 40022108: c2 28 a0 b0 stb %g1, [ %g2 + 0xb0 ] <== NOT EXECUTED mkdir("/etc", 0777); 4002210c: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED 40022110: 7f ff 8f 91 call 40005f54 <== NOT EXECUTED 40022114: 90 12 21 f0 or %o0, 0x1f0, %o0 ! 40046df0 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 40022118: 31 10 01 1b sethi %hi(0x40046c00), %i0 <== NOT EXECUTED 4002211c: 21 10 01 25 sethi %hi(0x40049400), %l0 <== NOT EXECUTED 40022120: 90 16 21 f8 or %i0, 0x1f8, %o0 <== NOT EXECUTED 40022124: 40 00 40 75 call 400322f8 <== NOT EXECUTED 40022128: 92 14 22 20 or %l0, 0x220, %o1 <== NOT EXECUTED 4002212c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022130: 22 80 00 0d be,a 40022164 <== NOT EXECUTED 40022134: 90 16 21 f8 or %i0, 0x1f8, %o0 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 40022138: 40 00 3e 56 call 40031a90 <== NOT EXECUTED 4002213c: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 40022140: 92 14 22 20 or %l0, 0x220, %o1 <== NOT EXECUTED 40022144: 31 10 01 1b sethi %hi(0x40046c00), %i0 <== NOT EXECUTED 40022148: 40 00 40 6c call 400322f8 <== NOT EXECUTED 4002214c: 90 16 22 70 or %i0, 0x270, %o0 ! 40046e70 <== NOT EXECUTED 40022150: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022154: 22 80 00 11 be,a 40022198 <== NOT EXECUTED 40022158: 90 16 22 70 or %i0, 0x270, %o0 <== NOT EXECUTED fclose(fp); 4002215c: 40 00 3e 4d call 40031a90 <== NOT EXECUTED 40022160: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 40022164: 13 10 01 17 sethi %hi(0x40045c00), %o1 <== NOT EXECUTED 40022168: 40 00 40 64 call 400322f8 <== NOT EXECUTED 4002216c: 92 12 63 78 or %o1, 0x378, %o1 ! 40045f78 <_CPU_Trap_slot_template+0x1518> <== NOT EXECUTED 40022170: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40022174: 02 bf ff f3 be 40022140 <== NOT EXECUTED 40022178: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4002217c: 94 10 20 66 mov 0x66, %o2 <== NOT EXECUTED 40022180: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 40022184: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED 40022188: 40 00 43 86 call 40032fa0 <== NOT EXECUTED 4002218c: 90 12 22 08 or %o0, 0x208, %o0 ! 40046e08 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 40022190: 10 bf ff ea b 40022138 <== NOT EXECUTED 40022194: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 40022198: 13 10 01 17 sethi %hi(0x40045c00), %o1 <== NOT EXECUTED 4002219c: 40 00 40 57 call 400322f8 <== NOT EXECUTED 400221a0: 92 12 63 78 or %o1, 0x378, %o1 ! 40045f78 <_CPU_Trap_slot_template+0x1518> <== NOT EXECUTED 400221a4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400221a8: 02 bf ff d5 be 400220fc <== NOT EXECUTED 400221ac: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 400221b0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400221b4: 94 10 20 2a mov 0x2a, %o2 <== NOT EXECUTED 400221b8: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 400221bc: 40 00 43 79 call 40032fa0 <== NOT EXECUTED 400221c0: 90 12 22 80 or %o0, 0x280, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 400221c4: 40 00 3e 33 call 40031a90 <== NOT EXECUTED 400221c8: 81 e8 00 00 restore <== NOT EXECUTED 400221cc: 01 00 00 00 nop 40016e58 : int ioctl( int fd, ioctl_command_t command, ... ) { 40016e58: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40016e5c: 03 10 00 9d sethi %hi(0x40027400), %g1 <== NOT EXECUTED 40016e60: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 ! 40027428 <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40016e64: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40016e68: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40016e6c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40016e70: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40016e74: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40016e78: 1a 80 00 1b bcc 40016ee4 <== NOT EXECUTED 40016e7c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40016e80: 03 10 00 a4 sethi %hi(0x40029000), %g1 <== NOT EXECUTED 40016e84: c6 00 60 d4 ld [ %g1 + 0xd4 ], %g3 ! 400290d4 <== NOT EXECUTED 40016e88: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40016e8c: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40016e90: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40016e94: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 40016e98: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40016e9c: 90 00 c0 01 add %g3, %g1, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40016ea0: c4 02 20 0c ld [ %o0 + 0xc ], %g2 <== NOT EXECUTED 40016ea4: 80 88 a1 00 btst 0x100, %g2 <== NOT EXECUTED 40016ea8: 02 80 00 0f be 40016ee4 <== NOT EXECUTED 40016eac: 82 07 a0 50 add %fp, 0x50, %g1 <== NOT EXECUTED /* * Now process the ioctl(). */ if ( !iop->handlers ) 40016eb0: c4 02 20 30 ld [ %o0 + 0x30 ], %g2 <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 40016eb4: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED /* * Now process the ioctl(). */ if ( !iop->handlers ) 40016eb8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40016ebc: 02 80 00 0a be 40016ee4 <== NOT EXECUTED 40016ec0: d4 07 a0 4c ld [ %fp + 0x4c ], %o2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 40016ec4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40016ec8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40016ecc: 02 80 00 0c be 40016efc <== NOT EXECUTED 40016ed0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 40016ed4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40016ed8: 01 00 00 00 nop <== NOT EXECUTED return rc; } 40016edc: 81 c7 e0 08 ret <== NOT EXECUTED 40016ee0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40016ee4: 40 00 02 14 call 40017734 <__errno> <== NOT EXECUTED 40016ee8: 01 00 00 00 nop <== NOT EXECUTED 40016eec: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40016ef0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40016ef4: 10 bf ff fa b 40016edc <== NOT EXECUTED 40016ef8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40016efc: 40 00 02 0e call 40017734 <__errno> <== NOT EXECUTED 40016f00: 01 00 00 00 nop <== NOT EXECUTED 40016f04: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40016f08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40016f0c: 10 bf ff f4 b 40016edc <== NOT EXECUTED 40016f10: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40003a9c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40003a9c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40003aa0: c6 06 60 30 ld [ %i1 + 0x30 ], %g3 <== NOT EXECUTED 40003aa4: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40003aa8: 02 80 00 03 be 40003ab4 <== NOT EXECUTED 40003aac: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40003ab0: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40003ab4: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40003ab8: 02 80 00 0b be 40003ae4 <== NOT EXECUTED 40003abc: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 40003ac0: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED 40003ac4: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 ! 40018018 <__ctype_ptr> <== NOT EXECUTED 40003ac8: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003acc: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED 40003ad0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40003ad4: 32 80 00 02 bne,a 40003adc <== NOT EXECUTED 40003ad8: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 40003adc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == '\r') { 40003ae0: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED 40003ae4: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 40003ae8: 02 80 00 41 be 40003bec <== NOT EXECUTED 40003aec: 80 a0 60 0a cmp %g1, 0xa <== 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)) { 40003af0: 02 80 00 14 be 40003b40 <== NOT EXECUTED 40003af4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003af8: 32 80 00 16 bne,a 40003b50 <== NOT EXECUTED 40003afc: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 40003b00: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED 40003b04: 05 10 00 5f sethi %hi(0x40017c00), %g2 <== NOT EXECUTED 40003b08: c2 00 a3 bc ld [ %g2 + 0x3bc ], %g1 ! 40017fbc <== NOT EXECUTED 40003b0c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003b10: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40003b14: 16 80 00 09 bge 40003b38 <== NOT EXECUTED 40003b18: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40003b1c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003b20: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40003b24: 12 80 00 3b bne 40003c10 <== NOT EXECUTED 40003b28: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40003b2c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 40003b30: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 40003b34: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40003b38: 81 c7 e0 08 ret <== NOT EXECUTED 40003b3c: 81 e8 00 00 restore <== 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)) { 40003b40: 80 88 e0 40 btst 0x40, %g3 <== NOT EXECUTED 40003b44: 32 80 00 02 bne,a 40003b4c <== NOT EXECUTED 40003b48: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003b4c: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40003b50: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40003b54: 22 bf ff ec be,a 40003b04 <== NOT EXECUTED 40003b58: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40003b5c: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 40003b60: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003b64: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40003b68: 22 80 00 34 be,a 40003c38 <== NOT EXECUTED 40003b6c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40003b70: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 40003b74: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40003b78: 22 80 00 41 be,a 40003c7c <== NOT EXECUTED 40003b7c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40003b80: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED 40003b84: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40003b88: 02 bf ff ec be 40003b38 <== NOT EXECUTED 40003b8c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40003b90: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40003b94: 02 80 00 2e be 40003c4c <== NOT EXECUTED 40003b98: 80 88 a0 48 btst 0x48, %g2 <== 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]) 40003b9c: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED 40003ba0: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40003ba4: 02 80 00 07 be 40003bc0 <== NOT EXECUTED 40003ba8: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003bac: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 40003bb0: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40003bb4: 32 bf ff d4 bne,a 40003b04 <== NOT EXECUTED 40003bb8: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 40003bbc: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003bc0: 22 80 00 05 be,a 40003bd4 <== NOT EXECUTED 40003bc4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003bc8: 7f ff ff 0d call 400037fc <== NOT EXECUTED 40003bcc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003bd0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003bd4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40003bd8: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40003bdc: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 40003be0: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 40003be4: 81 c7 e0 08 ret <== NOT EXECUTED 40003be8: 91 e8 20 01 restore %g0, 1, %o0 <== 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) 40003bec: 80 88 e0 80 btst 0x80, %g3 <== NOT EXECUTED 40003bf0: 02 80 00 04 be 40003c00 <== NOT EXECUTED 40003bf4: 80 88 e1 00 btst 0x100, %g3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 40003bf8: 81 c7 e0 08 ret <== NOT EXECUTED 40003bfc: 91 e8 20 00 restore %g0, 0, %o0 <== 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) 40003c00: 32 bf ff d3 bne,a 40003b4c <== NOT EXECUTED 40003c04: a0 10 20 0a mov 0xa, %l0 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003c08: 10 bf ff d2 b 40003b50 <== NOT EXECUTED 40003c0c: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 40003c10: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003c14: 7f ff fe fa call 400037fc <== NOT EXECUTED 40003c18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003c1c: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003c20: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 40003c24: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED 40003c28: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 40003c2c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40003c30: 81 c7 e0 08 ret <== NOT EXECUTED 40003c34: 91 e8 20 00 restore %g0, 0, %o0 <== 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); 40003c38: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003c3c: 7f ff ff 10 call 4000387c <== NOT EXECUTED 40003c40: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003c44: 81 c7 e0 08 ret <== NOT EXECUTED 40003c48: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 40003c4c: 22 80 00 05 be,a 40003c60 <== NOT EXECUTED 40003c50: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003c54: 7f ff fe ea call 400037fc <== NOT EXECUTED 40003c58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003c5c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003c60: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40003c64: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED 40003c68: c4 28 c0 01 stb %g2, [ %g3 + %g1 ] <== NOT EXECUTED 40003c6c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40003c70: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED 40003c74: 81 c7 e0 08 ret <== NOT EXECUTED 40003c78: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 40003c7c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003c80: 7f ff fe ff call 4000387c <== NOT EXECUTED 40003c84: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003c88: 81 c7 e0 08 ret <== NOT EXECUTED 40003c8c: 81 e8 00 00 restore <== NOT EXECUTED 40023084 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 40023084: 81 c3 e0 08 retl <== NOT EXECUTED 40023088: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 40015ef8 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 40015ef8: 9d e3 bf 98 save %sp, -104, %sp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 40015efc: 03 10 00 62 sethi %hi(0x40018800), %g1 40015f00: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 ! 400189c4 <_System_state_Current> 40015f04: 80 a0 a0 03 cmp %g2, 3 40015f08: 02 80 00 04 be 40015f18 40015f0c: 21 10 00 60 sethi %hi(0x40018000), %l0 40015f10: 81 c7 e0 08 ret <== NOT EXECUTED 40015f14: 81 e8 00 00 restore <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != &libc_global_reent) { 40015f18: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40015f1c: 03 10 00 5e sethi %hi(0x40017800), %g1 40015f20: b0 10 63 b8 or %g1, 0x3b8, %i0 ! 40017bb8 40015f24: 80 a0 80 18 cmp %g2, %i0 40015f28: 02 80 00 06 be 40015f40 40015f2c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 _wrapup_reent(&libc_global_reent); 40015f30: 40 00 01 ce call 40016668 <_wrapup_reent> 40015f34: 90 10 00 18 mov %i0, %o0 /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = &libc_global_reent; 40015f38: f0 24 20 20 st %i0, [ %l0 + 0x20 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 40015f3c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40015f40: 7f ff db 2b call 4000cbec 40015f44: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 40015f48: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40015f4c: 7f ff db 28 call 4000cbec 40015f50: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40015f54: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40015f58: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40015f5c: 7f ff db 24 call 4000cbec 40015f60: 81 e8 00 00 restore 40015f64: 01 00 00 00 nop 400226d4 : int link( const char *existing, const char *new ) { 400226d4: 9d e3 bf 70 save %sp, -144, %sp <== NOT EXECUTED /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true ); 400226d8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400226dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400226e0: a0 07 bf e4 add %fp, -28, %l0 <== NOT EXECUTED 400226e4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 400226e8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 400226ec: 7f ff 8b a2 call 40005574 <== NOT EXECUTED 400226f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( result != 0 ) 400226f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400226f8: 12 80 00 84 bne 40022908 <== NOT EXECUTED 400226fc: 01 00 00 00 nop <== NOT EXECUTED /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40022700: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 40022704: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 40022708: 02 80 00 06 be 40022720 <== NOT EXECUTED 4002270c: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 40022710: 02 80 00 04 be 40022720 <== NOT EXECUTED 40022714: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022718: 12 80 00 3a bne 40022800 <== NOT EXECUTED 4002271c: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40022720: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40022724: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 ! 4004a4e4 <== NOT EXECUTED 40022728: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 4002272c: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 40022730: c2 27 bf d4 st %g1, [ %fp + -44 ] <== NOT EXECUTED 40022734: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 <== NOT EXECUTED 40022738: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4002273c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 40022740: c2 27 bf dc st %g1, [ %fp + -36 ] <== NOT EXECUTED 40022744: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 <== NOT EXECUTED 40022748: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED if ( !parent_loc.ops->evalformake_h ) { 4002274c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40022750: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40022754: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022758: 02 80 00 5e be 400228d0 <== NOT EXECUTED 4002275c: 90 06 40 04 add %i1, %g4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 40022760: a2 07 bf d4 add %fp, -44, %l1 <== NOT EXECUTED 40022764: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40022768: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002276c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( result != 0 ) { 40022770: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 40022774: 12 80 00 48 bne 40022894 <== NOT EXECUTED 40022778: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 4002277c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40022780: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40022784: 12 80 00 2a bne 4002282c <== NOT EXECUTED 40022788: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 4002278c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED 40022790: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022794: 02 80 00 5f be 40022910 <== NOT EXECUTED 40022798: d4 07 bf f4 ld [ %fp + -12 ], %o2 <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 4002279c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400227a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400227a4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); 400227a8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400227ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400227b0: 02 80 00 08 be 400227d0 <== NOT EXECUTED 400227b4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400227b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400227bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400227c0: 22 80 00 05 be,a 400227d4 <== NOT EXECUTED 400227c4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400227c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400227cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 400227d0: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400227d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400227d8: 02 80 00 4c be 40022908 <== NOT EXECUTED 400227dc: 01 00 00 00 nop <== NOT EXECUTED 400227e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400227e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400227e8: 02 80 00 48 be 40022908 <== NOT EXECUTED 400227ec: 01 00 00 00 nop <== NOT EXECUTED 400227f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400227f4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED return result; } 400227f8: 81 c7 e0 08 ret <== NOT EXECUTED 400227fc: 81 e8 00 00 restore <== NOT EXECUTED /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40022800: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 <== NOT EXECUTED 40022804: 88 10 20 00 clr %g4 <== NOT EXECUTED 40022808: c2 00 e0 04 ld [ %g3 + 4 ], %g1 <== NOT EXECUTED 4002280c: c2 27 bf d4 st %g1, [ %fp + -44 ] <== NOT EXECUTED 40022810: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40022814: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 40022818: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 4002281c: c2 27 bf dc st %g1, [ %fp + -36 ] <== NOT EXECUTED 40022820: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 <== NOT EXECUTED 40022824: 10 bf ff ca b 4002274c <== NOT EXECUTED 40022828: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 4002282c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40022830: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022834: 22 80 00 09 be,a 40022858 <== NOT EXECUTED 40022838: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 4002283c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022840: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022844: 22 80 00 05 be,a 40022858 <== NOT EXECUTED 40022848: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 4002284c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022850: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 40022854: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40022858: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002285c: 02 80 00 08 be 4002287c <== NOT EXECUTED 40022860: 01 00 00 00 nop <== NOT EXECUTED 40022864: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022868: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002286c: 02 80 00 04 be 4002287c <== NOT EXECUTED 40022870: 01 00 00 00 nop <== NOT EXECUTED 40022874: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022878: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 4002287c: 40 00 3c 2d call 40031930 <__errno> <== NOT EXECUTED 40022880: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40022884: 82 10 20 12 mov 0x12, %g1 <== NOT EXECUTED 40022888: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002288c: 81 c7 e0 08 ret <== NOT EXECUTED 40022890: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 40022894: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40022898: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002289c: 02 80 00 08 be 400228bc <== NOT EXECUTED 400228a0: 01 00 00 00 nop <== NOT EXECUTED 400228a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400228a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400228ac: 02 80 00 04 be 400228bc <== NOT EXECUTED 400228b0: 01 00 00 00 nop <== NOT EXECUTED 400228b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400228b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 400228bc: 40 00 3c 1d call 40031930 <__errno> <== NOT EXECUTED 400228c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400228c4: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED 400228c8: 81 c7 e0 08 ret <== NOT EXECUTED 400228cc: 81 e8 00 00 restore <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 400228d0: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400228d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400228d8: 02 80 00 08 be 400228f8 <== NOT EXECUTED 400228dc: 01 00 00 00 nop <== NOT EXECUTED 400228e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400228e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400228e8: 02 80 00 04 be 400228f8 <== NOT EXECUTED 400228ec: 01 00 00 00 nop <== NOT EXECUTED 400228f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400228f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 400228f8: 40 00 3c 0e call 40031930 <__errno> <== NOT EXECUTED 400228fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40022900: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40022904: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40022908: 81 c7 e0 08 ret <== NOT EXECUTED 4002290c: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 40022910: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40022914: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022918: 02 80 00 0a be 40022940 <== NOT EXECUTED 4002291c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40022920: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022924: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022928: 02 80 00 06 be 40022940 <== NOT EXECUTED 4002292c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40022930: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022934: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40022938: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 4002293c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40022940: 02 bf ff ee be 400228f8 <== NOT EXECUTED 40022944: 01 00 00 00 nop <== NOT EXECUTED 40022948: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002294c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022950: 02 bf ff ea be 400228f8 <== NOT EXECUTED 40022954: 01 00 00 00 nop <== NOT EXECUTED 40022958: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002295c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40022960: 30 bf ff e6 b,a 400228f8 <== NOT EXECUTED 40015dc0 : off_t lseek( int fd, off_t offset, int whence ) { 40015dc0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40015dc4: 03 10 00 5e sethi %hi(0x40017800), %g1 <== NOT EXECUTED 40015dc8: c4 00 62 a8 ld [ %g1 + 0x2a8 ], %g2 ! 40017aa8 <== NOT EXECUTED off_t lseek( int fd, off_t offset, int whence ) { 40015dcc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40015dd0: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40015dd4: 1a 80 00 31 bcc 40015e98 <== NOT EXECUTED 40015dd8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40015ddc: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 40015de0: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 ! 40018640 <== NOT EXECUTED 40015de4: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40015de8: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40015dec: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40015df0: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 40015df4: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40015df8: b0 00 c0 01 add %g3, %g1, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40015dfc: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 40015e00: 80 88 a1 00 btst 0x100, %g2 <== NOT EXECUTED 40015e04: 02 80 00 25 be 40015e98 <== NOT EXECUTED 40015e08: 01 00 00 00 nop <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 40015e0c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 <== NOT EXECUTED 40015e10: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED 40015e14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015e18: 02 80 00 26 be 40015eb0 <== NOT EXECUTED 40015e1c: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40015e20: 02 80 00 1b be 40015e8c <== NOT EXECUTED 40015e24: f4 06 20 08 ld [ %i0 + 8 ], %i2 <== NOT EXECUTED 40015e28: 80 a2 a0 02 cmp %o2, 2 <== NOT EXECUTED 40015e2c: 02 80 00 0d be 40015e60 <== NOT EXECUTED 40015e30: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 40015e34: 12 80 00 0f bne 40015e70 <== NOT EXECUTED 40015e38: 01 00 00 00 nop <== NOT EXECUTED case SEEK_SET: iop->offset = offset; 40015e3c: f2 26 20 08 st %i1, [ %i0 + 8 ] <== NOT EXECUTED /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 40015e40: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED 40015e44: 9f c0 40 00 call %g1 <== NOT EXECUTED 40015e48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( status == (off_t) -1 ) 40015e4c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40015e50: 22 80 00 02 be,a 40015e58 <== NOT EXECUTED 40015e54: f4 26 20 08 st %i2, [ %i0 + 8 ] <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40015e58: 81 c7 e0 08 ret <== NOT EXECUTED 40015e5c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 40015e60: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40015e64: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED 40015e68: 10 bf ff f6 b 40015e40 <== NOT EXECUTED 40015e6c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40015e70: 7f ff db 07 call 4000ca8c <__errno> <== NOT EXECUTED 40015e74: 01 00 00 00 nop <== NOT EXECUTED 40015e78: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40015e7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015e80: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40015e84: 81 c7 e0 08 ret <== NOT EXECUTED 40015e88: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 40015e8c: 82 06 40 1a add %i1, %i2, %g1 <== NOT EXECUTED 40015e90: 10 bf ff ec b 40015e40 <== NOT EXECUTED 40015e94: c2 26 20 08 st %g1, [ %i0 + 8 ] <== 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); 40015e98: 7f ff da fd call 4000ca8c <__errno> <== NOT EXECUTED 40015e9c: 01 00 00 00 nop <== NOT EXECUTED 40015ea0: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40015ea4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015ea8: 10 bf ff ec b 40015e58 <== NOT EXECUTED 40015eac: 90 10 3f ff mov -1, %o0 <== 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 ); 40015eb0: 7f ff da f7 call 4000ca8c <__errno> <== NOT EXECUTED 40015eb4: 01 00 00 00 nop <== NOT EXECUTED 40015eb8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40015ebc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015ec0: 10 bf ff e6 b 40015e58 <== NOT EXECUTED 40015ec4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40022aa0 : int _STAT_NAME( const char *path, struct stat *buf ) { 40022aa0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40022aa4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40022aa8: 02 80 00 32 be 40022b70 <== NOT EXECUTED 40022aac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 40022ab0: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40022ab4: 92 10 20 00 clr %o1 <== NOT EXECUTED 40022ab8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40022abc: 96 10 20 00 clr %o3 <== NOT EXECUTED 40022ac0: 7f ff 8a ad call 40005574 <== NOT EXECUTED 40022ac4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( status != 0 ) 40022ac8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022acc: 12 80 00 27 bne 40022b68 <== NOT EXECUTED 40022ad0: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 40022ad4: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40022ad8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022adc: 02 80 00 2b be 40022b88 <== NOT EXECUTED 40022ae0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40022ae4: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 40022ae8: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 40022aec: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 40022af0: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 40022af4: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 40022af8: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 40022afc: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 40022b00: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 40022b04: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 40022b08: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 40022b0c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 40022b10: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 40022b14: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 40022b18: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 40022b1c: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 40022b20: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 40022b24: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 40022b28: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED 40022b2c: c0 26 60 48 clr [ %i1 + 0x48 ] <== NOT EXECUTED 40022b30: c0 26 60 4c clr [ %i1 + 0x4c ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 40022b34: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40022b38: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022b3c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40022b40: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40022b44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022b48: 02 80 00 08 be 40022b68 <== NOT EXECUTED 40022b4c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40022b50: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022b54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022b58: 02 80 00 1a be 40022bc0 <== NOT EXECUTED 40022b5c: 01 00 00 00 nop <== NOT EXECUTED 40022b60: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022b64: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 40022b68: 81 c7 e0 08 ret <== NOT EXECUTED 40022b6c: 81 e8 00 00 restore <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 40022b70: 40 00 3b 70 call 40031930 <__errno> <== NOT EXECUTED 40022b74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40022b78: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40022b7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40022b80: 81 c7 e0 08 ret <== NOT EXECUTED 40022b84: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 40022b88: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40022b8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022b90: 02 80 00 08 be 40022bb0 <== NOT EXECUTED 40022b94: 01 00 00 00 nop <== NOT EXECUTED 40022b98: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022b9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022ba0: 02 80 00 04 be 40022bb0 <== NOT EXECUTED 40022ba4: 01 00 00 00 nop <== NOT EXECUTED 40022ba8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022bac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40022bb0: 40 00 3b 60 call 40031930 <__errno> <== NOT EXECUTED 40022bb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40022bb8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40022bbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40022bc0: 81 c7 e0 08 ret <== NOT EXECUTED 40022bc4: 81 e8 00 00 restore <== NOT EXECUTED 4000ab6c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000ab6c: 9d e3 bf 98 save %sp, -104, %sp 4000ab70: 05 10 00 61 sethi %hi(0x40018400), %g2 4000ab74: 84 10 a2 a8 or %g2, 0x2a8, %g2 ! 400186a8 4000ab78: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000ab7c: a2 10 00 18 mov %i0, %l1 4000ab80: 82 00 60 01 inc %g1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000ab84: 7f ff ff ed call 4000ab38 4000ab88: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* * Validate the parameters */ if ( !size ) 4000ab8c: 80 a6 20 00 cmp %i0, 0 4000ab90: 02 80 00 23 be 4000ac1c 4000ab94: 03 10 00 62 sethi %hi(0x40018800), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000ab98: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 ! 400189c4 <_System_state_Current> 4000ab9c: 80 a0 a0 03 cmp %g2, 3 4000aba0: 02 80 00 1a be 4000ac08 4000aba4: 11 10 00 61 sethi %hi(0x40018400), %o0 * 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 ); 4000aba8: 92 10 00 11 mov %l1, %o1 4000abac: 40 00 03 a9 call 4000ba50 <_Protected_heap_Allocate> 4000abb0: 90 12 22 50 or %o0, 0x250, %o0 if ( !return_this ) { 4000abb4: b0 92 20 00 orcc %o0, 0, %i0 4000abb8: 02 80 00 1b be 4000ac24 4000abbc: a0 10 00 18 mov %i0, %l0 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4000abc0: 03 10 00 61 sethi %hi(0x40018400), %g1 4000abc4: c2 00 60 cc ld [ %g1 + 0xcc ], %g1 ! 400184cc 4000abc8: 80 a0 60 00 cmp %g1, 0 4000abcc: 02 80 00 04 be 4000abdc 4000abd0: 92 10 00 11 mov %l1, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000abd4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000abd8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000abdc: 03 10 00 61 sethi %hi(0x40018400), %g1 4000abe0: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 ! 400184c4 4000abe4: 80 a0 60 00 cmp %g1, 0 4000abe8: 02 80 00 06 be 4000ac00 4000abec: b0 10 00 10 mov %l0, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000abf0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000abf4: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED 4000abf8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000abfc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000ac00: 81 c7 e0 08 ret 4000ac04: 81 e8 00 00 restore return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000ac08: 7f ff ff b2 call 4000aad0 4000ac0c: 01 00 00 00 nop 4000ac10: 80 8a 20 ff btst 0xff, %o0 4000ac14: 12 bf ff e5 bne 4000aba8 4000ac18: 11 10 00 61 sethi %hi(0x40018400), %o0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000ac1c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ac20: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 4000ac24: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 4000ac28: c2 00 60 c8 ld [ %g1 + 0xc8 ], %g1 ! 400184c8 <== NOT EXECUTED 4000ac2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ac30: 02 80 00 08 be 4000ac50 <== NOT EXECUTED 4000ac34: 01 00 00 00 nop <== NOT EXECUTED return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000ac38: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000ac3c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ac40: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( !return_this ) { 4000ac44: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000ac48: 12 bf ff df bne 4000abc4 <== NOT EXECUTED 4000ac4c: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED errno = ENOMEM; 4000ac50: 40 00 07 8f call 4000ca8c <__errno> <== NOT EXECUTED 4000ac54: 01 00 00 00 nop <== NOT EXECUTED 4000ac58: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000ac5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ac60: 81 c7 e0 08 ret <== NOT EXECUTED 4000ac64: 81 e8 00 00 restore <== NOT EXECUTED 4000ab1c : } void malloc_deferred_free( void *pointer ) { 4000ab1c: 92 10 00 08 mov %o0, %o1 <== 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 ); 4000ab20: 11 10 00 62 sethi %hi(0x40018800), %o0 <== NOT EXECUTED 4000ab24: 90 12 22 dc or %o0, 0x2dc, %o0 ! 40018adc <== NOT EXECUTED 4000ab28: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000ab2c: 7f ff ed bc call 4000621c <_Chain_Append> <== NOT EXECUTED 4000ab30: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000ab34: 01 00 00 00 nop 4000ab38 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4000ab38: 9d e3 bf 98 save %sp, -104, %sp 4000ab3c: 03 10 00 62 sethi %hi(0x40018800), %g1 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4000ab40: 10 80 00 04 b 4000ab50 4000ab44: a0 10 62 dc or %g1, 0x2dc, %l0 ! 40018adc /* * 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); 4000ab48: 7f ff fe 92 call 4000a590 <== NOT EXECUTED 4000ab4c: 01 00 00 00 nop <== NOT EXECUTED 4000ab50: 40 00 02 52 call 4000b498 <_Chain_Get> 4000ab54: 90 10 00 10 mov %l0, %o0 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) 4000ab58: 80 a2 20 00 cmp %o0, 0 4000ab5c: 12 bf ff fb bne 4000ab48 4000ab60: 01 00 00 00 nop free(to_be_freed); } 4000ab64: 81 c7 e0 08 ret 4000ab68: 81 e8 00 00 restore 400280d0 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 400280d0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 400280d4: 03 10 01 2e sethi %hi(0x4004b800), %g1 <== NOT EXECUTED 400280d8: d2 00 61 48 ld [ %g1 + 0x148 ], %o1 ! 4004b948 <== NOT EXECUTED 400280dc: 7f ff 74 70 call 4000529c <== NOT EXECUTED 400280e0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED if ( memory ) 400280e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400280e8: 02 80 00 05 be 400280fc <== NOT EXECUTED 400280ec: 05 10 01 78 sethi %hi(0x4005e000), %g2 <== NOT EXECUTED memfile_blocks_allocated++; 400280f0: c2 00 a2 78 ld [ %g2 + 0x278 ], %g1 ! 4005e278 <== NOT EXECUTED 400280f4: 82 00 60 01 inc %g1 <== NOT EXECUTED 400280f8: c2 20 a2 78 st %g1, [ %g2 + 0x278 ] <== NOT EXECUTED return memory; } 400280fc: 81 c7 e0 08 ret <== NOT EXECUTED 40028100: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4002862c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4002862c: 9d e3 bf 98 save %sp, -104, %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) ) { 40028630: 7f ff 74 d0 call 40005970 <== NOT EXECUTED 40028634: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028638: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002863c: 12 80 00 13 bne 40028688 <== NOT EXECUTED 40028640: 01 00 00 00 nop <== NOT EXECUTED 40028644: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 40028648: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002864c: 12 80 00 0f bne 40028688 <== NOT EXECUTED 40028650: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 40028654: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 4004a4e4 <== NOT EXECUTED 40028658: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4002865c: 80 a0 80 18 cmp %g2, %i0 <== NOT EXECUTED 40028660: 22 80 00 02 be,a 40028668 <== NOT EXECUTED 40028664: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 40028668: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4002866c: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 40028670: 02 80 00 04 be 40028680 <== NOT EXECUTED 40028674: 01 00 00 00 nop <== NOT EXECUTED IMFS_memfile_remove( the_jnode ); 40028678: 7f ff ff 7d call 4002846c <== NOT EXECUTED 4002867c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free( the_jnode ); 40028680: 7f ff 74 1b call 400056ec <== NOT EXECUTED 40028684: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 40028688: 81 c7 e0 08 ret <== NOT EXECUTED 4002868c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400286e4 : */ int memfile_close( rtems_libio_t *iop ) { 400286e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (iop->flags & LIBIO_FLAGS_APPEND) 400286e8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 400286ec: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400286f0: 02 80 00 04 be 40028700 <== NOT EXECUTED 400286f4: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED iop->offset = the_jnode->info.file.size; 400286f8: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 400286fc: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED memfile_check_rmnod( the_jnode ); 40028700: 7f ff ff cb call 4002862c <== NOT EXECUTED 40028704: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40028708: 81 c7 e0 08 ret <== NOT EXECUTED 4002870c: 81 e8 00 00 restore <== NOT EXECUTED 400280ac : */ void memfile_free_block( void *memory ) { 400280ac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED #if 0 fprintf(stdout, "(d %p) ", memory ); fflush(stdout); #endif free(memory); 400280b0: 7f ff 75 8f call 400056ec <== NOT EXECUTED 400280b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memfile_blocks_allocated--; 400280b8: 05 10 01 78 sethi %hi(0x4005e000), %g2 <== NOT EXECUTED 400280bc: c2 00 a2 78 ld [ %g2 + 0x278 ], %g1 ! 4005e278 <== NOT EXECUTED 400280c0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400280c4: c2 20 a2 78 st %g1, [ %g2 + 0x278 ] <== NOT EXECUTED } 400280c8: 81 c7 e0 08 ret <== NOT EXECUTED 400280cc: 81 e8 00 00 restore <== NOT EXECUTED 400283e8 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 400283e8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED /* * Perform internal consistency checks */ assert( block_table ); 400283ec: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400283f0: 02 80 00 16 be 40028448 <== NOT EXECUTED 400283f4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== NOT EXECUTED 400283fc: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 40028400: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40028404: a2 10 20 00 clr %l1 <== NOT EXECUTED if ( b[i] ) { 40028408: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4002840c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028410: 02 80 00 05 be 40028424 <== NOT EXECUTED 40028414: a2 04 60 01 inc %l1 <== NOT EXECUTED memfile_free_block( b[i] ); 40028418: 7f ff ff 25 call 400280ac <== NOT EXECUTED 4002841c: 01 00 00 00 nop <== NOT EXECUTED b[i] = 0; 40028420: c0 24 00 00 clr [ %l0 ] <== NOT EXECUTED * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== NOT EXECUTED 4002842c: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED 40028430: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 40028434: 7f ff ff 1e call 400280ac <== NOT EXECUTED 40028438: 01 00 00 00 nop <== NOT EXECUTED *block_table = 0; 4002843c: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED } 40028440: 81 c7 e0 08 ret <== NOT EXECUTED 40028444: 81 e8 00 00 restore <== NOT EXECUTED /* * Perform internal consistency checks */ assert( block_table ); 40028448: 11 10 01 1c sethi %hi(0x40047000), %o0 <== NOT EXECUTED 4002844c: 15 10 01 1c sethi %hi(0x40047000), %o2 <== NOT EXECUTED 40028450: 17 10 01 1c sethi %hi(0x40047000), %o3 <== NOT EXECUTED 40028454: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40028458: 94 12 a2 58 or %o2, 0x258, %o2 <== NOT EXECUTED 4002845c: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 40028460: 7f ff 73 77 call 4000523c <__assert_func> <== NOT EXECUTED 40028464: 92 10 21 b1 mov 0x1b1, %o1 <== NOT EXECUTED 40028468: 01 00 00 00 nop 4002890c : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 4002890c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40028910: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 <== NOT EXECUTED * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 40028914: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 40028918: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4002891c: 06 80 00 0c bl 4002894c <== NOT EXECUTED 40028920: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 40028924: f2 24 20 4c st %i1, [ %l0 + 0x4c ] <== NOT EXECUTED iop->size = the_jnode->info.file.size; 40028928: f2 26 20 04 st %i1, [ %i0 + 4 ] <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4002892c: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 40028930: 7f ff 73 9a call 40005798 <== NOT EXECUTED 40028934: 92 10 20 00 clr %o1 <== NOT EXECUTED 40028938: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4002893c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40028940: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return 0; } 40028944: 81 c7 e0 08 ret <== NOT EXECUTED 40028948: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 4002894c: 7f ff ff 9b call 400287b8 <== NOT EXECUTED 40028950: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 40028954: 81 c7 e0 08 ret <== NOT EXECUTED 40028958: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400280a4 : IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; return 0; } 400280a4: 81 c3 e0 08 retl <== NOT EXECUTED 400280a8: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 4002895c : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 4002895c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40028960: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { 40028964: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 40028968: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4002896c: 12 80 00 0a bne 40028994 <== NOT EXECUTED 40028970: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) 40028974: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 40028978: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4002897c: 80 a6 00 08 cmp %i0, %o0 <== NOT EXECUTED 40028980: 04 80 00 14 ble 400289d0 <== NOT EXECUTED 40028984: 01 00 00 00 nop <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 40028988: d0 24 60 08 st %o0, [ %l1 + 8 ] <== NOT EXECUTED 4002898c: 81 c7 e0 08 ret <== NOT EXECUTED 40028990: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 40028994: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED 40028998: 7f ff ff 88 call 400287b8 <== NOT EXECUTED 4002899c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400289a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400289a4: 12 80 00 07 bne 400289c0 <== NOT EXECUTED 400289a8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 400289ac: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 400289b0: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 400289b4: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED } return iop->offset; } 400289b8: 81 c7 e0 08 ret <== NOT EXECUTED 400289bc: 81 e8 00 00 restore <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 400289c0: 40 00 23 dc call 40031930 <__errno> <== NOT EXECUTED 400289c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400289c8: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 400289cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400289d0: 81 c7 e0 08 ret <== NOT EXECUTED 400289d4: 81 e8 00 00 restore <== NOT EXECUTED 40028c98 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40028c98: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 40028c9c: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40028ca0: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 40028ca4: 80 88 a2 04 btst 0x204, %g2 <== NOT EXECUTED 40028ca8: 02 80 00 06 be 40028cc0 <== NOT EXECUTED 40028cac: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 <== NOT EXECUTED 40028cb0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 40028cb4: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 40028cb8: 22 80 00 0b be,a 40028ce4 <== NOT EXECUTED 40028cbc: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 40028cc0: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 40028cc4: 02 80 00 04 be 40028cd4 <== NOT EXECUTED 40028cc8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED iop->offset = the_jnode->info.file.size; 40028ccc: c2 24 60 08 st %g1, [ %l1 + 8 ] <== NOT EXECUTED iop->size = the_jnode->info.file.size; 40028cd0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 40028cd4: b0 10 20 00 clr %i0 <== NOT EXECUTED 40028cd8: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED return 0; } 40028cdc: 81 c7 e0 08 ret <== NOT EXECUTED 40028ce0: 81 e8 00 00 restore <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 40028ce4: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 40028ce8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 40028cec: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 40028cf0: c0 24 20 4c clr [ %l0 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; 40028cf4: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 40028cf8: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 40028cfc: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 40028d00: 12 80 00 08 bne 40028d20 <== NOT EXECUTED 40028d04: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 40028d08: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 40028d0c: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 40028d10: 02 bf ff f1 be 40028cd4 <== NOT EXECUTED 40028d14: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED iop->offset = the_jnode->info.file.size; 40028d18: 10 bf ff ee b 40028cd0 <== NOT EXECUTED 40028d1c: c2 24 60 08 st %g1, [ %l1 + 8 ] <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 40028d20: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40028d24: 92 10 20 00 clr %o1 <== NOT EXECUTED 40028d28: 7f ff ff 2c call 400289d8 <== NOT EXECUTED 40028d2c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028d30: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40028d34: 02 bf ff ea be 40028cdc <== NOT EXECUTED 40028d38: 01 00 00 00 nop <== NOT EXECUTED 40028d3c: 10 bf ff f4 b 40028d0c <== NOT EXECUTED 40028d40: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED 40029014 : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40029014: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; return IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); 40029018: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4002901c: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 <== NOT EXECUTED ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40029020: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; return IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); 40029024: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40029028: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002902c: 7f ff ff 46 call 40028d44 <== NOT EXECUTED 40029030: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40029034: 01 00 00 00 nop <== NOT EXECUTED 40028690 : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40028690: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40028694: f0 06 00 00 ld [ %i0 ], %i0 <== NOT EXECUTED /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 40028698: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 4002869c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400286a0: 22 80 00 06 be,a 400286b8 <== NOT EXECUTED 400286a4: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 400286a8: 7f ff f1 36 call 40024b80 <_Chain_Extract> <== NOT EXECUTED 400286ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 400286b0: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400286b4: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED IMFS_update_ctime( the_jnode ); 400286b8: 92 10 20 00 clr %o1 <== NOT EXECUTED /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400286bc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED IMFS_update_ctime( the_jnode ); 400286c0: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 400286c4: 7f ff 74 35 call 40005798 <== NOT EXECUTED 400286c8: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] <== NOT EXECUTED 400286cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED return memfile_check_rmnod( the_jnode ); 400286d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400286d4: 7f ff ff d6 call 4002862c <== NOT EXECUTED 400286d8: c2 26 20 44 st %g1, [ %i0 + 0x44 ] <== NOT EXECUTED } 400286dc: 81 c7 e0 08 ret <== NOT EXECUTED 400286e0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40028c68 : ssize_t memfile_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 40028c68: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; ssize_t status; the_jnode = iop->file_info; 40028c6c: e2 06 20 2c ld [ %i0 + 0x2c ], %l1 <== NOT EXECUTED status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count ); 40028c70: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED 40028c74: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40028c78: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40028c7c: 7f ff ff 57 call 400289d8 <== NOT EXECUTED 40028c80: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 40028c84: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED ssize_t memfile_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 40028c88: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED ssize_t status; the_jnode = iop->file_info; status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count ); iop->size = the_jnode->info.file.size; 40028c8c: c2 24 20 04 st %g1, [ %l0 + 4 ] <== NOT EXECUTED return status; } 40028c90: 81 c7 e0 08 ret <== NOT EXECUTED 40028c94: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400095f8 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 400095f8: 13 10 00 5b sethi %hi(0x40016c00), %o1 400095fc: 15 10 00 61 sethi %hi(0x40018400), %o2 40009600: 92 12 63 c8 or %o1, 0x3c8, %o1 40009604: 94 12 a1 dc or %o2, 0x1dc, %o2 40009608: 96 10 00 0a mov %o2, %o3 4000960c: 82 13 c0 00 mov %o7, %g1 40009610: 40 00 02 85 call 4000a024 40009614: 9e 10 40 00 mov %g1, %o7 40009618: 01 00 00 00 nop <== NOT EXECUTED 40022ce4 : int mkfifo( const char *path, mode_t mode ) { return mknod( path, mode | S_IFIFO, 0LL ); 40022ce4: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 40022ce8: 94 10 20 00 clr %o2 <== NOT EXECUTED 40022cec: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 40022cf0: 96 10 20 00 clr %o3 <== NOT EXECUTED 40022cf4: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 40022cf8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40022cfc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022d00: 7f ff 8c 9f call 40005f7c <== NOT EXECUTED 40022d04: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022d08: 01 00 00 00 nop 400022a0 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400022a0: 9d e3 bf 80 save %sp, -128, %sp rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 400022a4: 03 00 00 3c sethi %hi(0xf000), %g1 400022a8: b3 2e 60 10 sll %i1, 0x10, %i1 400022ac: b3 36 60 10 srl %i1, 0x10, %i1 400022b0: 84 8e 40 01 andcc %i1, %g1, %g2 400022b4: 02 80 00 4e be 400023ec 400022b8: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) 400022bc: 80 a0 80 01 cmp %g2, %g1 400022c0: 02 80 00 18 be 40002320 400022c4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400022c8: c2 4e 00 00 ldsb [ %i0 ], %g1 400022cc: 80 a0 60 2f cmp %g1, 0x2f 400022d0: 02 80 00 1a be 40002338 400022d4: 80 a0 60 5c cmp %g1, 0x5c 400022d8: 02 80 00 18 be 40002338 <== NOT EXECUTED 400022dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400022e0: 02 80 00 17 be 4000233c <== NOT EXECUTED 400022e4: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 400022e8: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 ! 40017fcc <== NOT EXECUTED 400022ec: 88 10 20 00 clr %g4 <== NOT EXECUTED 400022f0: c2 00 e0 04 ld [ %g3 + 4 ], %g1 <== NOT EXECUTED 400022f4: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 400022f8: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 400022fc: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED 40002300: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 40002304: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED if ( !temp_loc.ops->evalformake_h ) { 40002308: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 4000230c: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 <== NOT EXECUTED if ( !temp_loc.ops->evalformake_h ) { 40002310: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40002314: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002318: 12 80 00 17 bne 40002374 <== NOT EXECUTED 4000231c: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002320: 40 00 29 db call 4000ca8c <__errno> <== NOT EXECUTED 40002324: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002328: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000232c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002330: 81 c7 e0 08 ret <== NOT EXECUTED 40002334: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40002338: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000233c: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 ! 40017fcc 40002340: 88 10 20 01 mov 1, %g4 40002344: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40002348: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000234c: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40002350: c4 27 bf e8 st %g2, [ %fp + -24 ] 40002354: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40002358: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 4000235c: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40002360: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 40002364: c2 00 60 04 ld [ %g1 + 4 ], %g1 40002368: 80 a0 60 00 cmp %g1, 0 4000236c: 02 bf ff ed be 40002320 40002370: c4 27 bf f0 st %g2, [ %fp + -16 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 40002374: 90 06 00 04 add %i0, %g4, %o0 40002378: a0 07 bf e4 add %fp, -28, %l0 4000237c: 94 07 bf f4 add %fp, -12, %o2 40002380: 92 10 00 10 mov %l0, %o1 40002384: 9f c0 40 00 call %g1 40002388: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 4000238c: 80 a2 20 00 cmp %o0, 0 40002390: 12 bf ff e8 bne 40002330 40002394: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 40002398: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 4000239c: 80 a0 a0 00 cmp %g2, 0 400023a0: 02 80 00 19 be 40002404 400023a4: d0 07 bf f4 ld [ %fp + -12 ], %o0 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 ); 400023a8: 92 10 00 19 mov %i1, %o1 400023ac: 94 10 00 1a mov %i2, %o2 400023b0: 96 10 00 1b mov %i3, %o3 400023b4: 9f c0 80 00 call %g2 400023b8: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400023bc: c2 07 bf ec ld [ %fp + -20 ], %g1 400023c0: 80 a0 60 00 cmp %g1, 0 400023c4: 02 bf ff db be 40002330 400023c8: b0 10 00 08 mov %o0, %i0 400023cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400023d0: 80 a0 60 00 cmp %g1, 0 400023d4: 02 80 00 0a be 400023fc 400023d8: 01 00 00 00 nop 400023dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400023e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 400023e4: 81 c7 e0 08 ret <== NOT EXECUTED 400023e8: 81 e8 00 00 restore <== NOT EXECUTED int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 400023ec: 40 00 29 a8 call 4000ca8c <__errno> <== NOT EXECUTED 400023f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400023f4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400023f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400023fc: 81 c7 e0 08 ret 40002400: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 40002404: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002408: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000240c: 02 bf ff c5 be 40002320 <== NOT EXECUTED 40002410: 01 00 00 00 nop <== NOT EXECUTED 40002414: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002418: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000241c: 30 bf ff c1 b,a 40002320 <== NOT EXECUTED 4000acb0 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 4000acb0: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 4000acb4: 80 a6 60 00 cmp %i1, 0 4000acb8: 02 80 00 a1 be 4000af3c 4000acbc: a4 10 00 18 mov %i0, %l2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4000acc0: 80 a6 a0 01 cmp %i2, 1 4000acc4: 18 80 00 9e bgu 4000af3c 4000acc8: 01 00 00 00 nop errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 4000accc: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000acd0: 80 a0 60 00 cmp %g1, 0 4000acd4: 02 80 00 35 be 4000ada8 4000acd8: 80 a6 e0 00 cmp %i3, 0 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 4000acdc: 02 80 00 05 be 4000acf0 4000ace0: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 4000ace4: 40 00 0c 8c call 4000df14 <== NOT EXECUTED 4000ace8: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000acec: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4000acf0: 7f ff ff 9f call 4000ab6c 4000acf4: 01 00 00 00 nop if ( !temp_mt_entry ) { 4000acf8: a0 92 20 00 orcc %o0, 0, %l0 4000acfc: 02 80 00 96 be 4000af54 4000ad00: a2 10 00 10 mov %l0, %l1 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 4000ad04: f4 24 20 28 st %i2, [ %l0 + 0x28 ] if ( device ) { 4000ad08: 80 a6 e0 00 cmp %i3, 0 4000ad0c: 02 80 00 4b be 4000ae38 4000ad10: e0 24 20 24 st %l0, [ %l0 + 0x24 ] temp_mt_entry->dev = 4000ad14: 90 04 20 64 add %l0, 0x64, %o0 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 4000ad18: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000ad1c: 40 00 0c 5c call 4000de8c <== NOT EXECUTED 4000ad20: d0 24 20 60 st %o0, [ %l0 + 0x60 ] <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 4000ad24: 80 a7 20 00 cmp %i4, 0 4000ad28: 02 80 00 29 be 4000adcc 4000ad2c: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 4000ad30: b6 07 bf e8 add %fp, -24, %i3 <== NOT EXECUTED 4000ad34: 92 10 20 07 mov 7, %o1 <== NOT EXECUTED 4000ad38: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4000ad3c: 7f ff dc 98 call 40001f9c <== NOT EXECUTED 4000ad40: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 4000ad44: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4000ad48: 02 80 00 1c be 4000adb8 <== NOT EXECUTED 4000ad4c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 4000ad50: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4000ad54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ad58: 02 80 00 6d be 4000af0c <== NOT EXECUTED 4000ad5c: 01 00 00 00 nop <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4000ad60: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ad64: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000ad68: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4000ad6c: 02 80 00 35 be 4000ae40 <== NOT EXECUTED 4000ad70: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED errno = ENOTDIR; 4000ad74: 40 00 07 46 call 4000ca8c <__errno> <== NOT EXECUTED 4000ad78: 01 00 00 00 nop <== NOT EXECUTED 4000ad7c: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 4000ad80: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000ad84: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000ad88: 7f ff fe 02 call 4000a590 <== NOT EXECUTED 4000ad8c: b8 10 00 1b mov %i3, %i4 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000ad90: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED 4000ad94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ad98: 32 80 00 62 bne,a 4000af20 <== NOT EXECUTED 4000ad9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED return -1; } 4000ada0: 81 c7 e0 08 ret <== NOT EXECUTED 4000ada4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 4000ada8: 40 00 07 39 call 4000ca8c <__errno> <== NOT EXECUTED 4000adac: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000adb0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000adb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000adb8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000adbc: 7f ff fd f5 call 4000a590 <== NOT EXECUTED 4000adc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000adc4: 81 c7 e0 08 ret <== NOT EXECUTED 4000adc8: 81 e8 00 00 restore <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4000adcc: c0 24 20 18 clr [ %l0 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 4000add0: c0 24 20 1c clr [ %l0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 4000add4: c0 24 20 20 clr [ %l0 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 4000add8: c0 24 20 08 clr [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 4000addc: c0 24 20 0c clr [ %l0 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 4000ade0: c0 24 20 10 clr [ %l0 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 4000ade4: c0 24 20 14 clr [ %l0 + 0x14 ] 4000ade8: b8 10 20 00 clr %i4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4000adec: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000adf0: 9f c0 40 00 call %g1 4000adf4: 90 10 00 10 mov %l0, %o0 4000adf8: 80 a2 20 00 cmp %o0, 0 4000adfc: 02 80 00 35 be 4000aed0 4000ae00: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4000ae04: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4000ae08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ae0c: 02 80 00 04 be 4000ae1c <== NOT EXECUTED 4000ae10: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000ae14: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ae18: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000ae1c: 7f ff fd dd call 4000a590 <== NOT EXECUTED 4000ae20: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( loc_to_free ) 4000ae24: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4000ae28: 32 bf ff db bne,a 4000ad94 <== NOT EXECUTED 4000ae2c: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 4000ae30: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae34: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 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; 4000ae38: 10 bf ff bb b 4000ad24 4000ae3c: c0 24 20 60 clr [ %l0 + 0x60 ] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000ae40: c4 00 62 e8 ld [ %g1 + 0x2e8 ], %g2 <== NOT EXECUTED 4000ae44: 82 10 62 e8 or %g1, 0x2e8, %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000ae48: 88 00 60 04 add %g1, 4, %g4 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000ae4c: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 4000ae50: 02 80 00 0e be 4000ae88 <== NOT EXECUTED 4000ae54: c6 07 bf e8 ld [ %fp + -24 ], %g3 <== 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 ) 4000ae58: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 4000ae5c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000ae60: 32 80 00 07 bne,a 4000ae7c <== NOT EXECUTED 4000ae64: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED 4000ae68: 30 80 00 24 b,a 4000aef8 <== NOT EXECUTED 4000ae6c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000ae70: 02 80 00 22 be 4000aef8 <== NOT EXECUTED 4000ae74: 01 00 00 00 nop <== 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 ) { 4000ae78: c4 00 80 00 ld [ %g2 ], %g2 <== 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 ); 4000ae7c: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 4000ae80: 32 bf ff fb bne,a 4000ae6c <== NOT EXECUTED 4000ae84: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== 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; 4000ae88: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== 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; 4000ae8c: c6 24 20 08 st %g3, [ %l0 + 8 ] <== NOT EXECUTED temp_mt_entry->mt_point_node.handlers = loc.handlers; 4000ae90: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000ae94: c6 07 bf f4 ld [ %fp + -12 ], %g3 <== 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 ){ 4000ae98: c8 00 60 20 ld [ %g1 + 0x20 ], %g4 <== 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; 4000ae9c: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000aea0: c6 24 20 14 st %g3, [ %l0 + 0x14 ] <== 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 ){ 4000aea4: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 4000aea8: 02 80 00 19 be 4000af0c <== NOT EXECUTED 4000aeac: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 4000aeb0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000aeb4: 9f c1 00 00 call %g4 <== NOT EXECUTED 4000aeb8: b8 10 00 1b mov %i3, %i4 <== NOT EXECUTED 4000aebc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000aec0: 22 bf ff cc be,a 4000adf0 <== NOT EXECUTED 4000aec4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000aec8: 10 bf ff b0 b 4000ad88 <== NOT EXECUTED 4000aecc: 90 10 00 10 mov %l0, %o0 <== 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 ); 4000aed0: 11 10 00 62 sethi %hi(0x40018800), %o0 4000aed4: 92 10 00 10 mov %l0, %o1 4000aed8: 7f ff ec d1 call 4000621c <_Chain_Append> 4000aedc: 90 12 22 e8 or %o0, 0x2e8, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 4000aee0: 80 a4 a0 00 cmp %l2, 0 4000aee4: 02 bf ff b8 be 4000adc4 4000aee8: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 4000aeec: e0 24 80 00 st %l0, [ %l2 ] 4000aef0: 81 c7 e0 08 ret 4000aef4: 81 e8 00 00 restore /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 4000aef8: 40 00 06 e5 call 4000ca8c <__errno> <== NOT EXECUTED 4000aefc: 01 00 00 00 nop <== NOT EXECUTED 4000af00: 82 10 20 10 mov 0x10, %g1 ! 10 <== NOT EXECUTED 4000af04: 10 bf ff a0 b 4000ad84 <== NOT EXECUTED 4000af08: c2 22 00 00 st %g1, [ %o0 ] <== 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; 4000af0c: 40 00 06 e0 call 4000ca8c <__errno> <== NOT EXECUTED 4000af10: 01 00 00 00 nop <== NOT EXECUTED 4000af14: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000af18: 10 bf ff 9b b 4000ad84 <== NOT EXECUTED 4000af1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000af20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000af24: 02 bf ff a8 be 4000adc4 <== NOT EXECUTED 4000af28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000af2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000af30: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000af34: 81 c7 e0 08 ret <== NOT EXECUTED 4000af38: 81 e8 00 00 restore <== NOT EXECUTED * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 4000af3c: 40 00 06 d4 call 4000ca8c <__errno> <== NOT EXECUTED 4000af40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000af44: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000af48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000af4c: 81 c7 e0 08 ret <== NOT EXECUTED 4000af50: 81 e8 00 00 restore <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 4000af54: 40 00 06 ce call 4000ca8c <__errno> <== NOT EXECUTED 4000af58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000af5c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000af60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000af64: 81 c7 e0 08 ret <== NOT EXECUTED 4000af68: 81 e8 00 00 restore <== NOT EXECUTED 400024a8 : */ int newlib_free_buffers( FILE *fp ) { 400024a8: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 400024ac: 40 00 2a 59 call 4000ce10 400024b0: 90 10 00 18 mov %i0, %o0 400024b4: 80 a2 20 02 cmp %o0, 2 400024b8: 28 80 00 06 bleu,a 400024d0 400024bc: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 400024c0: 40 00 29 cb call 4000cbec <== NOT EXECUTED 400024c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 400024c8: 81 c7 e0 08 ret 400024cc: 91 e8 20 00 restore %g0, 0, %o0 { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 400024d0: 80 88 60 80 btst 0x80, %g1 400024d4: 02 bf ff fd be 400024c8 400024d8: 01 00 00 00 nop free( fp->_bf._base ); 400024dc: 40 00 20 2d call 4000a590 400024e0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 400024e4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 400024e8: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 400024ec: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 400024f0: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 400024f4: c2 36 20 0c sth %g1, [ %i0 + 0xc ] break; default: fclose(fp); } return 0; } 400024f8: 81 c7 e0 08 ret 400024fc: 91 e8 20 00 restore %g0, 0, %o0 40002758 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 40002758: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 4000275c: 05 10 00 70 sethi %hi(0x4001c000), %g2 40002760: c2 48 a0 a8 ldsb [ %g2 + 0xa8 ], %g1 ! 4001c0a8 40002764: 80 a0 60 00 cmp %g1, 0 40002768: 02 80 00 04 be 40002778 4000276c: 82 10 20 01 mov 1, %g1 NULL_major = major; } return RTEMS_SUCCESSFUL; } 40002770: 81 c7 e0 08 ret 40002774: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 40002778: 11 10 00 66 sethi %hi(0x40019800), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 4000277c: c2 28 a0 a8 stb %g1, [ %g2 + 0xa8 ] status = rtems_io_register_name( 40002780: 90 12 23 90 or %o0, 0x390, %o0 40002784: 92 10 00 18 mov %i0, %o1 40002788: 40 00 00 4e call 400028c0 4000278c: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40002790: 80 a2 20 00 cmp %o0, 0 40002794: 12 80 00 05 bne 400027a8 40002798: 03 10 00 70 sethi %hi(0x4001c000), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 4000279c: f0 20 62 3c st %i0, [ %g1 + 0x23c ] ! 4001c23c } return RTEMS_SUCCESSFUL; } 400027a0: 81 c7 e0 08 ret 400027a4: 91 e8 20 00 restore %g0, 0, %o0 major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 400027a8: 40 00 10 fd call 40006b9c <== NOT EXECUTED 400027ac: 01 00 00 00 nop 400027b0: 01 00 00 00 nop 40002734 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 40002734: 80 a2 a0 00 cmp %o2, 0 40002738: 02 80 00 04 be 40002748 4000273c: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 40002740: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 40002744: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 40002748: 81 c3 e0 08 retl 4000274c: 90 10 20 00 clr %o0 4000271c : int open( const char *pathname, int flags, ... ) { 4000271c: 9d e3 bf 80 save %sp, -128, %sp eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); 40002720: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40002724: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40002728: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4000272c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40002730: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002734: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40002738: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 4000273c: 02 80 00 03 be 40002748 40002740: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40002744: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 40002748: 82 07 a0 50 add %fp, 0x50, %g1 4000274c: f4 07 a0 4c ld [ %fp + 0x4c ], %i2 40002750: c2 27 bf f4 st %g1, [ %fp + -12 ] * 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(); 40002754: 40 00 20 94 call 4000a9a4 40002758: b8 10 20 17 mov 0x17, %i4 if ( iop == 0 ) { 4000275c: ba 92 20 00 orcc %o0, 0, %i5 40002760: 02 80 00 3b be 4000284c 40002764: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40002768: b6 07 bf e4 add %fp, -28, %i3 4000276c: 90 10 00 18 mov %i0, %o0 40002770: 94 10 00 1b mov %i3, %o2 40002774: 7f ff fe 0a call 40001f9c 40002778: 96 10 20 01 mov 1, %o3 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 4000277c: 80 a2 3f ff cmp %o0, -1 40002780: 02 80 00 4d be 400028b4 40002784: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 40002788: b8 10 20 11 mov 0x11, %i4 4000278c: 80 a0 6a 00 cmp %g1, 0xa00 40002790: 02 80 00 69 be 40002934 40002794: a0 10 00 1b mov %i3, %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002798: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; 4000279c: c4 07 bf e4 ld [ %fp + -28 ], %g2 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 400027a0: c2 27 60 30 st %g1, [ %i5 + 0x30 ] iop->file_info = loc.node_access; 400027a4: c4 27 60 2c st %g2, [ %i5 + 0x2c ] iop->flags |= rtems_libio_fcntl_flags( flags ); 400027a8: e0 07 60 0c ld [ %i5 + 0xc ], %l0 400027ac: 40 00 20 bc call 4000aa9c 400027b0: 90 10 00 19 mov %i1, %o0 iop->pathinfo = loc; 400027b4: c2 07 bf e4 ld [ %fp + -28 ], %g1 if ( !iop->handlers->open_h ) { 400027b8: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 400027bc: c2 27 60 10 st %g1, [ %i5 + 0x10 ] 400027c0: c2 07 bf e8 ld [ %fp + -24 ], %g1 if ( !iop->handlers->open_h ) { 400027c4: c4 00 80 00 ld [ %g2 ], %g2 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 400027c8: c2 27 60 14 st %g1, [ %i5 + 0x14 ] 400027cc: c2 07 bf ec ld [ %fp + -20 ], %g1 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 400027d0: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 400027d4: c2 27 60 18 st %g1, [ %i5 + 0x18 ] 400027d8: c2 07 bf f0 ld [ %fp + -16 ], %g1 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 400027dc: d0 27 60 0c st %o0, [ %i5 + 0xc ] iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 400027e0: 80 a0 a0 00 cmp %g2, 0 400027e4: 02 80 00 52 be 4000292c 400027e8: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 400027ec: 92 10 00 18 mov %i0, %o1 400027f0: 96 10 00 1a mov %i2, %o3 400027f4: 90 10 00 1d mov %i5, %o0 400027f8: 94 10 00 19 mov %i1, %o2 400027fc: 9f c0 80 00 call %g2 40002800: a0 10 00 1b mov %i3, %l0 if ( rc ) 40002804: 80 a2 20 00 cmp %o0, 0 40002808: 02 80 00 16 be 40002860 4000280c: b8 10 00 08 mov %o0, %i4 done: va_end(ap); if ( rc ) { if ( iop ) rtems_libio_free( iop ); 40002810: 40 00 20 4e call 4000a948 <== NOT EXECUTED 40002814: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( loc_to_free ) 40002818: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4000281c: 02 80 00 0c be 4000284c <== NOT EXECUTED 40002820: 01 00 00 00 nop <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 40002824: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40002828: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000282c: 02 80 00 08 be 4000284c <== NOT EXECUTED 40002830: 01 00 00 00 nop <== NOT EXECUTED 40002834: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002838: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000283c: 02 80 00 04 be 4000284c <== NOT EXECUTED 40002840: 01 00 00 00 nop <== NOT EXECUTED 40002844: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002848: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( rc ); 4000284c: 40 00 28 90 call 4000ca8c <__errno> 40002850: b0 10 3f ff mov -1, %i0 40002854: f8 22 00 00 st %i4, [ %o0 ] 40002858: 81 c7 e0 08 ret 4000285c: 81 e8 00 00 restore 40002860: 03 10 00 61 sethi %hi(0x40018400), %g1 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40002864: 80 8e 64 00 btst 0x400, %i1 40002868: 12 80 00 40 bne 40002968 4000286c: a0 10 62 40 or %g1, 0x240, %l0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40002870: c6 04 00 00 ld [ %l0 ], %g3 40002874: 86 27 40 03 sub %i5, %g3, %g3 40002878: 87 38 e0 02 sra %g3, 2, %g3 4000287c: 89 28 e0 02 sll %g3, 2, %g4 40002880: 85 28 e0 06 sll %g3, 6, %g2 40002884: 84 20 80 04 sub %g2, %g4, %g2 40002888: 83 28 a0 06 sll %g2, 6, %g1 4000288c: 82 20 40 02 sub %g1, %g2, %g1 40002890: 89 28 60 0c sll %g1, 0xc, %g4 40002894: 82 00 40 04 add %g1, %g4, %g1 40002898: 82 00 40 03 add %g1, %g3, %g1 4000289c: 83 28 60 04 sll %g1, 4, %g1 400028a0: 82 20 40 03 sub %g1, %g3, %g1 400028a4: 83 28 60 02 sll %g1, 2, %g1 400028a8: b0 20 c0 01 sub %g3, %g1, %i0 } 400028ac: 81 c7 e0 08 ret 400028b0: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( pathname, eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 400028b4: 40 00 28 76 call 4000ca8c <__errno> <== NOT EXECUTED 400028b8: 01 00 00 00 nop <== NOT EXECUTED 400028bc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400028c0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400028c4: 12 80 00 20 bne 40002944 <== NOT EXECUTED 400028c8: 80 8e 62 00 btst 0x200, %i1 <== 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) ) { 400028cc: b8 10 20 02 mov 2, %i4 <== NOT EXECUTED 400028d0: 02 80 00 19 be 40002934 <== NOT EXECUTED 400028d4: a0 10 20 00 clr %l0 <== NOT EXECUTED rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 400028d8: 13 3f ff e0 sethi %hi(0xffff8000), %o1 <== NOT EXECUTED 400028dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400028e0: 92 16 80 09 or %i2, %o1, %o1 <== NOT EXECUTED 400028e4: 94 10 20 00 clr %o2 <== NOT EXECUTED 400028e8: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 400028ec: 96 10 20 00 clr %o3 <== NOT EXECUTED 400028f0: 7f ff fe 6c call 400022a0 <== NOT EXECUTED 400028f4: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED if ( rc ) { 400028f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400028fc: 12 80 00 12 bne 40002944 <== NOT EXECUTED 40002900: 90 10 00 18 mov %i0, %o0 <== 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 ); 40002904: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002908: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4000290c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 40002910: 7f ff fd a3 call 40001f9c <== NOT EXECUTED 40002914: b8 10 20 0d mov 0xd, %i4 <== NOT EXECUTED if ( status != 0 ) { /* The file did not exist */ 40002918: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000291c: 12 80 00 06 bne 40002934 <== NOT EXECUTED 40002920: a0 10 20 00 clr %l0 <== NOT EXECUTED /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002924: 10 bf ff 9e b 4000279c <== NOT EXECUTED 40002928: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== 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; 4000292c: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED 40002930: b8 10 20 86 mov 0x86, %i4 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 40002934: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED 40002938: 02 bf ff b9 be 4000281c <== NOT EXECUTED 4000293c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40002940: 30 bf ff b4 b,a 40002810 <== NOT EXECUTED } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 40002944: 40 00 28 52 call 4000ca8c <__errno> <== NOT EXECUTED 40002948: 01 00 00 00 nop <== NOT EXECUTED 4000294c: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED 40002950: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40002954: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40002958: 02 bf ff c6 be 40002870 <== NOT EXECUTED 4000295c: a0 10 62 40 or %g1, 0x240, %l0 <== NOT EXECUTED 40002960: 10 bf ff f5 b 40002934 <== NOT EXECUTED 40002964: a0 10 20 00 clr %l0 <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 40002968: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 <== NOT EXECUTED 4000296c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002970: 84 27 40 02 sub %i5, %g2, %g2 <== NOT EXECUTED 40002974: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 40002978: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 4000297c: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 40002980: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40002984: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 40002988: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 4000298c: 87 2a 20 0c sll %o0, 0xc, %g3 <== NOT EXECUTED 40002990: 90 02 00 03 add %o0, %g3, %o0 <== NOT EXECUTED 40002994: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 40002998: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 4000299c: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 400029a0: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 400029a4: 40 00 1f 26 call 4000a63c <== NOT EXECUTED 400029a8: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED if ( rc ) { 400029ac: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 400029b0: 22 bf ff b1 be,a 40002874 <== NOT EXECUTED 400029b4: c6 04 00 00 ld [ %l0 ], %g3 <== NOT EXECUTED if(errno) rc = errno; 400029b8: 40 00 28 35 call 4000ca8c <__errno> <== NOT EXECUTED 400029bc: 01 00 00 00 nop <== NOT EXECUTED 400029c0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400029c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400029c8: 12 80 00 15 bne 40002a1c <== NOT EXECUTED 400029cc: 01 00 00 00 nop <== NOT EXECUTED close( iop - rtems_libio_iops ); 400029d0: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 400029d4: 84 27 40 02 sub %i5, %g2, %g2 <== NOT EXECUTED 400029d8: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 400029dc: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 400029e0: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 400029e4: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 400029e8: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 400029ec: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 400029f0: 87 2a 20 0c sll %o0, 0xc, %g3 <== NOT EXECUTED 400029f4: ba 10 20 00 clr %i5 <== NOT EXECUTED 400029f8: 90 02 00 03 add %o0, %g3, %o0 <== NOT EXECUTED 400029fc: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 40002a00: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 40002a04: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40002a08: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40002a0c: 40 00 1e b0 call 4000a4cc <== NOT EXECUTED 40002a10: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED 40002a14: 10 bf ff d0 b 40002954 <== NOT EXECUTED 40002a18: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 40002a1c: 40 00 28 1c call 4000ca8c <__errno> <== NOT EXECUTED 40002a20: 01 00 00 00 nop <== NOT EXECUTED 40002a24: 10 bf ff eb b 400029d0 <== NOT EXECUTED 40002a28: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED 400026a8 : /* * This is a replaceable stub */ void open_dev_console(void) { 400026a8: 9d e3 bf 98 save %sp, -104, %sp int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 400026ac: 21 10 00 5a sethi %hi(0x40016800), %l0 400026b0: 92 10 20 00 clr %o1 400026b4: 90 14 22 a0 or %l0, 0x2a0, %o0 400026b8: 40 00 00 19 call 4000271c 400026bc: 94 10 20 00 clr %o2 400026c0: 80 a2 3f ff cmp %o0, -1 400026c4: 02 80 00 0e be 400026fc 400026c8: 90 14 22 a0 or %l0, 0x2a0, %o0 /* * 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) 400026cc: 92 10 20 01 mov 1, %o1 400026d0: 40 00 00 13 call 4000271c 400026d4: 94 10 20 00 clr %o2 400026d8: 80 a2 3f ff cmp %o0, -1 400026dc: 02 80 00 0c be 4000270c 400026e0: 92 10 20 01 mov 1, %o1 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 400026e4: 90 14 22 a0 or %l0, 0x2a0, %o0 400026e8: 40 00 00 0d call 4000271c 400026ec: 94 10 20 00 clr %o2 400026f0: 80 a2 3f ff cmp %o0, -1 400026f4: 02 80 00 04 be 40002704 400026f8: 11 14 d5 11 sethi %hi(0x53544400), %o0 400026fc: 81 c7 e0 08 ret 40002700: 81 e8 00 00 restore rtems_fatal_error_occurred( error_code | '2' ); 40002704: 40 00 0d d6 call 40005e5c <== NOT EXECUTED 40002708: 90 12 20 32 or %o0, 0x32, %o0 <== 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' ); 4000270c: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED 40002710: 40 00 0d d3 call 40005e5c <== NOT EXECUTED 40002714: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <== NOT EXECUTED 40002718: 01 00 00 00 nop 40022d9c : * open a directory. */ DIR * opendir( const char *name ) { 40022d9c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 40022da0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40022da4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022da8: 7f ff 8e 4b call 400066d4 <== NOT EXECUTED 40022dac: b0 10 20 00 clr %i0 <== NOT EXECUTED 40022db0: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40022db4: 02 80 00 17 be 40022e10 <== NOT EXECUTED 40022db8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 40022dbc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40022dc0: 40 00 31 59 call 4002f324 <== NOT EXECUTED 40022dc4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40022dc8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40022dcc: 02 80 00 14 be 40022e1c <== NOT EXECUTED 40022dd0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40022dd4: 7f ff 8b ea call 40005d7c <== NOT EXECUTED 40022dd8: 90 10 20 18 mov 0x18, %o0 <== NOT EXECUTED 40022ddc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40022de0: 02 80 00 0f be 40022e1c <== NOT EXECUTED 40022de4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 40022de8: 7f ff 8b e5 call 40005d7c <== NOT EXECUTED 40022dec: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED dirp->dd_len = 512; 40022df0: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 40022df4: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 40022df8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022dfc: 02 80 00 07 be 40022e18 <== NOT EXECUTED 40022e00: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED close (fd); return NULL; } dirp->dd_fd = fd; 40022e04: e0 26 00 00 st %l0, [ %i0 ] <== NOT EXECUTED dirp->dd_loc = 0; 40022e08: c0 26 20 04 clr [ %i0 + 4 ] <== NOT EXECUTED dirp->dd_seek = 0; 40022e0c: c0 26 20 14 clr [ %i0 + 0x14 ] <== NOT EXECUTED /* * Set up seek point for rewinddir. */ return dirp; } 40022e10: 81 c7 e0 08 ret <== NOT EXECUTED 40022e14: 81 e8 00 00 restore <== NOT EXECUTED */ dirp->dd_buf = malloc (512); dirp->dd_len = 512; if (dirp->dd_buf == NULL) { close (fd); 40022e18: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40022e1c: 7f ff 89 75 call 400053f0 <== NOT EXECUTED 40022e20: b0 10 20 00 clr %i0 <== NOT EXECUTED 40022e24: 81 c7 e0 08 ret <== NOT EXECUTED 40022e28: 81 e8 00 00 restore <== NOT EXECUTED 40003678 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 40003678: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 4000367c: c6 06 60 34 ld [ %i1 + 0x34 ], %g3 40003680: 80 88 e0 01 btst 1, %g3 40003684: 02 80 00 10 be 400036c4 40003688: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 4000368c: b0 0e 20 ff and %i0, 0xff, %i0 40003690: 80 a6 20 09 cmp %i0, 9 40003694: 22 80 00 28 be,a 40003734 40003698: c8 06 60 28 ld [ %i1 + 0x28 ], %g4 4000369c: 18 80 00 10 bgu 400036dc 400036a0: 80 a6 20 0a cmp %i0, 0xa 400036a4: 80 a6 20 08 cmp %i0, 8 <== NOT EXECUTED 400036a8: 12 80 00 11 bne 400036ec <== NOT EXECUTED 400036ac: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 400036b0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 400036b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400036b8: 04 80 00 03 ble 400036c4 <== NOT EXECUTED 400036bc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->column--; 400036c0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 400036c4: 94 10 00 19 mov %i1, %o2 400036c8: 90 07 a0 44 add %fp, 0x44, %o0 400036cc: 7f ff ff 9d call 40003540 400036d0: 92 10 20 01 mov 1, %o1 400036d4: 81 c7 e0 08 ret 400036d8: 81 e8 00 00 restore oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 400036dc: 02 80 00 24 be 4000376c 400036e0: 80 a6 20 0d cmp %i0, 0xd 400036e4: 02 80 00 2f be 400037a0 400036e8: 80 88 e0 02 btst 2, %g3 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 400036ec: 02 80 00 08 be 4000370c 400036f0: 07 10 00 60 sethi %hi(0x40018000), %g3 c = toupper(c); 400036f4: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 ! 40018018 <__ctype_ptr> <== NOT EXECUTED 400036f8: c2 08 80 18 ldub [ %g2 + %i0 ], %g1 <== NOT EXECUTED 400036fc: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003700: 32 80 00 02 bne,a 40003708 <== NOT EXECUTED 40003704: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 40003708: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 4000370c: c2 00 e0 18 ld [ %g3 + 0x18 ], %g1 40003710: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 40003714: c6 08 40 02 ldub [ %g1 + %g2 ], %g3 40003718: 80 88 e0 20 btst 0x20, %g3 4000371c: 12 bf ff eb bne 400036c8 40003720: 94 10 00 19 mov %i1, %o2 tty->column++; 40003724: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 40003728: 82 00 60 01 inc %g1 4000372c: 10 bf ff e7 b 400036c8 40003730: c2 26 60 28 st %g1, [ %i1 + 0x28 ] tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40003734: 05 00 00 06 sethi %hi(0x1800), %g2 40003738: 82 08 c0 02 and %g3, %g2, %g1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4000373c: 86 09 20 07 and %g4, 7, %g3 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40003740: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40003744: 82 10 20 08 mov 8, %g1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40003748: 02 80 00 25 be 400037dc 4000374c: 92 20 40 03 sub %g1, %g3, %o1 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40003750: 82 02 40 04 add %o1, %g4, %g1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40003754: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40003758: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 4000375c: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40003760: 7f ff ff 78 call 40003540 <== NOT EXECUTED 40003764: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003768: 30 80 00 23 b,a 400037f4 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 4000376c: 80 88 e0 20 btst 0x20, %g3 40003770: 32 80 00 02 bne,a 40003778 40003774: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 40003778: 80 88 e0 04 btst 4, %g3 4000377c: 02 bf ff d3 be 400036c8 40003780: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40003784: 11 10 00 5b sethi %hi(0x40016c00), %o0 40003788: 92 10 20 01 mov 1, %o1 4000378c: 90 12 21 f0 or %o0, 0x1f0, %o0 40003790: 7f ff ff 6c call 40003540 40003794: 94 10 00 19 mov %i1, %o2 tty->column = 0; 40003798: 10 bf ff cb b 400036c4 4000379c: c0 26 60 28 clr [ %i1 + 0x28 ] } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 400037a0: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 400037a4: 02 80 00 06 be 400037bc <== NOT EXECUTED 400037a8: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 400037ac: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 400037b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400037b4: 02 bf ff c8 be 400036d4 <== NOT EXECUTED 400037b8: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 400037bc: 22 bf ff c2 be,a 400036c4 <== NOT EXECUTED 400037c0: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 400037c4: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 400037c8: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 400037cc: 02 bf ff be be 400036c4 <== NOT EXECUTED 400037d0: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 400037d4: 10 bf ff bc b 400036c4 <== NOT EXECUTED 400037d8: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 400037dc: 82 02 40 04 add %o1, %g4, %g1 rtems_termios_puts ( " ", i, tty); 400037e0: 94 10 00 19 mov %i1, %o2 break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 400037e4: c2 26 60 28 st %g1, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 400037e8: 11 10 00 5b sethi %hi(0x40016c00), %o0 400037ec: 7f ff ff 55 call 40003540 400037f0: 90 12 21 f8 or %o0, 0x1f8, %o0 ! 40016df8 <__func__.4755+0x2b0> 400037f4: 81 c7 e0 08 ret 400037f8: 81 e8 00 00 restore 40015f88 : ssize_t read( int fd, void *buffer, size_t count ) { 40015f88: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40015f8c: 03 10 00 5e sethi %hi(0x40017800), %g1 <== NOT EXECUTED 40015f90: c4 00 62 a8 ld [ %g1 + 0x2a8 ], %g2 ! 40017aa8 <== NOT EXECUTED ssize_t read( int fd, void *buffer, size_t count ) { 40015f94: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40015f98: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40015f9c: 1a 80 00 24 bcc 4001602c <== NOT EXECUTED 40015fa0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40015fa4: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 40015fa8: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 ! 40018640 <== NOT EXECUTED 40015fac: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40015fb0: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40015fb4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40015fb8: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 40015fbc: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40015fc0: b0 00 c0 01 add %g3, %g1, %i0 <== NOT EXECUTED rtems_libio_check_is_open( iop ); 40015fc4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40015fc8: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40015fcc: 02 80 00 18 be 4001602c <== NOT EXECUTED 40015fd0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 40015fd4: 02 80 00 1c be 40016044 <== NOT EXECUTED 40015fd8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED rtems_libio_check_count( count ); 40015fdc: 02 80 00 12 be 40016024 <== NOT EXECUTED 40015fe0: 90 10 20 00 clr %o0 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40015fe4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40015fe8: 02 80 00 17 be 40016044 <== NOT EXECUTED 40015fec: 01 00 00 00 nop <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 40015ff0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 40015ff4: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 40015ff8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015ffc: 02 80 00 18 be 4001605c <== NOT EXECUTED 40016000: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 40016004: 9f c0 40 00 call %g1 <== NOT EXECUTED 40016008: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( rc > 0 ) 4001600c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016010: 04 80 00 05 ble 40016024 <== NOT EXECUTED 40016014: 01 00 00 00 nop <== NOT EXECUTED iop->offset += rc; 40016018: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 4001601c: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40016020: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED return rc; } 40016024: 81 c7 e0 08 ret <== NOT EXECUTED 40016028: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 4001602c: 7f ff da 98 call 4000ca8c <__errno> <== NOT EXECUTED 40016030: 01 00 00 00 nop <== NOT EXECUTED 40016034: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40016038: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001603c: 10 bf ff fa b 40016024 <== NOT EXECUTED 40016040: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40016044: 7f ff da 92 call 4000ca8c <__errno> <== NOT EXECUTED 40016048: 01 00 00 00 nop <== NOT EXECUTED 4001604c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40016050: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40016054: 10 bf ff f4 b 40016024 <== NOT EXECUTED 40016058: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001605c: 7f ff da 8c call 4000ca8c <__errno> <== NOT EXECUTED 40016060: 01 00 00 00 nop <== NOT EXECUTED 40016064: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40016068: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001606c: 10 bf ff ee b 40016024 <== NOT EXECUTED 40016070: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400230a4 : /* * get next entry in a directory. */ struct dirent * readdir( DIR *dirp ) { 400230a4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED register struct dirent *dp; if ( !dirp ) 400230a8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400230ac: 02 80 00 29 be 40023150 <== NOT EXECUTED 400230b0: 88 10 20 00 clr %g4 <== NOT EXECUTED 400230b4: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED return NULL; for (;;) { if (dirp->dd_loc == 0) { 400230b8: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED 400230bc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400230c0: 22 80 00 1b be,a 4002312c <== NOT EXECUTED 400230c4: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED dirp->dd_len); if (dirp->dd_size <= 0) return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 400230c8: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 400230cc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400230d0: 24 bf ff fa ble,a 400230b8 <== NOT EXECUTED 400230d4: c0 26 20 04 clr [ %i0 + 4 ] <== NOT EXECUTED dirp->dd_loc = 0; continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 400230d8: 88 02 40 02 add %o1, %g2, %g4 <== NOT EXECUTED if ((intptr_t)dp & 03) /* bogus pointer check */ 400230dc: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED 400230e0: 32 80 00 1c bne,a 40023150 <== NOT EXECUTED 400230e4: 88 10 20 00 clr %g4 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 400230e8: c6 11 20 08 lduh [ %g4 + 8 ], %g3 <== NOT EXECUTED 400230ec: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400230f0: 02 80 00 17 be 4002314c <== NOT EXECUTED 400230f4: 9a 00 80 03 add %g2, %g3, %o5 <== NOT EXECUTED 400230f8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 400230fc: 82 00 60 01 inc %g1 <== NOT EXECUTED 40023100: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40023104: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40023108: 34 80 00 12 bg,a 40023150 <== NOT EXECUTED 4002310c: 88 10 20 00 clr %g4 <== NOT EXECUTED dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; 40023110: da 26 20 04 st %o5, [ %i0 + 4 ] <== NOT EXECUTED if (dp->d_ino == 0) 40023114: c2 01 00 00 ld [ %g4 ], %g1 <== NOT EXECUTED 40023118: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002311c: 22 bf ff e8 be,a 400230bc <== NOT EXECUTED 40023120: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED continue; return (dp); } } 40023124: 81 c7 e0 08 ret <== NOT EXECUTED 40023128: 91 e8 00 04 restore %g0, %g4, %o0 <== NOT EXECUTED if ( !dirp ) return NULL; for (;;) { if (dirp->dd_loc == 0) { dirp->dd_size = getdents (dirp->dd_fd, 4002312c: 40 00 31 17 call 4002f588 <== NOT EXECUTED 40023130: d4 06 20 10 ld [ %i0 + 0x10 ], %o2 <== NOT EXECUTED dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 40023134: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023138: 04 80 00 05 ble 4002314c <== NOT EXECUTED 4002313c: d0 26 20 08 st %o0, [ %i0 + 8 ] <== NOT EXECUTED 40023140: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED 40023144: 10 bf ff e1 b 400230c8 <== NOT EXECUTED 40023148: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; if (dp->d_ino == 0) 4002314c: 88 10 20 00 clr %g4 <== NOT EXECUTED continue; return (dp); } } 40023150: 81 c7 e0 08 ret <== NOT EXECUTED 40023154: 91 e8 00 04 restore %g0, %g4, %o0 <== NOT EXECUTED 40023158 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 40023158: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED rtems_filesystem_location_info_t loc; int result; if (!buf) 4002315c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40023160: 02 80 00 27 be 400231fc <== NOT EXECUTED 40023164: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 40023168: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 4002316c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40023170: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40023174: 96 10 20 00 clr %o3 <== NOT EXECUTED 40023178: 7f ff 88 ff call 40005574 <== NOT EXECUTED 4002317c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( result != 0 ) 40023180: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023184: 12 80 00 1c bne 400231f4 <== NOT EXECUTED 40023188: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED return -1; if ( !loc.ops->node_type_h ){ 4002318c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40023190: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023194: 22 80 00 31 be,a 40023258 <== NOT EXECUTED 40023198: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 4002319c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400231a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400231a4: 80 a2 20 04 cmp %o0, 4 <== NOT EXECUTED 400231a8: 12 80 00 1b bne 40023214 <== NOT EXECUTED 400231ac: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 400231b0: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED 400231b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400231b8: 02 80 00 27 be 40023254 <== NOT EXECUTED 400231bc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 400231c0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 400231c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400231c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 400231cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400231d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400231d4: 02 80 00 08 be 400231f4 <== NOT EXECUTED 400231d8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400231dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400231e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400231e4: 02 80 00 26 be 4002327c <== NOT EXECUTED 400231e8: 01 00 00 00 nop <== NOT EXECUTED 400231ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400231f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 400231f4: 81 c7 e0 08 ret <== NOT EXECUTED 400231f8: 81 e8 00 00 restore <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 400231fc: 40 00 39 cd call 40031930 <__errno> <== NOT EXECUTED 40023200: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023204: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40023208: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002320c: 81 c7 e0 08 ret <== NOT EXECUTED 40023210: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 40023214: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40023218: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002321c: 02 80 00 08 be 4002323c <== NOT EXECUTED 40023220: 01 00 00 00 nop <== NOT EXECUTED 40023224: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023228: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002322c: 02 80 00 04 be 4002323c <== NOT EXECUTED 40023230: 01 00 00 00 nop <== NOT EXECUTED 40023234: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023238: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4002323c: 40 00 39 bd call 40031930 <__errno> <== NOT EXECUTED 40023240: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023244: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40023248: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002324c: 81 c7 e0 08 ret <== NOT EXECUTED 40023250: 81 e8 00 00 restore <== NOT EXECUTED } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 40023254: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40023258: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002325c: 02 80 00 04 be 4002326c <== NOT EXECUTED 40023260: 01 00 00 00 nop <== NOT EXECUTED 40023264: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023268: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002326c: 40 00 39 b1 call 40031930 <__errno> <== NOT EXECUTED 40023270: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023274: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40023278: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002327c: 81 c7 e0 08 ret <== NOT EXECUTED 40023280: 81 e8 00 00 restore <== NOT EXECUTED 400160f8 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 400160f8: 9d e3 bf 90 save %sp, -112, %sp 400160fc: 03 10 00 61 sethi %hi(0x40018400), %g1 40016100: a2 10 62 a8 or %g1, 0x2a8, %l1 ! 400186a8 40016104: c4 04 60 10 ld [ %l1 + 0x10 ], %g2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40016108: 03 10 00 62 sethi %hi(0x40018800), %g1 4001610c: c6 00 61 c4 ld [ %g1 + 0x1c4 ], %g3 ! 400189c4 <_System_state_Current> { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 40016110: 84 00 a0 01 inc %g2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40016114: 80 a0 e0 03 cmp %g3, 3 40016118: 02 80 00 3b be 40016204 4001611c: c4 24 60 10 st %g2, [ %l1 + 0x10 ] } /* * Continue with realloc(). */ if ( !ptr ) 40016120: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40016124: 02 80 00 13 be 40016170 40016128: 80 a6 60 00 cmp %i1, 0 return malloc( size ); if ( !size ) { 4001612c: 02 80 00 2b be 400161d8 40016130: 21 10 00 61 sethi %hi(0x40018400), %l0 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 40016134: 92 10 00 18 mov %i0, %o1 40016138: 90 14 22 50 or %l0, 0x250, %o0 4001613c: 40 00 00 78 call 4001631c <_Protected_heap_Get_block_size> 40016140: 94 07 bf f4 add %fp, -12, %o2 40016144: 80 8a 20 ff btst 0xff, %o0 40016148: 02 80 00 29 be 400161ec 4001614c: 90 14 22 50 or %l0, 0x250, %o0 #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 ) ) { 40016150: 92 10 00 18 mov %i0, %o1 40016154: 40 00 00 7f call 40016350 <_Protected_heap_Resize_block> 40016158: 94 10 00 19 mov %i1, %o2 4001615c: 80 8a 20 ff btst 0xff, %o0 40016160: 02 80 00 08 be 40016180 40016164: 01 00 00 00 nop memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 40016168: 81 c7 e0 08 ret 4001616c: 81 e8 00 00 restore /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 40016170: 7f ff d2 7f call 4000ab6c <== NOT EXECUTED 40016174: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40016178: 81 c7 e0 08 ret <== NOT EXECUTED 4001617c: 91 e8 00 08 restore %g0, %o0, %o0 <== 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 ); 40016180: 7f ff d2 7b call 4000ab6c 40016184: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 40016188: c2 04 60 04 ld [ %l1 + 4 ], %g1 * 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 ); 4001618c: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 40016190: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 40016194: 80 a2 20 00 cmp %o0, 0 40016198: 02 80 00 24 be 40016228 4001619c: c2 24 60 04 st %g1, [ %l1 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 400161a0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400161a4: 80 a6 40 01 cmp %i1, %g1 400161a8: 08 80 00 03 bleu 400161b4 400161ac: 90 10 00 19 mov %i1, %o0 400161b0: 90 10 00 01 mov %g1, %o0 400161b4: 94 10 00 08 mov %o0, %o2 400161b8: 92 10 00 18 mov %i0, %o1 400161bc: 7f ff dc 26 call 4000d254 400161c0: 90 10 00 10 mov %l0, %o0 free( ptr ); 400161c4: 90 10 00 18 mov %i0, %o0 400161c8: 7f ff d0 f2 call 4000a590 400161cc: b0 10 00 10 mov %l0, %i0 400161d0: 81 c7 e0 08 ret 400161d4: 81 e8 00 00 restore */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 400161d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400161dc: 7f ff d0 ed call 4000a590 <== NOT EXECUTED 400161e0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400161e4: 81 c7 e0 08 ret <== NOT EXECUTED 400161e8: 81 e8 00 00 restore <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 400161ec: 7f ff da 28 call 4000ca8c <__errno> 400161f0: b0 10 20 00 clr %i0 400161f4: 82 10 20 16 mov 0x16, %g1 400161f8: c2 22 00 00 st %g1, [ %o0 ] 400161fc: 81 c7 e0 08 ret 40016200: 81 e8 00 00 restore /* * 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) 40016204: 03 10 00 62 sethi %hi(0x40018800), %g1 40016208: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 40018820 <_Thread_Dispatch_disable_level> 4001620c: 80 a0 a0 00 cmp %g2, 0 40016210: 12 80 00 06 bne 40016228 40016214: 03 10 00 62 sethi %hi(0x40018800), %g1 return (void *) 0; if (_ISR_Nest_level > 0) 40016218: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 400188bc <_ISR_Nest_level> 4001621c: 80 a0 a0 00 cmp %g2, 0 40016220: 02 bf ff c1 be 40016124 40016224: 80 a6 20 00 cmp %i0, 0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 40016228: 81 c7 e0 08 ret <== NOT EXECUTED 4001622c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400233bc : #include int rmdir( const char *pathname ) { 400233bc: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 400233c0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400233c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400233c8: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 400233cc: 96 10 20 00 clr %o3 <== NOT EXECUTED 400233d0: 7f ff 88 69 call 40005574 <== NOT EXECUTED 400233d4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( result != 0 ) 400233d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400233dc: 02 80 00 04 be 400233ec <== NOT EXECUTED 400233e0: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED result = (*loc.handlers->rmnod_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 400233e4: 81 c7 e0 08 ret <== NOT EXECUTED 400233e8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 400233ec: 7f ff 88 32 call 400054b4 <== NOT EXECUTED 400233f0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (result != 0) { 400233f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400233f8: 12 80 00 2d bne 400234ac <== NOT EXECUTED 400233fc: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40023400: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40023404: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023408: 22 80 00 35 be,a 400234dc <== NOT EXECUTED 4002340c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 40023410: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023414: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40023418: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4002341c: 12 80 00 14 bne 4002346c <== NOT EXECUTED 40023420: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40023424: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 40023428: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002342c: 22 80 00 37 be,a 40023508 <== NOT EXECUTED 40023430: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); 40023434: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023438: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002343c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40023440: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023444: 02 80 00 08 be 40023464 <== NOT EXECUTED 40023448: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002344c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023450: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023454: 02 80 00 2b be 40023500 <== NOT EXECUTED 40023458: 01 00 00 00 nop <== NOT EXECUTED 4002345c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023460: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40023464: 81 c7 e0 08 ret <== NOT EXECUTED 40023468: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 4002346c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40023470: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023474: 02 80 00 08 be 40023494 <== NOT EXECUTED 40023478: 01 00 00 00 nop <== NOT EXECUTED 4002347c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023480: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023484: 02 80 00 04 be 40023494 <== NOT EXECUTED 40023488: 01 00 00 00 nop <== NOT EXECUTED 4002348c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023490: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); 40023494: 40 00 39 27 call 40031930 <__errno> <== NOT EXECUTED 40023498: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002349c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400234a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400234a4: 81 c7 e0 08 ret <== NOT EXECUTED 400234a8: 81 e8 00 00 restore <== NOT EXECUTED if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0) { rtems_filesystem_freenode( &loc ); 400234ac: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400234b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400234b4: 02 bf ff ec be 40023464 <== NOT EXECUTED 400234b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400234bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400234c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400234c4: 02 bf ff e8 be 40023464 <== NOT EXECUTED 400234c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400234cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400234d0: 01 00 00 00 nop <== NOT EXECUTED 400234d4: 81 c7 e0 08 ret <== NOT EXECUTED 400234d8: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 400234dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400234e0: 02 80 00 04 be 400234f0 <== NOT EXECUTED 400234e4: 01 00 00 00 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 400234e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400234ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400234f0: 40 00 39 10 call 40031930 <__errno> <== NOT EXECUTED 400234f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400234f8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400234fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023500: 81 c7 e0 08 ret <== NOT EXECUTED 40023504: 81 e8 00 00 restore <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 40023508: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002350c: 02 bf ff f9 be 400234f0 <== NOT EXECUTED 40023510: 01 00 00 00 nop <== NOT EXECUTED 40023514: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023518: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002351c: 12 bf ff f3 bne 400234e8 <== NOT EXECUTED 40023520: 01 00 00 00 nop <== NOT EXECUTED 40023524: 30 bf ff f3 b,a 400234f0 <== NOT EXECUTED 4000c368 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000c368: 9d e3 bf 98 save %sp, -104, %sp 4000c36c: a2 10 20 01 mov 1, %l1 4000c370: a4 10 00 18 mov %i0, %l2 4000c374: a0 10 20 00 clr %l0 4000c378: 10 80 00 05 b 4000c38c 4000c37c: b0 10 20 00 clr %i0 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4000c380: 80 a4 20 20 cmp %l0, 0x20 4000c384: 02 80 00 0d be 4000c3b8 4000c388: a3 2c 60 01 sll %l1, 1, %l1 if (b & remote_value) 4000c38c: 80 8c 40 19 btst %l1, %i1 4000c390: 22 bf ff fc be,a 4000c380 4000c394: a0 04 20 01 inc %l0 local_value |= rtems_assoc_local_by_remote(ap, b); 4000c398: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4000c39c: 40 00 00 09 call 4000c3c0 <== NOT EXECUTED 4000c3a0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4000c3a4: a0 04 20 01 inc %l0 <== NOT EXECUTED if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4000c3a8: b0 16 00 08 or %i0, %o0, %i0 <== NOT EXECUTED ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4000c3ac: 80 a4 20 20 cmp %l0, 0x20 <== NOT EXECUTED 4000c3b0: 12 bf ff f7 bne 4000c38c <== NOT EXECUTED 4000c3b4: a3 2c 60 01 sll %l1, 1, %l1 <== NOT EXECUTED if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 4000c3b8: 81 c7 e0 08 ret 4000c3bc: 81 e8 00 00 restore 40016d94 : const char * rtems_assoc_name_bad( uint32_t bad_value ) { 40016d94: 11 10 00 a0 sethi %hi(0x40028000), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40016d98: 81 c3 e0 08 retl <== NOT EXECUTED 40016d9c: 90 12 23 78 or %o0, 0x378, %o0 ! 40028378 <== NOT EXECUTED 400128c8 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 400128c8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 400128cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400128d0: 40 00 00 0b call 400128fc <== NOT EXECUTED 400128d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 400128d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400128dc: 02 80 00 05 be 400128f0 <== NOT EXECUTED 400128e0: 01 00 00 00 nop <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 400128e4: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED 400128e8: 81 c7 e0 08 ret <== NOT EXECUTED 400128ec: 81 e8 00 00 restore <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 400128f0: 40 00 11 29 call 40016d94 <== NOT EXECUTED 400128f4: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 400128f8: 01 00 00 00 nop 4000c9dc : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000c9dc: 9d e3 bf 98 save %sp, -104, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000c9e0: d0 06 00 00 ld [ %i0 ], %o0 4000c9e4: 80 a2 20 00 cmp %o0, 0 4000c9e8: 02 80 00 1d be 4000ca5c 4000c9ec: 13 10 00 5c sethi %hi(0x40017000), %o1 4000c9f0: 40 00 04 f7 call 4000ddcc 4000c9f4: 92 12 63 98 or %o1, 0x398, %o1 ! 40017398 <__func__.5594+0x18> 4000c9f8: 80 a2 20 00 cmp %o0, 0 4000c9fc: 02 80 00 11 be 4000ca40 4000ca00: 86 10 20 00 clr %g3 default_ap = ap++; for ( ; ap->name; ap++) if (ap->local_value == local_value) 4000ca04: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000ca08: 80 a0 40 19 cmp %g1, %i1 4000ca0c: 32 80 00 07 bne,a 4000ca28 4000ca10: b0 06 20 0c add %i0, 0xc, %i0 4000ca14: 30 80 00 14 b,a 4000ca64 4000ca18: 80 a0 40 19 cmp %g1, %i1 4000ca1c: 02 80 00 12 be 4000ca64 4000ca20: 01 00 00 00 nop const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000ca24: b0 06 20 0c add %i0, 0xc, %i0 4000ca28: c2 06 00 00 ld [ %i0 ], %g1 4000ca2c: 80 a0 60 00 cmp %g1, 0 4000ca30: 32 bf ff fa bne,a 4000ca18 4000ca34: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (ap->local_value == local_value) return ap; return default_ap; } 4000ca38: 81 c7 e0 08 ret 4000ca3c: 91 e8 00 03 restore %g0, %g3, %o0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000ca40: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000ca44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ca48: 02 80 00 07 be 4000ca64 <== NOT EXECUTED 4000ca4c: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED 4000ca50: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED 4000ca54: 10 bf ff ec b 4000ca04 <== NOT EXECUTED 4000ca58: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000ca5c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca60: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ca64: 81 c7 e0 08 ret 4000ca68: 81 e8 00 00 restore 4000c3e8 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000c3e8: 9d e3 bf 98 save %sp, -104, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000c3ec: d0 06 00 00 ld [ %i0 ], %o0 4000c3f0: 80 a2 20 00 cmp %o0, 0 4000c3f4: 02 80 00 1d be 4000c468 4000c3f8: 13 10 00 5c sethi %hi(0x40017000), %o1 4000c3fc: 40 00 06 74 call 4000ddcc 4000c400: 92 12 63 98 or %o1, 0x398, %o1 ! 40017398 <__func__.5594+0x18> 4000c404: 80 a2 20 00 cmp %o0, 0 4000c408: 02 80 00 11 be 4000c44c 4000c40c: 86 10 20 00 clr %g3 default_ap = ap++; for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4000c410: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000c414: 80 a0 40 19 cmp %g1, %i1 4000c418: 32 80 00 07 bne,a 4000c434 4000c41c: b0 06 20 0c add %i0, 0xc, %i0 4000c420: 30 80 00 14 b,a 4000c470 4000c424: 80 a0 40 19 cmp %g1, %i1 4000c428: 02 80 00 12 be 4000c470 4000c42c: 01 00 00 00 nop const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000c430: b0 06 20 0c add %i0, 0xc, %i0 <== NOT EXECUTED 4000c434: c2 06 00 00 ld [ %i0 ], %g1 4000c438: 80 a0 60 00 cmp %g1, 0 4000c43c: 32 bf ff fa bne,a 4000c424 4000c440: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000c444: 81 c7 e0 08 ret <== NOT EXECUTED 4000c448: 91 e8 00 03 restore %g0, %g3, %o0 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000c44c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000c450: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c454: 02 80 00 07 be 4000c470 <== NOT EXECUTED 4000c458: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED 4000c45c: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED 4000c460: 10 bf ff ec b 4000c410 <== NOT EXECUTED 4000c464: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000c468: 81 c7 e0 08 ret <== NOT EXECUTED 4000c46c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000c470: 81 c7 e0 08 ret 4000c474: 81 e8 00 00 restore 4000c478 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000c478: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000c47c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000c480: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000c484: 40 00 01 56 call 4000c9dc <== NOT EXECUTED 4000c488: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000c48c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c490: 32 80 00 02 bne,a 4000c498 <== NOT EXECUTED 4000c494: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000c498: 81 c7 e0 08 ret <== NOT EXECUTED 4000c49c: 81 e8 00 00 restore <== NOT EXECUTED 400029b4 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 400029b4: 9d e3 bf 60 save %sp, -160, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 400029b8: 80 a6 60 00 cmp %i1, 0 400029bc: 02 80 00 6e be 40002b74 400029c0: 01 00 00 00 nop * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _TOD_Get_uptime( &uptime ); 400029c4: 40 00 15 08 call 40007de4 <_TOD_Get_uptime> 400029c8: 90 07 bf e8 add %fp, -24, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 400029cc: 92 07 bf e8 add %fp, -24, %o1 400029d0: b4 07 bf e0 add %fp, -32, %i2 400029d4: 11 10 00 93 sethi %hi(0x40024c00), %o0 400029d8: 94 10 00 1a mov %i2, %o2 400029dc: 40 00 1f 5a call 4000a744 <_Timespec_Subtract> 400029e0: 90 12 23 4c or %o0, 0x34c, %o0 } } } #endif (*print)( context, "CPU Usage by thread\n" 400029e4: 90 10 00 18 mov %i0, %o0 400029e8: 13 10 00 69 sethi %hi(0x4001a400), %o1 400029ec: 9f c6 40 00 call %i1 400029f0: 92 12 61 d8 or %o1, 0x1d8, %o1 ! 4001a5d8 <__func__.4755+0x240> 400029f4: 03 10 00 92 sethi %hi(0x40024800), %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 400029f8: 05 10 00 69 sethi %hi(0x4001a400), %g2 } } } #endif (*print)( context, "CPU Usage by thread\n" 400029fc: a6 10 63 f4 or %g1, 0x3f4, %l3 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40002a00: b6 10 a2 20 or %g2, 0x220, %i3 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002a04: 03 10 00 93 sethi %hi(0x40024c00), %g1 /* * Print the information */ (*print)( context, 40002a08: 05 10 00 69 sethi %hi(0x4001a400), %g2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002a0c: a8 07 bf c0 add %fp, -64, %l4 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002a10: b8 10 61 50 or %g1, 0x150, %i4 /* * Print the information */ (*print)( context, 40002a14: ba 10 a2 38 or %g2, 0x238, %i5 40002a18: aa 07 bf d8 add %fp, -40, %l5 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002a1c: ae 07 bf f4 add %fp, -12, %l7 40002a20: ac 07 bf f0 add %fp, -16, %l6 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40002a24: c2 04 c0 00 ld [ %l3 ], %g1 40002a28: 80 a0 60 00 cmp %g1, 0 40002a2c: 22 80 00 44 be,a 40002b3c 40002a30: a6 04 e0 04 add %l3, 4, %l3 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40002a34: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( information ) { 40002a38: 80 a4 a0 00 cmp %l2, 0 40002a3c: 22 80 00 40 be,a 40002b3c 40002a40: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40002a44: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 40002a48: 86 90 60 00 orcc %g1, 0, %g3 40002a4c: 02 80 00 3b be 40002b38 40002a50: a2 10 20 01 mov 1, %l1 the_thread = (Thread_Control *)information->local_table[ i ]; 40002a54: 10 80 00 17 b 40002ab0 40002a58: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002a5c: 96 10 00 16 mov %l6, %o3 40002a60: 90 10 00 15 mov %l5, %o0 40002a64: 40 00 1e a5 call 4000a4f8 <_Timespec_Divide> 40002a68: 92 10 00 1a mov %i2, %o1 /* * Print the information */ (*print)( context, 40002a6c: d0 07 bf dc ld [ %fp + -36 ], %o0 40002a70: 40 00 51 bc call 40017160 <.udiv> 40002a74: 92 10 23 e8 mov 0x3e8, %o1 40002a78: d4 07 bf d8 ld [ %fp + -40 ], %o2 40002a7c: d8 07 bf f4 ld [ %fp + -12 ], %o4 40002a80: da 07 bf f0 ld [ %fp + -16 ], %o5 40002a84: 96 10 00 08 mov %o0, %o3 40002a88: 92 10 00 1d mov %i5, %o1 40002a8c: 9f c6 40 00 call %i1 40002a90: 90 10 00 18 mov %i0, %o0 40002a94: c6 14 a0 10 lduh [ %l2 + 0x10 ], %g3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 40002a98: 83 28 e0 10 sll %g3, 0x10, %g1 40002a9c: 83 30 60 10 srl %g1, 0x10, %g1 40002aa0: 80 a0 40 11 cmp %g1, %l1 40002aa4: 2a 80 00 26 bcs,a 40002b3c 40002aa8: a6 04 e0 04 add %l3, 4, %l3 the_thread = (Thread_Control *)information->local_table[ i ]; 40002aac: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 40002ab0: 83 2c 60 02 sll %l1, 2, %g1 40002ab4: e0 00 80 01 ld [ %g2 + %g1 ], %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002ab8: 94 10 00 14 mov %l4, %o2 40002abc: 92 10 20 0d mov 0xd, %o1 information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 40002ac0: 80 a4 20 00 cmp %l0, 0 40002ac4: 02 bf ff f5 be 40002a98 40002ac8: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002acc: 40 00 0f 7e call 400068c4 40002ad0: d0 04 20 08 ld [ %l0 + 8 ], %o0 (*print)( 40002ad4: d4 04 20 08 ld [ %l0 + 8 ], %o2 40002ad8: 90 10 00 18 mov %i0, %o0 40002adc: 92 10 00 1b mov %i3, %o1 40002ae0: 9f c6 40 00 call %i1 40002ae4: 96 10 00 14 mov %l4, %o3 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40002ae8: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002aec: c6 07 00 00 ld [ %i4 ], %g3 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40002af0: c4 27 bf d8 st %g2, [ %fp + -40 ] 40002af4: c2 04 20 88 ld [ %l0 + 0x88 ], %g1 40002af8: c2 27 bf dc st %g1, [ %fp + -36 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002afc: c4 00 e0 08 ld [ %g3 + 8 ], %g2 40002b00: c2 04 20 08 ld [ %l0 + 8 ], %g1 40002b04: 80 a0 80 01 cmp %g2, %g1 40002b08: 32 bf ff d5 bne,a 40002a5c 40002b0c: 94 10 00 17 mov %l7, %o2 struct timespec used; _Timespec_Subtract( 40002b10: 92 07 bf e8 add %fp, -24, %o1 40002b14: 94 07 bf d0 add %fp, -48, %o2 40002b18: 11 10 00 93 sethi %hi(0x40024c00), %o0 40002b1c: 40 00 1f 0a call 4000a744 <_Timespec_Subtract> 40002b20: 90 12 21 58 or %o0, 0x158, %o0 ! 40024d58 <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 40002b24: 90 10 00 15 mov %l5, %o0 40002b28: 40 00 1e 5a call 4000a490 <_Timespec_Add_to> 40002b2c: 92 07 bf d0 add %fp, -48, %o1 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002b30: 10 bf ff cb b 40002a5c 40002b34: 94 10 00 17 mov %l7, %o2 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 40002b38: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40002b3c: 03 10 00 93 sethi %hi(0x40024c00), %g1 40002b40: 82 10 60 04 or %g1, 4, %g1 ! 40024c04 <_Objects_Information_table+0x14> 40002b44: 80 a4 c0 01 cmp %l3, %g1 40002b48: 32 bf ff b8 bne,a 40002a28 40002b4c: c2 04 c0 00 ld [ %l3 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 40002b50: d0 07 bf e4 ld [ %fp + -28 ], %o0 40002b54: 40 00 51 83 call 40017160 <.udiv> 40002b58: 92 10 23 e8 mov 0x3e8, %o1 40002b5c: d4 07 bf e0 ld [ %fp + -32 ], %o2 40002b60: 96 10 00 08 mov %o0, %o3 40002b64: 13 10 00 69 sethi %hi(0x4001a400), %o1 40002b68: 90 10 00 18 mov %i0, %o0 40002b6c: 9f c6 40 00 call %i1 40002b70: 92 12 62 50 or %o1, 0x250, %o1 40002b74: 81 c7 e0 08 ret 40002b78: 81 e8 00 00 restore 4000bfc8 : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 4000bfc8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) 4000bfcc: 11 10 00 5c sethi %hi(0x40017000), %o0 <== NOT EXECUTED 4000bfd0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000bfd4: 40 00 01 29 call 4000c478 <== NOT EXECUTED 4000bfd8: 90 12 22 7c or %o0, 0x27c, %o0 <== NOT EXECUTED 4000bfdc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000bfe0: 02 80 00 05 be 4000bff4 <== NOT EXECUTED 4000bfe4: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000bfe8: 40 00 02 a9 call 4000ca8c <__errno> <== NOT EXECUTED 4000bfec: 01 00 00 00 nop <== NOT EXECUTED 4000bff0: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000bff4: 81 c7 e0 08 ret <== NOT EXECUTED 4000bff8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40007dbc : int rtems_error( int error_flag, const char *printf_format, ... ) { 40007dbc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40007dc0: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 40007dc4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40007dc8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40007dcc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40007dd0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 40007dd4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007dd8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40007ddc: 7f ff ff 71 call 40007ba0 <== NOT EXECUTED 40007de0: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40007de4: 81 c7 e0 08 ret <== NOT EXECUTED 40007de8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40001edc : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 40001edc: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 40001ee0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40001ee4: 02 80 00 28 be 40001f84 <== NOT EXECUTED 40001ee8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 40001eec: c8 06 60 08 ld [ %i1 + 8 ], %g4 <== NOT EXECUTED 40001ef0: da 01 00 00 ld [ %g4 ], %o5 <== NOT EXECUTED 40001ef4: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED 40001ef8: 02 80 00 1d be 40001f6c <== NOT EXECUTED 40001efc: 11 10 00 5b sethi %hi(0x40016c00), %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 40001f00: c6 06 60 0c ld [ %i1 + 0xc ], %g3 <== NOT EXECUTED 40001f04: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED 40001f08: c4 06 60 04 ld [ %i1 + 4 ], %g2 <== NOT EXECUTED 40001f0c: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED 40001f10: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 40001f14: c8 27 bf f0 st %g4, [ %fp + -16 ] <== NOT EXECUTED 40001f18: c6 27 bf f4 st %g3, [ %fp + -12 ] <== NOT EXECUTED result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 40001f1c: b2 07 bf e8 add %fp, -24, %i1 <== NOT EXECUTED 40001f20: 90 12 21 c8 or %o0, 0x1c8, %o0 <== NOT EXECUTED 40001f24: 9f c3 40 00 call %o5 <== NOT EXECUTED 40001f28: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED if (result != 0){ 40001f2c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40001f30: 12 80 00 0d bne 40001f64 <== NOT EXECUTED 40001f34: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED return -1; } rtems_filesystem_freenode( &parent ); 40001f38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001f3c: 02 80 00 16 be 40001f94 <== NOT EXECUTED 40001f40: 01 00 00 00 nop <== NOT EXECUTED 40001f44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001f48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001f4c: 02 80 00 12 be 40001f94 <== NOT EXECUTED 40001f50: 01 00 00 00 nop <== NOT EXECUTED 40001f54: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001f58: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED return result; } 40001f5c: 81 c7 e0 08 ret <== NOT EXECUTED 40001f60: 81 e8 00 00 restore <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 40001f64: 81 c7 e0 08 ret <== NOT EXECUTED 40001f68: 91 e8 3f ff restore %g0, -1, %o0 <== 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 ); 40001f6c: 40 00 2a c8 call 4000ca8c <__errno> <== NOT EXECUTED 40001f70: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001f74: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001f78: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001f7c: 81 c7 e0 08 ret <== NOT EXECUTED 40001f80: 81 e8 00 00 restore <== NOT EXECUTED { rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40001f84: 40 00 2a c2 call 4000ca8c <__errno> <== NOT EXECUTED 40001f88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001f8c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40001f90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001f94: 81 c7 e0 08 ret <== NOT EXECUTED 40001f98: 81 e8 00 00 restore <== NOT EXECUTED 40001f9c : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 40001f9c: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 40001fa0: 80 a6 20 00 cmp %i0, 0 40001fa4: 02 80 00 50 be 400020e4 40001fa8: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 40001fac: 02 80 00 54 be 400020fc 40001fb0: 01 00 00 00 nop /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40001fb4: c2 4e 00 00 ldsb [ %i0 ], %g1 40001fb8: 80 a0 60 2f cmp %g1, 0x2f 40001fbc: 02 80 00 06 be 40001fd4 40001fc0: 80 a0 60 5c cmp %g1, 0x5c 40001fc4: 02 80 00 04 be 40001fd4 <== NOT EXECUTED 40001fc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001fcc: 12 80 00 27 bne 40002068 <== NOT EXECUTED 40001fd0: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 40001fd4: 03 10 00 5f sethi %hi(0x40017c00), %g1 40001fd8: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 ! 40017fcc 40001fdc: 88 10 20 01 mov 1, %g4 40001fe0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40001fe4: c2 26 80 00 st %g1, [ %i2 ] 40001fe8: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40001fec: c4 26 a0 04 st %g2, [ %i2 + 4 ] 40001ff0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40001ff4: c2 26 a0 08 st %g1, [ %i2 + 8 ] 40001ff8: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 40001ffc: c4 26 a0 0c st %g2, [ %i2 + 0xc ] if ( !pathloc->ops->evalpath_h ) 40002000: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002004: c2 00 40 00 ld [ %g1 ], %g1 40002008: 80 a0 60 00 cmp %g1, 0 4000200c: 02 80 00 30 be 400020cc 40002010: 90 06 00 04 add %i0, %g4, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 40002014: 92 10 00 19 mov %i1, %o1 40002018: 9f c0 40 00 call %g1 4000201c: 94 10 00 1a mov %i2, %o2 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 40002020: b0 92 20 00 orcc %o0, 0, %i0 40002024: 12 80 00 0f bne 40002060 40002028: 80 a6 e0 00 cmp %i3, 0 4000202c: 02 80 00 38 be 4000210c 40002030: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40002034: c4 06 a0 08 ld [ %i2 + 8 ], %g2 40002038: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000203c: 80 a0 60 00 cmp %g1, 0 40002040: 22 80 00 1e be,a 400020b8 40002044: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 40002048: 9f c0 40 00 call %g1 4000204c: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 40002050: 90 02 3f fd add %o0, -3, %o0 40002054: 80 a2 20 01 cmp %o0, 1 40002058: 28 80 00 0f bleu,a 40002094 4000205c: c4 06 a0 08 ld [ %i2 + 8 ], %g2 <== NOT EXECUTED } } return result; } 40002060: 81 c7 e0 08 ret 40002064: 81 e8 00 00 restore /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40002068: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 <== NOT EXECUTED 4000206c: 88 10 20 00 clr %g4 <== NOT EXECUTED 40002070: c2 00 e0 04 ld [ %g3 + 4 ], %g1 <== NOT EXECUTED 40002074: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 40002078: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 4000207c: c4 26 a0 04 st %g2, [ %i2 + 4 ] <== NOT EXECUTED 40002080: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 40002084: c2 26 a0 08 st %g1, [ %i2 + 8 ] <== NOT EXECUTED 40002088: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 <== NOT EXECUTED 4000208c: 10 bf ff dd b 40002000 <== NOT EXECUTED 40002090: c4 26 a0 0c st %g2, [ %i2 + 0xc ] <== NOT EXECUTED type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 40002094: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 40002098: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000209c: 02 80 00 06 be 400020b4 <== NOT EXECUTED 400020a0: 90 10 00 1a mov %i2, %o0 <== 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 ); 400020a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400020a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED } } return result; } 400020ac: 81 c7 e0 08 ret <== NOT EXECUTED 400020b0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 400020b4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400020b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400020bc: 02 80 00 04 be 400020cc <== NOT EXECUTED 400020c0: 01 00 00 00 nop <== NOT EXECUTED 400020c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400020c8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400020cc: 40 00 2a 70 call 4000ca8c <__errno> <== NOT EXECUTED 400020d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400020d4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400020d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400020dc: 81 c7 e0 08 ret <== NOT EXECUTED 400020e0: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 400020e4: 40 00 2a 6a call 4000ca8c <__errno> <== NOT EXECUTED 400020e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400020ec: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400020f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400020f4: 81 c7 e0 08 ret <== NOT EXECUTED 400020f8: 81 e8 00 00 restore <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400020fc: 40 00 2a 64 call 4000ca8c <__errno> <== NOT EXECUTED 40002100: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002104: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40002108: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000210c: 81 c7 e0 08 ret 40002110: 81 e8 00 00 restore 4000a33c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 4000a33c: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 4000a340: 25 10 00 5f sethi %hi(0x40017c00), %l2 4000a344: c4 04 a3 cc ld [ %l2 + 0x3cc ], %g2 ! 40017fcc 4000a348: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 4000a34c: 40 00 02 51 call 4000ac90 4000a350: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 4000a354: 03 10 00 5a sethi %hi(0x40016800), %g1 4000a358: c4 00 61 5c ld [ %g1 + 0x15c ], %g2 ! 4001695c 4000a35c: 80 a0 a0 00 cmp %g2, 0 4000a360: 02 80 00 3d be 4000a454 4000a364: 03 10 00 5e sethi %hi(0x40017800), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4000a368: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 40017ab0 status = mount( 4000a36c: 90 07 bf f4 add %fp, -12, %o0 4000a370: d8 00 a0 0c ld [ %g2 + 0xc ], %o4 4000a374: d2 00 80 00 ld [ %g2 ], %o1 4000a378: d4 00 a0 04 ld [ %g2 + 4 ], %o2 4000a37c: 40 00 02 4d call 4000acb0 4000a380: d6 00 a0 08 ld [ %g2 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4000a384: 80 a2 3f ff cmp %o0, -1 4000a388: 02 80 00 36 be 4000a460 4000a38c: c8 07 bf f4 ld [ %fp + -12 ], %g4 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4000a390: c2 04 a3 cc ld [ %l2 + 0x3cc ], %g1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000a394: c4 01 20 18 ld [ %g4 + 0x18 ], %g2 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4000a398: c0 30 60 26 clrh [ %g1 + 0x26 ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000a39c: c4 20 60 14 st %g2, [ %g1 + 0x14 ] 4000a3a0: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000a3a4: a0 07 bf e4 add %fp, -28, %l0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000a3a8: c6 20 60 18 st %g3, [ %g1 + 0x18 ] 4000a3ac: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000a3b0: 23 10 00 5c sethi %hi(0x40017000), %l1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000a3b4: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4000a3b8: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000a3bc: 92 10 20 00 clr %o1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000a3c0: c6 20 60 20 st %g3, [ %g1 + 0x20 ] /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000a3c4: 94 10 00 10 mov %l0, %o2 4000a3c8: 96 10 20 00 clr %o3 4000a3cc: 7f ff de f4 call 40001f9c 4000a3d0: 90 14 61 08 or %l1, 0x108, %o0 rtems_filesystem_root = loc; 4000a3d4: c4 04 a3 cc ld [ %l2 + 0x3cc ], %g2 4000a3d8: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000a3dc: 94 10 00 10 mov %l0, %o2 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000a3e0: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 4000a3e4: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000a3e8: 92 10 20 00 clr %o1 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000a3ec: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 4000a3f0: c2 07 bf ec ld [ %fp + -20 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000a3f4: 96 10 20 00 clr %o3 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000a3f8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 4000a3fc: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000a400: 90 14 61 08 or %l1, 0x108, %o0 4000a404: 7f ff de e6 call 40001f9c 4000a408: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 4000a40c: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000a410: c6 04 a3 cc ld [ %l2 + 0x3cc ], %g3 * * 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); 4000a414: 11 10 00 5c sethi %hi(0x40017000), %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000a418: c2 20 e0 04 st %g1, [ %g3 + 4 ] 4000a41c: c2 07 bf e8 ld [ %fp + -24 ], %g1 * * 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); 4000a420: 90 12 21 10 or %o0, 0x110, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000a424: c2 20 e0 08 st %g1, [ %g3 + 8 ] 4000a428: c2 07 bf ec ld [ %fp + -20 ], %g1 * * 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); 4000a42c: 92 10 21 ff mov 0x1ff, %o1 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000a430: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 4000a434: c4 07 bf f0 ld [ %fp + -16 ], %g2 * * 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); 4000a438: 40 00 02 0c call 4000ac68 4000a43c: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] if ( status != 0 ) 4000a440: 80 a2 20 00 cmp %o0, 0 4000a444: 12 80 00 0a bne 4000a46c 4000a448: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 4000a44c: 81 c7 e0 08 ret 4000a450: 81 e8 00 00 restore /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 4000a454: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000a458: 7f ff ee 81 call 40005e5c <== NOT EXECUTED 4000a45c: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 4000a460: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000a464: 7f ff ee 7e call 40005e5c <== NOT EXECUTED 4000a468: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 4000a46c: 7f ff ee 7c call 40005e5c <== NOT EXECUTED 4000a470: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED 4000a474: 01 00 00 00 nop 400239a0 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 400239a0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400239a4: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 400239a8: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 400239ac: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 400239b0: 81 c3 e0 08 retl <== NOT EXECUTED 400239b4: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40001d40 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40001d40: 9d e3 bf 88 save %sp, -120, %sp <== 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 ); 40001d44: 92 10 20 00 clr %o1 <== NOT EXECUTED 40001d48: a2 07 bf e8 add %fp, -24, %l1 <== NOT EXECUTED 40001d4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001d50: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40001d54: 40 00 00 92 call 40001f9c <== NOT EXECUTED 40001d58: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001d5c: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== 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 ); 40001d60: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001d64: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40001d68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d6c: 02 80 00 28 be 40001e0c <== NOT EXECUTED 40001d70: e4 07 bf e8 ld [ %fp + -24 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 40001d74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d78: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40001d7c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40001d80: 02 80 00 0e be 40001db8 <== NOT EXECUTED 40001d84: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001d88: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40001d8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d90: 02 80 00 2b be 40001e3c <== NOT EXECUTED 40001d94: 01 00 00 00 nop <== NOT EXECUTED 40001d98: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001d9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001da0: 02 80 00 27 be 40001e3c <== NOT EXECUTED 40001da4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40001da8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001dac: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED 40001db0: 81 c7 e0 08 ret <== NOT EXECUTED 40001db4: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40001db8: 12 bf ff f5 bne 40001d8c <== NOT EXECUTED 40001dbc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 40001dc0: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 40001dc4: 40 00 30 54 call 4000df14 <== NOT EXECUTED 40001dc8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001dcc: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40001dd0: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40001dd4: c6 07 bf f0 ld [ %fp + -16 ], %g3 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; 40001dd8: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40001ddc: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001de0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40001de4: 02 80 00 18 be 40001e44 <== NOT EXECUTED 40001de8: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40001dec: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 40001df0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001df4: 02 80 00 14 be 40001e44 <== NOT EXECUTED 40001df8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40001dfc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001e00: b0 10 20 00 clr %i0 <== NOT EXECUTED 40001e04: 81 c7 e0 08 ret <== NOT EXECUTED 40001e08: 81 e8 00 00 restore <== 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 ); 40001e0c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40001e10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001e14: 02 80 00 04 be 40001e24 <== NOT EXECUTED 40001e18: 01 00 00 00 nop <== NOT EXECUTED 40001e1c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001e20: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40001e24: 40 00 2b 1a call 4000ca8c <__errno> <== NOT EXECUTED 40001e28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001e2c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001e30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001e34: 81 c7 e0 08 ret <== NOT EXECUTED 40001e38: 81 e8 00 00 restore <== 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; rtems_filesystem_freenode( &loc ); 40001e3c: 81 c7 e0 08 ret <== NOT EXECUTED 40001e40: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 40001e44: 81 c7 e0 08 ret <== NOT EXECUTED 40001e48: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40006e74 : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40006e74: 9a 92 60 00 orcc %o1, 0, %o5 40006e78: 02 80 00 4d be 40006fac 40006e7c: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40006e80: 02 80 00 4c be 40006fb0 40006e84: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40006e88: c2 03 40 00 ld [ %o5 ], %g1 40006e8c: 80 a0 60 00 cmp %g1, 0 40006e90: 22 80 00 44 be,a 40006fa0 40006e94: c2 03 60 04 ld [ %o5 + 4 ], %g1 *registered_major = 0; /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40006e98: 03 10 00 71 sethi %hi(0x4001c400), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40006e9c: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40006ea0: c8 00 62 70 ld [ %g1 + 0x270 ], %g4 40006ea4: 80 a1 00 08 cmp %g4, %o0 40006ea8: 08 80 00 39 bleu 40006f8c 40006eac: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40006eb0: 80 a2 20 00 cmp %o0, 0 40006eb4: 12 80 00 29 bne 40006f58 40006eb8: 03 10 00 71 sethi %hi(0x4001c400), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40006ebc: 90 81 3f ff addcc %g4, -1, %o0 40006ec0: 02 80 00 35 be 40006f94 40006ec4: 05 10 00 71 sethi %hi(0x4001c400), %g2 40006ec8: c6 00 a2 74 ld [ %g2 + 0x274 ], %g3 ! 4001c674 <_IO_Driver_address_table> 40006ecc: 85 29 20 03 sll %g4, 3, %g2 40006ed0: 83 29 20 05 sll %g4, 5, %g1 40006ed4: 82 20 40 02 sub %g1, %g2, %g1 40006ed8: 82 00 7f e8 add %g1, -24, %g1 40006edc: 10 80 00 05 b 40006ef0 40006ee0: 84 00 c0 01 add %g3, %g1, %g2 40006ee4: 90 82 3f ff addcc %o0, -1, %o0 40006ee8: 02 80 00 2b be 40006f94 40006eec: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 40006ef0: c2 00 80 00 ld [ %g2 ], %g1 40006ef4: 80 a0 60 00 cmp %g1, 0 40006ef8: 12 bf ff fb bne 40006ee4 40006efc: 88 10 00 02 mov %g2, %g4 40006f00: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40006f04: 80 a0 60 00 cmp %g1, 0 40006f08: 32 bf ff f8 bne,a 40006ee8 40006f0c: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED 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; 40006f10: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 40006f14: d0 22 80 00 st %o0, [ %o2 ] 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; 40006f18: c2 21 00 00 st %g1, [ %g4 ] 40006f1c: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f20: 92 10 20 00 clr %o1 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; 40006f24: c4 21 20 04 st %g2, [ %g4 + 4 ] 40006f28: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f2c: 94 10 20 00 clr %o2 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; 40006f30: c2 21 20 08 st %g1, [ %g4 + 8 ] 40006f34: c4 03 60 0c ld [ %o5 + 0xc ], %g2 40006f38: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40006f3c: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 40006f40: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 40006f44: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 40006f48: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f4c: 82 13 c0 00 mov %o7, %g1 40006f50: 7f ff ff 48 call 40006c70 40006f54: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40006f58: c8 00 62 74 ld [ %g1 + 0x274 ], %g4 40006f5c: 85 2a 20 03 sll %o0, 3, %g2 40006f60: 83 2a 20 05 sll %o0, 5, %g1 40006f64: 82 20 40 02 sub %g1, %g2, %g1 40006f68: c6 01 00 01 ld [ %g4 + %g1 ], %g3 40006f6c: 80 a0 e0 00 cmp %g3, 0 40006f70: 12 80 00 06 bne 40006f88 40006f74: 88 01 00 01 add %g4, %g1, %g4 40006f78: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 40006f7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006f80: 22 bf ff e5 be,a 40006f14 <== NOT EXECUTED 40006f84: c2 03 40 00 ld [ %o5 ], %g1 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f88: 82 10 20 0c mov 0xc, %g1 } 40006f8c: 81 c3 e0 08 retl 40006f90: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f94: 82 10 20 05 mov 5, %g1 } 40006f98: 81 c3 e0 08 retl 40006f9c: 90 10 00 01 mov %g1, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40006fa0: 80 a0 60 00 cmp %g1, 0 40006fa4: 12 bf ff be bne 40006e9c 40006fa8: 03 10 00 71 sethi %hi(0x4001c400), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006fac: 82 10 20 09 mov 9, %g1 } 40006fb0: 81 c3 e0 08 retl 40006fb4: 90 10 00 01 mov %g1, %o0 400082a0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 400082a0: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 400082a4: 80 a6 20 00 cmp %i0, 0 400082a8: 02 80 00 23 be 40008334 400082ac: 03 10 00 92 sethi %hi(0x40024800), %g1 return; 400082b0: a4 10 63 f4 or %g1, 0x3f4, %l2 ! 40024bf4 <_Objects_Information_table+0x4> 400082b4: a6 04 a0 10 add %l2, 0x10, %l3 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 400082b8: c2 04 80 00 ld [ %l2 ], %g1 400082bc: 80 a0 60 00 cmp %g1, 0 400082c0: 22 80 00 1a be,a 40008328 400082c4: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 400082c8: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 400082cc: 80 a4 60 00 cmp %l1, 0 400082d0: 22 80 00 16 be,a 40008328 400082d4: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 400082d8: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 400082dc: 86 90 60 00 orcc %g1, 0, %g3 400082e0: 22 80 00 12 be,a 40008328 400082e4: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 400082e8: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 400082ec: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400082f0: 83 2c 20 02 sll %l0, 2, %g1 400082f4: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 400082f8: 80 a2 20 00 cmp %o0, 0 400082fc: 02 80 00 05 be 40008310 40008300: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40008304: 9f c6 00 00 call %i0 40008308: 01 00 00 00 nop 4000830c: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 40008310: 83 28 e0 10 sll %g3, 0x10, %g1 40008314: 83 30 60 10 srl %g1, 0x10, %g1 40008318: 80 a0 40 10 cmp %g1, %l0 4000831c: 3a bf ff f5 bcc,a 400082f0 40008320: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40008324: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008328: 80 a4 80 13 cmp %l2, %l3 4000832c: 32 bf ff e4 bne,a 400082bc 40008330: c2 04 80 00 ld [ %l2 ], %g1 40008334: 81 c7 e0 08 ret 40008338: 81 e8 00 00 restore 4000a9a4 : * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { 4000a9a4: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_t *iop, *next; rtems_status_code rc; rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4000a9a8: 23 10 00 61 sethi %hi(0x40018400), %l1 4000a9ac: d0 04 62 48 ld [ %l1 + 0x248 ], %o0 ! 40018648 4000a9b0: 92 10 20 00 clr %o1 4000a9b4: 7f ff eb 69 call 40005758 4000a9b8: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000a9bc: 21 10 00 61 sethi %hi(0x40018400), %l0 4000a9c0: c4 04 22 44 ld [ %l0 + 0x244 ], %g2 ! 40018644 4000a9c4: 80 a0 a0 00 cmp %g2, 0 4000a9c8: 12 80 00 07 bne 4000a9e4 4000a9cc: 03 10 00 61 sethi %hi(0x40018400), %g1 } failed: iop = 0; done: 4000a9d0: b0 10 20 00 clr %i0 rtems_semaphore_release( rtems_libio_semaphore ); 4000a9d4: 7f ff eb a9 call 40005878 4000a9d8: d0 04 62 48 ld [ %l1 + 0x248 ], %o0 return iop; } 4000a9dc: 81 c7 e0 08 ret 4000a9e0: 81 e8 00 00 restore rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 4000a9e4: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 4000a9e8: 92 10 20 01 mov 1, %o1 4000a9ec: 86 20 80 03 sub %g2, %g3, %g3 4000a9f0: 87 38 e0 02 sra %g3, 2, %g3 4000a9f4: 83 28 e0 02 sll %g3, 2, %g1 4000a9f8: 85 28 e0 06 sll %g3, 6, %g2 4000a9fc: 84 20 80 01 sub %g2, %g1, %g2 4000aa00: 83 28 a0 06 sll %g2, 6, %g1 4000aa04: 82 20 40 02 sub %g1, %g2, %g1 4000aa08: 85 28 60 0c sll %g1, 0xc, %g2 4000aa0c: 82 00 40 02 add %g1, %g2, %g1 4000aa10: 82 00 40 03 add %g1, %g3, %g1 4000aa14: 83 28 60 04 sll %g1, 4, %g1 4000aa18: 82 20 40 03 sub %g1, %g3, %g1 4000aa1c: 83 28 60 02 sll %g1, 2, %g1 4000aa20: 86 20 c0 01 sub %g3, %g1, %g3 4000aa24: 94 10 20 54 mov 0x54, %o2 4000aa28: 96 10 20 00 clr %o3 4000aa2c: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000aa30: 98 07 bf f4 add %fp, -12, %o4 4000aa34: 90 12 21 00 or %o0, 0x100, %o0 4000aa38: 7f ff ea a1 call 400054bc 4000aa3c: 90 10 c0 08 or %g3, %o0, %o0 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 4000aa40: 80 a2 20 00 cmp %o0, 0 4000aa44: 32 bf ff e4 bne,a 4000a9d4 4000aa48: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000aa4c: f0 04 22 44 ld [ %l0 + 0x244 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4000aa50: 84 10 21 00 mov 0x100, %g2 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000aa54: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000aa58: c0 26 20 20 clr [ %i0 + 0x20 ] 4000aa5c: c0 26 00 00 clr [ %i0 ] 4000aa60: c0 26 20 04 clr [ %i0 + 4 ] 4000aa64: c0 26 20 08 clr [ %i0 + 8 ] 4000aa68: c0 26 20 10 clr [ %i0 + 0x10 ] 4000aa6c: c0 26 20 14 clr [ %i0 + 0x14 ] 4000aa70: c0 26 20 18 clr [ %i0 + 0x18 ] 4000aa74: c0 26 20 1c clr [ %i0 + 0x1c ] 4000aa78: c0 26 20 24 clr [ %i0 + 0x24 ] 4000aa7c: c0 26 20 2c clr [ %i0 + 0x2c ] 4000aa80: c0 26 20 30 clr [ %i0 + 0x30 ] 4000aa84: c0 26 20 28 clr [ %i0 + 0x28 ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4000aa88: c2 24 22 44 st %g1, [ %l0 + 0x244 ] goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000aa8c: c2 07 bf f4 ld [ %fp + -12 ], %g1 if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4000aa90: c4 26 20 0c st %g2, [ %i0 + 0xc ] iop->sem = sema; 4000aa94: 10 bf ff d0 b 4000a9d4 4000aa98: c2 26 20 20 st %g1, [ %i0 + 0x20 ] 40002114 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 40002114: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 40002118: 21 10 00 5e sethi %hi(0x40017800), %l0 4000211c: d0 04 22 a8 ld [ %l0 + 0x2a8 ], %o0 ! 40017aa8 40002120: 80 a2 20 00 cmp %o0, 0 40002124: 22 80 00 1e be,a 4000219c 40002128: 11 13 10 92 sethi %hi(0x4c424800), %o0 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 4000212c: 40 00 20 d3 call 4000a478 40002130: 92 10 20 34 mov 0x34, %o1 40002134: 03 10 00 61 sethi %hi(0x40018400), %g1 40002138: d0 20 62 40 st %o0, [ %g1 + 0x240 ] ! 40018640 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 4000213c: 80 a2 20 00 cmp %o0, 0 40002140: 02 80 00 23 be 400021cc 40002144: 84 10 00 08 mov %o0, %g2 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++) 40002148: c8 04 22 a8 ld [ %l0 + 0x2a8 ], %g4 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; 4000214c: 03 10 00 61 sethi %hi(0x40018400), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40002150: 80 a1 20 01 cmp %g4, 1 40002154: 02 80 00 10 be 40002194 40002158: d0 20 62 44 st %o0, [ %g1 + 0x244 ] 4000215c: 82 02 20 34 add %o0, 0x34, %g1 40002160: 86 10 20 01 mov 1, %g3 iop->data1 = iop + 1; 40002164: c2 20 7f f4 st %g1, [ %g1 + -12 ] 40002168: 86 00 e0 01 inc %g3 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++) 4000216c: 80 a0 c0 04 cmp %g3, %g4 40002170: 12 bf ff fd bne 40002164 40002174: 82 00 60 34 add %g1, 0x34, %g1 40002178: 85 28 e0 02 sll %g3, 2, %g2 4000217c: 83 28 e0 04 sll %g3, 4, %g1 40002180: 82 20 40 02 sub %g1, %g2, %g1 40002184: 82 00 40 03 add %g1, %g3, %g1 40002188: 83 28 60 02 sll %g1, 2, %g1 4000218c: 82 00 7f cc add %g1, -52, %g1 40002190: 84 02 00 01 add %o0, %g1, %g2 iop->data1 = iop + 1; iop->data1 = NULL; 40002194: c0 20 a0 28 clr [ %g2 + 0x28 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 40002198: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000219c: 92 10 20 01 mov 1, %o1 400021a0: 90 12 21 4f or %o0, 0x14f, %o0 400021a4: 94 10 20 54 mov 0x54, %o2 400021a8: 96 10 20 00 clr %o3 400021ac: 19 10 00 61 sethi %hi(0x40018400), %o4 400021b0: 40 00 0c c3 call 400054bc 400021b4: 98 13 22 48 or %o4, 0x248, %o4 ! 40018648 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 400021b8: 80 a2 20 00 cmp %o0, 0 400021bc: 12 80 00 06 bne 400021d4 400021c0: 01 00 00 00 nop /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 400021c4: 40 00 20 5e call 4000a33c 400021c8: 81 e8 00 00 restore 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); 400021cc: 40 00 0f 24 call 40005e5c <== NOT EXECUTED 400021d0: 90 10 20 1a mov 0x1a, %o0 <== 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 ); 400021d4: 40 00 0f 22 call 40005e5c <== NOT EXECUTED 400021d8: 01 00 00 00 nop 400021dc: 01 00 00 00 nop 4000a840 : */ int rtems_libio_is_file_open( void *node_access ) { 4000a840: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; int result=0; int i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4000a844: 21 10 00 61 sethi %hi(0x40018400), %l0 <== NOT EXECUTED 4000a848: d0 04 22 48 ld [ %l0 + 0x248 ], %o0 ! 40018648 <== NOT EXECUTED 4000a84c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a850: 7f ff eb c2 call 40005758 <== NOT EXECUTED 4000a854: 94 10 20 00 clr %o2 <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4000a858: 03 10 00 5e sethi %hi(0x40017800), %g1 <== NOT EXECUTED 4000a85c: c8 00 62 a8 ld [ %g1 + 0x2a8 ], %g4 ! 40017aa8 <== NOT EXECUTED 4000a860: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 4000a864: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 4000a868: 02 80 00 0e be 4000a8a0 <== NOT EXECUTED 4000a86c: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 <== NOT EXECUTED 4000a870: 84 10 20 00 clr %g2 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4000a874: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 4000a878: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4000a87c: 02 80 00 06 be 4000a894 <== NOT EXECUTED 4000a880: 84 00 a0 01 inc %g2 <== NOT EXECUTED /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4000a884: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 <== NOT EXECUTED 4000a888: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 4000a88c: 02 80 00 0a be 4000a8b4 <== NOT EXECUTED 4000a890: d0 04 22 48 ld [ %l0 + 0x248 ], %o0 <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4000a894: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 4000a898: 0a bf ff f7 bcs 4000a874 <== NOT EXECUTED 4000a89c: 86 00 e0 34 add %g3, 0x34, %g3 <== NOT EXECUTED break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4000a8a0: d0 04 22 48 ld [ %l0 + 0x248 ], %o0 <== NOT EXECUTED 4000a8a4: 7f ff eb f5 call 40005878 <== NOT EXECUTED 4000a8a8: b0 10 20 00 clr %i0 <== NOT EXECUTED return result; } 4000a8ac: 81 c7 e0 08 ret <== NOT EXECUTED 4000a8b0: 81 e8 00 00 restore <== NOT EXECUTED break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4000a8b4: 7f ff eb f1 call 40005878 <== NOT EXECUTED 4000a8b8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return result; } 4000a8bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000a8c0: 81 e8 00 00 restore <== NOT EXECUTED 4000a8c4 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 4000a8c4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; int result = 0; int i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4000a8c8: 21 10 00 61 sethi %hi(0x40018400), %l0 <== NOT EXECUTED 4000a8cc: d0 04 22 48 ld [ %l0 + 0x248 ], %o0 ! 40018648 <== NOT EXECUTED 4000a8d0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a8d4: 7f ff eb a1 call 40005758 <== NOT EXECUTED 4000a8d8: 94 10 20 00 clr %o2 <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4000a8dc: 03 10 00 5e sethi %hi(0x40017800), %g1 <== NOT EXECUTED 4000a8e0: c8 00 62 a8 ld [ %g1 + 0x2a8 ], %g4 ! 40017aa8 <== NOT EXECUTED 4000a8e4: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 4000a8e8: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 4000a8ec: 02 80 00 0e be 4000a924 <== NOT EXECUTED 4000a8f0: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 <== NOT EXECUTED 4000a8f4: 84 10 20 00 clr %g2 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4000a8f8: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 4000a8fc: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4000a900: 02 80 00 06 be 4000a918 <== NOT EXECUTED 4000a904: 84 00 a0 01 inc %g2 <== 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 ) { 4000a908: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4000a90c: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 4000a910: 02 80 00 0a be 4000a938 <== NOT EXECUTED 4000a914: d0 04 22 48 ld [ %l0 + 0x248 ], %o0 <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4000a918: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 4000a91c: 0a bf ff f7 bcs 4000a8f8 <== NOT EXECUTED 4000a920: 86 00 e0 34 add %g3, 0x34, %g3 <== NOT EXECUTED break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4000a924: d0 04 22 48 ld [ %l0 + 0x248 ], %o0 <== NOT EXECUTED 4000a928: 7f ff eb d4 call 40005878 <== NOT EXECUTED 4000a92c: b0 10 20 00 clr %i0 <== NOT EXECUTED return result; } 4000a930: 81 c7 e0 08 ret <== NOT EXECUTED 4000a934: 81 e8 00 00 restore <== NOT EXECUTED break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4000a938: 7f ff eb d0 call 40005878 <== NOT EXECUTED 4000a93c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return result; } 4000a940: 81 c7 e0 08 ret <== NOT EXECUTED 4000a944: 81 e8 00 00 restore <== NOT EXECUTED 40022f58 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 40022f58: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 40022f5c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40022f60: 92 10 20 00 clr %o1 <== NOT EXECUTED 40022f64: 40 00 05 28 call 40024404 <== NOT EXECUTED 40022f68: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40022f6c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40022f70: 12 80 00 37 bne 4002304c <== NOT EXECUTED 40022f74: 25 10 01 29 sethi %hi(0x4004a400), %l2 <== NOT EXECUTED /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 40022f78: c4 04 a0 e4 ld [ %l2 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED 40022f7c: 03 10 01 7b sethi %hi(0x4005ec00), %g1 <== NOT EXECUTED 40022f80: a6 10 63 30 or %g1, 0x330, %l3 ! 4005ef30 <== NOT EXECUTED 40022f84: 80 a0 80 13 cmp %g2, %l3 <== NOT EXECUTED 40022f88: 02 80 00 33 be 40023054 <== NOT EXECUTED 40022f8c: a2 14 a0 e4 or %l2, 0xe4, %l1 <== NOT EXECUTED return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 40022f90: d0 04 a0 e4 ld [ %l2 + 0xe4 ], %o0 <== NOT EXECUTED 40022f94: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40022f98: 40 00 44 53 call 400340e4 <== NOT EXECUTED 40022f9c: 94 10 20 40 mov 0x40, %o2 <== NOT EXECUTED rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40022fa0: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED 40022fa4: c8 00 62 38 ld [ %g1 + 0x238 ], %g4 ! 4005ea38 <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 40022fa8: c4 04 a0 e4 ld [ %l2 + 0xe4 ], %g2 <== NOT EXECUTED /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40022fac: c2 01 20 18 ld [ %g4 + 0x18 ], %g1 <== NOT EXECUTED * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40022fb0: a2 07 bf e4 add %fp, -28, %l1 <== NOT EXECUTED *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40022fb4: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 40022fb8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40022fbc: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 40022fc0: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40022fc4: c6 20 a0 18 st %g3, [ %g2 + 0x18 ] <== NOT EXECUTED 40022fc8: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 <== NOT EXECUTED * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40022fcc: 21 10 01 12 sethi %hi(0x40044800), %l0 <== NOT EXECUTED *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40022fd0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40022fd4: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 <== NOT EXECUTED * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40022fd8: 92 10 20 00 clr %o1 <== NOT EXECUTED *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40022fdc: c6 20 a0 20 st %g3, [ %g2 + 0x20 ] <== NOT EXECUTED * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40022fe0: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40022fe4: 96 10 20 00 clr %o3 <== NOT EXECUTED 40022fe8: 7f ff 89 63 call 40005574 <== NOT EXECUTED 40022fec: 90 14 23 d0 or %l0, 0x3d0, %o0 <== NOT EXECUTED rtems_filesystem_root = loc; 40022ff0: c4 04 a0 e4 ld [ %l2 + 0xe4 ], %g2 <== NOT EXECUTED 40022ff4: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40022ff8: 90 14 23 d0 or %l0, 0x3d0, %o0 <== NOT EXECUTED * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 40022ffc: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] <== NOT EXECUTED 40023000: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40023004: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 40023008: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] <== NOT EXECUTED 4002300c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40023010: 92 10 20 00 clr %o1 <== NOT EXECUTED * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 40023014: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40023018: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4002301c: 96 10 20 00 clr %o3 <== NOT EXECUTED 40023020: 7f ff 89 55 call 40005574 <== NOT EXECUTED 40023024: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] <== NOT EXECUTED rtems_filesystem_current = loc; 40023028: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 4002302c: c6 04 a0 e4 ld [ %l2 + 0xe4 ], %g3 <== NOT EXECUTED 40023030: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 40023034: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 40023038: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 4002303c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40023040: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 40023044: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED 40023048: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4002304c: 81 c7 e0 08 ret <== NOT EXECUTED 40023050: 81 e8 00 00 restore <== NOT EXECUTED sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 40023054: 7f ff 8b 4a call 40005d7c <== NOT EXECUTED 40023058: 90 10 20 40 mov 0x40, %o0 <== NOT EXECUTED if (!tmp) 4002305c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40023060: 02 80 00 0b be 4002308c <== NOT EXECUTED 40023064: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 40023068: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002306c: 15 10 00 8b sethi %hi(0x40022c00), %o2 <== NOT EXECUTED 40023070: 40 00 05 fc call 40024860 <== NOT EXECUTED 40023074: 94 12 a2 2c or %o2, 0x22c, %o2 ! 40022e2c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 40023078: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002307c: 32 80 00 06 bne,a 40023094 <== NOT EXECUTED 40023080: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 40023084: 10 bf ff c3 b 40022f90 <== NOT EXECUTED 40023088: e0 24 a0 e4 st %l0, [ %l2 + 0xe4 ] <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 4002308c: 81 c7 e0 08 ret <== NOT EXECUTED 40023090: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 40023094: 7f ff 89 96 call 400056ec <== NOT EXECUTED 40023098: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 4002309c: 81 c7 e0 08 ret <== NOT EXECUTED 400230a0: 81 e8 00 00 restore <== NOT EXECUTED 40022ea4 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 40022ea4: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 40022ea8: 90 10 20 00 clr %o0 <== NOT EXECUTED 40022eac: 92 10 20 00 clr %o1 <== NOT EXECUTED 40022eb0: 40 00 05 55 call 40024404 <== NOT EXECUTED 40022eb4: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40022eb8: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40022ebc: 12 80 00 13 bne 40022f08 <== NOT EXECUTED 40022ec0: 25 10 01 29 sethi %hi(0x4004a400), %l2 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 40022ec4: e2 04 a0 e4 ld [ %l2 + 0xe4 ], %l1 ! 4004a4e4 <== NOT EXECUTED 40022ec8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40022ecc: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED 40022ed0: 86 14 a0 e4 or %l2, 0xe4, %g3 <== NOT EXECUTED 40022ed4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40022ed8: 02 80 00 0e be 40022f10 <== NOT EXECUTED 40022edc: a0 10 00 03 mov %g3, %l0 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 40022ee0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022ee4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40022ee8: 40 00 06 b9 call 400249cc <== NOT EXECUTED 40022eec: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 40022ef0: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40022ef4: 02 80 00 10 be 40022f34 <== NOT EXECUTED 40022ef8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 40022efc: 03 10 01 7b sethi %hi(0x4005ec00), %g1 <== NOT EXECUTED 40022f00: 82 10 63 30 or %g1, 0x330, %g1 ! 4005ef30 <== NOT EXECUTED 40022f04: c2 24 a0 e4 st %g1, [ %l2 + 0xe4 ] <== NOT EXECUTED return sc; } 40022f08: 81 c7 e0 08 ret <== NOT EXECUTED 40022f0c: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 40022f10: 40 00 06 85 call 40024924 <== NOT EXECUTED 40022f14: 92 10 00 03 mov %g3, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40022f18: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40022f1c: 12 bf ff fb bne 40022f08 <== NOT EXECUTED 40022f20: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 40022f24: 7f ff ff c2 call 40022e2c <== NOT EXECUTED 40022f28: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 40022f2c: 10 bf ff ee b 40022ee4 <== NOT EXECUTED 40022f30: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 40022f34: 15 10 00 8b sethi %hi(0x40022c00), %o2 <== NOT EXECUTED 40022f38: 40 00 06 4a call 40024860 <== NOT EXECUTED 40022f3c: 94 12 a2 2c or %o2, 0x22c, %o2 ! 40022e2c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40022f40: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40022f44: 12 bf ff ef bne 40022f00 <== NOT EXECUTED 40022f48: 03 10 01 7b sethi %hi(0x4005ec00), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40022f4c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40022f50: 10 bf ff ee b 40022f08 <== NOT EXECUTED 40022f54: c2 24 a0 e4 st %g1, [ %l2 + 0xe4 ] <== NOT EXECUTED 4000a7e4 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4000a7e4: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4000a7e8: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000a7ec: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000a7f0: 02 80 00 06 be 4000a808 <== NOT EXECUTED 4000a7f4: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4000a7f8: 83 30 a0 02 srl %g2, 2, %g1 <== NOT EXECUTED 4000a7fc: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 4000a800: 12 80 00 0e bne 4000a838 <== NOT EXECUTED 4000a804: 90 08 60 01 and %g1, 1, %o0 <== 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 ) { 4000a808: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000a80c: 02 80 00 04 be 4000a81c <== NOT EXECUTED 4000a810: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED fcntl_flags |= O_NONBLOCK; 4000a814: 03 00 00 10 sethi %hi(0x4000), %g1 <== NOT EXECUTED 4000a818: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4000a81c: 32 80 00 02 bne,a 4000a824 <== NOT EXECUTED 4000a820: 90 12 20 08 or %o0, 8, %o0 <== NOT EXECUTED fcntl_flags |= O_APPEND; } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4000a824: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED 4000a828: 32 80 00 02 bne,a 4000a830 <== NOT EXECUTED 4000a82c: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED fcntl_flags |= O_CREAT; } return fcntl_flags; } 4000a830: 81 c3 e0 08 retl <== NOT EXECUTED 4000a834: 01 00 00 00 nop <== NOT EXECUTED { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4000a838: 10 bf ff f4 b 4000a808 <== NOT EXECUTED 4000a83c: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 40005e78 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 40005e78: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 40005e7c: 11 10 01 7a sethi %hi(0x4005e800), %o0 <== NOT EXECUTED 40005e80: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40005e84: 90 12 21 b0 or %o0, 0x1b0, %o0 <== NOT EXECUTED 40005e88: 40 00 16 70 call 4000b848 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40005e8c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40005e90: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 40005e94: 02 80 00 08 be 40005eb4 <== NOT EXECUTED 40005e98: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 40005e9c: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED 40005ea0: 82 10 62 08 or %g1, 0x208, %g1 ! 4005ea08 <== NOT EXECUTED 40005ea4: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4 <== NOT EXECUTED 40005ea8: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 40005eac: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 40005eb0: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 40005eb4: 81 c7 e0 08 ret <== NOT EXECUTED 40005eb8: 81 e8 00 00 restore <== NOT EXECUTED 40005ebc : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 40005ebc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED size_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 40005ec0: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 40005ec4: 02 80 00 13 be 40005f10 <== NOT EXECUTED 40005ec8: 11 10 01 7a sethi %hi(0x4005e800), %o0 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 40005ecc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); 40005ed0: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40005ed4: 40 00 16 5d call 4000b848 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40005ed8: 90 12 21 b0 or %o0, 0x1b0, %o0 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 40005edc: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED 40005ee0: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 40005ee4: 96 10 62 08 or %g1, 0x208, %o3 <== NOT EXECUTED 40005ee8: d8 1a e0 20 ldd [ %o3 + 0x20 ], %o4 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 40005eec: c2 02 e0 2c ld [ %o3 + 0x2c ], %g1 <== NOT EXECUTED if (current_depth > s->max_depth) 40005ef0: c8 02 e0 18 ld [ %o3 + 0x18 ], %g4 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 40005ef4: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 40005ef8: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 40005efc: c4 3a e0 20 std %g2, [ %o3 + 0x20 ] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 40005f00: 86 20 c0 01 sub %g3, %g1, %g3 <== NOT EXECUTED if (current_depth > s->max_depth) 40005f04: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 40005f08: 38 80 00 02 bgu,a 40005f10 <== NOT EXECUTED 40005f0c: c6 22 e0 18 st %g3, [ %o3 + 0x18 ] <== NOT EXECUTED 40005f10: 81 c7 e0 08 ret <== NOT EXECUTED 40005f14: 81 e8 00 00 restore <== NOT EXECUTED 40005f18 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40005f18: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED 40005f1c: c0 20 62 08 clr [ %g1 + 0x208 ] ! 4005ea08 <== NOT EXECUTED 40005f20: c0 20 62 0c clr [ %g1 + 0x20c ] <== NOT EXECUTED 40005f24: 82 10 62 08 or %g1, 0x208, %g1 <== NOT EXECUTED 40005f28: c0 20 60 28 clr [ %g1 + 0x28 ] <== NOT EXECUTED 40005f2c: c0 20 60 2c clr [ %g1 + 0x2c ] <== NOT EXECUTED 40005f30: c0 20 60 08 clr [ %g1 + 8 ] <== NOT EXECUTED 40005f34: c0 20 60 0c clr [ %g1 + 0xc ] <== NOT EXECUTED 40005f38: c0 20 60 10 clr [ %g1 + 0x10 ] <== NOT EXECUTED 40005f3c: c0 20 60 14 clr [ %g1 + 0x14 ] <== NOT EXECUTED 40005f40: c0 20 60 18 clr [ %g1 + 0x18 ] <== NOT EXECUTED 40005f44: c0 20 60 1c clr [ %g1 + 0x1c ] <== NOT EXECUTED 40005f48: c0 20 60 20 clr [ %g1 + 0x20 ] <== NOT EXECUTED } 40005f4c: 81 c3 e0 08 retl <== NOT EXECUTED 40005f50: c0 20 60 24 clr [ %g1 + 0x24 ] <== NOT EXECUTED 40005a48 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40005a48: 9d e3 bf 98 save %sp, -104, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40005a4c: a0 96 20 00 orcc %i0, 0, %l0 40005a50: 02 80 00 1f be 40005acc 40005a54: 03 10 00 7a sethi %hi(0x4001e800), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40005a58: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 ! 4001e874 <_System_state_Current> 40005a5c: 80 a0 a0 03 cmp %g2, 3 40005a60: 02 80 00 16 be 40005ab8 40005a64: c0 24 00 00 clr [ %l0 ] /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 40005a68: 7f ff fb 7e call 40004860 40005a6c: b0 10 20 0c mov 0xc, %i0 /* * Perform the aligned allocation requested */ return_this = _Protected_heap_Allocate_aligned( 40005a70: 92 10 00 1a mov %i2, %o1 40005a74: 94 10 00 19 mov %i1, %o2 40005a78: 11 10 00 79 sethi %hi(0x4001e400), %o0 40005a7c: 40 00 13 e4 call 4000aa0c <_Protected_heap_Allocate_aligned> 40005a80: 90 12 21 08 or %o0, 0x108, %o0 ! 4001e508 &RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40005a84: b4 92 20 00 orcc %o0, 0, %i2 40005a88: 02 80 00 12 be 40005ad0 40005a8c: 03 10 00 77 sethi %hi(0x4001dc00), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 40005a90: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 4001dee4 40005a94: 80 a0 60 00 cmp %g1, 0 40005a98: 22 80 00 06 be,a 40005ab0 40005a9c: f4 24 00 00 st %i2, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 40005aa0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40005aa4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005aa8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 40005aac: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED 40005ab0: 81 c7 e0 08 ret 40005ab4: 91 e8 20 00 restore %g0, 0, %o0 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40005ab8: 7f ff fb 50 call 400047f8 40005abc: 01 00 00 00 nop 40005ac0: 80 8a 20 ff btst 0xff, %o0 40005ac4: 12 bf ff e9 bne 40005a68 40005ac8: 01 00 00 00 nop if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 40005acc: b0 10 20 16 mov 0x16, %i0 ! 16 } 40005ad0: 81 c7 e0 08 ret 40005ad4: 81 e8 00 00 restore 40007d88 : void rtems_panic( const char *printf_format, ... ) { 40007d88: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40007d8c: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40007d90: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40007d94: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40007d98: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40007d9c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40007da0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40007da4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40007da8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40007dac: 7f ff ff 7d call 40007ba0 <== NOT EXECUTED 40007db0: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 40007db4: 81 c7 e0 08 ret <== NOT EXECUTED 40007db8: 81 e8 00 00 restore <== NOT EXECUTED 400068e4 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 400068e4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 400068e8: 11 10 00 74 sethi %hi(0x4001d000), %o0 400068ec: 92 10 00 18 mov %i0, %o1 400068f0: 90 12 21 74 or %o0, 0x174, %o0 400068f4: 40 00 09 28 call 40008d94 <_Objects_Get> 400068f8: 94 07 bf f4 add %fp, -12, %o2 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 400068fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006900: 80 a0 60 00 cmp %g1, 0 40006904: 02 80 00 04 be 40006914 40006908: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4000690c: 81 c7 e0 08 ret 40006910: 91 e8 20 04 restore %g0, 4, %o0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40006914: 25 10 00 74 sethi %hi(0x4001d000), %l2 40006918: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 4000691c: c2 04 a3 b0 ld [ %l2 + 0x3b0 ], %g1 40006920: 80 a0 80 01 cmp %g2, %g1 40006924: 02 80 00 06 be 4000693c 40006928: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 4000692c: 40 00 0b 81 call 40009730 <_Thread_Enable_dispatch> 40006930: b0 10 20 17 mov 0x17, %i0 40006934: 81 c7 e0 08 ret 40006938: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 4000693c: 12 80 00 0f bne 40006978 40006940: 01 00 00 00 nop switch ( the_period->state ) { 40006944: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40006948: 80 a0 60 00 cmp %g1, 0 4000694c: 02 80 00 07 be 40006968 40006950: b0 10 20 0b mov 0xb, %i0 40006954: 82 00 7f fd add %g1, -3, %g1 40006958: 80 a0 60 01 cmp %g1, 1 4000695c: 18 80 00 03 bgu 40006968 40006960: b0 10 20 00 clr %i0 40006964: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40006968: 40 00 0b 72 call 40009730 <_Thread_Enable_dispatch> 4000696c: 01 00 00 00 nop 40006970: 81 c7 e0 08 ret 40006974: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40006978: 7f ff f0 77 call 40002b54 4000697c: 01 00 00 00 nop 40006980: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40006984: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40006988: 80 a4 e0 02 cmp %l3, 2 4000698c: 02 80 00 1a be 400069f4 40006990: 80 a4 e0 04 cmp %l3, 4 40006994: 02 80 00 32 be 40006a5c 40006998: 80 a4 e0 00 cmp %l3, 0 4000699c: 12 bf ff dc bne 4000690c 400069a0: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 400069a4: 7f ff f0 70 call 40002b64 400069a8: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 400069ac: 7f ff ff 58 call 4000670c <_Rate_monotonic_Initiate_statistics> 400069b0: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 400069b4: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400069b8: 03 10 00 1b sethi %hi(0x40006c00), %g1 400069bc: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 40006db8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 400069c0: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069c4: 92 04 60 10 add %l1, 0x10, %o1 400069c8: 11 10 00 74 sethi %hi(0x4001d000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400069cc: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069d0: 90 12 23 d0 or %o0, 0x3d0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400069d4: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400069d8: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 400069dc: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); the_period->state = RATE_MONOTONIC_ACTIVE; 400069e0: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400069e4: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069e8: 40 00 10 c9 call 4000ad0c <_Watchdog_Insert> 400069ec: b0 10 20 00 clr %i0 400069f0: 30 bf ff de b,a 40006968 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 400069f4: 7f ff ff 62 call 4000677c <_Rate_monotonic_Update_statistics> 400069f8: 90 10 00 11 mov %l1, %o0 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 400069fc: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40006a00: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 40006a04: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40006a08: 7f ff f0 57 call 40002b64 40006a0c: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40006a10: c2 04 a3 b0 ld [ %l2 + 0x3b0 ], %g1 40006a14: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006a18: 90 10 00 01 mov %g1, %o0 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 40006a1c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006a20: 40 00 0d d9 call 4000a184 <_Thread_Set_state> 40006a24: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40006a28: 7f ff f0 4b call 40002b54 40006a2c: 01 00 00 00 nop local_state = the_period->state; 40006a30: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006a34: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40006a38: 7f ff f0 4b call 40002b64 40006a3c: 01 00 00 00 nop /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 40006a40: 80 a4 20 03 cmp %l0, 3 40006a44: 02 80 00 17 be 40006aa0 40006a48: d0 04 a3 b0 ld [ %l2 + 0x3b0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 40006a4c: 40 00 0b 39 call 40009730 <_Thread_Enable_dispatch> 40006a50: b0 10 20 00 clr %i0 40006a54: 81 c7 e0 08 ret 40006a58: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40006a5c: 7f ff ff 48 call 4000677c <_Rate_monotonic_Update_statistics> 40006a60: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40006a64: 7f ff f0 40 call 40002b64 40006a68: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006a6c: 82 10 20 02 mov 2, %g1 40006a70: 92 04 60 10 add %l1, 0x10, %o1 40006a74: 11 10 00 74 sethi %hi(0x4001d000), %o0 40006a78: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 4001d3d0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006a7c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40006a80: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40006a84: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006a88: 40 00 10 a1 call 4000ad0c <_Watchdog_Insert> 40006a8c: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40006a90: 40 00 0b 28 call 40009730 <_Thread_Enable_dispatch> 40006a94: 01 00 00 00 nop 40006a98: 81 c7 e0 08 ret 40006a9c: 81 e8 00 00 restore /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006aa0: 40 00 0a 27 call 4000933c <_Thread_Clear_state> <== NOT EXECUTED 40006aa4: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40006aa8: 30 bf ff e9 b,a 40006a4c <== NOT EXECUTED 40023fe0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40023fe0: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 40023fe4: 80 a6 60 00 cmp %i1, 0 40023fe8: 02 80 00 4a be 40024110 40023fec: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40023ff0: 13 10 01 1b sethi %hi(0x40046c00), %o1 40023ff4: 9f c6 40 00 call %i1 40023ff8: 92 12 63 68 or %o1, 0x368, %o1 ! 40046f68 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40023ffc: 90 10 00 18 mov %i0, %o0 40024000: 13 10 01 1b sethi %hi(0x40046c00), %o1 40024004: 9f c6 40 00 call %i1 40024008: 92 12 63 88 or %o1, 0x388, %o1 ! 40046f88 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 4002400c: 90 10 00 18 mov %i0, %o0 40024010: 13 10 01 1b sethi %hi(0x40046c00), %o1 40024014: 9f c6 40 00 call %i1 40024018: 92 12 63 b0 or %o1, 0x3b0, %o1 ! 40046fb0 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 4002401c: 90 10 00 18 mov %i0, %o0 40024020: 13 10 01 1b sethi %hi(0x40046c00), %o1 40024024: 9f c6 40 00 call %i1 40024028: 92 12 63 d8 or %o1, 0x3d8, %o1 ! 40046fd8 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 4002402c: 90 10 00 18 mov %i0, %o0 40024030: 13 10 01 1c sethi %hi(0x40047000), %o1 40024034: 9f c6 40 00 call %i1 40024038: 92 12 60 28 or %o1, 0x28, %o1 ! 40047028 /* * 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 ; 4002403c: 03 10 01 7c sethi %hi(0x4005f000), %g1 40024040: a6 10 61 00 or %g1, 0x100, %l3 ! 4005f100 <_Rate_monotonic_Information> 40024044: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 40024048: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 4002404c: 80 a4 80 01 cmp %l2, %g1 40024050: 18 80 00 30 bgu 40024110 40024054: 03 10 01 1c sethi %hi(0x40047000), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40024058: 05 10 01 1d sethi %hi(0x40047400), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 4002405c: b6 10 60 78 or %g1, 0x78, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40024060: b8 10 a0 80 or %g2, 0x80, %i4 40024064: a8 07 bf 98 add %fp, -104, %l4 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 40024068: ae 07 bf d0 add %fp, -48, %l7 4002406c: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40024070: ba 07 bf b0 add %fp, -80, %i5 40024074: aa 07 bf e8 add %fp, -24, %l5 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40024078: 10 80 00 06 b 40024090 4002407c: b4 07 bf c8 add %fp, -56, %i2 * 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 ; id++ ) { 40024080: a4 04 a0 01 inc %l2 /* * 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 ; 40024084: 80 a0 40 12 cmp %g1, %l2 40024088: 0a 80 00 22 bcs 40024110 4002408c: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40024090: 90 10 00 12 mov %l2, %o0 40024094: 40 00 2d e2 call 4002f81c 40024098: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 4002409c: 80 a2 20 00 cmp %o0, 0 400240a0: 32 bf ff f8 bne,a 40024080 400240a4: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 400240a8: 92 10 00 17 mov %l7, %o1 400240ac: 40 00 2d f1 call 4002f870 400240b0: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 400240b4: d0 07 bf d0 ld [ %fp + -48 ], %o0 400240b8: 80 a2 20 00 cmp %o0, 0 400240bc: 12 80 00 4b bne 400241e8 400240c0: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400240c4: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 400240c8: 94 10 00 12 mov %l2, %o2 400240cc: 92 10 00 1b mov %i3, %o1 400240d0: 96 10 00 16 mov %l6, %o3 400240d4: 9f c6 40 00 call %i1 400240d8: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400240dc: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 400240e0: 94 10 00 15 mov %l5, %o2 400240e4: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400240e8: 80 a0 60 00 cmp %g1, 0 400240ec: 12 80 00 0b bne 40024118 400240f0: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 400240f4: 9f c6 40 00 call %i1 400240f8: 90 10 00 18 mov %i0, %o0 /* * 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 ; 400240fc: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 40024100: a4 04 a0 01 inc %l2 /* * 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 ; 40024104: 80 a0 40 12 cmp %g1, %l2 40024108: 1a bf ff e3 bcc 40024094 4002410c: 90 10 00 12 mov %l2, %o0 40024110: 81 c7 e0 08 ret 40024114: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40024118: 40 00 05 fd call 4002590c <_Timespec_Divide_by_integer> 4002411c: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 40024120: d0 07 bf a4 ld [ %fp + -92 ], %o0 40024124: 40 00 77 75 call 40041ef8 <.div> 40024128: 92 10 23 e8 mov 0x3e8, %o1 4002412c: a2 10 00 08 mov %o0, %l1 40024130: d0 07 bf ac ld [ %fp + -84 ], %o0 40024134: 40 00 77 71 call 40041ef8 <.div> 40024138: 92 10 23 e8 mov 0x3e8, %o1 4002413c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40024140: a0 10 00 08 mov %o0, %l0 40024144: d0 07 bf ec ld [ %fp + -20 ], %o0 40024148: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4002414c: 40 00 77 6b call 40041ef8 <.div> 40024150: 92 10 23 e8 mov 0x3e8, %o1 40024154: d8 07 bf a8 ld [ %fp + -88 ], %o4 40024158: d4 07 bf a0 ld [ %fp + -96 ], %o2 4002415c: 96 10 00 11 mov %l1, %o3 40024160: 9a 10 00 10 mov %l0, %o5 40024164: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40024168: 13 10 01 1c sethi %hi(0x40047000), %o1 4002416c: 90 10 00 18 mov %i0, %o0 40024170: 9f c6 40 00 call %i1 40024174: 92 12 60 90 or %o1, 0x90, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40024178: d2 07 bf 98 ld [ %fp + -104 ], %o1 4002417c: 94 10 00 15 mov %l5, %o2 40024180: 40 00 05 e3 call 4002590c <_Timespec_Divide_by_integer> 40024184: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 40024188: d0 07 bf bc ld [ %fp + -68 ], %o0 4002418c: 40 00 77 5b call 40041ef8 <.div> 40024190: 92 10 23 e8 mov 0x3e8, %o1 40024194: a2 10 00 08 mov %o0, %l1 40024198: d0 07 bf c4 ld [ %fp + -60 ], %o0 4002419c: 40 00 77 57 call 40041ef8 <.div> 400241a0: 92 10 23 e8 mov 0x3e8, %o1 400241a4: c2 07 bf e8 ld [ %fp + -24 ], %g1 400241a8: a0 10 00 08 mov %o0, %l0 400241ac: d0 07 bf ec ld [ %fp + -20 ], %o0 400241b0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400241b4: 40 00 77 51 call 40041ef8 <.div> 400241b8: 92 10 23 e8 mov 0x3e8, %o1 400241bc: d4 07 bf b8 ld [ %fp + -72 ], %o2 400241c0: d8 07 bf c0 ld [ %fp + -64 ], %o4 400241c4: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 400241c8: 96 10 00 11 mov %l1, %o3 400241cc: 9a 10 00 10 mov %l0, %o5 400241d0: 90 10 00 18 mov %i0, %o0 400241d4: 13 10 01 1c sethi %hi(0x40047000), %o1 400241d8: 9f c6 40 00 call %i1 400241dc: 92 12 60 b0 or %o1, 0xb0, %o1 ! 400470b0 /* * 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 ; 400241e0: 10 bf ff a8 b 40024080 400241e4: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 400241e8: 94 10 00 16 mov %l6, %o2 400241ec: 7f ff 95 7b call 400097d8 400241f0: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400241f4: 10 bf ff b5 b 400240c8 400241f8: d8 1f bf 98 ldd [ %fp + -104 ], %o4 40010040 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40010040: 9d e3 bf 90 save %sp, -112, %sp 40010044: a0 10 00 18 mov %i0, %l0 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 40010048: 80 a6 60 00 cmp %i1, 0 4001004c: 02 80 00 28 be 400100ec 40010050: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40010054: 23 10 00 c8 sethi %hi(0x40032000), %l1 40010058: 40 00 09 12 call 400124a0 <_API_Mutex_Lock> 4001005c: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 ! 40032258 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40010060: 92 10 00 10 mov %l0, %o1 40010064: 11 10 00 c7 sethi %hi(0x40031c00), %o0 40010068: 94 07 bf f0 add %fp, -16, %o2 4001006c: 40 00 10 29 call 40014110 <_Objects_Get_no_protection> 40010070: 90 12 23 dc or %o0, 0x3dc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40010074: c2 07 bf f0 ld [ %fp + -16 ], %g1 40010078: 80 a0 60 00 cmp %g1, 0 4001007c: 12 80 00 16 bne 400100d4 40010080: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40010084: 92 10 00 19 mov %i1, %o1 40010088: 94 10 00 1a mov %i2, %o2 4001008c: 90 02 20 68 add %o0, 0x68, %o0 40010090: 96 07 bf f4 add %fp, -12, %o3 40010094: 40 00 0c 48 call 400131b4 <_Heap_Extend> 40010098: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4001009c: 80 a2 20 01 cmp %o0, 1 400100a0: 02 80 00 11 be 400100e4 400100a4: 01 00 00 00 nop 400100a8: 1a 80 00 13 bcc 400100f4 400100ac: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100b0: c6 07 bf f4 ld [ %fp + -12 ], %g3 400100b4: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 400100b8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100bc: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 400100c0: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100c4: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 400100c8: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 400100cc: 10 80 00 06 b 400100e4 400100d0: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 400100d4: 80 a0 60 01 cmp %g1, 1 400100d8: 02 80 00 03 be 400100e4 400100dc: b0 10 20 04 mov 4, %i0 switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 400100e0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 400100e4: 40 00 09 05 call 400124f8 <_API_Mutex_Unlock> 400100e8: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 return return_status; } 400100ec: 81 c7 e0 08 ret 400100f0: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 400100f4: 12 bf ff fb bne 400100e0 400100f8: b0 10 20 18 mov 0x18, %i0 400100fc: 30 bf ff fa b,a 400100e4 400103fc : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 400103fc: 9d e3 bf 88 save %sp, -120, %sp uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 40010400: 80 a6 e0 00 cmp %i3, 0 40010404: 02 80 00 2e be 400104bc 40010408: 21 10 00 c8 sethi %hi(0x40032000), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4001040c: 40 00 08 25 call 400124a0 <_API_Mutex_Lock> 40010410: d0 04 22 58 ld [ %l0 + 0x258 ], %o0 ! 40032258 <_RTEMS_Allocator_Mutex> 40010414: 92 10 00 18 mov %i0, %o1 40010418: 11 10 00 c7 sethi %hi(0x40031c00), %o0 4001041c: 94 07 bf f0 add %fp, -16, %o2 40010420: 40 00 0f 3c call 40014110 <_Objects_Get_no_protection> 40010424: 90 12 23 dc or %o0, 0x3dc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40010428: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001042c: 80 a0 60 00 cmp %g1, 0 40010430: 12 80 00 14 bne 40010480 40010434: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 40010438: 94 10 00 1a mov %i2, %o2 4001043c: 92 10 00 19 mov %i1, %o1 40010440: 90 02 20 68 add %o0, 0x68, %o0 40010444: 96 07 bf ec add %fp, -20, %o3 40010448: 40 00 0c e5 call 400137dc <_Heap_Resize_block> 4001044c: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 40010450: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 40010454: b4 92 20 00 orcc %o0, 0, %i2 40010458: 12 80 00 13 bne 400104a4 4001045c: c2 26 c0 00 st %g1, [ %i3 ] 40010460: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40010464: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010468: 12 80 00 17 bne 400104c4 <== NOT EXECUTED 4001046c: d0 04 22 58 ld [ %l0 + 0x258 ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 40010470: 40 00 08 22 call 400124f8 <_API_Mutex_Unlock> <== NOT EXECUTED 40010474: b0 10 20 00 clr %i0 <== NOT EXECUTED 40010478: 81 c7 e0 08 ret <== NOT EXECUTED 4001047c: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010480: d0 04 22 58 ld [ %l0 + 0x258 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40010484: 82 18 60 01 xor %g1, 1, %g1 40010488: 80 a0 00 01 cmp %g0, %g1 4001048c: 84 40 3f ff addx %g0, -1, %g2 40010490: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010494: 40 00 08 19 call 400124f8 <_API_Mutex_Unlock> 40010498: b0 06 20 19 add %i0, 0x19, %i0 4001049c: 81 c7 e0 08 ret 400104a0: 81 e8 00 00 restore _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 400104a4: d0 04 22 58 ld [ %l0 + 0x258 ], %o0 400104a8: 40 00 08 14 call 400124f8 <_API_Mutex_Unlock> 400104ac: b0 10 20 0d mov 0xd, %i0 return 400104b0: 80 a6 a0 01 cmp %i2, 1 400104b4: 02 80 00 07 be 400104d0 400104b8: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 400104bc: 81 c7 e0 08 ret 400104c0: 91 e8 20 09 restore %g0, 9, %o0 *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 */ 400104c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400104c8: 40 00 20 d2 call 40018810 <_Region_Process_queue> <== NOT EXECUTED 400104cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400104d0: 81 c7 e0 08 ret <== NOT EXECUTED 400104d4: 81 e8 00 00 restore <== NOT EXECUTED 400054bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 400054bc: 9d e3 bf 80 save %sp, -128, %sp register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 400054c0: a4 96 20 00 orcc %i0, 0, %l2 400054c4: 02 80 00 33 be 40005590 400054c8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400054cc: 80 a7 20 00 cmp %i4, 0 400054d0: 02 80 00 30 be 40005590 400054d4: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 400054d8: 82 8e a0 c0 andcc %i2, 0xc0, %g1 400054dc: 12 80 00 2f bne 40005598 400054e0: a0 0e a0 30 and %i2, 0x30, %l0 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 ) ) 400054e4: 80 a4 20 00 cmp %l0, 0 400054e8: 02 80 00 04 be 400054f8 400054ec: 80 a6 60 01 cmp %i1, 1 400054f0: 18 80 00 28 bgu 40005590 400054f4: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400054f8: 05 10 00 62 sethi %hi(0x40018800), %g2 400054fc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 40018820 <_Thread_Dispatch_disable_level> 40005500: 82 00 60 01 inc %g1 40005504: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] * 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 ); 40005508: 31 10 00 61 sethi %hi(0x40018400), %i0 4000550c: 40 00 05 6e call 40006ac4 <_Objects_Allocate> 40005510: 90 16 22 e4 or %i0, 0x2e4, %o0 ! 400186e4 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40005514: a2 92 20 00 orcc %o0, 0, %l1 40005518: 02 80 00 4e be 40005650 4000551c: 80 a4 20 00 cmp %l0, 0 * 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 ) ) { 40005520: 02 80 00 2c be 400055d0 40005524: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40005528: 80 8e a0 40 btst 0x40, %i2 4000552c: 02 80 00 44 be 4000563c 40005530: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40005534: 82 10 20 02 mov 2, %g1 40005538: c2 27 bf e8 st %g1, [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 4000553c: 80 a4 20 10 cmp %l0, 0x10 40005540: 02 80 00 48 be 40005660 40005544: 82 10 20 02 mov 2, %g1 the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 40005548: c0 2f bf e4 clrb [ %fp + -28 ] 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; 4000554c: c2 27 bf e0 st %g1, [ %fp + -32 ] the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 40005550: 82 1e 60 01 xor %i1, 1, %g1 40005554: 80 a0 00 01 cmp %g0, %g1 } 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; 40005558: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 4000555c: 94 60 3f ff subx %g0, -1, %o2 40005560: 90 04 60 14 add %l1, 0x14, %o0 40005564: 40 00 03 3e call 4000625c <_CORE_mutex_Initialize> 40005568: 92 07 bf e0 add %fp, -32, %o1 &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 4000556c: 80 a2 20 06 cmp %o0, 6 40005570: 32 80 00 26 bne,a 40005608 40005574: c4 04 60 08 ld [ %l1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40005578: 90 16 22 e4 or %i0, 0x2e4, %o0 <== NOT EXECUTED 4000557c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40005580: 40 00 06 4c call 40006eb0 <_Objects_Free> <== NOT EXECUTED 40005584: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40005588: 40 00 09 1e call 40007a00 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000558c: 01 00 00 00 nop <== NOT EXECUTED 40005590: 81 c7 e0 08 ret 40005594: 81 e8 00 00 restore #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40005598: 80 a4 20 10 cmp %l0, 0x10 4000559c: 02 80 00 06 be 400055b4 400055a0: 80 a4 20 20 cmp %l0, 0x20 400055a4: 02 80 00 05 be 400055b8 400055a8: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400055ac: 81 c7 e0 08 ret 400055b0: 91 e8 20 0b restore %g0, 0xb, %o0 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 400055b4: 80 8e a0 04 btst 4, %i2 400055b8: 02 bf ff fd be 400055ac 400055bc: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 400055c0: 12 bf ff ca bne 400054e8 400055c4: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 400055c8: 81 c7 e0 08 ret 400055cc: 91 e8 20 0b restore %g0, 0xb, %o0 _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 400055d0: 80 8e a0 04 btst 4, %i2 400055d4: 22 80 00 04 be,a 400055e4 400055d8: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 400055dc: 82 10 20 01 mov 1, %g1 400055e0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400055e4: 82 10 3f ff mov -1, %g1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 400055e8: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 400055ec: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 400055f0: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400055f4: c2 27 bf f0 st %g1, [ %fp + -16 ] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 400055f8: 90 04 60 14 add %l1, 0x14, %o0 400055fc: 40 00 04 03 call 40006608 <_CORE_semaphore_Initialize> 40005600: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40005604: c4 04 60 08 ld [ %l1 + 8 ], %g2 40005608: 82 16 22 e4 or %i0, 0x2e4, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000560c: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40005610: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40005614: c4 27 00 00 st %g2, [ %i4 ] 40005618: 03 00 00 3f sethi %hi(0xfc00), %g1 4000561c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005620: 84 08 80 01 and %g2, %g1, %g2 40005624: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40005628: b0 10 20 00 clr %i0 4000562c: 40 00 08 f5 call 40007a00 <_Thread_Enable_dispatch> 40005630: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 40005634: 81 c7 e0 08 ret 40005638: 81 e8 00 00 restore 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 ) ) 4000563c: 02 80 00 0f be 40005678 40005640: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40005644: 82 10 20 03 mov 3, %g1 40005648: 10 bf ff bd b 4000553c 4000564c: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 40005650: 40 00 08 ec call 40007a00 <_Thread_Enable_dispatch> 40005654: b0 10 20 05 mov 5, %i0 40005658: 81 c7 e0 08 ret 4000565c: 81 e8 00 00 restore if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40005660: c2 07 bf e8 ld [ %fp + -24 ], %g1 40005664: 80 a0 60 01 cmp %g1, 1 40005668: 18 80 00 09 bgu 4000568c 4000566c: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40005670: 10 bf ff b8 b 40005550 40005674: c0 2f bf e4 clrb [ %fp + -28 ] if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 40005678: 22 bf ff b1 be,a 4000553c 4000567c: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40005680: 82 10 20 01 mov 1, %g1 40005684: 10 bf ff ae b 4000553c 40005688: c2 27 bf e8 st %g1, [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 4000568c: 80 a0 60 03 cmp %g1, 3 40005690: 18 bf ff b1 bgu 40005554 40005694: 82 1e 60 01 xor %i1, 1, %g1 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; 40005698: 82 10 20 01 mov 1, %g1 4000569c: 10 bf ff ad b 40005550 400056a0: c2 2f bf e4 stb %g1, [ %fp + -28 ] 40024364 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40024364: 9d e3 bf 90 save %sp, -112, %sp 40024368: 11 10 01 7a sethi %hi(0x4005e800), %o0 4002436c: 92 10 00 18 mov %i0, %o1 40024370: 90 12 22 50 or %o0, 0x250, %o0 40024374: 7f ff 9c 75 call 4000b548 <_Objects_Get> 40024378: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4002437c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40024380: 80 a0 60 00 cmp %g1, 0 40024384: 12 80 00 0b bne 400243b0 40024388: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4002438c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40024390: 80 88 60 30 btst 0x30, %g1 40024394: 12 80 00 09 bne 400243b8 40024398: 90 02 20 14 add %o0, 0x14, %o0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 4002439c: 92 10 20 00 clr %o1 <== NOT EXECUTED 400243a0: 7f ff 99 5c call 4000a910 <_CORE_semaphore_Flush> <== NOT EXECUTED 400243a4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 400243a8: 7f ff 9e d2 call 4000bef0 <_Thread_Enable_dispatch> 400243ac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400243b0: 81 c7 e0 08 ret 400243b4: 81 e8 00 00 restore the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 400243b8: 92 10 20 00 clr %o1 400243bc: 7f ff 98 6a call 4000a564 <_CORE_mutex_Flush> 400243c0: 94 10 20 01 mov 1, %o2 400243c4: 30 bf ff f9 b,a 400243a8 400160c4 : */ void rtems_shutdown_executive( uint32_t result ) { 400160c4: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 400160c8: 05 10 00 62 sethi %hi(0x40018800), %g2 400160cc: c2 00 a1 c4 ld [ %g2 + 0x1c4 ], %g1 ! 400189c4 <_System_state_Current> 400160d0: 80 a0 60 04 cmp %g1, 4 400160d4: 02 80 00 07 be 400160f0 400160d8: 82 10 20 04 mov 4, %g1 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 ); 400160dc: 13 10 00 61 sethi %hi(0x40018400), %o1 400160e0: c2 20 a1 c4 st %g1, [ %g2 + 0x1c4 ] 400160e4: 92 12 63 98 or %o1, 0x398, %o1 400160e8: 7f ff cb e2 call 40009070 <_CPU_Context_switch> 400160ec: 90 07 bf 70 add %fp, -144, %o0 400160f0: 81 c7 e0 08 ret <== NOT EXECUTED 400160f4: 81 e8 00 00 restore <== NOT EXECUTED 40004048 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 40004048: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 4000404c: 21 10 01 7b sethi %hi(0x4005ec00), %l0 <== NOT EXECUTED 40004050: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 ! 4005ec40 <_Thread_Executing> <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40004054: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 <== NOT EXECUTED 40004058: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED 4000405c: 0a 80 00 07 bcs 40004078 <== NOT EXECUTED 40004060: b0 10 20 00 clr %i0 <== NOT EXECUTED 40004064: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 40004068: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 4000406c: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED 40004070: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 40004074: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 40004078: 03 10 01 2e sethi %hi(0x4004b800), %g1 <== NOT EXECUTED 4000407c: c4 00 61 3c ld [ %g1 + 0x13c ], %g2 ! 4004b93c <== NOT EXECUTED 40004080: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004084: 12 80 00 0d bne 400040b8 <== NOT EXECUTED 40004088: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 4000408c: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED 40004090: 02 80 00 05 be 400040a4 <== NOT EXECUTED 40004094: 92 08 60 ff and %g1, 0xff, %o1 <== NOT EXECUTED 40004098: 92 88 60 ff andcc %g1, 0xff, %o1 <== NOT EXECUTED 4000409c: 12 80 00 05 bne 400040b0 <== NOT EXECUTED 400040a0: b0 10 20 00 clr %i0 <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 400040a4: d0 04 20 40 ld [ %l0 + 0x40 ], %o0 <== NOT EXECUTED 400040a8: 7f ff ff cf call 40003fe4 <== NOT EXECUTED 400040ac: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 400040b0: 81 c7 e0 08 ret <== NOT EXECUTED 400040b4: 81 e8 00 00 restore <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 400040b8: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 400040bc: 13 10 01 7a sethi %hi(0x4005e800), %o1 <== NOT EXECUTED 400040c0: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 400040c4: 40 00 bf da call 4003402c <== NOT EXECUTED 400040c8: 92 12 61 7c or %o1, 0x17c, %o1 <== NOT EXECUTED 400040cc: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 400040d0: 10 bf ff ef b 4000408c <== NOT EXECUTED 400040d4: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40003fc8 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 40003fc8: 13 10 00 1b sethi %hi(0x40006c00), %o1 <== NOT EXECUTED 40003fcc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40003fd0: 92 12 62 b4 or %o1, 0x2b4, %o1 <== NOT EXECUTED 40003fd4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003fd8: 7f ff ff e6 call 40003f70 <== NOT EXECUTED 40003fdc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003fe0: 01 00 00 00 nop 40003f70 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003f70: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED print_context = context; 40003f74: 23 10 01 2e sethi %hi(0x4004b800), %l1 <== NOT EXECUTED print_handler = print; 40003f78: 21 10 01 2e sethi %hi(0x4004b800), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 40003f7c: f0 24 61 40 st %i0, [ %l1 + 0x140 ] <== NOT EXECUTED print_handler = print; 40003f80: f2 24 21 44 st %i1, [ %l0 + 0x144 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 40003f84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003f88: 13 10 01 11 sethi %hi(0x40044400), %o1 <== NOT EXECUTED 40003f8c: 9f c6 40 00 call %i1 <== NOT EXECUTED 40003f90: 92 12 61 30 or %o1, 0x130, %o1 ! 40044530 <__func__.4755+0x298> <== NOT EXECUTED (*print)( context, 40003f94: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003f98: 13 10 01 11 sethi %hi(0x40044400), %o1 <== NOT EXECUTED 40003f9c: 9f c6 40 00 call %i1 <== NOT EXECUTED 40003fa0: 92 12 61 48 or %o1, 0x148, %o1 ! 40044548 <__func__.4755+0x2b0> <== 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 ); 40003fa4: 11 10 00 0f sethi %hi(0x40003c00), %o0 <== NOT EXECUTED 40003fa8: 40 00 1b 8d call 4000addc <== NOT EXECUTED 40003fac: 90 12 22 18 or %o0, 0x218, %o0 ! 40003e18 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 40003fb0: 7f ff ff 9a call 40003e18 <== NOT EXECUTED 40003fb4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 40003fb8: c0 24 61 40 clr [ %l1 + 0x140 ] <== NOT EXECUTED print_handler = NULL; 40003fbc: c0 24 21 44 clr [ %l0 + 0x144 ] <== NOT EXECUTED } 40003fc0: 81 c7 e0 08 ret <== NOT EXECUTED 40003fc4: 81 e8 00 00 restore <== NOT EXECUTED 400040d8 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 400040d8: 9d e3 bf 98 save %sp, -104, %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; 400040dc: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 400040e0: 80 a7 80 02 cmp %fp, %g2 400040e4: 0a 80 00 07 bcs 40004100 400040e8: 90 00 a0 08 add %g2, 8, %o0 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 400040ec: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 400040f0: 82 00 80 01 add %g2, %g1, %g1 400040f4: 80 a7 80 01 cmp %fp, %g1 400040f8: 28 80 00 0b bleu,a 40004124 400040fc: 13 10 01 7a sethi %hi(0x4005e800), %o1 /* * 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, 40004100: 13 10 01 7a sethi %hi(0x4005e800), %o1 <== NOT EXECUTED 40004104: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40004108: 40 00 bf c9 call 4003402c <== NOT EXECUTED 4000410c: 92 12 61 7c or %o1, 0x17c, %o1 <== NOT EXECUTED 40004110: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40004114: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 40004118: b2 08 60 01 and %g1, 1, %i1 <== NOT EXECUTED 4000411c: 7f ff ff b2 call 40003fe4 <== NOT EXECUTED 40004120: 81 e8 00 00 restore <== NOT EXECUTED /* * 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, 40004124: 94 10 20 10 mov 0x10, %o2 40004128: 40 00 bf c1 call 4003402c 4000412c: 92 12 61 7c or %o1, 0x17c, %o1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 40004130: 80 a2 20 00 cmp %o0, 0 40004134: 12 bf ff f9 bne 40004118 40004138: 82 10 20 00 clr %g1 4000413c: 81 c7 e0 08 ret 40004140: 81 e8 00 00 restore 40007b84 : const char * rtems_status_text( rtems_status_code status ) { 40007b84: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 40007b88: 11 10 00 92 sethi %hi(0x40024800), %o0 <== NOT EXECUTED 40007b8c: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 40024af0 <== NOT EXECUTED 40007b90: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40007b94: 40 00 2b 4d call 400128c8 <== NOT EXECUTED 40007b98: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40007b9c: 01 00 00 00 nop 400077bc : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400077bc: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 400077c0: 03 10 00 78 sethi %hi(0x4001e000), %g1 400077c4: c4 00 60 c8 ld [ %g1 + 0xc8 ], %g2 ! 4001e0c8 <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400077c8: 90 10 00 18 mov %i0, %o0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 400077cc: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 400077d0: c4 08 60 04 ldub [ %g1 + 4 ], %g2 400077d4: 80 a0 a0 00 cmp %g2, 0 400077d8: 02 80 00 1c be 40007848 400077dc: b0 10 20 16 mov 0x16, %i0 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 400077e0: 80 a6 60 0f cmp %i1, 0xf 400077e4: 18 80 00 19 bgu 40007848 400077e8: b0 10 20 0a mov 0xa, %i0 400077ec: 03 10 00 78 sethi %hi(0x4001e000), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 400077f0: 80 a2 20 00 cmp %o0, 0 400077f4: 02 80 00 17 be 40007850 400077f8: 86 10 60 f0 or %g1, 0xf0, %g3 400077fc: 03 10 00 78 sethi %hi(0x4001e000), %g1 40007800: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001e0f0 <_Thread_Executing> 40007804: 86 10 60 f0 or %g1, 0xf0, %g3 40007808: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4000780c: 80 a2 00 01 cmp %o0, %g1 40007810: 22 80 00 11 be,a 40007854 40007814: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 40007818: 40 00 08 44 call 40009928 <_Thread_Get> 4000781c: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40007820: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007824: 80 a0 60 00 cmp %g1, 0 40007828: 12 80 00 08 bne 40007848 4000782c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007830: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 40007834: 82 06 60 08 add %i1, 8, %g1 40007838: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 4000783c: b0 10 20 00 clr %i0 40007840: 40 00 08 2c call 400098f0 <_Thread_Enable_dispatch> 40007844: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007848: 81 c7 e0 08 ret 4000784c: 81 e8 00 00 restore */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007850: c2 00 c0 00 ld [ %g3 ], %g1 40007854: 84 06 60 08 add %i1, 8, %g2 40007858: c6 00 61 5c ld [ %g1 + 0x15c ], %g3 4000785c: 85 28 a0 02 sll %g2, 2, %g2 40007860: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 40007864: 81 c7 e0 08 ret 40007868: 91 e8 20 00 restore %g0, 0, %o0 40002f4c : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40002f4c: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40002f50: 05 10 00 5f sethi %hi(0x40017c00), %g2 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40002f54: d0 20 63 bc st %o0, [ %g1 + 0x3bc ] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40002f58: d2 20 a3 c0 st %o1, [ %g2 + 0x3c0 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40002f5c: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40002f60: 90 10 20 00 clr %o0 <== NOT EXECUTED 40002f64: 81 c3 e0 08 retl <== NOT EXECUTED 40002f68: d4 20 63 c4 st %o2, [ %g1 + 0x3c4 ] <== NOT EXECUTED 40004688 : } } rtems_status_code rtems_termios_close (void *arg) { 40004688: 9d e3 bf 98 save %sp, -104, %sp 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); 4000468c: 23 10 00 61 sethi %hi(0x40018400), %l1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004690: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004694: d0 04 62 d8 ld [ %l1 + 0x2d8 ], %o0 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004698: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4000469c: 92 10 20 00 clr %o1 400046a0: 40 00 04 2e call 40005758 400046a4: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 400046a8: 80 a2 20 00 cmp %o0, 0 400046ac: 12 80 00 52 bne 400047f4 400046b0: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 400046b4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400046b8: 82 00 7f ff add %g1, -1, %g1 400046bc: 80 a0 60 00 cmp %g1, 0 400046c0: 12 80 00 3a bne 400047a8 400046c4: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400046c8: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 400046cc: 03 10 00 61 sethi %hi(0x40018400), %g1 400046d0: 85 28 a0 05 sll %g2, 5, %g2 400046d4: 82 10 60 d0 or %g1, 0xd0, %g1 400046d8: 82 00 40 02 add %g1, %g2, %g1 400046dc: c2 00 60 04 ld [ %g1 + 4 ], %g1 400046e0: 80 a0 60 00 cmp %g1, 0 400046e4: 02 80 00 46 be 400047fc 400046e8: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400046ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400046f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 400046f4: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 400046f8: 80 a0 60 02 cmp %g1, 2 400046fc: 22 80 00 33 be,a 400047c8 40004700: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 40004704: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 40004708: 80 a0 60 00 cmp %g1, 0 4000470c: 22 80 00 07 be,a 40004728 40004710: c4 04 00 00 ld [ %l0 ], %g2 (*tty->device.lastClose)(tty->major, tty->minor, arg); 40004714: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 40004718: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 4000471c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004720: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40004724: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 40004728: 80 a0 a0 00 cmp %g2, 0 4000472c: 22 80 00 38 be,a 4000480c 40004730: c4 04 20 04 ld [ %l0 + 4 ], %g2 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 40004734: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 40004738: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 4000473c: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 40004740: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004744: 22 80 00 39 be,a 40004828 <== NOT EXECUTED 40004748: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 4000474c: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40004750: 40 00 03 d5 call 400056a4 40004754: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 40004758: 40 00 03 d3 call 400056a4 4000475c: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40004760: 40 00 03 d1 call 400056a4 40004764: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 40004768: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4000476c: 80 a0 60 00 cmp %g1, 0 40004770: 02 80 00 13 be 400047bc 40004774: 01 00 00 00 nop 40004778: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 4000477c: 80 a0 60 02 cmp %g1, 2 40004780: 02 80 00 0f be 400047bc 40004784: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 40004788: 40 00 17 82 call 4000a590 4000478c: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40004790: 40 00 17 80 call 4000a590 40004794: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40004798: 40 00 17 7e call 4000a590 4000479c: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 400047a0: 40 00 17 7c call 4000a590 400047a4: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 400047a8: d0 04 62 d8 ld [ %l1 + 0x2d8 ], %o0 400047ac: 40 00 04 33 call 40005878 400047b0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 400047b4: 81 c7 e0 08 ret 400047b8: 81 e8 00 00 restore 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); 400047bc: 40 00 03 ba call 400056a4 <== NOT EXECUTED 400047c0: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 400047c4: 30 bf ff f1 b,a 40004788 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 400047c8: 40 00 02 90 call 40005208 <== NOT EXECUTED 400047cc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 400047d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400047d4: 12 80 00 08 bne 400047f4 <== NOT EXECUTED 400047d8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 400047dc: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 400047e0: 40 00 02 8a call 40005208 <== NOT EXECUTED 400047e4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 400047e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400047ec: 22 bf ff c7 be,a 40004708 <== NOT EXECUTED 400047f0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400047f4: 40 00 05 9a call 40005e5c <== NOT EXECUTED 400047f8: 01 00 00 00 nop <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 400047fc: 7f ff fd 6e call 40003db4 40004800: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40004804: 10 bf ff bd b 400046f8 40004808: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 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; 4000480c: 03 10 00 61 sethi %hi(0x40018400), %g1 if ( rtems_termios_ttyTail != NULL ) { 40004810: 80 a0 a0 00 cmp %g2, 0 40004814: 02 80 00 0a be 4000483c 40004818: c4 20 62 dc st %g2, [ %g1 + 0x2dc ] rtems_termios_ttyTail->forw = NULL; 4000481c: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED 40004820: 10 bf ff c7 b 4000473c <== NOT EXECUTED 40004824: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { 40004828: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000482c: 02 bf ff c9 be 40004750 <== NOT EXECUTED 40004830: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ] <== NOT EXECUTED rtems_termios_ttyHead->back = NULL; 40004834: 10 bf ff c7 b 40004750 <== NOT EXECUTED 40004838: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 4000483c: 03 10 00 61 sethi %hi(0x40018400), %g1 40004840: 10 bf ff c4 b 40004750 40004844: c0 20 62 e0 clr [ %g1 + 0x2e0 ] ! 400186e0 40003180 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40003180: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40003184: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003188: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4000318c: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 40003190: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003194: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40003198: 02 80 00 10 be 400031d8 <== NOT EXECUTED 4000319c: 90 10 00 18 mov %i0, %o0 <== 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 ) { 400031a0: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400031a4: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 400031a8: 12 80 00 0a bne 400031d0 <== NOT EXECUTED 400031ac: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400031b0: c2 00 61 84 ld [ %g1 + 0x184 ], %g1 ! 40018584 <== NOT EXECUTED 400031b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400031b8: 02 80 00 04 be 400031c8 <== NOT EXECUTED 400031bc: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 400031c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400031c4: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 400031c8: 81 c7 e0 08 ret <== NOT EXECUTED 400031cc: 91 e8 20 00 restore %g0, 0, %o0 <== 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); 400031d0: 7f ff ff 6d call 40002f84 <== NOT EXECUTED 400031d4: 81 e8 00 00 restore <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 400031d8: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400031dc: 40 00 08 0b call 40005208 <== NOT EXECUTED 400031e0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 400031e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400031e8: 02 bf ff f8 be 400031c8 <== NOT EXECUTED 400031ec: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400031f0: 40 00 0b 1b call 40005e5c <== NOT EXECUTED 400031f4: 01 00 00 00 nop 400031f8: 01 00 00 00 nop 400031fc : * 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) { 400031fc: 9d e3 bf 98 save %sp, -104, %sp <== 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) { 40003200: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003204: 05 10 00 61 sethi %hi(0x40018400), %g2 <== NOT EXECUTED 40003208: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 4000320c: a2 10 a0 d0 or %g2, 0xd0, %l1 <== NOT EXECUTED 40003210: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40003214: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED 40003218: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000321c: 02 80 00 22 be 400032a4 <== NOT EXECUTED 40003220: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED while (len--) { 40003224: 22 80 00 0f be,a 40003260 <== NOT EXECUTED 40003228: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 4000322c: 10 80 00 05 b 40003240 <== NOT EXECUTED 40003230: a0 10 20 00 clr %l0 <== NOT EXECUTED 40003234: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003238: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 4000323c: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40003240: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED 40003244: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003248: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000324c: a0 04 20 01 inc %l0 <== 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--) { 40003250: 80 a4 00 1a cmp %l0, %i2 <== NOT EXECUTED 40003254: 32 bf ff f8 bne,a 40003234 <== NOT EXECUTED 40003258: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4000325c: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 40003260: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003264: 12 80 00 0e bne 4000329c <== NOT EXECUTED 40003268: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000326c: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40003270: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003274: 02 80 00 0a be 4000329c <== NOT EXECUTED 40003278: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4000327c: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40003280: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003284: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003288: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000328c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40003290: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 40003294: 81 c7 e0 08 ret <== NOT EXECUTED 40003298: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED 4000329c: 81 c7 e0 08 ret <== NOT EXECUTED 400032a0: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400032a4: b4 06 bf ff add %i2, -1, %i2 <== 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, 400032a8: ac 06 20 4a add %i0, 0x4a, %l6 <== 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); 400032ac: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED 400032b0: a6 10 20 00 clr %l3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400032b4: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 400032b8: 02 80 00 1c be 40003328 <== NOT EXECUTED 400032bc: a2 10 20 00 clr %l1 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 400032c0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400032c4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400032c8: 02 80 00 0b be 400032f4 <== NOT EXECUTED 400032cc: e4 0e 40 00 ldub [ %i1 ], %l2 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 400032d0: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 400032d4: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED 400032d8: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 400032dc: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 400032e0: 02 80 00 64 be 40003470 <== NOT EXECUTED 400032e4: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 400032e8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400032ec: 02 80 00 68 be 4000348c <== NOT EXECUTED 400032f0: 01 00 00 00 nop <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 400032f4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400032f8: 02 80 00 24 be 40003388 <== NOT EXECUTED 400032fc: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 40003300: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003304: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 40003308: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 4000330c: 02 80 00 0f be 40003348 <== NOT EXECUTED 40003310: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003314: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40003318: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 4000331c: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40003320: 12 bf ff e8 bne 400032c0 <== NOT EXECUTED 40003324: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40003328: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 4000332c: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40003330: 82 00 40 13 add %g1, %l3, %g1 <== NOT EXECUTED 40003334: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40003338: 40 00 09 50 call 40005878 <== NOT EXECUTED 4000333c: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED return dropped; } 40003340: 81 c7 e0 08 ret <== NOT EXECUTED 40003344: 81 e8 00 00 restore <== 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); 40003348: 7f ff fa 76 call 40001d20 <== NOT EXECUTED 4000334c: 01 00 00 00 nop <== NOT EXECUTED 40003350: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40003354: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003358: c4 06 20 94 ld [ %i0 + 0x94 ], %g2 <== 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; 4000335c: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40003360: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003364: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003368: 12 80 00 53 bne 400034b4 <== NOT EXECUTED 4000336c: 01 00 00 00 nop <== 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); 40003370: a2 10 20 01 mov 1, %l1 ! 1 <== NOT EXECUTED 40003374: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003378: 7f ff fa 6e call 40001d30 <== NOT EXECUTED 4000337c: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40003380: 10 bf ff e7 b 4000331c <== NOT EXECUTED 40003384: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40003388: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 4000338c: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40003390: 40 00 42 3b call 40013c7c <.urem> <== NOT EXECUTED 40003394: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40003398: 7f ff fa 62 call 40001d20 <== NOT EXECUTED 4000339c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400033a0: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 400033a4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 400033a8: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 400033ac: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 400033b0: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 400033b4: 40 00 42 32 call 40013c7c <.urem> <== NOT EXECUTED 400033b8: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 400033bc: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 400033c0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400033c4: 08 80 00 13 bleu 40003410 <== NOT EXECUTED 400033c8: 01 00 00 00 nop <== NOT EXECUTED 400033cc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400033d0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400033d4: 12 80 00 0f bne 40003410 <== NOT EXECUTED 400033d8: 01 00 00 00 nop <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 400033dc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400033e0: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 400033e4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400033e8: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED 400033ec: 84 08 a4 02 and %g2, 0x402, %g2 <== NOT EXECUTED 400033f0: 80 a0 a4 00 cmp %g2, 0x400 <== NOT EXECUTED 400033f4: 02 80 00 38 be 400034d4 <== NOT EXECUTED 400033f8: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 400033fc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003400: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 40003404: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 40003408: 02 80 00 44 be 40003518 <== NOT EXECUTED 4000340c: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 40003410: 7f ff fa 48 call 40001d30 <== NOT EXECUTED 40003414: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40003418: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 4000341c: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 40003420: 22 80 00 1f be,a 4000349c <== NOT EXECUTED 40003424: a6 04 e0 01 inc %l3 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 40003428: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED 4000342c: e4 28 40 10 stb %l2, [ %g1 + %l0 ] <== 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 )) { 40003430: c4 06 20 e4 ld [ %i0 + 0xe4 ], %g2 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 40003434: e0 26 20 60 st %l0, [ %i0 + 0x60 ] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40003438: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000343c: 32 bf ff b7 bne,a 40003318 <== NOT EXECUTED 40003440: b2 06 60 01 inc %i1 <== NOT EXECUTED 40003444: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40003448: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000344c: 22 bf ff b3 be,a 40003318 <== NOT EXECUTED 40003450: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40003454: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40003458: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000345c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003460: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003464: b2 06 60 01 inc %i1 <== 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; 40003468: 10 bf ff ac b 40003318 <== NOT EXECUTED 4000346c: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== 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]) { 40003470: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40003474: 02 80 00 0c be 400034a4 <== NOT EXECUTED 40003478: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4000347c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003480: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 40003484: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40003488: 30 bf ff 9e b,a 40003300 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4000348c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003490: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 40003494: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40003498: 30 bf ff 9a b,a 40003300 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4000349c: 10 bf ff 9f b 40003318 <== NOT EXECUTED 400034a0: b2 06 60 01 inc %i1 <== 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; 400034a4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400034a8: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED 400034ac: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 400034b0: 30 bf ff 94 b,a 40003300 <== 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, 400034b4: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 400034b8: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 400034bc: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400034c0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400034c4: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 400034c8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400034cc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400034d0: 30 bf ff a8 b,a 40003370 <== 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) || 400034d4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400034d8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400034dc: 12 80 00 06 bne 400034f4 <== NOT EXECUTED 400034e0: 01 00 00 00 nop <== NOT EXECUTED 400034e4: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 400034e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400034ec: 12 bf ff c9 bne 40003410 <== NOT EXECUTED 400034f0: 01 00 00 00 nop <== 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; 400034f4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400034f8: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400034fc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 40003500: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003504: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 40003508: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000350c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003510: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40003514: 30 bf ff bf b,a 40003410 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40003518: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4000351c: c4 06 20 ac ld [ %i0 + 0xac ], %g2 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40003520: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 40003524: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40003528: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000352c: 02 bf ff b9 be 40003410 <== NOT EXECUTED 40003530: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40003534: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003538: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 4000353c: 30 bf ff b5 b,a 40003410 <== NOT EXECUTED 40002efc : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 40002efc: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40002f00: 03 10 00 61 sethi %hi(0x40018400), %g1 40002f04: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 400186d8 40002f08: 80 a0 a0 00 cmp %g2, 0 40002f0c: 02 80 00 04 be 40002f1c 40002f10: 98 10 62 d8 or %g1, 0x2d8, %o4 40002f14: 81 c7 e0 08 ret 40002f18: 81 e8 00 00 restore sc = rtems_semaphore_create ( 40002f1c: 11 15 14 9b sethi %hi(0x54526c00), %o0 40002f20: 92 10 20 01 mov 1, %o1 40002f24: 90 12 21 69 or %o0, 0x169, %o0 40002f28: 94 10 20 54 mov 0x54, %o2 40002f2c: 40 00 09 64 call 400054bc 40002f30: 96 10 20 00 clr %o3 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) 40002f34: 80 a2 20 00 cmp %o0, 0 40002f38: 02 bf ff f7 be 40002f14 40002f3c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40002f40: 40 00 0b c7 call 40005e5c <== NOT EXECUTED 40002f44: 01 00 00 00 nop 40002f48: 01 00 00 00 nop 40004274 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004274: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004278: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 4000427c: c0 26 20 0c clr [ %i0 + 0xc ] <== 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; 40004280: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40004284: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004288: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 4000428c: a4 10 00 18 mov %i0, %l2 <== 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); 40004290: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004294: 40 00 05 31 call 40005758 <== NOT EXECUTED 40004298: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 4000429c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400042a0: 32 80 00 12 bne,a 400042e8 <== NOT EXECUTED 400042a4: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 400042a8: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED 400042ac: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 400042b0: 22 80 00 27 be,a 4000434c <== NOT EXECUTED 400042b4: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 400042b8: 18 80 00 0e bgu 400042f0 <== NOT EXECUTED 400042bc: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 400042c0: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 400042c4: 22 80 00 61 be,a 40004448 <== NOT EXECUTED 400042c8: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 400042cc: 08 80 00 4c bleu 400043fc <== NOT EXECUTED 400042d0: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 400042d4: 7f ff fe b8 call 40003db4 <== NOT EXECUTED 400042d8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 400042dc: 40 00 05 67 call 40005878 <== NOT EXECUTED 400042e0: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 400042e4: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 400042e8: 81 c7 e0 08 ret <== NOT EXECUTED 400042ec: 81 e8 00 00 restore <== 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) { 400042f0: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 400042f4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400042f8: 02 80 00 48 be 40004418 <== NOT EXECUTED 400042fc: 01 00 00 00 nop <== NOT EXECUTED 40004300: 18 80 00 1b bgu 4000436c <== NOT EXECUTED 40004304: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 40004308: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 4000430c: 22 80 00 14 be,a 4000435c <== NOT EXECUTED 40004310: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40004314: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED 40004318: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 4000431c: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40004320: 82 10 60 d0 or %g1, 0xd0, %g1 <== NOT EXECUTED 40004324: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40004328: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4000432c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004330: 02 bf ff eb be 400042dc <== NOT EXECUTED 40004334: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40004338: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000433c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004340: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40004344: 10 bf ff e6 b 400042dc <== NOT EXECUTED 40004348: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 4000434c: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 40004350: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 40004354: 10 bf ff e2 b 400042dc <== NOT EXECUTED 40004358: c4 24 60 e0 st %g2, [ %l1 + 0xe0 ] <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 4000435c: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 40004360: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 40004364: 10 bf ff de b 400042dc <== NOT EXECUTED 40004368: c4 24 60 d8 st %g2, [ %l1 + 0xd8 ] <== 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) { 4000436c: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 40004370: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004374: 02 80 00 1e be 400043ec <== NOT EXECUTED 40004378: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 4000437c: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 40004380: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004384: 32 bf ff e5 bne,a 40004318 <== NOT EXECUTED 40004388: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 4000438c: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 40004390: 05 10 00 61 sethi %hi(0x40018400), %g2 <== NOT EXECUTED 40004394: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004398: a0 10 a0 d0 or %g2, 0xd0, %l0 <== NOT EXECUTED 4000439c: 82 04 00 01 add %l0, %g1, %g1 <== NOT EXECUTED 400043a0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400043a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400043a8: 22 80 00 06 be,a 400043c0 <== NOT EXECUTED 400043ac: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400043b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400043b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400043b8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 400043bc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 400043c0: c0 24 60 d0 clr [ %l1 + 0xd0 ] <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 400043c4: c6 00 40 00 ld [ %g1 ], %g3 <== 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) { 400043c8: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED 400043cc: c2 04 00 02 ld [ %l0 + %g2 ], %g1 <== NOT EXECUTED 400043d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400043d4: 02 bf ff c2 be 400042dc <== NOT EXECUTED 400043d8: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 400043dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400043e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400043e4: 10 bf ff be b 400042dc <== NOT EXECUTED 400043e8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 400043ec: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 400043f0: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 400043f4: 10 bf ff ba b 400042dc <== NOT EXECUTED 400043f8: c2 20 80 00 st %g1, [ %g2 ] <== 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) { 400043fc: 32 bf ff c7 bne,a 40004318 <== NOT EXECUTED 40004400: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 40004404: d0 04 a0 08 ld [ %l2 + 8 ], %o0 <== NOT EXECUTED 40004408: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 4000440c: 40 00 23 92 call 4000d254 <== NOT EXECUTED 40004410: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40004414: 30 bf ff b2 b,a 400042dc <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40004418: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 4000441c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40004420: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 40004424: 0c 80 00 82 bneg 4000462c <== NOT EXECUTED 40004428: 01 00 00 00 nop <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 4000442c: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 40004430: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 40004434: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 40004438: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000443c: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 40004440: 10 bf ff a7 b 400042dc <== NOT EXECUTED 40004444: c2 20 c0 00 st %g1, [ %g3 ] <== 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; 40004448: a6 04 60 30 add %l1, 0x30, %l3 <== NOT EXECUTED 4000444c: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40004450: 40 00 23 81 call 4000d254 <== NOT EXECUTED 40004454: 90 10 00 13 mov %l3, %o0 <== 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) && 40004458: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000445c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004460: 02 80 00 19 be 400044c4 <== NOT EXECUTED 40004464: 01 00 00 00 nop <== NOT EXECUTED 40004468: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 4000446c: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40004470: 12 80 00 15 bne 400044c4 <== NOT EXECUTED 40004474: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 40004478: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000447c: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 40004480: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 40004484: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 40004488: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 4000448c: 02 80 00 0e be 400044c4 <== NOT EXECUTED 40004490: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40004494: 7f ff f6 23 call 40001d20 <== NOT EXECUTED 40004498: 01 00 00 00 nop <== NOT EXECUTED 4000449c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400044a0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400044a4: c4 04 60 94 ld [ %l1 + 0x94 ], %g2 <== 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; 400044a8: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 400044ac: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400044b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400044b4: 12 80 00 6d bne 40004668 <== NOT EXECUTED 400044b8: 01 00 00 00 nop <== 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); 400044bc: 7f ff f6 1d call 40001d30 <== NOT EXECUTED 400044c0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 400044c4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400044c8: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 400044cc: 02 80 00 0c be 400044fc <== NOT EXECUTED 400044d0: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 400044d4: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 400044d8: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400044dc: 12 80 00 08 bne 400044fc <== NOT EXECUTED 400044e0: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 400044e4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400044e8: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 400044ec: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 400044f0: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 400044f4: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED 400044f8: c4 24 60 b8 st %g2, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 400044fc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004500: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004504: 12 80 00 22 bne 4000458c <== NOT EXECUTED 40004508: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== 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) { 4000450c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40004510: 06 80 00 4a bl 40004638 <== NOT EXECUTED 40004514: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40004518: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 4000451c: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 40004520: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40004524: 02 80 00 06 be 4000453c <== NOT EXECUTED 40004528: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 4000452c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004530: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 40004534: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 40004538: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED 4000453c: 22 80 00 06 be,a 40004554 <== NOT EXECUTED 40004540: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40004544: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004548: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 4000454c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== 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) { 40004550: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 40004554: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004558: 02 80 00 23 be 400045e4 <== NOT EXECUTED 4000455c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40004560: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40004564: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40004568: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4000456c: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 40004570: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004574: 02 bf ff 5a be 400042dc <== NOT EXECUTED 40004578: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 4000457c: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40004580: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004584: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40004588: 30 bf ff 55 b,a 400042dc <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 4000458c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40004590: 06 80 00 2a bl 40004638 <== NOT EXECUTED 40004594: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 40004598: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000459c: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 400045a0: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 400045a4: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 400045a8: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 400045ac: 02 80 00 09 be 400045d0 <== NOT EXECUTED 400045b0: 01 00 00 00 nop <== NOT EXECUTED 400045b4: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 400045b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400045bc: 02 80 00 05 be 400045d0 <== NOT EXECUTED 400045c0: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400045c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400045c8: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 400045cc: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400045d0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400045d4: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400045d8: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 400045dc: 10 bf ff cd b 40004510 <== NOT EXECUTED 400045e0: 80 a0 e0 00 cmp %g3, 0 <== 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); 400045e4: 40 00 01 ff call 40004de0 <== NOT EXECUTED 400045e8: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 400045ec: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 400045f0: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 400045f4: 40 00 3c bc call 400138e4 <.umul> <== NOT EXECUTED 400045f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400045fc: 40 00 3c f4 call 400139cc <.udiv> <== NOT EXECUTED 40004600: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 40004604: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40004608: 02 80 00 11 be 4000464c <== NOT EXECUTED 4000460c: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40004610: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== 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; 40004614: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40004618: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000461c: 12 bf ff d3 bne 40004568 <== NOT EXECUTED 40004620: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40004624: 10 bf ff d2 b 4000456c <== NOT EXECUTED 40004628: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 4000462c: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 40004630: 10 bf ff 7f b 4000442c <== NOT EXECUTED 40004634: 88 01 00 01 add %g4, %g1, %g4 <== 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; 40004638: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000463c: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40004640: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40004644: 10 bf ff b6 b 4000451c <== NOT EXECUTED 40004648: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 4000464c: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED 40004650: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004654: 32 bf ff c4 bne,a 40004564 <== NOT EXECUTED 40004658: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 4000465c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004660: 10 bf ff c3 b 4000456c <== NOT EXECUTED 40004664: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== 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, 40004668: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 4000466c: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 40004670: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 40004674: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40004678: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 4000467c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004680: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004684: 30 bf ff 8e b,a 400044bc <== NOT EXECUTED 40004848 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 40004848: 9d e3 bf 98 save %sp, -104, %sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 4000484c: 29 10 00 61 sethi %hi(0x40018400), %l4 40004850: d0 05 22 d8 ld [ %l4 + 0x2d8 ], %o0 ! 400186d8 40004854: 92 10 20 00 clr %o1 40004858: 40 00 03 c0 call 40005758 4000485c: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004860: a4 92 20 00 orcc %o0, 0, %l2 40004864: 32 80 00 29 bne,a 40004908 40004868: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4000486c: 27 10 00 61 sethi %hi(0x40018400), %l3 40004870: e0 04 e2 e0 ld [ %l3 + 0x2e0 ], %l0 ! 400186e0 40004874: 80 a4 20 00 cmp %l0, 0 40004878: 32 80 00 08 bne,a 40004898 4000487c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004880: 10 80 00 24 b 40004910 40004884: 90 10 20 01 mov 1, %o0 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40004888: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4000488c: 02 80 00 21 be 40004910 <== NOT EXECUTED 40004890: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 40004894: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40004898: 80 a0 40 18 cmp %g1, %i0 4000489c: 32 bf ff fb bne,a 40004888 400048a0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 400048a4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400048a8: 80 a0 40 19 cmp %g1, %i1 400048ac: 32 bf ff f7 bne,a 40004888 400048b0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 400048b4: c2 04 20 08 ld [ %l0 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400048b8: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 400048bc: 86 00 60 01 add %g1, 1, %g3 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400048c0: e0 20 a0 28 st %l0, [ %g2 + 0x28 ] if (!tty->refcount++) { 400048c4: 80 a0 60 00 cmp %g1, 0 400048c8: 12 80 00 0d bne 400048fc 400048cc: c6 24 20 08 st %g3, [ %l0 + 8 ] if (tty->device.firstOpen) 400048d0: c2 04 20 98 ld [ %l0 + 0x98 ], %g1 400048d4: 80 a0 60 00 cmp %g1, 0 400048d8: 02 80 00 05 be 400048ec 400048dc: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 400048e0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400048e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400048e8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 400048ec: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 400048f0: 80 a0 60 02 cmp %g1, 2 400048f4: 22 80 00 a0 be,a 40004b74 400048f8: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 400048fc: 40 00 03 df call 40005878 40004900: d0 05 22 d8 ld [ %l4 + 0x2d8 ], %o0 return RTEMS_SUCCESSFUL; } 40004904: b0 10 00 12 mov %l2, %i0 40004908: 81 c7 e0 08 ret 4000490c: 81 e8 00 00 restore static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004910: 40 00 16 da call 4000a478 40004914: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 40004918: a2 92 20 00 orcc %o0, 0, %l1 4000491c: 02 80 00 a8 be 40004bbc 40004920: a0 10 00 11 mov %l1, %l0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40004924: 03 10 00 5f sethi %hi(0x40017c00), %g1 40004928: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 40017fc0 4000492c: c4 24 60 64 st %g2, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40004930: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 40004934: 40 00 18 8e call 4000ab6c 40004938: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 4000493c: 80 a2 20 00 cmp %o0, 0 40004940: 02 80 00 9d be 40004bb4 40004944: d0 24 60 58 st %o0, [ %l1 + 0x58 ] return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40004948: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000494c: c4 00 63 c4 ld [ %g1 + 0x3c4 ], %g2 ! 40017fc4 40004950: c4 24 60 88 st %g2, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40004954: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 40004958: 40 00 18 85 call 4000ab6c 4000495c: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40004960: 80 a2 20 00 cmp %o0, 0 40004964: 02 80 00 9b be 40004bd0 40004968: d0 24 60 7c st %o0, [ %l1 + 0x7c ] return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 4000496c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40004970: 40 00 18 7f call 4000ab6c 40004974: d0 00 63 bc ld [ %g1 + 0x3bc ], %o0 ! 40017fbc if (tty->cbuf == NULL) { 40004978: 80 a2 20 00 cmp %o0, 0 4000497c: 02 80 00 ab be 40004c28 40004980: d0 24 60 1c st %o0, [ %l1 + 0x1c ] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40004984: c2 04 e2 e0 ld [ %l3 + 0x2e0 ], %g1 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 40004988: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 4000498c: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40004990: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40004994: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 40004998: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 4000499c: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 400049a0: 80 a0 60 00 cmp %g1, 0 400049a4: 02 80 00 03 be 400049b0 400049a8: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 400049ac: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 400049b0: 05 10 00 61 sethi %hi(0x40018400), %g2 400049b4: c2 00 a2 dc ld [ %g2 + 0x2dc ], %g1 ! 400186dc 400049b8: 80 a0 60 00 cmp %g1, 0 400049bc: 02 80 00 b8 be 40004c9c 400049c0: e2 24 e2 e0 st %l1, [ %l3 + 0x2e0 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400049c4: 27 10 00 5f sethi %hi(0x40017c00), %l3 400049c8: c2 4c e3 c8 ldsb [ %l3 + 0x3c8 ], %g1 ! 40017fc8 400049cc: 11 15 14 9a sethi %hi(0x54526800), %o0 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 400049d0: f2 24 60 10 st %i1, [ %l1 + 0x10 ] tty->major = major; 400049d4: f0 24 60 0c st %i0, [ %l1 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400049d8: 90 12 21 00 or %o0, 0x100, %o0 400049dc: 92 10 20 01 mov 1, %o1 400049e0: 90 10 40 08 or %g1, %o0, %o0 400049e4: 94 10 20 54 mov 0x54, %o2 400049e8: 96 10 20 00 clr %o3 400049ec: 40 00 02 b4 call 400054bc 400049f0: 98 04 60 14 add %l1, 0x14, %o4 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) 400049f4: 80 a2 20 00 cmp %o0, 0 400049f8: 12 80 00 6d bne 40004bac 400049fc: c2 4c e3 c8 ldsb [ %l3 + 0x3c8 ], %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40004a00: 11 15 14 9b sethi %hi(0x54526c00), %o0 40004a04: 92 10 20 01 mov 1, %o1 40004a08: 90 12 23 00 or %o0, 0x300, %o0 40004a0c: 94 10 20 54 mov 0x54, %o2 40004a10: 90 10 40 08 or %g1, %o0, %o0 40004a14: 96 10 20 00 clr %o3 40004a18: 40 00 02 a9 call 400054bc 40004a1c: 98 04 60 18 add %l1, 0x18, %o4 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) 40004a20: 80 a2 20 00 cmp %o0, 0 40004a24: 12 80 00 62 bne 40004bac 40004a28: c2 4c e3 c8 ldsb [ %l3 + 0x3c8 ], %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40004a2c: 11 15 14 9e sethi %hi(0x54527800), %o0 40004a30: 92 10 20 00 clr %o1 40004a34: 90 10 40 08 or %g1, %o0, %o0 40004a38: 94 10 20 20 mov 0x20, %o2 40004a3c: 96 10 20 00 clr %o3 40004a40: 40 00 02 9f call 400054bc 40004a44: 98 04 60 8c add %l1, 0x8c, %o4 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 40004a48: 80 a2 20 00 cmp %o0, 0 40004a4c: 12 80 00 58 bne 40004bac 40004a50: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40004a54: c0 24 60 94 clr [ %l1 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 40004a58: 90 04 60 98 add %l1, 0x98, %o0 40004a5c: 40 00 21 fe call 4000d254 40004a60: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004a64: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40004a68: 80 a0 60 02 cmp %g1, 2 40004a6c: 02 80 00 74 be 40004c3c 40004a70: c2 4c e3 c8 ldsb [ %l3 + 0x3c8 ], %g1 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 40004a74: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 40004a78: 80 a0 60 00 cmp %g1, 0 40004a7c: 02 80 00 5e be 40004bf4 40004a80: c2 4c e3 c8 ldsb [ %l3 + 0x3c8 ], %g1 40004a84: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40004a88: 80 a0 60 02 cmp %g1, 2 40004a8c: 02 80 00 5a be 40004bf4 40004a90: c2 4c e3 c8 ldsb [ %l3 + 0x3c8 ], %g1 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; 40004a94: c0 24 60 b8 clr [ %l1 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40004a98: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40004a9c: c8 0c e3 c8 ldub [ %l3 + 0x3c8 ], %g4 /* 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; 40004aa0: 83 30 60 01 srl %g1, 1, %g1 40004aa4: c2 24 60 bc st %g1, [ %l1 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40004aa8: 03 00 00 09 sethi %hi(0x2400), %g1 40004aac: 82 10 61 02 or %g1, 0x102, %g1 ! 2502 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004ab0: 05 00 00 06 sethi %hi(0x1800), %g2 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40004ab4: c2 24 60 30 st %g1, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004ab8: 84 10 a0 05 or %g2, 5, %g2 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40004abc: 03 00 00 20 sethi %hi(0x8000), %g1 40004ac0: 82 10 62 3b or %g1, 0x23b, %g1 ! 823b /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004ac4: c4 24 60 34 st %g2, [ %l1 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40004ac8: c2 24 60 3c st %g1, [ %l1 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 40004acc: 84 10 20 03 mov 3, %g2 tty->termios.c_cc[VQUIT] = '\034'; 40004ad0: 82 10 20 1c mov 0x1c, %g1 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 40004ad4: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40004ad8: c2 2c 60 42 stb %g1, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40004adc: 84 10 20 7f mov 0x7f, %g2 tty->termios.c_cc[VKILL] = '\025'; 40004ae0: 82 10 20 15 mov 0x15, %g1 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'; tty->termios.c_cc[VERASE] = '\177'; 40004ae4: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40004ae8: c2 2c 60 44 stb %g1, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40004aec: 84 10 20 04 mov 4, %g2 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40004af0: 82 10 20 11 mov 0x11, %g1 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; 40004af4: da 04 60 64 ld [ %l1 + 0x64 ], %o5 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'; 40004af8: c4 2c 60 45 stb %g2, [ %l1 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40004afc: c2 2c 60 49 stb %g1, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 40004b00: 84 10 20 13 mov 0x13, %g2 tty->termios.c_cc[VSUSP] = '\032'; 40004b04: 82 10 20 1a mov 0x1a, %g1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40004b08: 86 10 28 bd mov 0x8bd, %g3 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 40004b0c: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40004b10: c2 2c 60 4b stb %g1, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 40004b14: 84 10 20 12 mov 0x12, %g2 tty->termios.c_cc[VDISCARD] = '\017'; 40004b18: 82 10 20 0f mov 0xf, %g1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40004b1c: c6 24 60 38 st %g3, [ %l1 + 0x38 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 40004b20: c4 2c 60 4d stb %g2, [ %l1 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40004b24: c2 2c 60 4e stb %g1, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40004b28: 84 10 20 17 mov 0x17, %g2 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'; 40004b2c: c0 2c 60 4c clrb [ %l1 + 0x4c ] tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 40004b30: c4 2c 60 4f stb %g2, [ %l1 + 0x4f ] 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'; tty->termios.c_cc[VEOL2] = '\000'; 40004b34: c0 2c 60 51 clrb [ %l1 + 0x51 ] 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'; 40004b38: 86 10 20 16 mov 0x16, %g3 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; 40004b3c: 83 2b 60 01 sll %o5, 1, %g1 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'; 40004b40: c6 2c 60 50 stb %g3, [ %l1 + 0x50 ] tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 40004b44: 82 00 40 0d add %g1, %o5, %g1 40004b48: 83 30 60 02 srl %g1, 2, %g1 40004b4c: c2 24 60 c0 st %g1, [ %l1 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 40004b50: 84 01 20 01 add %g4, 1, %g2 40004b54: 89 29 20 18 sll %g4, 0x18, %g4 40004b58: 89 39 20 18 sra %g4, 0x18, %g4 40004b5c: 80 a1 20 7a cmp %g4, 0x7a 40004b60: 12 bf ff 55 bne 400048b4 40004b64: c4 2c e3 c8 stb %g2, [ %l3 + 0x3c8 ] c = 'a'; 40004b68: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 40004b6c: 10 bf ff 52 b 400048b4 <== NOT EXECUTED 40004b70: c2 2c e3 c8 stb %g1, [ %l3 + 0x3c8 ] <== NOT EXECUTED (*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, 40004b74: 13 10 00 13 sethi %hi(0x40004c00), %o1 <== NOT EXECUTED 40004b78: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40004b7c: 40 00 04 14 call 40005bcc <== NOT EXECUTED 40004b80: 92 12 61 3c or %o1, 0x13c, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004b84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004b88: 12 80 00 09 bne 40004bac <== NOT EXECUTED 40004b8c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 40004b90: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40004b94: 13 10 00 13 sethi %hi(0x40004c00), %o1 <== NOT EXECUTED 40004b98: 40 00 04 0d call 40005bcc <== NOT EXECUTED 40004b9c: 92 12 60 a4 or %o1, 0xa4, %o1 ! 40004ca4 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004ba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004ba4: 02 bf ff 56 be 400048fc <== NOT EXECUTED 40004ba8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004bac: 40 00 04 ac call 40005e5c <== NOT EXECUTED 40004bb0: 01 00 00 00 nop <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 40004bb4: 40 00 16 77 call 4000a590 <== NOT EXECUTED 40004bb8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40004bbc: d0 05 22 d8 ld [ %l4 + 0x2d8 ], %o0 <== NOT EXECUTED 40004bc0: 40 00 03 2e call 40005878 <== NOT EXECUTED 40004bc4: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 40004bc8: 81 c7 e0 08 ret <== NOT EXECUTED 40004bcc: 91 e8 00 12 restore %g0, %l2, %o0 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 40004bd0: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40004bd4: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); 40004bd8: 40 00 16 6e call 4000a590 <== NOT EXECUTED 40004bdc: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED free(tty); 40004be0: 40 00 16 6c call 4000a590 <== NOT EXECUTED 40004be4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40004be8: 40 00 03 24 call 40005878 <== NOT EXECUTED 40004bec: d0 05 22 d8 ld [ %l4 + 0x2d8 ], %o0 <== NOT EXECUTED 40004bf0: 30 bf ff 46 b,a 40004908 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 40004bf4: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 40004bf8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004bfc: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 40004c00: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40004c04: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40004c08: 96 10 20 00 clr %o3 <== NOT EXECUTED 40004c0c: 40 00 02 2c call 400054bc <== NOT EXECUTED 40004c10: 98 04 60 68 add %l1, 0x68, %o4 <== 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) 40004c14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004c18: 02 bf ff 9f be 40004a94 <== NOT EXECUTED 40004c1c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40004c20: 40 00 04 8f call 40005e5c <== NOT EXECUTED 40004c24: 01 00 00 00 nop <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 40004c28: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 40004c2c: 40 00 16 59 call 4000a590 <== NOT EXECUTED 40004c30: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40004c34: 10 bf ff e9 b 40004bd8 <== NOT EXECUTED 40004c38: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 40004c3c: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 40004c40: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40004c44: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40004c48: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40004c4c: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40004c50: 98 10 20 00 clr %o4 <== NOT EXECUTED 40004c54: 40 00 03 34 call 40005924 <== NOT EXECUTED 40004c58: 9a 04 60 c8 add %l1, 0xc8, %o5 <== 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) 40004c5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004c60: 12 bf ff d3 bne 40004bac <== NOT EXECUTED 40004c64: c2 4c e3 c8 ldsb [ %l3 + 0x3c8 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 40004c68: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 40004c6c: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40004c70: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40004c74: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40004c78: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40004c7c: 98 10 20 00 clr %o4 <== NOT EXECUTED 40004c80: 40 00 03 29 call 40005924 <== NOT EXECUTED 40004c84: 9a 04 60 c4 add %l1, 0xc4, %o5 <== 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) 40004c88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004c8c: 22 bf ff 7b be,a 40004a78 <== NOT EXECUTED 40004c90: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40004c94: 40 00 04 72 call 40005e5c <== NOT EXECUTED 40004c98: 01 00 00 00 nop <== NOT EXECUTED 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; 40004c9c: 10 bf ff 4a b 400049c4 40004ca0: e2 20 a2 dc st %l1, [ %g2 + 0x2dc ] 40003540 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40003540: 9d e3 bf 98 save %sp, -104, %sp const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 40003544: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40003548: 92 10 00 18 mov %i0, %o1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 4000354c: 80 a0 60 00 cmp %g1, 0 40003550: 02 80 00 44 be 40003660 40003554: a6 10 00 18 mov %i0, %l3 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 40003558: e4 06 a0 80 ld [ %i2 + 0x80 ], %l2 <== NOT EXECUTED while (len) { 4000355c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003560: 02 80 00 44 be 40003670 <== NOT EXECUTED 40003564: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 40003568: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 4000356c: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 40003570: 40 00 41 c3 call 40013c7c <.urem> <== NOT EXECUTED 40003574: 90 04 a0 01 add %l2, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40003578: 7f ff f9 ea call 40001d20 <== NOT EXECUTED 4000357c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40003580: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 40003584: e0 06 a0 84 ld [ %i2 + 0x84 ], %l0 <== NOT EXECUTED 40003588: 80 a4 00 12 cmp %l0, %l2 <== NOT EXECUTED 4000358c: 12 80 00 13 bne 400035d8 <== NOT EXECUTED 40003590: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40003594: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40003598: 7f ff f9 e6 call 40001d30 <== NOT EXECUTED 4000359c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 400035a0: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 400035a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400035a8: 40 00 08 6c call 40005758 <== NOT EXECUTED 400035ac: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 400035b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400035b4: 12 80 00 20 bne 40003634 <== NOT EXECUTED 400035b8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 400035bc: 7f ff f9 d9 call 40001d20 <== NOT EXECUTED 400035c0: 01 00 00 00 nop <== NOT EXECUTED 400035c4: b0 10 00 08 mov %o0, %i0 <== 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) { 400035c8: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 400035cc: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 400035d0: 22 bf ff f2 be,a 40003598 <== NOT EXECUTED 400035d4: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== 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++; 400035d8: c8 06 a0 80 ld [ %i2 + 0x80 ], %g4 <== NOT EXECUTED 400035dc: c4 0c c0 00 ldub [ %l3 ], %g2 <== NOT EXECUTED 400035e0: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 400035e4: c4 28 40 04 stb %g2, [ %g1 + %g4 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 400035e8: c6 06 a0 94 ld [ %i2 + 0x94 ], %g3 <== 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; 400035ec: e4 26 a0 80 st %l2, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 400035f0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400035f4: 12 80 00 0a bne 4000361c <== NOT EXECUTED 400035f8: 01 00 00 00 nop <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 400035fc: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40003600: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40003604: 02 80 00 0e be 4000363c <== NOT EXECUTED 40003608: 01 00 00 00 nop <== 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; 4000360c: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40003610: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 40003614: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 40003618: e8 26 a0 94 st %l4, [ %i2 + 0x94 ] <== NOT EXECUTED } rtems_interrupt_enable (level); 4000361c: 7f ff f9 c5 call 40001d30 <== NOT EXECUTED 40003620: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 40003624: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED 40003628: 02 80 00 12 be 40003670 <== NOT EXECUTED 4000362c: a6 04 e0 01 inc %l3 <== NOT EXECUTED 40003630: 30 bf ff cf b,a 4000356c <== 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); 40003634: 40 00 0a 0a call 40005e5c <== NOT EXECUTED 40003638: 01 00 00 00 nop <== 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, 4000363c: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 40003640: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40003644: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 40003648: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 4000364c: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 40003650: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003654: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 40003658: 10 bf ff f1 b 4000361c <== NOT EXECUTED 4000365c: e8 26 a0 94 st %l4, [ %i2 + 0x94 ] <== 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); 40003660: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 40003664: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 40003668: 9f c0 40 00 call %g1 4000366c: 94 10 00 19 mov %i1, %o2 40003670: 81 c7 e0 08 ret 40003674: 81 e8 00 00 restore 40003e48 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003e48: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003e4c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40003e50: e4 06 20 0c ld [ %i0 + 0xc ], %l2 <== 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; 40003e54: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 40003e58: e6 06 20 08 ld [ %i0 + 8 ], %l3 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003e5c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003e60: ac 10 00 18 mov %i0, %l6 <== 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); 40003e64: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003e68: 40 00 06 3c call 40005758 <== NOT EXECUTED 40003e6c: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40003e70: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40003e74: 12 80 00 10 bne 40003eb4 <== NOT EXECUTED 40003e78: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 40003e7c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40003e80: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40003e84: 82 10 60 d0 or %g1, 0xd0, %g1 <== NOT EXECUTED 40003e88: 84 00 a0 08 add %g2, 8, %g2 <== NOT EXECUTED 40003e8c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40003e90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003e94: 02 80 00 0a be 40003ebc <== NOT EXECUTED 40003e98: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40003e9c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003ea0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003ea4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40003ea8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 40003eac: 40 00 06 73 call 40005878 <== NOT EXECUTED 40003eb0: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 40003eb4: 81 c7 e0 08 ret <== NOT EXECUTED 40003eb8: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 40003ebc: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40003ec0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003ec4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003ec8: 22 80 00 20 be,a 40003f48 <== NOT EXECUTED 40003ecc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40003ed0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40003ed4: 22 80 00 16 be,a 40003f2c <== NOT EXECUTED 40003ed8: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED 40003edc: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED 40003ee0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003ee4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40003ee8: 26 80 00 09 bl,a 40003f0c <== NOT EXECUTED 40003eec: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40003ef0: 10 80 00 0f b 40003f2c <== NOT EXECUTED 40003ef4: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40003ef8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003efc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40003f00: 24 80 00 0b ble,a 40003f2c <== NOT EXECUTED 40003f04: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40003f08: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40003f0c: a4 84 bf ff addcc %l2, -1, %l2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40003f10: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 <== NOT EXECUTED 40003f14: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40003f18: c4 2c c0 00 stb %g2, [ %l3 ] <== NOT EXECUTED 40003f1c: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40003f20: 12 bf ff f6 bne 40003ef8 <== NOT EXECUTED 40003f24: a6 04 e0 01 inc %l3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40003f28: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 40003f2c: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40003f30: 82 20 40 12 sub %g1, %l2, %g1 <== NOT EXECUTED 40003f34: c2 25 a0 14 st %g1, [ %l6 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40003f38: 40 00 06 50 call 40005878 <== NOT EXECUTED 40003f3c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40003f40: 81 c7 e0 08 ret <== NOT EXECUTED 40003f44: 81 e8 00 00 restore <== 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 40003f48: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== 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; 40003f4c: c2 24 20 2c st %g1, [ %l0 + 0x2c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 40003f50: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED 40003f54: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 40003f58: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003f5c: 02 80 00 06 be 40003f74 <== NOT EXECUTED 40003f60: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 40003f64: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40003f68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003f6c: 22 80 00 69 be,a 40004110 <== NOT EXECUTED 40003f70: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== 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; 40003f74: e2 04 20 74 ld [ %l0 + 0x74 ], %l1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40003f78: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== 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, 40003f7c: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40003f80: aa 10 63 bc or %g1, 0x3bc, %l5 <== 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, 40003f84: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40003f88: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40003f8c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40003f90: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003f94: 02 80 00 3e be 4000408c <== NOT EXECUTED 40003f98: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40003f9c: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED 40003fa0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40003fa4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003fa8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003fac: 16 80 00 38 bge 4000408c <== NOT EXECUTED 40003fb0: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 40003fb4: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40003fb8: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40003fbc: 40 00 3f 30 call 40013c7c <.urem> <== NOT EXECUTED 40003fc0: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40003fc4: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== 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; 40003fc8: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40003fcc: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40003fd0: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 40003fd4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40003fd8: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 40003fdc: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40003fe0: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 40003fe4: 40 00 3f 26 call 40013c7c <.urem> <== NOT EXECUTED 40003fe8: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40003fec: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40003ff0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40003ff4: 3a 80 00 18 bcc,a 40004054 <== NOT EXECUTED 40003ff8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40003ffc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004000: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40004004: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 40004008: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED 4000400c: 84 08 a2 02 and %g2, 0x202, %g2 <== NOT EXECUTED 40004010: 80 a0 a2 02 cmp %g2, 0x202 <== NOT EXECUTED 40004014: 22 80 00 31 be,a 400040d8 <== NOT EXECUTED 40004018: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== 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) { 4000401c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004020: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004024: 22 80 00 0c be,a 40004054 <== NOT EXECUTED 40004028: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 4000402c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004030: c4 04 20 b0 ld [ %l0 + 0xb0 ], %g2 <== 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; 40004034: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40004038: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 4000403c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004040: 22 80 00 05 be,a 40004054 <== NOT EXECUTED 40004044: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40004048: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000404c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004050: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40004054: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004058: 02 80 00 17 be 400040b4 <== NOT EXECUTED 4000405c: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 40004060: 7f ff ff 0c call 40003c90 <== NOT EXECUTED 40004064: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004068: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000406c: 32 80 00 02 bne,a 40004074 <== NOT EXECUTED 40004070: a8 10 20 00 clr %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40004074: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40004078: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000407c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004080: 12 bf ff c7 bne 40003f9c <== NOT EXECUTED 40004084: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 40004088: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 4000408c: 02 bf ff 92 be 40003ed4 <== NOT EXECUTED 40004090: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40004094: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40004098: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 4000409c: 40 00 05 af call 40005758 <== NOT EXECUTED 400040a0: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 400040a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400040a8: 02 bf ff b8 be 40003f88 <== NOT EXECUTED 400040ac: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 400040b0: 30 bf ff 89 b,a 40003ed4 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 400040b4: 7f ff fe f7 call 40003c90 <== NOT EXECUTED 400040b8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400040bc: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 400040c0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400040c4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400040c8: 06 bf ff eb bl 40004074 <== NOT EXECUTED 400040cc: 01 00 00 00 nop <== NOT EXECUTED 400040d0: 10 bf ff e9 b 40004074 <== NOT EXECUTED 400040d4: a8 10 20 00 clr %l4 ! 0 <== 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)) 400040d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400040dc: 22 80 00 07 be,a 400040f8 <== NOT EXECUTED 400040e0: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400040e4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400040e8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400040ec: 02 bf ff cc be 4000401c <== NOT EXECUTED 400040f0: 01 00 00 00 nop <== 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, 400040f4: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400040f8: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400040fc: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40004100: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004104: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004108: 10 bf ff d3 b 40004054 <== NOT EXECUTED 4000410c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40004110: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004114: 12 80 00 37 bne 400041f0 <== NOT EXECUTED 40004118: 01 00 00 00 nop <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 4000411c: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40004120: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004124: 12 80 00 07 bne 40004140 <== NOT EXECUTED 40004128: a8 07 bf f4 add %fp, -12, %l4 <== NOT EXECUTED 4000412c: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40004130: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004134: 12 80 00 3f bne 40004230 <== NOT EXECUTED 40004138: 90 10 20 02 mov 2, %o0 <== 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); 4000413c: a8 07 bf f4 add %fp, -12, %l4 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40004140: a2 07 bf f0 add %fp, -16, %l1 <== 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); 40004144: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004148: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 4000414c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004150: 36 80 00 16 bge,a 400041a8 <== NOT EXECUTED 40004154: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 40004158: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 4000415c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004160: 02 80 00 38 be 40004240 <== NOT EXECUTED 40004164: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 40004168: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000416c: 02 80 00 06 be 40004184 <== NOT EXECUTED 40004170: 01 00 00 00 nop <== NOT EXECUTED 40004174: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004178: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000417c: 12 80 00 34 bne 4000424c <== NOT EXECUTED 40004180: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 40004184: 40 00 06 ad call 40005c38 <== NOT EXECUTED 40004188: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000418c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== 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); 40004190: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004194: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40004198: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000419c: 26 bf ff f0 bl,a 4000415c <== NOT EXECUTED 400041a0: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 400041a4: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 400041a8: 7f ff fe ba call 40003c90 <== NOT EXECUTED 400041ac: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400041b0: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 400041b4: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400041b8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400041bc: 16 bf ff 45 bge 40003ed0 <== NOT EXECUTED 400041c0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 400041c4: 22 bf ff e0 be,a 40004144 <== NOT EXECUTED 400041c8: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED 400041cc: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400041d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400041d4: 12 80 00 13 bne 40004220 <== NOT EXECUTED 400041d8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 400041dc: 10 bf ff da b 40004144 <== NOT EXECUTED 400041e0: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 400041e4: 40 00 06 95 call 40005c38 <== NOT EXECUTED 400041e8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 400041ec: c6 04 20 a0 ld [ %l0 + 0xa0 ], %g3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 400041f0: 9f c0 c0 00 call %g3 <== NOT EXECUTED 400041f4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 400041f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400041fc: 06 bf ff fa bl 400041e4 <== NOT EXECUTED 40004200: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40004204: 7f ff fe a3 call 40003c90 <== NOT EXECUTED 40004208: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000420c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004210: 12 bf ff 31 bne 40003ed4 <== NOT EXECUTED 40004214: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40004218: 10 bf ff f6 b 400041f0 <== NOT EXECUTED 4000421c: c6 04 20 a0 ld [ %l0 + 0xa0 ], %g3 <== 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); 40004220: 40 00 02 f0 call 40004de0 <== NOT EXECUTED 40004224: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40004228: 10 bf ff c7 b 40004144 <== NOT EXECUTED 4000422c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== 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); 40004230: 40 00 02 ec call 40004de0 <== NOT EXECUTED 40004234: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40004238: 10 bf ff c1 b 4000413c <== NOT EXECUTED 4000423c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40004240: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004244: 02 bf ff 23 be 40003ed0 <== NOT EXECUTED 40004248: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 4000424c: 40 00 02 e5 call 40004de0 <== NOT EXECUTED 40004250: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40004254: c6 04 20 54 ld [ %l0 + 0x54 ], %g3 <== NOT EXECUTED 40004258: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 4000425c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40004260: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40004264: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40004268: 08 bf ff c7 bleu 40004184 <== NOT EXECUTED 4000426c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40004270: 30 bf ff 19 b,a 40003ed4 <== NOT EXECUTED 40002f84 : * 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) { 40002f84: 9d e3 bf 98 save %sp, -104, %sp <== 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)) 40002f88: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40002f8c: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40002f90: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40002f94: 22 80 00 3e be,a 4000308c <== NOT EXECUTED 40002f98: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 40002f9c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40002fa0: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40002fa4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002fa8: 22 80 00 49 be,a 400030cc <== NOT EXECUTED 40002fac: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 40002fb0: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 40002fb4: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 40002fb8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40002fbc: 22 80 00 2f be,a 40003078 <== NOT EXECUTED 40002fc0: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 40002fc4: 7f ff fb 57 call 40001d20 <== NOT EXECUTED 40002fc8: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 40002fcc: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 40002fd0: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40002fd4: 7f ff fb 57 call 40001d30 <== NOT EXECUTED 40002fd8: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 40002fdc: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 40002fe0: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 40002fe4: 40 00 43 26 call 40013c7c <.urem> <== NOT EXECUTED 40002fe8: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 40002fec: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 40002ff0: d0 26 20 84 st %o0, [ %i0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 40002ff4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002ff8: 02 80 00 54 be 40003148 <== NOT EXECUTED 40002ffc: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 40003000: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003004: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40003008: 22 80 00 41 be,a 4000310c <== NOT EXECUTED 4000300c: c2 06 20 d4 ld [ %i0 + 0xd4 ], %g1 <== 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)) 40003010: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003014: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40003018: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 4000301c: 02 80 00 4e be 40003154 <== NOT EXECUTED 40003020: 01 00 00 00 nop <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40003024: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003028: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000302c: 08 80 00 41 bleu 40003130 <== NOT EXECUTED 40003030: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 40003034: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 40003038: a0 20 40 11 sub %g1, %l1, %l0 <== 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)) { 4000303c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003040: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40003044: 32 80 00 02 bne,a 4000304c <== NOT EXECUTED 40003048: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 4000304c: d2 06 20 7c ld [ %i0 + 0x7c ], %o1 <== NOT EXECUTED 40003050: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 40003054: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40003058: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000305c: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40003060: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003064: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003068: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4000306c: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40003070: 81 c7 e0 08 ret <== NOT EXECUTED 40003074: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40003078: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000307c: 02 80 00 30 be 4000313c <== NOT EXECUTED 40003080: a0 10 20 00 clr %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 40003084: 81 c7 e0 08 ret <== NOT EXECUTED 40003088: 91 e8 00 10 restore %g0, %l0, %o0 <== 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, 4000308c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003090: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 40003094: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003098: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 4000309c: 7f ff fb 21 call 40001d20 <== NOT EXECUTED 400030a0: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400030a4: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400030a8: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== 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--; 400030ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400030b0: 84 10 a0 02 or %g2, 2, %g2 <== 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--; 400030b4: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400030b8: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400030bc: 7f ff fb 1d call 40001d30 <== NOT EXECUTED 400030c0: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 400030c4: 81 c7 e0 08 ret <== NOT EXECUTED 400030c8: 91 e8 00 10 restore %g0, %l0, %o0 <== 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, 400030cc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400030d0: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED 400030d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400030d8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 400030dc: 7f ff fb 11 call 40001d20 <== NOT EXECUTED 400030e0: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400030e4: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400030e8: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400030ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400030f0: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400030f4: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400030f8: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400030fc: 7f ff fb 0d call 40001d30 <== NOT EXECUTED 40003100: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 40003104: 81 c7 e0 08 ret <== NOT EXECUTED 40003108: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 4000310c: c0 26 20 94 clr [ %i0 + 0x94 ] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 40003110: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003114: 02 bf ff d6 be 4000306c <== NOT EXECUTED 40003118: a0 10 20 00 clr %l0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 4000311c: d2 06 20 d8 ld [ %i0 + 0xd8 ], %o1 <== NOT EXECUTED 40003120: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003124: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40003128: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED 4000312c: 30 bf ff d1 b,a 40003070 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 40003130: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003134: 10 bf ff c2 b 4000303c <== NOT EXECUTED 40003138: a0 20 40 11 sub %g1, %l1, %l0 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4000313c: 40 00 09 cf call 40005878 <== NOT EXECUTED 40003140: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40003144: 30 bf ff d0 b,a 40003084 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40003148: 40 00 09 cc call 40005878 <== NOT EXECUTED 4000314c: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40003150: 30 bf ff ac b,a 40003000 <== 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); 40003154: 7f ff fa f3 call 40001d20 <== NOT EXECUTED 40003158: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4000315c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40003160: 84 10 20 01 mov 1, %g2 <== 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; 40003164: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40003168: c4 26 20 94 st %g2, [ %i0 + 0x94 ] <== 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; 4000316c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40003170: 7f ff fa f0 call 40001d30 <== NOT EXECUTED 40003174: a0 10 20 00 clr %l0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40003178: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED 4000317c: 30 bf ff bd b,a 40003070 <== NOT EXECUTED 40004d3c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40004d3c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 40004d40: a0 07 bf f0 add %fp, -16, %l0 <== NOT EXECUTED 40004d44: a2 07 bf f7 add %fp, -9, %l1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004d48: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004d4c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004d50: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004d54: 40 00 00 c3 call 40005060 <== NOT EXECUTED 40004d58: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 40004d5c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40004d60: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004d64: 32 80 00 16 bne,a 40004dbc <== NOT EXECUTED 40004d68: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40004d6c: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED 40004d70: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004d74: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40004d78: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40004d7c: 02 bf ff f3 be 40004d48 <== NOT EXECUTED 40004d80: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40004d84: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40004d88: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004d8c: 7f ff f9 1c call 400031fc <== NOT EXECUTED 40004d90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004d94: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004d98: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004d9c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004da0: 40 00 00 b0 call 40005060 <== NOT EXECUTED 40004da4: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 40004da8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40004dac: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004db0: 22 bf ff f0 be,a 40004d70 <== NOT EXECUTED 40004db4: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40004db8: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004dbc: 40 00 03 25 call 40005a50 <== NOT EXECUTED 40004dc0: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004dc4: 10 bf ff e2 b 40004d4c <== NOT EXECUTED 40004dc8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40002f6c : 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); 40002f6c: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40002f70: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40002f74: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002f78: 40 00 08 a4 call 40005208 <== NOT EXECUTED 40002f7c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40002f80: 01 00 00 00 nop 40004ca4 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40004ca4: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 40004ca8: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 40004cac: a0 07 bf f4 add %fp, -12, %l0 <== NOT EXECUTED 40004cb0: a2 10 60 d0 or %g1, 0xd0, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004cb4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004cb8: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004cbc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004cc0: 40 00 00 e8 call 40005060 <== NOT EXECUTED 40004cc4: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 40004cc8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40004ccc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004cd0: 12 80 00 16 bne 40004d28 <== NOT EXECUTED 40004cd4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40004cd8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40004cdc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004ce0: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 40004ce4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40004ce8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004cec: 02 80 00 04 be 40004cfc <== NOT EXECUTED 40004cf0: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40004cf4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004cf8: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40004cfc: 7f ff f8 a2 call 40002f84 <== NOT EXECUTED 40004d00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004d04: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004d08: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004d0c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004d10: 40 00 00 d4 call 40005060 <== NOT EXECUTED 40004d14: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 40004d18: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40004d1c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004d20: 02 bf ff ee be 40004cd8 <== NOT EXECUTED 40004d24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 40004d28: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004d2c: 40 00 03 49 call 40005a50 <== NOT EXECUTED 40004d30: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004d34: 10 bf ff e1 b 40004cb8 <== NOT EXECUTED 40004d38: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003cdc : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40003cdc: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003ce0: c2 06 00 00 ld [ %i0 ], %g1 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40003ce4: a8 10 00 18 mov %i0, %l4 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003ce8: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003cec: 92 10 20 00 clr %o1 40003cf0: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 40003cf4: 40 00 06 99 call 40005758 40003cf8: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40003cfc: b0 92 20 00 orcc %o0, 0, %i0 40003d00: 12 80 00 0f bne 40003d3c 40003d04: 03 10 00 61 sethi %hi(0x40018400), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40003d08: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 40003d0c: 85 28 a0 05 sll %g2, 5, %g2 40003d10: 82 10 60 d0 or %g1, 0xd0, %g1 40003d14: 82 00 40 02 add %g1, %g2, %g1 40003d18: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40003d1c: 80 a0 60 00 cmp %g1, 0 40003d20: 02 80 00 13 be 40003d6c 40003d24: 92 10 00 14 mov %l4, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40003d28: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003d2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003d30: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40003d34: 40 00 06 d1 call 40005878 <== NOT EXECUTED 40003d38: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED 40003d3c: 81 c7 e0 08 ret <== NOT EXECUTED 40003d40: 81 e8 00 00 restore <== NOT EXECUTED while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 40003d44: d0 05 20 08 ld [ %l4 + 8 ], %o0 <== NOT EXECUTED 40003d48: d2 05 20 0c ld [ %l4 + 0xc ], %o1 <== NOT EXECUTED 40003d4c: 7f ff fd fd call 40003540 <== NOT EXECUTED 40003d50: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40003d54: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED 40003d58: c2 25 20 14 st %g1, [ %l4 + 0x14 ] } rtems_semaphore_release (tty->osem); 40003d5c: 40 00 06 c7 call 40005878 40003d60: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 return sc; } 40003d64: 81 c7 e0 08 ret 40003d68: 81 e8 00 00 restore 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) { 40003d6c: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 40003d70: 80 88 60 01 btst 1, %g1 40003d74: 02 bf ff f4 be 40003d44 40003d78: a0 10 20 00 clr %l0 uint32_t count = args->count; 40003d7c: e6 05 20 0c ld [ %l4 + 0xc ], %l3 char *buffer = args->buffer; 40003d80: e4 05 20 08 ld [ %l4 + 8 ], %l2 while (count--) 40003d84: 80 a4 e0 00 cmp %l3, 0 40003d88: 02 bf ff f4 be 40003d58 40003d8c: 82 10 20 00 clr %g1 oproc (*buffer++, tty); 40003d90: d0 0c 80 10 ldub [ %l2 + %l0 ], %o0 40003d94: 7f ff fe 39 call 40003678 40003d98: 92 10 00 11 mov %l1, %o1 40003d9c: a0 04 20 01 inc %l0 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 40003da0: 80 a4 c0 10 cmp %l3, %l0 40003da4: 32 bf ff fc bne,a 40003d94 40003da8: d0 0c 80 10 ldub [ %l2 + %l0 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 40003dac: 10 bf ff eb b 40003d58 40003db0: c2 05 20 0c ld [ %l4 + 0xc ], %g1 4001142c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 4001142c: 9d e3 bf 90 save %sp, -112, %sp 40011430: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40011434: 80 a6 60 00 cmp %i1, 0 40011438: 02 80 00 26 be 400114d0 4001143c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40011440: 80 a6 a0 00 cmp %i2, 0 40011444: 02 80 00 23 be 400114d0 40011448: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 4001144c: 11 10 00 c9 sethi %hi(0x40032400), %o0 40011450: 92 10 00 12 mov %l2, %o1 40011454: 90 12 20 c0 or %o0, 0xc0, %o0 40011458: 40 00 0b 40 call 40014158 <_Objects_Get> 4001145c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40011460: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011464: a0 10 00 08 mov %o0, %l0 40011468: 80 a0 60 00 cmp %g1, 0 4001146c: 12 80 00 19 bne 400114d0 40011470: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40011474: a2 02 20 10 add %o0, 0x10, %l1 40011478: 40 00 13 fd call 4001646c <_Watchdog_Remove> 4001147c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40011480: 7f ff e7 4c call 4000b1b0 40011484: 01 00 00 00 nop /* * 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 ) { 40011488: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001148c: 80 a0 60 00 cmp %g1, 0 40011490: 12 80 00 12 bne 400114d8 40011494: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40011498: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 4001149c: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400114a0: f6 24 20 34 st %i3, [ %l0 + 0x34 ] /* * 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; 400114a4: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400114a8: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 400114ac: 7f ff e7 45 call 4000b1c0 400114b0: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400114b4: 92 10 00 11 mov %l1, %o1 400114b8: 11 10 00 c8 sethi %hi(0x40032000), %o0 400114bc: 90 12 22 80 or %o0, 0x280, %o0 ! 40032280 <_Watchdog_Ticks_chain> 400114c0: 40 00 13 80 call 400162c0 <_Watchdog_Insert> 400114c4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 400114c8: 40 00 0d 8b call 40014af4 <_Thread_Enable_dispatch> 400114cc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400114d0: 81 c7 e0 08 ret 400114d4: 81 e8 00 00 restore * 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 ); 400114d8: 7f ff e7 3a call 4000b1c0 <== NOT EXECUTED 400114dc: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400114e0: 40 00 0d 85 call 40014af4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400114e4: 01 00 00 00 nop <== NOT EXECUTED 400114e8: 81 c7 e0 08 ret <== NOT EXECUTED 400114ec: 81 e8 00 00 restore <== NOT EXECUTED 400118e4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 400118e4: 9d e3 bf 90 save %sp, -112, %sp 400118e8: 92 96 20 00 orcc %i0, 0, %o1 400118ec: 12 80 00 05 bne 40011900 400118f0: 03 10 00 b4 sethi %hi(0x4002d000), %g1 * 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; 400118f4: 90 10 20 13 mov 0x13, %o0 } return status; } 400118f8: 81 c7 e0 08 ret 400118fc: 91 e8 00 08 restore %g0, %o0, %o0 40011900: c4 08 61 44 ldub [ %g1 + 0x144 ], %g2 40011904: 80 a2 40 02 cmp %o1, %g2 40011908: 18 80 00 56 bgu 40011a60 4001190c: 80 a2 7f ff cmp %o1, -1 40011910: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 40011914: 05 10 00 c8 sethi %hi(0x40032000), %g2 40011918: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 400321a0 <_Thread_Dispatch_disable_level> 4001191c: 82 00 60 01 inc %g1 40011920: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40011924: 23 10 00 b7 sethi %hi(0x4002dc00), %l1 initialized = true; 40011928: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 4001192c: e0 0c 60 10 ldub [ %l1 + 0x10 ], %l0 initialized = true; _Thread_Enable_dispatch(); 40011930: 40 00 0c 71 call 40014af4 <_Thread_Enable_dispatch> 40011934: c2 2c 60 10 stb %g1, [ %l1 + 0x10 ] if ( tmpInitialized ) 40011938: 80 a4 20 00 cmp %l0, 0 4001193c: 12 bf ff ef bne 400118f8 40011940: 90 10 20 0e mov 0xe, %o0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40011944: 05 10 00 c8 sethi %hi(0x40032000), %g2 40011948: 82 10 a0 bc or %g2, 0xbc, %g1 ! 400320bc <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001194c: c2 20 60 08 st %g1, [ %g1 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40011950: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40011954: 82 00 60 04 add %g1, 4, %g1 * 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( 40011958: 92 10 00 18 mov %i0, %o1 4001195c: 94 10 00 19 mov %i1, %o2 40011960: 19 00 00 20 sethi %hi(0x8000), %o4 40011964: c2 20 a0 bc st %g1, [ %g2 + 0xbc ] 40011968: 98 16 80 0c or %i2, %o4, %o4 4001196c: 11 15 12 53 sethi %hi(0x54494c00), %o0 40011970: 96 10 21 00 mov 0x100, %o3 40011974: 90 12 21 45 or %o0, 0x145, %o0 40011978: 7f ff fc 78 call 40010b58 4001197c: 9a 07 bf f4 add %fp, -12, %o5 /* 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) { 40011980: 80 a2 20 00 cmp %o0, 0 40011984: 12 80 00 34 bne 40011a54 40011988: 03 10 00 c8 sethi %hi(0x40032000), %g1 * 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( 4001198c: d6 07 bf f4 ld [ %fp + -12 ], %o3 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 40011990: 86 10 60 5c or %g1, 0x5c, %g3 40011994: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 40011998: 03 00 00 3f sethi %hi(0xfc00), %g1 4001199c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400119a0: 82 0a c0 01 and %o3, %g1, %g1 400119a4: 80 a0 40 02 cmp %g1, %g2 400119a8: 18 80 00 05 bgu 400119bc 400119ac: 98 10 20 00 clr %o4 400119b0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 400119b4: 83 28 60 02 sll %g1, 2, %g1 400119b8: d8 00 80 01 ld [ %g2 + %g1 ], %o4 400119bc: 09 10 00 c8 sethi %hi(0x40032000), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400119c0: 1b 10 00 c8 sethi %hi(0x40032000), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400119c4: 84 11 20 9c or %g4, 0x9c, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400119c8: 82 13 60 b0 or %o5, 0xb0, %g1 400119cc: c4 20 a0 08 st %g2, [ %g2 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 400119d0: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 400119d4: c2 20 60 08 st %g1, [ %g1 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 400119d8: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400119dc: 84 00 a0 04 add %g2, 4, %g2 400119e0: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400119e4: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400119e8: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 400119ec: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 400119f0: c4 21 20 9c st %g2, [ %g4 + 0x9c ] 400119f4: c2 23 60 b0 st %g1, [ %o5 + 0xb0 ] 400119f8: 05 10 00 c9 sethi %hi(0x40032400), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400119fc: 07 10 00 52 sethi %hi(0x40014800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a00: 03 10 00 c8 sethi %hi(0x40032000), %g1 the_watchdog->routine = routine; 40011a04: 86 10 e1 5c or %g3, 0x15c, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a08: 82 10 60 c8 or %g1, 0xc8, %g1 the_watchdog->routine = routine; 40011a0c: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40011a10: d8 20 a1 04 st %o4, [ %g2 + 0x104 ] 40011a14: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40011a18: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a1c: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40011a20: d6 20 60 20 st %o3, [ %g1 + 0x20 ] /* * 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; 40011a24: 05 10 00 46 sethi %hi(0x40011800), %g2 40011a28: 03 10 00 c9 sethi %hi(0x40032400), %g1 40011a2c: 84 10 a2 70 or %g2, 0x270, %g2 /* * Start the timer server */ status = rtems_task_start( 40011a30: 90 10 00 0b mov %o3, %o0 /* * 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; 40011a34: c4 20 61 00 st %g2, [ %g1 + 0x100 ] /* * Start the timer server */ status = rtems_task_start( 40011a38: 13 10 00 46 sethi %hi(0x40011800), %o1 40011a3c: 94 10 20 00 clr %o2 40011a40: 7f ff fd 9e call 400110b8 40011a44: 92 12 63 44 or %o1, 0x344, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40011a48: 80 a2 20 00 cmp %o0, 0 40011a4c: 02 bf ff ab be 400118f8 40011a50: 01 00 00 00 nop * 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; 40011a54: c0 2c 60 10 clrb [ %l1 + 0x10 ] } return status; } 40011a58: 81 c7 e0 08 ret 40011a5c: 91 e8 00 08 restore %g0, %o0, %o0 * 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 ) 40011a60: 02 bf ff ad be 40011914 40011a64: b0 10 20 00 clr %i0 * 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; 40011a68: 10 bf ff a4 b 400118f8 40011a6c: 90 10 20 13 mov 0x13, %o0 40011664 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 40011664: 9d e3 bf 90 save %sp, -112, %sp 40011668: 11 10 00 c9 sethi %hi(0x40032400), %o0 4001166c: 92 10 00 18 mov %i0, %o1 40011670: 90 12 20 c0 or %o0, 0xc0, %o0 40011674: 40 00 0a b9 call 40014158 <_Objects_Get> 40011678: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001167c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011680: a0 10 00 08 mov %o0, %l0 40011684: 80 a0 60 00 cmp %g1, 0 40011688: 12 80 00 11 bne 400116cc 4001168c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40011690: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40011694: 80 a0 60 01 cmp %g1, 1 40011698: 22 80 00 15 be,a 400116ec 4001169c: 31 10 00 c9 sethi %hi(0x40032400), %i0 400116a0: 1a 80 00 0d bcc 400116d4 400116a4: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 400116a8: a0 02 20 10 add %o0, 0x10, %l0 400116ac: 40 00 13 70 call 4001646c <_Watchdog_Remove> 400116b0: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 400116b4: 11 10 00 c8 sethi %hi(0x40032000), %o0 400116b8: 92 10 00 10 mov %l0, %o1 400116bc: 40 00 13 01 call 400162c0 <_Watchdog_Insert> 400116c0: 90 12 22 80 or %o0, 0x280, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 400116c4: 40 00 0d 0c call 40014af4 <_Thread_Enable_dispatch> 400116c8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400116cc: 81 c7 e0 08 ret 400116d0: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400116d4: 18 bf ff fc bgu 400116c4 400116d8: 01 00 00 00 nop (*_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(); 400116dc: 40 00 0d 06 call 40014af4 <_Thread_Enable_dispatch> 400116e0: b0 10 20 0b mov 0xb, %i0 ! b 400116e4: 81 c7 e0 08 ret 400116e8: 81 e8 00 00 restore 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 ) { 400116ec: c2 06 21 00 ld [ %i0 + 0x100 ], %g1 400116f0: 80 a0 60 00 cmp %g1, 0 400116f4: 02 80 00 08 be 40011714 400116f8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 400116fc: 40 00 13 5c call 4001646c <_Watchdog_Remove> 40011700: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 40011704: c2 06 21 00 ld [ %i0 + 0x100 ], %g1 40011708: 9f c0 40 00 call %g1 4001170c: 90 10 00 10 mov %l0, %o0 40011710: 30 bf ff ed b,a 400116c4 _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(); 40011714: 40 00 0c f8 call 40014af4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40011718: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 4001171c: 81 c7 e0 08 ret <== NOT EXECUTED 40011720: 81 e8 00 00 restore <== NOT EXECUTED 40011724 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011724: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011728: 03 10 00 c9 sethi %hi(0x40032400), %g1 4001172c: c4 00 61 04 ld [ %g1 + 0x104 ], %g2 ! 40032504 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011730: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011734: 80 a0 a0 00 cmp %g2, 0 40011738: 02 80 00 28 be 400117d8 4001173c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40011740: 80 a6 a0 00 cmp %i2, 0 40011744: 02 80 00 25 be 400117d8 40011748: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001174c: 80 a6 60 00 cmp %i1, 0 40011750: 02 80 00 22 be 400117d8 40011754: b0 10 20 0a mov 0xa, %i0 40011758: 11 10 00 c9 sethi %hi(0x40032400), %o0 4001175c: 92 10 00 11 mov %l1, %o1 40011760: 90 12 20 c0 or %o0, 0xc0, %o0 40011764: 40 00 0a 7d call 40014158 <_Objects_Get> 40011768: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001176c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011770: a0 10 00 08 mov %o0, %l0 40011774: 80 a0 60 00 cmp %g1, 0 40011778: 12 80 00 18 bne 400117d8 4001177c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40011780: 40 00 13 3b call 4001646c <_Watchdog_Remove> 40011784: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 40011788: 7f ff e6 8a call 4000b1b0 4001178c: 01 00 00 00 nop /* * 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 ) { 40011790: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40011794: 80 a0 60 00 cmp %g1, 0 40011798: 12 80 00 12 bne 400117e0 4001179c: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400117a0: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400117a4: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400117a8: f6 24 20 34 st %i3, [ %l0 + 0x34 ] * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 400117ac: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400117b0: c0 24 20 18 clr [ %l0 + 0x18 ] /* * 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; 400117b4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 400117b8: 7f ff e6 82 call 4000b1c0 400117bc: b0 10 20 00 clr %i0 /* * _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 ); 400117c0: 03 10 00 c9 sethi %hi(0x40032400), %g1 400117c4: c4 00 61 00 ld [ %g1 + 0x100 ], %g2 ! 40032500 <_Timer_Server_schedule_operation> 400117c8: 9f c0 80 00 call %g2 400117cc: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 400117d0: 40 00 0c c9 call 40014af4 <_Thread_Enable_dispatch> 400117d4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400117d8: 81 c7 e0 08 ret 400117dc: 81 e8 00 00 restore * 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 ); 400117e0: 7f ff e6 78 call 4000b1c0 <== NOT EXECUTED 400117e4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400117e8: 40 00 0c c3 call 40014af4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400117ec: 01 00 00 00 nop <== NOT EXECUTED 400117f0: 81 c7 e0 08 ret <== NOT EXECUTED 400117f4: 81 e8 00 00 restore <== NOT EXECUTED 40007ba0 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 40007ba0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 40007ba4: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 40007ba8: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 40007bac: 02 80 00 10 be 40007bec <== NOT EXECUTED 40007bb0: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40007bb4: 07 10 00 a4 sethi %hi(0x40029000), %g3 <== NOT EXECUTED 40007bb8: c4 00 e0 d0 ld [ %g3 + 0xd0 ], %g2 ! 400290d0 <== NOT EXECUTED 40007bbc: 82 00 a0 01 add %g2, 1, %g1 <== NOT EXECUTED 40007bc0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40007bc4: 02 80 00 06 be 40007bdc <== NOT EXECUTED 40007bc8: c2 20 e0 d0 st %g1, [ %g3 + 0xd0 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007bcc: 05 10 00 a4 sethi %hi(0x40029000), %g2 <== NOT EXECUTED 40007bd0: c2 00 a2 c0 ld [ %g2 + 0x2c0 ], %g1 ! 400292c0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007bd4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007bd8: c2 20 a2 c0 st %g1, [ %g2 + 0x2c0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40007bdc: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 <== NOT EXECUTED 40007be0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007be4: 34 80 00 3b bg,a 40007cd0 <== NOT EXECUTED 40007be8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40007bec: 25 10 00 a0 sethi %hi(0x40028000), %l2 <== NOT EXECUTED 40007bf0: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 ! 400283a8 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40007bf4: a2 10 20 00 clr %l1 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40007bf8: 40 00 3f a0 call 40017a78 <== NOT EXECUTED 40007bfc: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 40007c00: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40007c04: 05 10 00 00 sethi %hi(0x40000000), %g2 <== NOT EXECUTED 40007c08: 80 8c c0 02 btst %l3, %g2 <== NOT EXECUTED 40007c0c: 12 80 00 42 bne 40007d14 <== NOT EXECUTED 40007c10: a0 2c c0 01 andn %l3, %g1, %l0 <== 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); 40007c14: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== NOT EXECUTED 40007c18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40007c1c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007c20: 40 00 58 ab call 4001decc <== NOT EXECUTED 40007c24: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 40007c28: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40007c2c: 12 80 00 2b bne 40007cd8 <== NOT EXECUTED 40007c30: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 40007c34: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40007c38: 02 80 00 12 be 40007c80 <== NOT EXECUTED 40007c3c: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40007c40: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40007c44: 04 80 00 08 ble 40007c64 <== NOT EXECUTED 40007c48: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== NOT EXECUTED 40007c4c: 40 00 4d 21 call 4001b0d0 <== NOT EXECUTED 40007c50: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007c54: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40007c58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007c5c: 12 80 00 3b bne 40007d48 <== NOT EXECUTED 40007c60: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40007c64: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40007c68: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007c6c: 92 12 63 90 or %o1, 0x390, %o1 <== NOT EXECUTED 40007c70: 40 00 40 ed call 40018024 <== NOT EXECUTED 40007c74: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40007c78: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40007c7c: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== NOT EXECUTED 40007c80: 13 10 00 93 sethi %hi(0x40024c00), %o1 <== NOT EXECUTED 40007c84: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007c88: 40 00 40 e7 call 40018024 <== NOT EXECUTED 40007c8c: 92 12 63 e8 or %o1, 0x3e8, %o1 <== NOT EXECUTED (void) fflush(stderr); 40007c90: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== 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"); 40007c94: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 40007c98: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007c9c: 40 00 3f 77 call 40017a78 <== NOT EXECUTED 40007ca0: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40007ca4: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40007ca8: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 40007cac: 02 80 00 09 be 40007cd0 <== NOT EXECUTED 40007cb0: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40007cb4: 02 80 00 2f be 40007d70 <== NOT EXECUTED 40007cb8: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40007cbc: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40007cc0: 40 00 00 3f call 40007dbc <== NOT EXECUTED 40007cc4: 92 12 63 a8 or %o1, 0x3a8, %o1 ! 400247a8 <== NOT EXECUTED _exit(local_errno); 40007cc8: 40 00 02 47 call 400085e4 <_exit> <== NOT EXECUTED 40007ccc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 40007cd0: 81 c7 e0 08 ret <== NOT EXECUTED 40007cd4: 81 e8 00 00 restore <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40007cd8: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 40007cdc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40007ce0: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 40007ce4: 11 10 00 92 sethi %hi(0x40024800), %o0 <== NOT EXECUTED 40007ce8: 40 00 2a f8 call 400128c8 <== NOT EXECUTED 40007cec: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 40024af0 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40007cf0: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 40007cf4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40007cf8: 92 12 63 70 or %o1, 0x370, %o1 <== NOT EXECUTED 40007cfc: 40 00 40 ca call 40018024 <== NOT EXECUTED 40007d00: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (local_errno) 40007d04: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40007d08: 02 bf ff dd be 40007c7c <== NOT EXECUTED 40007d0c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED 40007d10: 30 bf ff cd b,a 40007c44 <== 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; 40007d14: 40 00 3e 88 call 40017734 <__errno> <== NOT EXECUTED 40007d18: 01 00 00 00 nop <== 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); 40007d1c: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== 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; 40007d20: e2 02 00 00 ld [ %o0 ], %l1 <== 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); 40007d24: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007d28: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40007d2c: 40 00 58 68 call 4001decc <== NOT EXECUTED 40007d30: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 40007d34: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40007d38: 02 bf ff bf be 40007c34 <== NOT EXECUTED 40007d3c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40007d40: 10 bf ff e7 b 40007cdc <== NOT EXECUTED 40007d44: c2 04 a3 a8 ld [ %l2 + 0x3a8 ], %g1 <== NOT EXECUTED if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 40007d48: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007d4c: 40 00 4c e1 call 4001b0d0 <== NOT EXECUTED 40007d50: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 40007d54: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40007d58: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007d5c: 92 12 63 80 or %o1, 0x380, %o1 <== NOT EXECUTED 40007d60: 40 00 40 b1 call 40018024 <== NOT EXECUTED 40007d64: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40007d68: 10 bf ff c5 b 40007c7c <== NOT EXECUTED 40007d6c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 40007d70: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40007d74: 40 00 00 12 call 40007dbc <== NOT EXECUTED 40007d78: 92 12 63 c0 or %o1, 0x3c0, %o1 ! 400247c0 <== NOT EXECUTED abort(); 40007d7c: 40 00 3e 60 call 400176fc <== NOT EXECUTED 40007d80: 01 00 00 00 nop 40007d84: 01 00 00 00 nop 40021ba0 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40021ba0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40021ba4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40021ba8: 05 10 01 2c sethi %hi(0x4004b000), %g2 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40021bac: a6 10 63 ff or %g1, 0x3ff, %l3 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40021bb0: aa 10 a3 b0 or %g2, 0x3b0, %l5 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40021bb4: 03 10 01 2c sethi %hi(0x4004b000), %g1 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40021bb8: a2 10 20 00 clr %l1 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40021bbc: a8 10 63 a0 or %g1, 0x3a0, %l4 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40021bc0: a4 10 20 00 clr %l2 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40021bc4: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40021bc8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40021bcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021bd0: 06 80 00 23 bl 40021c5c <== NOT EXECUTED 40021bd4: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40021bd8: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40021bdc: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 40021be0: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') 40021be4: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40021be8: 02 80 00 24 be 40021c78 <== NOT EXECUTED 40021bec: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED break; if (sign == 0) { 40021bf0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40021bf4: 32 80 00 06 bne,a 40021c0c <== NOT EXECUTED 40021bf8: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 40021bfc: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 40021c00: 02 80 00 2f be 40021cbc <== NOT EXECUTED 40021c04: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40021c08: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 40021c0c: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 <== NOT EXECUTED 40021c10: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 40021c14: 02 80 00 28 be 40021cb4 <== NOT EXECUTED 40021c18: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 40021c1c: 40 00 80 b5 call 40041ef0 <.udiv> <== NOT EXECUTED 40021c20: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40021c24: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 40021c28: 18 80 00 23 bgu 40021cb4 <== NOT EXECUTED 40021c2c: 01 00 00 00 nop <== NOT EXECUTED 40021c30: 02 80 00 1b be 40021c9c <== NOT EXECUTED 40021c34: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 40021c38: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 40021c3c: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 40021c40: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40021c44: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40021c48: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40021c4c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40021c50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021c54: 16 bf ff e1 bge 40021bd8 <== NOT EXECUTED 40021c58: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40021c5c: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 40021c60: 40 00 51 8e call 40036298 <__srget_r> <== NOT EXECUTED 40021c64: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40021c68: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 40021c6c: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40021c70: 12 bf ff e1 bne 40021bf4 <== NOT EXECUTED 40021c74: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 40021c78: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40021c7c: 02 80 00 0e be 40021cb4 <== NOT EXECUTED 40021c80: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 40021c84: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40021c88: 7f ff 85 56 call 400031e0 <.umul> <== NOT EXECUTED 40021c8c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40021c90: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 40021c94: 81 c7 e0 08 ret <== NOT EXECUTED 40021c98: 81 e8 00 00 restore <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 40021c9c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40021ca0: 40 00 81 40 call 400421a0 <.urem> <== NOT EXECUTED 40021ca4: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40021ca8: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 40021cac: 08 bf ff e4 bleu 40021c3c <== NOT EXECUTED 40021cb0: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 40021cb4: 81 c7 e0 08 ret <== NOT EXECUTED 40021cb8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 40021cbc: a6 04 e0 01 inc %l3 <== NOT EXECUTED 40021cc0: 10 bf ff c1 b 40021bc4 <== NOT EXECUTED 40021cc4: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 40021cc8 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 40021cc8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 40021ccc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40021cd0: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 40021cd4: 03 10 01 2c sethi %hi(0x4004b000), %g1 <== NOT EXECUTED 40021cd8: 10 80 00 19 b 40021d3c <== NOT EXECUTED 40021cdc: b2 10 63 b0 or %g1, 0x3b0, %i1 ! 4004b3b0 <_impure_ptr> <== NOT EXECUTED 40021ce0: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40021ce4: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 40021ce8: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') { 40021cec: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40021cf0: 02 80 00 1e be 40021d68 <== NOT EXECUTED 40021cf4: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { 40021cf8: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40021cfc: 02 80 00 28 be 40021d9c <== NOT EXECUTED 40021d00: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) return 0; break; } if (c == EOF) 40021d04: 02 80 00 29 be 40021da8 <== NOT EXECUTED 40021d08: 01 00 00 00 nop <== NOT EXECUTED return 0; if (*nleft < 2) 40021d0c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 40021d10: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40021d14: 08 80 00 25 bleu 40021da8 <== NOT EXECUTED 40021d18: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; 40021d1c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40021d20: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 40021d24: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 40021d28: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40021d2c: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 40021d30: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40021d34: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 40021d38: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 40021d3c: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40021d40: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40021d44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021d48: 16 bf ff e6 bge 40021ce0 <== NOT EXECUTED 40021d4c: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40021d50: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 40021d54: 40 00 51 51 call 40036298 <__srget_r> <== NOT EXECUTED 40021d58: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 40021d5c: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40021d60: 12 bf ff e7 bne 40021cfc <== NOT EXECUTED 40021d64: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 40021d68: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40021d6c: 12 80 00 0f bne 40021da8 <== NOT EXECUTED 40021d70: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 40021d74: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40021d78: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 40021d7c: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 40021d80: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40021d84: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 40021d88: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40021d8c: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 40021d90: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 40021d94: 81 c7 e0 08 ret <== NOT EXECUTED 40021d98: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 40021d9c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40021da0: 32 bf ff f6 bne,a 40021d78 <== NOT EXECUTED 40021da4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 40021da8: 81 c7 e0 08 ret <== NOT EXECUTED 40021dac: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40021db0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40021db0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40021db4: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40021db8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40021dbc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40021dc0: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 40021dc4: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 40021dc8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40021dcc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40021dd0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40021dd4: 7f ff ff bd call 40021cc8 <== NOT EXECUTED 40021dd8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40021ddc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021de0: 12 80 00 04 bne 40021df0 <== NOT EXECUTED 40021de4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 40021de8: 81 c7 e0 08 ret <== NOT EXECUTED 40021dec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40021df0: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 40021df4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40021df8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40021dfc: 7f ff ff b3 call 40021cc8 <== NOT EXECUTED 40021e00: 98 10 20 00 clr %o4 <== NOT EXECUTED 40021e04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021e08: 02 bf ff f8 be 40021de8 <== NOT EXECUTED 40021e0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40021e10: 7f ff ff 64 call 40021ba0 <== NOT EXECUTED 40021e14: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40021e18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021e1c: 02 bf ff f3 be 40021de8 <== NOT EXECUTED 40021e20: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40021e24: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40021e28: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40021e2c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 40021e30: 7f ff ff a6 call 40021cc8 <== NOT EXECUTED 40021e34: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40021e38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021e3c: 02 bf ff eb be 40021de8 <== NOT EXECUTED 40021e40: da 07 bf f0 ld [ %fp + -16 ], %o5 <== NOT EXECUTED || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 40021e44: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021e48: 86 10 00 0d mov %o5, %g3 <== NOT EXECUTED if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 40021e4c: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021e50: c4 0b 40 00 ldub [ %o5 ], %g2 <== NOT EXECUTED 40021e54: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 40021e58: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED 40021e5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021e60: 02 80 00 0e be 40021e98 <== NOT EXECUTED 40021e64: 84 10 20 17 mov 0x17, %g2 <== NOT EXECUTED 40021e68: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40021e6c: c4 08 c0 00 ldub [ %g3 ], %g2 <== NOT EXECUTED if(*cp == ',') 40021e70: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED memcount++; 40021e74: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 40021e78: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021e7c: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED if(*cp == ',') memcount++; 40021e80: 88 61 3f ff subx %g4, -1, %g4 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021e84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021e88: 32 bf ff f9 bne,a 40021e6c <== NOT EXECUTED 40021e8c: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40021e90: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 40021e94: 84 00 60 13 add %g1, 0x13, %g2 <== NOT EXECUTED } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 40021e98: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 <== NOT EXECUTED 40021e9c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40021ea0: 0a bf ff d2 bcs 40021de8 <== NOT EXECUTED 40021ea4: c2 07 a0 4c ld [ %fp + 0x4c ], %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021ea8: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 40021eac: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 40021eb0: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40021eb4: da 20 40 00 st %o5, [ %g1 ] <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021eb8: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 40021ebc: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021ec0: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 40021ec4: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED 40021ec8: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 40021ecc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021ed0: 12 80 00 09 bne 40021ef4 <== NOT EXECUTED 40021ed4: 84 10 20 04 mov 4, %g2 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40021ed8: 10 80 00 13 b 40021f24 <== NOT EXECUTED 40021edc: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021ee0: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED 40021ee4: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 40021ee8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021eec: 02 80 00 0c be 40021f1c <== NOT EXECUTED 40021ef0: 86 00 e0 01 inc %g3 <== NOT EXECUTED if(*cp == ',') { 40021ef4: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 40021ef8: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED 40021efc: 32 bf ff fa bne,a 40021ee4 <== NOT EXECUTED 40021f00: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED *cp = '\0'; 40021f04: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 40021f08: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 40021f0c: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 40021f10: 88 01 20 01 inc %g4 <== NOT EXECUTED 40021f14: 10 bf ff f3 b 40021ee0 <== NOT EXECUTED 40021f18: c6 20 80 01 st %g3, [ %g2 + %g1 ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40021f1c: 85 29 20 02 sll %g4, 2, %g2 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40021f20: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED 40021f24: c0 20 40 02 clr [ %g1 + %g2 ] <== NOT EXECUTED 40021f28: 81 c7 e0 08 ret <== NOT EXECUTED 40021f2c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40021f7c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40021f7c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40021f80: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40021f84: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40021f88: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40021f8c: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 40021f90: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 40021f94: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40021f98: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40021f9c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40021fa0: 7f ff ff 4a call 40021cc8 <== NOT EXECUTED 40021fa4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40021fa8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021fac: 12 80 00 04 bne 40021fbc <== NOT EXECUTED 40021fb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 40021fb4: 81 c7 e0 08 ret <== NOT EXECUTED 40021fb8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40021fbc: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 40021fc0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40021fc4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40021fc8: 7f ff ff 40 call 40021cc8 <== NOT EXECUTED 40021fcc: 98 10 20 00 clr %o4 <== NOT EXECUTED 40021fd0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021fd4: 02 bf ff f8 be 40021fb4 <== NOT EXECUTED 40021fd8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40021fdc: 7f ff fe f1 call 40021ba0 <== NOT EXECUTED 40021fe0: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40021fe4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021fe8: 02 bf ff f3 be 40021fb4 <== NOT EXECUTED 40021fec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40021ff0: 7f ff fe ec call 40021ba0 <== NOT EXECUTED 40021ff4: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 40021ff8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021ffc: 02 bf ff ee be 40021fb4 <== NOT EXECUTED 40022000: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022004: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 40022008: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4002200c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40022010: 7f ff ff 2e call 40021cc8 <== NOT EXECUTED 40022014: 98 10 20 00 clr %o4 <== NOT EXECUTED 40022018: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002201c: 02 bf ff e6 be 40021fb4 <== NOT EXECUTED 40022020: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022024: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 40022028: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4002202c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40022030: 7f ff ff 26 call 40021cc8 <== NOT EXECUTED 40022034: 98 10 20 00 clr %o4 <== NOT EXECUTED 40022038: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002203c: 02 bf ff de be 40021fb4 <== NOT EXECUTED 40022040: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022044: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 40022048: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4002204c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40022050: 7f ff ff 1e call 40021cc8 <== NOT EXECUTED 40022054: 98 10 20 00 clr %o4 <== NOT EXECUTED 40022058: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002205c: 02 bf ff d6 be 40021fb4 <== NOT EXECUTED 40022060: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022064: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40022068: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4002206c: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 40022070: 7f ff ff 16 call 40021cc8 <== NOT EXECUTED 40022074: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40022078: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002207c: 02 bf ff ce be 40021fb4 <== NOT EXECUTED 40022080: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 40022084: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 40022088: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 4002208c: c4 36 60 0a sth %g2, [ %i1 + 0xa ] <== NOT EXECUTED 40022090: 81 c7 e0 08 ret <== NOT EXECUTED 40022094: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40021b3c : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40021b3c: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40021b40: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED 40021b44: d0 30 a0 2a sth %o0, [ %g2 + 0x2a ] <== NOT EXECUTED return 0; } 40021b48: 81 c3 e0 08 retl <== NOT EXECUTED 40021b4c: 90 10 20 00 clr %o0 <== NOT EXECUTED 400221d0 : return NULL; return &grent; } void setgrent(void) { 400221d0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 400221d4: 7f ff ff c4 call 400220e4 <== NOT EXECUTED 400221d8: 21 10 01 78 sethi %hi(0x4005e000), %l0 <== NOT EXECUTED if (group_fp != NULL) 400221dc: d0 04 21 9c ld [ %l0 + 0x19c ], %o0 ! 4005e19c <== NOT EXECUTED 400221e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400221e4: 22 80 00 05 be,a 400221f8 <== NOT EXECUTED 400221e8: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED fclose(group_fp); 400221ec: 40 00 3e 29 call 40031a90 <== NOT EXECUTED 400221f0: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 400221f4: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED 400221f8: 13 10 01 25 sethi %hi(0x40049400), %o1 <== NOT EXECUTED 400221fc: 90 12 22 70 or %o0, 0x270, %o0 <== NOT EXECUTED 40022200: 40 00 40 3e call 400322f8 <== NOT EXECUTED 40022204: 92 12 62 20 or %o1, 0x220, %o1 <== NOT EXECUTED 40022208: d0 24 21 9c st %o0, [ %l0 + 0x19c ] <== NOT EXECUTED } 4002220c: 81 c7 e0 08 ret <== NOT EXECUTED 40022210: 81 e8 00 00 restore <== NOT EXECUTED 400223d4 : return NULL; return &pwent; } void setpwent(void) { 400223d4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 400223d8: 7f ff ff 43 call 400220e4 <== NOT EXECUTED 400223dc: 21 10 01 78 sethi %hi(0x4005e000), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 400223e0: d0 04 20 b4 ld [ %l0 + 0xb4 ], %o0 ! 4005e0b4 <== NOT EXECUTED 400223e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400223e8: 22 80 00 05 be,a 400223fc <== NOT EXECUTED 400223ec: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED fclose(passwd_fp); 400223f0: 40 00 3d a8 call 40031a90 <== NOT EXECUTED 400223f4: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 400223f8: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED 400223fc: 13 10 01 25 sethi %hi(0x40049400), %o1 <== NOT EXECUTED 40022400: 90 12 21 f8 or %o0, 0x1f8, %o0 <== NOT EXECUTED 40022404: 40 00 3f bd call 400322f8 <== NOT EXECUTED 40022408: 92 12 62 20 or %o1, 0x220, %o1 <== NOT EXECUTED 4002240c: d0 24 20 b4 st %o0, [ %l0 + 0xb4 ] <== NOT EXECUTED } 40022410: 81 c7 e0 08 ret <== NOT EXECUTED 40022414: 81 e8 00 00 restore <== NOT EXECUTED 40005834 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40005834: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40005838: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED 4000583c: d0 30 a0 28 sth %o0, [ %g2 + 0x28 ] <== NOT EXECUTED return 0; } 40005840: 81 c3 e0 08 retl <== NOT EXECUTED 40005844: 90 10 20 00 clr %o0 <== NOT EXECUTED 40003c90 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40003c90: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 40003c94: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003c98: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40003c9c: 32 80 00 05 bne,a 40003cb0 <== NOT EXECUTED 40003ca0: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== 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); 40003ca4: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 40003ca8: 7f ff ff 7d call 40003a9c <== NOT EXECUTED 40003cac: 81 e8 00 00 restore <== 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); 40003cb0: 94 10 20 00 clr %o2 <== NOT EXECUTED 40003cb4: 40 00 06 a9 call 40005758 <== NOT EXECUTED 40003cb8: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40003cbc: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40003cc0: 7f ff ff 77 call 40003a9c <== NOT EXECUTED 40003cc4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003cc8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40003ccc: 40 00 06 eb call 40005878 <== NOT EXECUTED 40003cd0: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40003cd4: 81 c7 e0 08 ret <== NOT EXECUTED 40003cd8: 81 e8 00 00 restore <== NOT EXECUTED 40006fec : int _STAT_NAME( const char *path, struct stat *buf ) { 40006fec: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40006ff0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40006ff4: 02 80 00 32 be 400070bc <== NOT EXECUTED 40006ff8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 40006ffc: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40007000: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007004: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40007008: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 4000700c: 7f ff f9 5a call 40005574 <== NOT EXECUTED 40007010: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( status != 0 ) 40007014: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007018: 12 80 00 27 bne 400070b4 <== NOT EXECUTED 4000701c: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 40007020: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40007024: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007028: 02 80 00 2b be 400070d4 <== NOT EXECUTED 4000702c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40007030: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 40007034: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 40007038: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4000703c: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 40007040: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 40007044: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 40007048: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4000704c: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 40007050: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 40007054: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 40007058: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4000705c: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 40007060: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 40007064: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 40007068: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 4000706c: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 40007070: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 40007074: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED 40007078: c0 26 60 48 clr [ %i1 + 0x48 ] <== NOT EXECUTED 4000707c: c0 26 60 4c clr [ %i1 + 0x4c ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 40007080: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40007084: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007088: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4000708c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40007090: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007094: 02 80 00 08 be 400070b4 <== NOT EXECUTED 40007098: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000709c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400070a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400070a4: 02 80 00 1a be 4000710c <== NOT EXECUTED 400070a8: 01 00 00 00 nop <== NOT EXECUTED 400070ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400070b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 400070b4: 81 c7 e0 08 ret <== NOT EXECUTED 400070b8: 81 e8 00 00 restore <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 400070bc: 40 00 aa 1d call 40031930 <__errno> <== NOT EXECUTED 400070c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400070c4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400070c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400070cc: 81 c7 e0 08 ret <== NOT EXECUTED 400070d0: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 400070d4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400070d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400070dc: 02 80 00 08 be 400070fc <== NOT EXECUTED 400070e0: 01 00 00 00 nop <== NOT EXECUTED 400070e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400070e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400070ec: 02 80 00 04 be 400070fc <== NOT EXECUTED 400070f0: 01 00 00 00 nop <== NOT EXECUTED 400070f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400070f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400070fc: 40 00 aa 0d call 40031930 <__errno> <== NOT EXECUTED 40007100: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007104: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007108: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000710c: 81 c7 e0 08 ret <== NOT EXECUTED 40007110: 81 e8 00 00 restore <== NOT EXECUTED 40023528 : int symlink( const char *actualpath, const char *sympath ) { 40023528: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4002352c: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 40023530: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 40023534: 02 80 00 07 be 40023550 <== NOT EXECUTED 40023538: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED 4002353c: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 40023540: 02 80 00 04 be 40023550 <== NOT EXECUTED 40023544: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023548: 12 80 00 2b bne 400235f4 <== NOT EXECUTED 4002354c: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40023550: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40023554: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 ! 4004a4e4 <== NOT EXECUTED 40023558: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 4002355c: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 40023560: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 40023564: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 <== NOT EXECUTED 40023568: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED 4002356c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 40023570: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 40023574: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 <== NOT EXECUTED 40023578: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 4002357c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40023580: 90 06 40 04 add %i1, %g4, %o0 <== NOT EXECUTED 40023584: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40023588: b2 07 bf e4 add %fp, -28, %i1 <== NOT EXECUTED 4002358c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40023590: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40023594: 9f c0 80 00 call %g2 <== NOT EXECUTED 40023598: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( result != 0 ) 4002359c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400235a0: 12 80 00 13 bne 400235ec <== NOT EXECUTED 400235a4: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED return -1; if ( !loc.ops->symlink_h ) { 400235a8: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 <== NOT EXECUTED 400235ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400235b0: 02 80 00 1c be 40023620 <== NOT EXECUTED 400235b4: d4 07 bf f4 ld [ %fp + -12 ], %o2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 400235b8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400235bc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400235c0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 400235c4: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400235c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400235cc: 02 80 00 08 be 400235ec <== NOT EXECUTED 400235d0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400235d4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400235d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400235dc: 02 80 00 1b be 40023648 <== NOT EXECUTED 400235e0: 01 00 00 00 nop <== NOT EXECUTED 400235e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400235e8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED return result; } 400235ec: 81 c7 e0 08 ret <== NOT EXECUTED 400235f0: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 400235f4: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 <== NOT EXECUTED 400235f8: 88 10 20 00 clr %g4 <== NOT EXECUTED 400235fc: c2 00 e0 04 ld [ %g3 + 4 ], %g1 <== NOT EXECUTED 40023600: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 40023604: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40023608: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED 4002360c: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 40023610: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 40023614: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 <== NOT EXECUTED 40023618: 10 bf ff d9 b 4002357c <== NOT EXECUTED 4002361c: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 40023620: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40023624: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023628: 02 80 00 04 be 40023638 <== NOT EXECUTED 4002362c: 01 00 00 00 nop <== NOT EXECUTED 40023630: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023634: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40023638: 40 00 38 be call 40031930 <__errno> <== NOT EXECUTED 4002363c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023640: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40023644: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023648: 81 c7 e0 08 ret <== NOT EXECUTED 4002364c: 81 e8 00 00 restore <== NOT EXECUTED 40023650 : int tcdrain( int fd ) { return ioctl( fd, RTEMS_IO_TCDRAIN, 0 ); 40023650: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40023654: 94 10 20 00 clr %o2 <== NOT EXECUTED 40023658: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002365c: 7f ff fb df call 400225d8 <== NOT EXECUTED 40023660: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40023664: 01 00 00 00 nop 400134b0 : int tcgetattr( int fd, struct termios *tp ) { 400134b0: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 400134b4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400134b8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400134bc: 40 00 0e 67 call 40016e58 <== NOT EXECUTED 400134c0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400134c4: 01 00 00 00 nop 400134c8 : int tcsetattr( int fd, int opt, struct termios *tp ) { 400134c8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 400134cc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400134d0: 02 80 00 10 be 40013510 <== NOT EXECUTED 400134d4: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 400134d8: 02 80 00 08 be 400134f8 <== NOT EXECUTED 400134dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 400134e0: 40 00 10 95 call 40017734 <__errno> <== NOT EXECUTED 400134e4: 01 00 00 00 nop <== NOT EXECUTED 400134e8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400134ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 400134f0: 81 c7 e0 08 ret <== NOT EXECUTED 400134f4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 400134f8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 400134fc: 40 00 0e 57 call 40016e58 <== NOT EXECUTED 40013500: 94 10 20 00 clr %o2 <== NOT EXECUTED 40013504: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40013508: 06 bf ff fa bl 400134f0 <== NOT EXECUTED 4001350c: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40013510: 40 00 0e 52 call 40016e58 <== NOT EXECUTED 40013514: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED 40013518: 01 00 00 00 nop 400237d8 : */ char *ttyname( int fd ) { 400237d8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 400237dc: 21 10 01 29 sethi %hi(0x4004a400), %l0 <== NOT EXECUTED 400237e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400237e4: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 400237e8: 92 14 20 e8 or %l0, 0xe8, %o1 <== NOT EXECUTED 400237ec: 7f ff ff ba call 400236d4 <== NOT EXECUTED 400237f0: b0 14 20 e8 or %l0, 0xe8, %i0 <== NOT EXECUTED 400237f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400237f8: 12 80 00 04 bne 40023808 <== NOT EXECUTED 400237fc: 01 00 00 00 nop <== NOT EXECUTED return ttyname_buf; return NULL; } 40023800: 81 c7 e0 08 ret <== NOT EXECUTED 40023804: 81 e8 00 00 restore <== NOT EXECUTED 40023808: 81 c7 e0 08 ret <== NOT EXECUTED 4002380c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400236d4 : int ttyname_r( int fd, char *name, size_t namesize ) { 400236d4: 9d e3 be d0 save %sp, -304, %sp <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 400236d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400236dc: 7f ff ff e3 call 40023668 <== NOT EXECUTED 400236e0: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 400236e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400236e8: 06 80 00 0d bl 4002371c <== NOT EXECUTED 400236ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 400236f0: 7f ff f7 3a call 400213d8 <== NOT EXECUTED 400236f4: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 400236f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400236fc: 12 80 00 08 bne 4002371c <== NOT EXECUTED 40023700: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 40023704: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 40023708: 07 00 00 08 sethi %hi(0x2000), %g3 <== NOT EXECUTED 4002370c: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40023710: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40023714: 02 80 00 08 be 40023734 <== NOT EXECUTED 40023718: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) rtems_set_errno_and_return_minus_one(EBADF); 4002371c: 40 00 38 85 call 40031930 <__errno> <== NOT EXECUTED 40023720: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023724: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40023728: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002372c: 81 c7 e0 08 ret <== NOT EXECUTED 40023730: 81 e8 00 00 restore <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40023734: a0 06 60 05 add %i1, 5, %l0 <== NOT EXECUTED /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 40023738: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 4002373c: 7f ff fd 98 call 40022d9c <== NOT EXECUTED 40023740: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 40023744: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40023748: 02 bf ff f5 be 4002371c <== NOT EXECUTED 4002374c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 40023750: 7f ff fe 55 call 400230a4 <== NOT EXECUTED 40023754: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023758: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002375c: 02 80 00 1a be 400237c4 <== NOT EXECUTED 40023760: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED { if (dirp->d_ino != sb.st_ino) 40023764: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED 40023768: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4002376c: 12 bf ff f9 bne 40023750 <== NOT EXECUTED 40023770: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40023774: 40 00 4d 23 call 40036c00 <== NOT EXECUTED 40023778: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 4002377c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40023780: 7f ff 8e 1b call 40006fec <== NOT EXECUTED 40023784: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40023788: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002378c: 12 bf ff f1 bne 40023750 <== NOT EXECUTED 40023790: c4 07 bf 30 ld [ %fp + -208 ], %g2 <== NOT EXECUTED 40023794: c2 07 bf 80 ld [ %fp + -128 ], %g1 <== NOT EXECUTED 40023798: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4002379c: 12 bf ff ed bne 40023750 <== NOT EXECUTED 400237a0: c4 07 bf 34 ld [ %fp + -204 ], %g2 <== NOT EXECUTED 400237a4: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 400237a8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400237ac: 12 bf ff e9 bne 40023750 <== NOT EXECUTED 400237b0: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED 400237b4: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 400237b8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400237bc: 12 bf ff e5 bne 40023750 <== NOT EXECUTED 400237c0: 01 00 00 00 nop <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 400237c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400237c8: 40 00 2e 49 call 4002f0ec <== NOT EXECUTED 400237cc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 400237d0: 81 c7 e0 08 ret <== NOT EXECUTED 400237d4: 81 e8 00 00 restore <== NOT EXECUTED 40023810 : mode_t cmask ) { mode_t old_mask; old_mask = rtems_filesystem_umask; 40023810: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40023814: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED 40023818: c6 10 a0 24 lduh [ %g2 + 0x24 ], %g3 <== NOT EXECUTED rtems_filesystem_umask = cmask; 4002381c: d0 30 a0 24 sth %o0, [ %g2 + 0x24 ] <== NOT EXECUTED return old_mask; } 40023820: 81 c3 e0 08 retl <== NOT EXECUTED 40023824: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 40023828 : #include int unlink( const char *path ) { 40023828: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 4002382c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40023830: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023834: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40023838: 96 10 20 00 clr %o3 <== NOT EXECUTED 4002383c: 7f ff 87 4e call 40005574 <== NOT EXECUTED 40023840: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( result != 0 ) 40023844: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023848: 02 80 00 04 be 40023858 <== NOT EXECUTED 4002384c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED result = (*loc.ops->unlink_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 40023850: 81 c7 e0 08 ret <== NOT EXECUTED 40023854: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40023858: 7f ff 87 17 call 400054b4 <== NOT EXECUTED 4002385c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (result != 0 && errno != ENOTSUP) { 40023860: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023864: 12 80 00 1d bne 400238d8 <== NOT EXECUTED 40023868: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return -1; } if ( !loc.ops->node_type_h ) { 4002386c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40023870: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023874: 22 80 00 2b be,a 40023920 <== NOT EXECUTED 40023878: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 4002387c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023880: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40023884: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 40023888: 02 80 00 31 be 4002394c <== NOT EXECUTED 4002388c: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 40023890: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 40023894: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023898: 22 80 00 22 be,a 40023920 <== NOT EXECUTED 4002389c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); 400238a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400238a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 400238a8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400238ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400238b0: 02 80 00 08 be 400238d0 <== NOT EXECUTED 400238b4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400238b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400238bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400238c0: 02 80 00 31 be 40023984 <== NOT EXECUTED 400238c4: 01 00 00 00 nop <== NOT EXECUTED 400238c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400238cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400238d0: 81 c7 e0 08 ret <== NOT EXECUTED 400238d4: 81 e8 00 00 restore <== NOT EXECUTED result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0 && errno != ENOTSUP) { 400238d8: 40 00 38 16 call 40031930 <__errno> <== NOT EXECUTED 400238dc: 01 00 00 00 nop <== NOT EXECUTED 400238e0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400238e4: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 400238e8: 02 bf ff e1 be 4002386c <== NOT EXECUTED 400238ec: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 400238f0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400238f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400238f8: 02 bf ff f6 be 400238d0 <== NOT EXECUTED 400238fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023900: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023904: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023908: 02 bf ff f2 be 400238d0 <== NOT EXECUTED 4002390c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40023910: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023914: 01 00 00 00 nop <== NOT EXECUTED 40023918: 81 c7 e0 08 ret <== NOT EXECUTED 4002391c: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 40023920: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023924: 02 80 00 04 be 40023934 <== NOT EXECUTED 40023928: 01 00 00 00 nop <== NOT EXECUTED 4002392c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023930: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40023934: 40 00 37 ff call 40031930 <__errno> <== NOT EXECUTED 40023938: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002393c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40023940: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023944: 81 c7 e0 08 ret <== NOT EXECUTED 40023948: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 4002394c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40023950: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023954: 02 80 00 08 be 40023974 <== NOT EXECUTED 40023958: 01 00 00 00 nop <== NOT EXECUTED 4002395c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023960: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023964: 02 80 00 04 be 40023974 <== NOT EXECUTED 40023968: 01 00 00 00 nop <== NOT EXECUTED 4002396c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023970: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 40023974: 40 00 37 ef call 40031930 <__errno> <== NOT EXECUTED 40023978: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002397c: 82 10 20 15 mov 0x15, %g1 <== NOT EXECUTED 40023980: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023984: 81 c7 e0 08 ret <== NOT EXECUTED 40023988: 81 e8 00 00 restore <== NOT EXECUTED 40023a1c : */ int unmount( const char *path ) { 40023a1c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, 0x0, &loc, true ) ) 40023a20: 92 10 20 00 clr %o1 <== NOT EXECUTED 40023a24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023a28: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40023a2c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 40023a30: 7f ff 86 d1 call 40005574 <== NOT EXECUTED 40023a34: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40023a38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023a3c: 12 80 00 3e bne 40023b34 <== NOT EXECUTED 40023a40: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 40023a44: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ 40023a48: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED 40023a4c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40023a50: 12 80 00 41 bne 40023b54 <== NOT EXECUTED 40023a54: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 40023a58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023a5c: 22 80 00 09 be,a 40023a80 <== NOT EXECUTED 40023a60: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40023a64: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023a68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023a6c: 22 80 00 05 be,a 40023a80 <== NOT EXECUTED 40023a70: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40023a74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023a78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 40023a7c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40023a80: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 <== NOT EXECUTED 40023a84: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40023a88: 02 80 00 61 be 40023c0c <== NOT EXECUTED 40023a8c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 40023a90: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 40023a94: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 <== NOT EXECUTED 40023a98: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40023a9c: 02 80 00 5c be 40023c0c <== NOT EXECUTED 40023aa0: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 40023aa4: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4004a4e4 <== NOT EXECUTED 40023aa8: c6 00 a0 10 ld [ %g2 + 0x10 ], %g3 <== NOT EXECUTED 40023aac: 80 a0 c0 18 cmp %g3, %i0 <== NOT EXECUTED 40023ab0: 02 80 00 23 be 40023b3c <== NOT EXECUTED 40023ab4: 03 10 01 7a sethi %hi(0x4005e800), %g1 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 40023ab8: c4 00 62 38 ld [ %g1 + 0x238 ], %g2 ! 4005ea38 <== NOT EXECUTED 40023abc: 82 10 62 38 or %g1, 0x238, %g1 <== NOT EXECUTED 40023ac0: 88 00 60 04 add %g1, 4, %g4 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40023ac4: 80 a1 00 02 cmp %g4, %g2 <== NOT EXECUTED 40023ac8: 02 80 00 0f be 40023b04 <== NOT EXECUTED 40023acc: 01 00 00 00 nop <== NOT EXECUTED the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 40023ad0: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 <== NOT EXECUTED 40023ad4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED 40023ad8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40023adc: 32 80 00 07 bne,a 40023af8 <== NOT EXECUTED 40023ae0: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED 40023ae4: 30 80 00 16 b,a 40023b3c <== NOT EXECUTED 40023ae8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40023aec: 02 80 00 14 be 40023b3c <== NOT EXECUTED 40023af0: 01 00 00 00 nop <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 40023af4: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40023af8: 80 a1 00 02 cmp %g4, %g2 <== NOT EXECUTED 40023afc: 32 bf ff fb bne,a 40023ae8 <== NOT EXECUTED 40023b00: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 40023b04: 7f ff 87 bc call 400059f4 <== NOT EXECUTED 40023b08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023b0c: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 40023b10: 02 80 00 0b be 40023b3c <== NOT EXECUTED 40023b14: 01 00 00 00 nop <== NOT EXECUTED * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 40023b18: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40023b1c: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 <== NOT EXECUTED 40023b20: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023b24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023b28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023b2c: 22 80 00 19 be,a 40023b90 <== NOT EXECUTED 40023b30: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 40023b34: 81 c7 e0 08 ret <== NOT EXECUTED 40023b38: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 40023b3c: 40 00 37 7d call 40031930 <__errno> <== NOT EXECUTED 40023b40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023b44: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED 40023b48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023b4c: 81 c7 e0 08 ret <== NOT EXECUTED 40023b50: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 40023b54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023b58: 02 80 00 08 be 40023b78 <== NOT EXECUTED 40023b5c: 01 00 00 00 nop <== NOT EXECUTED 40023b60: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023b64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023b68: 02 80 00 04 be 40023b78 <== NOT EXECUTED 40023b6c: 01 00 00 00 nop <== NOT EXECUTED 40023b70: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023b74: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); 40023b78: 40 00 37 6e call 40031930 <__errno> <== NOT EXECUTED 40023b7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023b80: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40023b84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023b88: 81 c7 e0 08 ret <== NOT EXECUTED 40023b8c: 81 e8 00 00 restore <== NOT EXECUTED * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 40023b90: c2 00 a0 2c ld [ %g2 + 0x2c ], %g1 <== NOT EXECUTED 40023b94: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023b98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023b9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023ba0: 32 80 00 13 bne,a 40023bec <== NOT EXECUTED 40023ba4: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 40023ba8: 40 00 03 f6 call 40024b80 <_Chain_Extract> <== NOT EXECUTED 40023bac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 40023bb0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40023bb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023bb8: 02 80 00 09 be 40023bdc <== NOT EXECUTED 40023bbc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023bc0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023bc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023bc8: 02 80 00 05 be 40023bdc <== NOT EXECUTED 40023bcc: 01 00 00 00 nop <== NOT EXECUTED 40023bd0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023bd4: 90 06 20 08 add %i0, 8, %o0 <== NOT EXECUTED free( mt_entry ); 40023bd8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023bdc: 7f ff 86 c4 call 400056ec <== NOT EXECUTED 40023be0: b0 10 20 00 clr %i0 <== NOT EXECUTED 40023be4: 81 c7 e0 08 ret <== NOT EXECUTED 40023be8: 81 e8 00 00 restore <== NOT EXECUTED * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 40023bec: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED 40023bf0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023bf4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023bf8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023bfc: 02 bf ff ce be 40023b34 <== NOT EXECUTED 40023c00: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 40023c04: 7f ff 99 49 call 4000a128 <== NOT EXECUTED 40023c08: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40023c0c: 40 00 37 49 call 40031930 <__errno> <== NOT EXECUTED 40023c10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023c14: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40023c18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023c1c: 81 c7 e0 08 ret <== NOT EXECUTED 40023c20: 81 e8 00 00 restore <== NOT EXECUTED 40023c24 : int utime( const char *path, const struct utimbuf *times ) { 40023c24: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) 40023c28: 92 10 20 00 clr %o1 <== NOT EXECUTED 40023c2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023c30: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40023c34: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED 40023c38: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40023c3c: 7f ff 86 4e call 40005574 <== NOT EXECUTED 40023c40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023c44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023c48: 12 80 00 14 bne 40023c98 <== NOT EXECUTED 40023c4c: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED return -1; if ( !temp_loc.ops->utime_h ){ 40023c50: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 40023c54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023c58: 22 80 00 12 be,a 40023ca0 <== NOT EXECUTED 40023c5c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40023c60: d4 06 60 04 ld [ %i1 + 4 ], %o2 <== NOT EXECUTED 40023c64: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 40023c68: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023c6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &temp_loc ); 40023c70: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40023c74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023c78: 02 80 00 08 be 40023c98 <== NOT EXECUTED 40023c7c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40023c80: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023c84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023c88: 02 80 00 0f be 40023cc4 <== NOT EXECUTED 40023c8c: 01 00 00 00 nop <== NOT EXECUTED 40023c90: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023c94: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 40023c98: 81 c7 e0 08 ret <== NOT EXECUTED 40023c9c: 81 e8 00 00 restore <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 40023ca0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023ca4: 02 80 00 04 be 40023cb4 <== NOT EXECUTED 40023ca8: 01 00 00 00 nop <== NOT EXECUTED 40023cac: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023cb0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40023cb4: 40 00 37 1f call 40031930 <__errno> <== NOT EXECUTED 40023cb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023cbc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40023cc0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023cc4: 81 c7 e0 08 ret <== NOT EXECUTED 40023cc8: 81 e8 00 00 restore <== NOT EXECUTED 40002b1c : */ void vprintk( const char *fmt, va_list ap ) { 40002b1c: 9d e3 bf 80 save %sp, -128, %sp char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002b20: d0 0e 00 00 ldub [ %i0 ], %o0 40002b24: 91 2a 20 18 sll %o0, 0x18, %o0 40002b28: 80 a2 20 00 cmp %o0, 0 40002b2c: 02 80 00 44 be 40002c3c 40002b30: 03 10 00 5e sethi %hi(0x40017800), %g1 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40002b34: 05 10 00 0a sethi %hi(0x40002800), %g2 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40002b38: a8 10 63 ac or %g1, 0x3ac, %l4 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40002b3c: b4 10 a2 48 or %g2, 0x248, %i2 40002b40: 03 10 00 5b sethi %hi(0x40016c00), %g1 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40002b44: b6 07 bf f8 add %fp, -8, %i3 40002b48: b8 10 61 d8 or %g1, 0x1d8, %i4 40002b4c: ae 07 bf e0 add %fp, -32, %l7 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 40002b50: 91 3a 20 18 sra %o0, 0x18, %o0 40002b54: 80 a2 20 25 cmp %o0, 0x25 40002b58: 32 80 00 3b bne,a 40002c44 40002b5c: c2 05 00 00 ld [ %l4 ], %g1 fmt++; if (*fmt == '0' ) { 40002b60: d0 0e 20 01 ldub [ %i0 + 1 ], %o0 sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; 40002b64: 88 06 20 01 add %i0, 1, %g4 if (*fmt == '0' ) { 40002b68: 87 2a 20 18 sll %o0, 0x18, %g3 40002b6c: 83 38 e0 18 sra %g3, 0x18, %g1 40002b70: 80 a0 60 30 cmp %g1, 0x30 40002b74: 02 80 00 b7 be 40002e50 40002b78: ba 10 20 20 mov 0x20, %i5 lead = '0'; fmt++; } if (*fmt == '-' ) { 40002b7c: 83 38 e0 18 sra %g3, 0x18, %g1 40002b80: 80 a0 60 2d cmp %g1, 0x2d 40002b84: 02 80 00 ae be 40002e3c 40002b88: ac 10 20 00 clr %l6 minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40002b8c: 82 02 3f d0 add %o0, -48, %g1 40002b90: a0 10 20 00 clr %l0 40002b94: 82 08 60 ff and %g1, 0xff, %g1 40002b98: b0 10 00 04 mov %g4, %i0 40002b9c: 80 a0 60 09 cmp %g1, 9 40002ba0: 08 80 00 05 bleu 40002bb4 40002ba4: aa 10 20 00 clr %l5 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40002ba8: 10 80 00 13 b 40002bf4 40002bac: 83 38 e0 18 sra %g3, 0x18, %g1 40002bb0: 87 2a 20 18 sll %o0, 0x18, %g3 fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); fmt++; 40002bb4: 88 01 20 01 inc %g4 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40002bb8: d0 09 00 00 ldub [ %g4 ], %o0 width *= 10; width += (*fmt - '0'); 40002bbc: 85 2c 20 03 sll %l0, 3, %g2 40002bc0: 83 2c 20 01 sll %l0, 1, %g1 40002bc4: 87 38 e0 18 sra %g3, 0x18, %g3 40002bc8: 82 00 40 02 add %g1, %g2, %g1 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40002bcc: 84 02 3f d0 add %o0, -48, %g2 width *= 10; width += (*fmt - '0'); 40002bd0: 82 00 40 03 add %g1, %g3, %g1 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40002bd4: 84 08 a0 ff and %g2, 0xff, %g2 40002bd8: 80 a0 a0 09 cmp %g2, 9 40002bdc: 08 bf ff f5 bleu 40002bb0 40002be0: a0 00 7f d0 add %g1, -48, %l0 40002be4: b0 10 00 04 mov %g4, %i0 40002be8: aa 10 00 10 mov %l0, %l5 40002bec: 87 2a 20 18 sll %o0, 0x18, %g3 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40002bf0: 83 38 e0 18 sra %g3, 0x18, %g1 40002bf4: 80 a0 60 6c cmp %g1, 0x6c 40002bf8: 22 80 00 9b be,a 40002e64 40002bfc: d0 09 20 01 ldub [ %g4 + 1 ], %o0 lflag = 1; c = *++fmt; } switch (c) { 40002c00: 82 02 3f bc add %o0, -68, %g1 40002c04: 82 08 60 ff and %g1, 0xff, %g1 40002c08: 80 a0 60 34 cmp %g1, 0x34 40002c0c: 08 80 00 12 bleu 40002c54 40002c10: 83 28 60 02 sll %g1, 2, %g1 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40002c14: c2 05 00 00 ld [ %l4 ], %g1 40002c18: 91 2a 20 18 sll %o0, 0x18, %o0 40002c1c: 9f c0 40 00 call %g1 40002c20: 91 3a 20 18 sra %o0, 0x18, %o0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002c24: b0 06 20 01 inc %i0 40002c28: d0 0e 00 00 ldub [ %i0 ], %o0 40002c2c: 91 2a 20 18 sll %o0, 0x18, %o0 40002c30: 80 a2 20 00 cmp %o0, 0 40002c34: 12 bf ff c8 bne 40002b54 40002c38: 91 3a 20 18 sra %o0, 0x18, %o0 40002c3c: 81 c7 e0 08 ret 40002c40: 81 e8 00 00 restore if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 40002c44: 9f c0 40 00 call %g1 40002c48: b0 06 20 01 inc %i0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002c4c: 10 bf ff f8 b 40002c2c 40002c50: d0 0e 00 00 ldub [ %i0 ], %o0 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40002c54: c4 06 80 01 ld [ %i2 + %g1 ], %g2 40002c58: 81 c0 80 00 jmp %g2 40002c5c: 01 00 00 00 nop break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40002c60: 82 10 20 00 clr %g1 ! 0 <== NOT EXECUTED 40002c64: a6 10 20 08 mov 8, %l3 <== NOT EXECUTED break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 40002c68: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40002c6c: 80 a4 60 00 cmp %l1, 0 40002c70: 06 80 00 3d bl 40002d64 40002c74: b2 06 60 04 add %i1, 4, %i1 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40002c78: 90 10 00 11 mov %l1, %o0 40002c7c: 92 10 00 13 mov %l3, %o1 40002c80: 40 00 43 53 call 400139cc <.udiv> 40002c84: a0 10 20 00 clr %l0 40002c88: 80 a2 20 00 cmp %o0, 0 40002c8c: 02 80 00 14 be 40002cdc 40002c90: a4 10 20 01 mov 1, %l2 40002c94: a4 10 00 11 mov %l1, %l2 40002c98: a0 10 20 00 clr %l0 40002c9c: 10 80 00 03 b 40002ca8 40002ca0: a2 10 00 08 mov %o0, %l1 40002ca4: a2 10 00 08 mov %o0, %l1 toPrint[count++] = (num - (n*base)); 40002ca8: 92 10 00 13 mov %l3, %o1 40002cac: 40 00 43 0e call 400138e4 <.umul> 40002cb0: 90 10 00 11 mov %l1, %o0 40002cb4: 90 24 80 08 sub %l2, %o0, %o0 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40002cb8: 92 10 00 13 mov %l3, %o1 toPrint[count++] = (num - (n*base)); 40002cbc: d0 2d c0 10 stb %o0, [ %l7 + %l0 ] num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40002cc0: 90 10 00 11 mov %l1, %o0 40002cc4: 40 00 43 42 call 400139cc <.udiv> 40002cc8: a0 04 20 01 inc %l0 40002ccc: 80 a2 20 00 cmp %o0, 0 40002cd0: 12 bf ff f5 bne 40002ca4 40002cd4: a4 10 00 11 mov %l1, %l2 40002cd8: a4 04 20 01 add %l0, 1, %l2 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40002cdc: 82 06 c0 10 add %i3, %l0, %g1 40002ce0: e2 28 7f e8 stb %l1, [ %g1 + -24 ] for (n=maxwidth ; n > count; n-- ) 40002ce4: 80 a4 80 15 cmp %l2, %l5 40002ce8: 1a 80 00 0a bcc 40002d10 40002cec: a0 10 00 15 mov %l5, %l0 40002cf0: a2 10 00 1d mov %i5, %l1 BSP_output_char(lead); 40002cf4: c2 05 00 00 ld [ %l4 ], %g1 40002cf8: 9f c0 40 00 call %g1 40002cfc: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40002d00: a0 04 3f ff add %l0, -1, %l0 40002d04: 80 a4 80 10 cmp %l2, %l0 40002d08: 2a bf ff fc bcs,a 40002cf8 40002d0c: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(lead); for (n = 0; n < count; n++) { 40002d10: 80 a4 a0 00 cmp %l2, 0 40002d14: 02 bf ff c4 be 40002c24 40002d18: a2 06 c0 12 add %i3, %l2, %l1 40002d1c: a0 10 20 00 clr %l0 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40002d20: 82 24 40 10 sub %l1, %l0, %g1 40002d24: c4 48 7f e7 ldsb [ %g1 + -25 ], %g2 40002d28: c6 05 00 00 ld [ %l4 ], %g3 40002d2c: d0 4f 00 02 ldsb [ %i4 + %g2 ], %o0 40002d30: 9f c0 c0 00 call %g3 40002d34: a0 04 20 01 inc %l0 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 40002d38: 80 a4 80 10 cmp %l2, %l0 40002d3c: 18 bf ff fa bgu 40002d24 40002d40: 82 24 40 10 sub %l1, %l0, %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002d44: 10 bf ff b9 b 40002c28 40002d48: b0 06 20 01 inc %i0 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 40002d4c: e2 06 40 00 ld [ %i1 ], %l1 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40002d50: 82 10 20 01 mov 1, %g1 40002d54: a6 10 20 0a mov 0xa, %l3 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40002d58: 80 a4 60 00 cmp %l1, 0 40002d5c: 16 bf ff c7 bge 40002c78 40002d60: b2 06 60 04 add %i1, 4, %i1 40002d64: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 40002d68: 02 bf ff c5 be 40002c7c <== NOT EXECUTED 40002d6c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED BSP_output_char('-'); 40002d70: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 40002d74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002d78: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 40002d7c: 80 a0 00 15 cmp %g0, %l5 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 40002d80: a2 20 00 11 neg %l1 <== NOT EXECUTED if (maxwidth) maxwidth--; 40002d84: 10 bf ff bd b 40002c78 <== NOT EXECUTED 40002d88: aa 65 60 00 subx %l5, 0, %l5 <== NOT EXECUTED case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 40002d8c: e6 06 40 00 ld [ %i1 ], %l3 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 40002d90: a4 10 20 00 clr %l2 40002d94: c2 4c c0 00 ldsb [ %l3 ], %g1 40002d98: 80 a0 60 00 cmp %g1, 0 40002d9c: 02 80 00 07 be 40002db8 40002da0: b2 06 60 04 add %i1, 4, %i1 40002da4: a4 04 a0 01 inc %l2 40002da8: c2 4c c0 12 ldsb [ %l3 + %l2 ], %g1 40002dac: 80 a0 60 00 cmp %g1, 0 40002db0: 32 bf ff fe bne,a 40002da8 40002db4: a4 04 a0 01 inc %l2 ; /* leading spaces */ if ( !minus ) 40002db8: 80 a5 a0 00 cmp %l6, 0 40002dbc: 02 80 00 36 be 40002e94 40002dc0: 80 a4 00 12 cmp %l0, %l2 for ( i=len ; i 40002dcc: aa 10 00 12 mov %l2, %l5 width = len; } /* output the string */ for ( i=0 ; i 40002dd8: 80 a5 a0 00 cmp %l6, 0 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 40002ddc: 22 bf ff 93 be,a 40002c28 40002de0: b0 06 20 01 inc %i0 for ( i=len ; i 40002dec: b0 06 20 01 inc %i0 <== NOT EXECUTED 40002df0: a0 10 00 12 mov %l2, %l0 BSP_output_char(' '); 40002df4: c2 05 00 00 ld [ %l4 ], %g1 40002df8: 9f c0 40 00 call %g1 40002dfc: 90 10 20 20 mov 0x20, %o0 for ( i=0 ; i 40002e0c: c2 05 00 00 ld [ %l4 ], %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002e10: 10 bf ff 86 b 40002c28 40002e14: b0 06 20 01 inc %i0 for ( i=len ; i <== NOT EXECUTED 40002e2c: b0 06 20 01 inc %i0 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40002e30: 82 10 20 00 clr %g1 40002e34: 10 bf ff 8d b 40002c68 40002e38: a6 10 20 0a mov 0xa, %l3 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = 1; fmt++; 40002e3c: 88 01 20 01 inc %g4 40002e40: d0 09 00 00 ldub [ %g4 ], %o0 40002e44: ac 10 20 01 mov 1, %l6 40002e48: 10 bf ff 51 b 40002b8c 40002e4c: 87 2a 20 18 sll %o0, 0x18, %g3 lead = ' '; if (*fmt == '%') { fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 40002e50: d0 0e 20 02 ldub [ %i0 + 2 ], %o0 40002e54: 88 06 20 02 add %i0, 2, %g4 40002e58: ba 10 20 30 mov 0x30, %i5 40002e5c: 10 bf ff 48 b 40002b7c 40002e60: 87 2a 20 18 sll %o0, 0x18, %g3 fmt++; } if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; 40002e64: 10 bf ff 67 b 40002c00 40002e68: b0 01 20 01 add %g4, 1, %i0 width = len; } /* output the string */ for ( i=0 ; i 40002e88: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 40002e8c: 10 bf ff d4 b 40002ddc 40002e90: 80 a5 a0 00 cmp %l6, 0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 40002e98: a2 10 00 12 mov %l2, %l1 BSP_output_char(' '); 40002e9c: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 40002ea0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002ea4: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NOT EXECUTED 40002eb4: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i <== NOT EXECUTED 40002ebc: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40002ec0: 82 10 20 00 clr %g1 40002ec4: 10 bf ff 69 b 40002c68 40002ec8: a6 10 20 10 mov 0x10, %l3 40016230 : ssize_t write( int fd, const void *buffer, size_t count ) { 40016230: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40016234: 03 10 00 5e sethi %hi(0x40017800), %g1 40016238: c4 00 62 a8 ld [ %g1 + 0x2a8 ], %g2 ! 40017aa8 ssize_t write( int fd, const void *buffer, size_t count ) { 4001623c: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40016240: 80 a6 00 02 cmp %i0, %g2 40016244: 1a 80 00 24 bcc 400162d4 40016248: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001624c: 03 10 00 61 sethi %hi(0x40018400), %g1 40016250: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 ! 40018640 40016254: 85 2e 20 02 sll %i0, 2, %g2 40016258: 83 2e 20 04 sll %i0, 4, %g1 4001625c: 82 20 40 02 sub %g1, %g2, %g1 40016260: 82 00 40 18 add %g1, %i0, %g1 40016264: 83 28 60 02 sll %g1, 2, %g1 40016268: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 4001626c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40016270: 80 88 61 00 btst 0x100, %g1 40016274: 02 80 00 18 be 400162d4 40016278: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001627c: 02 80 00 1c be 400162ec 40016280: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40016284: 02 80 00 12 be 400162cc 40016288: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001628c: 80 88 60 04 btst 4, %g1 40016290: 02 80 00 17 be 400162ec 40016294: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 40016298: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4001629c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 400162a0: 80 a0 60 00 cmp %g1, 0 400162a4: 02 80 00 18 be 40016304 400162a8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 400162ac: 9f c0 40 00 call %g1 400162b0: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 400162b4: 80 a2 20 00 cmp %o0, 0 400162b8: 04 80 00 05 ble 400162cc 400162bc: 01 00 00 00 nop iop->offset += rc; 400162c0: c2 06 20 08 ld [ %i0 + 8 ], %g1 400162c4: 82 00 40 08 add %g1, %o0, %g1 400162c8: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 400162cc: 81 c7 e0 08 ret 400162d0: 91 e8 00 08 restore %g0, %o0, %o0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 400162d4: 7f ff d9 ee call 4000ca8c <__errno> <== NOT EXECUTED 400162d8: 01 00 00 00 nop <== NOT EXECUTED 400162dc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400162e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400162e4: 10 bf ff fa b 400162cc <== NOT EXECUTED 400162e8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400162ec: 7f ff d9 e8 call 4000ca8c <__errno> <== NOT EXECUTED 400162f0: 01 00 00 00 nop <== NOT EXECUTED 400162f4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400162f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400162fc: 10 bf ff f4 b 400162cc <== NOT EXECUTED 40016300: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40016304: 7f ff d9 e2 call 4000ca8c <__errno> <== NOT EXECUTED 40016308: 01 00 00 00 nop <== NOT EXECUTED 4001630c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40016310: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40016314: 10 bf ff ee b 400162cc <== NOT EXECUTED 40016318: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED