400105a0 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 400105a0: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 400105a4: 40 00 05 12 call 400119ec 400105a8: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 400105ac: 91 2a 20 10 sll %o0, 0x10, %o0 400105b0: 91 32 20 10 srl %o0, 0x10, %o0 400105b4: 80 a2 20 00 cmp %o0, 0 400105b8: 22 80 00 0c be,a 400105e8 400105bc: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] 400105c0: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 400105c4: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400105c8: 22 80 00 08 be,a 400105e8 <== NOT EXECUTED 400105cc: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 400105d0: 40 00 18 66 call 40016768 <__errno> <== NOT EXECUTED 400105d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400105d8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400105dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400105e0: 81 c7 e0 08 ret <== NOT EXECUTED 400105e4: 81 e8 00 00 restore <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; 400105e8: f4 34 20 3a sth %i2, [ %l0 + 0x3a ] IMFS_update_ctime( jnode ); 400105ec: 90 07 bf f8 add %fp, -8, %o0 400105f0: 7f ff d1 f3 call 40004dbc 400105f4: 92 10 20 00 clr %o1 400105f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 400105fc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 40010600: 81 c7 e0 08 ret 40010604: 91 e8 20 00 restore %g0, 0, %o0 4000eca4 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000eca4: 9d e3 bf a0 save %sp, -96, %sp IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4000eca8: 80 a6 20 00 cmp %i0, 0 4000ecac: 12 80 00 04 bne 4000ecbc 4000ecb0: a0 10 20 00 clr %l0 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000ecb4: 81 c7 e0 08 ret <== NOT EXECUTED 4000ecb8: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4000ecbc: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000ecc0: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 4001e238 4000ecc4: 92 10 00 1a mov %i2, %o1 4000ecc8: d4 10 60 2c lduh [ %g1 + 0x2c ], %o2 4000eccc: 90 10 00 19 mov %i1, %o0 4000ecd0: b6 2e c0 0a andn %i3, %o2, %i3 4000ecd4: 95 2e e0 10 sll %i3, 0x10, %o2 4000ecd8: 7f ff ff c8 call 4000ebf8 4000ecdc: 95 32 a0 10 srl %o2, 0x10, %o2 if ( !node ) 4000ece0: a0 92 20 00 orcc %o0, 0, %l0 4000ece4: 02 bf ff f4 be 4000ecb4 4000ece8: 80 a6 60 07 cmp %i1, 7 return NULL; /* * Set the type specific information */ switch (type) { 4000ecec: 28 80 00 0a bleu,a 4000ed14 4000ecf0: b3 2e 60 02 sll %i1, 2, %i1 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4000ecf4: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000ecf8: 15 10 00 76 sethi %hi(0x4001d800), %o2 <== NOT EXECUTED 4000ecfc: 17 10 00 74 sethi %hi(0x4001d000), %o3 <== NOT EXECUTED 4000ed00: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED 4000ed04: 94 12 a1 28 or %o2, 0x128, %o2 <== NOT EXECUTED 4000ed08: 96 12 e0 00 mov %o3, %o3 <== NOT EXECUTED 4000ed0c: 7f ff d0 cf call 40003048 <__assert_func> <== NOT EXECUTED 4000ed10: 92 10 20 5c mov 0x5c, %o1 <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4000ed14: 03 10 00 3a sethi %hi(0x4000e800), %g1 4000ed18: 82 10 63 d8 or %g1, 0x3d8, %g1 ! 4000ebd8 4000ed1c: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000ed20: 81 c0 40 00 jmp %g1 4000ed24: 01 00 00 00 nop 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; 4000ed28: c2 07 00 00 ld [ %i4 ], %g1 4000ed2c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4000ed30: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4000ed34: d0 06 00 00 ld [ %i0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 4000ed38: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 4000ed3c: d0 24 20 08 st %o0, [ %l0 + 8 ] node->st_ino = ++fs_info->ino_count; 4000ed40: c2 00 80 00 ld [ %g2 ], %g1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4000ed44: 90 02 20 50 add %o0, 0x50, %o0 4000ed48: 82 00 60 01 inc %g1 4000ed4c: c2 20 80 00 st %g1, [ %g2 ] 4000ed50: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 4000ed54: 92 10 00 10 mov %l0, %o1 4000ed58: 7f ff e2 5b call 400076c4 <_Chain_Append> 4000ed5c: b0 10 00 10 mov %l0, %i0 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000ed60: 81 c7 e0 08 ret 4000ed64: 81 e8 00 00 restore node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000ed68: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 4000ed6c: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000ed70: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000ed74: c0 24 20 50 clr [ %l0 + 0x50 ] 4000ed78: c0 24 20 54 clr [ %l0 + 0x54 ] node->info.file.indirect = 0; 4000ed7c: c0 24 20 58 clr [ %l0 + 0x58 ] node->info.file.doubly_indirect = 0; 4000ed80: c0 24 20 5c clr [ %l0 + 0x5c ] node->info.file.triply_indirect = 0; break; 4000ed84: 10 bf ff eb b 4000ed30 4000ed88: c0 24 20 60 clr [ %l0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 4000ed8c: 10 bf ff e9 b 4000ed30 4000ed90: c0 24 20 50 clr [ %l0 + 0x50 ] 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; 4000ed94: c4 07 20 04 ld [ %i4 + 4 ], %g2 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000ed98: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 4000ed9c: c4 24 20 54 st %g2, [ %l0 + 0x54 ] break; 4000eda0: 10 bf ff e4 b 4000ed30 4000eda4: c2 24 20 50 st %g1, [ %l0 + 0x50 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000eda8: 82 04 20 54 add %l0, 0x54, %g1 the_chain->permanent_null = NULL; 4000edac: c0 24 20 54 clr [ %l0 + 0x54 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000edb0: c2 24 20 50 st %g1, [ %l0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000edb4: 82 04 20 50 add %l0, 0x50, %g1 4000edb8: 10 bf ff de b 4000ed30 4000edbc: c2 24 20 58 st %g1, [ %l0 + 0x58 ] 40004e08 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40004e08: 9d e3 bf a0 save %sp, -96, %sp rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40004e0c: 80 a6 20 00 cmp %i0, 0 40004e10: 02 80 00 2b be 40004ebc 40004e14: 80 a6 60 00 cmp %i1, 0 assert( level >= 0 ); 40004e18: 06 80 00 38 bl 40004ef8 40004e1c: 11 10 00 9a sethi %hi(0x40026800), %o0 assert( the_directory->type == IMFS_DIRECTORY ); 40004e20: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40004e24: 80 a0 60 01 cmp %g1, 1 40004e28: 12 80 00 2d bne 40004edc 40004e2c: a8 06 20 54 add %i0, 0x54, %l4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004e30: e6 06 20 50 ld [ %i0 + 0x50 ], %l3 40004e34: 80 a4 c0 14 cmp %l3, %l4 40004e38: 02 80 00 1b be 40004ea4 40004e3c: 25 10 00 a1 sethi %hi(0x40028400), %l2 40004e40: 23 10 00 9a sethi %hi(0x40026800), %l1 40004e44: a4 14 a3 90 or %l2, 0x390, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40004e48: a2 14 63 80 or %l1, 0x380, %l1 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40004e4c: aa 06 60 01 add %i1, 1, %l5 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 40004e50: a0 10 20 00 clr %l0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40004e54: c2 04 80 00 ld [ %l2 ], %g1 40004e58: 90 10 00 11 mov %l1, %o0 40004e5c: d6 00 60 08 ld [ %g1 + 8 ], %o3 40004e60: 92 10 20 01 mov 1, %o1 40004e64: 40 00 46 3d call 40016758 40004e68: 94 10 20 04 mov 4, %o2 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 40004e6c: a0 04 20 01 inc %l0 40004e70: 80 a6 40 10 cmp %i1, %l0 40004e74: 36 bf ff f9 bge,a 40004e58 40004e78: c2 04 80 00 ld [ %l2 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40004e7c: 7f ff ff 7d call 40004c70 40004e80: 90 10 00 13 mov %l3, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40004e84: c2 04 e0 48 ld [ %l3 + 0x48 ], %g1 40004e88: 80 a0 60 01 cmp %g1, 1 40004e8c: 22 80 00 08 be,a 40004eac 40004e90: 90 10 00 13 mov %l3, %o0 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 40004e94: e6 04 c0 00 ld [ %l3 ], %l3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004e98: 80 a4 c0 14 cmp %l3, %l4 40004e9c: 12 bf ff ee bne 40004e54 40004ea0: a0 10 20 00 clr %l0 40004ea4: 81 c7 e0 08 ret 40004ea8: 81 e8 00 00 restore for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40004eac: 7f ff ff d7 call 40004e08 40004eb0: 92 10 00 15 mov %l5, %o1 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 40004eb4: 10 bf ff f9 b 40004e98 40004eb8: e6 04 c0 00 ld [ %l3 ], %l3 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40004ebc: 11 10 00 9a sethi %hi(0x40026800), %o0 <== NOT EXECUTED 40004ec0: 15 10 00 9b sethi %hi(0x40026c00), %o2 <== NOT EXECUTED 40004ec4: 17 10 00 9a sethi %hi(0x40026800), %o3 <== NOT EXECUTED 40004ec8: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED 40004ecc: 94 12 a0 30 or %o2, 0x30, %o2 <== NOT EXECUTED 40004ed0: 96 12 e3 38 or %o3, 0x338, %o3 <== NOT EXECUTED 40004ed4: 40 00 02 01 call 400056d8 <__assert_func> <== NOT EXECUTED 40004ed8: 92 10 20 84 mov 0x84, %o1 <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 40004edc: 15 10 00 9b sethi %hi(0x40026c00), %o2 <== NOT EXECUTED 40004ee0: 17 10 00 9a sethi %hi(0x40026800), %o3 <== NOT EXECUTED 40004ee4: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED 40004ee8: 94 12 a0 30 or %o2, 0x30, %o2 <== NOT EXECUTED 40004eec: 96 12 e3 58 or %o3, 0x358, %o3 <== NOT EXECUTED 40004ef0: 40 00 01 fa call 400056d8 <__assert_func> <== NOT EXECUTED 40004ef4: 92 10 20 88 mov 0x88, %o1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 40004ef8: 15 10 00 9b sethi %hi(0x40026c00), %o2 <== NOT EXECUTED 40004efc: 17 10 00 9a sethi %hi(0x40026800), %o3 <== NOT EXECUTED 40004f00: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED 40004f04: 94 12 a0 30 or %o2, 0x30, %o2 <== NOT EXECUTED 40004f08: 96 12 e3 48 or %o3, 0x348, %o3 <== NOT EXECUTED 40004f0c: 40 00 01 f3 call 400056d8 <__assert_func> <== NOT EXECUTED 40004f10: 92 10 20 86 mov 0x86, %o1 <== NOT EXECUTED 40004f14: 01 00 00 00 nop 4000adcc : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000adcc: 9d e3 bf 78 save %sp, -136, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000add0: e0 06 c0 00 ld [ %i3 ], %l0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000add4: 2b 10 00 78 sethi %hi(0x4001e000), %l5 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000add8: a2 10 00 18 mov %i0, %l1 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000addc: aa 15 62 38 or %l5, 0x238, %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000ade0: a4 10 20 00 clr %l2 4000ade4: a6 07 bf d8 add %fp, -40, %l3 4000ade8: a8 07 bf fc add %fp, -4, %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], pathnamelen, token, &len ); 4000adec: 90 04 40 12 add %l1, %l2, %o0 4000adf0: 92 10 00 19 mov %i1, %o1 4000adf4: 94 10 00 13 mov %l3, %o2 4000adf8: 40 00 02 7e call 4000b7f0 4000adfc: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000ae00: c2 06 c0 00 ld [ %i3 ], %g1 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 4000ae04: ac 10 00 08 mov %o0, %l6 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000ae08: 80 a0 60 00 cmp %g1, 0 4000ae0c: 02 80 00 59 be 4000af70 4000ae10: c4 07 bf fc ld [ %fp + -4 ], %g2 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 4000ae14: a4 04 80 02 add %l2, %g2, %l2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000ae18: 80 a2 20 00 cmp %o0, 0 4000ae1c: 12 80 00 11 bne 4000ae60 4000ae20: b2 26 40 02 sub %i1, %g2, %i1 * 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 ) { 4000ae24: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000ae28: 80 a0 a0 01 cmp %g2, 1 4000ae2c: 22 80 00 60 be,a 4000afac 4000ae30: c8 00 60 5c ld [ %g1 + 0x5c ], %g4 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000ae34: 7f ff ff 50 call 4000ab74 4000ae38: 90 10 00 1b mov %i3, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000ae3c: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000ae40: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000ae44: 7f ff ff 6f call 4000ac00 4000ae48: 90 10 00 1b mov %i3, %o0 4000ae4c: 80 a2 20 00 cmp %o0, 0 4000ae50: 02 80 00 74 be 4000b020 4000ae54: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000ae58: 81 c7 e0 08 ret 4000ae5c: 81 e8 00 00 restore /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4000ae60: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 4000ae64: 80 a0 a0 01 cmp %g2, 1 4000ae68: 02 80 00 3b be 4000af54 4000ae6c: 90 10 00 1b mov %i3, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000ae70: 80 a5 a0 03 cmp %l6, 3 4000ae74: 02 80 00 0b be 4000aea0 4000ae78: a0 10 00 01 mov %g1, %l0 4000ae7c: 80 a5 a0 04 cmp %l6, 4 4000ae80: 02 80 00 2f be 4000af3c 4000ae84: 80 a5 a0 02 cmp %l6, 2 4000ae88: 02 80 00 1a be 4000aef0 4000ae8c: 80 a5 a0 04 cmp %l6, 4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4000ae90: 12 bf ff d8 bne 4000adf0 4000ae94: 90 04 40 12 add %l1, %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 ) { 4000ae98: 10 bf ff e4 b 4000ae28 <== NOT EXECUTED 4000ae9c: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4000aea0: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000aea4: 80 a0 60 03 cmp %g1, 3 4000aea8: 02 80 00 38 be 4000af88 4000aeac: 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 ) { 4000aeb0: 02 80 00 62 be 4000b038 4000aeb4: 90 10 00 1b mov %i3, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000aeb8: 80 a0 60 01 cmp %g1, 1 4000aebc: 12 80 00 53 bne 4000b008 4000aec0: 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 ) { 4000aec4: c8 04 20 5c ld [ %l0 + 0x5c ], %g4 4000aec8: 80 a1 20 00 cmp %g4, 0 4000aecc: 12 80 00 3b bne 4000afb8 4000aed0: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000aed4: 40 00 02 16 call 4000b72c 4000aed8: 92 10 00 13 mov %l3, %o1 if ( !node ) 4000aedc: a0 92 20 00 orcc %o0, 0, %l0 4000aee0: 02 80 00 24 be 4000af70 4000aee4: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 4000aee8: 10 bf ff c1 b 4000adec 4000aeec: e0 26 c0 00 st %l0, [ %i3 ] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000aef0: c4 05 40 00 ld [ %l5 ], %g2 4000aef4: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 4000aef8: 80 a0 80 01 cmp %g2, %g1 4000aefc: 02 bf ff bd be 4000adf0 4000af00: 90 04 40 12 add %l1, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 4000af04: c8 06 e0 10 ld [ %i3 + 0x10 ], %g4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000af08: c4 01 20 1c ld [ %g4 + 0x1c ], %g2 4000af0c: 80 a0 80 01 cmp %g2, %g1 4000af10: 22 80 00 58 be,a 4000b070 4000af14: c4 01 20 14 ld [ %g4 + 0x14 ], %g2 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4000af18: e0 00 60 08 ld [ %g1 + 8 ], %l0 4000af1c: 80 a4 20 00 cmp %l0, 0 4000af20: 32 bf ff b4 bne,a 4000adf0 4000af24: e0 26 c0 00 st %l0, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000af28: 40 00 16 50 call 40010868 <__errno> 4000af2c: b0 10 3f ff mov -1, %i0 4000af30: ec 22 00 00 st %l6, [ %o0 ] 4000af34: 81 c7 e0 08 ret 4000af38: 81 e8 00 00 restore case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000af3c: 40 00 16 4b call 40010868 <__errno> 4000af40: b0 10 3f ff mov -1, %i0 4000af44: 82 10 20 5b mov 0x5b, %g1 4000af48: c2 22 00 00 st %g1, [ %o0 ] 4000af4c: 81 c7 e0 08 ret 4000af50: 81 e8 00 00 restore /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000af54: 7f ff ff 2b call 4000ac00 4000af58: 92 10 20 01 mov 1, %o1 4000af5c: 80 a2 20 00 cmp %o0, 0 4000af60: 02 80 00 3e be 4000b058 4000af64: 01 00 00 00 nop 4000af68: 10 bf ff c2 b 4000ae70 4000af6c: c2 06 c0 00 ld [ %i3 ], %g1 * 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 ); 4000af70: 40 00 16 3e call 40010868 <__errno> 4000af74: b0 10 3f ff mov -1, %i0 4000af78: 82 10 20 02 mov 2, %g1 4000af7c: c2 22 00 00 st %g1, [ %o0 ] 4000af80: 81 c7 e0 08 ret 4000af84: 81 e8 00 00 restore * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 4000af88: 90 10 00 1b mov %i3, %o0 4000af8c: 7f ff ff 35 call 4000ac60 4000af90: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000af94: e0 06 c0 00 ld [ %i3 ], %l0 if ( !node ) 4000af98: 80 a4 20 00 cmp %l0, 0 4000af9c: 02 80 00 1b be 4000b008 4000afa0: 01 00 00 00 nop } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4000afa4: 10 bf ff c5 b 4000aeb8 4000afa8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 * * 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 ) { 4000afac: 80 a1 20 00 cmp %g4, 0 4000afb0: 02 bf ff a1 be 4000ae34 4000afb4: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 4000afb8: c4 01 20 28 ld [ %g4 + 0x28 ], %g2 *pathloc = newloc; 4000afbc: d6 01 20 2c ld [ %g4 + 0x2c ], %o3 * 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; 4000afc0: d8 01 20 24 ld [ %g4 + 0x24 ], %o4 4000afc4: da 01 20 20 ld [ %g4 + 0x20 ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000afc8: c2 00 80 00 ld [ %g2 ], %g1 4000afcc: c6 07 bf fc ld [ %fp + -4 ], %g3 * 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; 4000afd0: c8 01 20 1c ld [ %g4 + 0x1c ], %g4 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000afd4: 92 06 40 03 add %i1, %g3, %o1 4000afd8: 86 24 80 03 sub %l2, %g3, %g3 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000afdc: d6 26 e0 10 st %o3, [ %i3 + 0x10 ] 4000afe0: d8 26 e0 08 st %o4, [ %i3 + 8 ] 4000afe4: da 26 e0 04 st %o5, [ %i3 + 4 ] 4000afe8: c8 26 c0 00 st %g4, [ %i3 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000afec: 90 04 40 03 add %l1, %g3, %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000aff0: c4 26 e0 0c st %g2, [ %i3 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000aff4: 94 10 00 1a mov %i2, %o2 4000aff8: 9f c0 40 00 call %g1 4000affc: 96 10 00 1b mov %i3, %o3 4000b000: 81 c7 e0 08 ret 4000b004: 91 e8 00 08 restore %g0, %o0, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000b008: 40 00 16 18 call 40010868 <__errno> 4000b00c: b0 10 3f ff mov -1, %i0 4000b010: 82 10 20 14 mov 0x14, %g1 4000b014: c2 22 00 00 st %g1, [ %o0 ] 4000b018: 81 c7 e0 08 ret 4000b01c: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000b020: 40 00 16 12 call 40010868 <__errno> 4000b024: b0 10 3f ff mov -1, %i0 4000b028: 82 10 20 0d mov 0xd, %g1 4000b02c: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000b030: 81 c7 e0 08 ret 4000b034: 81 e8 00 00 restore if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4000b038: 7f ff ff 25 call 4000accc 4000b03c: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000b040: e0 06 c0 00 ld [ %i3 ], %l0 if ( result == -1 ) 4000b044: 80 a2 3f ff cmp %o0, -1 4000b048: 02 bf ff 84 be 4000ae58 4000b04c: b0 10 00 08 mov %o0, %i0 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4000b050: 10 bf ff 9a b 4000aeb8 4000b054: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000b058: 40 00 16 04 call 40010868 <__errno> 4000b05c: b0 10 3f ff mov -1, %i0 4000b060: 82 10 20 0d mov 0xd, %g1 4000b064: c2 22 00 00 st %g1, [ %o0 ] 4000b068: 81 c7 e0 08 ret 4000b06c: 81 e8 00 00 restore 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; 4000b070: d6 01 20 18 ld [ %g4 + 0x18 ], %o3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4000b074: d8 01 20 10 ld [ %g4 + 0x10 ], %o4 4000b078: da 01 20 0c ld [ %g4 + 0xc ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4000b07c: c2 00 80 00 ld [ %g2 ], %g1 4000b080: c6 07 bf fc ld [ %fp + -4 ], %g3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4000b084: 10 bf ff d4 b 4000afd4 4000b088: c8 01 20 08 ld [ %g4 + 8 ], %g4 4000b164 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000b164: 9d e3 bf 78 save %sp, -136, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000b168: e0 06 40 00 ld [ %i1 ], %l0 /* * Get the path length. */ pathlen = strlen( path ); 4000b16c: 90 10 00 18 mov %i0, %o0 4000b170: 40 00 19 75 call 40011744 4000b174: 2d 10 00 78 sethi %hi(0x4001e000), %l6 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000b178: a2 10 00 18 mov %i0, %l1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4000b17c: a6 10 20 00 clr %l3 4000b180: a8 07 bf d8 add %fp, -40, %l4 4000b184: aa 07 bf fc add %fp, -4, %l5 4000b188: a4 10 00 08 mov %o0, %l2 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000b18c: ac 15 a2 38 or %l6, 0x238, %l6 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4000b190: 92 10 00 12 mov %l2, %o1 4000b194: 90 04 40 13 add %l1, %l3, %o0 4000b198: 94 10 00 14 mov %l4, %o2 4000b19c: 40 00 01 95 call 4000b7f0 4000b1a0: 96 10 00 15 mov %l5, %o3 pathlen -= len; i += len; if ( !pathloc->node_access ) 4000b1a4: c2 06 40 00 ld [ %i1 ], %g1 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 4000b1a8: fa 07 bf fc ld [ %fp + -4 ], %i5 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4000b1ac: ae 10 00 08 mov %o0, %l7 pathlen -= len; i += len; if ( !pathloc->node_access ) 4000b1b0: 80 a0 60 00 cmp %g1, 0 4000b1b4: 02 80 00 5e be 4000b32c 4000b1b8: a4 24 80 1d sub %l2, %i5, %l2 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000b1bc: 80 a2 20 00 cmp %o0, 0 4000b1c0: 32 80 00 08 bne,a 4000b1e0 4000b1c4: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4000b1c8: 40 00 15 a8 call 40010868 <__errno> 4000b1cc: b0 10 3f ff mov -1, %i0 4000b1d0: 82 10 20 11 mov 0x11, %g1 4000b1d4: c2 22 00 00 st %g1, [ %o0 ] 4000b1d8: 81 c7 e0 08 ret 4000b1dc: 81 e8 00 00 restore /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4000b1e0: 80 a0 a0 01 cmp %g2, 1 4000b1e4: 02 80 00 58 be 4000b344 4000b1e8: 90 10 00 19 mov %i1, %o0 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 4000b1ec: a6 04 c0 1d add %l3, %i5, %l3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000b1f0: 80 a5 e0 02 cmp %l7, 2 4000b1f4: 02 80 00 30 be 4000b2b4 4000b1f8: a0 10 00 01 mov %g1, %l0 4000b1fc: 80 a5 e0 02 cmp %l7, 2 4000b200: 08 80 00 0d bleu 4000b234 4000b204: 80 a5 e0 00 cmp %l7, 0 4000b208: 80 a5 e0 03 cmp %l7, 3 4000b20c: 02 80 00 12 be 4000b254 4000b210: 80 a5 e0 04 cmp %l7, 4 4000b214: 12 bf ff e0 bne 4000b194 4000b218: 92 10 00 12 mov %l2, %o1 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 ); 4000b21c: 40 00 15 93 call 40010868 <__errno> 4000b220: b0 10 3f ff mov -1, %i0 4000b224: 82 10 20 5b mov 0x5b, %g1 4000b228: c2 22 00 00 st %g1, [ %o0 ] 4000b22c: 81 c7 e0 08 ret 4000b230: 81 e8 00 00 restore if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000b234: 12 bf ff d8 bne 4000b194 4000b238: 92 10 00 12 mov %l2, %o1 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4000b23c: 40 00 15 8b call 40010868 <__errno> <== NOT EXECUTED 4000b240: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b244: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 4000b248: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b24c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b250: 81 e8 00 00 restore <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4000b254: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000b258: 80 a0 60 03 cmp %g1, 3 4000b25c: 02 80 00 7f be 4000b458 4000b260: 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 ) { 4000b264: 02 80 00 7e be 4000b45c 4000b268: 90 10 00 19 mov %i1, %o0 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 4000b26c: 80 a4 20 00 cmp %l0, 0 4000b270: 02 80 00 61 be 4000b3f4 4000b274: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000b278: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000b27c: 80 a0 60 01 cmp %g1, 1 4000b280: 12 80 00 5d bne 4000b3f4 4000b284: 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 ) { 4000b288: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 4000b28c: 80 a0 e0 00 cmp %g3, 0 4000b290: 12 80 00 5f bne 4000b40c 4000b294: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000b298: 40 00 01 25 call 4000b72c 4000b29c: 92 10 00 14 mov %l4, %o1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4000b2a0: a0 92 20 00 orcc %o0, 0, %l0 4000b2a4: 02 80 00 17 be 4000b300 4000b2a8: c2 07 bf fc ld [ %fp + -4 ], %g1 done = true; else pathloc->node_access = node; 4000b2ac: 10 bf ff b9 b 4000b190 4000b2b0: e0 26 40 00 st %l0, [ %i1 ] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000b2b4: c4 05 80 00 ld [ %l6 ], %g2 4000b2b8: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 4000b2bc: 80 a0 80 01 cmp %g2, %g1 4000b2c0: 02 bf ff b5 be 4000b194 4000b2c4: 92 10 00 12 mov %l2, %o1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 4000b2c8: c6 06 60 10 ld [ %i1 + 0x10 ], %g3 4000b2cc: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 4000b2d0: 80 a0 80 01 cmp %g2, %g1 4000b2d4: 22 80 00 6f be,a 4000b490 4000b2d8: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4000b2dc: e0 00 60 08 ld [ %g1 + 8 ], %l0 4000b2e0: 80 a4 20 00 cmp %l0, 0 4000b2e4: 32 bf ff ac bne,a 4000b194 4000b2e8: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000b2ec: 40 00 15 5f call 40010868 <__errno> 4000b2f0: b0 10 3f ff mov -1, %i0 4000b2f4: ee 22 00 00 st %l7, [ %o0 ] 4000b2f8: 81 c7 e0 08 ret 4000b2fc: 81 e8 00 00 restore case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4000b300: 82 24 c0 01 sub %l3, %g1, %g1 4000b304: 82 04 40 01 add %l1, %g1, %g1 4000b308: 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++) { 4000b30c: c2 4c 40 13 ldsb [ %l1 + %l3 ], %g1 4000b310: 80 a0 60 00 cmp %g1, 0 4000b314: 02 80 00 23 be 4000b3a0 4000b318: 80 a0 60 2f cmp %g1, 0x2f if ( !IMFS_is_separator( path[ i ] ) ) 4000b31c: 02 80 00 11 be 4000b360 4000b320: 80 a0 60 5c cmp %g1, 0x5c 4000b324: 22 80 00 10 be,a 4000b364 4000b328: a2 04 40 13 add %l1, %l3, %l1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000b32c: 40 00 15 4f call 40010868 <__errno> <== NOT EXECUTED 4000b330: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b334: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 4000b338: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b33c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b340: 81 e8 00 00 restore <== NOT EXECUTED * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000b344: 7f ff fe 2f call 4000ac00 4000b348: 92 10 20 01 mov 1, %o1 4000b34c: 80 a2 20 00 cmp %o0, 0 4000b350: 02 80 00 4a be 4000b478 4000b354: 01 00 00 00 nop 4000b358: 10 bf ff a5 b 4000b1ec 4000b35c: c2 06 40 00 ld [ %i1 ], %g1 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 4000b360: a2 04 40 13 add %l1, %l3, %l1 /* * 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++) { 4000b364: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 4000b368: 80 a0 60 00 cmp %g1, 0 4000b36c: 02 80 00 0d be 4000b3a0 4000b370: a2 04 60 01 inc %l1 if ( !IMFS_is_separator( path[ i ] ) ) 4000b374: 80 a0 60 5c cmp %g1, 0x5c 4000b378: 02 bf ff fb be 4000b364 4000b37c: 80 a0 60 2f cmp %g1, 0x2f 4000b380: 22 bf ff fa be,a 4000b368 4000b384: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000b388: 40 00 15 38 call 40010868 <__errno> 4000b38c: b0 10 3f ff mov -1, %i0 4000b390: 82 10 20 02 mov 2, %g1 4000b394: c2 22 00 00 st %g1, [ %o0 ] 4000b398: 81 c7 e0 08 ret 4000b39c: 81 e8 00 00 restore /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4000b3a0: 7f ff fd f5 call 4000ab74 4000b3a4: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 4000b3a8: c2 06 40 00 ld [ %i1 ], %g1 4000b3ac: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000b3b0: 80 a0 60 01 cmp %g1, 1 4000b3b4: 12 80 00 10 bne 4000b3f4 4000b3b8: b0 10 00 08 mov %o0, %i0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 4000b3bc: 90 10 00 19 mov %i1, %o0 4000b3c0: 7f ff fe 10 call 4000ac00 4000b3c4: 92 10 20 03 mov 3, %o1 4000b3c8: 80 a2 20 00 cmp %o0, 0 4000b3cc: 02 80 00 04 be 4000b3dc 4000b3d0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000b3d4: 81 c7 e0 08 ret 4000b3d8: 81 e8 00 00 restore /* * 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 ); 4000b3dc: 40 00 15 23 call 40010868 <__errno> 4000b3e0: b0 10 3f ff mov -1, %i0 4000b3e4: 82 10 20 0d mov 0xd, %g1 4000b3e8: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000b3ec: 81 c7 e0 08 ret 4000b3f0: 81 e8 00 00 restore /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000b3f4: 40 00 15 1d call 40010868 <__errno> 4000b3f8: b0 10 3f ff mov -1, %i0 4000b3fc: 82 10 20 14 mov 0x14, %g1 4000b400: c2 22 00 00 st %g1, [ %o0 ] 4000b404: 81 c7 e0 08 ret 4000b408: 81 e8 00 00 restore * 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; 4000b40c: c4 00 e0 28 ld [ %g3 + 0x28 ], %g2 *pathloc = newloc; 4000b410: d8 00 e0 2c ld [ %g3 + 0x2c ], %o4 * 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; 4000b414: da 00 e0 24 ld [ %g3 + 0x24 ], %o5 4000b418: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b41c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 * 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; 4000b420: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b424: d0 07 bf fc ld [ %fp + -4 ], %o0 * 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; 4000b428: d8 26 60 10 st %o4, [ %i1 + 0x10 ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b42c: 90 24 c0 08 sub %l3, %o0, %o0 * 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; 4000b430: da 26 60 08 st %o5, [ %i1 + 8 ] 4000b434: c8 26 60 04 st %g4, [ %i1 + 4 ] 4000b438: c6 26 40 00 st %g3, [ %i1 ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b43c: 90 04 40 08 add %l1, %o0, %o0 * 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; 4000b440: c4 26 60 0c st %g2, [ %i1 + 0xc ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b444: 92 10 00 19 mov %i1, %o1 4000b448: 9f c0 40 00 call %g1 4000b44c: 94 10 00 1a mov %i2, %o2 4000b450: 81 c7 e0 08 ret 4000b454: 91 e8 00 08 restore %g0, %o0, %o0 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4000b458: 90 10 00 19 mov %i1, %o0 4000b45c: 7f ff ff 0c call 4000b08c 4000b460: 92 10 20 00 clr %o1 if ( result == -1 ) 4000b464: 80 a2 3f ff cmp %o0, -1 4000b468: 02 bf ff 5c be 4000b1d8 4000b46c: b0 10 00 08 mov %o0, %i0 4000b470: 10 bf ff 7f b 4000b26c 4000b474: e0 06 40 00 ld [ %i1 ], %l0 */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000b478: 40 00 14 fc call 40010868 <__errno> 4000b47c: b0 10 3f ff mov -1, %i0 4000b480: 82 10 20 0d mov 0xd, %g1 4000b484: c2 22 00 00 st %g1, [ %o0 ] 4000b488: 81 c7 e0 08 ret 4000b48c: 81 e8 00 00 restore if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4000b490: d8 00 e0 18 ld [ %g3 + 0x18 ], %o4 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4000b494: da 00 e0 10 ld [ %g3 + 0x10 ], %o5 4000b498: c8 00 e0 0c ld [ %g3 + 0xc ], %g4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b49c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4000b4a0: 10 bf ff e1 b 4000b424 4000b4a4: c6 00 e0 08 ld [ %g3 + 8 ], %g3 4000ac60 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000ac60: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 4000ac64: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000ac68: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000ac6c: 80 a0 a0 03 cmp %g2, 3 4000ac70: 12 80 00 14 bne 4000acc0 4000ac74: 90 10 00 18 mov %i0, %o0 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 4000ac78: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 IMFS_Set_handlers( node ); 4000ac7c: 7f ff ff be call 4000ab74 4000ac80: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000ac84: 90 10 00 18 mov %i0, %o0 4000ac88: 92 10 00 19 mov %i1, %o1 4000ac8c: 7f ff ff dd call 4000ac00 4000ac90: b0 10 20 00 clr %i0 4000ac94: 80 a2 20 00 cmp %o0, 0 4000ac98: 02 80 00 04 be 4000aca8 4000ac9c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000aca0: 81 c7 e0 08 ret 4000aca4: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000aca8: 40 00 16 f0 call 40010868 <__errno> <== NOT EXECUTED 4000acac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000acb0: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000acb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000acb8: 81 c7 e0 08 ret <== NOT EXECUTED 4000acbc: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 4000acc0: 7f ff f1 92 call 40007308 <== NOT EXECUTED 4000acc4: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000acc8: 01 00 00 00 nop 4000b08c : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000b08c: 9d e3 bf a0 save %sp, -96, %sp 4000b090: 21 10 00 78 sethi %hi(0x4001e000), %l0 4000b094: a2 10 00 18 mov %i0, %l1 4000b098: c2 04 22 38 ld [ %l0 + 0x238 ], %g1 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 ) ) ); 4000b09c: 10 80 00 07 b 4000b0b8 4000b0a0: a6 14 22 38 or %l0, 0x238, %l3 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4000b0a4: 02 80 00 21 be 4000b128 4000b0a8: 84 00 bf fd add %g2, -3, %g2 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000b0ac: 80 a0 a0 01 cmp %g2, 1 4000b0b0: 18 80 00 1b bgu 4000b11c 4000b0b4: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000b0b8: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4000b0bc: e4 04 40 00 ld [ %l1 ], %l2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000b0c0: 84 00 a0 01 inc %g2 4000b0c4: c4 30 60 2e sth %g2, [ %g1 + 0x2e ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4000b0c8: 85 28 a0 10 sll %g2, 0x10, %g2 4000b0cc: 85 30 a0 10 srl %g2, 0x10, %g2 4000b0d0: 80 a0 a0 05 cmp %g2, 5 4000b0d4: 18 80 00 1d bgu 4000b148 4000b0d8: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4000b0dc: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 4000b0e0: 80 a0 a0 03 cmp %g2, 3 4000b0e4: 12 bf ff f0 bne 4000b0a4 4000b0e8: 80 a0 a0 04 cmp %g2, 4 result = IMFS_evaluate_hard_link( node, flags ); 4000b0ec: 90 10 00 11 mov %l1, %o0 4000b0f0: 7f ff fe dc call 4000ac60 4000b0f4: 92 10 00 19 mov %i1, %o1 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 ) ) ); 4000b0f8: 80 a2 20 00 cmp %o0, 0 4000b0fc: 12 80 00 08 bne 4000b11c 4000b100: c2 04 22 38 ld [ %l0 + 0x238 ], %g1 4000b104: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 4000b108: 84 00 bf fd add %g2, -3, %g2 4000b10c: 80 a0 a0 01 cmp %g2, 1 4000b110: 08 bf ff ea bleu 4000b0b8 4000b114: c2 04 c0 00 ld [ %l3 ], %g1 4000b118: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4000b11c: c0 30 60 2e clrh [ %g1 + 0x2e ] return result; } 4000b120: 81 c7 e0 08 ret 4000b124: 91 e8 00 08 restore %g0, %o0, %o0 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 ); 4000b128: 90 10 00 11 mov %l1, %o0 4000b12c: 7f ff fe e8 call 4000accc 4000b130: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000b134: 80 a2 20 00 cmp %o0, 0 4000b138: 22 bf ff f4 be,a 4000b108 4000b13c: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 4000b140: 10 bf ff f7 b 4000b11c 4000b144: c2 04 22 38 ld [ %l0 + 0x238 ], %g1 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4000b148: 40 00 15 c8 call 40010868 <__errno> 4000b14c: c0 30 60 2e clrh [ %g1 + 0x2e ] 4000b150: 82 10 20 5c mov 0x5c, %g1 4000b154: c2 22 00 00 st %g1, [ %o0 ] 4000b158: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 4000b15c: 81 c7 e0 08 ret 4000b160: 91 e8 00 08 restore %g0, %o0, %o0 4000ac00 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4000ac00: 9d e3 bf a0 save %sp, -96, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000ac04: 40 00 04 de call 4000bf7c 4000ac08: e0 06 00 00 ld [ %i0 ], %l0 st_gid = getegid(); 4000ac0c: 40 00 04 d8 call 4000bf6c 4000ac10: a2 10 00 08 mov %o0, %l1 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 4000ac14: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 4000ac18: a3 2c 60 10 sll %l1, 0x10, %l1 4000ac1c: a3 34 60 10 srl %l1, 0x10, %l1 4000ac20: 80 a4 40 01 cmp %l1, %g1 4000ac24: 02 80 00 09 be 4000ac48 4000ac28: 83 2e 60 06 sll %i1, 6, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 4000ac2c: c2 14 20 3a lduh [ %l0 + 0x3a ], %g1 4000ac30: 91 2a 20 10 sll %o0, 0x10, %o0 4000ac34: 91 32 20 10 srl %o0, 0x10, %o0 4000ac38: 80 a2 00 01 cmp %o0, %g1 4000ac3c: 02 80 00 03 be 4000ac48 4000ac40: 83 2e 60 03 sll %i1, 3, %g1 4000ac44: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED flags_to_test <<= 3; 4000ac48: c4 14 20 2e lduh [ %l0 + 0x2e ], %g2 4000ac4c: 82 28 40 02 andn %g1, %g2, %g1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4000ac50: 80 a0 00 01 cmp %g0, %g1 4000ac54: b0 60 3f ff subx %g0, -1, %i0 4000ac58: 81 c7 e0 08 ret 4000ac5c: 81 e8 00 00 restore 4000accc : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000accc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 4000acd0: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000acd4: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000acd8: 80 a0 a0 04 cmp %g2, 4 4000acdc: 12 80 00 39 bne 4000adc0 4000ace0: 01 00 00 00 nop rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4000ace4: c4 00 60 08 ld [ %g1 + 8 ], %g2 4000ace8: 80 a0 a0 00 cmp %g2, 0 4000acec: 02 80 00 33 be 4000adb8 4000acf0: 01 00 00 00 nop /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 4000acf4: c4 26 00 00 st %g2, [ %i0 ] rtems_filesystem_get_sym_start_loc( 4000acf8: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 4000acfc: c6 48 80 00 ldsb [ %g2 ], %g3 4000ad00: 80 a0 e0 5c cmp %g3, 0x5c 4000ad04: 02 80 00 19 be 4000ad68 4000ad08: 80 a0 e0 2f cmp %g3, 0x2f 4000ad0c: 02 80 00 17 be 4000ad68 4000ad10: 80 a0 e0 00 cmp %g3, 0 4000ad14: 02 80 00 15 be 4000ad68 4000ad18: a0 10 20 00 clr %l0 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 4000ad1c: a0 00 80 10 add %g2, %l0, %l0 4000ad20: 40 00 1a 89 call 40011744 4000ad24: 90 10 00 10 mov %l0, %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000ad28: 94 10 00 19 mov %i1, %o2 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 4000ad2c: 92 10 00 08 mov %o0, %o1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000ad30: 96 10 00 18 mov %i0, %o3 4000ad34: 40 00 00 26 call 4000adcc 4000ad38: 90 10 00 10 mov %l0, %o0 4000ad3c: a0 10 00 08 mov %o0, %l0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 4000ad40: 7f ff ff 8d call 4000ab74 4000ad44: 90 10 00 18 mov %i0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000ad48: 90 10 00 18 mov %i0, %o0 4000ad4c: 7f ff ff ad call 4000ac00 4000ad50: 92 10 00 19 mov %i1, %o1 4000ad54: 80 a2 20 00 cmp %o0, 0 4000ad58: 02 80 00 13 be 4000ada4 4000ad5c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000ad60: 81 c7 e0 08 ret 4000ad64: 91 e8 00 10 restore %g0, %l0, %o0 * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 4000ad68: 05 10 00 78 sethi %hi(0x4001e000), %g2 4000ad6c: c4 00 a2 38 ld [ %g2 + 0x238 ], %g2 ! 4001e238 4000ad70: a0 10 20 01 mov 1, %l0 4000ad74: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3 4000ad78: c6 26 00 00 st %g3, [ %i0 ] 4000ad7c: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 4000ad80: c6 26 20 04 st %g3, [ %i0 + 4 ] 4000ad84: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 4000ad88: c6 26 20 08 st %g3, [ %i0 + 8 ] 4000ad8c: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 4000ad90: c6 26 20 0c st %g3, [ %i0 + 0xc ] 4000ad94: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2 4000ad98: c4 26 20 10 st %g2, [ %i0 + 0x10 ] 4000ad9c: 10 bf ff e0 b 4000ad1c 4000ada0: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000ada4: 40 00 16 b1 call 40010868 <__errno> <== NOT EXECUTED 4000ada8: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED 4000adac: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000adb0: 10 bf ff ec b 4000ad60 <== NOT EXECUTED 4000adb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 4000adb8: 7f ff f1 54 call 40007308 <== NOT EXECUTED 4000adbc: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 4000adc0: 7f ff f1 52 call 40007308 <== NOT EXECUTED 4000adc4: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000adc8: 01 00 00 00 nop 4000edc0 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000edc0: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000edc4: 7f ff f4 6e call 4000bf7c 4000edc8: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000edcc: 91 2a 20 10 sll %o0, 0x10, %o0 4000edd0: 91 32 20 10 srl %o0, 0x10, %o0 4000edd4: 80 a2 20 00 cmp %o0, 0 4000edd8: 22 80 00 0c be,a 4000ee08 4000eddc: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 4000ede0: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 4000ede4: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000ede8: 22 80 00 08 be,a 4000ee08 <== NOT EXECUTED 4000edec: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4000edf0: 40 00 06 9e call 40010868 <__errno> <== NOT EXECUTED 4000edf4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000edf8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000edfc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ee00: 81 c7 e0 08 ret <== NOT EXECUTED 4000ee04: 81 e8 00 00 restore <== NOT EXECUTED */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 4000ee08: 90 07 bf f8 add %fp, -8, %o0 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4000ee0c: 82 08 70 00 and %g1, -4096, %g1 IMFS_update_ctime( jnode ); 4000ee10: 92 10 20 00 clr %o1 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4000ee14: b2 0e 6f ff and %i1, 0xfff, %i1 4000ee18: b2 16 40 01 or %i1, %g1, %i1 IMFS_update_ctime( jnode ); 4000ee1c: 7f ff f4 5c call 4000bf8c 4000ee20: f2 34 20 2e sth %i1, [ %l0 + 0x2e ] 4000ee24: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000ee28: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000ee2c: 81 c7 e0 08 ret 4000ee30: 91 e8 20 00 restore %g0, 0, %o0 4000b668 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000b668: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000b66c: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000b670: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000b674: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000b678: 40 00 0b ef call 4000e634 <== NOT EXECUTED 4000b67c: 90 04 60 50 add %l1, 0x50, %o0 <== NOT EXECUTED if (! err) { 4000b680: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000b684: 02 80 00 06 be 4000b69c <== NOT EXECUTED 4000b688: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 4000b68c: 06 80 00 14 bl 4000b6dc <== NOT EXECUTED 4000b690: 01 00 00 00 nop <== NOT EXECUTED } 4000b694: 81 c7 e0 08 ret <== NOT EXECUTED 4000b698: 81 e8 00 00 restore <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 4000b69c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 4000b6a0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 4000b6a4: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 4000b6a8: 40 00 02 72 call 4000c070 <== NOT EXECUTED 4000b6ac: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED 4000b6b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b6b4: 12 80 00 08 bne 4000b6d4 <== NOT EXECUTED 4000b6b8: 01 00 00 00 nop <== NOT EXECUTED 4000b6bc: c2 14 60 30 lduh [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 4000b6c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b6c4: 12 80 00 04 bne 4000b6d4 <== NOT EXECUTED 4000b6c8: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 4000b6cc: 40 00 01 b6 call 4000bda4 <== NOT EXECUTED 4000b6d0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b6d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b6d8: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000b6dc: 40 00 14 63 call 40010868 <__errno> <== NOT EXECUTED 4000b6e0: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000b6e4: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000b6e8: 81 c7 e0 08 ret <== NOT EXECUTED 4000b6ec: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b504 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000b504: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 4000b508: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED 4000b50c: 82 10 62 7e or %g1, 0x27e, %g1 ! 8004667e <== NOT EXECUTED 4000b510: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000b514: 02 80 00 0c be 4000b544 <== NOT EXECUTED 4000b518: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 4000b51c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 4000b520: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b524: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000b528: 40 00 0b 34 call 4000e1f8 <== NOT EXECUTED 4000b52c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000b530: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000b534: 06 80 00 13 bl 4000b580 <== NOT EXECUTED 4000b538: b2 20 00 18 neg %i0, %i1 <== NOT EXECUTED } 4000b53c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b540: 81 e8 00 00 restore <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 4000b544: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000b548: 02 80 00 0e be 4000b580 <== NOT EXECUTED 4000b54c: b2 10 20 0e mov 0xe, %i1 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 4000b550: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000b554: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b558: 02 80 00 06 be 4000b570 <== NOT EXECUTED 4000b55c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 4000b560: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 4000b564: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000b568: 81 c7 e0 08 ret <== NOT EXECUTED 4000b56c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000b570: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000b574: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000b578: 81 c7 e0 08 ret <== NOT EXECUTED 4000b57c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4000b580: 40 00 14 ba call 40010868 <__errno> <== NOT EXECUTED 4000b584: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b588: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED } 4000b58c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b590: 81 e8 00 00 restore <== NOT EXECUTED 4000b4a8 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4000b4a8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000b4ac: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4000b4b0: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000b4b4: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000b4b8: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 4000b4bc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b4c0: 40 00 0b 30 call 4000e180 <== NOT EXECUTED 4000b4c4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000b4c8: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 4000b4cc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000b4d0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000b4d4: 06 80 00 05 bl 4000b4e8 <== NOT EXECUTED 4000b4d8: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED } 4000b4dc: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 4000b4e0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b4e4: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 4000b4e8: 40 00 14 e0 call 40010868 <__errno> <== NOT EXECUTED 4000b4ec: a0 20 00 10 neg %l0 <== NOT EXECUTED 4000b4f0: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 4000b4f4: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 4000b4f8: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 4000b4fc: 10 bf ff f8 b 4000b4dc <== NOT EXECUTED 4000b500: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 4000b6f0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000b6f0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4000b6f4: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000b6f8: 92 10 00 18 mov %i0, %o1 IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4000b6fc: 40 00 0c 20 call 4000e77c 4000b700: 90 02 20 50 add %o0, 0x50, %o0 IMFS_FIFO_RETURN(err); 4000b704: b0 92 20 00 orcc %o0, 0, %i0 4000b708: 06 80 00 04 bl 4000b718 4000b70c: 01 00 00 00 nop } 4000b710: 81 c7 e0 08 ret <== NOT EXECUTED 4000b714: 81 e8 00 00 restore <== NOT EXECUTED ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 4000b718: 40 00 14 54 call 40010868 <__errno> 4000b71c: b0 20 00 18 neg %i0 4000b720: f0 22 00 00 st %i0, [ %o0 ] } 4000b724: 81 c7 e0 08 ret 4000b728: 91 e8 3f ff restore %g0, -1, %o0 4000b600 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000b600: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000b604: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000b608: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 4000b60c: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000b610: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b614: 40 00 0b 12 call 4000e25c <== NOT EXECUTED 4000b618: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 4000b61c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000b620: 04 80 00 08 ble 4000b640 <== NOT EXECUTED 4000b624: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 4000b628: 40 00 02 59 call 4000bf8c <== NOT EXECUTED 4000b62c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000b630: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000b634: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED 4000b638: 81 c7 e0 08 ret <== NOT EXECUTED 4000b63c: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000b640: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000b644: 12 80 00 04 bne 4000b654 <== NOT EXECUTED 4000b648: 01 00 00 00 nop <== NOT EXECUTED } 4000b64c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b650: 81 e8 00 00 restore <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 4000b654: 40 00 14 85 call 40010868 <__errno> <== NOT EXECUTED 4000b658: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000b65c: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000b660: 81 c7 e0 08 ret <== NOT EXECUTED 4000b664: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b594 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000b594: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000b598: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000b59c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 4000b5a0: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000b5a4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b5a8: 40 00 0b 9c call 4000e418 <== NOT EXECUTED 4000b5ac: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 4000b5b0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000b5b4: 04 80 00 09 ble 4000b5d8 <== NOT EXECUTED 4000b5b8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 4000b5bc: 40 00 02 74 call 4000bf8c <== NOT EXECUTED 4000b5c0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000b5c4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000b5c8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4000b5cc: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 4000b5d0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b5d4: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000b5d8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000b5dc: 12 80 00 04 bne 4000b5ec <== NOT EXECUTED 4000b5e0: 01 00 00 00 nop <== NOT EXECUTED } 4000b5e4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b5e8: 81 e8 00 00 restore <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 4000b5ec: 40 00 14 9f call 40010868 <__errno> <== NOT EXECUTED 4000b5f0: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000b5f4: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000b5f8: 81 c7 e0 08 ret <== NOT EXECUTED 4000b5fc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b72c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000b72c: 9d e3 bf a0 save %sp, -96, %sp /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000b730: 80 a6 20 00 cmp %i0, 0 4000b734: 02 80 00 26 be 4000b7cc 4000b738: 80 a6 60 00 cmp %i1, 0 if ( !name ) 4000b73c: 02 80 00 11 be 4000b780 4000b740: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000b744: 13 10 00 75 sethi %hi(0x4001d400), %o1 4000b748: 40 00 17 ae call 40011600 4000b74c: 92 12 61 20 or %o1, 0x120, %o1 ! 4001d520 4000b750: 80 a2 20 00 cmp %o0, 0 4000b754: 02 80 00 09 be 4000b778 4000b758: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000b75c: 13 10 00 75 sethi %hi(0x4001d400), %o1 4000b760: 40 00 17 a8 call 40011600 4000b764: 92 12 61 28 or %o1, 0x128, %o1 ! 4001d528 4000b768: 80 a2 20 00 cmp %o0, 0 4000b76c: 32 80 00 07 bne,a 4000b788 4000b770: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 return directory->Parent; 4000b774: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b778: 81 c7 e0 08 ret <== NOT EXECUTED 4000b77c: 81 e8 00 00 restore <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000b780: 81 c7 e0 08 ret 4000b784: 91 e8 20 00 restore %g0, 0, %o0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000b788: b0 06 20 54 add %i0, 0x54, %i0 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 4000b78c: 80 a4 00 18 cmp %l0, %i0 4000b790: 12 80 00 07 bne 4000b7ac 4000b794: 90 10 00 19 mov %i1, %o0 4000b798: 81 c7 e0 08 ret 4000b79c: 91 e8 20 00 restore %g0, 0, %o0 4000b7a0: 80 a4 00 18 cmp %l0, %i0 4000b7a4: 02 bf ff f7 be 4000b780 4000b7a8: 90 10 00 19 mov %i1, %o0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 4000b7ac: 40 00 17 95 call 40011600 4000b7b0: 92 04 20 0c add %l0, 0xc, %o1 4000b7b4: 80 a2 20 00 cmp %o0, 0 4000b7b8: 32 bf ff fa bne,a 4000b7a0 4000b7bc: e0 04 00 00 ld [ %l0 ], %l0 4000b7c0: b0 10 00 10 mov %l0, %i0 4000b7c4: 81 c7 e0 08 ret 4000b7c8: 81 e8 00 00 restore /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000b7cc: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 4000b7d0: 15 10 00 75 sethi %hi(0x4001d400), %o2 <== NOT EXECUTED 4000b7d4: 17 10 00 75 sethi %hi(0x4001d400), %o3 <== NOT EXECUTED 4000b7d8: 90 12 20 c0 or %o0, 0xc0, %o0 <== NOT EXECUTED 4000b7dc: 94 12 a1 30 or %o2, 0x130, %o2 <== NOT EXECUTED 4000b7e0: 96 12 e1 10 or %o3, 0x110, %o3 <== NOT EXECUTED 4000b7e4: 7f ff de 19 call 40003048 <__assert_func> <== NOT EXECUTED 4000b7e8: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED 4000b7ec: 01 00 00 00 nop 400113d0 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 400113d0: 9d e3 bf 88 save %sp, -120, %sp * 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; 400113d4: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 400113d8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 400113dc: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 400113e0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 /* * 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; 400113e4: e4 06 20 1c ld [ %i0 + 0x1c ], %l2 loc = temp_mt_entry->mt_fs_root; 400113e8: c8 27 bf f0 st %g4, [ %fp + -16 ] 400113ec: c6 27 bf f4 st %g3, [ %fp + -12 ] 400113f0: c4 27 bf f8 st %g2, [ %fp + -8 ] 400113f4: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 400113f8: c0 26 20 1c clr [ %i0 + 0x1c ] 400113fc: a0 07 bf ec add %fp, -20, %l0 do { next = jnode->Parent; loc.node_access = (void *)jnode; 40011400: e4 27 bf ec st %l2, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 40011404: e2 04 a0 08 ld [ %l2 + 8 ], %l1 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40011408: 7f ff fd 02 call 40010810 4001140c: 90 10 00 10 mov %l0, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 40011410: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40011414: 80 a0 60 01 cmp %g1, 1 40011418: 12 80 00 17 bne 40011474 4001141c: 84 04 a0 54 add %l2, 0x54, %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40011420: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 40011424: 80 a0 40 02 cmp %g1, %g2 40011428: 22 80 00 14 be,a 40011478 4001142c: 90 10 20 00 clr %o0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 40011430: 80 a4 a0 00 cmp %l2, 0 40011434: 02 80 00 0e be 4001146c 40011438: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 4001143c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40011440: 80 a0 60 01 cmp %g1, 1 40011444: 32 bf ff f0 bne,a 40011404 40011448: e4 27 bf ec st %l2, [ %fp + -20 ] <== NOT EXECUTED 4001144c: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 40011450: 84 04 a0 54 add %l2, 0x54, %g2 40011454: 80 a0 40 02 cmp %g1, %g2 40011458: 22 bf ff eb be,a 40011404 4001145c: e4 27 bf ec st %l2, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 40011460: a4 90 60 00 orcc %g1, 0, %l2 40011464: 32 bf ff e8 bne,a 40011404 40011468: e4 27 bf ec st %l2, [ %fp + -20 ] return 0; } 4001146c: 81 c7 e0 08 ret 40011470: 91 e8 20 00 restore %g0, 0, %o0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 40011474: 90 10 20 00 clr %o0 40011478: 7f ff cc 43 call 40004584 4001147c: 92 10 00 10 mov %l0, %o1 if (result != 0) 40011480: 80 a2 20 00 cmp %o0, 0 40011484: 02 bf ff eb be 40011430 40011488: a4 10 00 11 mov %l1, %l2 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4001148c: 81 c7 e0 08 ret <== NOT EXECUTED 40011490: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b7f0 : const char *path, int pathlen, char *token, int *token_len ) { 4000b7f0: 9d e3 bf a0 save %sp, -96, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4000b7f4: c2 0e 00 00 ldub [ %i0 ], %g1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4000b7f8: 87 28 60 18 sll %g1, 0x18, %g3 4000b7fc: 85 38 e0 18 sra %g3, 0x18, %g2 4000b800: 80 a0 a0 2f cmp %g2, 0x2f 4000b804: 02 80 00 34 be 4000b8d4 4000b808: 80 a0 a0 5c cmp %g2, 0x5c 4000b80c: 02 80 00 32 be 4000b8d4 4000b810: 80 a0 00 02 cmp %g0, %g2 4000b814: 84 40 20 00 addx %g0, 0, %g2 4000b818: 80 a6 60 00 cmp %i1, 0 4000b81c: 04 80 00 30 ble 4000b8dc 4000b820: 86 08 a0 ff and %g2, 0xff, %g3 4000b824: 86 88 a0 ff andcc %g2, 0xff, %g3 4000b828: 02 80 00 2e be 4000b8e0 4000b82c: 80 a0 e0 00 cmp %g3, 0 token[i] = c; 4000b830: c2 2e 80 00 stb %g1, [ %i2 ] 4000b834: 82 10 20 00 clr %g1 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4000b838: 82 00 60 01 inc %g1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4000b83c: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 4000b840: 80 a0 a0 5c cmp %g2, 0x5c 4000b844: 02 80 00 07 be 4000b860 4000b848: c6 0e 00 01 ldub [ %i0 + %g1 ], %g3 4000b84c: 80 a0 a0 2f cmp %g2, 0x2f 4000b850: 02 80 00 04 be 4000b860 4000b854: 80 a6 40 01 cmp %i1, %g1 4000b858: 14 80 00 18 bg 4000b8b8 4000b85c: 80 a0 a0 00 cmp %g2, 0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4000b860: 84 06 80 01 add %i2, %g1, %g2 4000b864: c4 48 bf ff ldsb [ %g2 + -1 ], %g2 4000b868: 80 a0 a0 00 cmp %g2, 0 4000b86c: 32 80 00 02 bne,a 4000b874 4000b870: c0 2e 80 01 clrb [ %i2 + %g1 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 4000b874: c2 26 c0 00 st %g1, [ %i3 ] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4000b878: 90 10 00 1a mov %i2, %o0 4000b87c: 13 10 00 75 sethi %hi(0x4001d400), %o1 4000b880: b0 10 20 02 mov 2, %i0 4000b884: 40 00 17 5f call 40011600 4000b888: 92 12 61 50 or %o1, 0x150, %o1 4000b88c: 80 a2 20 00 cmp %o0, 0 4000b890: 02 80 00 19 be 4000b8f4 4000b894: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4000b898: 13 10 00 75 sethi %hi(0x4001d400), %o1 4000b89c: 40 00 17 59 call 40011600 4000b8a0: 92 12 61 48 or %o1, 0x148, %o1 ! 4001d548 <__FUNCTION__.5457+0x18> 4000b8a4: 80 a0 00 08 cmp %g0, %o0 4000b8a8: b0 60 20 00 subx %g0, 0, %i0 4000b8ac: b0 0e 20 02 and %i0, 2, %i0 type = IMFS_CURRENT_DIR; } return type; } 4000b8b0: 81 c7 e0 08 ret 4000b8b4: 91 ee 20 01 restore %i0, 1, %o0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4000b8b8: 22 bf ff eb be,a 4000b864 4000b8bc: 84 06 80 01 add %i2, %g1, %g2 <== NOT EXECUTED token[i] = c; if ( i == IMFS_NAME_MAX ) 4000b8c0: 80 a0 60 20 cmp %g1, 0x20 4000b8c4: 12 bf ff dd bne 4000b838 4000b8c8: c6 2e 80 01 stb %g3, [ %i2 + %g1 ] 4000b8cc: 81 c7 e0 08 ret 4000b8d0: 91 e8 20 04 restore %g0, 4, %o0 4000b8d4: 80 a0 00 03 cmp %g0, %g3 4000b8d8: 86 40 20 00 addx %g0, 0, %g3 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4000b8dc: 80 a0 e0 00 cmp %g3, 0 4000b8e0: 12 80 00 07 bne 4000b8fc 4000b8e4: c2 2e 80 00 stb %g1, [ %i2 ] type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4000b8e8: b0 10 20 00 clr %i0 4000b8ec: 82 10 20 00 clr %g1 /* * Set token_len to the number of characters copied. */ *token_len = i; 4000b8f0: c2 26 c0 00 st %g1, [ %i3 ] 4000b8f4: 81 c7 e0 08 ret 4000b8f8: 81 e8 00 00 restore */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4000b8fc: 80 a6 60 00 cmp %i1, 0 4000b900: b0 10 20 01 mov 1, %i0 4000b904: 12 bf ff fb bne 4000b8f0 4000b908: 82 10 20 01 mov 1, %g1 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4000b90c: 10 bf ff f8 b 4000b8ec 4000b910: b0 10 20 00 clr %i0 4000b914 : 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 ) { 4000b914: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 4000b918: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000b91c: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001e128 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4000b920: 80 a0 60 10 cmp %g1, 0x10 4000b924: 02 80 00 0a be 4000b94c 4000b928: 86 10 20 00 clr %g3 4000b92c: 84 10 20 20 mov 0x20, %g2 4000b930: 80 a0 40 02 cmp %g1, %g2 4000b934: 02 80 00 06 be 4000b94c 4000b938: 86 00 e0 01 inc %g3 4000b93c: 80 a0 e0 05 cmp %g3, 5 4000b940: 12 bf ff fc bne 4000b930 4000b944: 85 28 a0 01 sll %g2, 1, %g2 4000b948: 82 10 20 80 mov 0x80, %g1 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4000b94c: 05 10 00 7a sethi %hi(0x4001e800), %g2 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 4000b950: 40 00 0c c5 call 4000ec64 4000b954: c2 20 a0 fc st %g1, [ %g2 + 0xfc ] ! 4001e8fc 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; 4000b958: 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_root_node(); 4000b95c: d0 26 20 1c st %o0, [ %i0 + 0x1c ] temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 4000b960: f2 26 20 28 st %i1, [ %i0 + 0x28 ] * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4000b964: f6 26 20 24 st %i3, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4000b968: 13 10 00 76 sethi %hi(0x4001d800), %o1 4000b96c: 90 06 20 38 add %i0, 0x38, %o0 4000b970: 40 00 15 f9 call 40011154 4000b974: 92 12 60 a4 or %o1, 0xa4, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000b978: 90 10 20 01 mov 1, %o0 4000b97c: 40 00 00 c5 call 4000bc90 4000b980: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ) { 4000b984: 80 a2 20 00 cmp %o0, 0 4000b988: 02 80 00 0c be 4000b9b8 4000b98c: 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; 4000b990: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000b994: 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; 4000b998: d0 26 20 34 st %o0, [ %i0 + 0x34 ] * 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; 4000b99c: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000b9a0: 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; 4000b9a4: f4 22 20 04 st %i2, [ %o0 + 4 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 4000b9a8: 40 00 09 f8 call 4000e188 4000b9ac: b0 10 20 00 clr %i0 return 0; } 4000b9b0: 81 c7 e0 08 ret 4000b9b4: 81 e8 00 00 restore /* * 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); 4000b9b8: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 <== NOT EXECUTED 4000b9bc: 40 00 00 fa call 4000bda4 <== NOT EXECUTED 4000b9c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000b9c4: 40 00 13 a9 call 40010868 <__errno> <== NOT EXECUTED 4000b9c8: 01 00 00 00 nop <== NOT EXECUTED 4000b9cc: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000b9d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b9d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b9d8: 81 e8 00 00 restore <== NOT EXECUTED 400041d0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 400041d0: 9d e3 bf 50 save %sp, -176, %sp int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 400041d4: c2 06 00 00 ld [ %i0 ], %g1 400041d8: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 400041dc: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 400041e0: 80 a0 60 07 cmp %g1, 7 400041e4: 18 80 00 1f bgu 40004260 400041e8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 400041ec: 40 00 4c fd call 400175e0 400041f0: 90 10 00 1a mov %i2, %o0 400041f4: a0 07 bf b0 add %fp, -80, %l0 400041f8: 92 10 00 08 mov %o0, %o1 400041fc: 96 07 bf fc add %fp, -4, %o3 40004200: 94 10 00 10 mov %l0, %o2 40004204: 40 00 34 d5 call 40011558 40004208: 90 10 00 1a mov %i2, %o0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 4000420c: 90 10 00 19 mov %i1, %o0 40004210: 94 10 00 10 mov %l0, %o2 40004214: 92 10 20 03 mov 3, %o1 40004218: 17 00 00 28 sethi %hi(0xa000), %o3 4000421c: 98 07 bf d8 add %fp, -40, %o4 40004220: 40 00 31 2d call 400106d4 40004224: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40004228: 80 a2 20 00 cmp %o0, 0 4000422c: 02 80 00 13 be 40004278 40004230: c2 07 bf d8 ld [ %fp + -40 ], %g1 /* * 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 ); 40004234: 90 07 bf f4 add %fp, -12, %o0 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40004238: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 4000423c: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40004240: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 40004244: 40 00 02 de call 40004dbc 40004248: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] 4000424c: c4 07 bf f4 ld [ %fp + -12 ], %g2 40004250: c2 07 bf d8 ld [ %fp + -40 ], %g1 40004254: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40004258: 81 c7 e0 08 ret 4000425c: 91 e8 20 00 restore %g0, 0, %o0 /* * 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 ); 40004260: 40 00 49 42 call 40016768 <__errno> 40004264: b0 10 3f ff mov -1, %i0 40004268: 82 10 20 1f mov 0x1f, %g1 4000426c: c2 22 00 00 st %g1, [ %o0 ] 40004270: 81 c7 e0 08 ret 40004274: 81 e8 00 00 restore ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 40004278: 40 00 49 3c call 40016768 <__errno> <== NOT EXECUTED 4000427c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004280: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004284: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004288: 81 c7 e0 08 ret <== NOT EXECUTED 4000428c: 81 e8 00 00 restore <== NOT EXECUTED 4001455c : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4001455c: 9d e3 bf a0 save %sp, -96, %sp block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 40014560: 80 a6 20 00 cmp %i0, 0 40014564: 02 80 00 18 be 400145c4 40014568: 11 10 00 8f sethi %hi(0x40023c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001456c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40014570: 80 a0 60 05 cmp %g1, 5 40014574: 12 80 00 1b bne 400145e0 40014578: 90 10 00 18 mov %i0, %o0 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 ); 4001457c: 92 10 00 19 mov %i1, %o1 40014580: 7f ff fe 64 call 40013f10 40014584: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 40014588: c2 02 00 00 ld [ %o0 ], %g1 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 ); 4001458c: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 40014590: 80 a0 60 00 cmp %g1, 0 40014594: 02 80 00 04 be 400145a4 40014598: b0 10 20 00 clr %i0 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 4001459c: 81 c7 e0 08 ret 400145a0: 81 e8 00 00 restore #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 400145a4: 7f ff fe 4e call 40013edc 400145a8: b0 10 20 01 mov 1, %i0 if ( !memory ) 400145ac: 80 a2 20 00 cmp %o0, 0 400145b0: 02 bf ff fb be 4001459c 400145b4: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 400145b8: d0 24 00 00 st %o0, [ %l0 ] return 0; } 400145bc: 81 c7 e0 08 ret 400145c0: 91 e8 20 00 restore %g0, 0, %o0 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 400145c4: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 400145c8: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 400145cc: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 400145d0: 94 12 a3 80 or %o2, 0x380, %o2 <== NOT EXECUTED 400145d4: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 400145d8: 7f ff c0 95 call 4000482c <__assert_func> <== NOT EXECUTED 400145dc: 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 ); 400145e0: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 400145e4: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 400145e8: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 400145ec: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 400145f0: 94 12 a3 80 or %o2, 0x380, %o2 <== NOT EXECUTED 400145f4: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 400145f8: 7f ff c0 8d call 4000482c <__assert_func> <== NOT EXECUTED 400145fc: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 40014600: 01 00 00 00 nop 40014604 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40014604: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40014608: 80 a6 20 00 cmp %i0, 0 4001460c: 02 80 00 5e be 40014784 40014610: 11 10 00 8f sethi %hi(0x40023c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40014614: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40014618: 80 a0 60 05 cmp %g1, 5 4001461c: 12 80 00 53 bne 40014768 40014620: 03 10 00 93 sethi %hi(0x40024c00), %g1 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 40014624: e2 00 62 94 ld [ %g1 + 0x294 ], %l1 ! 40024e94 40014628: a1 34 60 02 srl %l1, 2, %l0 4001462c: 92 10 00 10 mov %l0, %o1 40014630: 40 00 2d 8c call 4001fc60 <.umul> 40014634: 90 04 20 01 add %l0, 1, %o0 40014638: 92 10 00 10 mov %l0, %o1 4001463c: 40 00 2d 89 call 4001fc60 <.umul> 40014640: 90 02 20 01 inc %o0 40014644: 92 10 00 11 mov %l1, %o1 40014648: 40 00 2d 86 call 4001fc60 <.umul> 4001464c: 90 02 3f ff add %o0, -1, %o0 40014650: 82 10 20 00 clr %g1 40014654: 80 a0 40 19 cmp %g1, %i1 40014658: 34 80 00 0e bg,a 40014690 4001465c: e4 06 20 50 ld [ %i0 + 0x50 ], %l2 <== NOT EXECUTED 40014660: 80 a0 40 19 cmp %g1, %i1 40014664: 02 80 00 08 be 40014684 40014668: 80 a2 00 1a cmp %o0, %i2 rtems_set_errno_and_return_minus_one( EINVAL ); 4001466c: 40 00 08 3f call 40016768 <__errno> <== NOT EXECUTED 40014670: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40014674: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40014678: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001467c: 81 c7 e0 08 ret <== NOT EXECUTED 40014680: 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 ) 40014684: 08 bf ff fa bleu 4001466c 40014688: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 4001468c: e4 06 20 50 ld [ %i0 + 0x50 ], %l2 40014690: 80 a6 40 12 cmp %i1, %l2 40014694: 04 80 00 2a ble 4001473c 40014698: e8 06 20 54 ld [ %i0 + 0x54 ], %l4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001469c: a7 3c 60 1f sra %l1, 0x1f, %l3 <== NOT EXECUTED 400146a0: 96 10 00 11 mov %l1, %o3 400146a4: 94 10 00 13 mov %l3, %o2 400146a8: 90 10 00 19 mov %i1, %o0 400146ac: 40 00 2f 32 call 40020374 <__divdi3> 400146b0: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 400146b4: 90 10 00 12 mov %l2, %o0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 400146b8: a0 10 00 09 mov %o1, %l0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 400146bc: 94 10 00 13 mov %l3, %o2 400146c0: 92 10 00 14 mov %l4, %o1 400146c4: 40 00 2f 2c call 40020374 <__divdi3> 400146c8: 96 10 00 11 mov %l1, %o3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 400146cc: 80 a4 00 09 cmp %l0, %o1 400146d0: 0a 80 00 1f bcs 4001474c 400146d4: a4 10 00 09 mov %o1, %l2 400146d8: 10 80 00 05 b 400146ec 400146dc: a2 10 00 09 mov %o1, %l1 400146e0: 80 a4 00 11 cmp %l0, %l1 400146e4: 2a 80 00 1b bcs,a 40014750 400146e8: f4 26 20 54 st %i2, [ %i0 + 0x54 ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 400146ec: 90 10 00 18 mov %i0, %o0 400146f0: 7f ff ff 9b call 4001455c 400146f4: 92 10 00 11 mov %l1, %o1 400146f8: 80 a2 20 00 cmp %o0, 0 400146fc: 22 bf ff f9 be,a 400146e0 40014700: a2 04 60 01 inc %l1 for ( ; block>=old_blocks ; block-- ) { 40014704: 10 80 00 06 b 4001471c <== NOT EXECUTED 40014708: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4001470c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40014710: 7f ff fe d0 call 40014250 <== NOT EXECUTED 40014714: a2 04 7f ff add %l1, -1, %l1 <== 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-- ) { 40014718: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 4001471c: 08 bf ff fc bleu 4001470c <== NOT EXECUTED 40014720: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 40014724: 40 00 08 11 call 40016768 <__errno> <== NOT EXECUTED 40014728: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001472c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40014730: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014734: 81 c7 e0 08 ret <== NOT EXECUTED 40014738: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 4001473c: 02 80 00 08 be 4001475c 40014740: 80 a6 80 14 cmp %i2, %l4 40014744: 81 c7 e0 08 ret 40014748: 91 e8 20 00 restore %g0, 0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4001474c: f4 26 20 54 st %i2, [ %i0 + 0x54 ] <== NOT EXECUTED 40014750: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 40014754: 81 c7 e0 08 ret 40014758: 91 e8 20 00 restore %g0, 0, %o0 rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 4001475c: 18 bf ff d1 bgu 400146a0 40014760: a7 3c 60 1f sra %l1, 0x1f, %l3 40014764: 30 bf ff f8 b,a 40014744 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40014768: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 4001476c: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014770: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014774: 94 12 a3 98 or %o2, 0x398, %o2 <== NOT EXECUTED 40014778: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 4001477c: 7f ff c0 2c call 4000482c <__assert_func> <== NOT EXECUTED 40014780: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40014784: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014788: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 4001478c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014790: 94 12 a3 98 or %o2, 0x398, %o2 <== NOT EXECUTED 40014794: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 40014798: 7f ff c0 25 call 4000482c <__assert_func> <== NOT EXECUTED 4001479c: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED 400147a0: 01 00 00 00 nop 40013f10 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40013f10: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013f14: 80 a6 20 00 cmp %i0, 0 40013f18: 02 80 00 91 be 4001415c 40013f1c: 11 10 00 8f sethi %hi(0x40023c00), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40013f20: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013f24: 80 a0 60 05 cmp %g1, 5 40013f28: 12 80 00 94 bne 40014178 40013f2c: 03 10 00 93 sethi %hi(0x40024c00), %g1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40013f30: e0 00 62 94 ld [ %g1 + 0x294 ], %l0 ! 40024e94 40013f34: a1 34 20 02 srl %l0, 2, %l0 40013f38: 82 04 3f ff add %l0, -1, %g1 40013f3c: 80 a6 40 01 cmp %i1, %g1 40013f40: 08 80 00 20 bleu 40013fc0 40013f44: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40013f48: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED 40013f4c: 40 00 2f 45 call 4001fc60 <.umul> <== NOT EXECUTED 40013f50: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40013f54: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 40013f58: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40013f5c: 18 80 00 21 bgu 40013fe0 <== NOT EXECUTED 40013f60: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40013f64: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40013f68: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40013f6c: 40 00 30 23 call 4001fff8 <.urem> <== NOT EXECUTED 40013f70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40013f74: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40013f78: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40013f7c: 40 00 2f 73 call 4001fd48 <.udiv> <== NOT EXECUTED 40013f80: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40013f84: 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; 40013f88: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40013f8c: 02 80 00 42 be 40014094 <== NOT EXECUTED 40013f90: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 40013f94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40013f98: 02 80 00 5e be 40014110 <== NOT EXECUTED 40013f9c: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 40013fa0: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40013fa4: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 40013fa8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40013fac: 02 80 00 52 be 400140f4 <== NOT EXECUTED 40013fb0: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 40013fb4: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40013fb8: 81 c7 e0 08 ret <== NOT EXECUTED 40013fbc: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40013fc0: 02 80 00 40 be 400140c0 40013fc4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 if ( !p ) { 40013fc8: 80 a2 20 00 cmp %o0, 0 40013fcc: 02 80 00 43 be 400140d8 40013fd0: 01 00 00 00 nop p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 40013fd4: b3 2e 60 02 sll %i1, 2, %i1 40013fd8: 81 c7 e0 08 ret 40013fdc: 91 ea 00 19 restore %o0, %i1, %o0 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 40013fe0: 90 02 20 01 inc %o0 <== NOT EXECUTED 40013fe4: 40 00 2f 1f call 4001fc60 <.umul> <== NOT EXECUTED 40013fe8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40013fec: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40013ff0: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40013ff4: 18 80 00 31 bgu 400140b8 <== NOT EXECUTED 40013ff8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 40013ffc: a2 26 40 11 sub %i1, %l1, %l1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40014000: 40 00 2f fe call 4001fff8 <.urem> <== NOT EXECUTED 40014004: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40014008: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001400c: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40014010: 40 00 2f 4e call 4001fd48 <.udiv> <== NOT EXECUTED 40014014: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40014018: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001401c: 40 00 2f 4b call 4001fd48 <.udiv> <== NOT EXECUTED 40014020: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40014024: 92 10 00 10 mov %l0, %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; 40014028: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 4001402c: 40 00 2f f3 call 4001fff8 <.urem> <== NOT EXECUTED 40014030: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40014034: 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; 40014038: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 4001403c: 02 80 00 3c be 4001412c <== NOT EXECUTED 40014040: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 40014044: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40014048: 02 80 00 53 be 40014194 <== NOT EXECUTED 4001404c: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 40014050: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40014054: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 40014058: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001405c: 02 80 00 55 be 400141b0 <== NOT EXECUTED 40014060: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 40014064: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40014068: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 4001406c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014070: 12 bf ff d9 bne 40013fd4 <== NOT EXECUTED 40014074: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40014078: 7f ff ff 99 call 40013edc <== NOT EXECUTED 4001407c: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40014080: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014084: 22 80 00 13 be,a 400140d0 <== NOT EXECUTED 40014088: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4001408c: 10 bf ff d2 b 40013fd4 <== NOT EXECUTED 40014090: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 40014094: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40014098: 02 80 00 0e be 400140d0 <== NOT EXECUTED 4001409c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 400140a0: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 400140a4: c2 00 40 10 ld [ %g1 + %l0 ], %g1 <== 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 ]; 400140a8: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 400140ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400140b0: 12 80 00 08 bne 400140d0 <== NOT EXECUTED 400140b4: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 400140b8: 81 c7 e0 08 ret <== NOT EXECUTED 400140bc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 400140c0: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 400140c4: 80 a2 20 00 cmp %o0, 0 400140c8: 02 bf ff fc be 400140b8 400140cc: b0 02 00 19 add %o0, %i1, %i0 /* * This means the requested block number is out of range. */ return 0; } 400140d0: 81 c7 e0 08 ret 400140d4: 81 e8 00 00 restore p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 400140d8: 7f ff ff 81 call 40013edc 400140dc: 01 00 00 00 nop if ( !p ) 400140e0: 80 a2 20 00 cmp %o0, 0 400140e4: 22 bf ff fb be,a 400140d0 400140e8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 400140ec: 10 bf ff ba b 40013fd4 400140f0: d0 26 20 58 st %o0, [ %i0 + 0x58 ] info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 400140f4: 7f ff ff 7a call 40013edc <== NOT EXECUTED 400140f8: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 400140fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014100: 22 bf ff f4 be,a 400140d0 <== NOT EXECUTED 40014104: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40014108: 10 bf ff ab b 40013fb4 <== NOT EXECUTED 4001410c: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40014110: 7f ff ff 73 call 40013edc <== NOT EXECUTED 40014114: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40014118: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4001411c: 22 bf ff ed be,a 400140d0 <== NOT EXECUTED 40014120: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40014124: 10 bf ff 9f b 40013fa0 <== NOT EXECUTED 40014128: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 4001412c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40014130: 02 bf ff e8 be 400140d0 <== NOT EXECUTED 40014134: b0 10 20 00 clr %i0 <== 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 ]; 40014138: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 4001413c: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 40014140: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40014144: 02 bf ff e3 be 400140d0 <== NOT EXECUTED 40014148: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 4001414c: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 40014150: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 40014154: 81 c7 e0 08 ret <== NOT EXECUTED 40014158: 91 ee 00 19 restore %i0, %i1, %o0 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001415c: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014160: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014164: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014168: 94 12 a2 d8 or %o2, 0x2d8, %o2 <== NOT EXECUTED 4001416c: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 40014170: 7f ff c1 af call 4000482c <__assert_func> <== NOT EXECUTED 40014174: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40014178: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 4001417c: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014180: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014184: 94 12 a2 d8 or %o2, 0x2d8, %o2 <== NOT EXECUTED 40014188: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 4001418c: 7f ff c1 a8 call 4000482c <__assert_func> <== NOT EXECUTED 40014190: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40014194: 7f ff ff 52 call 40013edc <== NOT EXECUTED 40014198: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 4001419c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400141a0: 22 bf ff cc be,a 400140d0 <== NOT EXECUTED 400141a4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 400141a8: 10 bf ff aa b 40014050 <== NOT EXECUTED 400141ac: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 400141b0: 7f ff ff 4b call 40013edc <== NOT EXECUTED 400141b4: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 400141b8: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 400141bc: 22 bf ff c5 be,a 400140d0 <== NOT EXECUTED 400141c0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 400141c4: 10 bf ff a8 b 40014064 <== NOT EXECUTED 400141c8: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED 40014c4c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40014c4c: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40014c50: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40014c54: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 40014c58: 02 80 00 ae be 40014f10 40014c5c: a6 10 00 1a mov %i2, %l3 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 40014c60: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40014c64: 84 00 7f fb add %g1, -5, %g2 40014c68: 80 a0 a0 01 cmp %g2, 1 40014c6c: 18 80 00 a1 bgu 40014ef0 40014c70: 80 a6 e0 00 cmp %i3, 0 /* * Error checks on arguments */ assert( dest ); 40014c74: 02 80 00 b7 be 40014f50 40014c78: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 40014c7c: 02 80 00 87 be 40014e98 40014c80: 80 a0 60 06 cmp %g1, 6 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 40014c84: 02 80 00 5e be 40014dfc 40014c88: 86 10 20 00 clr %g3 * 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 ) 40014c8c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 /* * 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; 40014c90: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 40014c94: 80 a0 c0 02 cmp %g3, %g2 40014c98: c8 04 20 54 ld [ %l0 + 0x54 ], %g4 40014c9c: 14 80 00 56 bg 40014df4 40014ca0: 9a 07 00 1a add %i4, %i2, %o5 40014ca4: 80 a0 c0 02 cmp %g3, %g2 40014ca8: 02 80 00 51 be 40014dec 40014cac: 80 a3 40 04 cmp %o5, %g4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40014cb0: 29 10 00 93 sethi %hi(0x40024c00), %l4 40014cb4: e2 05 22 94 ld [ %l4 + 0x294 ], %l1 ! 40024e94 40014cb8: 90 10 00 12 mov %l2, %o0 40014cbc: ab 3c 60 1f sra %l1, 0x1f, %l5 40014cc0: 96 10 00 11 mov %l1, %o3 40014cc4: 94 10 00 15 mov %l5, %o2 40014cc8: 40 00 2e 92 call 40020710 <__moddi3> 40014ccc: 92 10 00 13 mov %l3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40014cd0: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40014cd4: ac 10 00 09 mov %o1, %l6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40014cd8: 94 10 00 15 mov %l5, %o2 40014cdc: 92 10 00 13 mov %l3, %o1 40014ce0: 40 00 2d a5 call 40020374 <__divdi3> 40014ce4: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40014ce8: 80 a5 a0 00 cmp %l6, 0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40014cec: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 40014cf0: aa 10 00 1b mov %i3, %l5 40014cf4: 02 80 00 14 be 40014d44 40014cf8: b0 10 20 00 clr %i0 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 ); 40014cfc: 90 10 00 10 mov %l0, %o0 40014d00: 7f ff fc 84 call 40013f10 40014d04: 94 10 20 00 clr %o2 assert( block_ptr ); 40014d08: 80 a2 20 00 cmp %o0, 0 40014d0c: 02 80 00 89 be 40014f30 40014d10: a2 24 40 16 sub %l1, %l6, %l1 */ 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; 40014d14: 80 a7 00 11 cmp %i4, %l1 40014d18: 18 80 00 4c bgu 40014e48 40014d1c: b0 10 00 1c mov %i4, %i0 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 ); 40014d20: d2 02 00 00 ld [ %o0 ], %o1 40014d24: 94 10 00 18 mov %i0, %o2 40014d28: 90 10 00 1b mov %i3, %o0 40014d2c: 40 00 08 ca call 40017054 40014d30: 92 02 40 16 add %o1, %l6, %o1 dest += to_copy; block++; my_length -= to_copy; 40014d34: e2 05 22 94 ld [ %l4 + 0x294 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; 40014d38: aa 06 c0 18 add %i3, %i0, %l5 block++; 40014d3c: a4 04 a0 01 inc %l2 my_length -= to_copy; 40014d40: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40014d44: 80 a7 00 11 cmp %i4, %l1 40014d48: 0a 80 00 15 bcs 40014d9c 40014d4c: 80 a7 20 00 cmp %i4, 0 40014d50: a8 15 22 94 or %l4, 0x294, %l4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40014d54: 90 10 00 10 mov %l0, %o0 40014d58: 92 10 00 12 mov %l2, %o1 40014d5c: 7f ff fc 6d call 40013f10 40014d60: 94 10 20 00 clr %o2 assert( block_ptr ); 40014d64: 80 a2 20 00 cmp %o0, 0 40014d68: 02 80 00 52 be 40014eb0 40014d6c: 94 10 00 11 mov %l1, %o2 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 40014d70: d2 02 00 00 ld [ %o0 ], %o1 40014d74: 40 00 08 b8 call 40017054 40014d78: 90 10 00 15 mov %l5, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40014d7c: c2 05 00 00 ld [ %l4 ], %g1 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 40014d80: b8 27 00 11 sub %i4, %l1, %i4 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; 40014d84: aa 05 40 11 add %l5, %l1, %l5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40014d88: 80 a0 40 1c cmp %g1, %i4 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 40014d8c: a4 04 a0 01 inc %l2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40014d90: 08 bf ff f1 bleu 40014d54 40014d94: b0 06 00 11 add %i0, %l1, %i0 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 40014d98: 80 a7 20 00 cmp %i4, 0 40014d9c: 02 80 00 0e be 40014dd4 40014da0: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40014da4: 92 10 00 12 mov %l2, %o1 40014da8: 90 10 00 10 mov %l0, %o0 40014dac: 7f ff fc 59 call 40013f10 40014db0: 94 10 20 00 clr %o2 assert( block_ptr ); 40014db4: 80 a2 20 00 cmp %o0, 0 40014db8: 02 80 00 46 be 40014ed0 40014dbc: b0 06 00 1c add %i0, %i4, %i0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 40014dc0: d2 02 00 00 ld [ %o0 ], %o1 40014dc4: 90 10 00 15 mov %l5, %o0 40014dc8: 40 00 08 a3 call 40017054 40014dcc: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 40014dd0: 90 07 bf f8 add %fp, -8, %o0 40014dd4: 7f ff bf fa call 40004dbc 40014dd8: 92 10 20 00 clr %o1 40014ddc: c2 07 bf f8 ld [ %fp + -8 ], %g1 40014de0: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return copied; } 40014de4: 81 c7 e0 08 ret 40014de8: 81 e8 00 00 restore * 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 ) 40014dec: 08 bf ff b2 bleu 40014cb4 40014df0: 29 10 00 93 sethi %hi(0x40024c00), %l4 my_length = the_jnode->info.file.size - start; 40014df4: 10 bf ff af b 40014cb0 40014df8: b8 21 00 01 sub %g4, %g1, %i4 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)) 40014dfc: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 40014e00: 82 10 20 00 clr %g1 <== NOT EXECUTED 40014e04: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 40014e08: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 40014e0c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40014e10: 04 80 00 10 ble 40014e50 <== NOT EXECUTED 40014e14: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 40014e18: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 40014e1c: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40014e20: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40014e24: 40 00 08 8c call 40017054 <== NOT EXECUTED 40014e28: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40014e2c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40014e30: 7f ff bf e3 call 40004dbc <== NOT EXECUTED 40014e34: 92 10 20 00 clr %o1 <== NOT EXECUTED 40014e38: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40014e3c: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 40014e40: 81 c7 e0 08 ret <== NOT EXECUTED 40014e44: 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; 40014e48: 10 bf ff b6 b 40014d20 40014e4c: b0 10 00 11 mov %l1, %i0 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)) 40014e50: 02 80 00 0d be 40014e84 <== NOT EXECUTED 40014e54: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 40014e58: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40014e5c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40014e60: 40 00 08 7d call 40017054 <== NOT EXECUTED 40014e64: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40014e68: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40014e6c: 7f ff bf d4 call 40004dbc <== NOT EXECUTED 40014e70: 92 10 20 00 clr %o1 <== NOT EXECUTED 40014e74: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40014e78: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 40014e7c: 81 c7 e0 08 ret <== NOT EXECUTED 40014e80: 81 e8 00 00 restore <== 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)) 40014e84: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 40014e88: 38 bf ff e5 bgu,a 40014e1c <== NOT EXECUTED 40014e8c: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED 40014e90: 10 bf ff f2 b 40014e58 <== NOT EXECUTED 40014e94: b0 10 00 1c mov %i4, %i0 <== 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 ); 40014e98: 40 00 06 34 call 40016768 <__errno> <== NOT EXECUTED 40014e9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40014ea0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40014ea4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014ea8: 81 c7 e0 08 ret <== NOT EXECUTED 40014eac: 81 e8 00 00 restore <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40014eb0: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014eb4: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014eb8: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014ebc: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014ec0: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED 40014ec4: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 40014ec8: 7f ff be 59 call 4000482c <__assert_func> <== NOT EXECUTED 40014ecc: 92 10 22 a7 mov 0x2a7, %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 ); 40014ed0: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014ed4: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014ed8: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014edc: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014ee0: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED 40014ee4: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 40014ee8: 7f ff be 51 call 4000482c <__assert_func> <== NOT EXECUTED 40014eec: 92 10 22 b9 mov 0x2b9, %o1 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 40014ef0: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014ef4: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014ef8: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014efc: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014f00: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED 40014f04: 96 12 e2 80 or %o3, 0x280, %o3 <== NOT EXECUTED 40014f08: 7f ff be 49 call 4000482c <__assert_func> <== NOT EXECUTED 40014f0c: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40014f10: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014f14: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014f18: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014f1c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014f20: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED 40014f24: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 40014f28: 7f ff be 41 call 4000482c <__assert_func> <== NOT EXECUTED 40014f2c: 92 10 22 4c mov 0x24c, %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 ); 40014f30: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014f34: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014f38: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014f3c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014f40: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED 40014f44: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 40014f48: 7f ff be 39 call 4000482c <__assert_func> <== NOT EXECUTED 40014f4c: 92 10 22 96 mov 0x296, %o1 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 40014f50: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014f54: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014f58: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014f5c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014f60: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED 40014f64: 96 12 e2 d0 or %o3, 0x2d0, %o3 <== NOT EXECUTED 40014f68: 7f ff be 31 call 4000482c <__assert_func> <== NOT EXECUTED 40014f6c: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED 40014f70: 01 00 00 00 nop 400142ac : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 400142ac: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400142b0: 80 a6 20 00 cmp %i0, 0 400142b4: 02 80 00 62 be 4001443c 400142b8: 11 10 00 8f sethi %hi(0x40023c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400142bc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400142c0: 80 a0 60 05 cmp %g1, 5 400142c4: 12 80 00 65 bne 40014458 400142c8: 23 10 00 93 sethi %hi(0x40024c00), %l1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400142cc: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 /* * 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; 400142d0: e6 04 62 94 ld [ %l1 + 0x294 ], %l3 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400142d4: 80 a0 60 00 cmp %g1, 0 400142d8: 02 80 00 05 be 400142ec 400142dc: a7 34 e0 02 srl %l3, 2, %l3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 400142e0: 90 06 20 58 add %i0, 0x58, %o0 400142e4: 7f ff ff ba call 400141cc 400142e8: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 400142ec: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 400142f0: 80 a0 60 00 cmp %g1, 0 400142f4: 02 80 00 1b be 40014360 400142f8: c4 04 62 94 ld [ %l1 + 0x294 ], %g2 for ( i=0 ; i <== NOT EXECUTED 40014308: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001430c: 25 10 00 93 sethi %hi(0x40024c00), %l2 <== NOT EXECUTED 40014310: a4 14 a2 94 or %l2, 0x294, %l2 ! 40024e94 <== NOT EXECUTED 40014314: 10 80 00 03 b 40014320 <== NOT EXECUTED 40014318: a0 10 20 00 clr %l0 <== NOT EXECUTED 4001431c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 40014320: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40014324: c4 00 40 08 ld [ %g1 + %o0 ], %g2 <== NOT EXECUTED 40014328: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001432c: 02 80 00 04 be 4001433c <== NOT EXECUTED 40014330: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40014334: 7f ff ff a6 call 400141cc <== NOT EXECUTED 40014338: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40014350: 90 10 00 10 mov %l0, %o0 <== 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 ); 40014354: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 40014358: 7f ff ff 9d call 400141cc <== NOT EXECUTED 4001435c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 40014360: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 40014364: 80 a2 20 00 cmp %o0, 0 40014368: 02 80 00 33 be 40014434 4001436c: c2 04 62 94 ld [ %l1 + 0x294 ], %g1 for ( i=0 ; i <== NOT EXECUTED 4001437c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 40014380: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40014384: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40014388: 22 80 00 29 be,a 4001442c <== NOT EXECUTED 4001438c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 40014390: 25 10 00 93 sethi %hi(0x40024c00), %l2 <== NOT EXECUTED 40014394: aa 10 20 00 clr %l5 <== NOT EXECUTED 40014398: a4 14 a2 94 or %l2, 0x294, %l2 <== NOT EXECUTED 4001439c: a8 10 20 00 clr %l4 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 400143a8: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 400143ac: 90 10 20 00 clr %o0 <== NOT EXECUTED 400143b0: a0 10 20 00 clr %l0 <== NOT EXECUTED if ( p[j] ) { 400143b4: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 400143b8: c2 04 40 08 ld [ %l1 + %o0 ], %g1 <== NOT EXECUTED 400143bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400143c0: 02 80 00 04 be 400143d0 <== NOT EXECUTED 400143c4: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 400143c8: 7f ff ff 81 call 400141cc <== NOT EXECUTED 400143cc: 92 10 00 13 mov %l3, %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 400143e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400143e8: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 400143ec: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 400143f0: 7f ff ff 77 call 400141cc <== NOT EXECUTED 400143f4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 4001440c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 40014410: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40014414: ab 2d 20 02 sll %l4, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 40014418: e2 02 00 15 ld [ %o0 + %l5 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4001441c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40014420: 12 bf ff e1 bne 400143a4 <== NOT EXECUTED 40014424: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 40014428: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 4001442c: 7f ff ff 68 call 400141cc <== NOT EXECUTED 40014430: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 40014434: 81 c7 e0 08 ret 40014438: 91 e8 20 00 restore %g0, 0, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 4001443c: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014440: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014444: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014448: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 4001444c: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 40014450: 7f ff c0 f7 call 4000482c <__assert_func> <== NOT EXECUTED 40014454: 92 10 21 ee mov 0x1ee, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40014458: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 4001445c: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014460: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014464: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 40014468: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 4001446c: 7f ff c0 f0 call 4000482c <__assert_func> <== NOT EXECUTED 40014470: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 40014474: 01 00 00 00 nop 40014250 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40014250: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40014254: 94 10 20 00 clr %o2 <== NOT EXECUTED 40014258: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001425c: 7f ff ff 2d call 40013f10 <== NOT EXECUTED 40014260: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 40014264: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014268: 02 80 00 08 be 40014288 <== NOT EXECUTED 4001426c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 40014270: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_ptr = 0; 40014274: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 40014278: 7f ff ff 10 call 40013eb8 <== NOT EXECUTED 4001427c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED } return 1; } 40014280: 81 c7 e0 08 ret <== NOT EXECUTED 40014284: 81 e8 00 00 restore <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40014288: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 4001428c: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014290: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014294: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014298: 94 12 a3 60 or %o2, 0x360, %o2 <== NOT EXECUTED 4001429c: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 400142a0: 7f ff c1 63 call 4000482c <__assert_func> <== NOT EXECUTED 400142a4: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED 400142a8: 01 00 00 00 nop 400148d0 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 400148d0: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400148d4: a0 96 20 00 orcc %i0, 0, %l0 400148d8: 02 80 00 85 be 40014aec 400148dc: 11 10 00 8f sethi %hi(0x40023c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400148e0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400148e4: 80 a0 60 05 cmp %g1, 5 400148e8: 12 80 00 8f bne 40014b24 400148ec: 80 a6 e0 00 cmp %i3, 0 /* * Error check arguments */ assert( source ); 400148f0: 02 80 00 86 be 40014b08 400148f4: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 400148f8: 02 80 00 67 be 40014a94 400148fc: 01 00 00 00 nop * 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 ) { 40014900: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40014904: 80 a0 60 00 cmp %g1, 0 40014908: 06 80 00 57 bl 40014a64 4001490c: 94 07 00 1a add %i4, %i2, %o2 40014910: 80 a0 60 00 cmp %g1, 0 40014914: 22 80 00 51 be,a 40014a58 40014918: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001491c: 25 10 00 93 sethi %hi(0x40024c00), %l2 <== NOT EXECUTED 40014920: e2 04 a2 94 ld [ %l2 + 0x294 ], %l1 ! 40024e94 40014924: 90 10 00 19 mov %i1, %o0 40014928: a7 3c 60 1f sra %l1, 0x1f, %l3 4001492c: 96 10 00 11 mov %l1, %o3 40014930: 94 10 00 13 mov %l3, %o2 40014934: 40 00 2f 77 call 40020710 <__moddi3> 40014938: 92 10 00 1a mov %i2, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001493c: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40014940: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40014944: 90 10 00 19 mov %i1, %o0 40014948: 92 10 00 1a mov %i2, %o1 4001494c: 40 00 2e 8a call 40020374 <__divdi3> 40014950: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40014954: b0 10 20 00 clr %i0 40014958: 80 a5 20 00 cmp %l4, 0 4001495c: 02 80 00 14 be 400149ac 40014960: a6 10 00 09 mov %o1, %l3 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 ); 40014964: 90 10 00 10 mov %l0, %o0 40014968: 7f ff fd 6a call 40013f10 4001496c: 94 10 20 00 clr %o2 assert( block_ptr ); 40014970: 80 a2 20 00 cmp %o0, 0 40014974: 02 80 00 73 be 40014b40 40014978: b0 24 40 14 sub %l1, %l4, %i0 */ 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; 4001497c: 80 a6 00 1c cmp %i0, %i4 40014980: 38 80 00 02 bgu,a 40014988 40014984: b0 10 00 1c mov %i4, %i0 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 ); 40014988: d0 02 00 00 ld [ %o0 ], %o0 4001498c: 92 10 00 1b mov %i3, %o1 40014990: 90 02 00 14 add %o0, %l4, %o0 40014994: 40 00 09 b0 call 40017054 40014998: 94 10 00 18 mov %i0, %o2 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4001499c: e2 04 a2 94 ld [ %l2 + 0x294 ], %l1 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; 400149a0: b6 06 c0 18 add %i3, %i0, %i3 block++; 400149a4: a6 04 e0 01 inc %l3 my_length -= to_copy; 400149a8: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400149ac: 80 a7 00 11 cmp %i4, %l1 400149b0: 0a 80 00 15 bcs 40014a04 400149b4: 80 a7 20 00 cmp %i4, 0 400149b8: a4 14 a2 94 or %l2, 0x294, %l2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400149bc: 90 10 00 10 mov %l0, %o0 400149c0: 92 10 00 13 mov %l3, %o1 400149c4: 7f ff fd 53 call 40013f10 400149c8: 94 10 20 00 clr %o2 assert( block_ptr ); 400149cc: 80 a2 20 00 cmp %o0, 0 400149d0: 02 80 00 37 be 40014aac 400149d4: 92 10 00 1b mov %i3, %o1 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 ); 400149d8: d0 02 00 00 ld [ %o0 ], %o0 400149dc: 40 00 09 9e call 40017054 400149e0: 94 10 00 11 mov %l1, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400149e4: c2 04 80 00 ld [ %l2 ], %g1 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; 400149e8: b8 27 00 11 sub %i4, %l1, %i4 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; 400149ec: b6 06 c0 11 add %i3, %l1, %i3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400149f0: 80 a0 40 1c cmp %g1, %i4 #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++; 400149f4: a6 04 e0 01 inc %l3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400149f8: 08 bf ff f1 bleu 400149bc 400149fc: b0 06 00 11 add %i0, %l1, %i0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 40014a00: 80 a7 20 00 cmp %i4, 0 40014a04: 02 80 00 0e be 40014a3c 40014a08: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40014a0c: 92 10 00 13 mov %l3, %o1 40014a10: 90 10 00 10 mov %l0, %o0 40014a14: 7f ff fd 3f call 40013f10 40014a18: 94 10 20 00 clr %o2 assert( block_ptr ); 40014a1c: 80 a2 20 00 cmp %o0, 0 40014a20: 02 80 00 2b be 40014acc 40014a24: b0 06 00 1c add %i0, %i4, %i0 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 ); 40014a28: d0 02 00 00 ld [ %o0 ], %o0 40014a2c: 92 10 00 1b mov %i3, %o1 40014a30: 40 00 09 89 call 40017054 40014a34: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 40014a38: 90 07 bf f8 add %fp, -8, %o0 40014a3c: 7f ff c0 e0 call 40004dbc 40014a40: 92 10 20 00 clr %o1 40014a44: c2 07 bf f8 ld [ %fp + -8 ], %g1 40014a48: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40014a4c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 40014a50: 81 c7 e0 08 ret 40014a54: 81 e8 00 00 restore * 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 ) { 40014a58: 80 a0 40 0a cmp %g1, %o2 40014a5c: 1a bf ff b1 bcc 40014920 40014a60: 25 10 00 93 sethi %hi(0x40024c00), %l2 status = IMFS_memfile_extend( the_jnode, last_byte ); 40014a64: 90 10 00 10 mov %l0, %o0 40014a68: 7f ff fe e7 call 40014604 40014a6c: 92 10 20 00 clr %o1 if ( status ) 40014a70: 80 a2 20 00 cmp %o0, 0 40014a74: 02 bf ff ab be 40014920 40014a78: 25 10 00 93 sethi %hi(0x40024c00), %l2 rtems_set_errno_and_return_minus_one( ENOSPC ); 40014a7c: 40 00 07 3b call 40016768 <__errno> <== NOT EXECUTED 40014a80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40014a84: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40014a88: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014a8c: 81 c7 e0 08 ret <== NOT EXECUTED 40014a90: 81 e8 00 00 restore <== 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 ); 40014a94: 40 00 07 35 call 40016768 <__errno> <== NOT EXECUTED 40014a98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40014a9c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40014aa0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014aa4: 81 c7 e0 08 ret <== NOT EXECUTED 40014aa8: 81 e8 00 00 restore <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 40014aac: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014ab0: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014ab4: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014ab8: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014abc: 94 12 a2 f8 or %o2, 0x2f8, %o2 <== NOT EXECUTED 40014ac0: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 40014ac4: 7f ff bf 5a call 4000482c <__assert_func> <== NOT EXECUTED 40014ac8: 92 10 23 30 mov 0x330, %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 ); 40014acc: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014ad0: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014ad4: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014ad8: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014adc: 94 12 a2 f8 or %o2, 0x2f8, %o2 <== NOT EXECUTED 40014ae0: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 40014ae4: 7f ff bf 52 call 4000482c <__assert_func> <== NOT EXECUTED 40014ae8: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40014aec: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014af0: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014af4: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014af8: 94 12 a2 f8 or %o2, 0x2f8, %o2 <== NOT EXECUTED 40014afc: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 40014b00: 7f ff bf 4b call 4000482c <__assert_func> <== NOT EXECUTED 40014b04: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 40014b08: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014b0c: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014b10: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014b14: 94 12 a2 f8 or %o2, 0x2f8, %o2 <== NOT EXECUTED 40014b18: 96 12 e2 78 or %o3, 0x278, %o3 <== NOT EXECUTED 40014b1c: 7f ff bf 44 call 4000482c <__assert_func> <== NOT EXECUTED 40014b20: 92 10 22 ef mov 0x2ef, %o1 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40014b24: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014b28: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014b2c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014b30: 94 12 a2 f8 or %o2, 0x2f8, %o2 <== NOT EXECUTED 40014b34: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 40014b38: 7f ff bf 3d call 4000482c <__assert_func> <== NOT EXECUTED 40014b3c: 92 10 22 e7 mov 0x2e7, %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 ); 40014b40: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014b44: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014b48: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014b4c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 40014b50: 94 12 a2 f8 or %o2, 0x2f8, %o2 <== NOT EXECUTED 40014b54: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 40014b58: 7f ff bf 35 call 4000482c <__assert_func> <== NOT EXECUTED 40014b5c: 92 10 23 1c mov 0x31c, %o1 <== NOT EXECUTED 40014b60: 01 00 00 00 nop 4000b9dc : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000b9dc: 9d e3 bf 58 save %sp, -168, %sp IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4000b9e0: 40 00 17 59 call 40011744 4000b9e4: 90 10 00 18 mov %i0, %o0 4000b9e8: 96 07 bf fc add %fp, -4, %o3 4000b9ec: 92 10 00 08 mov %o0, %o1 4000b9f0: a0 07 bf b8 add %fp, -72, %l0 4000b9f4: 90 10 00 18 mov %i0, %o0 4000b9f8: 7f ff ff 7e call 4000b7f0 4000b9fc: 94 10 00 10 mov %l0, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000ba00: 97 2e 60 10 sll %i1, 0x10, %o3 4000ba04: 03 00 00 3c sethi %hi(0xf000), %g1 4000ba08: 97 32 e0 10 srl %o3, 0x10, %o3 4000ba0c: 05 00 00 10 sethi %hi(0x4000), %g2 4000ba10: 82 0a c0 01 and %o3, %g1, %g1 4000ba14: 80 a0 40 02 cmp %g1, %g2 4000ba18: 02 80 00 24 be 4000baa8 4000ba1c: 05 00 00 20 sethi %hi(0x8000), %g2 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000ba20: 80 a0 40 02 cmp %g1, %g2 4000ba24: 02 80 00 0c be 4000ba54 4000ba28: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000ba2c: 05 00 00 08 sethi %hi(0x2000), %g2 4000ba30: 80 a0 40 02 cmp %g1, %g2 4000ba34: 02 80 00 12 be 4000ba7c 4000ba38: 05 00 00 18 sethi %hi(0x6000), %g2 4000ba3c: 80 a0 40 02 cmp %g1, %g2 4000ba40: 02 80 00 0f be 4000ba7c 4000ba44: 05 00 00 04 sethi %hi(0x1000), %g2 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 4000ba48: 80 a0 40 02 cmp %g1, %g2 4000ba4c: 12 80 00 21 bne 4000bad0 4000ba50: 92 10 20 07 mov 7, %o1 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 4000ba54: 90 10 00 1c mov %i4, %o0 4000ba58: 94 10 00 10 mov %l0, %o2 4000ba5c: 98 07 bf e0 add %fp, -32, %o4 4000ba60: 40 00 0c 91 call 4000eca4 4000ba64: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000ba68: 80 a2 20 00 cmp %o0, 0 4000ba6c: 02 80 00 1f be 4000bae8 4000ba70: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4000ba74: 81 c7 e0 08 ret 4000ba78: 81 e8 00 00 restore 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 ); 4000ba7c: f4 3f bf e0 std %i2, [ %fp + -32 ] 4000ba80: 92 10 20 02 mov 2, %o1 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 4000ba84: 90 10 00 1c mov %i4, %o0 4000ba88: 94 10 00 10 mov %l0, %o2 4000ba8c: 98 07 bf e0 add %fp, -32, %o4 4000ba90: 40 00 0c 85 call 4000eca4 4000ba94: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000ba98: 80 a2 20 00 cmp %o0, 0 4000ba9c: 12 80 00 17 bne 4000baf8 4000baa0: 01 00 00 00 nop 4000baa4: 30 80 00 11 b,a 4000bae8 <== NOT EXECUTED rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000baa8: 92 10 20 01 mov 1, %o1 ! 1 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 4000baac: 90 10 00 1c mov %i4, %o0 4000bab0: 94 10 00 10 mov %l0, %o2 4000bab4: 98 07 bf e0 add %fp, -32, %o4 4000bab8: 40 00 0c 7b call 4000eca4 4000babc: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000bac0: 80 a2 20 00 cmp %o0, 0 4000bac4: 12 80 00 0d bne 4000baf8 4000bac8: 01 00 00 00 nop 4000bacc: 30 80 00 07 b,a 4000bae8 <== NOT EXECUTED rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000bad0: 40 00 13 66 call 40010868 <__errno> <== NOT EXECUTED 4000bad4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bad8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000badc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bae0: 81 c7 e0 08 ret <== NOT EXECUTED 4000bae4: 81 e8 00 00 restore <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000bae8: 40 00 13 60 call 40010868 <__errno> <== NOT EXECUTED 4000baec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000baf0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000baf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000baf8: 81 c7 e0 08 ret 4000bafc: 81 e8 00 00 restore 400043b4 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 400043b4: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 400043b8: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 400043bc: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400043c0: 80 a0 a0 01 cmp %g2, 1 400043c4: 12 80 00 05 bne 400043d8 400043c8: 01 00 00 00 nop /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 400043cc: f0 20 60 5c st %i0, [ %g1 + 0x5c ] return 0; } 400043d0: 81 c7 e0 08 ret 400043d4: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 400043d8: 40 00 48 e4 call 40016768 <__errno> <== NOT EXECUTED 400043dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400043e0: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400043e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400043e8: 81 c7 e0 08 ret <== NOT EXECUTED 400043ec: 81 e8 00 00 restore <== NOT EXECUTED 40004c70 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 40004c70: 9d e3 bf a0 save %sp, -96, %sp assert( the_jnode ); 40004c74: 80 a6 20 00 cmp %i0, 0 40004c78: 02 80 00 5b be 40004de4 40004c7c: 21 10 00 a1 sethi %hi(0x40028400), %l0 fprintf(stdout, "%s", the_jnode->name ); 40004c80: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 ! 40028790 <_impure_ptr> 40004c84: 90 06 20 0c add %i0, 0xc, %o0 40004c88: 40 00 43 94 call 40015ad8 40004c8c: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 40004c90: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 40004c94: 80 a2 a0 07 cmp %o2, 7 40004c98: 08 80 00 0f bleu 40004cd4 40004c9c: 83 2a a0 02 sll %o2, 2, %g1 fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40004ca0: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 <== NOT EXECUTED 40004ca4: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40004ca8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004cac: 40 00 43 2d call 40015960 <== NOT EXECUTED 40004cb0: 92 12 63 28 or %o1, 0x328, %o1 <== NOT EXECUTED assert(0); 40004cb4: 92 10 20 6c mov 0x6c, %o1 <== NOT EXECUTED assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); assert(0); 40004cb8: 11 10 00 9a sethi %hi(0x40026800), %o0 <== NOT EXECUTED 40004cbc: 15 10 00 9b sethi %hi(0x40026c00), %o2 <== NOT EXECUTED 40004cc0: 17 10 00 9a sethi %hi(0x40026800), %o3 <== NOT EXECUTED 40004cc4: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED 40004cc8: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED 40004ccc: 40 00 02 83 call 400056d8 <__assert_func> <== NOT EXECUTED 40004cd0: 96 12 e0 60 or %o3, 0x60, %o3 <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 40004cd4: 05 10 00 13 sethi %hi(0x40004c00), %g2 40004cd8: 84 10 a0 14 or %g2, 0x14, %g2 ! 40004c14 40004cdc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40004ce0: 81 c0 40 00 jmp %g1 40004ce4: 01 00 00 00 nop fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 40004ce8: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 <== NOT EXECUTED 40004cec: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004cf0: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004cf4: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40004cf8: 11 10 00 9a sethi %hi(0x40026800), %o0 <== NOT EXECUTED 40004cfc: 40 00 46 97 call 40016758 <== NOT EXECUTED 40004d00: 90 12 23 10 or %o0, 0x310, %o0 ! 40026b10 <__FUNCTION__.5769+0x2a8> <== NOT EXECUTED assert(0); 40004d04: 10 bf ff ed b 40004cb8 <== NOT EXECUTED 40004d08: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 40004d0c: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 <== NOT EXECUTED 40004d10: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 <== NOT EXECUTED 40004d14: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 <== NOT EXECUTED 40004d18: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004d1c: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40004d20: 40 00 43 10 call 40015960 <== NOT EXECUTED 40004d24: 92 12 62 d8 or %o1, 0x2d8, %o1 ! 40026ad8 <__FUNCTION__.5769+0x270> <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004d28: 31 10 00 9a sethi %hi(0x40026800), %i0 <== NOT EXECUTED 40004d2c: 40 00 4a 95 call 40017780 <== NOT EXECUTED 40004d30: 91 ee 22 30 restore %i0, 0x230, %o0 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40004d34: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 40004d38: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 40004d3c: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004d40: 13 10 00 9a sethi %hi(0x40026800), %o1 40004d44: 40 00 43 07 call 40015960 40004d48: 92 12 62 e8 or %o1, 0x2e8, %o1 ! 40026ae8 <__FUNCTION__.5769+0x280> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004d4c: 31 10 00 9a sethi %hi(0x40026800), %i0 40004d50: 40 00 4a 8c call 40017780 40004d54: 91 ee 22 30 restore %i0, 0x230, %o0 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40004d58: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 <== NOT EXECUTED 40004d5c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004d60: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004d64: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40004d68: 11 10 00 9a sethi %hi(0x40026800), %o0 <== NOT EXECUTED 40004d6c: 40 00 46 7b call 40016758 <== NOT EXECUTED 40004d70: 90 12 22 f8 or %o0, 0x2f8, %o0 ! 40026af8 <__FUNCTION__.5769+0x290> <== NOT EXECUTED assert(0); 40004d74: 10 bf ff d1 b 40004cb8 <== NOT EXECUTED 40004d78: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 40004d7c: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 <== NOT EXECUTED 40004d80: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004d84: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004d88: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40004d8c: 11 10 00 9a sethi %hi(0x40026800), %o0 <== NOT EXECUTED 40004d90: 40 00 46 72 call 40016758 <== NOT EXECUTED 40004d94: 90 12 22 f8 or %o0, 0x2f8, %o0 ! 40026af8 <__FUNCTION__.5769+0x290> <== NOT EXECUTED assert(0); 40004d98: 10 bf ff c8 b 40004cb8 <== NOT EXECUTED 40004d9c: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40004da0: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 40004da4: d6 06 20 54 ld [ %i0 + 0x54 ], %o3 40004da8: d4 06 20 50 ld [ %i0 + 0x50 ], %o2 40004dac: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004db0: 13 10 00 9a sethi %hi(0x40026800), %o1 40004db4: 40 00 42 eb call 40015960 40004db8: 92 12 62 c0 or %o1, 0x2c0, %o1 ! 40026ac0 <__FUNCTION__.5769+0x258> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004dbc: 31 10 00 9a sethi %hi(0x40026800), %i0 40004dc0: 40 00 4a 70 call 40017780 40004dc4: 91 ee 22 30 restore %i0, 0x230, %o0 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 40004dc8: c2 04 23 90 ld [ %l0 + 0x390 ], %g1 40004dcc: 90 10 20 2f mov 0x2f, %o0 40004dd0: d2 00 60 08 ld [ %g1 + 8 ], %o1 40004dd4: 40 00 42 fd call 400159c8 40004dd8: 31 10 00 9a sethi %hi(0x40026800), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004ddc: 40 00 4a 69 call 40017780 40004de0: 91 ee 22 30 restore %i0, 0x230, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 40004de4: 11 10 00 9a sethi %hi(0x40026800), %o0 <== NOT EXECUTED 40004de8: 15 10 00 9b sethi %hi(0x40026c00), %o2 <== NOT EXECUTED 40004dec: 17 10 00 9a sethi %hi(0x40026800), %o3 <== NOT EXECUTED 40004df0: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED 40004df4: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED 40004df8: 96 12 e2 b0 or %o3, 0x2b0, %o3 <== NOT EXECUTED 40004dfc: 40 00 02 37 call 400056d8 <__assert_func> <== NOT EXECUTED 40004e00: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED 40004e04: 01 00 00 00 nop 400043fc : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 400043fc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 40004400: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 40004404: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40004408: 80 a0 a0 04 cmp %g2, 4 4000440c: 12 80 00 19 bne 40004470 40004410: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40004414: 02 80 00 15 be 40004468 40004418: 86 10 20 00 clr %g3 4000441c: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40004420: c8 48 80 00 ldsb [ %g2 ], %g4 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 40004424: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40004428: 80 a1 20 00 cmp %g4, 0 4000442c: 12 80 00 08 bne 4000444c 40004430: c4 08 80 00 ldub [ %g2 ], %g2 40004434: 30 80 00 13 b,a 40004480 <== NOT EXECUTED 40004438: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 4000443c: c8 48 80 18 ldsb [ %g2 + %i0 ], %g4 40004440: 80 a1 20 00 cmp %g4, 0 40004444: 02 80 00 07 be 40004460 40004448: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; 4000444c: c4 2e 40 03 stb %g2, [ %i1 + %g3 ] 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++ ) 40004450: b0 06 20 01 inc %i0 40004454: 80 a6 80 18 cmp %i2, %i0 40004458: 18 bf ff f8 bgu 40004438 4000445c: 86 10 00 18 mov %i0, %g3 buf[i] = node->info.sym_link.name[i]; return i; } 40004460: 81 c7 e0 08 ret 40004464: 81 e8 00 00 restore 40004468: 81 c7 e0 08 ret <== NOT EXECUTED 4000446c: 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 ); 40004470: 40 00 48 be call 40016768 <__errno> <== NOT EXECUTED 40004474: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004478: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000447c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004480: 81 c7 e0 08 ret <== NOT EXECUTED 40004484: 81 e8 00 00 restore <== NOT EXECUTED 40004488 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 40004488: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 4000448c: e0 06 40 00 ld [ %i1 ], %l0 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 40004490: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 40004494: 90 04 20 0c add %l0, 0xc, %o0 <== NOT EXECUTED 40004498: 40 00 4c 87 call 400176b4 <== NOT EXECUTED 4000449c: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 400044a0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400044a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044a8: 22 80 00 05 be,a 400044bc <== NOT EXECUTED 400044ac: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 400044b0: 40 00 14 cb call 400097dc <_Chain_Extract> <== NOT EXECUTED 400044b4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 400044b8: c2 06 80 00 ld [ %i2 ], %g1 <== 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 ); 400044bc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400044c0: 90 00 60 50 add %g1, 0x50, %o0 <== NOT EXECUTED 400044c4: 40 00 14 ba call 400097ac <_Chain_Append> <== NOT EXECUTED 400044c8: c2 24 20 08 st %g1, [ %l0 + 8 ] <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 400044cc: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 400044d0: 40 00 02 3b call 40004dbc <== NOT EXECUTED 400044d4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400044d8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400044dc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED return 0; } 400044e0: 81 c7 e0 08 ret <== NOT EXECUTED 400044e4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000bb0c : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000bb0c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000bb10: e0 06 40 00 ld [ %i1 ], %l0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4000bb14: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000bb18: 80 a0 60 00 cmp %g1, 0 4000bb1c: 22 80 00 06 be,a 4000bb34 4000bb20: 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 ); 4000bb24: 40 00 05 e6 call 4000d2bc <_Chain_Extract> 4000bb28: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000bb2c: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000bb30: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000bb34: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000bb38: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000bb3c: 90 07 bf f8 add %fp, -8, %o0 4000bb40: 40 00 01 13 call 4000bf8c 4000bb44: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000bb48: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * 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) ) { 4000bb4c: 90 10 00 10 mov %l0, %o0 4000bb50: 40 00 01 48 call 4000c070 4000bb54: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000bb58: 80 a2 20 00 cmp %o0, 0 4000bb5c: 12 80 00 12 bne 4000bba4 4000bb60: 01 00 00 00 nop 4000bb64: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000bb68: 80 a0 60 00 cmp %g1, 0 4000bb6c: 12 80 00 0e bne 4000bba4 4000bb70: 03 10 00 78 sethi %hi(0x4001e000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000bb74: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 4001e238 4000bb78: c4 06 40 00 ld [ %i1 ], %g2 4000bb7c: c6 00 60 04 ld [ %g1 + 4 ], %g3 4000bb80: 80 a0 c0 02 cmp %g3, %g2 4000bb84: 22 80 00 02 be,a 4000bb8c 4000bb88: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000bb8c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000bb90: 80 a0 60 04 cmp %g1, 4 4000bb94: 22 80 00 06 be,a 4000bbac 4000bb98: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 4000bb9c: 40 00 00 82 call 4000bda4 4000bba0: 90 10 00 10 mov %l0, %o0 } return 0; } 4000bba4: 81 c7 e0 08 ret 4000bba8: 91 e8 20 00 restore %g0, 0, %o0 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4000bbac: 80 a2 20 00 cmp %o0, 0 4000bbb0: 02 bf ff fb be 4000bb9c 4000bbb4: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 4000bbb8: 40 00 00 7b call 4000bda4 4000bbbc: 01 00 00 00 nop 4000bbc0: 30 bf ff f7 b,a 4000bb9c 4000bbe4 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000bbe4: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000bbe8: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 4000bbec: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000bbf0: 80 a0 a0 07 cmp %g2, 7 4000bbf4: 08 80 00 08 bleu 4000bc14 4000bbf8: 85 28 a0 02 sll %g2, 2, %g2 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000bbfc: 40 00 13 1b call 40010868 <__errno> <== NOT EXECUTED 4000bc00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bc04: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000bc08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bc0c: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc10: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000bc14: 07 10 00 2e sethi %hi(0x4000b800), %g3 4000bc18: 86 10 e3 c4 or %g3, 0x3c4, %g3 ! 4000bbc4 4000bc1c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 4000bc20: 81 c0 80 00 jmp %g2 4000bc24: 01 00 00 00 nop case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4000bc28: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000bc2c: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000bc30: c6 10 60 2e lduh [ %g1 + 0x2e ], %g3 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000bc34: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000bc38: c6 36 60 0c sth %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000bc3c: 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; 4000bc40: c6 10 60 30 lduh [ %g1 + 0x30 ], %g3 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; 4000bc44: c4 00 60 3c ld [ %g1 + 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; 4000bc48: c6 36 60 0e sth %g3, [ %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; 4000bc4c: c4 26 60 28 st %g2, [ %i1 + 0x28 ] } 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; 4000bc50: c6 10 60 38 lduh [ %g1 + 0x38 ], %g3 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4000bc54: c4 00 60 40 ld [ %g1 + 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; 4000bc58: c6 36 60 10 sth %g3, [ %i1 + 0x10 ] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4000bc5c: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 4000bc60: c4 00 60 44 ld [ %g1 + 0x44 ], %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; buf->st_gid = the_jnode->st_gid; 4000bc64: c2 10 60 3a lduh [ %g1 + 0x3a ], %g1 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4000bc68: c4 26 60 38 st %g2, [ %i1 + 0x38 ] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4000bc6c: c2 36 60 12 sth %g1, [ %i1 + 0x12 ] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4000bc70: 81 c7 e0 08 ret 4000bc74: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000bc78: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; 4000bc7c: 10 bf ff ed b 4000bc30 4000bc80: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000bc84: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 4000bc88: 10 bf ff ea b 4000bc30 4000bc8c: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] 400044e8 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 400044e8: 9d e3 bf 58 save %sp, -168, %sp int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 400044ec: 40 00 4c 3d call 400175e0 400044f0: 90 10 00 1a mov %i2, %o0 400044f4: 96 07 bf fc add %fp, -4, %o3 400044f8: 92 10 00 08 mov %o0, %o1 400044fc: a0 07 bf b8 add %fp, -72, %l0 40004500: 90 10 00 1a mov %i2, %o0 40004504: 40 00 34 15 call 40011558 40004508: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 4000450c: 40 00 4c 20 call 4001758c 40004510: 90 10 00 19 mov %i1, %o0 if (info.sym_link.name == NULL) { 40004514: 80 a2 20 00 cmp %o0, 0 40004518: 02 80 00 15 be 4000456c 4000451c: d0 27 bf e0 st %o0, [ %fp + -32 ] * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 40004520: 90 10 00 18 mov %i0, %o0 40004524: 94 10 00 10 mov %l0, %o2 40004528: 92 10 20 04 mov 4, %o1 4000452c: 17 00 00 28 sethi %hi(0xa000), %o3 40004530: 98 07 bf e0 add %fp, -32, %o4 40004534: 96 12 e1 ff or %o3, 0x1ff, %o3 40004538: 40 00 30 67 call 400106d4 4000453c: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 40004540: 80 a2 20 00 cmp %o0, 0 40004544: 12 80 00 08 bne 40004564 40004548: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 4000454c: 40 00 01 f1 call 40004d10 <== NOT EXECUTED 40004550: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 40004554: 40 00 48 85 call 40016768 <__errno> <== NOT EXECUTED 40004558: 01 00 00 00 nop <== NOT EXECUTED 4000455c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40004560: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40004564: 81 c7 e0 08 ret 40004568: 81 e8 00 00 restore /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 4000456c: 40 00 48 7f call 40016768 <__errno> <== NOT EXECUTED 40004570: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004574: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004578: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000457c: 81 c7 e0 08 ret <== NOT EXECUTED 40004580: 81 e8 00 00 restore <== NOT EXECUTED 40004584 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 40004584: 9d e3 bf 80 save %sp, -128, %sp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 40004588: e0 06 40 00 ld [ %i1 ], %l0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 4000458c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004590: 80 a0 60 03 cmp %g1, 3 40004594: 02 80 00 09 be 400045b8 40004598: a2 10 00 18 mov %i0, %l1 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 4000459c: c2 06 60 08 ld [ %i1 + 8 ], %g1 400045a0: 90 10 00 11 mov %l1, %o0 400045a4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400045a8: 9f c0 40 00 call %g1 400045ac: 92 10 00 19 mov %i1, %o1 return result; } 400045b0: 81 c7 e0 08 ret 400045b4: 91 e8 00 08 restore %g0, %o0, %o0 * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 400045b8: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400045bc: 80 a0 60 00 cmp %g1, 0 400045c0: 02 80 00 25 be 40004654 400045c4: a4 07 bf e4 add %fp, -28, %l2 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 400045c8: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 400045cc: da 06 60 04 ld [ %i1 + 4 ], %o5 400045d0: c8 06 60 08 ld [ %i1 + 8 ], %g4 400045d4: c6 06 60 0c ld [ %i1 + 0xc ], %g3 400045d8: c4 27 bf f4 st %g2, [ %fp + -12 ] the_link.node_access = node->info.hard_link.link_node; 400045dc: c2 27 bf e4 st %g1, [ %fp + -28 ] if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 400045e0: da 27 bf e8 st %o5, [ %fp + -24 ] 400045e4: c8 27 bf ec st %g4, [ %fp + -20 ] 400045e8: c6 27 bf f0 st %g3, [ %fp + -16 ] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 400045ec: 40 00 30 89 call 40010810 400045f0: 90 10 00 12 mov %l2, %o0 /* * 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) 400045f4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400045f8: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 400045fc: 80 a0 a0 01 cmp %g2, 1 40004600: 02 80 00 0a be 40004628 40004604: 86 00 bf ff add %g2, -1, %g3 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 40004608: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 4000460c: c6 30 60 30 sth %g3, [ %g1 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40004610: 40 00 01 eb call 40004dbc 40004614: 92 10 20 00 clr %o1 40004618: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 4000461c: c4 07 bf f8 ld [ %fp + -8 ], %g2 40004620: 10 bf ff df b 4000459c 40004624: c4 20 60 44 st %g2, [ %g1 + 0x44 ] * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 40004628: c2 07 bf ec ld [ %fp + -20 ], %g1 4000462c: 90 10 00 18 mov %i0, %o0 40004630: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40004634: 92 10 00 12 mov %l2, %o1 40004638: 9f c0 40 00 call %g1 4000463c: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40004640: 80 a2 20 00 cmp %o0, 0 40004644: 22 bf ff d7 be,a 400045a0 40004648: c2 06 60 08 ld [ %i1 + 8 ], %g1 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 4000464c: 81 c7 e0 08 ret 40004650: 81 e8 00 00 restore */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 40004654: 40 00 48 45 call 40016768 <__errno> <== NOT EXECUTED 40004658: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000465c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004660: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004664: 81 c7 e0 08 ret <== NOT EXECUTED 40004668: 81 e8 00 00 restore <== NOT EXECUTED 4000466c : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 4000466c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004670: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004674: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40004678: 80 a0 a0 01 cmp %g2, 1 4000467c: 12 80 00 09 bne 400046a0 40004680: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 40004684: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 40004688: 80 a0 a0 00 cmp %g2, 0 4000468c: 02 80 00 0b be 400046b8 40004690: 01 00 00 00 nop /* * 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; 40004694: c0 20 60 5c clr [ %g1 + 0x5c ] return 0; } 40004698: 81 c7 e0 08 ret 4000469c: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 400046a0: 40 00 48 32 call 40016768 <__errno> <== NOT EXECUTED 400046a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400046a8: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400046ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400046b0: 81 c7 e0 08 ret <== NOT EXECUTED 400046b4: 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 */ 400046b8: 40 00 48 2c call 40016768 <__errno> <== NOT EXECUTED 400046bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400046c0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400046c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400046c8: 81 c7 e0 08 ret <== NOT EXECUTED 400046cc: 81 e8 00 00 restore <== NOT EXECUTED 400035b4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 400035b4: 9d e3 bf a0 save %sp, -96, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 400035b8: 03 10 00 79 sethi %hi(0x4001e400), %g1 400035bc: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 4001e798 400035c0: 80 a0 60 00 cmp %g1, 0 400035c4: 02 80 00 05 be 400035d8 400035c8: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 400035cc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 400035d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400035d4: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 400035d8: 40 00 23 58 call 4000c338 400035dc: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 400035e0: 03 10 00 79 sethi %hi(0x4001e400), %g1 400035e4: c2 00 63 9c ld [ %g1 + 0x39c ], %g1 ! 4001e79c 400035e8: 80 a0 60 00 cmp %g1, 0 400035ec: 02 80 00 08 be 4000360c 400035f0: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 400035f4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 400035f8: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 400035fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003600: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 40003604: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40003608: b2 26 40 08 sub %i1, %o0, %i1 <== 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 ( 4000360c: 23 10 00 79 sethi %hi(0x4001e400), %l1 40003610: c2 0c 63 95 ldub [ %l1 + 0x395 ], %g1 ! 4001e795 40003614: 80 a0 60 00 cmp %g1, 0 40003618: 12 80 00 10 bne 40003658 4000361c: 21 10 00 78 sethi %hi(0x4001e000), %l0 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 40003620: 03 10 00 78 sethi %hi(0x4001e000), %g1 40003624: c2 08 62 00 ldub [ %g1 + 0x200 ], %g1 ! 4001e200 40003628: 80 a0 60 00 cmp %g1, 0 4000362c: 12 80 00 13 bne 40003678 40003630: 90 10 00 18 mov %i0, %o0 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 40003634: 21 10 00 78 sethi %hi(0x4001e000), %l0 40003638: d0 04 21 30 ld [ %l0 + 0x130 ], %o0 ! 4001e130 4000363c: 92 10 00 18 mov %i0, %o1 40003640: 94 10 00 19 mov %i1, %o2 40003644: 40 00 11 69 call 40007be8 <_Heap_Initialize> 40003648: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 4000364c: 80 a2 20 00 cmp %o0, 0 40003650: 02 80 00 13 be 4000369c 40003654: 01 00 00 00 nop rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 40003658: d0 04 21 30 ld [ %l0 + 0x130 ], %o0 4000365c: 21 10 00 7a sethi %hi(0x4001e800), %l0 40003660: 40 00 14 ae call 40008918 <_Protected_heap_Get_size> 40003664: e2 04 22 c8 ld [ %l0 + 0x2c8 ], %l1 ! 4001eac8 40003668: 90 02 00 11 add %o0, %l1, %o0 4000366c: d0 24 22 c8 st %o0, [ %l0 + 0x2c8 ] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 40003670: 81 c7 e0 08 ret 40003674: 81 e8 00 00 restore if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 40003678: 92 10 20 00 clr %o1 4000367c: 40 00 36 f5 call 40011250 40003680: 94 10 00 19 mov %i1, %o2 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 40003684: c2 0c 63 95 ldub [ %l1 + 0x395 ], %g1 40003688: 80 a0 60 00 cmp %g1, 0 4000368c: 22 bf ff eb be,a 40003638 40003690: 21 10 00 78 sethi %hi(0x4001e000), %l0 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 40003694: 10 bf ff f2 b 4000365c <== NOT EXECUTED 40003698: d0 04 21 30 ld [ %l0 + 0x130 ], %o0 ! 4001e130 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 4000369c: 40 00 0f 1b call 40007308 <== NOT EXECUTED 400036a0: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED 400036a4: 01 00 00 00 nop 4000642c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 4000642c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 40006430: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006434: 02 80 00 3b be 40006520 <== NOT EXECUTED 40006438: 27 10 01 b5 sethi %hi(0x4006d400), %l3 <== NOT EXECUTED return; if ( !print_handler ) 4000643c: e8 04 e0 18 ld [ %l3 + 0x18 ], %l4 ! 4006d418 <== NOT EXECUTED 40006440: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40006444: 02 80 00 37 be 40006520 <== NOT EXECUTED 40006448: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 4000644c: 02 80 00 3e be 40006544 <== NOT EXECUTED 40006450: a4 06 20 c4 add %i0, 0xc4, %l2 <== 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); 40006454: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40006458: e2 04 80 00 ld [ %l2 ], %l1 <== 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); 4000645c: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40006460: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 40006464: ec 06 21 48 ld [ %i0 + 0x148 ], %l6 <== 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); 40006468: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000646c: 7f ff ff d8 call 400063cc <== NOT EXECUTED 40006470: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( high_water_mark ) 40006474: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40006478: a0 05 40 11 add %l5, %l1, %l0 <== 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 ) 4000647c: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40006480: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 40006484: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006488: 02 80 00 44 be 40006598 <== NOT EXECUTED 4000648c: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED (*print_handler)( 40006490: ee 06 20 08 ld [ %i0 + 8 ], %l7 <== NOT EXECUTED 40006494: 2b 10 01 b5 sethi %hi(0x4006d400), %l5 <== NOT EXECUTED 40006498: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 ! 4006d414 <== NOT EXECUTED 4000649c: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 400064a0: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 400064a4: 40 00 1a 85 call 4000ceb8 <== NOT EXECUTED 400064a8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 400064ac: 13 10 01 88 sethi %hi(0x40062000), %o1 <== NOT EXECUTED 400064b0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 400064b4: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED 400064b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 400064bc: 9f c5 00 00 call %l4 <== NOT EXECUTED 400064c0: 92 12 60 c8 or %o1, 0xc8, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 400064c4: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 400064c8: c2 04 e0 18 ld [ %l3 + 0x18 ], %g1 <== NOT EXECUTED 400064cc: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 400064d0: d0 05 60 14 ld [ %l5 + 0x14 ], %o0 <== NOT EXECUTED 400064d4: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 400064d8: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 400064dc: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 400064e0: 9a 10 00 11 mov %l1, %o5 <== NOT EXECUTED 400064e4: 13 10 01 88 sethi %hi(0x40062000), %o1 <== NOT EXECUTED 400064e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400064ec: 92 12 60 e8 or %o1, 0xe8, %o1 ! 400620e8 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 400064f0: 03 10 01 b5 sethi %hi(0x4006d400), %g1 <== NOT EXECUTED 400064f4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 4006d410 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 400064f8: 03 10 01 b5 sethi %hi(0x4006d400), %g1 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 400064fc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40006500: 02 80 00 0a be 40006528 <== NOT EXECUTED 40006504: 05 10 01 b5 sethi %hi(0x4006d400), %g2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40006508: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4000650c: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0 <== NOT EXECUTED 40006510: 13 10 01 88 sethi %hi(0x40062000), %o1 <== NOT EXECUTED 40006514: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40006518: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000651c: 92 12 61 18 or %o1, 0x118, %o1 <== NOT EXECUTED 40006520: 81 c7 e0 08 ret <== NOT EXECUTED 40006524: 81 e8 00 00 restore <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 40006528: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4000652c: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0 <== NOT EXECUTED 40006530: 13 10 01 88 sethi %hi(0x40062000), %o1 <== NOT EXECUTED 40006534: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006538: 92 12 61 08 or %o1, 0x108, %o1 ! 40062108 <== NOT EXECUTED 4000653c: 81 c7 e0 08 ret <== NOT EXECUTED 40006540: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 40006544: 25 10 01 c0 sethi %hi(0x40070000), %l2 <== NOT EXECUTED 40006548: a4 14 a0 50 or %l2, 0x50, %l2 ! 40070050 <== NOT EXECUTED 4000654c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED 40006550: ac 10 20 00 clr %l6 <== NOT EXECUTED 40006554: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006558: 02 bf ff f2 be 40006520 <== NOT EXECUTED 4000655c: b0 10 20 00 clr %i0 <== 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); 40006560: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40006564: e2 04 80 00 ld [ %l2 ], %l1 <== 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); 40006568: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 4000656c: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40006570: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40006574: 7f ff ff 96 call 400063cc <== NOT EXECUTED 40006578: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( high_water_mark ) 4000657c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40006580: a0 05 40 11 add %l5, %l1, %l0 <== 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 ) 40006584: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40006588: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 4000658c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006590: 12 bf ff c0 bne 40006490 <== NOT EXECUTED 40006594: a0 0c 00 01 and %l0, %g1, %l0 <== 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 ); 40006598: 2b 10 01 b5 sethi %hi(0x4006d400), %l5 <== NOT EXECUTED 4000659c: d0 05 60 14 ld [ %l5 + 0x14 ], %o0 ! 4006d414 <== NOT EXECUTED 400065a0: 13 10 01 88 sethi %hi(0x40062000), %o1 <== NOT EXECUTED 400065a4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 400065a8: 9f c5 00 00 call %l4 <== NOT EXECUTED 400065ac: 92 12 60 d8 or %o1, 0xd8, %o1 <== NOT EXECUTED } (*print_handler)( 400065b0: 10 bf ff c6 b 400064c8 <== NOT EXECUTED 400065b4: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 400063cc : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 400063cc: 82 02 20 10 add %o0, 0x10, %g1 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 400063d0: 86 0a 7f fc and %o1, -4, %g3 <== NOT EXECUTED 400063d4: 86 00 40 03 add %g1, %g3, %g3 <== NOT EXECUTED 400063d8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400063dc: 1a 80 00 10 bcc 4000641c <== NOT EXECUTED 400063e0: 05 29 69 69 sethi %hi(0xa5a5a400), %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 400063e4: c8 02 20 10 ld [ %o0 + 0x10 ], %g4 <== NOT EXECUTED 400063e8: 84 10 a1 a5 or %g2, 0x1a5, %g2 <== NOT EXECUTED 400063ec: 80 a1 00 02 cmp %g4, %g2 <== NOT EXECUTED 400063f0: 22 80 00 08 be,a 40006410 <== NOT EXECUTED 400063f4: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED return (void *) base; 400063f8: 81 c3 e0 08 retl <== NOT EXECUTED 400063fc: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 40006400: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 40006404: 12 80 00 08 bne 40006424 <== NOT EXECUTED 40006408: 90 10 00 01 mov %g1, %o0 <== 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++) 4000640c: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 40006410: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40006414: 38 bf ff fb bgu,a 40006400 <== NOT EXECUTED 40006418: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 4000641c: 81 c3 e0 08 retl <== NOT EXECUTED 40006420: 90 10 20 00 clr %o0 <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 40006424: 81 c3 e0 08 retl <== NOT EXECUTED 40006428: 01 00 00 00 nop 4000662c : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 4000662c: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 40006630: 11 10 01 88 sethi %hi(0x40062000), %o0 <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 40006634: e0 06 20 c8 ld [ %i0 + 0xc8 ], %l0 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 40006638: 40 00 0c 5b call 400097a4 <== NOT EXECUTED 4000663c: 90 12 21 88 or %o0, 0x188, %o0 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 40006640: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40006644: 11 10 01 88 sethi %hi(0x40062000), %o0 <== NOT EXECUTED 40006648: 40 00 0c 57 call 400097a4 <== NOT EXECUTED 4000664c: 90 12 21 98 or %o0, 0x198, %o0 ! 40062198 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 40006650: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED 40006654: 11 10 01 88 sethi %hi(0x40062000), %o0 <== NOT EXECUTED 40006658: 40 00 0c 53 call 400097a4 <== NOT EXECUTED 4000665c: 90 12 21 b8 or %o0, 0x1b8, %o0 ! 400621b8 <== NOT EXECUTED printk( 40006660: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 40006664: 11 10 01 88 sethi %hi(0x40062000), %o0 <== NOT EXECUTED 40006668: 40 00 0c 4f call 400097a4 <== NOT EXECUTED 4000666c: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 400621d0 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 40006670: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 40006674: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED 40006678: 40 00 1a 10 call 4000ceb8 <== NOT EXECUTED 4000667c: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED 40006680: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40006684: 11 10 01 88 sethi %hi(0x40062000), %o0 <== NOT EXECUTED 40006688: 40 00 0c 47 call 400097a4 <== NOT EXECUTED 4000668c: 90 12 21 e8 or %o0, 0x1e8, %o0 ! 400621e8 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 40006690: d2 06 20 c4 ld [ %i0 + 0xc4 ], %o1 <== NOT EXECUTED 40006694: d4 06 20 c8 ld [ %i0 + 0xc8 ], %o2 <== NOT EXECUTED 40006698: 11 10 01 88 sethi %hi(0x40062000), %o0 <== NOT EXECUTED 4000669c: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED 400066a0: 40 00 0c 41 call 400097a4 <== NOT EXECUTED 400066a4: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 400066a8: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 400066ac: 02 80 00 04 be 400066bc <== NOT EXECUTED 400066b0: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 400066b4: 40 00 1c 3d call 4000d7a8 <== NOT EXECUTED 400066b8: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 400066bc: 11 10 01 88 sethi %hi(0x40062000), %o0 <== NOT EXECUTED 400066c0: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 400066c4: 90 12 22 38 or %o0, 0x238, %o0 <== NOT EXECUTED 400066c8: 40 00 0c 37 call 400097a4 <== NOT EXECUTED 400066cc: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED 400066d0: 30 bf ff f9 b,a 400066b4 <== NOT EXECUTED 4000d5dc <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000d5dc: 9d e3 bf 98 save %sp, -104, %sp Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; 4000d5e0: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000d5e4: a0 10 00 18 mov %i0, %l0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4000d5e8: 80 a6 40 14 cmp %i1, %l4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4000d5ec: e4 06 20 08 ld [ %i0 + 8 ], %l2 4000d5f0: 18 80 00 75 bgu 4000d7c4 <_Heap_Allocate_aligned_with_boundary+0x1e8> 4000d5f4: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4000d5f8: 80 a6 e0 00 cmp %i3, 0 4000d5fc: 12 80 00 70 bne 4000d7bc <_Heap_Allocate_aligned_with_boundary+0x1e0> 4000d600: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000d604: 80 a4 00 12 cmp %l0, %l2 4000d608: 02 80 00 72 be 4000d7d0 <_Heap_Allocate_aligned_with_boundary+0x1f4> 4000d60c: a2 10 20 00 clr %l1 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000d610: 82 10 20 04 mov 4, %g1 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4000d614: b8 07 60 07 add %i5, 7, %i4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000d618: 82 20 40 19 sub %g1, %i1, %g1 4000d61c: 10 80 00 09 b 4000d640 <_Heap_Allocate_aligned_with_boundary+0x64> 4000d620: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 4000d624: 80 a6 20 00 cmp %i0, 0 4000d628: 32 80 00 57 bne,a 4000d784 <_Heap_Allocate_aligned_with_boundary+0x1a8> 4000d62c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 4000d630: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000d634: 80 a4 00 12 cmp %l0, %l2 4000d638: 22 80 00 5a be,a 4000d7a0 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000d63c: b0 10 20 00 clr %i0 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4000d640: e6 04 a0 04 ld [ %l2 + 4 ], %l3 4000d644: 80 a5 00 13 cmp %l4, %l3 4000d648: 1a bf ff fa bcc 4000d630 <_Heap_Allocate_aligned_with_boundary+0x54> 4000d64c: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 4000d650: 80 a6 a0 00 cmp %i2, 0 4000d654: 02 bf ff f4 be 4000d624 <_Heap_Allocate_aligned_with_boundary+0x48> 4000d658: b0 04 a0 08 add %l2, 8, %i0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000d65c: c2 07 bf fc ld [ %fp + -4 ], %g1 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4000d660: ee 04 20 14 ld [ %l0 + 0x14 ], %l7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4000d664: a6 0c ff fe and %l3, -2, %l3 4000d668: a6 04 80 13 add %l2, %l3, %l3 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000d66c: b0 00 40 13 add %g1, %l3, %i0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4000d670: 82 27 00 17 sub %i4, %l7, %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4000d674: 90 10 00 18 mov %i0, %o0 4000d678: a6 00 40 13 add %g1, %l3, %l3 4000d67c: 40 00 32 b8 call 4001a15c <.urem> 4000d680: 92 10 00 1a mov %i2, %o1 4000d684: b0 26 00 08 sub %i0, %o0, %i0 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4000d688: 80 a4 c0 18 cmp %l3, %i0 4000d68c: 1a 80 00 06 bcc 4000d6a4 <_Heap_Allocate_aligned_with_boundary+0xc8> 4000d690: ac 04 a0 08 add %l2, 8, %l6 4000d694: 90 10 00 13 mov %l3, %o0 4000d698: 40 00 32 b1 call 4001a15c <.urem> 4000d69c: 92 10 00 1a mov %i2, %o1 4000d6a0: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4000d6a4: 80 a6 e0 00 cmp %i3, 0 4000d6a8: 02 80 00 26 be 4000d740 <_Heap_Allocate_aligned_with_boundary+0x164> 4000d6ac: 80 a5 80 18 cmp %l6, %i0 /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4000d6b0: a6 06 00 19 add %i0, %i1, %l3 4000d6b4: 92 10 00 1b mov %i3, %o1 4000d6b8: 40 00 32 a9 call 4001a15c <.urem> 4000d6bc: 90 10 00 13 mov %l3, %o0 4000d6c0: 90 24 c0 08 sub %l3, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4000d6c4: 80 a4 c0 08 cmp %l3, %o0 4000d6c8: 08 80 00 1e bleu 4000d740 <_Heap_Allocate_aligned_with_boundary+0x164> 4000d6cc: 80 a5 80 18 cmp %l6, %i0 4000d6d0: 80 a6 00 08 cmp %i0, %o0 4000d6d4: 1a 80 00 1b bcc 4000d740 <_Heap_Allocate_aligned_with_boundary+0x164> 4000d6d8: 80 a5 80 18 cmp %l6, %i0 alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4000d6dc: aa 05 80 19 add %l6, %i1, %l5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4000d6e0: 80 a5 40 08 cmp %l5, %o0 4000d6e4: 28 80 00 0a bleu,a 4000d70c <_Heap_Allocate_aligned_with_boundary+0x130> 4000d6e8: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 4000d6ec: 10 bf ff d2 b 4000d634 <_Heap_Allocate_aligned_with_boundary+0x58> 4000d6f0: e4 04 a0 08 ld [ %l2 + 8 ], %l2 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4000d6f4: 1a 80 00 13 bcc 4000d740 <_Heap_Allocate_aligned_with_boundary+0x164> 4000d6f8: 80 a5 80 18 cmp %l6, %i0 if ( boundary_line < boundary_floor ) { 4000d6fc: 80 a5 40 08 cmp %l5, %o0 4000d700: 38 bf ff cd bgu,a 4000d634 <_Heap_Allocate_aligned_with_boundary+0x58> 4000d704: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 4000d708: b0 22 00 19 sub %o0, %i1, %i0 4000d70c: 92 10 00 1a mov %i2, %o1 4000d710: 40 00 32 93 call 4001a15c <.urem> 4000d714: 90 10 00 18 mov %i0, %o0 4000d718: 92 10 00 1b mov %i3, %o1 4000d71c: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4000d720: a6 06 00 19 add %i0, %i1, %l3 4000d724: 40 00 32 8e call 4001a15c <.urem> 4000d728: 90 10 00 13 mov %l3, %o0 4000d72c: 90 24 c0 08 sub %l3, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4000d730: 80 a4 c0 08 cmp %l3, %o0 4000d734: 18 bf ff f0 bgu 4000d6f4 <_Heap_Allocate_aligned_with_boundary+0x118> 4000d738: 80 a6 00 08 cmp %i0, %o0 boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4000d73c: 80 a5 80 18 cmp %l6, %i0 4000d740: 18 bf ff bc bgu 4000d630 <_Heap_Allocate_aligned_with_boundary+0x54> 4000d744: 82 10 3f f8 mov -8, %g1 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4000d748: 90 10 00 18 mov %i0, %o0 4000d74c: a6 20 40 12 sub %g1, %l2, %l3 4000d750: 92 10 00 1d mov %i5, %o1 4000d754: 40 00 32 82 call 4001a15c <.urem> 4000d758: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 4000d75c: 90 a4 c0 08 subcc %l3, %o0, %o0 4000d760: 02 bf ff b2 be 4000d628 <_Heap_Allocate_aligned_with_boundary+0x4c> 4000d764: 80 a6 20 00 cmp %i0, 0 4000d768: 80 a5 c0 08 cmp %l7, %o0 4000d76c: 38 bf ff b2 bgu,a 4000d634 <_Heap_Allocate_aligned_with_boundary+0x58> 4000d770: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 4000d774: 80 a6 20 00 cmp %i0, 0 4000d778: 22 bf ff af be,a 4000d634 <_Heap_Allocate_aligned_with_boundary+0x58> 4000d77c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000d780: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000d784: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000d788: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000d78c: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000d790: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000d794: 90 10 00 10 mov %l0, %o0 4000d798: 7f ff e9 b1 call 40007e5c <_Heap_Block_allocate> 4000d79c: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4000d7a0: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 4000d7a4: 80 a0 40 11 cmp %g1, %l1 4000d7a8: 1a 80 00 08 bcc 4000d7c8 <_Heap_Allocate_aligned_with_boundary+0x1ec> 4000d7ac: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000d7b0: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 4000d7b4: 81 c7 e0 08 ret 4000d7b8: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4000d7bc: 08 80 00 07 bleu 4000d7d8 <_Heap_Allocate_aligned_with_boundary+0x1fc> 4000d7c0: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000d7c4: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 4000d7c8: 81 c7 e0 08 ret 4000d7cc: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000d7d0: 10 bf ff f4 b 4000d7a0 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000d7d4: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4000d7d8: 22 bf ff 8b be,a 4000d604 <_Heap_Allocate_aligned_with_boundary+0x28> 4000d7dc: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 4000d7e0: 10 bf ff 8a b 4000d608 <_Heap_Allocate_aligned_with_boundary+0x2c> 4000d7e4: 80 a4 00 12 cmp %l0, %l2 40008de0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 40008de0: 9d e3 bf 88 save %sp, -120, %sp uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 40008de4: 25 10 00 24 sethi %hi(0x40009000), %l2 40008de8: 80 8e a0 ff btst 0xff, %i2 40008dec: a4 14 a3 e0 or %l2, 0x3e0, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 40008df0: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 40008df4: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 40008df8: e8 06 20 24 ld [ %i0 + 0x24 ], %l4 Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 40008dfc: 12 80 00 04 bne 40008e0c <_Heap_Walk+0x2c> 40008e00: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40008e04: 25 10 00 23 sethi %hi(0x40008c00), %l2 40008e08: a4 14 a1 d8 or %l2, 0x1d8, %l2 ! 40008dd8 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 40008e0c: 03 10 00 85 sethi %hi(0x40021400), %g1 40008e10: c2 00 62 10 ld [ %g1 + 0x210 ], %g1 ! 40021610 <_System_state_Current> 40008e14: 80 a0 60 03 cmp %g1, 3 40008e18: 22 80 00 04 be,a 40008e28 <_Heap_Walk+0x48> 40008e1c: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 40008e20: 81 c7 e0 08 ret 40008e24: 91 e8 20 01 restore %g0, 1, %o0 Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 40008e28: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40008e2c: c4 06 20 08 ld [ %i0 + 8 ], %g2 40008e30: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40008e34: 90 10 00 19 mov %i1, %o0 40008e38: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 40008e3c: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 40008e40: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40008e44: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40008e48: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40008e4c: 92 10 20 00 clr %o1 40008e50: 15 10 00 79 sethi %hi(0x4001e400), %o2 40008e54: 96 10 00 15 mov %l5, %o3 40008e58: 94 12 a3 08 or %o2, 0x308, %o2 40008e5c: 9f c4 80 00 call %l2 40008e60: 98 10 00 13 mov %l3, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 40008e64: 80 a5 60 00 cmp %l5, 0 40008e68: 02 80 00 36 be 40008f40 <_Heap_Walk+0x160> 40008e6c: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 40008e70: 12 80 00 3c bne 40008f60 <_Heap_Walk+0x180> 40008e74: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 40008e78: 7f ff e3 13 call 40001ac4 <.urem> 40008e7c: 92 10 00 15 mov %l5, %o1 40008e80: 80 a2 20 00 cmp %o0, 0 40008e84: 12 80 00 40 bne 40008f84 <_Heap_Walk+0x1a4> 40008e88: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 40008e8c: 7f ff e3 0e call 40001ac4 <.urem> 40008e90: 92 10 00 15 mov %l5, %o1 40008e94: 80 a2 20 00 cmp %o0, 0 40008e98: 32 80 00 44 bne,a 40008fa8 <_Heap_Walk+0x1c8> 40008e9c: 90 10 00 19 mov %i1, %o0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 40008ea0: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 40008ea4: ae 8d a0 01 andcc %l6, 1, %l7 40008ea8: 22 80 00 48 be,a 40008fc8 <_Heap_Walk+0x1e8> 40008eac: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 40008eb0: d6 04 00 00 ld [ %l0 ], %o3 40008eb4: 80 a5 40 0b cmp %l5, %o3 40008eb8: 32 80 00 1a bne,a 40008f20 <_Heap_Walk+0x140> 40008ebc: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 40008ec0: c2 05 20 04 ld [ %l4 + 4 ], %g1 40008ec4: 82 08 7f fe and %g1, -2, %g1 40008ec8: 82 05 00 01 add %l4, %g1, %g1 40008ecc: c2 00 60 04 ld [ %g1 + 4 ], %g1 40008ed0: 80 88 60 01 btst 1, %g1 40008ed4: 22 80 01 23 be,a 40009360 <_Heap_Walk+0x580> 40008ed8: 90 10 00 19 mov %i1, %o0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40008edc: e2 06 20 08 ld [ %i0 + 8 ], %l1 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 40008ee0: 80 a6 00 11 cmp %i0, %l1 40008ee4: 02 80 00 6f be 400090a0 <_Heap_Walk+0x2c0> 40008ee8: f4 06 20 10 ld [ %i0 + 0x10 ], %i2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 40008eec: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 40008ef0: 80 a7 00 11 cmp %i4, %l1 40008ef4: 28 80 00 3c bleu,a 40008fe4 <_Heap_Walk+0x204> 40008ef8: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 40008efc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008f00: 96 10 00 11 mov %l1, %o3 40008f04: 92 10 20 01 mov 1, %o1 40008f08: 15 10 00 7a sethi %hi(0x4001e800), %o2 40008f0c: b0 10 20 00 clr %i0 40008f10: 9f c4 80 00 call %l2 40008f14: 94 12 a0 b0 or %o2, 0xb0, %o2 40008f18: 81 c7 e0 08 ret 40008f1c: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 40008f20: 98 10 00 15 mov %l5, %o4 40008f24: 92 10 20 01 mov 1, %o1 40008f28: 15 10 00 7a sethi %hi(0x4001e800), %o2 40008f2c: b0 10 20 00 clr %i0 40008f30: 9f c4 80 00 call %l2 40008f34: 94 12 a0 68 or %o2, 0x68, %o2 40008f38: 81 c7 e0 08 ret 40008f3c: 81 e8 00 00 restore first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 40008f40: 90 10 00 19 mov %i1, %o0 40008f44: 92 10 20 01 mov 1, %o1 40008f48: 15 10 00 79 sethi %hi(0x4001e400), %o2 40008f4c: b0 10 20 00 clr %i0 40008f50: 9f c4 80 00 call %l2 40008f54: 94 12 a3 a0 or %o2, 0x3a0, %o2 40008f58: 81 c7 e0 08 ret 40008f5c: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 40008f60: 90 10 00 19 mov %i1, %o0 40008f64: 96 10 00 15 mov %l5, %o3 40008f68: 92 10 20 01 mov 1, %o1 40008f6c: 15 10 00 79 sethi %hi(0x4001e400), %o2 40008f70: b0 10 20 00 clr %i0 40008f74: 9f c4 80 00 call %l2 40008f78: 94 12 a3 b8 or %o2, 0x3b8, %o2 40008f7c: 81 c7 e0 08 ret 40008f80: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 40008f84: 90 10 00 19 mov %i1, %o0 40008f88: 96 10 00 13 mov %l3, %o3 40008f8c: 92 10 20 01 mov 1, %o1 40008f90: 15 10 00 79 sethi %hi(0x4001e400), %o2 40008f94: b0 10 20 00 clr %i0 40008f98: 9f c4 80 00 call %l2 40008f9c: 94 12 a3 d8 or %o2, 0x3d8, %o2 40008fa0: 81 c7 e0 08 ret 40008fa4: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 40008fa8: 96 10 00 10 mov %l0, %o3 40008fac: 92 10 20 01 mov 1, %o1 40008fb0: 15 10 00 7a sethi %hi(0x4001e800), %o2 40008fb4: b0 10 20 00 clr %i0 40008fb8: 9f c4 80 00 call %l2 40008fbc: 94 12 a0 00 mov %o2, %o2 40008fc0: 81 c7 e0 08 ret 40008fc4: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 40008fc8: 92 10 20 01 mov 1, %o1 40008fcc: 15 10 00 7a sethi %hi(0x4001e800), %o2 40008fd0: b0 10 20 00 clr %i0 40008fd4: 9f c4 80 00 call %l2 40008fd8: 94 12 a0 38 or %o2, 0x38, %o2 40008fdc: 81 c7 e0 08 ret 40008fe0: 81 e8 00 00 restore 40008fe4: 80 a6 c0 11 cmp %i3, %l1 40008fe8: 0a bf ff c6 bcs 40008f00 <_Heap_Walk+0x120> 40008fec: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 40008ff0: 90 04 60 08 add %l1, 8, %o0 40008ff4: 7f ff e2 b4 call 40001ac4 <.urem> 40008ff8: 92 10 00 1a mov %i2, %o1 40008ffc: 80 a2 20 00 cmp %o0, 0 40009000: 12 80 00 df bne 4000937c <_Heap_Walk+0x59c> 40009004: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40009008: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000900c: 82 08 7f fe and %g1, -2, %g1 40009010: 82 04 40 01 add %l1, %g1, %g1 40009014: c2 00 60 04 ld [ %g1 + 4 ], %g1 40009018: 80 88 60 01 btst 1, %g1 4000901c: 12 80 00 ea bne 400093c4 <_Heap_Walk+0x5e4> 40009020: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 40009024: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40009028: 80 a6 00 0c cmp %i0, %o4 4000902c: 02 80 00 19 be 40009090 <_Heap_Walk+0x2b0> 40009030: ba 10 00 11 mov %l1, %i5 40009034: 30 80 00 dc b,a 400093a4 <_Heap_Walk+0x5c4> <== NOT EXECUTED 40009038: 0a bf ff b2 bcs 40008f00 <_Heap_Walk+0x120> 4000903c: 90 10 00 19 mov %i1, %o0 40009040: 80 a6 c0 11 cmp %i3, %l1 40009044: 0a bf ff b0 bcs 40008f04 <_Heap_Walk+0x124> 40009048: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 4000904c: 90 04 60 08 add %l1, 8, %o0 40009050: 7f ff e2 9d call 40001ac4 <.urem> 40009054: 92 10 00 1a mov %i2, %o1 40009058: 80 a2 20 00 cmp %o0, 0 4000905c: 32 80 00 c8 bne,a 4000937c <_Heap_Walk+0x59c> 40009060: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40009064: c2 04 60 04 ld [ %l1 + 4 ], %g1 40009068: 82 08 7f fe and %g1, -2, %g1 4000906c: 82 00 40 11 add %g1, %l1, %g1 40009070: c2 00 60 04 ld [ %g1 + 4 ], %g1 40009074: 80 88 60 01 btst 1, %g1 40009078: 32 80 00 d2 bne,a 400093c0 <_Heap_Walk+0x5e0> 4000907c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 40009080: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40009084: 80 a3 00 1d cmp %o4, %i5 40009088: 12 80 00 c5 bne 4000939c <_Heap_Walk+0x5bc> 4000908c: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 40009090: e2 04 60 08 ld [ %l1 + 8 ], %l1 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 40009094: 80 a6 00 11 cmp %i0, %l1 40009098: 12 bf ff e8 bne 40009038 <_Heap_Walk+0x258> 4000909c: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 400090a0: 80 a5 00 10 cmp %l4, %l0 400090a4: 02 bf ff 5f be 40008e20 <_Heap_Walk+0x40> 400090a8: 37 10 00 7a sethi %hi(0x4001e800), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 400090ac: 35 10 00 7a sethi %hi(0x4001e800), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 400090b0: 39 10 00 7a sethi %hi(0x4001e800), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 400090b4: ba 10 00 15 mov %l5, %i5 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)( 400090b8: b6 16 e1 58 or %i3, 0x158, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 400090bc: b4 16 a1 70 or %i2, 0x170, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 400090c0: b8 17 23 08 or %i4, 0x308, %i4 400090c4: aa 10 00 14 mov %l4, %l5 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 400090c8: ac 0d bf fe and %l6, -2, %l6 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 400090cc: 80 a5 e0 00 cmp %l7, 0 400090d0: 02 80 00 16 be 40009128 <_Heap_Walk+0x348> 400090d4: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 400090d8: 90 10 00 19 mov %i1, %o0 400090dc: 92 10 20 00 clr %o1 400090e0: 94 10 00 1b mov %i3, %o2 400090e4: 96 10 00 10 mov %l0, %o3 400090e8: 9f c4 80 00 call %l2 400090ec: 98 10 00 16 mov %l6, %o4 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 400090f0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 400090f4: 80 a0 40 11 cmp %g1, %l1 400090f8: 28 80 00 18 bleu,a 40009158 <_Heap_Walk+0x378> 400090fc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 40009100: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40009104: 96 10 00 10 mov %l0, %o3 40009108: 98 10 00 11 mov %l1, %o4 4000910c: 92 10 20 01 mov 1, %o1 40009110: 15 10 00 7a sethi %hi(0x4001e800), %o2 40009114: b0 10 20 00 clr %i0 40009118: 9f c4 80 00 call %l2 4000911c: 94 12 a1 98 or %o2, 0x198, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 40009120: 81 c7 e0 08 ret 40009124: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40009128: da 04 00 00 ld [ %l0 ], %o5 4000912c: 90 10 00 19 mov %i1, %o0 40009130: 92 10 20 00 clr %o1 40009134: 94 10 00 1a mov %i2, %o2 40009138: 96 10 00 10 mov %l0, %o3 4000913c: 9f c4 80 00 call %l2 40009140: 98 10 00 16 mov %l6, %o4 40009144: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40009148: 80 a0 40 11 cmp %g1, %l1 4000914c: 18 bf ff ee bgu 40009104 <_Heap_Walk+0x324> 40009150: 90 10 00 19 mov %i1, %o0 40009154: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40009158: 80 a0 40 11 cmp %g1, %l1 4000915c: 0a bf ff ea bcs 40009104 <_Heap_Walk+0x324> 40009160: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 40009164: 90 10 00 16 mov %l6, %o0 40009168: 7f ff e2 57 call 40001ac4 <.urem> 4000916c: 92 10 00 1d mov %i5, %o1 40009170: 80 a2 20 00 cmp %o0, 0 40009174: 12 80 00 5d bne 400092e8 <_Heap_Walk+0x508> 40009178: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 4000917c: 18 80 00 65 bgu 40009310 <_Heap_Walk+0x530> 40009180: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 40009184: 3a 80 00 6e bcc,a 4000933c <_Heap_Walk+0x55c> 40009188: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4000918c: c2 04 60 04 ld [ %l1 + 4 ], %g1 40009190: 80 88 60 01 btst 1, %g1 40009194: 12 80 00 40 bne 40009294 <_Heap_Walk+0x4b4> 40009198: 80 a5 40 11 cmp %l5, %l1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4000919c: e8 04 20 04 ld [ %l0 + 4 ], %l4 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 400091a0: d8 04 20 0c ld [ %l0 + 0xc ], %o4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 400091a4: c2 06 20 08 ld [ %i0 + 8 ], %g1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 400091a8: ac 0d 3f fe and %l4, -2, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 400091ac: 1b 10 00 7a sethi %hi(0x4001e800), %o5 400091b0: 80 a0 40 0c cmp %g1, %o4 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 400091b4: c6 06 20 0c ld [ %i0 + 0xc ], %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 400091b8: ae 04 00 16 add %l0, %l6, %l7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 400091bc: 02 80 00 07 be 400091d8 <_Heap_Walk+0x3f8> 400091c0: 9a 13 62 60 or %o5, 0x260, %o5 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 400091c4: 1b 10 00 7a sethi %hi(0x4001e800), %o5 400091c8: 80 a3 00 18 cmp %o4, %i0 400091cc: 02 80 00 03 be 400091d8 <_Heap_Walk+0x3f8> 400091d0: 9a 13 62 70 or %o5, 0x270, %o5 400091d4: 9a 10 00 1c mov %i4, %o5 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 400091d8: c2 04 20 08 ld [ %l0 + 8 ], %g1 400091dc: 05 10 00 7a sethi %hi(0x4001e800), %g2 400091e0: 80 a0 c0 01 cmp %g3, %g1 400091e4: 02 80 00 07 be 40009200 <_Heap_Walk+0x420> 400091e8: 84 10 a2 80 or %g2, 0x280, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 400091ec: 05 10 00 7a sethi %hi(0x4001e800), %g2 400091f0: 80 a0 40 18 cmp %g1, %i0 400091f4: 02 80 00 03 be 40009200 <_Heap_Walk+0x420> 400091f8: 84 10 a2 90 or %g2, 0x290, %g2 400091fc: 84 10 00 1c mov %i4, %g2 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 40009200: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40009204: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 40009208: 90 10 00 19 mov %i1, %o0 4000920c: 92 10 20 00 clr %o1 40009210: 15 10 00 7a sethi %hi(0x4001e800), %o2 40009214: 96 10 00 10 mov %l0, %o3 40009218: 9f c4 80 00 call %l2 4000921c: 94 12 a2 a0 or %o2, 0x2a0, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 40009220: da 05 c0 00 ld [ %l7 ], %o5 40009224: 80 a5 80 0d cmp %l6, %o5 40009228: 02 80 00 0c be 40009258 <_Heap_Walk+0x478> 4000922c: 90 10 00 19 mov %i1, %o0 (*printer)( 40009230: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 40009234: 96 10 00 10 mov %l0, %o3 40009238: 98 10 00 16 mov %l6, %o4 4000923c: 92 10 20 01 mov 1, %o1 40009240: 15 10 00 7a sethi %hi(0x4001e800), %o2 40009244: b0 10 20 00 clr %i0 40009248: 9f c4 80 00 call %l2 4000924c: 94 12 a2 d0 or %o2, 0x2d0, %o2 40009250: 81 c7 e0 08 ret 40009254: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 40009258: 80 8d 20 01 btst 1, %l4 4000925c: 02 80 00 1c be 400092cc <_Heap_Walk+0x4ec> 40009260: 96 10 00 10 mov %l0, %o3 40009264: c2 06 20 08 ld [ %i0 + 8 ], %g1 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 40009268: 80 a0 40 18 cmp %g1, %i0 4000926c: 12 80 00 07 bne 40009288 <_Heap_Walk+0x4a8> 40009270: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40009274: 10 80 00 0f b 400092b0 <_Heap_Walk+0x4d0> <== NOT EXECUTED 40009278: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 4000927c: 80 a0 40 18 cmp %g1, %i0 40009280: 02 80 00 0a be 400092a8 <_Heap_Walk+0x4c8> 40009284: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 40009288: 32 bf ff fd bne,a 4000927c <_Heap_Walk+0x49c> 4000928c: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40009290: 80 a5 40 11 cmp %l5, %l1 40009294: 02 bf fe e3 be 40008e20 <_Heap_Walk+0x40> 40009298: a0 10 00 11 mov %l1, %l0 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 4000929c: ec 04 60 04 ld [ %l1 + 4 ], %l6 400092a0: 10 bf ff 8a b 400090c8 <_Heap_Walk+0x2e8> 400092a4: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 400092a8: 90 10 00 19 mov %i1, %o0 400092ac: 96 10 00 10 mov %l0, %o3 400092b0: 92 10 20 01 mov 1, %o1 400092b4: 15 10 00 7a sethi %hi(0x4001e800), %o2 400092b8: b0 10 20 00 clr %i0 400092bc: 9f c4 80 00 call %l2 400092c0: 94 12 a3 40 or %o2, 0x340, %o2 400092c4: 81 c7 e0 08 ret 400092c8: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 400092cc: 92 10 20 01 mov 1, %o1 400092d0: 15 10 00 7a sethi %hi(0x4001e800), %o2 400092d4: b0 10 20 00 clr %i0 400092d8: 9f c4 80 00 call %l2 400092dc: 94 12 a3 10 or %o2, 0x310, %o2 400092e0: 81 c7 e0 08 ret 400092e4: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 400092e8: 90 10 00 19 mov %i1, %o0 400092ec: 96 10 00 10 mov %l0, %o3 400092f0: 98 10 00 16 mov %l6, %o4 400092f4: 92 10 20 01 mov 1, %o1 400092f8: 15 10 00 7a sethi %hi(0x4001e800), %o2 400092fc: b0 10 20 00 clr %i0 40009300: 9f c4 80 00 call %l2 40009304: 94 12 a1 c8 or %o2, 0x1c8, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 40009308: 81 c7 e0 08 ret 4000930c: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 40009310: 90 10 00 19 mov %i1, %o0 40009314: 96 10 00 10 mov %l0, %o3 40009318: 98 10 00 16 mov %l6, %o4 4000931c: 9a 10 00 13 mov %l3, %o5 40009320: 92 10 20 01 mov 1, %o1 40009324: 15 10 00 7a sethi %hi(0x4001e800), %o2 40009328: b0 10 20 00 clr %i0 4000932c: 9f c4 80 00 call %l2 40009330: 94 12 a1 f8 or %o2, 0x1f8, %o2 block, block_size, min_block_size ); return false; 40009334: 81 c7 e0 08 ret 40009338: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 4000933c: 96 10 00 10 mov %l0, %o3 40009340: 98 10 00 11 mov %l1, %o4 40009344: 92 10 20 01 mov 1, %o1 40009348: 15 10 00 7a sethi %hi(0x4001e800), %o2 4000934c: b0 10 20 00 clr %i0 40009350: 9f c4 80 00 call %l2 40009354: 94 12 a2 28 or %o2, 0x228, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 40009358: 81 c7 e0 08 ret 4000935c: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 40009360: 92 10 20 01 mov 1, %o1 40009364: 15 10 00 7a sethi %hi(0x4001e800), %o2 40009368: b0 10 20 00 clr %i0 4000936c: 9f c4 80 00 call %l2 40009370: 94 12 a0 98 or %o2, 0x98, %o2 40009374: 81 c7 e0 08 ret 40009378: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 4000937c: 96 10 00 11 mov %l1, %o3 40009380: 92 10 20 01 mov 1, %o1 40009384: 15 10 00 7a sethi %hi(0x4001e800), %o2 40009388: b0 10 20 00 clr %i0 4000938c: 9f c4 80 00 call %l2 40009390: 94 12 a0 d0 or %o2, 0xd0, %o2 40009394: 81 c7 e0 08 ret 40009398: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 4000939c: 90 10 00 19 mov %i1, %o0 400093a0: 96 10 00 11 mov %l1, %o3 400093a4: 92 10 20 01 mov 1, %o1 400093a8: 15 10 00 7a sethi %hi(0x4001e800), %o2 400093ac: b0 10 20 00 clr %i0 400093b0: 9f c4 80 00 call %l2 400093b4: 94 12 a1 20 or %o2, 0x120, %o2 400093b8: 81 c7 e0 08 ret 400093bc: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 400093c0: 96 10 00 11 mov %l1, %o3 400093c4: 92 10 20 01 mov 1, %o1 400093c8: 15 10 00 7a sethi %hi(0x4001e800), %o2 400093cc: b0 10 20 00 clr %i0 400093d0: 9f c4 80 00 call %l2 400093d4: 94 12 a1 00 or %o2, 0x100, %o2 400093d8: 81 c7 e0 08 ret 400093dc: 81 e8 00 00 restore 4000811c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 4000811c: 9d e3 bf 90 save %sp, -112, %sp minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 40008120: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 40008124: 80 a5 20 00 cmp %l4, 0 40008128: 02 80 00 ab be 400083d4 <_Objects_Extend_information+0x2b8> 4000812c: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 40008130: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40008134: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 40008138: ab 2d 60 10 sll %l5, 0x10, %l5 4000813c: 92 10 00 12 mov %l2, %o1 40008140: 40 00 47 5b call 40019eac <.udiv> 40008144: 91 35 60 10 srl %l5, 0x10, %o0 40008148: 91 2a 20 10 sll %o0, 0x10, %o0 4000814c: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 40008150: 80 a7 20 00 cmp %i4, 0 40008154: 02 80 00 a7 be 400083f0 <_Objects_Extend_information+0x2d4> 40008158: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 4000815c: c2 05 00 00 ld [ %l4 ], %g1 40008160: 80 a0 60 00 cmp %g1, 0 40008164: 02 80 00 a4 be 400083f4 <_Objects_Extend_information+0x2d8> 40008168: a2 10 00 13 mov %l3, %l1 4000816c: 10 80 00 06 b 40008184 <_Objects_Extend_information+0x68> 40008170: a0 10 20 00 clr %l0 40008174: c2 05 00 01 ld [ %l4 + %g1 ], %g1 40008178: 80 a0 60 00 cmp %g1, 0 4000817c: 22 80 00 08 be,a 4000819c <_Objects_Extend_information+0x80> 40008180: ab 35 60 10 srl %l5, 0x10, %l5 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008184: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40008188: a2 04 40 12 add %l1, %l2, %l1 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4000818c: 80 a7 00 10 cmp %i4, %l0 40008190: 18 bf ff f9 bgu 40008174 <_Objects_Extend_information+0x58> 40008194: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40008198: ab 35 60 10 srl %l5, 0x10, %l5 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 4000819c: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 400081a0: aa 05 40 08 add %l5, %o0, %l5 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 400081a4: 82 10 63 ff or %g1, 0x3ff, %g1 400081a8: 80 a5 40 01 cmp %l5, %g1 400081ac: 18 80 00 96 bgu 40008404 <_Objects_Extend_information+0x2e8> 400081b0: 01 00 00 00 nop /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 400081b4: 40 00 47 04 call 40019dc4 <.umul> 400081b8: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 400081bc: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 400081c0: 80 a0 60 00 cmp %g1, 0 400081c4: 12 80 00 6d bne 40008378 <_Objects_Extend_information+0x25c> 400081c8: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 400081cc: 40 00 08 bd call 4000a4c0 <_Workspace_Allocate_or_fatal_error> 400081d0: 01 00 00 00 nop 400081d4: a4 10 00 08 mov %o0, %l2 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 400081d8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400081dc: 80 a4 40 01 cmp %l1, %g1 400081e0: 2a 80 00 43 bcs,a 400082ec <_Objects_Extend_information+0x1d0> 400081e4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 400081e8: a8 07 20 01 add %i4, 1, %l4 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 400081ec: 91 2d 20 01 sll %l4, 1, %o0 400081f0: 90 02 00 14 add %o0, %l4, %o0 400081f4: 90 05 40 08 add %l5, %o0, %o0 400081f8: 90 02 00 13 add %o0, %l3, %o0 400081fc: 40 00 08 c0 call 4000a4fc <_Workspace_Allocate> 40008200: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 40008204: ac 92 20 00 orcc %o0, 0, %l6 40008208: 02 80 00 7d be 400083fc <_Objects_Extend_information+0x2e0> 4000820c: a9 2d 20 02 sll %l4, 2, %l4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40008210: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008214: 80 a4 c0 01 cmp %l3, %g1 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 40008218: ae 05 80 14 add %l6, %l4, %l7 4000821c: 0a 80 00 5e bcs 40008394 <_Objects_Extend_information+0x278> 40008220: a8 05 c0 14 add %l7, %l4, %l4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40008224: 80 a4 e0 00 cmp %l3, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40008228: 82 10 20 00 clr %g1 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 4000822c: 02 80 00 08 be 4000824c <_Objects_Extend_information+0x130> 40008230: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 40008234: 85 28 60 02 sll %g1, 2, %g2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40008238: 82 00 60 01 inc %g1 4000823c: 80 a4 c0 01 cmp %l3, %g1 40008240: 18 bf ff fd bgu 40008234 <_Objects_Extend_information+0x118> 40008244: c0 20 80 14 clr [ %g2 + %l4 ] 40008248: bb 2f 20 02 sll %i4, 2, %i5 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4000824c: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40008250: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40008254: 86 04 40 03 add %l1, %g3, %g3 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 40008258: 80 a4 40 03 cmp %l1, %g3 4000825c: 1a 80 00 0a bcc 40008284 <_Objects_Extend_information+0x168> 40008260: c0 25 80 1d clr [ %l6 + %i5 ] 40008264: 85 2c 60 02 sll %l1, 2, %g2 40008268: 82 10 00 11 mov %l1, %g1 4000826c: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 40008270: 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++ ) { 40008274: 82 00 60 01 inc %g1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 40008278: 80 a0 40 03 cmp %g1, %g3 4000827c: 0a bf ff fd bcs 40008270 <_Objects_Extend_information+0x154> 40008280: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40008284: 7f ff e6 e4 call 40001e14 40008288: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4000828c: c6 06 00 00 ld [ %i0 ], %g3 40008290: c4 16 20 04 lduh [ %i0 + 4 ], %g2 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 40008294: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40008298: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 4000829c: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 400082a0: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 400082a4: 87 28 e0 18 sll %g3, 0x18, %g3 400082a8: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 400082ac: ec 26 20 34 st %l6, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 400082b0: ab 2d 60 10 sll %l5, 0x10, %l5 400082b4: 03 00 00 40 sethi %hi(0x10000), %g1 400082b8: ab 35 60 10 srl %l5, 0x10, %l5 400082bc: 82 10 c0 01 or %g3, %g1, %g1 400082c0: 82 10 40 02 or %g1, %g2, %g1 400082c4: 82 10 40 15 or %g1, %l5, %g1 400082c8: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 400082cc: 7f ff e6 d6 call 40001e24 400082d0: 01 00 00 00 nop if ( old_tables ) 400082d4: 80 a4 e0 00 cmp %l3, 0 400082d8: 22 80 00 05 be,a 400082ec <_Objects_Extend_information+0x1d0> 400082dc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 400082e0: 40 00 08 90 call 4000a520 <_Workspace_Free> 400082e4: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 400082e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 400082ec: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 400082f0: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 400082f4: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 400082f8: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400082fc: a6 06 20 20 add %i0, 0x20, %l3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40008300: e4 20 40 10 st %l2, [ %g1 + %l0 ] */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 40008304: 29 00 00 40 sethi %hi(0x10000), %l4 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008308: a4 07 bf f4 add %fp, -12, %l2 4000830c: 40 00 14 09 call 4000d330 <_Chain_Initialize> 40008310: 90 10 00 12 mov %l2, %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 ) { 40008314: 30 80 00 0c b,a 40008344 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 40008318: c4 16 20 04 lduh [ %i0 + 4 ], %g2 4000831c: 83 28 60 18 sll %g1, 0x18, %g1 40008320: 85 28 a0 1b sll %g2, 0x1b, %g2 40008324: 82 10 40 14 or %g1, %l4, %g1 40008328: 82 10 40 02 or %g1, %g2, %g1 4000832c: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40008330: 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( 40008334: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40008338: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4000833c: 7f ff fc e2 call 400076c4 <_Chain_Append> 40008340: 90 10 00 13 mov %l3, %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 ) { 40008344: 40 00 13 e8 call 4000d2e4 <_Chain_Get> 40008348: 90 10 00 12 mov %l2, %o0 4000834c: 80 a2 20 00 cmp %o0, 0 40008350: 32 bf ff f2 bne,a 40008318 <_Objects_Extend_information+0x1fc> 40008354: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 40008358: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4000835c: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 40008360: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 40008364: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008368: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 4000836c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40008370: 81 c7 e0 08 ret 40008374: 81 e8 00 00 restore * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 40008378: 40 00 08 61 call 4000a4fc <_Workspace_Allocate> 4000837c: 01 00 00 00 nop if ( !new_object_block ) 40008380: a4 92 20 00 orcc %o0, 0, %l2 40008384: 32 bf ff 96 bne,a 400081dc <_Objects_Extend_information+0xc0> 40008388: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 4000838c: 81 c7 e0 08 ret 40008390: 81 e8 00 00 restore /* * 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, 40008394: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 40008398: bb 2f 20 02 sll %i4, 2, %i5 /* * 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, 4000839c: 40 00 23 6e call 40011154 400083a0: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 400083a4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 400083a8: 94 10 00 1d mov %i5, %o2 400083ac: 40 00 23 6a call 40011154 400083b0: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 400083b4: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 400083b8: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 400083bc: 94 04 c0 0a add %l3, %o2, %o2 400083c0: 90 10 00 14 mov %l4, %o0 400083c4: 40 00 23 64 call 40011154 400083c8: 95 2a a0 02 sll %o2, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 400083cc: 10 bf ff a1 b 40008250 <_Objects_Extend_information+0x134> 400083d0: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 400083d4: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 400083d8: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 400083dc: ab 2d 60 10 sll %l5, 0x10, %l5 400083e0: a2 10 00 13 mov %l3, %l1 400083e4: a0 10 20 00 clr %l0 400083e8: 10 bf ff 6c b 40008198 <_Objects_Extend_information+0x7c> 400083ec: b8 10 20 00 clr %i4 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 400083f0: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 400083f4: 10 bf ff 69 b 40008198 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 400083f8: a0 10 20 00 clr %l0 <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 400083fc: 40 00 08 49 call 4000a520 <_Workspace_Free> 40008400: 90 10 00 12 mov %l2, %o0 return; 40008404: 81 c7 e0 08 ret 40008408: 81 e8 00 00 restore 40008824 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40008824: 9d e3 bf a0 save %sp, -96, %sp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 40008828: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 4000882c: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 40008830: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40008834: 92 10 00 11 mov %l1, %o1 40008838: 40 00 45 9d call 40019eac <.udiv> 4000883c: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40008840: 80 a2 20 00 cmp %o0, 0 40008844: 02 80 00 12 be 4000888c <_Objects_Shrink_information+0x68> 40008848: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 4000884c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40008850: c4 00 c0 00 ld [ %g3 ], %g2 40008854: 80 a4 40 02 cmp %l1, %g2 40008858: 12 80 00 09 bne 4000887c <_Objects_Shrink_information+0x58> 4000885c: 82 10 20 00 clr %g1 40008860: 10 80 00 0d b 40008894 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 40008864: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 40008868: a0 04 00 11 add %l0, %l1, %l0 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 ] == 4000886c: 80 a4 40 02 cmp %l1, %g2 40008870: 02 80 00 09 be 40008894 <_Objects_Shrink_information+0x70> 40008874: 84 04 a0 04 add %l2, 4, %g2 40008878: a4 10 00 02 mov %g2, %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++ ) { 4000887c: 82 00 60 01 inc %g1 40008880: 80 a2 00 01 cmp %o0, %g1 40008884: 38 bf ff f9 bgu,a 40008868 <_Objects_Shrink_information+0x44> 40008888: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 4000888c: 81 c7 e0 08 ret 40008890: 81 e8 00 00 restore information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 40008894: 10 80 00 06 b 400088ac <_Objects_Shrink_information+0x88> 40008898: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 4000889c: 80 a4 60 00 cmp %l1, 0 400088a0: 22 80 00 12 be,a 400088e8 <_Objects_Shrink_information+0xc4> 400088a4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400088a8: 90 10 00 11 mov %l1, %o0 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 400088ac: c2 12 20 0a lduh [ %o0 + 0xa ], %g1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 400088b0: 80 a0 40 10 cmp %g1, %l0 400088b4: 0a bf ff fa bcs 4000889c <_Objects_Shrink_information+0x78> 400088b8: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 400088bc: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 400088c0: 84 04 00 02 add %l0, %g2, %g2 400088c4: 80 a0 40 02 cmp %g1, %g2 400088c8: 1a bf ff f6 bcc 400088a0 <_Objects_Shrink_information+0x7c> 400088cc: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 400088d0: 40 00 12 7b call 4000d2bc <_Chain_Extract> 400088d4: 01 00 00 00 nop } } while ( the_object ); 400088d8: 80 a4 60 00 cmp %l1, 0 400088dc: 12 bf ff f4 bne 400088ac <_Objects_Shrink_information+0x88> 400088e0: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 400088e4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 400088e8: 40 00 07 0e call 4000a520 <_Workspace_Free> 400088ec: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400088f0: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 400088f4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 400088f8: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 400088fc: c4 16 20 14 lduh [ %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; information->inactive_per_block[ block ] = 0; 40008900: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 40008904: 84 20 c0 02 sub %g3, %g2, %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40008908: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 4000890c: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 40008910: 81 c7 e0 08 ret 40008914: 81 e8 00 00 restore 4000cae0 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000cae0: c4 02 21 60 ld [ %o0 + 0x160 ], %g2 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4000cae4: c6 00 a0 88 ld [ %g2 + 0x88 ], %g3 4000cae8: 05 10 00 78 sethi %hi(0x4001e000), %g2 4000caec: d2 08 a1 d4 ldub [ %g2 + 0x1d4 ], %o1 ! 4001e1d4 */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4000caf0: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 4000caf4: 92 22 40 03 sub %o1, %g3, %o1 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4000caf8: 86 10 3f ff mov -1, %g3 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4000cafc: d2 22 20 18 st %o1, [ %o0 + 0x18 ] */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4000cb00: 80 a0 a0 00 cmp %g2, 0 4000cb04: 12 80 00 06 bne 4000cb1c <_POSIX_Threads_Sporadic_budget_callout+0x3c> 4000cb08: c6 22 20 78 st %g3, [ %o0 + 0x78 ] /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4000cb0c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000cb10: 80 a0 40 09 cmp %g1, %o1 4000cb14: 0a 80 00 04 bcs 4000cb24 <_POSIX_Threads_Sporadic_budget_callout+0x44> 4000cb18: 94 10 20 01 mov 1, %o2 4000cb1c: 81 c3 e0 08 retl <== NOT EXECUTED 4000cb20: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( the_thread, new_priority, true ); 4000cb24: 82 13 c0 00 mov %o7, %g1 4000cb28: 7f ff ef 95 call 4000897c <_Thread_Change_priority> 4000cb2c: 9e 10 40 00 mov %g1, %o7 4000cb30: 01 00 00 00 nop 40006e94 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 40006e94: 9d e3 bf a0 save %sp, -96, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 40006e98: c4 06 60 68 ld [ %i1 + 0x68 ], %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40006e9c: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 40006ea0: 84 00 a0 01 inc %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40006ea4: 80 a0 60 00 cmp %g1, 0 40006ea8: 12 80 00 0e bne 40006ee0 <_POSIX_Timer_TSR+0x4c> 40006eac: c4 26 60 68 st %g2, [ %i1 + 0x68 ] ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 40006eb0: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 40006eb4: 80 a0 60 00 cmp %g1, 0 40006eb8: 32 80 00 0b bne,a 40006ee4 <_POSIX_Timer_TSR+0x50> 40006ebc: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 40006ec0: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 40006ec4: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 40006ec8: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 40006ecc: 40 00 19 98 call 4000d52c 40006ed0: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 40006ed4: c0 26 60 68 clr [ %i1 + 0x68 ] 40006ed8: 81 c7 e0 08 ret 40006edc: 81 e8 00 00 restore ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 40006ee0: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 40006ee4: d4 06 60 08 ld [ %i1 + 8 ], %o2 40006ee8: 90 06 60 10 add %i1, 0x10, %o0 40006eec: 17 10 00 1b sethi %hi(0x40006c00), %o3 40006ef0: 98 10 00 19 mov %i1, %o4 40006ef4: 40 00 1a bc call 4000d9e4 <_POSIX_Timer_Insert_helper> 40006ef8: 96 12 e2 94 or %o3, 0x294, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 40006efc: 80 8a 20 ff btst 0xff, %o0 40006f00: 02 bf ff f6 be 40006ed8 <_POSIX_Timer_TSR+0x44> 40006f04: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 40006f08: 40 00 05 da call 40008670 <_TOD_Get> 40006f0c: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 40006f10: 82 10 20 03 mov 3, %g1 /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40006f14: 10 bf ff ed b 40006ec8 <_POSIX_Timer_TSR+0x34> 40006f18: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 40010488 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 40010488: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4001048c: 7f ff c6 62 call 40001e14 40010490: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 40010494: 85 2e 20 04 sll %i0, 4, %g2 40010498: 83 2e 20 02 sll %i0, 2, %g1 4001049c: 82 20 80 01 sub %g2, %g1, %g1 400104a0: 05 10 00 7c sethi %hi(0x4001f000), %g2 400104a4: 84 10 a2 24 or %g2, 0x224, %g2 ! 4001f224 <_POSIX_signals_Vectors> 400104a8: c4 00 80 01 ld [ %g2 + %g1 ], %g2 400104ac: 80 a0 a0 02 cmp %g2, 2 400104b0: 02 80 00 11 be 400104f4 <_POSIX_signals_Clear_process_signals+0x6c> 400104b4: 05 10 00 7c sethi %hi(0x4001f000), %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 400104b8: 05 10 00 7c sethi %hi(0x4001f000), %g2 400104bc: c6 00 a3 f0 ld [ %g2 + 0x3f0 ], %g3 ! 4001f3f0 <_POSIX_signals_Pending> 400104c0: b0 06 3f ff add %i0, -1, %i0 400104c4: 82 10 20 01 mov 1, %g1 400104c8: 83 28 40 18 sll %g1, %i0, %g1 400104cc: 82 28 c0 01 andn %g3, %g1, %g1 if ( !_POSIX_signals_Pending ) 400104d0: 80 a0 60 00 cmp %g1, 0 400104d4: 12 80 00 06 bne 400104ec <_POSIX_signals_Clear_process_signals+0x64> 400104d8: c2 20 a3 f0 st %g1, [ %g2 + 0x3f0 ] _Thread_Do_post_task_switch_extension--; 400104dc: 03 10 00 7b sethi %hi(0x4001ec00), %g1 400104e0: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001ed30 <_Thread_Do_post_task_switch_extension> 400104e4: 84 00 bf ff add %g2, -1, %g2 400104e8: c4 20 61 30 st %g2, [ %g1 + 0x130 ] } _ISR_Enable( level ); 400104ec: 7f ff c6 4e call 40001e24 400104f0: 91 e8 00 08 restore %g0, %o0, %o0 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 400104f4: 84 10 a3 f4 or %g2, 0x3f4, %g2 400104f8: c6 00 40 02 ld [ %g1 + %g2 ], %g3 400104fc: 82 00 40 02 add %g1, %g2, %g1 40010500: 82 00 60 04 add %g1, 4, %g1 40010504: 80 a0 c0 01 cmp %g3, %g1 40010508: 02 bf ff ed be 400104bc <_POSIX_signals_Clear_process_signals+0x34> 4001050c: 05 10 00 7c sethi %hi(0x4001f000), %g2 if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 40010510: 7f ff c6 45 call 40001e24 <== NOT EXECUTED 40010514: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40010518: 01 00 00 00 nop 4001055c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4001055c: 9d e3 bf a0 save %sp, -96, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40010560: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40010564: 05 04 00 20 sethi %hi(0x10008000), %g2 40010568: 88 06 7f ff add %i1, -1, %g4 4001056c: 9a 08 40 02 and %g1, %g2, %o5 40010570: 86 10 20 01 mov 1, %g3 40010574: 80 a3 40 02 cmp %o5, %g2 40010578: 89 28 c0 04 sll %g3, %g4, %g4 4001057c: 02 80 00 25 be 40010610 <_POSIX_signals_Unblock_thread+0xb4> 40010580: c4 06 21 60 ld [ %i0 + 0x160 ], %g2 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 40010584: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 40010588: 80 a9 00 02 andncc %g4, %g2, %g0 4001058c: 02 80 00 1f be 40010608 <_POSIX_signals_Unblock_thread+0xac> 40010590: 05 04 00 00 sethi %hi(0x10000000), %g2 * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40010594: 80 88 40 02 btst %g1, %g2 40010598: 02 80 00 11 be 400105dc <_POSIX_signals_Unblock_thread+0x80> 4001059c: c6 2e 20 74 stb %g3, [ %i0 + 0x74 ] the_thread->Wait.return_code = EINTR; 400105a0: 84 10 20 04 mov 4, %g2 #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 400105a4: 80 88 60 08 btst 8, %g1 400105a8: 02 80 00 18 be 40010608 <_POSIX_signals_Unblock_thread+0xac> 400105ac: c4 26 20 34 st %g2, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 400105b0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400105b4: 80 a0 60 02 cmp %g1, 2 400105b8: 02 80 00 36 be 40010690 <_POSIX_signals_Unblock_thread+0x134> 400105bc: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400105c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400105c4: 13 04 00 ff sethi %hi(0x1003fc00), %o1 400105c8: b0 10 20 00 clr %i0 400105cc: 7f ff e1 70 call 40008b8c <_Thread_Clear_state> 400105d0: 92 12 63 f8 or %o1, 0x3f8, %o1 400105d4: 81 c7 e0 08 ret 400105d8: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 400105dc: 80 a0 60 00 cmp %g1, 0 400105e0: 12 80 00 0a bne 40010608 <_POSIX_signals_Unblock_thread+0xac> 400105e4: 03 10 00 7b sethi %hi(0x4001ec00), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 400105e8: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001ed28 <_ISR_Nest_level> 400105ec: 80 a0 60 00 cmp %g1, 0 400105f0: 02 80 00 06 be 40010608 <_POSIX_signals_Unblock_thread+0xac> 400105f4: 03 10 00 7b sethi %hi(0x4001ec00), %g1 400105f8: c2 00 61 4c ld [ %g1 + 0x14c ], %g1 ! 4001ed4c <_Thread_Executing> 400105fc: 80 a6 00 01 cmp %i0, %g1 40010600: 02 80 00 21 be 40010684 <_POSIX_signals_Unblock_thread+0x128> 40010604: 03 10 00 7b sethi %hi(0x4001ec00), %g1 _ISR_Signals_to_thread_executing = true; } } return false; } 40010608: 81 c7 e0 08 ret 4001060c: 91 e8 20 00 restore %g0, 0, %o0 * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 40010610: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40010614: 80 89 00 01 btst %g4, %g1 40010618: 22 80 00 12 be,a 40010660 <_POSIX_signals_Unblock_thread+0x104> 4001061c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 the_thread->Wait.return_code = EINTR; 40010620: 82 10 20 04 mov 4, %g1 40010624: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 40010628: 80 a6 a0 00 cmp %i2, 0 4001062c: 02 80 00 11 be 40010670 <_POSIX_signals_Unblock_thread+0x114> 40010630: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 40010634: c4 06 80 00 ld [ %i2 ], %g2 40010638: c4 20 40 00 st %g2, [ %g1 ] 4001063c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 40010640: c4 20 60 04 st %g2, [ %g1 + 4 ] 40010644: c4 06 a0 08 ld [ %i2 + 8 ], %g2 40010648: c4 20 60 08 st %g2, [ %g1 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 4001064c: 90 10 00 18 mov %i0, %o0 40010650: 7f ff e4 43 call 4000975c <_Thread_queue_Extract_with_proxy> 40010654: b0 10 20 01 mov 1, %i0 return true; 40010658: 81 c7 e0 08 ret 4001065c: 81 e8 00 00 restore * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 40010660: 80 a9 00 01 andncc %g4, %g1, %g0 40010664: 12 bf ff f0 bne 40010624 <_POSIX_signals_Unblock_thread+0xc8> 40010668: 82 10 20 04 mov 4, %g1 4001066c: 30 bf ff e7 b,a 40010608 <_POSIX_signals_Unblock_thread+0xac> the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 40010670: 84 10 20 01 mov 1, %g2 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 40010674: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 40010678: c0 20 60 08 clr [ %g1 + 8 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 4001067c: 10 bf ff f4 b 4001064c <_POSIX_signals_Unblock_thread+0xf0> 40010680: c4 20 60 04 st %g2, [ %g1 + 4 ] (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 40010684: c6 28 61 e8 stb %g3, [ %g1 + 0x1e8 ] 40010688: 81 c7 e0 08 ret 4001068c: 91 e8 20 00 restore %g0, 0, %o0 _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 40010690: 7f ff e7 2c call 4000a340 <_Watchdog_Remove> 40010694: 90 06 20 48 add %i0, 0x48, %o0 40010698: 10 bf ff cb b 400105c4 <_POSIX_signals_Unblock_thread+0x68> 4001069c: 90 10 00 18 mov %i0, %o0 4000897c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4000897c: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 40008980: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 40008984: 40 00 04 4d call 40009ab8 <_Thread_Set_transient> 40008988: 90 10 00 18 mov %i0, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 4000898c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008990: 80 a0 40 19 cmp %g1, %i1 40008994: 02 80 00 05 be 400089a8 <_Thread_Change_priority+0x2c> 40008998: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 4000899c: 92 10 00 19 mov %i1, %o1 400089a0: 40 00 03 ca call 400098c8 <_Thread_Set_priority> 400089a4: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 400089a8: 7f ff e5 1b call 40001e14 400089ac: 01 00 00 00 nop 400089b0: b0 10 00 08 mov %o0, %i0 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 400089b4: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 400089b8: 80 a4 a0 04 cmp %l2, 4 400089bc: 02 80 00 18 be 40008a1c <_Thread_Change_priority+0xa0> 400089c0: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 400089c4: 02 80 00 0b be 400089f0 <_Thread_Change_priority+0x74> 400089c8: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 400089cc: 7f ff e5 16 call 40001e24 <== NOT EXECUTED 400089d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 400089d4: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 400089d8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 400089dc: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 400089e0: 32 80 00 0d bne,a 40008a14 <_Thread_Change_priority+0x98> <== NOT EXECUTED 400089e4: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 400089e8: 81 c7 e0 08 ret 400089ec: 81 e8 00 00 restore */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 400089f0: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 400089f4: 7f ff e5 0c call 40001e24 400089f8: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 400089fc: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008a00: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40008a04: 80 8c 80 01 btst %l2, %g1 40008a08: 02 bf ff f8 be 400089e8 <_Thread_Change_priority+0x6c> 40008a0c: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 40008a10: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 40008a14: 40 00 03 7d call 40009808 <_Thread_queue_Requeue> 40008a18: 93 e8 00 10 restore %g0, %l0, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 40008a1c: 12 80 00 14 bne 40008a6c <_Thread_Change_priority+0xf0> 40008a20: 23 10 00 7b sethi %hi(0x4001ec00), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40008a24: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40008a28: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 40008a2c: c6 10 40 00 lduh [ %g1 ], %g3 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 40008a30: c0 24 20 10 clr [ %l0 + 0x10 ] 40008a34: 84 10 c0 02 or %g3, %g2, %g2 40008a38: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 40008a3c: c4 14 61 40 lduh [ %l1 + 0x140 ], %g2 40008a40: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 40008a44: 80 8e a0 ff btst 0xff, %i2 40008a48: 82 10 80 01 or %g2, %g1, %g1 40008a4c: c2 34 61 40 sth %g1, [ %l1 + 0x140 ] 40008a50: 02 80 00 48 be 40008b70 <_Thread_Change_priority+0x1f4> 40008a54: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40008a58: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40008a5c: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 40008a60: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 40008a64: e0 20 a0 04 st %l0, [ %g2 + 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; 40008a68: c4 24 00 00 st %g2, [ %l0 ] _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 40008a6c: 7f ff e4 ee call 40001e24 40008a70: 90 10 00 18 mov %i0, %o0 40008a74: 7f ff e4 e8 call 40001e14 40008a78: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 40008a7c: c2 14 61 40 lduh [ %l1 + 0x140 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 40008a80: 05 10 00 7a sethi %hi(0x4001e800), %g2 40008a84: 83 28 60 10 sll %g1, 0x10, %g1 40008a88: da 00 a3 e4 ld [ %g2 + 0x3e4 ], %o5 40008a8c: 85 30 60 10 srl %g1, 0x10, %g2 40008a90: 80 a0 a0 ff cmp %g2, 0xff 40008a94: 08 80 00 27 bleu 40008b30 <_Thread_Change_priority+0x1b4> 40008a98: 07 10 00 74 sethi %hi(0x4001d000), %g3 40008a9c: 83 30 60 18 srl %g1, 0x18, %g1 40008aa0: 86 10 e2 c8 or %g3, 0x2c8, %g3 40008aa4: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008aa8: 09 10 00 7b sethi %hi(0x4001ec00), %g4 40008aac: 85 28 a0 10 sll %g2, 0x10, %g2 40008ab0: 88 11 21 c0 or %g4, 0x1c0, %g4 40008ab4: 83 30 a0 0f srl %g2, 0xf, %g1 40008ab8: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40008abc: 83 28 60 10 sll %g1, 0x10, %g1 40008ac0: 89 30 60 10 srl %g1, 0x10, %g4 40008ac4: 80 a1 20 ff cmp %g4, 0xff 40008ac8: 18 80 00 28 bgu 40008b68 <_Thread_Change_priority+0x1ec> 40008acc: 83 30 60 18 srl %g1, 0x18, %g1 40008ad0: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40008ad4: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40008ad8: 85 30 a0 0c srl %g2, 0xc, %g2 40008adc: 83 28 60 10 sll %g1, 0x10, %g1 40008ae0: 83 30 60 10 srl %g1, 0x10, %g1 40008ae4: 82 00 40 02 add %g1, %g2, %g1 40008ae8: 85 28 60 04 sll %g1, 4, %g2 40008aec: 83 28 60 02 sll %g1, 2, %g1 40008af0: 82 20 80 01 sub %g2, %g1, %g1 40008af4: c2 03 40 01 ld [ %o5 + %g1 ], %g1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 40008af8: 05 10 00 7b sethi %hi(0x4001ec00), %g2 40008afc: c4 00 a1 4c ld [ %g2 + 0x14c ], %g2 ! 4001ed4c <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40008b00: 07 10 00 7b sethi %hi(0x4001ec00), %g3 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 40008b04: 80 a0 40 02 cmp %g1, %g2 40008b08: 02 80 00 08 be 40008b28 <_Thread_Change_priority+0x1ac> 40008b0c: c2 20 e1 1c st %g1, [ %g3 + 0x11c ] _Thread_Executing->is_preemptible ) 40008b10: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 40008b14: 80 a0 60 00 cmp %g1, 0 40008b18: 02 80 00 04 be 40008b28 <_Thread_Change_priority+0x1ac> 40008b1c: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 40008b20: 03 10 00 7b sethi %hi(0x4001ec00), %g1 40008b24: c4 28 61 5c stb %g2, [ %g1 + 0x15c ] ! 4001ed5c <_Context_Switch_necessary> _ISR_Enable( level ); 40008b28: 7f ff e4 bf call 40001e24 40008b2c: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 40008b30: 86 10 e2 c8 or %g3, 0x2c8, %g3 40008b34: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008b38: 09 10 00 7b sethi %hi(0x4001ec00), %g4 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 40008b3c: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008b40: 88 11 21 c0 or %g4, 0x1c0, %g4 40008b44: 85 28 a0 10 sll %g2, 0x10, %g2 40008b48: 83 30 a0 0f srl %g2, 0xf, %g1 40008b4c: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40008b50: 83 28 60 10 sll %g1, 0x10, %g1 40008b54: 89 30 60 10 srl %g1, 0x10, %g4 40008b58: 80 a1 20 ff cmp %g4, 0xff 40008b5c: 28 bf ff de bleu,a 40008ad4 <_Thread_Change_priority+0x158> 40008b60: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40008b64: 83 30 60 18 srl %g1, 0x18, %g1 40008b68: 10 bf ff dc b 40008ad8 <_Thread_Change_priority+0x15c> 40008b6c: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008b70: 84 00 60 04 add %g1, 4, %g2 40008b74: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 40008b78: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 40008b7c: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008b80: c4 24 20 04 st %g2, [ %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; 40008b84: 10 bf ff ba b 40008a6c <_Thread_Change_priority+0xf0> 40008b88: e0 20 80 00 st %l0, [ %g2 ] 40009d2c <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 40009d2c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 40009d30: 03 10 00 7b sethi %hi(0x4001ec00), %g1 40009d34: e0 00 61 4c ld [ %g1 + 0x14c ], %l0 ! 4001ed4c <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 40009d38: 7f ff e0 37 call 40001e14 40009d3c: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 40009d40: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 40009d44: c4 04 40 00 ld [ %l1 ], %g2 40009d48: c2 04 60 08 ld [ %l1 + 8 ], %g1 40009d4c: 80 a0 80 01 cmp %g2, %g1 40009d50: 02 80 00 19 be 40009db4 <_Thread_Yield_processor+0x88> 40009d54: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40009d58: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 40009d5c: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 40009d60: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009d64: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40009d68: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 40009d6c: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 40009d70: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40009d74: 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; 40009d78: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 40009d7c: 7f ff e0 2a call 40001e24 40009d80: 01 00 00 00 nop 40009d84: 7f ff e0 24 call 40001e14 40009d88: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 40009d8c: 03 10 00 7b sethi %hi(0x4001ec00), %g1 40009d90: c4 00 61 1c ld [ %g1 + 0x11c ], %g2 ! 4001ed1c <_Thread_Heir> 40009d94: 80 a4 00 02 cmp %l0, %g2 40009d98: 22 80 00 0e be,a 40009dd0 <_Thread_Yield_processor+0xa4> 40009d9c: c4 04 40 00 ld [ %l1 ], %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 40009da0: 84 10 20 01 mov 1, %g2 40009da4: 03 10 00 7b sethi %hi(0x4001ec00), %g1 40009da8: c4 28 61 5c stb %g2, [ %g1 + 0x15c ] ! 4001ed5c <_Context_Switch_necessary> _ISR_Enable( level ); 40009dac: 7f ff e0 1e call 40001e24 40009db0: 81 e8 00 00 restore if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 40009db4: 03 10 00 7b sethi %hi(0x4001ec00), %g1 40009db8: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 4001ed1c <_Thread_Heir> 40009dbc: 80 a4 00 01 cmp %l0, %g1 40009dc0: 32 bf ff f9 bne,a 40009da4 <_Thread_Yield_processor+0x78> 40009dc4: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 40009dc8: 7f ff e0 17 call 40001e24 40009dcc: 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; 40009dd0: 10 bf ff f4 b 40009da0 <_Thread_Yield_processor+0x74> 40009dd4: c4 20 61 1c st %g2, [ %g1 + 0x11c ] 4000954c <_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 ) { 4000954c: 9d e3 bf a0 save %sp, -96, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 40009550: e0 06 60 14 ld [ %i1 + 0x14 ], %l0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009554: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40009558: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000955c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009560: 82 06 60 38 add %i1, 0x38, %g1 40009564: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 40009568: 2d 10 00 78 sethi %hi(0x4001e000), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 4000956c: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40009570: 80 8c 20 20 btst 0x20, %l0 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40009574: ab 28 60 04 sll %g1, 4, %l5 40009578: ac 15 a1 d4 or %l6, 0x1d4, %l6 4000957c: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 40009580: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40009584: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40009588: 12 80 00 24 bne 40009618 <_Thread_queue_Enqueue_priority+0xcc> 4000958c: aa 06 00 15 add %i0, %l5, %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40009590: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40009594: 7f ff e2 20 call 40001e14 40009598: 01 00 00 00 nop 4000959c: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 400095a0: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400095a4: 80 a0 40 16 cmp %g1, %l6 400095a8: 02 80 00 3a be 40009690 <_Thread_queue_Enqueue_priority+0x144> 400095ac: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 400095b0: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 400095b4: 80 a4 00 13 cmp %l0, %l3 400095b8: 18 80 00 0b bgu 400095e4 <_Thread_queue_Enqueue_priority+0x98> 400095bc: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400095c0: 10 80 00 36 b 40009698 <_Thread_queue_Enqueue_priority+0x14c> 400095c4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 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 ) ) { 400095c8: 80 a4 40 16 cmp %l1, %l6 400095cc: 02 80 00 32 be 40009694 <_Thread_queue_Enqueue_priority+0x148> 400095d0: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 400095d4: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 400095d8: 80 a4 00 13 cmp %l0, %l3 400095dc: 28 80 00 2f bleu,a 40009698 <_Thread_queue_Enqueue_priority+0x14c> 400095e0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 400095e4: 7f ff e2 10 call 40001e24 400095e8: 90 10 00 12 mov %l2, %o0 400095ec: 7f ff e2 0a call 40001e14 400095f0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400095f4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400095f8: 80 8d 00 01 btst %l4, %g1 400095fc: 32 bf ff f3 bne,a 400095c8 <_Thread_queue_Enqueue_priority+0x7c> 40009600: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40009604: 7f ff e2 08 call 40001e24 <== NOT EXECUTED 40009608: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 4000960c: 30 bf ff e2 b,a 40009594 <_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 ); 40009610: 7f ff e2 05 call 40001e24 40009614: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40009618: 7f ff e1 ff call 40001e14 4000961c: e6 0d 80 00 ldub [ %l6 ], %l3 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40009620: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 40009624: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 40009628: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4000962c: 80 a0 40 15 cmp %g1, %l5 40009630: 02 80 00 20 be 400096b0 <_Thread_queue_Enqueue_priority+0x164> 40009634: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 40009638: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 4000963c: 80 a4 00 13 cmp %l0, %l3 40009640: 0a 80 00 0b bcs 4000966c <_Thread_queue_Enqueue_priority+0x120> 40009644: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40009648: 10 80 00 1b b 400096b4 <_Thread_queue_Enqueue_priority+0x168> 4000964c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 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 ) ) { 40009650: 80 a4 40 15 cmp %l1, %l5 40009654: 02 80 00 17 be 400096b0 <_Thread_queue_Enqueue_priority+0x164> 40009658: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 4000965c: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 40009660: 80 a4 00 13 cmp %l0, %l3 40009664: 3a 80 00 14 bcc,a 400096b4 <_Thread_queue_Enqueue_priority+0x168> 40009668: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4000966c: 7f ff e1 ee call 40001e24 40009670: 90 10 00 12 mov %l2, %o0 40009674: 7f ff e1 e8 call 40001e14 40009678: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000967c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40009680: 80 8d 00 01 btst %l4, %g1 40009684: 32 bf ff f3 bne,a 40009650 <_Thread_queue_Enqueue_priority+0x104> 40009688: e2 04 60 04 ld [ %l1 + 4 ], %l1 4000968c: 30 bf ff e1 b,a 40009610 <_Thread_queue_Enqueue_priority+0xc4> 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 ) ) { 40009690: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40009694: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 40009698: 80 a0 a0 01 cmp %g2, 1 4000969c: 02 80 00 17 be 400096f8 <_Thread_queue_Enqueue_priority+0x1ac> 400096a0: 80 a4 00 13 cmp %l0, %l3 * 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; 400096a4: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 400096a8: 81 c7 e0 08 ret 400096ac: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400096b0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400096b4: 80 a0 a0 01 cmp %g2, 1 400096b8: 32 bf ff fc bne,a 400096a8 <_Thread_queue_Enqueue_priority+0x15c> 400096bc: e4 26 80 00 st %l2, [ %i2 ] THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 400096c0: 80 a4 00 13 cmp %l0, %l3 400096c4: 02 80 00 1a be 4000972c <_Thread_queue_Enqueue_priority+0x1e0> 400096c8: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400096cc: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400096d0: c2 26 60 04 st %g1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 400096d4: c4 26 40 00 st %g2, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 400096d8: f0 26 60 44 st %i0, [ %i1 + 0x44 ] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 400096dc: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 400096e0: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 400096e4: b0 10 20 01 mov 1, %i0 400096e8: 7f ff e1 cf call 40001e24 400096ec: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 400096f0: 81 c7 e0 08 ret 400096f4: 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 ) 400096f8: 02 80 00 0d be 4000972c <_Thread_queue_Enqueue_priority+0x1e0> 400096fc: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40009700: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009704: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40009708: 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; 4000970c: f0 26 60 44 st %i0, [ %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; 40009710: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40009714: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009718: b0 10 20 01 mov 1, %i0 4000971c: 7f ff e1 c2 call 40001e24 40009720: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40009724: 81 c7 e0 08 ret 40009728: 81 e8 00 00 restore 4000972c: a2 04 60 3c add %l1, 0x3c, %l1 _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; 40009730: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009734: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40009738: 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; 4000973c: f0 26 60 44 st %i0, [ %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; 40009740: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40009744: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009748: b0 10 20 01 mov 1, %i0 4000974c: 7f ff e1 b6 call 40001e24 40009750: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40009754: 81 c7 e0 08 ret 40009758: 81 e8 00 00 restore 40009808 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009808: 9d e3 bf 98 save %sp, -104, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 4000980c: 80 a6 20 00 cmp %i0, 0 40009810: 02 80 00 13 be 4000985c <_Thread_queue_Requeue+0x54> 40009814: 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 ) { 40009818: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 4000981c: 80 a4 60 01 cmp %l1, 1 40009820: 02 80 00 04 be 40009830 <_Thread_queue_Requeue+0x28> 40009824: 01 00 00 00 nop 40009828: 81 c7 e0 08 ret <== NOT EXECUTED 4000982c: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40009830: 7f ff e1 79 call 40001e14 40009834: 01 00 00 00 nop 40009838: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000983c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40009840: 03 00 00 ef sethi %hi(0x3bc00), %g1 40009844: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40009848: 80 88 80 01 btst %g2, %g1 4000984c: 12 80 00 06 bne 40009864 <_Thread_queue_Requeue+0x5c> 40009850: 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 ); 40009854: 7f ff e1 74 call 40001e24 40009858: 90 10 00 10 mov %l0, %o0 4000985c: 81 c7 e0 08 ret 40009860: 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 ); 40009864: 92 10 00 19 mov %i1, %o1 40009868: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 4000986c: 40 00 10 cc call 4000db9c <_Thread_queue_Extract_priority_helper> 40009870: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 40009874: 90 10 00 18 mov %i0, %o0 40009878: 92 10 00 19 mov %i1, %o1 4000987c: 7f ff ff 34 call 4000954c <_Thread_queue_Enqueue_priority> 40009880: 94 07 bf fc add %fp, -4, %o2 40009884: 30 bf ff f4 b,a 40009854 <_Thread_queue_Requeue+0x4c> 40016cd0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40016cd0: 9d e3 bf 88 save %sp, -120, %sp 40016cd4: 2d 10 00 fc sethi %hi(0x4003f000), %l6 40016cd8: ba 07 bf f4 add %fp, -12, %i5 40016cdc: a8 07 bf f8 add %fp, -8, %l4 40016ce0: a4 07 bf e8 add %fp, -24, %l2 40016ce4: ae 07 bf ec add %fp, -20, %l7 40016ce8: 2b 10 00 fc sethi %hi(0x4003f000), %l5 40016cec: 39 10 00 fc sethi %hi(0x4003f000), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40016cf0: c0 27 bf f8 clr [ %fp + -8 ] 40016cf4: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40016cf8: fa 27 bf fc st %i5, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40016cfc: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40016d00: e4 27 bf f0 st %l2, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40016d04: ee 27 bf e8 st %l7, [ %fp + -24 ] 40016d08: ac 15 a3 c4 or %l6, 0x3c4, %l6 40016d0c: aa 15 63 00 or %l5, 0x300, %l5 40016d10: b8 17 22 70 or %i4, 0x270, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d14: a2 06 20 30 add %i0, 0x30, %l1 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d18: a6 06 20 68 add %i0, 0x68, %l3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40016d1c: b2 06 20 08 add %i0, 8, %i1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40016d20: b4 06 20 40 add %i0, 0x40, %i2 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 40016d24: b6 10 20 01 mov 1, %i3 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 40016d28: fa 26 20 78 st %i5, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40016d2c: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40016d30: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d34: 90 10 00 11 mov %l1, %o0 40016d38: 92 20 40 09 sub %g1, %o1, %o1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40016d3c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d40: 40 00 12 3c call 4001b630 <_Watchdog_Adjust_to_chain> 40016d44: 94 10 00 12 mov %l2, %o2 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40016d48: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40016d4c: e0 05 40 00 ld [ %l5 ], %l0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 40016d50: 80 a4 00 09 cmp %l0, %o1 40016d54: 38 80 00 2f bgu,a 40016e10 <_Timer_server_Body+0x140> 40016d58: 92 24 00 09 sub %l0, %o1, %o1 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 40016d5c: 80 a4 00 09 cmp %l0, %o1 40016d60: 0a 80 00 30 bcs 40016e20 <_Timer_server_Body+0x150> 40016d64: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 40016d68: e0 26 20 74 st %l0, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 40016d6c: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40016d70: 40 00 02 b5 call 40017844 <_Chain_Get> 40016d74: 01 00 00 00 nop if ( timer == NULL ) { 40016d78: 80 a2 20 00 cmp %o0, 0 40016d7c: 02 80 00 10 be 40016dbc <_Timer_server_Body+0xec> 40016d80: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40016d84: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40016d88: 80 a0 60 01 cmp %g1, 1 40016d8c: 02 80 00 29 be 40016e30 <_Timer_server_Body+0x160> 40016d90: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40016d94: 12 bf ff f6 bne 40016d6c <_Timer_server_Body+0x9c> 40016d98: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 40016d9c: 40 00 12 5b call 4001b708 <_Watchdog_Insert> 40016da0: 90 10 00 13 mov %l3, %o0 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 40016da4: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40016da8: 40 00 02 a7 call 40017844 <_Chain_Get> 40016dac: 01 00 00 00 nop if ( timer == NULL ) { 40016db0: 80 a2 20 00 cmp %o0, 0 40016db4: 32 bf ff f5 bne,a 40016d88 <_Timer_server_Body+0xb8> 40016db8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 40016dbc: 7f ff df 71 call 4000eb80 40016dc0: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 40016dc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40016dc8: 80 a5 00 01 cmp %l4, %g1 40016dcc: 02 80 00 1d be 40016e40 <_Timer_server_Body+0x170> 40016dd0: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 40016dd4: 7f ff df 6f call 4000eb90 <== NOT EXECUTED 40016dd8: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40016ddc: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40016de0: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016de4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40016de8: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40016dec: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016df0: 40 00 12 10 call 4001b630 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 40016df4: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40016df8: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40016dfc: e0 05 40 00 ld [ %l5 ], %l0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 40016e00: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 40016e04: 08 bf ff d7 bleu 40016d60 <_Timer_server_Body+0x90> <== NOT EXECUTED 40016e08: 01 00 00 00 nop <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016e0c: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 40016e10: 90 10 00 13 mov %l3, %o0 40016e14: 40 00 12 07 call 4001b630 <_Watchdog_Adjust_to_chain> 40016e18: 94 10 00 12 mov %l2, %o2 40016e1c: 30 bf ff d3 b,a 40016d68 <_Timer_server_Body+0x98> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 40016e20: 90 10 00 13 mov %l3, %o0 40016e24: 40 00 11 d3 call 4001b570 <_Watchdog_Adjust> 40016e28: 92 10 20 01 mov 1, %o1 40016e2c: 30 bf ff cf b,a 40016d68 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 40016e30: 92 02 20 10 add %o0, 0x10, %o1 40016e34: 40 00 12 35 call 4001b708 <_Watchdog_Insert> 40016e38: 90 10 00 11 mov %l1, %o0 40016e3c: 30 bf ff cc b,a 40016d6c <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 40016e40: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 40016e44: 7f ff df 53 call 4000eb90 40016e48: 01 00 00 00 nop _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 40016e4c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40016e50: 80 a5 c0 01 cmp %l7, %g1 40016e54: 12 80 00 0c bne 40016e84 <_Timer_server_Body+0x1b4> 40016e58: 01 00 00 00 nop 40016e5c: 30 80 00 13 b,a 40016ea8 <_Timer_server_Body+0x1d8> * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 40016e60: c0 24 20 08 clr [ %l0 + 8 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 40016e64: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 40016e68: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 40016e6c: 7f ff df 49 call 4000eb90 40016e70: 01 00 00 00 nop /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 40016e74: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 40016e78: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 40016e7c: 9f c0 40 00 call %g1 40016e80: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 40016e84: 7f ff df 3f call 4000eb80 40016e88: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40016e8c: e0 07 bf e8 ld [ %fp + -24 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40016e90: 80 a5 c0 10 cmp %l7, %l0 40016e94: 32 bf ff f3 bne,a 40016e60 <_Timer_server_Body+0x190> 40016e98: c2 04 00 00 ld [ %l0 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 40016e9c: 7f ff df 3d call 4000eb90 40016ea0: 01 00 00 00 nop 40016ea4: 30 bf ff a1 b,a 40016d28 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 40016ea8: c0 2e 20 7c clrb [ %i0 + 0x7c ] 40016eac: c2 07 00 00 ld [ %i4 ], %g1 40016eb0: 82 00 60 01 inc %g1 40016eb4: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 40016eb8: d0 06 00 00 ld [ %i0 ], %o0 40016ebc: 40 00 0e fa call 4001aaa4 <_Thread_Set_state> 40016ec0: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 40016ec4: 7f ff ff 59 call 40016c28 <_Timer_server_Reset_interval_system_watchdog> 40016ec8: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40016ecc: 7f ff ff 6c call 40016c7c <_Timer_server_Reset_tod_system_watchdog> 40016ed0: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40016ed4: 40 00 0c 1f call 40019f50 <_Thread_Enable_dispatch> 40016ed8: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40016edc: 90 10 00 19 mov %i1, %o0 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 40016ee0: f6 2e 20 7c stb %i3, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40016ee4: 40 00 12 76 call 4001b8bc <_Watchdog_Remove> 40016ee8: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40016eec: 40 00 12 74 call 4001b8bc <_Watchdog_Remove> 40016ef0: 90 10 00 1a mov %i2, %o0 40016ef4: 30 bf ff 8d b,a 40016d28 <_Timer_server_Body+0x58> 4000c3e8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000c3e8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 4000c3ec: 7f ff da 57 call 40002d48 4000c3f0: a0 10 00 18 mov %i0, %l0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000c3f4: c2 06 00 00 ld [ %i0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000c3f8: a2 06 20 04 add %i0, 4, %l1 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4000c3fc: 80 a0 40 11 cmp %g1, %l1 4000c400: 02 80 00 1f be 4000c47c <_Watchdog_Adjust+0x94> 4000c404: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000c408: 12 80 00 1f bne 4000c484 <_Watchdog_Adjust+0x9c> 4000c40c: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000c410: 80 a6 a0 00 cmp %i2, 0 4000c414: 02 80 00 1a be 4000c47c <_Watchdog_Adjust+0x94> 4000c418: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000c41c: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000c420: 80 a6 80 19 cmp %i2, %i1 4000c424: 1a 80 00 0b bcc 4000c450 <_Watchdog_Adjust+0x68> 4000c428: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 4000c42c: 10 80 00 1d b 4000c4a0 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000c430: b4 26 40 1a sub %i1, %i2, %i2 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000c434: b4 a6 80 19 subcc %i2, %i1, %i2 4000c438: 02 80 00 11 be 4000c47c <_Watchdog_Adjust+0x94> 4000c43c: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000c440: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000c444: 80 a6 40 1a cmp %i1, %i2 4000c448: 38 80 00 16 bgu,a 4000c4a0 <_Watchdog_Adjust+0xb8> 4000c44c: b4 26 40 1a sub %i1, %i2, %i2 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4000c450: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 4000c454: 7f ff da 41 call 40002d58 4000c458: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000c45c: 40 00 00 b6 call 4000c734 <_Watchdog_Tickle> 4000c460: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 4000c464: 7f ff da 39 call 40002d48 4000c468: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000c46c: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 4000c470: 80 a4 40 02 cmp %l1, %g2 4000c474: 12 bf ff f0 bne 4000c434 <_Watchdog_Adjust+0x4c> 4000c478: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 4000c47c: 7f ff da 37 call 40002d58 4000c480: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000c484: 12 bf ff fe bne 4000c47c <_Watchdog_Adjust+0x94> 4000c488: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000c48c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000c490: b4 00 80 1a add %g2, %i2, %i2 4000c494: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 4000c498: 7f ff da 30 call 40002d58 4000c49c: 91 e8 00 08 restore %g0, %o0, %o0 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; 4000c4a0: 10 bf ff f7 b 4000c47c <_Watchdog_Adjust+0x94> 4000c4a4: f4 20 60 10 st %i2, [ %g1 + 0x10 ] 4001c528 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 4001c528: 9d e3 bf a0 save %sp, -96, %sp 4001c52c: 40 00 06 f2 call 4001e0f4 <_fini> 4001c530: 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(); 4001c534: 7f ff ff e2 call 4001c4bc 4001c538: 01 00 00 00 nop rtems_shutdown_executive(status); 4001c53c: 40 00 00 50 call 4001c67c 4001c540: 90 10 00 18 mov %i0, %o0 4001c544: 30 80 00 00 b,a 4001c544 <_exit+0x1c> <== NOT EXECUTED 4003fd20 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4003fd20: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4003fd24: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4003fd28: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4003fd2c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4003fd30: 7f ff ff 69 call 4003fad4 <== NOT EXECUTED 4003fd34: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4003fd38: 01 00 00 00 nop 4000ef54 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4000ef54: 81 c3 e0 08 retl <== NOT EXECUTED 4000ef58: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000bff0 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000bff0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000bff4: 7f ff ff e6 call 4000bf8c <== NOT EXECUTED 4000bff8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000bffc: 01 00 00 00 nop 4002be98 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 4002be98: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002be9c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002bea0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002bea4: 7f ff ff 52 call 4002bbec <== NOT EXECUTED 4002bea8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002beac: 01 00 00 00 nop 4002c170 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 4002c170: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002c174: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002c178: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002c17c: 7f ff ff b1 call 4002c040 <== NOT EXECUTED 4002c180: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002c184: 01 00 00 00 nop 4001c648 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 4001c648: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4001c64c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4001c650: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001c654: 40 00 00 17 call 4001c6b0 <== NOT EXECUTED 4001c658: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001c65c: 01 00 00 00 nop 40060894 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 40060894: 9d e3 bf 60 save %sp, -160, %sp <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 40060898: 7f fe 9e 33 call 40008164 <== NOT EXECUTED 4006089c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 400608a0: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 400608a4: 32 80 01 1d bne,a 40060d18 <_rename_r+0x484> <== NOT EXECUTED 400608a8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 400608ac: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 400608b0: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 400608b4: 02 80 00 13 be 40060900 <_rename_r+0x6c> <== NOT EXECUTED 400608b8: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 400608bc: 02 80 00 11 be 40060900 <_rename_r+0x6c> <== NOT EXECUTED 400608c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400608c4: 02 80 00 10 be 40060904 <_rename_r+0x70> <== NOT EXECUTED 400608c8: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 400608cc: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED 400608d0: a2 10 20 00 clr %l1 <== NOT EXECUTED 400608d4: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 400608d8: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED 400608dc: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 400608e0: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 400608e4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 400608e8: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 400608ec: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 400608f0: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 400608f4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 400608f8: 10 80 00 0f b 40060934 <_rename_r+0xa0> <== NOT EXECUTED 400608fc: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 40060900: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 40060904: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED 40060908: a2 10 20 00 clr %l1 <== NOT EXECUTED 4006090c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 40060910: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED 40060914: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 40060918: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4006091c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 40060920: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 40060924: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 40060928: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4006092c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 40060930: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 40060934: c2 07 bf d4 ld [ %fp + -44 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; 40060938: b2 06 40 10 add %i1, %l0, %i1 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 4006093c: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED 40060940: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; 40060944: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 40060948: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 4006094c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40060950: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 40060954: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED 40060958: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4006095c: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 40060960: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED 40060964: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40060968: 7f ff b1 ec call 4004d118 <== NOT EXECUTED 4006096c: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED 40060970: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40060974: 7f fe 9d dd call 400080e8 <== NOT EXECUTED 40060978: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4006097c: b2 06 40 08 add %i1, %o0, %i1 <== NOT EXECUTED 40060980: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 40060984: 7f ff b1 e5 call 4004d118 <== NOT EXECUTED 40060988: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4006098c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40060990: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40060994: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40060998: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4006099c: 7f fe 9e 12 call 400081e4 <== NOT EXECUTED 400609a0: 98 10 20 00 clr %o4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 400609a4: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 400609a8: 12 80 00 87 bne 40060bc4 <_rename_r+0x330> <== NOT EXECUTED 400609ac: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 400609b0: c2 4e 80 00 ldsb [ %i2 ], %g1 <== NOT EXECUTED 400609b4: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 400609b8: 02 80 00 13 be 40060a04 <_rename_r+0x170> <== NOT EXECUTED 400609bc: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 400609c0: 02 80 00 11 be 40060a04 <_rename_r+0x170> <== NOT EXECUTED 400609c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400609c8: 02 80 00 10 be 40060a08 <_rename_r+0x174> <== NOT EXECUTED 400609cc: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 400609d0: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED 400609d4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400609d8: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 400609dc: c4 27 bf c0 st %g2, [ %fp + -64 ] <== NOT EXECUTED 400609e0: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 400609e4: c4 27 bf c4 st %g2, [ %fp + -60 ] <== NOT EXECUTED 400609e8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 400609ec: c4 27 bf c8 st %g2, [ %fp + -56 ] <== NOT EXECUTED 400609f0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 400609f4: c4 27 bf cc st %g2, [ %fp + -52 ] <== NOT EXECUTED 400609f8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 400609fc: 10 80 00 0f b 40060a38 <_rename_r+0x1a4> <== NOT EXECUTED 40060a00: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED 40060a04: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 40060a08: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED 40060a0c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40060a10: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 40060a14: c4 27 bf c0 st %g2, [ %fp + -64 ] <== NOT EXECUTED 40060a18: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 40060a1c: c4 27 bf c4 st %g2, [ %fp + -60 ] <== NOT EXECUTED 40060a20: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 40060a24: c4 27 bf c8 st %g2, [ %fp + -56 ] <== NOT EXECUTED 40060a28: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 40060a2c: c4 27 bf cc st %g2, [ %fp + -52 ] <== NOT EXECUTED 40060a30: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 40060a34: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 40060a38: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 40060a3c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40060a40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060a44: 02 80 00 98 be 40060ca4 <_rename_r+0x410> <== NOT EXECUTED 40060a48: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 40060a4c: 90 06 80 08 add %i2, %o0, %o0 <== NOT EXECUTED 40060a50: b4 07 bf c0 add %fp, -64, %i2 <== NOT EXECUTED 40060a54: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060a58: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED if ( result != 0 ) { 40060a5c: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 40060a60: 12 80 00 69 bne 40060c04 <_rename_r+0x370> <== NOT EXECUTED 40060a64: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 40060a68: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 40060a6c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40060a70: 12 80 00 2e bne 40060b28 <_rename_r+0x294> <== NOT EXECUTED 40060a74: c4 07 bf cc ld [ %fp + -52 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 40060a78: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 <== NOT EXECUTED 40060a7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060a80: 02 80 00 83 be 40060c8c <_rename_r+0x3f8> <== NOT EXECUTED 40060a84: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 40060a88: b2 07 bf d4 add %fp, -44, %i1 <== NOT EXECUTED 40060a8c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40060a90: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40060a94: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060a98: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 40060a9c: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 40060aa0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060aa4: 02 80 00 08 be 40060ac4 <_rename_r+0x230> <== NOT EXECUTED 40060aa8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40060aac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060ab0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060ab4: 02 80 00 05 be 40060ac8 <_rename_r+0x234> <== NOT EXECUTED 40060ab8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060abc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060ac0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 40060ac4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060ac8: 02 80 00 0d be 40060afc <_rename_r+0x268> <== NOT EXECUTED 40060acc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 40060ad0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40060ad4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060ad8: 22 80 00 09 be,a 40060afc <_rename_r+0x268> <== NOT EXECUTED 40060adc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060ae0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060ae4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060ae8: 22 80 00 05 be,a 40060afc <_rename_r+0x268> <== NOT EXECUTED 40060aec: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060af0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060af4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 40060af8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060afc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060b00: 02 80 00 8f be 40060d3c <_rename_r+0x4a8> <== NOT EXECUTED 40060b04: 01 00 00 00 nop <== NOT EXECUTED 40060b08: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060b0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060b10: 02 80 00 8b be 40060d3c <_rename_r+0x4a8> <== NOT EXECUTED 40060b14: 01 00 00 00 nop <== NOT EXECUTED 40060b18: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060b1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 40060b20: 81 c7 e0 08 ret <== NOT EXECUTED 40060b24: 81 e8 00 00 restore <== NOT EXECUTED * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 40060b28: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 40060b2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060b30: 02 80 00 09 be 40060b54 <_rename_r+0x2c0> <== NOT EXECUTED 40060b34: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060b38: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060b3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060b40: 02 80 00 05 be 40060b54 <_rename_r+0x2c0> <== NOT EXECUTED 40060b44: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060b48: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060b4c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 40060b50: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060b54: 02 80 00 0d be 40060b88 <_rename_r+0x2f4> <== NOT EXECUTED 40060b58: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 40060b5c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40060b60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060b64: 22 80 00 09 be,a 40060b88 <_rename_r+0x2f4> <== NOT EXECUTED 40060b68: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060b6c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060b70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060b74: 22 80 00 05 be,a 40060b88 <_rename_r+0x2f4> <== NOT EXECUTED 40060b78: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060b7c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060b80: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 40060b84: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060b88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060b8c: 02 80 00 08 be 40060bac <_rename_r+0x318> <== NOT EXECUTED 40060b90: 01 00 00 00 nop <== NOT EXECUTED 40060b94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060b98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060b9c: 02 80 00 04 be 40060bac <_rename_r+0x318> <== NOT EXECUTED 40060ba0: 01 00 00 00 nop <== NOT EXECUTED 40060ba4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060ba8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 40060bac: 7f ff 96 1c call 4004641c <__errno> <== NOT EXECUTED 40060bb0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40060bb4: 82 10 20 12 mov 0x12, %g1 <== NOT EXECUTED 40060bb8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40060bbc: 81 c7 e0 08 ret <== NOT EXECUTED 40060bc0: 81 e8 00 00 restore <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 40060bc4: 02 80 00 0b be 40060bf0 <_rename_r+0x35c> <== NOT EXECUTED 40060bc8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 40060bcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060bd0: 02 80 00 08 be 40060bf0 <_rename_r+0x35c> <== NOT EXECUTED 40060bd4: 01 00 00 00 nop <== NOT EXECUTED 40060bd8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060bdc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060be0: 02 80 00 04 be 40060bf0 <_rename_r+0x35c> <== NOT EXECUTED 40060be4: 01 00 00 00 nop <== NOT EXECUTED 40060be8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060bec: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( result ); 40060bf0: 7f ff 96 0b call 4004641c <__errno> <== NOT EXECUTED 40060bf4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40060bf8: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED 40060bfc: 81 c7 e0 08 ret <== NOT EXECUTED 40060c00: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 40060c04: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 40060c08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060c0c: 02 80 00 09 be 40060c30 <_rename_r+0x39c> <== NOT EXECUTED 40060c10: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060c14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060c18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060c1c: 02 80 00 05 be 40060c30 <_rename_r+0x39c> <== NOT EXECUTED 40060c20: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060c24: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060c28: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 40060c2c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060c30: 02 80 00 0d be 40060c64 <_rename_r+0x3d0> <== NOT EXECUTED 40060c34: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 40060c38: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40060c3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060c40: 22 80 00 09 be,a 40060c64 <_rename_r+0x3d0> <== NOT EXECUTED 40060c44: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060c48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060c4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060c50: 22 80 00 05 be,a 40060c64 <_rename_r+0x3d0> <== NOT EXECUTED 40060c54: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060c58: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060c5c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 40060c60: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060c64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060c68: 02 bf ff e2 be 40060bf0 <_rename_r+0x35c> <== NOT EXECUTED 40060c6c: 01 00 00 00 nop <== NOT EXECUTED 40060c70: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060c74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060c78: 02 bf ff de be 40060bf0 <_rename_r+0x35c> <== NOT EXECUTED 40060c7c: 01 00 00 00 nop <== NOT EXECUTED 40060c80: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060c84: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40060c88: 30 bf ff da b,a 40060bf0 <_rename_r+0x35c> <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 40060c8c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40060c90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060c94: 02 80 00 05 be 40060ca8 <_rename_r+0x414> <== NOT EXECUTED 40060c98: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060c9c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060ca0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 40060ca4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40060ca8: 02 80 00 0d be 40060cdc <_rename_r+0x448> <== NOT EXECUTED 40060cac: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 40060cb0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40060cb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060cb8: 22 80 00 09 be,a 40060cdc <_rename_r+0x448> <== NOT EXECUTED 40060cbc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060cc0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060cc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060cc8: 22 80 00 05 be,a 40060cdc <_rename_r+0x448> <== NOT EXECUTED 40060ccc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060cd0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060cd4: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 40060cd8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40060cdc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060ce0: 02 80 00 08 be 40060d00 <_rename_r+0x46c> <== NOT EXECUTED 40060ce4: 01 00 00 00 nop <== NOT EXECUTED 40060ce8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40060cec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40060cf0: 02 80 00 04 be 40060d00 <_rename_r+0x46c> <== NOT EXECUTED 40060cf4: 01 00 00 00 nop <== NOT EXECUTED 40060cf8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40060cfc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40060d00: 7f ff 95 c7 call 4004641c <__errno> <== NOT EXECUTED 40060d04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40060d08: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40060d0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40060d10: 81 c7 e0 08 ret <== NOT EXECUTED 40060d14: 81 e8 00 00 restore <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 40060d18: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40060d1c: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 40060d20: 96 07 bf d4 add %fp, -44, %o3 <== NOT EXECUTED 40060d24: 98 10 20 00 clr %o4 <== NOT EXECUTED 40060d28: 7f fe 9d 70 call 400082e8 <== NOT EXECUTED 40060d2c: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 40060d30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40060d34: 02 bf ff 00 be 40060934 <_rename_r+0xa0> <== NOT EXECUTED 40060d38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 40060d3c: 81 c7 e0 08 ret <== NOT EXECUTED 40060d40: 81 e8 00 00 restore <== NOT EXECUTED 40009e74 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40009e74: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40009e78: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40009e7c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40009e80: 7f ff ff b1 call 40009d44 <== NOT EXECUTED 40009e84: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40009e88: 01 00 00 00 nop 4001013c <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4001013c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40010140: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40010144: 7f ff ff 43 call 4000fe50 <== NOT EXECUTED 40010148: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001014c: 01 00 00 00 nop 4002a6d4 : #include int chdir( const char *pathname ) { 4002a6d4: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4002a6d8: 40 00 8a 90 call 4004d118 4002a6dc: 90 10 00 18 mov %i0, %o0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4002a6e0: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4002a6e4: 92 10 00 08 mov %o0, %o1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4002a6e8: 94 10 20 01 mov 1, %o2 4002a6ec: 90 10 00 18 mov %i0, %o0 4002a6f0: 96 10 00 10 mov %l0, %o3 4002a6f4: 98 10 20 01 mov 1, %o4 4002a6f8: 7f ff 76 fc call 400082e8 4002a6fc: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4002a700: 80 a2 20 00 cmp %o0, 0 4002a704: 12 80 00 31 bne 4002a7c8 4002a708: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4002a70c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4002a710: 80 a0 60 00 cmp %g1, 0 4002a714: 22 80 00 2f be,a 4002a7d0 4002a718: 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 ) { 4002a71c: 9f c0 40 00 call %g1 4002a720: 90 10 00 10 mov %l0, %o0 4002a724: 80 a2 20 01 cmp %o0, 1 4002a728: 12 80 00 1b bne 4002a794 4002a72c: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 4002a730: 21 10 01 b0 sethi %hi(0x4006c000), %l0 4002a734: d0 04 21 98 ld [ %l0 + 0x198 ], %o0 ! 4006c198 4002a738: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 4002a73c: 80 a0 60 00 cmp %g1, 0 4002a740: 22 80 00 0a be,a 4002a768 4002a744: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002a748: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a74c: 80 a0 60 00 cmp %g1, 0 4002a750: 22 80 00 06 be,a 4002a768 4002a754: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002a758: 9f c0 40 00 call %g1 4002a75c: 90 02 20 04 add %o0, 4, %o0 4002a760: d0 04 21 98 ld [ %l0 + 0x198 ], %o0 rtems_filesystem_current = loc; 4002a764: c2 07 bf ec ld [ %fp + -20 ], %g1 4002a768: c2 22 20 04 st %g1, [ %o0 + 4 ] 4002a76c: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002a770: c2 22 20 08 st %g1, [ %o0 + 8 ] 4002a774: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002a778: c2 22 20 0c st %g1, [ %o0 + 0xc ] 4002a77c: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002a780: c2 22 20 10 st %g1, [ %o0 + 0x10 ] 4002a784: c2 07 bf fc ld [ %fp + -4 ], %g1 4002a788: c2 22 20 14 st %g1, [ %o0 + 0x14 ] return 0; } 4002a78c: 81 c7 e0 08 ret 4002a790: 91 e8 20 00 restore %g0, 0, %o0 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 ); 4002a794: 80 a0 60 00 cmp %g1, 0 4002a798: 02 80 00 08 be 4002a7b8 4002a79c: 01 00 00 00 nop 4002a7a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a7a4: 80 a0 60 00 cmp %g1, 0 4002a7a8: 02 80 00 04 be 4002a7b8 4002a7ac: 01 00 00 00 nop 4002a7b0: 9f c0 40 00 call %g1 4002a7b4: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4002a7b8: 40 00 6f 19 call 4004641c <__errno> 4002a7bc: b0 10 3f ff mov -1, %i0 4002a7c0: 82 10 20 14 mov 0x14, %g1 4002a7c4: c2 22 00 00 st %g1, [ %o0 ] 4002a7c8: 81 c7 e0 08 ret 4002a7cc: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 4002a7d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a7d4: 02 80 00 04 be 4002a7e4 <== NOT EXECUTED 4002a7d8: 01 00 00 00 nop <== NOT EXECUTED 4002a7dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002a7e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002a7e4: 40 00 6f 0e call 4004641c <__errno> <== NOT EXECUTED 4002a7e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a7ec: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002a7f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a7f4: 81 c7 e0 08 ret <== NOT EXECUTED 4002a7f8: 81 e8 00 00 restore <== NOT EXECUTED 40007f1c : int chmod( const char *path, mode_t mode ) { 40007f1c: 9d e3 bf 88 save %sp, -120, %sp int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 40007f20: 40 01 14 7e call 4004d118 40007f24: 90 10 00 18 mov %i0, %o0 40007f28: a0 07 bf ec add %fp, -20, %l0 40007f2c: 92 10 00 08 mov %o0, %o1 40007f30: 94 10 20 00 clr %o2 40007f34: 90 10 00 18 mov %i0, %o0 40007f38: 96 10 00 10 mov %l0, %o3 40007f3c: 98 10 20 01 mov 1, %o4 40007f40: 40 00 00 ea call 400082e8 40007f44: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40007f48: 80 a2 20 00 cmp %o0, 0 40007f4c: 12 80 00 16 bne 40007fa4 40007f50: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 40007f54: 80 a0 60 00 cmp %g1, 0 40007f58: 22 80 00 25 be,a 40007fec 40007f5c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 40007f60: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007f64: 80 a0 60 00 cmp %g1, 0 40007f68: 02 80 00 11 be 40007fac 40007f6c: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 40007f70: 90 10 00 10 mov %l0, %o0 40007f74: 9f c0 40 00 call %g1 40007f78: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40007f7c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40007f80: 80 a0 60 00 cmp %g1, 0 40007f84: 02 80 00 08 be 40007fa4 40007f88: b0 10 00 08 mov %o0, %i0 40007f8c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007f90: 80 a0 60 00 cmp %g1, 0 40007f94: 02 80 00 23 be 40008020 40007f98: 01 00 00 00 nop 40007f9c: 9f c0 40 00 call %g1 40007fa0: 90 10 00 10 mov %l0, %o0 return result; } 40007fa4: 81 c7 e0 08 ret 40007fa8: 81 e8 00 00 restore rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 40007fac: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40007fb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007fb4: 02 80 00 08 be 40007fd4 <== NOT EXECUTED 40007fb8: 01 00 00 00 nop <== NOT EXECUTED 40007fbc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40007fc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007fc4: 02 80 00 04 be 40007fd4 <== NOT EXECUTED 40007fc8: 01 00 00 00 nop <== NOT EXECUTED 40007fcc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007fd0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40007fd4: 40 00 f9 12 call 4004641c <__errno> <== NOT EXECUTED 40007fd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007fdc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007fe0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007fe4: 81 c7 e0 08 ret <== NOT EXECUTED 40007fe8: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 40007fec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007ff0: 02 80 00 08 be 40008010 <== NOT EXECUTED 40007ff4: 01 00 00 00 nop <== NOT EXECUTED 40007ff8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40007ffc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008000: 02 80 00 04 be 40008010 <== NOT EXECUTED 40008004: 01 00 00 00 nop <== NOT EXECUTED 40008008: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000800c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 40008010: 40 00 f9 03 call 4004641c <__errno> <== NOT EXECUTED 40008014: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008018: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4000801c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008020: 81 c7 e0 08 ret <== NOT EXECUTED 40008024: 81 e8 00 00 restore <== NOT EXECUTED 4002a7fc : int chown( const char *path, uid_t owner, gid_t group ) { 4002a7fc: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 4002a800: 40 00 8a 46 call 4004d118 4002a804: 90 10 00 18 mov %i0, %o0 4002a808: a0 07 bf ec add %fp, -20, %l0 4002a80c: 92 10 00 08 mov %o0, %o1 4002a810: 94 10 20 00 clr %o2 4002a814: 90 10 00 18 mov %i0, %o0 4002a818: 96 10 00 10 mov %l0, %o3 4002a81c: 98 10 20 01 mov 1, %o4 4002a820: 7f ff 76 b2 call 400082e8 4002a824: b0 10 3f ff mov -1, %i0 4002a828: 80 a2 20 00 cmp %o0, 0 4002a82c: 12 80 00 15 bne 4002a880 4002a830: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 4002a834: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 4002a838: 80 a0 60 00 cmp %g1, 0 4002a83c: 02 80 00 13 be 4002a888 4002a840: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 4002a844: 95 2e a0 10 sll %i2, 0x10, %o2 4002a848: 93 32 60 10 srl %o1, 0x10, %o1 4002a84c: 95 32 a0 10 srl %o2, 0x10, %o2 4002a850: 9f c0 40 00 call %g1 4002a854: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002a858: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002a85c: 80 a0 60 00 cmp %g1, 0 4002a860: 02 80 00 08 be 4002a880 4002a864: b0 10 00 08 mov %o0, %i0 4002a868: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a86c: 80 a0 60 00 cmp %g1, 0 4002a870: 02 80 00 10 be 4002a8b0 4002a874: 01 00 00 00 nop 4002a878: 9f c0 40 00 call %g1 4002a87c: 90 10 00 10 mov %l0, %o0 return result; } 4002a880: 81 c7 e0 08 ret 4002a884: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 4002a888: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002a88c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a890: 02 80 00 04 be 4002a8a0 <== NOT EXECUTED 4002a894: 01 00 00 00 nop <== NOT EXECUTED 4002a898: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002a89c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002a8a0: 40 00 6e df call 4004641c <__errno> <== NOT EXECUTED 4002a8a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a8a8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002a8ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a8b0: 81 c7 e0 08 ret <== NOT EXECUTED 4002a8b4: 81 e8 00 00 restore <== NOT EXECUTED 4002a8b8 : #include int chroot( const char *pathname ) { 4002a8b8: 9d e3 bf 88 save %sp, -120, %sp 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) { 4002a8bc: 21 10 01 b0 sethi %hi(0x4006c000), %l0 4002a8c0: e2 04 21 98 ld [ %l0 + 0x198 ], %l1 ! 4006c198 4002a8c4: 03 10 01 c0 sethi %hi(0x40070000), %g1 4002a8c8: 82 10 60 b8 or %g1, 0xb8, %g1 ! 400700b8 4002a8cc: 80 a4 40 01 cmp %l1, %g1 4002a8d0: 02 80 00 28 be 4002a970 4002a8d4: 01 00 00 00 nop 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); 4002a8d8: 7f ff ff 7f call 4002a6d4 4002a8dc: 90 10 00 18 mov %i0, %o0 if (result) { 4002a8e0: 80 a2 20 00 cmp %o0, 0 4002a8e4: 12 80 00 2f bne 4002a9a0 4002a8e8: 11 10 01 8d sethi %hi(0x40063400), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4002a8ec: 92 10 20 01 mov 1, %o1 4002a8f0: 90 12 21 c8 or %o0, 0x1c8, %o0 4002a8f4: 94 10 20 00 clr %o2 4002a8f8: 96 07 bf ec add %fp, -20, %o3 4002a8fc: 7f ff 76 7b call 400082e8 4002a900: 98 10 20 00 clr %o4 4002a904: 80 a2 20 00 cmp %o0, 0 4002a908: 12 80 00 26 bne 4002a9a0 4002a90c: d0 04 21 98 ld [ %l0 + 0x198 ], %o0 /* 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); 4002a910: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 4002a914: 80 a0 60 00 cmp %g1, 0 4002a918: 22 80 00 0b be,a 4002a944 4002a91c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002a920: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a924: 80 a0 60 00 cmp %g1, 0 4002a928: 22 80 00 07 be,a 4002a944 4002a92c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002a930: 9f c0 40 00 call %g1 4002a934: 90 02 20 18 add %o0, 0x18, %o0 4002a938: 03 10 01 b0 sethi %hi(0x4006c000), %g1 4002a93c: d0 00 61 98 ld [ %g1 + 0x198 ], %o0 ! 4006c198 rtems_filesystem_root = loc; 4002a940: c2 07 bf ec ld [ %fp + -20 ], %g1 4002a944: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 4002a948: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002a94c: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 4002a950: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002a954: c2 22 20 20 st %g1, [ %o0 + 0x20 ] 4002a958: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002a95c: c2 22 20 24 st %g1, [ %o0 + 0x24 ] 4002a960: c2 07 bf fc ld [ %fp + -4 ], %g1 4002a964: c2 22 20 28 st %g1, [ %o0 + 0x28 ] return 0; } 4002a968: 81 c7 e0 08 ret 4002a96c: 91 e8 20 00 restore %g0, 0, %o0 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*/ 4002a970: 40 00 06 d5 call 4002c4c4 4002a974: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4002a978: c2 04 21 98 ld [ %l0 + 0x198 ], %g1 4002a97c: 80 a0 40 11 cmp %g1, %l1 4002a980: 12 bf ff d6 bne 4002a8d8 4002a984: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002a988: 40 00 6e a5 call 4004641c <__errno> <== NOT EXECUTED 4002a98c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4002a990: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002a994: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a998: 81 c7 e0 08 ret <== NOT EXECUTED 4002a99c: 81 e8 00 00 restore <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 4002a9a0: 40 00 6e 9f call 4004641c <__errno> <== NOT EXECUTED 4002a9a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a9a8: 40 00 6e 9d call 4004641c <__errno> <== NOT EXECUTED 4002a9ac: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4002a9b0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4002a9b4: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 4002a9b8: 81 c7 e0 08 ret <== NOT EXECUTED 4002a9bc: 81 e8 00 00 restore <== NOT EXECUTED 4000aeec : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 4000aeec: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 4000aef0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 4000aef4: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000aef8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000aefc: d2 00 60 0c ld [ %g1 + 0xc ], %o1 4000af00: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 4000af04: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 4000af08: 94 07 bf f4 add %fp, -12, %o2 4000af0c: 40 00 05 a6 call 4000c5a4 4000af10: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 4000af14: 80 a2 20 00 cmp %o0, 0 4000af18: 12 80 00 04 bne 4000af28 4000af1c: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000af20: 81 c7 e0 08 ret 4000af24: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000af28: 40 00 00 3f call 4000b024 <== NOT EXECUTED 4000af2c: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000af30: 81 c7 e0 08 ret <== NOT EXECUTED 4000af34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000af44 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4000af44: 9d e3 bf a0 save %sp, -96, %sp assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 4000af48: e0 06 c0 00 ld [ %i3 ], %l0 if (!device_name_table) 4000af4c: 80 a4 20 00 cmp %l0, 0 4000af50: 02 80 00 2f be 4000b00c 4000af54: 03 10 00 47 sethi %hi(0x40011c00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4000af58: e6 00 62 f8 ld [ %g1 + 0x2f8 ], %l3 ! 40011ef8 } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 4000af5c: a2 10 20 00 clr %l1 for (i = 0; i < rtems_device_table_size; i++) { 4000af60: 80 a4 e0 00 cmp %l3, 0 4000af64: 02 80 00 18 be 4000afc4 4000af68: 82 10 20 00 clr %g1 if (!device_name_table[i].device_name) 4000af6c: 85 28 60 04 sll %g1, 4, %g2 4000af70: a9 28 60 02 sll %g1, 2, %l4 4000af74: a8 05 00 02 add %l4, %g2, %l4 4000af78: e4 04 00 14 ld [ %l0 + %l4 ], %l2 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4000af7c: a2 04 60 01 inc %l1 if (!device_name_table[i].device_name) 4000af80: 80 a4 a0 00 cmp %l2, 0 4000af84: 02 80 00 0d be 4000afb8 4000af88: a8 04 00 14 add %l0, %l4, %l4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4000af8c: 90 10 00 18 mov %i0, %o0 4000af90: 92 10 00 12 mov %l2, %o1 4000af94: 40 00 10 80 call 4000f194 4000af98: 94 10 00 19 mov %i1, %o2 4000af9c: 80 a2 20 00 cmp %o0, 0 4000afa0: 12 80 00 07 bne 4000afbc 4000afa4: 80 a4 c0 11 cmp %l3, %l1 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4000afa8: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1 4000afac: 80 a0 60 00 cmp %g1, 0 4000afb0: 02 80 00 0b be 4000afdc 4000afb4: 03 10 00 48 sethi %hi(0x40012000), %g1 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4000afb8: 80 a4 c0 11 cmp %l3, %l1 4000afbc: 18 bf ff ec bgu 4000af6c 4000afc0: 82 10 00 11 mov %l1, %g1 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4000afc4: 40 00 0c d4 call 4000e314 <__errno> 4000afc8: b0 10 3f ff mov -1, %i0 4000afcc: 82 10 20 02 mov 2, %g1 4000afd0: c2 22 00 00 st %g1, [ %o0 ] } 4000afd4: 81 c7 e0 08 ret 4000afd8: 81 e8 00 00 restore /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4000afdc: c2 00 60 74 ld [ %g1 + 0x74 ], %g1 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 4000afe0: e8 26 c0 00 st %l4, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4000afe4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000afe8: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 4000afec: 03 10 00 48 sethi %hi(0x40012000), %g1 4000aff0: 82 10 60 28 or %g1, 0x28, %g1 ! 40012028 4000aff4: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 4000aff8: 03 10 00 47 sethi %hi(0x40011c00), %g1 4000affc: 82 10 63 e0 or %g1, 0x3e0, %g1 ! 40011fe0 4000b000: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4000b004: 81 c7 e0 08 ret 4000b008: 91 e8 20 00 restore %g0, 0, %o0 } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 4000b00c: 40 00 0c c2 call 4000e314 <__errno> <== NOT EXECUTED 4000b010: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b014: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000b018: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b01c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b020: 81 e8 00 00 restore <== NOT EXECUTED 40002e80 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40002e80: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 40002e84: 23 10 00 47 sethi %hi(0x40011c00), %l1 40002e88: c2 04 62 f8 ld [ %l1 + 0x2f8 ], %g1 ! 40011ef8 40002e8c: 85 28 60 04 sll %g1, 4, %g2 40002e90: 83 28 60 02 sll %g1, 2, %g1 40002e94: 40 00 1e 89 call 4000a8b8 <_Workspace_Allocate> 40002e98: 90 00 40 02 add %g1, %g2, %o0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 40002e9c: a0 92 20 00 orcc %o0, 0, %l0 40002ea0: 02 80 00 10 be 40002ee0 40002ea4: c2 04 62 f8 ld [ %l1 + 0x2f8 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 40002ea8: 92 10 20 00 clr %o1 40002eac: 85 28 60 04 sll %g1, 4, %g2 40002eb0: 83 28 60 02 sll %g1, 2, %g1 40002eb4: 40 00 2f 78 call 4000ec94 40002eb8: 94 00 40 02 add %g1, %g2, %o2 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 40002ebc: 03 10 00 48 sethi %hi(0x40012000), %g1 40002ec0: 82 10 60 28 or %g1, 0x28, %g1 ! 40012028 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 40002ec4: e0 26 20 1c st %l0, [ %i0 + 0x1c ] device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 40002ec8: c2 26 20 24 st %g1, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = &devFS_ops; 40002ecc: 03 10 00 47 sethi %hi(0x40011c00), %g1 40002ed0: 82 10 63 e0 or %g1, 0x3e0, %g1 ! 40011fe0 40002ed4: c2 26 20 28 st %g1, [ %i0 + 0x28 ] /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 40002ed8: 81 c7 e0 08 ret 40002edc: 91 e8 20 00 restore %g0, 0, %o0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 40002ee0: 40 00 2d 0d call 4000e314 <__errno> <== NOT EXECUTED 40002ee4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002ee8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40002eec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002ef0: 81 c7 e0 08 ret <== NOT EXECUTED 40002ef4: 81 e8 00 00 restore <== NOT EXECUTED 400030a8 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 400030a8: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 400030ac: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.command = command; 400030b0: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; status = rtems_io_control( 400030b4: d2 00 60 0c ld [ %g1 + 0xc ], %o1 400030b8: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 400030bc: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; 400030c0: f4 27 bf f8 st %i2, [ %fp + -8 ] status = rtems_io_control( 400030c4: 40 00 11 56 call 4000761c 400030c8: 94 07 bf f0 add %fp, -16, %o2 np->major, np->minor, (void *) &args ); if ( status ) 400030cc: 80 a2 20 00 cmp %o0, 0 400030d0: 12 80 00 05 bne 400030e4 400030d4: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 400030d8: f0 07 bf fc ld [ %fp + -4 ], %i0 } 400030dc: 81 c7 e0 08 ret 400030e0: 81 e8 00 00 restore np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 400030e4: 40 00 1f d0 call 4000b024 <== NOT EXECUTED 400030e8: 01 00 00 00 nop <== NOT EXECUTED 400030ec: 81 c7 e0 08 ret <== NOT EXECUTED 400030f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40002ef8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40002ef8: 9d e3 bf a0 save %sp, -96, %sp * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 40002efc: c2 4e 00 00 ldsb [ %i0 ], %g1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40002f00: a0 10 00 18 mov %i0, %l0 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 40002f04: 80 a0 60 64 cmp %g1, 0x64 40002f08: 02 80 00 4c be 40003038 40002f0c: aa 10 00 19 mov %i1, %l5 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 40002f10: 03 00 00 3c sethi %hi(0xf000), %g1 40002f14: b2 0e 40 01 and %i1, %g1, %i1 40002f18: 03 00 00 08 sethi %hi(0x2000), %g1 40002f1c: 80 a6 40 01 cmp %i1, %g1 40002f20: 02 80 00 0b be 40002f4c 40002f24: 03 00 00 18 sethi %hi(0x6000), %g1 40002f28: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40002f2c: 22 80 00 09 be,a 40002f50 <== NOT EXECUTED 40002f30: e4 07 00 00 ld [ %i4 ], %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40002f34: 40 00 2c f8 call 4000e314 <__errno> <== NOT EXECUTED 40002f38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002f3c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40002f40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002f44: 81 c7 e0 08 ret <== NOT EXECUTED 40002f48: 81 e8 00 00 restore <== NOT EXECUTED else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 40002f4c: e4 07 00 00 ld [ %i4 ], %l2 if (!device_name_table) 40002f50: 80 a4 a0 00 cmp %l2, 0 40002f54: 02 80 00 4d be 40003088 40002f58: 03 10 00 47 sethi %hi(0x40011c00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40002f5c: e6 00 62 f8 ld [ %g1 + 0x2f8 ], %l3 ! 40011ef8 40002f60: 80 a4 e0 00 cmp %l3, 0 40002f64: 02 80 00 43 be 40003070 40002f68: 82 10 20 00 clr %g1 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 40002f6c: a8 10 3f ff mov -1, %l4 40002f70: 10 80 00 0a b 40002f98 40002f74: a2 10 20 00 clr %l1 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 40002f78: 40 00 30 01 call 4000ef7c 40002f7c: 01 00 00 00 nop 40002f80: 80 a2 20 00 cmp %o0, 0 40002f84: 02 80 00 27 be 40003020 40002f88: a2 04 60 01 inc %l1 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40002f8c: 80 a4 40 13 cmp %l1, %l3 40002f90: 1a 80 00 0e bcc 40002fc8 40002f94: 82 10 00 11 mov %l1, %g1 if (device_name_table[i].device_name == NULL) 40002f98: 85 28 60 04 sll %g1, 4, %g2 40002f9c: 83 28 60 02 sll %g1, 2, %g1 40002fa0: 82 00 40 02 add %g1, %g2, %g1 40002fa4: d2 04 80 01 ld [ %l2 + %g1 ], %o1 40002fa8: 80 a2 60 00 cmp %o1, 0 40002fac: 12 bf ff f3 bne 40002f78 40002fb0: 90 10 00 10 mov %l0, %o0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 40002fb4: a8 10 00 11 mov %l1, %l4 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40002fb8: a2 04 60 01 inc %l1 40002fbc: 80 a4 40 13 cmp %l1, %l3 40002fc0: 0a bf ff f6 bcs 40002f98 40002fc4: 82 10 00 11 mov %l1, %g1 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 40002fc8: 80 a5 3f ff cmp %l4, -1 40002fcc: 02 80 00 29 be 40003070 40002fd0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 40002fd4: 7f ff fa ed call 40001b88 40002fd8: 01 00 00 00 nop 40002fdc: a2 10 00 08 mov %o0, %l1 device_name_table[slot].device_name = (char *)path; 40002fe0: 83 2d 20 04 sll %l4, 4, %g1 device_name_table[slot].device_name_length = strlen(path); 40002fe4: 90 10 00 10 mov %l0, %o0 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 40002fe8: a9 2d 20 02 sll %l4, 2, %l4 40002fec: a8 05 00 01 add %l4, %g1, %l4 40002ff0: e0 24 80 14 st %l0, [ %l2 + %l4 ] device_name_table[slot].device_name_length = strlen(path); 40002ff4: 40 00 30 33 call 4000f0c0 40002ff8: a4 04 80 14 add %l2, %l4, %l2 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 40002ffc: ea 34 a0 10 sth %l5, [ %l2 + 0x10 ] if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 40003000: d0 24 a0 04 st %o0, [ %l2 + 4 ] device_name_table[slot].major = major; 40003004: f4 24 a0 08 st %i2, [ %l2 + 8 ] device_name_table[slot].minor = minor; 40003008: f6 24 a0 0c st %i3, [ %l2 + 0xc ] device_name_table[slot].mode = mode; _ISR_Enable(level); 4000300c: b0 10 20 00 clr %i0 40003010: 7f ff fa e2 call 40001b98 40003014: 90 10 00 11 mov %l1, %o0 return 0; } 40003018: 81 c7 e0 08 ret 4000301c: 81 e8 00 00 restore for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 40003020: 40 00 2c bd call 4000e314 <__errno> <== NOT EXECUTED 40003024: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003028: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 4000302c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003030: 81 c7 e0 08 ret <== NOT EXECUTED 40003034: 81 e8 00 00 restore <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 40003038: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 4000303c: 80 a0 60 65 cmp %g1, 0x65 40003040: 12 bf ff b5 bne 40002f14 40003044: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 40003048: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 4000304c: 80 a0 60 76 cmp %g1, 0x76 40003050: 12 bf ff b1 bne 40002f14 40003054: 03 00 00 3c sethi %hi(0xf000), %g1 40003058: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 4000305c: 80 a0 60 00 cmp %g1, 0 40003060: 12 bf ff ac bne 40002f10 40003064: b0 10 20 00 clr %i0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 40003068: 81 c7 e0 08 ret 4000306c: 81 e8 00 00 restore if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 40003070: 40 00 2c a9 call 4000e314 <__errno> <== NOT EXECUTED 40003074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003078: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000307c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003080: 81 c7 e0 08 ret <== NOT EXECUTED 40003084: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 40003088: 40 00 2c a3 call 4000e314 <__errno> <== NOT EXECUTED 4000308c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003090: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40003094: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003098: 81 c7 e0 08 ret <== NOT EXECUTED 4000309c: 81 e8 00 00 restore <== NOT EXECUTED 400030f4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400030f4: 9d e3 bf 90 save %sp, -112, %sp rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 400030f8: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 400030fc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = iop->flags; 40003100: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 40003104: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 40003108: d2 00 60 0c ld [ %g1 + 0xc ], %o1 4000310c: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 40003110: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 40003114: 94 07 bf f4 add %fp, -12, %o2 40003118: 40 00 11 9e call 40007790 4000311c: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) 40003120: 80 a2 20 00 cmp %o0, 0 40003124: 12 80 00 04 bne 40003134 40003128: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000312c: 81 c7 e0 08 ret 40003130: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40003134: 40 00 1f bc call 4000b024 <== NOT EXECUTED 40003138: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000313c: 81 c7 e0 08 ret <== NOT EXECUTED 40003140: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003144 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40003144: 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; 40003148: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 4000314c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 40003150: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 40003154: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 40003158: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 4000315c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 40003160: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED 40003164: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 40003168: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; 4000316c: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 40003170: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 40003174: 40 00 11 9f call 400077f0 <== NOT EXECUTED 40003178: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 4000317c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003180: 12 80 00 05 bne 40003194 <== NOT EXECUTED 40003184: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 40003188: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 4000318c: 81 c7 e0 08 ret <== NOT EXECUTED 40003190: 81 e8 00 00 restore <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40003194: 40 00 1f a4 call 4000b024 <== NOT EXECUTED 40003198: 01 00 00 00 nop <== NOT EXECUTED 4000319c: 81 c7 e0 08 ret <== NOT EXECUTED 400031a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400031a4 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 400031a4: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 400031a8: c2 06 00 00 ld [ %i0 ], %g1 if (!the_dev) 400031ac: 80 a0 60 00 cmp %g1, 0 400031b0: 02 80 00 0a be 400031d8 400031b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 400031b8: c6 10 60 10 lduh [ %g1 + 0x10 ], %g3 the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 400031bc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 400031c0: c2 00 60 08 ld [ %g1 + 8 ], %g1 buf->st_mode = the_dev->mode; 400031c4: c6 36 60 0c sth %g3, [ %i1 + 0xc ] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 400031c8: c2 26 60 18 st %g1, [ %i1 + 0x18 ] 400031cc: c4 26 60 1c st %g2, [ %i1 + 0x1c ] buf->st_mode = the_dev->mode; return 0; } 400031d0: 81 c7 e0 08 ret 400031d4: 91 e8 20 00 restore %g0, 0, %o0 { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 400031d8: 40 00 2c 4f call 4000e314 <__errno> <== NOT EXECUTED 400031dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400031e0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400031e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400031e8: 81 c7 e0 08 ret <== NOT EXECUTED 400031ec: 81 e8 00 00 restore <== NOT EXECUTED 400031f0 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 400031f0: 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; 400031f4: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 400031f8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 400031fc: c4 27 bf f8 st %g2, [ %fp + -8 ] np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 40003200: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; args.bytes_moved = 0; 40003204: c0 27 bf fc clr [ %fp + -4 ] rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 40003208: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 4000320c: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40003210: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 40003214: c4 3f bf e8 std %g2, [ %fp + -24 ] args.buffer = (void *) buffer; 40003218: f2 27 bf f0 st %i1, [ %fp + -16 ] rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 4000321c: f0 27 bf e0 st %i0, [ %fp + -32 ] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 40003220: 40 00 11 8c call 40007850 40003224: 94 07 bf e0 add %fp, -32, %o2 np->major, np->minor, (void *) &args ); if ( status ) 40003228: 80 a2 20 00 cmp %o0, 0 4000322c: 12 80 00 05 bne 40003240 40003230: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 40003234: f0 07 bf fc ld [ %fp + -4 ], %i0 } 40003238: 81 c7 e0 08 ret 4000323c: 81 e8 00 00 restore np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40003240: 40 00 1f 79 call 4000b024 <== NOT EXECUTED 40003244: 01 00 00 00 nop <== NOT EXECUTED 40003248: 81 c7 e0 08 ret <== NOT EXECUTED 4000324c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000e0ec : */ int device_close( rtems_libio_t *iop ) { 4000e0ec: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000e0f0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000e0f4: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 4000e0f8: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000e0fc: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000e100: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000e104: 94 07 bf f4 add %fp, -12, %o2 4000e108: 40 00 05 a2 call 4000f790 4000e10c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000e110: 80 a2 20 00 cmp %o0, 0 4000e114: 12 80 00 04 bne 4000e124 4000e118: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000e11c: 81 c7 e0 08 ret 4000e120: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000e124: 40 00 07 2a call 4000fdcc <== NOT EXECUTED 4000e128: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000e12c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e130: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000dfec : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000dfec: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000dff0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4000dff4: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 4000dff8: f4 27 bf f8 st %i2, [ %fp + -8 ] { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4000dffc: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000e000: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000e004: 40 00 05 fb call 4000f7f0 4000e008: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000e00c: 80 a2 20 00 cmp %o0, 0 4000e010: 12 80 00 05 bne 4000e024 4000e014: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 4000e018: f0 07 bf fc ld [ %fp + -4 ], %i0 } 4000e01c: 81 c7 e0 08 ret 4000e020: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000e024: 40 00 07 6a call 4000fdcc <== NOT EXECUTED 4000e028: 01 00 00 00 nop <== NOT EXECUTED 4000e02c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e030: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000e134 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000e134: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4000e138: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000e13c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000e140: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 4000e144: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 4000e148: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 4000e14c: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000e150: 94 07 bf f4 add %fp, -12, %o2 4000e154: 40 00 05 bf call 4000f850 4000e158: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000e15c: 80 a2 20 00 cmp %o0, 0 4000e160: 12 80 00 04 bne 4000e170 4000e164: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000e168: 81 c7 e0 08 ret 4000e16c: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000e170: 40 00 07 17 call 4000fdcc <== NOT EXECUTED 4000e174: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000e178: 81 c7 e0 08 ret <== NOT EXECUTED 4000e17c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000e090 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000e090: 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; 4000e094: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000e098: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4000e09c: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 4000e0a0: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000e0a4: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000e0a8: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 4000e0ac: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4000e0b0: 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; 4000e0b4: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 4000e0b8: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000e0bc: 40 00 05 fd call 4000f8b0 <== NOT EXECUTED 4000e0c0: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000e0c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e0c8: 12 80 00 05 bne 4000e0dc <== NOT EXECUTED 4000e0cc: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000e0d0: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 4000e0d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000e0d8: 81 e8 00 00 restore <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000e0dc: 40 00 07 3c call 4000fdcc <== NOT EXECUTED 4000e0e0: 01 00 00 00 nop <== NOT EXECUTED 4000e0e4: 81 c7 e0 08 ret <== NOT EXECUTED 4000e0e8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000e034 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000e034: 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; 4000e038: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000e03c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 4000e040: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 4000e044: f2 27 bf f0 st %i1, [ %fp + -16 ] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000e048: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 4000e04c: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 4000e050: c4 27 bf f8 st %g2, [ %fp + -8 ] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4000e054: 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; 4000e058: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 4000e05c: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000e060: 40 00 06 2c call 4000f910 4000e064: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000e068: 80 a2 20 00 cmp %o0, 0 4000e06c: 12 80 00 05 bne 4000e080 4000e070: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000e074: f0 07 bf fc ld [ %fp + -4 ], %i0 } 4000e078: 81 c7 e0 08 ret 4000e07c: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000e080: 40 00 07 53 call 4000fdcc <== NOT EXECUTED 4000e084: 01 00 00 00 nop <== NOT EXECUTED 4000e088: 81 c7 e0 08 ret <== NOT EXECUTED 4000e08c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40005104 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40005104: 9d e3 bf a0 save %sp, -96, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40005108: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 4000510c: 80 a0 60 00 cmp %g1, 0 40005110: 12 80 00 04 bne 40005120 40005114: 01 00 00 00 nop 40005118: 81 c7 e0 08 ret 4000511c: 81 e8 00 00 restore rtems_interrupt_disable (level); 40005120: 7f ff f3 3d call 40001e14 <== NOT EXECUTED 40005124: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40005128: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 4000512c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40005130: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005134: 02 80 00 14 be 40005184 <== NOT EXECUTED 40005138: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 4000513c: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED 40005140: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40005144: 7f ff f3 38 call 40001e24 <== NOT EXECUTED 40005148: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 4000514c: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40005150: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005154: 40 00 06 be call 40006c4c <== NOT EXECUTED 40005158: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4000515c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005160: 12 80 00 0b bne 4000518c <== NOT EXECUTED 40005164: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 40005168: 7f ff f3 2b call 40001e14 <== NOT EXECUTED 4000516c: 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) { 40005170: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40005174: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40005178: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000517c: 32 bf ff f2 bne,a 40005144 <== NOT EXECUTED 40005180: 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); 40005184: 7f ff f3 28 call 40001e24 <== NOT EXECUTED 40005188: 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); 4000518c: 40 00 08 5f call 40007308 <== NOT EXECUTED 40005190: 01 00 00 00 nop 40005194: 01 00 00 00 nop 40004254 : int dup2( int fildes, int fildes2 ) { 40004254: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40004258: a0 07 bf b8 add %fp, -72, %l0 4000425c: 90 10 00 18 mov %i0, %o0 40004260: 40 00 02 28 call 40004b00 40004264: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40004268: 80 a2 3f ff cmp %o0, -1 4000426c: 12 80 00 04 bne 4000427c 40004270: 92 10 00 10 mov %l0, %o1 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 40004274: 81 c7 e0 08 ret 40004278: 91 e8 3f ff restore %g0, -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 4000427c: 40 00 02 21 call 40004b00 40004280: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40004284: 80 a2 3f ff cmp %o0, -1 40004288: 02 bf ff fb be 40004274 4000428c: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40004290: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40004294: 40 00 00 cf call 400045d0 <== NOT EXECUTED 40004298: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000429c: 81 c7 e0 08 ret <== NOT EXECUTED 400042a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40004b30 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 40004b30: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40004b34: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004b38: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004b3c: 02 80 00 0d be 40004b70 <== NOT EXECUTED 40004b40: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40004b44: 05 10 00 78 sethi %hi(0x4001e000), %g2 <== NOT EXECUTED 40004b48: c4 00 a2 d8 ld [ %g2 + 0x2d8 ], %g2 ! 4001e2d8 <__ctype_ptr__> <== NOT EXECUTED 40004b4c: 82 00 80 08 add %g2, %o0, %g1 <== NOT EXECUTED 40004b50: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 40004b54: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004b58: 02 80 00 06 be 40004b70 <== NOT EXECUTED 40004b5c: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 40004b60: 02 80 00 04 be 40004b70 <== NOT EXECUTED 40004b64: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40004b68: 12 80 00 06 bne 40004b80 <== NOT EXECUTED 40004b6c: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 40004b70: 7f ff ff 83 call 4000497c <== NOT EXECUTED 40004b74: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004b78: 81 c7 e0 08 ret <== NOT EXECUTED 40004b7c: 81 e8 00 00 restore <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 40004b80: b0 1e 20 40 xor %i0, 0x40, %i0 <== 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] = '^'; 40004b84: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 40004b88: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 40004b8c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40004b90: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004b94: 7f ff ff 2b call 40004840 <== NOT EXECUTED 40004b98: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40004b9c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004ba0: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 40004ba4: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40004ba8: 81 c7 e0 08 ret <== NOT EXECUTED 40004bac: 81 e8 00 00 restore <== NOT EXECUTED 4002b0bc : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 4002b0bc: 03 10 01 bf sethi %hi(0x4006fc00), %g1 <== NOT EXECUTED 4002b0c0: d0 00 61 14 ld [ %g1 + 0x114 ], %o0 ! 4006fd14 <== NOT EXECUTED 4002b0c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b0c8: 02 80 00 05 be 4002b0dc <== NOT EXECUTED 4002b0cc: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 4002b0d0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002b0d4: 40 00 6d 2a call 4004657c <== NOT EXECUTED 4002b0d8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002b0dc: 81 c3 e0 08 retl <== NOT EXECUTED 4002b0e0: 01 00 00 00 nop 4002b0e4 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 4002b0e4: 03 10 01 bf sethi %hi(0x4006fc00), %g1 <== NOT EXECUTED 4002b0e8: d0 00 60 2c ld [ %g1 + 0x2c ], %o0 ! 4006fc2c <== NOT EXECUTED 4002b0ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b0f0: 02 80 00 05 be 4002b104 <== NOT EXECUTED 4002b0f4: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 4002b0f8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002b0fc: 40 00 6d 20 call 4004657c <== NOT EXECUTED 4002b100: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002b104: 81 c3 e0 08 retl <== NOT EXECUTED 4002b108: 01 00 00 00 nop 40004bb0 : * 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) { 40004bb0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->ccount == 0) 40004bb4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 40004bb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004bbc: 02 80 00 36 be 40004c94 <== NOT EXECUTED 40004bc0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 40004bc4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004bc8: 12 80 00 35 bne 40004c9c <== NOT EXECUTED 40004bcc: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004bd0: 27 10 00 78 sethi %hi(0x4001e000), %l3 <== NOT EXECUTED 40004bd4: 29 10 00 74 sethi %hi(0x4001d000), %l4 <== NOT EXECUTED 40004bd8: 25 10 00 74 sethi %hi(0x4001d000), %l2 <== NOT EXECUTED 40004bdc: a6 14 e2 d8 or %l3, 0x2d8, %l3 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40004be0: a8 15 22 78 or %l4, 0x278, %l4 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 40004be4: 10 80 00 0c b 40004c14 <== NOT EXECUTED 40004be8: a4 14 a2 70 or %l2, 0x270, %l2 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004bec: 12 80 00 6a bne 40004d94 <== NOT EXECUTED 40004bf0: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004bf4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004bf8: 02 80 00 63 be 40004d84 <== NOT EXECUTED 40004bfc: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 40004c00: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004c04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c08: 02 80 00 5f be 40004d84 <== NOT EXECUTED 40004c0c: 01 00 00 00 nop <== NOT EXECUTED 40004c10: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 40004c14: c8 04 20 1c ld [ %l0 + 0x1c ], %g4 <== NOT EXECUTED 40004c18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004c1c: c2 24 20 20 st %g1, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40004c20: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004c24: 02 bf ff f4 be 40004bf4 <== NOT EXECUTED 40004c28: e2 09 00 01 ldub [ %g4 + %g1 ], %l1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40004c2c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004c30: 12 80 00 05 bne 40004c44 <== NOT EXECUTED 40004c34: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED 40004c38: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED 40004c3c: 22 80 00 54 be,a 40004d8c <== NOT EXECUTED 40004c40: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 40004c44: 80 a4 60 09 cmp %l1, 9 <== NOT EXECUTED 40004c48: 02 80 00 24 be 40004cd8 <== NOT EXECUTED 40004c4c: a2 04 60 01 inc %l1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004c50: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40004c54: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 40004c58: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004c5c: 12 bf ff e4 bne 40004bec <== NOT EXECUTED 40004c60: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40004c64: 11 10 00 74 sethi %hi(0x4001d000), %o0 <== NOT EXECUTED 40004c68: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004c6c: 90 12 22 78 or %o0, 0x278, %o0 <== NOT EXECUTED 40004c70: 7f ff fe f4 call 40004840 <== NOT EXECUTED 40004c74: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004c78: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004c7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c80: 02 bf ff de be 40004bf8 <== NOT EXECUTED 40004c84: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40004c88: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } } } if (!lineFlag) 40004c8c: 12 bf ff dd bne 40004c00 <== NOT EXECUTED 40004c90: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED 40004c94: 81 c7 e0 08 ret <== NOT EXECUTED 40004c98: 81 e8 00 00 restore <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 40004c9c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004ca0: 02 80 00 38 be 40004d80 <== NOT EXECUTED 40004ca4: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 40004ca8: 12 bf ff cb bne 40004bd4 <== NOT EXECUTED 40004cac: 27 10 00 78 sethi %hi(0x4001e000), %l3 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40004cb0: 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; 40004cb4: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40004cb8: 7f ff ff 9e call 40004b30 <== NOT EXECUTED 40004cbc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40004cc0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40004cc4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004cc8: 02 bf ff f3 be 40004c94 <== NOT EXECUTED 40004ccc: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 40004cd0: 7f ff ff 98 call 40004b30 <== NOT EXECUTED 40004cd4: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004cd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004cdc: 02 80 00 17 be 40004d38 <== NOT EXECUTED 40004ce0: e2 04 20 2c ld [ %l0 + 0x2c ], %l1 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 40004ce4: 96 08 a2 00 and %g2, 0x200, %o3 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40004ce8: d8 04 c0 00 ld [ %l3 ], %o4 <== NOT EXECUTED 40004cec: 10 80 00 07 b 40004d08 <== NOT EXECUTED 40004cf0: 84 10 20 00 clr %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40004cf4: 32 80 00 02 bne,a 40004cfc <== NOT EXECUTED 40004cf8: a2 04 60 02 add %l1, 2, %l1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004cfc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004d00: 22 80 00 0f be,a 40004d3c <== NOT EXECUTED 40004d04: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 40004d08: c6 09 00 02 ldub [ %g4 + %g2 ], %g3 <== NOT EXECUTED 40004d0c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (c == '\t') { 40004d10: 80 a0 e0 09 cmp %g3, 9 <== NOT EXECUTED 40004d14: 02 80 00 18 be 40004d74 <== NOT EXECUTED 40004d18: 9a 03 00 03 add %o4, %g3, %o5 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 40004d1c: c6 0b 60 01 ldub [ %o5 + 1 ], %g3 <== NOT EXECUTED 40004d20: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40004d24: 12 bf ff f4 bne 40004cf4 <== NOT EXECUTED 40004d28: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004d2c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004d30: 12 bf ff f6 bne 40004d08 <== NOT EXECUTED 40004d34: a2 04 60 01 inc %l1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004d38: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004d3c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40004d40: 16 bf ff ae bge 40004bf8 <== NOT EXECUTED 40004d44: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40004d48: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40004d4c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004d50: 7f ff fe bc call 40004840 <== NOT EXECUTED 40004d54: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 40004d58: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004d5c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004d60: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40004d64: 06 bf ff f9 bl 40004d48 <== NOT EXECUTED 40004d68: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004d6c: 10 bf ff a3 b 40004bf8 <== NOT EXECUTED 40004d70: 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; 40004d74: a2 14 60 07 or %l1, 7, %l1 <== NOT EXECUTED 40004d78: 10 bf ff e1 b 40004cfc <== NOT EXECUTED 40004d7c: a2 04 60 01 inc %l1 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 40004d80: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 40004d84: 81 c7 e0 08 ret <== NOT EXECUTED 40004d88: 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); 40004d8c: 7f ff ff 69 call 40004b30 <== NOT EXECUTED 40004d90: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40004d94: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004d98: 7f ff fe aa call 40004840 <== NOT EXECUTED 40004d9c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004da0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004da4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004da8: 22 80 00 05 be,a 40004dbc <== NOT EXECUTED 40004dac: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED tty->column--; 40004db0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004db4: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40004db8: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40004dbc: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 40004dc0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004dc4: 02 bf ff a9 be 40004c68 <== NOT EXECUTED 40004dc8: 11 10 00 74 sethi %hi(0x4001d000), %o0 <== NOT EXECUTED 40004dcc: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED 40004dd0: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 40004dd4: 12 bf ff a6 bne 40004c6c <== NOT EXECUTED 40004dd8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004ddc: 10 bf ff 87 b 40004bf8 <== NOT EXECUTED 40004de0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4003f8cc : #include int fchdir( int fd ) { 4003f8cc: 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 ); 4003f8d0: 03 10 01 af sethi %hi(0x4006bc00), %g1 <== NOT EXECUTED 4003f8d4: c2 00 62 a4 ld [ %g1 + 0x2a4 ], %g1 ! 4006bea4 <== NOT EXECUTED 4003f8d8: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4003f8dc: 1a 80 00 55 bcc 4003fa30 <== NOT EXECUTED 4003f8e0: 03 10 01 c0 sethi %hi(0x40070000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4003f8e4: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 40070058 <== NOT EXECUTED 4003f8e8: 85 2e 20 06 sll %i0, 6, %g2 <== NOT EXECUTED 4003f8ec: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4003f8f0: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 4003f8f4: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4003f8f8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4003f8fc: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4003f900: 02 80 00 4c be 4003fa30 <== NOT EXECUTED 4003f904: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003f908: 02 80 00 5d be 4003fa7c <== NOT EXECUTED 4003f90c: 01 00 00 00 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4003f910: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 4003f914: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003f918: 02 80 00 5f be 4003fa94 <== NOT EXECUTED 4003f91c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4003f920: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4003f924: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003f928: 02 80 00 5b be 4003fa94 <== NOT EXECUTED 4003f92c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4003f930: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003f934: 90 06 20 1c add %i0, 0x1c, %o0 <== NOT EXECUTED 4003f938: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4003f93c: 12 80 00 37 bne 4003fa18 <== NOT EXECUTED 4003f940: 21 10 01 b0 sethi %hi(0x4006c000), %l0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003f944: c2 04 21 98 ld [ %l0 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003f948: 11 10 01 8d sethi %hi(0x40063400), %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003f94c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003f950: 90 12 21 c8 or %o0, 0x1c8, %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003f954: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4003f958: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003f95c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003f960: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4003f964: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003f968: 94 10 20 00 clr %o2 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003f96c: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4003f970: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003f974: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003f978: c4 27 bf e4 st %g2, [ %fp + -28 ] <== NOT EXECUTED 4003f97c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003f980: 98 10 20 00 clr %o4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003f984: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4003f988: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED 4003f98c: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003f990: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED 4003f994: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003f998: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED 4003f99c: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003f9a0: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 <== NOT EXECUTED 4003f9a4: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003f9a8: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003f9ac: 7f ff 22 4f call 400082e8 <== NOT EXECUTED 4003f9b0: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED 4003f9b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4003f9b8: 12 80 00 24 bne 4003fa48 <== NOT EXECUTED 4003f9bc: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 4003f9c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003f9c4: 02 80 00 09 be 4003f9e8 <== NOT EXECUTED 4003f9c8: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4003f9cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4003f9d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003f9d4: 22 80 00 06 be,a 4003f9ec <== NOT EXECUTED 4003f9d8: c2 04 21 98 ld [ %l0 + 0x198 ], %g1 <== NOT EXECUTED 4003f9dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003f9e0: 90 07 bf d8 add %fp, -40, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4003f9e4: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4003f9e8: c2 04 21 98 ld [ %l0 + 0x198 ], %g1 <== NOT EXECUTED 4003f9ec: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003f9f0: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED 4003f9f4: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003f9f8: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 4003f9fc: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003fa00: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 4003fa04: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003fa08: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 4003fa0c: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return 0; } 4003fa10: 81 c7 e0 08 ret <== NOT EXECUTED 4003fa14: 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 ); 4003fa18: 40 00 1a 81 call 4004641c <__errno> <== NOT EXECUTED 4003fa1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003fa20: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 4003fa24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003fa28: 81 c7 e0 08 ret <== NOT EXECUTED 4003fa2c: 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); 4003fa30: 40 00 1a 7b call 4004641c <__errno> <== NOT EXECUTED 4003fa34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003fa38: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4003fa3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003fa40: 81 c7 e0 08 ret <== NOT EXECUTED 4003fa44: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 4003fa48: c4 07 bf d8 ld [ %fp + -40 ], %g2 <== NOT EXECUTED 4003fa4c: c2 04 21 98 ld [ %l0 + 0x198 ], %g1 <== NOT EXECUTED 4003fa50: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003fa54: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED 4003fa58: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003fa5c: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED 4003fa60: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003fa64: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 4003fa68: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003fa6c: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 4003fa70: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return -1; 4003fa74: 81 c7 e0 08 ret <== NOT EXECUTED 4003fa78: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003fa7c: 40 00 1a 68 call 4004641c <__errno> <== NOT EXECUTED 4003fa80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003fa84: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4003fa88: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003fa8c: 81 c7 e0 08 ret <== NOT EXECUTED 4003fa90: 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 ); 4003fa94: 40 00 1a 62 call 4004641c <__errno> <== NOT EXECUTED 4003fa98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003fa9c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4003faa0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003faa4: 81 c7 e0 08 ret <== NOT EXECUTED 4003faa8: 81 e8 00 00 restore <== NOT EXECUTED 4002abf4 : int fchmod( int fd, mode_t mode ) { 4002abf4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4002abf8: 03 10 01 af sethi %hi(0x4006bc00), %g1 <== NOT EXECUTED 4002abfc: c2 00 62 a4 ld [ %g1 + 0x2a4 ], %g1 ! 4006bea4 <== NOT EXECUTED 4002ac00: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002ac04: 1a 80 00 19 bcc 4002ac68 <== NOT EXECUTED 4002ac08: 03 10 01 c0 sethi %hi(0x40070000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002ac0c: d0 00 60 58 ld [ %g1 + 0x58 ], %o0 ! 40070058 <== NOT EXECUTED 4002ac10: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 4002ac14: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4002ac18: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 4002ac1c: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002ac20: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 4002ac24: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4002ac28: 02 80 00 10 be 4002ac68 <== NOT EXECUTED 4002ac2c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002ac30: 02 80 00 14 be 4002ac80 <== NOT EXECUTED 4002ac34: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 4002ac38: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 <== NOT EXECUTED 4002ac3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002ac40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ac44: 02 80 00 15 be 4002ac98 <== NOT EXECUTED 4002ac48: 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 ); 4002ac4c: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED 4002ac50: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002ac54: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4002ac58: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ac5c: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 4002ac60: 81 c7 e0 08 ret <== NOT EXECUTED 4002ac64: 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); 4002ac68: 40 00 6d ed call 4004641c <__errno> <== NOT EXECUTED 4002ac6c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ac70: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002ac74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ac78: 81 c7 e0 08 ret <== NOT EXECUTED 4002ac7c: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002ac80: 40 00 6d e7 call 4004641c <__errno> <== NOT EXECUTED 4002ac84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ac88: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002ac8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ac90: 81 c7 e0 08 ret <== NOT EXECUTED 4002ac94: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002ac98: 40 00 6d e1 call 4004641c <__errno> <== NOT EXECUTED 4002ac9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002aca0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002aca4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002aca8: 81 c7 e0 08 ret <== NOT EXECUTED 4002acac: 81 e8 00 00 restore <== NOT EXECUTED 4002acb0 : int fchown( int fd, uid_t owner, gid_t group ) { 4002acb0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4002acb4: 03 10 01 af sethi %hi(0x4006bc00), %g1 <== NOT EXECUTED 4002acb8: c2 00 62 a4 ld [ %g1 + 0x2a4 ], %g1 ! 4006bea4 <== NOT EXECUTED 4002acbc: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002acc0: 1a 80 00 19 bcc 4002ad24 <== NOT EXECUTED 4002acc4: 03 10 01 c0 sethi %hi(0x40070000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002acc8: d0 00 60 58 ld [ %g1 + 0x58 ], %o0 ! 40070058 <== NOT EXECUTED 4002accc: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 4002acd0: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4002acd4: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 4002acd8: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002acdc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 4002ace0: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4002ace4: 02 80 00 10 be 4002ad24 <== NOT EXECUTED 4002ace8: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002acec: 02 80 00 14 be 4002ad3c <== NOT EXECUTED 4002acf0: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 4002acf4: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002acf8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002acfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ad00: 02 80 00 15 be 4002ad54 <== NOT EXECUTED 4002ad04: 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 ); 4002ad08: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 4002ad0c: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4002ad10: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED 4002ad14: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ad18: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 4002ad1c: 81 c7 e0 08 ret <== NOT EXECUTED 4002ad20: 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); 4002ad24: 40 00 6d be call 4004641c <__errno> <== NOT EXECUTED 4002ad28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ad2c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002ad30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ad34: 81 c7 e0 08 ret <== NOT EXECUTED 4002ad38: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002ad3c: 40 00 6d b8 call 4004641c <__errno> <== NOT EXECUTED 4002ad40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ad44: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002ad48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ad4c: 81 c7 e0 08 ret <== NOT EXECUTED 4002ad50: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002ad54: 40 00 6d b2 call 4004641c <__errno> <== NOT EXECUTED 4002ad58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ad5c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002ad60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ad64: 81 c7 e0 08 ret <== NOT EXECUTED 4002ad68: 81 e8 00 00 restore <== NOT EXECUTED 4003fad4 : int fcntl( int fd, int cmd, ... ) { 4003fad4: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003fad8: 03 10 01 af sethi %hi(0x4006bc00), %g1 4003fadc: c2 00 62 a4 ld [ %g1 + 0x2a4 ], %g1 ! 4006bea4 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4003fae0: 84 07 a0 4c add %fp, 0x4c, %g2 4003fae4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4003fae8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4003faec: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4003faf0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003faf4: 80 a6 00 01 cmp %i0, %g1 4003faf8: 1a 80 00 7a bcc 4003fce0 4003fafc: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 4003fb00: 21 10 01 c0 sethi %hi(0x40070000), %l0 4003fb04: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 ! 40070058 4003fb08: 89 2e 20 06 sll %i0, 6, %g4 4003fb0c: 93 2e 20 03 sll %i0, 3, %o1 4003fb10: 92 02 40 04 add %o1, %g4, %o1 4003fb14: 92 00 c0 09 add %g3, %o1, %o1 rtems_libio_check_is_open(iop); 4003fb18: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 4003fb1c: 80 8a 21 00 btst 0x100, %o0 4003fb20: 02 80 00 70 be 4003fce0 4003fb24: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003fb28: 08 80 00 08 bleu 4003fb48 4003fb2c: 89 2e 60 02 sll %i1, 2, %g4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 4003fb30: 40 00 1a 3b call 4004641c <__errno> 4003fb34: b0 10 3f ff mov -1, %i0 4003fb38: 82 10 20 16 mov 0x16, %g1 4003fb3c: c2 22 00 00 st %g1, [ %o0 ] 4003fb40: 81 c7 e0 08 ret 4003fb44: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003fb48: 1b 10 00 fe sethi %hi(0x4003f800), %o5 4003fb4c: 9a 13 62 ac or %o5, 0x2ac, %o5 ! 4003faac 4003fb50: c8 03 40 04 ld [ %o5 + %g4 ], %g4 4003fb54: 81 c1 00 00 jmp %g4 4003fb58: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4003fb5c: 40 00 1a 30 call 4004641c <__errno> 4003fb60: b0 10 3f ff mov -1, %i0 ! ffffffff 4003fb64: 82 10 20 86 mov 0x86, %g1 4003fb68: c2 22 00 00 st %g1, [ %o0 ] 4003fb6c: 81 c7 e0 08 ret 4003fb70: 81 e8 00 00 restore 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 ) ); 4003fb74: d0 00 80 00 ld [ %g2 ], %o0 4003fb78: 7f ff 23 55 call 400088cc 4003fb7c: d2 27 bf f4 st %o1, [ %fp + -12 ] /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 4003fb80: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003fb84: 90 0a 22 01 and %o0, 0x201, %o0 4003fb88: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 4003fb8c: b0 10 20 00 clr %i0 4003fb90: 82 08 7d fe and %g1, -514, %g1 4003fb94: 82 12 00 01 or %o0, %g1, %g1 4003fb98: c2 22 60 18 st %g1, [ %o1 + 0x18 ] * 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) { 4003fb9c: c2 02 60 40 ld [ %o1 + 0x40 ], %g1 4003fba0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4003fba4: 80 a0 60 00 cmp %g1, 0 4003fba8: 02 80 00 52 be 4003fcf0 4003fbac: 01 00 00 00 nop int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4003fbb0: 9f c0 40 00 call %g1 4003fbb4: 90 10 00 19 mov %i1, %o0 if (err) { 4003fbb8: b2 92 20 00 orcc %o0, 0, %i1 4003fbbc: 12 80 00 04 bne 4003fbcc 4003fbc0: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4003fbc4: 81 c7 e0 08 ret 4003fbc8: 81 e8 00 00 restore if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 4003fbcc: 40 00 1a 14 call 4004641c <__errno> <== NOT EXECUTED 4003fbd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003fbd4: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4003fbd8: 81 c7 e0 08 ret <== NOT EXECUTED 4003fbdc: 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 ); 4003fbe0: 7f ff 22 8b call 4000860c 4003fbe4: d2 27 bf f4 st %o1, [ %fp + -12 ] 4003fbe8: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003fbec: b0 10 00 08 mov %o0, %i0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 4003fbf0: 80 a6 20 00 cmp %i0, 0 4003fbf4: 36 bf ff eb bge,a 4003fba0 4003fbf8: c2 02 60 40 ld [ %o1 + 0x40 ], %g1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4003fbfc: 81 c7 e0 08 ret <== NOT EXECUTED 4003fc00: 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 ) ) 4003fc04: c2 00 80 00 ld [ %g2 ], %g1 4003fc08: 80 a0 60 00 cmp %g1, 0 4003fc0c: 22 80 00 2c be,a 4003fcbc 4003fc10: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 4003fc14: 90 12 28 00 or %o0, 0x800, %o0 4003fc18: b0 10 20 00 clr %i0 4003fc1c: 10 bf ff e0 b 4003fb9c 4003fc20: d0 22 60 18 st %o0, [ %o1 + 0x18 ] 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); 4003fc24: b1 32 20 0b srl %o0, 0xb, %i0 4003fc28: 10 bf ff dd b 4003fb9c 4003fc2c: b0 0e 20 01 and %i0, 1, %i0 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 4003fc30: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 4003fc34: 80 a0 a0 00 cmp %g2, 0 4003fc38: 02 80 00 30 be 4003fcf8 4003fc3c: 80 a0 40 02 cmp %g1, %g2 diop = rtems_libio_iop( fd2 ); 4003fc40: b0 10 20 00 clr %i0 <== NOT EXECUTED 4003fc44: 18 80 00 21 bgu 4003fcc8 <== NOT EXECUTED 4003fc48: 82 10 20 00 clr %g1 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003fc4c: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 4003fc50: da 02 60 40 ld [ %o1 + 0x40 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003fc54: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4003fc58: c4 02 60 20 ld [ %o1 + 0x20 ], %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003fc5c: c8 02 60 3c ld [ %o1 + 0x3c ], %g4 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003fc60: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4003fc64: c4 02 60 24 ld [ %o1 + 0x24 ], %g2 ret = (int) (diop - rtems_libio_iops); 4003fc68: 86 26 00 03 sub %i0, %g3, %g3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003fc6c: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 4003fc70: c4 02 60 28 ld [ %o1 + 0x28 ], %g2 ret = (int) (diop - rtems_libio_iops); 4003fc74: 87 38 e0 03 sra %g3, 3, %g3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003fc78: c4 20 60 28 st %g2, [ %g1 + 0x28 ] 4003fc7c: c4 02 60 2c ld [ %o1 + 0x2c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 4003fc80: da 20 60 40 st %o5, [ %g1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003fc84: c4 20 60 2c st %g2, [ %g1 + 0x2c ] ret = (int) (diop - rtems_libio_iops); 4003fc88: 85 28 e0 06 sll %g3, 6, %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003fc8c: c8 20 60 3c st %g4, [ %g1 + 0x3c ] diop->flags = iop->flags; 4003fc90: d0 20 60 18 st %o0, [ %g1 + 0x18 ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 4003fc94: 83 28 e0 03 sll %g3, 3, %g1 4003fc98: 82 20 80 01 sub %g2, %g1, %g1 4003fc9c: 85 28 60 06 sll %g1, 6, %g2 4003fca0: 82 00 40 02 add %g1, %g2, %g1 4003fca4: 82 00 40 03 add %g1, %g3, %g1 4003fca8: b1 28 60 0f sll %g1, 0xf, %i0 4003fcac: b0 26 00 01 sub %i0, %g1, %i0 4003fcb0: b1 2e 20 03 sll %i0, 3, %i0 4003fcb4: 10 bf ff cf b 4003fbf0 4003fcb8: b0 06 00 03 add %i0, %g3, %i0 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 4003fcbc: b0 10 20 00 clr %i0 <== NOT EXECUTED 4003fcc0: 10 bf ff b7 b 4003fb9c <== NOT EXECUTED 4003fcc4: d0 22 60 18 st %o0, [ %o1 + 0x18 ] <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 4003fcc8: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 4003fccc: 85 28 a0 03 sll %g2, 3, %g2 <== NOT EXECUTED 4003fcd0: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 4003fcd4: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 4003fcd8: 10 bf ff dd b 4003fc4c <== NOT EXECUTED 4003fcdc: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4003fce0: 40 00 19 cf call 4004641c <__errno> <== NOT EXECUTED 4003fce4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003fce8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4003fcec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003fcf0: 81 c7 e0 08 ret <== NOT EXECUTED 4003fcf4: 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(); 4003fcf8: 7f ff 22 b4 call 400087c8 4003fcfc: d2 27 bf f4 st %o1, [ %fp + -12 ] if ( diop == 0 ) { 4003fd00: b0 10 3f ff mov -1, %i0 4003fd04: 82 92 20 00 orcc %o0, 0, %g1 4003fd08: 02 bf ff 8e be 4003fb40 4003fd0c: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003fd10: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 4003fd14: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 4003fd18: 10 bf ff cd b 4003fc4c 4003fd1c: b0 10 00 01 mov %g1, %i0 4000e77c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000e77c: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000e780: 21 10 00 7a sethi %hi(0x4001e800), %l0 4000e784: d0 04 21 00 ld [ %l0 + 0x100 ], %o0 ! 4001e900 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000e788: a2 10 00 18 mov %i0, %l1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000e78c: 92 10 20 00 clr %o1 4000e790: 94 10 20 00 clr %o2 4000e794: 7f ff e1 2e call 40006c4c 4000e798: b0 10 3f fc mov -4, %i0 4000e79c: 80 a2 20 00 cmp %o0, 0 4000e7a0: 12 80 01 0c bne 4000ebd0 4000e7a4: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4000e7a8: e4 04 40 00 ld [ %l1 ], %l2 <== NOT EXECUTED if (pipe == NULL) { 4000e7ac: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4000e7b0: 02 80 00 8e be 4000e9e8 <== NOT EXECUTED 4000e7b4: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000e7b8: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED 4000e7bc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e7c0: 7f ff e1 23 call 40006c4c <== NOT EXECUTED 4000e7c4: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000e7c8: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000e7cc: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000e7d0: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000e7d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000e7d8: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000e7dc: 02 80 00 67 be 4000e978 <== NOT EXECUTED 4000e7e0: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000e7e4: 7f ff e1 61 call 40006d68 <== NOT EXECUTED 4000e7e8: d0 04 21 00 ld [ %l0 + 0x100 ], %o0 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4000e7ec: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000e7f0: 12 80 00 f8 bne 4000ebd0 <== NOT EXECUTED 4000e7f4: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000e7f8: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 4000e7fc: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000e800: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000e804: 02 80 00 35 be 4000e8d8 <== NOT EXECUTED 4000e808: e0 04 40 00 ld [ %l1 ], %l0 <== NOT EXECUTED 4000e80c: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000e810: 02 80 00 61 be 4000e994 <== NOT EXECUTED 4000e814: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000e818: 22 80 00 07 be,a 4000e834 <== NOT EXECUTED 4000e81c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4000e820: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000e824: 7f ff e1 51 call 40006d68 <== NOT EXECUTED 4000e828: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 4000e82c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e830: 81 e8 00 00 restore <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000e834: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000e838: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000e83c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000e840: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 4000e844: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e848: 02 80 00 cc be 4000eb78 <== NOT EXECUTED 4000e84c: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4000e850: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000e854: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e858: 32 bf ff f3 bne,a 4000e824 <== NOT EXECUTED 4000e85c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4000e860: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 4000e864: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000e868: 32 bf ff ef bne,a 4000e824 <== NOT EXECUTED 4000e86c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4000e870: 10 80 00 0c b 4000e8a0 <== NOT EXECUTED 4000e874: e4 04 20 24 ld [ %l0 + 0x24 ], %l2 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4000e878: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e87c: 7f ff e0 f4 call 40006c4c <== NOT EXECUTED 4000e880: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000e884: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e888: 12 80 00 0f bne 4000e8c4 <== NOT EXECUTED 4000e88c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4000e890: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 4000e894: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 4000e898: 32 bf ff e3 bne,a 4000e824 <== NOT EXECUTED 4000e89c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4000e8a0: 7f ff e1 32 call 40006d68 <== NOT EXECUTED 4000e8a4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000e8a8: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000e8ac: 40 00 03 36 call 4000f584 <== NOT EXECUTED 4000e8b0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e8b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e8b8: 22 bf ff f0 be,a 4000e878 <== NOT EXECUTED 4000e8bc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4000e8c0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4000e8c4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000e8c8: 7f ff ff 5b call 4000e634 <== NOT EXECUTED 4000e8cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 4000e8d0: 81 c7 e0 08 ret <== NOT EXECUTED 4000e8d4: 81 e8 00 00 restore <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4000e8d8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000e8dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e8e0: 32 80 00 06 bne,a 4000e8f8 <== NOT EXECUTED 4000e8e4: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 4000e8e8: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000e8ec: 12 bf ff f6 bne 4000e8c4 <== NOT EXECUTED 4000e8f0: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000e8f4: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000e8f8: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000e8fc: 88 00 a0 01 add %g2, 1, %g4 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000e900: 86 00 e0 01 inc %g3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000e904: c8 24 20 14 st %g4, [ %l0 + 0x14 ] <== NOT EXECUTED 4000e908: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000e90c: 02 80 00 a0 be 4000eb8c <== NOT EXECUTED 4000e910: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 4000e914: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e918: 32 bf ff c3 bne,a 4000e824 <== NOT EXECUTED 4000e91c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED prevCounter = pipe->readerCounter; 4000e920: 10 80 00 0c b 4000e950 <== NOT EXECUTED 4000e924: e4 04 20 20 ld [ %l0 + 0x20 ], %l2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4000e928: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e92c: 7f ff e0 c8 call 40006c4c <== NOT EXECUTED 4000e930: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000e934: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e938: 12 bf ff e3 bne 4000e8c4 <== NOT EXECUTED 4000e93c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4000e940: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 4000e944: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 4000e948: 32 bf ff b7 bne,a 4000e824 <== NOT EXECUTED 4000e94c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4000e950: 7f ff e1 06 call 40006d68 <== NOT EXECUTED 4000e954: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000e958: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000e95c: 40 00 03 0a call 4000f584 <== NOT EXECUTED 4000e960: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e964: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e968: 22 bf ff f0 be,a 4000e928 <== NOT EXECUTED 4000e96c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4000e970: 10 bf ff d5 b 4000e8c4 <== NOT EXECUTED 4000e974: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4000e978: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000e97c: 12 80 00 89 bne 4000eba0 <== NOT EXECUTED 4000e980: d0 04 21 00 ld [ %l0 + 0x100 ], %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000e984: 7f ff e0 f9 call 40006d68 <== NOT EXECUTED 4000e988: e4 24 40 00 st %l2, [ %l1 ] <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000e98c: 10 bf ff 9c b 4000e7fc <== NOT EXECUTED 4000e990: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000e994: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000e998: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000e99c: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000e9a0: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000e9a4: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 4000e9a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e9ac: 02 80 00 6e be 4000eb64 <== NOT EXECUTED 4000e9b0: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000e9b4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4000e9b8: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000e9bc: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4000e9c0: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000e9c4: c6 24 20 14 st %g3, [ %l0 + 0x14 ] <== NOT EXECUTED 4000e9c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e9cc: 12 bf ff 95 bne 4000e820 <== NOT EXECUTED 4000e9d0: c4 24 20 24 st %g2, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000e9d4: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000e9d8: 40 00 02 d4 call 4000f528 <== NOT EXECUTED 4000e9dc: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4000e9e0: 10 bf ff 91 b 4000e824 <== NOT EXECUTED 4000e9e4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4000e9e8: 7f ff f6 6f call 4000c3a4 <== NOT EXECUTED 4000e9ec: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 4000e9f0: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 4000e9f4: 02 bf ff 7c be 4000e7e4 <== NOT EXECUTED 4000e9f8: a4 10 00 13 mov %l3, %l2 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4000e9fc: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4000ea00: c0 24 c0 00 clr [ %l3 ] <== NOT EXECUTED 4000ea04: c0 24 e0 08 clr [ %l3 + 8 ] <== NOT EXECUTED 4000ea08: c0 24 e0 0c clr [ %l3 + 0xc ] <== NOT EXECUTED 4000ea0c: c0 24 e0 10 clr [ %l3 + 0x10 ] <== NOT EXECUTED 4000ea10: c0 24 e0 14 clr [ %l3 + 0x14 ] <== NOT EXECUTED 4000ea14: c0 24 e0 18 clr [ %l3 + 0x18 ] <== NOT EXECUTED 4000ea18: c0 24 e0 1c clr [ %l3 + 0x1c ] <== NOT EXECUTED 4000ea1c: c0 24 e0 20 clr [ %l3 + 0x20 ] <== NOT EXECUTED 4000ea20: c0 24 e0 24 clr [ %l3 + 0x24 ] <== NOT EXECUTED 4000ea24: c0 24 e0 28 clr [ %l3 + 0x28 ] <== NOT EXECUTED 4000ea28: c0 24 e0 2c clr [ %l3 + 0x2c ] <== NOT EXECUTED 4000ea2c: c0 24 e0 30 clr [ %l3 + 0x30 ] <== NOT EXECUTED pipe->Size = PIPE_BUF; 4000ea30: c2 24 e0 04 st %g1, [ %l3 + 4 ] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4000ea34: 7f ff f6 5c call 4000c3a4 <== NOT EXECUTED 4000ea38: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED if (! pipe->Buffer) 4000ea3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ea40: 02 80 00 46 be 4000eb58 <== NOT EXECUTED 4000ea44: d0 24 c0 00 st %o0, [ %l3 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4000ea48: 29 10 00 78 sethi %hi(0x4001e000), %l4 <== NOT EXECUTED 4000ea4c: d0 4d 22 c4 ldsb [ %l4 + 0x2c4 ], %o0 ! 4001e2c4 <== NOT EXECUTED 4000ea50: 2b 14 12 5c sethi %hi(0x50497000), %l5 <== NOT EXECUTED 4000ea54: 82 15 62 00 or %l5, 0x200, %g1 ! 50497200 <== NOT EXECUTED 4000ea58: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ea5c: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000ea60: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000ea64: 40 00 02 5f call 4000f3e0 <== NOT EXECUTED 4000ea68: 96 04 e0 2c add %l3, 0x2c, %o3 <== NOT EXECUTED 4000ea6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ea70: 32 80 00 38 bne,a 4000eb50 <== NOT EXECUTED 4000ea74: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4000ea78: d0 4d 22 c4 ldsb [ %l4 + 0x2c4 ], %o0 <== NOT EXECUTED 4000ea7c: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 4000ea80: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 4000ea84: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ea88: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000ea8c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000ea90: 40 00 02 54 call 4000f3e0 <== NOT EXECUTED 4000ea94: 96 04 e0 30 add %l3, 0x30, %o3 <== NOT EXECUTED 4000ea98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ea9c: 12 80 00 2a bne 4000eb44 <== NOT EXECUTED 4000eaa0: aa 15 63 00 or %l5, 0x300, %l5 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4000eaa4: d0 4d 22 c4 ldsb [ %l4 + 0x2c4 ], %o0 <== NOT EXECUTED 4000eaa8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000eaac: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED 4000eab0: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000eab4: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000eab8: 7f ff df c4 call 400069c8 <== NOT EXECUTED 4000eabc: 98 04 e0 28 add %l3, 0x28, %o4 <== NOT EXECUTED 4000eac0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000eac4: 12 80 00 1e bne 4000eb3c <== NOT EXECUTED 4000eac8: ac 07 bf f8 add %fp, -8, %l6 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4000eacc: d2 04 e0 2c ld [ %l3 + 0x2c ], %o1 <== NOT EXECUTED 4000ead0: 2b 10 00 7d sethi %hi(0x4001f400), %l5 <== NOT EXECUTED 4000ead4: 94 10 00 16 mov %l6, %o2 <== NOT EXECUTED 4000ead8: 7f ff e6 b5 call 400085ac <_Objects_Get> <== NOT EXECUTED 4000eadc: 90 15 62 10 or %l5, 0x210, %o0 <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 4000eae0: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 4000eae4: 27 04 00 00 sethi %hi(0x10000000), %l3 <== NOT EXECUTED 4000eae8: 82 10 40 13 or %g1, %l3, %g1 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4000eaec: 7f ff e9 24 call 40008f7c <_Thread_Enable_dispatch> <== NOT EXECUTED 4000eaf0: c2 22 20 4c st %g1, [ %o0 + 0x4c ] <== NOT EXECUTED 4000eaf4: d2 04 a0 30 ld [ %l2 + 0x30 ], %o1 <== NOT EXECUTED 4000eaf8: 94 10 00 16 mov %l6, %o2 <== NOT EXECUTED 4000eafc: 7f ff e6 ac call 400085ac <_Objects_Get> <== NOT EXECUTED 4000eb00: 90 15 62 10 or %l5, 0x210, %o0 <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4000eb04: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 4000eb08: a6 10 40 13 or %g1, %l3, %l3 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4000eb0c: 7f ff e9 1c call 40008f7c <_Thread_Enable_dispatch> <== NOT EXECUTED 4000eb10: e6 22 20 4c st %l3, [ %o0 + 0x4c ] <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4000eb14: c2 0d 22 c4 ldub [ %l4 + 0x2c4 ], %g1 <== NOT EXECUTED 4000eb18: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4000eb1c: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4000eb20: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000eb24: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 4000eb28: 12 bf ff 24 bne 4000e7b8 <== NOT EXECUTED 4000eb2c: c4 2d 22 c4 stb %g2, [ %l4 + 0x2c4 ] <== NOT EXECUTED c = 'a'; 4000eb30: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 4000eb34: 10 bf ff 21 b 4000e7b8 <== NOT EXECUTED 4000eb38: c2 2d 22 c4 stb %g1, [ %l4 + 0x2c4 ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4000eb3c: 40 00 02 61 call 4000f4c0 <== NOT EXECUTED 4000eb40: d0 04 e0 30 ld [ %l3 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4000eb44: 40 00 02 5f call 4000f4c0 <== NOT EXECUTED 4000eb48: d0 04 e0 2c ld [ %l3 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4000eb4c: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED 4000eb50: 7f ff f4 95 call 4000bda4 <== NOT EXECUTED 4000eb54: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 4000eb58: 7f ff f4 93 call 4000bda4 <== NOT EXECUTED 4000eb5c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4000eb60: 30 bf ff 21 b,a 4000e7e4 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4000eb64: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000eb68: 40 00 02 70 call 4000f528 <== NOT EXECUTED 4000eb6c: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000eb70: 10 bf ff 92 b 4000e9b8 <== NOT EXECUTED 4000eb74: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4000eb78: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000eb7c: 40 00 02 6b call 4000f528 <== NOT EXECUTED 4000eb80: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 4000eb84: 10 bf ff 34 b 4000e854 <== NOT EXECUTED 4000eb88: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4000eb8c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000eb90: 40 00 02 66 call 4000f528 <== NOT EXECUTED 4000eb94: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 4000eb98: 10 bf ff 5f b 4000e914 <== NOT EXECUTED 4000eb9c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4000eba0: 40 00 02 48 call 4000f4c0 <== NOT EXECUTED 4000eba4: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000eba8: 40 00 02 46 call 4000f4c0 <== NOT EXECUTED 4000ebac: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000ebb0: 7f ff df fa call 40006b98 <== NOT EXECUTED 4000ebb4: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000ebb8: 7f ff f4 7b call 4000bda4 <== NOT EXECUTED 4000ebbc: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED free(pipe); 4000ebc0: 7f ff f4 79 call 4000bda4 <== NOT EXECUTED 4000ebc4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000ebc8: 7f ff e0 68 call 40006d68 <== NOT EXECUTED 4000ebcc: d0 04 21 00 ld [ %l0 + 0x100 ], %o0 <== NOT EXECUTED 4000ebd0: 81 c7 e0 08 ret 4000ebd4: 81 e8 00 00 restore 4000c098 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c098: 05 10 01 c0 sethi %hi(0x40070000), %g2 <== NOT EXECUTED 4000c09c: c2 00 a0 a0 ld [ %g2 + 0xa0 ], %g1 ! 400700a0 <== NOT EXECUTED 4000c0a0: 84 10 a0 a0 or %g2, 0xa0, %g2 <== NOT EXECUTED 4000c0a4: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED 4000c0a8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000c0ac: 02 80 00 10 be 4000c0ec <== NOT EXECUTED 4000c0b0: 01 00 00 00 nop <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 4000c0b4: c8 02 60 10 ld [ %o1 + 0x10 ], %g4 <== NOT EXECUTED 4000c0b8: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED 4000c0bc: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 4000c0c0: 32 80 00 08 bne,a 4000c0e0 <== NOT EXECUTED 4000c0c4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c0c8: 81 c3 e0 08 retl <== NOT EXECUTED 4000c0cc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 4000c0d0: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 4000c0d4: 02 80 00 08 be 4000c0f4 <== NOT EXECUTED 4000c0d8: 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 ) { 4000c0dc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c0e0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000c0e4: 32 bf ff fb bne,a 4000c0d0 <== NOT EXECUTED 4000c0e8: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED return true; } } return false; } 4000c0ec: 81 c3 e0 08 retl <== NOT EXECUTED 4000c0f0: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000c0f4: 81 c3 e0 08 retl <== NOT EXECUTED 4000c0f8: 01 00 00 00 nop 40004918 : long fpathconf( int fd, int name ) { 40004918: 9d e3 bf a0 save %sp, -96, %sp long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 4000491c: 03 10 00 88 sethi %hi(0x40022000), %g1 40004920: c2 00 63 f4 ld [ %g1 + 0x3f4 ], %g1 ! 400223f4 40004924: 80 a6 00 01 cmp %i0, %g1 40004928: 1a 80 00 3f bcc 40004a24 4000492c: 03 10 00 8b sethi %hi(0x40022c00), %g1 iop = rtems_libio_iop(fd); 40004930: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 40022d90 40004934: 85 2e 20 06 sll %i0, 6, %g2 40004938: b1 2e 20 03 sll %i0, 3, %i0 4000493c: b0 06 00 02 add %i0, %g2, %i0 40004940: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 40004944: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40004948: 80 88 61 00 btst 0x100, %g1 4000494c: 02 80 00 36 be 40004a24 40004950: 80 88 60 02 btst 2, %g1 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40004954: 02 80 00 3a be 40004a3c 40004958: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4000495c: 08 80 00 08 bleu 4000497c 40004960: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40004964: 40 00 3b 3f call 40013660 <__errno> 40004968: b0 10 3f ff mov -1, %i0 4000496c: 82 10 20 16 mov 0x16, %g1 40004970: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 40004974: 81 c7 e0 08 ret 40004978: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4000497c: b3 2e 60 02 sll %i1, 2, %i1 40004980: 05 10 00 12 sethi %hi(0x40004800), %g2 40004984: 84 10 a0 e8 or %g2, 0xe8, %g2 ! 400048e8 40004988: c4 00 80 19 ld [ %g2 + %i1 ], %g2 4000498c: 81 c0 80 00 jmp %g2 40004990: 01 00 00 00 nop break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 40004994: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 40004998: 81 c7 e0 08 ret 4000499c: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 400049a0: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 400049a4: 81 c7 e0 08 ret 400049a8: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 400049ac: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 400049b0: 81 c7 e0 08 ret 400049b4: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 400049b8: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 400049bc: 81 c7 e0 08 ret 400049c0: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 400049c4: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 400049c8: 81 c7 e0 08 ret 400049cc: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 400049d0: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 400049d4: 81 c7 e0 08 ret 400049d8: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 400049dc: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 400049e0: 81 c7 e0 08 ret 400049e4: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 400049e8: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 400049ec: 81 c7 e0 08 ret 400049f0: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 400049f4: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 400049f8: 81 c7 e0 08 ret 400049fc: 81 e8 00 00 restore switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 40004a00: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 40004a04: 81 c7 e0 08 ret 40004a08: 81 e8 00 00 restore the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 40004a0c: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 40004a10: 81 c7 e0 08 ret 40004a14: 81 e8 00 00 restore break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 40004a18: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 40004a1c: 81 c7 e0 08 ret 40004a20: 81 e8 00 00 restore rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 40004a24: 40 00 3b 0f call 40013660 <__errno> 40004a28: b0 10 3f ff mov -1, %i0 40004a2c: 82 10 20 09 mov 9, %g1 40004a30: c2 22 00 00 st %g1, [ %o0 ] 40004a34: 81 c7 e0 08 ret 40004a38: 81 e8 00 00 restore rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40004a3c: 40 00 3b 09 call 40013660 <__errno> <== NOT EXECUTED 40004a40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004a44: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004a48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004a4c: 81 c7 e0 08 ret <== NOT EXECUTED 40004a50: 81 e8 00 00 restore <== NOT EXECUTED 4000bda4 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000bda4: 9d e3 bf a0 save %sp, -96, %sp 4000bda8: 03 10 00 7a sethi %hi(0x4001e800), %g1 4000bdac: 82 10 62 c8 or %g1, 0x2c8, %g1 ! 4001eac8 4000bdb0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4000bdb4: b2 10 00 18 mov %i0, %i1 4000bdb8: 84 00 a0 01 inc %g2 if ( !ptr ) 4000bdbc: 80 a6 20 00 cmp %i0, 0 4000bdc0: 02 80 00 15 be 4000be14 4000bdc4: c4 20 60 0c st %g2, [ %g1 + 0xc ] /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000bdc8: 03 10 00 7b sethi %hi(0x4001ec00), %g1 4000bdcc: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 4001ee30 <_System_state_Current> 4000bdd0: 80 a0 60 03 cmp %g1, 3 4000bdd4: 02 80 00 17 be 4000be30 4000bdd8: 03 10 00 79 sethi %hi(0x4001e400), %g1 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000bddc: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 4001e798 4000bde0: 80 a0 60 00 cmp %g1, 0 4000bde4: 02 80 00 06 be 4000bdfc 4000bde8: 21 10 00 78 sethi %hi(0x4001e000), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000bdec: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000bdf0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000bdf4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4000bdf8: 21 10 00 78 sethi %hi(0x4001e000), %l0 <== NOT EXECUTED 4000bdfc: d0 04 21 30 ld [ %l0 + 0x130 ], %o0 ! 4001e130 4000be00: 40 00 07 02 call 4000da08 <_Protected_heap_Free> 4000be04: 92 10 00 19 mov %i1, %o1 4000be08: 80 8a 20 ff btst 0xff, %o0 4000be0c: 02 80 00 04 be 4000be1c 4000be10: c2 04 21 30 ld [ %l0 + 0x130 ], %g1 4000be14: 81 c7 e0 08 ret 4000be18: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000be1c: 31 10 00 75 sethi %hi(0x4001d400), %i0 <== NOT EXECUTED 4000be20: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000be24: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000be28: 7f ff e0 e5 call 400041bc <== NOT EXECUTED 4000be2c: 91 ee 21 c8 restore %i0, 0x1c8, %o0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000be30: 40 00 01 37 call 4000c30c 4000be34: 01 00 00 00 nop 4000be38: 80 8a 20 ff btst 0xff, %o0 4000be3c: 12 bf ff e8 bne 4000bddc 4000be40: 03 10 00 79 sethi %hi(0x4001e400), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000be44: 40 00 01 44 call 4000c354 <== NOT EXECUTED 4000be48: 81 e8 00 00 restore <== NOT EXECUTED 4000be4c: 01 00 00 00 nop 4002c390 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 4002c390: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 4002c394: 03 10 01 c0 sethi %hi(0x40070000), %g1 <== NOT EXECUTED 4002c398: 82 10 60 b8 or %g1, 0xb8, %g1 ! 400700b8 <== NOT EXECUTED 4002c39c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002c3a0: 02 80 00 18 be 4002c400 <== NOT EXECUTED 4002c3a4: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 4002c3a8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 4002c3ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c3b0: 22 80 00 09 be,a 4002c3d4 <== NOT EXECUTED 4002c3b4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002c3b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002c3bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c3c0: 22 80 00 05 be,a 4002c3d4 <== NOT EXECUTED 4002c3c4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002c3c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c3cc: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 4002c3d0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002c3d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c3d8: 02 80 00 08 be 4002c3f8 <== NOT EXECUTED 4002c3dc: 01 00 00 00 nop <== NOT EXECUTED 4002c3e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002c3e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c3e8: 02 80 00 04 be 4002c3f8 <== NOT EXECUTED 4002c3ec: 01 00 00 00 nop <== NOT EXECUTED 4002c3f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c3f4: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 4002c3f8: 7f ff 6f f7 call 400083d4 <== NOT EXECUTED 4002c3fc: 81 e8 00 00 restore <== NOT EXECUTED 4002c400: 81 c7 e0 08 ret <== NOT EXECUTED 4002c404: 81 e8 00 00 restore <== NOT EXECUTED 4001c1e0 : int fstat( int fd, struct stat *sbuf ) { 4001c1e0: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 4001c1e4: 80 a6 60 00 cmp %i1, 0 4001c1e8: 02 80 00 3b be 4001c2d4 4001c1ec: 03 10 00 78 sethi %hi(0x4001e000), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 4001c1f0: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 4001e124 4001c1f4: 80 a6 00 01 cmp %i0, %g1 4001c1f8: 1a 80 00 2b bcc 4001c2a4 4001c1fc: 03 10 00 7a sethi %hi(0x4001e800), %g1 4001c200: d0 00 62 b8 ld [ %g1 + 0x2b8 ], %o0 ! 4001eab8 4001c204: 83 2e 20 06 sll %i0, 6, %g1 4001c208: b1 2e 20 03 sll %i0, 3, %i0 4001c20c: b0 06 00 01 add %i0, %g1, %i0 4001c210: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 4001c214: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 4001c218: 80 88 61 00 btst 0x100, %g1 4001c21c: 02 80 00 22 be 4001c2a4 4001c220: 01 00 00 00 nop if ( !iop->handlers ) 4001c224: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4001c228: 80 a0 60 00 cmp %g1, 0 4001c22c: 02 80 00 1e be 4001c2a4 4001c230: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 4001c234: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001c238: 80 a0 60 00 cmp %g1, 0 4001c23c: 02 80 00 20 be 4001c2bc 4001c240: 92 10 00 19 mov %i1, %o1 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 4001c244: c0 26 40 00 clr [ %i1 ] 4001c248: c0 26 60 04 clr [ %i1 + 4 ] 4001c24c: c0 26 60 08 clr [ %i1 + 8 ] 4001c250: c0 26 60 0c clr [ %i1 + 0xc ] 4001c254: c0 26 60 10 clr [ %i1 + 0x10 ] 4001c258: c0 26 60 14 clr [ %i1 + 0x14 ] 4001c25c: c0 26 60 18 clr [ %i1 + 0x18 ] 4001c260: c0 26 60 1c clr [ %i1 + 0x1c ] 4001c264: c0 26 60 20 clr [ %i1 + 0x20 ] 4001c268: c0 26 60 24 clr [ %i1 + 0x24 ] 4001c26c: c0 26 60 28 clr [ %i1 + 0x28 ] 4001c270: c0 26 60 2c clr [ %i1 + 0x2c ] 4001c274: c0 26 60 30 clr [ %i1 + 0x30 ] 4001c278: c0 26 60 34 clr [ %i1 + 0x34 ] 4001c27c: c0 26 60 38 clr [ %i1 + 0x38 ] 4001c280: c0 26 60 3c clr [ %i1 + 0x3c ] 4001c284: c0 26 60 40 clr [ %i1 + 0x40 ] 4001c288: c0 26 60 44 clr [ %i1 + 0x44 ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 4001c28c: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4001c290: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001c294: 9f c0 40 00 call %g1 4001c298: 90 02 20 1c add %o0, 0x1c, %o0 } 4001c29c: 81 c7 e0 08 ret 4001c2a0: 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 ); 4001c2a4: 7f ff d1 71 call 40010868 <__errno> 4001c2a8: b0 10 3f ff mov -1, %i0 4001c2ac: 82 10 20 09 mov 9, %g1 4001c2b0: c2 22 00 00 st %g1, [ %o0 ] 4001c2b4: 81 c7 e0 08 ret 4001c2b8: 81 e8 00 00 restore if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001c2bc: 7f ff d1 6b call 40010868 <__errno> <== NOT EXECUTED 4001c2c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c2c4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001c2c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c2cc: 81 c7 e0 08 ret <== NOT EXECUTED 4001c2d0: 81 e8 00 00 restore <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 4001c2d4: 7f ff d1 65 call 40010868 <__errno> 4001c2d8: b0 10 3f ff mov -1, %i0 4001c2dc: 82 10 20 0e mov 0xe, %g1 4001c2e0: c2 22 00 00 st %g1, [ %o0 ] 4001c2e4: 81 c7 e0 08 ret 4001c2e8: 81 e8 00 00 restore 4002ae90 : #include int fsync( int fd ) { 4002ae90: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4002ae94: 03 10 01 af sethi %hi(0x4006bc00), %g1 4002ae98: c2 00 62 a4 ld [ %g1 + 0x2a4 ], %g1 ! 4006bea4 4002ae9c: 80 a6 00 01 cmp %i0, %g1 4002aea0: 1a 80 00 19 bcc 4002af04 4002aea4: 03 10 01 c0 sethi %hi(0x40070000), %g1 iop = rtems_libio_iop( fd ); 4002aea8: d0 00 60 58 ld [ %g1 + 0x58 ], %o0 ! 40070058 4002aeac: 83 2e 20 06 sll %i0, 6, %g1 4002aeb0: b1 2e 20 03 sll %i0, 3, %i0 4002aeb4: b0 06 00 01 add %i0, %g1, %i0 4002aeb8: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 4002aebc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 4002aec0: 80 88 61 00 btst 0x100, %g1 4002aec4: 02 80 00 10 be 4002af04 4002aec8: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002aecc: 02 80 00 14 be 4002af1c 4002aed0: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 4002aed4: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4002aed8: 80 a0 60 00 cmp %g1, 0 4002aedc: 02 80 00 0a be 4002af04 4002aee0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 4002aee4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002aee8: 80 a0 60 00 cmp %g1, 0 4002aeec: 02 80 00 12 be 4002af34 4002aef0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 4002aef4: 9f c0 40 00 call %g1 4002aef8: 01 00 00 00 nop } 4002aefc: 81 c7 e0 08 ret 4002af00: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 4002af04: 40 00 6d 46 call 4004641c <__errno> <== NOT EXECUTED 4002af08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002af0c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002af10: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002af14: 81 c7 e0 08 ret <== NOT EXECUTED 4002af18: 81 e8 00 00 restore <== 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 ); 4002af1c: 40 00 6d 40 call 4004641c <__errno> 4002af20: b0 10 3f ff mov -1, %i0 4002af24: 82 10 20 16 mov 0x16, %g1 4002af28: c2 22 00 00 st %g1, [ %o0 ] 4002af2c: 81 c7 e0 08 ret 4002af30: 81 e8 00 00 restore if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002af34: 40 00 6d 3a call 4004641c <__errno> 4002af38: b0 10 3f ff mov -1, %i0 4002af3c: 82 10 20 86 mov 0x86, %g1 4002af40: c2 22 00 00 st %g1, [ %o0 ] 4002af44: 81 c7 e0 08 ret 4002af48: 81 e8 00 00 restore 4000be50 : int ftruncate( int fd, off_t length ) { 4000be50: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000be54: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000be58: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 4001e124 4000be5c: 80 a6 00 01 cmp %i0, %g1 4000be60: 1a 80 00 2b bcc 4000bf0c 4000be64: 03 10 00 7a sethi %hi(0x4001e800), %g1 iop = rtems_libio_iop( fd ); 4000be68: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4001eab8 4000be6c: 85 2e 20 06 sll %i0, 6, %g2 4000be70: b1 2e 20 03 sll %i0, 3, %i0 4000be74: b0 06 00 02 add %i0, %g2, %i0 4000be78: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 4000be7c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000be80: 80 88 61 00 btst 0x100, %g1 4000be84: 02 80 00 22 be 4000bf0c 4000be88: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000be8c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000be90: c2 27 bf ec st %g1, [ %fp + -20 ] 4000be94: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000be98: c2 27 bf f0 st %g1, [ %fp + -16 ] 4000be9c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000bea0: c2 27 bf f4 st %g1, [ %fp + -12 ] 4000bea4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 4000bea8: c2 27 bf f8 st %g1, [ %fp + -8 ] 4000beac: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 4000beb0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000beb4: 80 a0 60 00 cmp %g1, 0 4000beb8: 02 80 00 21 be 4000bf3c 4000bebc: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000bec0: 9f c0 40 00 call %g1 4000bec4: 90 07 bf ec add %fp, -20, %o0 4000bec8: 80 a2 20 01 cmp %o0, 1 4000becc: 02 80 00 22 be 4000bf54 4000bed0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000bed4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000bed8: 80 88 60 04 btst 4, %g1 4000bedc: 02 80 00 12 be 4000bf24 4000bee0: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 4000bee4: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000bee8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000beec: 80 a0 60 00 cmp %g1, 0 4000bef0: 02 80 00 13 be 4000bf3c 4000bef4: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4000bef8: 92 10 00 19 mov %i1, %o1 4000befc: 9f c0 40 00 call %g1 4000bf00: 94 10 00 1a mov %i2, %o2 } 4000bf04: 81 c7 e0 08 ret 4000bf08: 91 e8 00 08 restore %g0, %o0, %o0 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); 4000bf0c: 40 00 12 57 call 40010868 <__errno> <== NOT EXECUTED 4000bf10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bf14: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4000bf18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bf1c: 81 c7 e0 08 ret <== NOT EXECUTED 4000bf20: 81 e8 00 00 restore <== 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 ); 4000bf24: 40 00 12 51 call 40010868 <__errno> <== NOT EXECUTED 4000bf28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bf2c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000bf30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bf34: 81 c7 e0 08 ret <== NOT EXECUTED 4000bf38: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000bf3c: 40 00 12 4b call 40010868 <__errno> <== NOT EXECUTED 4000bf40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bf44: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000bf48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bf4c: 81 c7 e0 08 ret <== NOT EXECUTED 4000bf50: 81 e8 00 00 restore <== 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 ); 4000bf54: 40 00 12 45 call 40010868 <__errno> 4000bf58: b0 10 3f ff mov -1, %i0 4000bf5c: 82 10 20 15 mov 0x15, %g1 4000bf60: c2 22 00 00 st %g1, [ %o0 ] 4000bf64: 81 c7 e0 08 ret 4000bf68: 81 e8 00 00 restore 40060784 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 40060784: 9d e3 bf 88 save %sp, -120, %sp /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 40060788: 03 10 01 af sethi %hi(0x4006bc00), %g1 4006078c: c2 00 62 a4 ld [ %g1 + 0x2a4 ], %g1 ! 4006bea4 40060790: 80 a6 00 01 cmp %i0, %g1 40060794: 1a 80 00 08 bcc 400607b4 40060798: a0 10 20 00 clr %l0 4006079c: 03 10 01 c0 sethi %hi(0x40070000), %g1 400607a0: e0 00 60 58 ld [ %g1 + 0x58 ], %l0 ! 40070058 400607a4: 83 2e 20 06 sll %i0, 6, %g1 400607a8: b1 2e 20 03 sll %i0, 3, %i0 400607ac: b0 06 00 01 add %i0, %g1, %i0 400607b0: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 400607b4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 400607b8: c2 27 bf ec st %g1, [ %fp + -20 ] 400607bc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 400607c0: c2 27 bf f0 st %g1, [ %fp + -16 ] 400607c4: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 400607c8: c2 27 bf f4 st %g1, [ %fp + -12 ] 400607cc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 400607d0: c2 27 bf f8 st %g1, [ %fp + -8 ] 400607d4: c4 04 20 2c ld [ %l0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 400607d8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400607dc: 80 a0 60 00 cmp %g1, 0 400607e0: 02 80 00 17 be 4006083c 400607e4: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 400607e8: 9f c0 40 00 call %g1 400607ec: 90 07 bf ec add %fp, -20, %o0 400607f0: 80 a2 20 01 cmp %o0, 1 400607f4: 12 80 00 0c bne 40060824 400607f8: 01 00 00 00 nop /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 400607fc: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40060800: c2 00 60 08 ld [ %g1 + 8 ], %g1 40060804: 80 a0 60 00 cmp %g1, 0 40060808: 02 80 00 0d be 4006083c 4006080c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 40060810: 92 10 00 19 mov %i1, %o1 40060814: 9f c0 40 00 call %g1 40060818: 94 10 00 1a mov %i2, %o2 } 4006081c: 81 c7 e0 08 ret 40060820: 91 e8 00 08 restore %g0, %o0, %o0 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 ); 40060824: 7f ff 96 fe call 4004641c <__errno> 40060828: b0 10 3f ff mov -1, %i0 4006082c: 82 10 20 14 mov 0x14, %g1 40060830: c2 22 00 00 st %g1, [ %o0 ] 40060834: 81 c7 e0 08 ret 40060838: 81 e8 00 00 restore * 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 ); 4006083c: 7f ff 96 f8 call 4004641c <__errno> <== NOT EXECUTED 40060840: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40060844: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40060848: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4006084c: 81 c7 e0 08 ret <== NOT EXECUTED 40060850: 81 e8 00 00 restore <== NOT EXECUTED 4002b088 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 4002b088: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 4002b08c: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED return _POSIX_types_Gid; } 4002b090: 81 c3 e0 08 retl <== NOT EXECUTED 4002b094: d0 10 60 32 lduh [ %g1 + 0x32 ], %o0 <== NOT EXECUTED 4002b784 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002b784: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4002b788: 7f ff ff b3 call 4002b654 4002b78c: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 4002b790: 11 10 01 85 sethi %hi(0x40061400), %o0 4002b794: 13 10 01 ae sethi %hi(0x4006b800), %o1 4002b798: 90 12 23 58 or %o0, 0x358, %o0 4002b79c: 40 00 6d c7 call 40046eb8 4002b7a0: 92 12 61 80 or %o1, 0x180, %o1 4002b7a4: a0 92 20 00 orcc %o0, 0, %l0 4002b7a8: 12 80 00 0b bne 4002b7d4 4002b7ac: 92 10 00 1a mov %i2, %o1 4002b7b0: 30 80 00 27 b,a 4002b84c <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 4002b7b4: 40 00 84 58 call 4004c914 4002b7b8: 92 10 00 18 mov %i0, %o1 4002b7bc: 80 a0 00 08 cmp %g0, %o0 4002b7c0: 82 60 3f ff subx %g0, -1, %g1 } else { match = (grp->gr_gid == gid); } if (match) { 4002b7c4: 80 a0 60 00 cmp %g1, 0 4002b7c8: 12 80 00 14 bne 4002b818 4002b7cc: 90 10 00 10 mov %l0, %o0 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 4002b7d0: 92 10 00 1a mov %i2, %o1 4002b7d4: 94 10 00 1b mov %i3, %o2 4002b7d8: 96 10 00 1c mov %i4, %o3 4002b7dc: 7f ff fe d1 call 4002b320 4002b7e0: 90 10 00 10 mov %l0, %o0 4002b7e4: 80 a2 20 00 cmp %o0, 0 4002b7e8: 02 80 00 11 be 4002b82c 4002b7ec: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 4002b7f0: 32 bf ff f1 bne,a 4002b7b4 4002b7f4: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 4002b7f8: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002b7fc: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4002b800: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002b804: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002b808: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b80c: 02 bf ff f2 be 4002b7d4 <== NOT EXECUTED 4002b810: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4002b814: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002b818: 40 00 6b 59 call 4004657c 4002b81c: b0 10 20 00 clr %i0 *result = grp; 4002b820: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002b824: 81 c7 e0 08 ret 4002b828: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 4002b82c: 40 00 6a fc call 4004641c <__errno> <== NOT EXECUTED 4002b830: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b834: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002b838: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4002b83c: 40 00 6b 50 call 4004657c <== NOT EXECUTED 4002b840: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4002b844: 81 c7 e0 08 ret <== NOT EXECUTED 4002b848: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 4002b84c: 40 00 6a f4 call 4004641c <__errno> <== NOT EXECUTED 4002b850: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b854: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002b858: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4002b85c: 81 c7 e0 08 ret <== NOT EXECUTED 4002b860: 81 e8 00 00 restore <== NOT EXECUTED 4002b4a0 : return NULL; return p; } struct group *getgrent(void) { 4002b4a0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 4002b4a4: 03 10 01 bf sethi %hi(0x4006fc00), %g1 <== NOT EXECUTED 4002b4a8: d0 00 61 14 ld [ %g1 + 0x114 ], %o0 ! 4006fd14 <== NOT EXECUTED 4002b4ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b4b0: 32 80 00 04 bne,a 4002b4c0 <== NOT EXECUTED 4002b4b4: 31 10 01 bf sethi %hi(0x4006fc00), %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } 4002b4b8: 81 c7 e0 08 ret <== NOT EXECUTED 4002b4bc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 4002b4c0: 15 10 01 bf sethi %hi(0x4006fc00), %o2 <== NOT EXECUTED 4002b4c4: 92 16 21 e0 or %i0, 0x1e0, %o1 <== NOT EXECUTED 4002b4c8: 94 12 a1 18 or %o2, 0x118, %o2 <== NOT EXECUTED 4002b4cc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002b4d0: 7f ff ff 94 call 4002b320 <== NOT EXECUTED 4002b4d4: b0 16 21 e0 or %i0, 0x1e0, %i0 <== NOT EXECUTED 4002b4d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b4dc: 02 bf ff f7 be 4002b4b8 <== NOT EXECUTED 4002b4e0: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 4002b4e4: 81 c7 e0 08 ret <== NOT EXECUTED 4002b4e8: 81 e8 00 00 restore <== NOT EXECUTED 4002b898 : } struct group *getgrgid( gid_t gid ) { 4002b898: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4002b89c: 13 10 01 bf sethi %hi(0x4006fc00), %o1 <== NOT EXECUTED 4002b8a0: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002b8a4: 92 12 61 e0 or %o1, 0x1e0, %o1 <== NOT EXECUTED 4002b8a8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4002b8ac: 15 10 01 bf sethi %hi(0x4006fc00), %o2 <== NOT EXECUTED 4002b8b0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002b8b4: 94 12 a1 18 or %o2, 0x118, %o2 <== NOT EXECUTED 4002b8b8: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 4002b8bc: 7f ff ff ea call 4002b864 <== NOT EXECUTED 4002b8c0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002b8c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b8c8: 22 80 00 02 be,a 4002b8d0 <== NOT EXECUTED 4002b8cc: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002b8d0: 81 c7 e0 08 ret <== NOT EXECUTED 4002b8d4: 81 e8 00 00 restore <== NOT EXECUTED 4002b864 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002b864: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4002b868: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002b86c: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002b870: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002b874: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002b878: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002b87c: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4002b880: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 4002b884: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002b888: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002b88c: 7f ff ff be call 4002b784 <== NOT EXECUTED 4002b890: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002b894: 01 00 00 00 nop 4002b984 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002b984: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4002b988: 7f ff ff 33 call 4002b654 4002b98c: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 4002b990: 11 10 01 85 sethi %hi(0x40061400), %o0 4002b994: 13 10 01 ae sethi %hi(0x4006b800), %o1 4002b998: 90 12 22 a0 or %o0, 0x2a0, %o0 4002b99c: 40 00 6d 47 call 40046eb8 4002b9a0: 92 12 61 80 or %o1, 0x180, %o1 4002b9a4: a0 92 20 00 orcc %o0, 0, %l0 4002b9a8: 12 80 00 0b bne 4002b9d4 4002b9ac: 92 10 00 1a mov %i2, %o1 4002b9b0: 30 80 00 27 b,a 4002ba4c <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 4002b9b4: 40 00 83 d8 call 4004c914 4002b9b8: 92 10 00 18 mov %i0, %o1 4002b9bc: 80 a0 00 08 cmp %g0, %o0 4002b9c0: 82 60 3f ff subx %g0, -1, %g1 } else { match = (pwd->pw_uid == uid); } if (match) { 4002b9c4: 80 a0 60 00 cmp %g1, 0 4002b9c8: 12 80 00 14 bne 4002ba18 4002b9cc: 90 10 00 10 mov %l0, %o0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 4002b9d0: 92 10 00 1a mov %i2, %o1 4002b9d4: 94 10 00 1b mov %i3, %o2 4002b9d8: 96 10 00 1c mov %i4, %o3 4002b9dc: 7f ff fe c4 call 4002b4ec 4002b9e0: 90 10 00 10 mov %l0, %o0 4002b9e4: 80 a2 20 00 cmp %o0, 0 4002b9e8: 02 80 00 11 be 4002ba2c 4002b9ec: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 4002b9f0: 32 bf ff f1 bne,a 4002b9b4 4002b9f4: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 4002b9f8: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002b9fc: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4002ba00: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002ba04: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002ba08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ba0c: 02 bf ff f2 be 4002b9d4 <== NOT EXECUTED 4002ba10: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4002ba14: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002ba18: 40 00 6a d9 call 4004657c 4002ba1c: b0 10 20 00 clr %i0 *result = pwd; 4002ba20: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002ba24: 81 c7 e0 08 ret 4002ba28: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 4002ba2c: 40 00 6a 7c call 4004641c <__errno> <== NOT EXECUTED 4002ba30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ba34: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002ba38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4002ba3c: 40 00 6a d0 call 4004657c <== NOT EXECUTED 4002ba40: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4002ba44: 81 c7 e0 08 ret <== NOT EXECUTED 4002ba48: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 4002ba4c: 40 00 6a 74 call 4004641c <__errno> <== NOT EXECUTED 4002ba50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ba54: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002ba58: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4002ba5c: 81 c7 e0 08 ret <== NOT EXECUTED 4002ba60: 81 e8 00 00 restore <== NOT EXECUTED 4002b608 : return NULL; return p; } struct passwd *getpwent(void) { 4002b608: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 4002b60c: 03 10 01 bf sethi %hi(0x4006fc00), %g1 <== NOT EXECUTED 4002b610: d0 00 60 2c ld [ %g1 + 0x2c ], %o0 ! 4006fc2c <== NOT EXECUTED 4002b614: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b618: 32 80 00 04 bne,a 4002b628 <== NOT EXECUTED 4002b61c: 31 10 01 bf sethi %hi(0x4006fc00), %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } 4002b620: 81 c7 e0 08 ret <== NOT EXECUTED 4002b624: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 4002b628: 15 10 01 bf sethi %hi(0x4006fc00), %o2 <== NOT EXECUTED 4002b62c: 92 16 20 f8 or %i0, 0xf8, %o1 <== NOT EXECUTED 4002b630: 94 12 a0 30 or %o2, 0x30, %o2 <== NOT EXECUTED 4002b634: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002b638: 7f ff ff ad call 4002b4ec <== NOT EXECUTED 4002b63c: b0 16 20 f8 or %i0, 0xf8, %i0 <== NOT EXECUTED 4002b640: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b644: 02 bf ff f7 be 4002b620 <== NOT EXECUTED 4002b648: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 4002b64c: 81 c7 e0 08 ret <== NOT EXECUTED 4002b650: 81 e8 00 00 restore <== NOT EXECUTED 4002ba98 : } struct passwd *getpwuid( uid_t uid ) { 4002ba98: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 4002ba9c: 13 10 01 bf sethi %hi(0x4006fc00), %o1 <== NOT EXECUTED 4002baa0: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002baa4: 92 12 60 f8 or %o1, 0xf8, %o1 <== NOT EXECUTED 4002baa8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4002baac: 15 10 01 bf sethi %hi(0x4006fc00), %o2 <== NOT EXECUTED 4002bab0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002bab4: 94 12 a0 30 or %o2, 0x30, %o2 <== NOT EXECUTED 4002bab8: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 4002babc: 7f ff ff ea call 4002ba64 <== NOT EXECUTED 4002bac0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002bac4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002bac8: 22 80 00 02 be,a 4002bad0 <== NOT EXECUTED 4002bacc: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002bad0: 81 c7 e0 08 ret <== NOT EXECUTED 4002bad4: 81 e8 00 00 restore <== NOT EXECUTED 4002ba64 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002ba64: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4002ba68: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002ba6c: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002ba70: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002ba74: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002ba78: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002ba7c: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4002ba80: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 4002ba84: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002ba88: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002ba8c: 7f ff ff be call 4002b984 <== NOT EXECUTED 4002ba90: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002ba94: 01 00 00 00 nop 4000bf8c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4000bf8c: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000bf90: 80 a6 20 00 cmp %i0, 0 4000bf94: 02 80 00 11 be 4000bfd8 4000bf98: 01 00 00 00 nop { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4000bf9c: 7f ff d7 9e call 40001e14 4000bfa0: 01 00 00 00 nop 4000bfa4: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000bfa8: 40 00 05 4f call 4000d4e4 <_TOD_Get> 4000bfac: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 4000bfb0: 7f ff d7 9d call 40001e24 4000bfb4: 90 10 00 10 mov %l0, %o0 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4000bfb8: d0 07 bf fc ld [ %fp + -4 ], %o0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 4000bfbc: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 4000bfc0: 92 10 23 e8 mov 0x3e8, %o1 4000bfc4: 40 00 37 bc call 40019eb4 <.div> 4000bfc8: c2 26 00 00 st %g1, [ %i0 ] 4000bfcc: 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; } 4000bfd0: 81 c7 e0 08 ret 4000bfd4: 91 e8 20 00 restore %g0, 0, %o0 void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4000bfd8: 40 00 12 24 call 40010868 <__errno> <== NOT EXECUTED 4000bfdc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bfe0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000bfe4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4000bfe8: 81 c7 e0 08 ret <== NOT EXECUTED 4000bfec: 81 e8 00 00 restore <== NOT EXECUTED 4000850c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 4000850c: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 40008510: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED return _POSIX_types_Uid; } 40008514: 81 c3 e0 08 retl <== NOT EXECUTED 40008518: d0 10 60 30 lduh [ %g1 + 0x30 ], %o0 <== NOT EXECUTED 40015474 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40015474: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40015478: e0 06 40 00 ld [ %i1 ], %l0 4001547c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40015480: 82 04 20 54 add %l0, 0x54, %g1 40015484: 80 a0 80 01 cmp %g2, %g1 40015488: 12 80 00 30 bne 40015548 4001548c: 01 00 00 00 nop /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 40015490: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40015494: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40015498: 80 a4 00 01 cmp %l0, %g1 4001549c: 02 80 00 31 be 40015560 400154a0: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 400154a4: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 400154a8: 80 a0 60 00 cmp %g1, 0 400154ac: 12 80 00 2d bne 40015560 400154b0: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 400154b4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400154b8: 80 a0 60 00 cmp %g1, 0 400154bc: 22 80 00 06 be,a 400154d4 400154c0: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 400154c4: 7f ff d0 c6 call 400097dc <_Chain_Extract> 400154c8: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 400154cc: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400154d0: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 400154d4: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400154d8: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 400154dc: 90 07 bf f8 add %fp, -8, %o0 400154e0: 7f ff be 37 call 40004dbc 400154e4: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 400154e8: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * 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) ) { 400154ec: 90 10 00 10 mov %l0, %o0 400154f0: 7f ff f1 5d call 40011a64 400154f4: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 400154f8: 80 a2 20 00 cmp %o0, 0 400154fc: 12 80 00 11 bne 40015540 40015500: 01 00 00 00 nop 40015504: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40015508: 80 a0 60 00 cmp %g1, 0 4001550c: 12 80 00 0d bne 40015540 40015510: 03 10 00 92 sethi %hi(0x40024800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40015514: c2 00 60 90 ld [ %g1 + 0x90 ], %g1 ! 40024890 40015518: c4 06 40 00 ld [ %i1 ], %g2 4001551c: c6 00 60 04 ld [ %g1 + 4 ], %g3 40015520: 80 a0 c0 02 cmp %g3, %g2 40015524: 22 80 00 02 be,a 4001552c 40015528: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 4001552c: 90 10 00 10 mov %l0, %o0 40015530: 7f ff bd f8 call 40004d10 40015534: b0 10 20 00 clr %i0 40015538: 81 c7 e0 08 ret 4001553c: 81 e8 00 00 restore } return 0; } 40015540: 81 c7 e0 08 ret 40015544: 91 e8 20 00 restore %g0, 0, %o0 /* * 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 ); 40015548: 40 00 04 88 call 40016768 <__errno> 4001554c: b0 10 3f ff mov -1, %i0 40015550: 82 10 20 5a mov 0x5a, %g1 40015554: c2 22 00 00 st %g1, [ %o0 ] 40015558: 81 c7 e0 08 ret 4001555c: 81 e8 00 00 restore /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 40015560: 40 00 04 82 call 40016768 <__errno> 40015564: b0 10 3f ff mov -1, %i0 40015568: 82 10 20 10 mov 0x10, %g1 4001556c: c2 22 00 00 st %g1, [ %o0 ] 40015570: 81 c7 e0 08 ret 40015574: 81 e8 00 00 restore 4002b654 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 4002b654: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 4002b658: 03 10 01 bf sethi %hi(0x4006fc00), %g1 4002b65c: c4 48 60 28 ldsb [ %g1 + 0x28 ], %g2 ! 4006fc28 4002b660: 80 a0 a0 00 cmp %g2, 0 4002b664: 02 80 00 04 be 4002b674 4002b668: 84 10 20 01 mov 1, %g2 4002b66c: 81 c7 e0 08 ret 4002b670: 81 e8 00 00 restore return; etc_passwd_initted = 1; mkdir("/etc", 0777); 4002b674: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 4002b678: c4 28 60 28 stb %g2, [ %g1 + 0x28 ] mkdir("/etc", 0777); 4002b67c: 11 10 01 85 sethi %hi(0x40061400), %o0 4002b680: 7f ff 75 84 call 40008c90 4002b684: 90 12 22 18 or %o0, 0x218, %o0 ! 40061618 <_rodata_start+0x7a8> /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4002b688: 31 10 01 85 sethi %hi(0x40061400), %i0 4002b68c: 21 10 01 ae sethi %hi(0x4006b800), %l0 4002b690: 90 16 22 a0 or %i0, 0x2a0, %o0 4002b694: 40 00 6e 09 call 40046eb8 4002b698: 92 14 21 80 or %l0, 0x180, %o1 4002b69c: 80 a2 20 00 cmp %o0, 0 4002b6a0: 22 80 00 0d be,a 4002b6d4 4002b6a4: 90 16 22 a0 or %i0, 0x2a0, %o0 } 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); 4002b6a8: 40 00 6b b5 call 4004657c 4002b6ac: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 4002b6b0: 92 14 21 80 or %l0, 0x180, %o1 4002b6b4: 21 10 01 85 sethi %hi(0x40061400), %l0 4002b6b8: 40 00 6e 00 call 40046eb8 4002b6bc: 90 14 23 58 or %l0, 0x358, %o0 ! 40061758 <_rodata_start+0x8e8> 4002b6c0: 80 a2 20 00 cmp %o0, 0 4002b6c4: 22 80 00 11 be,a 4002b708 4002b6c8: 90 14 23 58 or %l0, 0x358, %o0 fclose(fp); 4002b6cc: 40 00 6b ac call 4004657c <== NOT EXECUTED 4002b6d0: 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) { 4002b6d4: 13 10 01 93 sethi %hi(0x40064c00), %o1 4002b6d8: 40 00 6d f8 call 40046eb8 4002b6dc: 92 12 60 a0 or %o1, 0xa0, %o1 ! 40064ca0 4002b6e0: b0 92 20 00 orcc %o0, 0, %i0 4002b6e4: 02 bf ff f3 be 4002b6b0 4002b6e8: 92 10 20 01 mov 1, %o1 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4002b6ec: 94 10 20 66 mov 0x66, %o2 4002b6f0: 96 10 00 18 mov %i0, %o3 4002b6f4: 11 10 01 9a sethi %hi(0x40066800), %o0 4002b6f8: 40 00 72 d0 call 40048238 4002b6fc: 90 12 22 08 or %o0, 0x208, %o0 ! 40066a08 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4002b700: 10 bf ff ea b 4002b6a8 4002b704: 90 10 00 18 mov %i0, %o0 * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 4002b708: 13 10 01 93 sethi %hi(0x40064c00), %o1 4002b70c: 40 00 6d eb call 40046eb8 4002b710: 92 12 60 a0 or %o1, 0xa0, %o1 ! 40064ca0 4002b714: b0 92 20 00 orcc %o0, 0, %i0 4002b718: 02 bf ff d5 be 4002b66c 4002b71c: 11 10 01 9a sethi %hi(0x40066800), %o0 fprintf( fp, "root:x:0:root\n" 4002b720: 92 10 20 01 mov 1, %o1 4002b724: 94 10 20 2a mov 0x2a, %o2 4002b728: 96 10 00 18 mov %i0, %o3 4002b72c: 40 00 72 c3 call 40048238 4002b730: 90 12 22 70 or %o0, 0x270, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 4002b734: 40 00 6b 92 call 4004657c 4002b738: 81 e8 00 00 restore 4002b73c: 01 00 00 00 nop 40007660 : int ioctl( int fd, ioctl_command_t command, ... ) { 40007660: 9d e3 bf 98 save %sp, -104, %sp va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40007664: 03 10 00 93 sethi %hi(0x40024c00), %g1 40007668: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 40024c24 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 4000766c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40007670: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40007674: fa 27 a0 58 st %i5, [ %fp + 0x58 ] va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40007678: 80 a6 00 01 cmp %i0, %g1 4000767c: 1a 80 00 18 bcc 400076dc 40007680: f4 27 a0 4c st %i2, [ %fp + 0x4c ] iop = rtems_libio_iop( fd ); 40007684: 03 10 00 95 sethi %hi(0x40025400), %g1 40007688: d0 00 62 98 ld [ %g1 + 0x298 ], %o0 ! 40025698 4000768c: 83 2e 20 06 sll %i0, 6, %g1 40007690: b1 2e 20 03 sll %i0, 3, %i0 40007694: b0 06 00 01 add %i0, %g1, %i0 40007698: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 4000769c: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400076a0: 80 88 61 00 btst 0x100, %g1 400076a4: 02 80 00 0e be 400076dc 400076a8: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 400076ac: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 400076b0: 80 a0 60 00 cmp %g1, 0 400076b4: 02 80 00 0a be 400076dc 400076b8: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 400076bc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400076c0: 80 a0 60 00 cmp %g1, 0 400076c4: 02 80 00 0c be 400076f4 400076c8: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 400076cc: 9f c0 40 00 call %g1 400076d0: 94 10 00 1a mov %i2, %o2 return rc; } 400076d4: 81 c7 e0 08 ret 400076d8: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 400076dc: 40 00 3d 31 call 40016ba0 <__errno> 400076e0: b0 10 3f ff mov -1, %i0 400076e4: 82 10 20 09 mov 9, %g1 400076e8: c2 22 00 00 st %g1, [ %o0 ] 400076ec: 81 c7 e0 08 ret 400076f0: 81 e8 00 00 restore if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400076f4: 40 00 3d 2b call 40016ba0 <__errno> <== NOT EXECUTED 400076f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400076fc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007700: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007704: 81 c7 e0 08 ret <== NOT EXECUTED 40007708: 81 e8 00 00 restore <== NOT EXECUTED 40004de4 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40004de4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40004de8: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 40004dec: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004df0: 02 80 00 03 be 40004dfc <== NOT EXECUTED 40004df4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40004df8: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40004dfc: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004e00: 02 80 00 0c be 40004e30 <== NOT EXECUTED 40004e04: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED c = tolower (c); 40004e08: 05 10 00 78 sethi %hi(0x4001e000), %g2 <== NOT EXECUTED 40004e0c: c4 00 a2 d8 ld [ %g2 + 0x2d8 ], %g2 ! 4001e2d8 <__ctype_ptr__> <== NOT EXECUTED 40004e10: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 40004e14: 84 00 80 10 add %g2, %l0, %g2 <== NOT EXECUTED 40004e18: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 40004e1c: 84 08 a0 03 and %g2, 3, %g2 <== NOT EXECUTED 40004e20: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40004e24: 22 80 00 02 be,a 40004e2c <== NOT EXECUTED 40004e28: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED if (c == '\r') { 40004e2c: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 40004e30: 80 a0 a0 0d cmp %g2, 0xd <== NOT EXECUTED 40004e34: 02 80 00 16 be 40004e8c <== NOT EXECUTED 40004e38: 80 a0 a0 0a cmp %g2, 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)) { 40004e3c: 02 80 00 41 be 40004f40 <== NOT EXECUTED 40004e40: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004e44: 32 80 00 1a bne,a 40004eac <== NOT EXECUTED 40004e48: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 40004e4c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004e50: 05 10 00 78 sethi %hi(0x4001e000), %g2 <== NOT EXECUTED 40004e54: c4 00 a2 28 ld [ %g2 + 0x228 ], %g2 ! 4001e228 <== NOT EXECUTED 40004e58: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40004e5c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004e60: 16 80 00 09 bge 40004e84 <== NOT EXECUTED 40004e64: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40004e68: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40004e6c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004e70: 12 80 00 39 bne 40004f54 <== NOT EXECUTED 40004e74: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40004e78: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40004e7c: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40004e80: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40004e84: 81 c7 e0 08 ret <== NOT EXECUTED 40004e88: 81 e8 00 00 restore <== 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) 40004e8c: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 40004e90: 02 80 00 04 be 40004ea0 <== NOT EXECUTED 40004e94: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 40004e98: 81 c7 e0 08 ret <== NOT EXECUTED 40004e9c: 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) 40004ea0: 32 80 00 02 bne,a 40004ea8 <== NOT EXECUTED 40004ea4: 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)) { 40004ea8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004eac: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004eb0: 22 bf ff e8 be,a 40004e50 <== NOT EXECUTED 40004eb4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40004eb8: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 <== NOT EXECUTED 40004ebc: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004ec0: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004ec4: 22 80 00 43 be,a 40004fd0 <== NOT EXECUTED 40004ec8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40004ecc: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 <== NOT EXECUTED 40004ed0: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004ed4: 22 80 00 2e be,a 40004f8c <== NOT EXECUTED 40004ed8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40004edc: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 <== NOT EXECUTED 40004ee0: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004ee4: 02 bf ff e8 be 40004e84 <== NOT EXECUTED 40004ee8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40004eec: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40004ef0: 02 80 00 2c be 40004fa0 <== NOT EXECUTED 40004ef4: 80 88 60 48 btst 0x48, %g1 <== 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]) 40004ef8: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 <== NOT EXECUTED 40004efc: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004f00: 02 80 00 07 be 40004f1c <== NOT EXECUTED 40004f04: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 40004f08: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 <== NOT EXECUTED 40004f0c: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004f10: 32 bf ff d0 bne,a 40004e50 <== NOT EXECUTED 40004f14: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40004f18: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40004f1c: 12 80 00 18 bne 40004f7c <== NOT EXECUTED 40004f20: 01 00 00 00 nop <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40004f24: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004f28: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40004f2c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40004f30: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40004f34: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 40004f38: 81 c7 e0 08 ret <== NOT EXECUTED 40004f3c: 91 e8 20 01 restore %g0, 1, %o0 <== 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)) { 40004f40: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED 40004f44: 32 bf ff d9 bne,a 40004ea8 <== NOT EXECUTED 40004f48: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004f4c: 10 bf ff d8 b 40004eac <== NOT EXECUTED 40004f50: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 40004f54: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004f58: 7f ff fe f6 call 40004b30 <== NOT EXECUTED 40004f5c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004f60: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004f64: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40004f68: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40004f6c: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40004f70: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40004f74: 81 c7 e0 08 ret <== NOT EXECUTED 40004f78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 40004f7c: 7f ff fe ed call 40004b30 <== NOT EXECUTED 40004f80: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004f84: 10 bf ff e9 b 40004f28 <== NOT EXECUTED 40004f88: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== 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); 40004f8c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004f90: 7f ff ff 08 call 40004bb0 <== NOT EXECUTED 40004f94: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 40004f98: 81 c7 e0 08 ret <== NOT EXECUTED 40004f9c: 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)) 40004fa0: 22 80 00 05 be,a 40004fb4 <== NOT EXECUTED 40004fa4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40004fa8: 7f ff fe e2 call 40004b30 <== NOT EXECUTED 40004fac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004fb0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004fb4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40004fb8: 86 10 20 0a mov 0xa, %g3 <== NOT EXECUTED 40004fbc: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED 40004fc0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40004fc4: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 40004fc8: 81 c7 e0 08 ret <== NOT EXECUTED 40004fcc: 91 e8 20 01 restore %g0, 1, %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); 40004fd0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004fd4: 7f ff fe f7 call 40004bb0 <== NOT EXECUTED 40004fd8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 40004fdc: 81 c7 e0 08 ret <== NOT EXECUTED 40004fe0: 81 e8 00 00 restore <== NOT EXECUTED 40010150 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40010150: 9d e3 bf 90 save %sp, -112, %sp POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40010154: 7f ff fb 7e call 4000ef4c 40010158: 01 00 00 00 nop 4001015c: 80 a2 00 18 cmp %o0, %i0 40010160: 12 80 00 b6 bne 40010438 40010164: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 40010168: 02 80 00 ba be 40010450 4001016c: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40010170: 80 a0 60 1f cmp %g1, 0x1f 40010174: 18 80 00 b7 bgu 40010450 40010178: 23 10 00 7c sethi %hi(0x4001f000), %l1 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 4001017c: a5 2e 60 02 sll %i1, 2, %l2 40010180: a2 14 62 24 or %l1, 0x224, %l1 40010184: a7 2e 60 04 sll %i1, 4, %l3 40010188: 84 24 c0 12 sub %l3, %l2, %g2 4001018c: 84 04 40 02 add %l1, %g2, %g2 40010190: c4 00 a0 08 ld [ %g2 + 8 ], %g2 40010194: 80 a0 a0 01 cmp %g2, 1 40010198: 02 80 00 45 be 400102ac 4001019c: b0 10 20 00 clr %i0 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 400101a0: 80 a6 60 04 cmp %i1, 4 400101a4: 02 80 00 44 be 400102b4 400101a8: 80 a6 60 08 cmp %i1, 8 400101ac: 02 80 00 42 be 400102b4 400101b0: 80 a6 60 0b cmp %i1, 0xb 400101b4: 02 80 00 40 be 400102b4 400101b8: a0 10 20 01 mov 1, %l0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 400101bc: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 400101c0: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 400101c4: 80 a6 a0 00 cmp %i2, 0 400101c8: 02 80 00 41 be 400102cc 400101cc: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 400101d0: c2 06 80 00 ld [ %i2 ], %g1 400101d4: c2 27 bf fc st %g1, [ %fp + -4 ] 400101d8: 03 10 00 7b sethi %hi(0x4001ec00), %g1 400101dc: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 ! 4001ec90 <_Thread_Dispatch_disable_level> 400101e0: 84 00 a0 01 inc %g2 400101e4: c4 20 60 90 st %g2, [ %g1 + 0x90 ] /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 400101e8: 03 10 00 7b sethi %hi(0x4001ec00), %g1 400101ec: c2 00 61 4c ld [ %g1 + 0x14c ], %g1 ! 4001ed4c <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400101f0: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 400101f4: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 400101f8: 80 ac 00 02 andncc %l0, %g2, %g0 400101fc: 12 80 00 1a bne 40010264 40010200: 09 10 00 7c sethi %hi(0x4001f000), %g4 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 40010204: c4 01 23 b0 ld [ %g4 + 0x3b0 ], %g2 ! 4001f3b0 <_POSIX_signals_Wait_queue> 40010208: 88 11 23 b0 or %g4, 0x3b0, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4001020c: 88 01 20 04 add %g4, 4, %g4 40010210: 80 a0 80 04 cmp %g2, %g4 40010214: 02 80 00 30 be 400102d4 40010218: 82 10 00 02 mov %g2, %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4001021c: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 40010220: 80 8c 00 03 btst %l0, %g3 40010224: 02 80 00 0c be 40010254 40010228: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4001022c: 10 80 00 0f b 40010268 40010230: 84 10 20 01 mov 1, %g2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 40010234: 80 a0 80 04 cmp %g2, %g4 40010238: 22 80 00 28 be,a 400102d8 4001023c: 03 10 00 78 sethi %hi(0x4001e000), %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 40010240: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40010244: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 40010248: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 4001024c: 12 80 00 06 bne 40010264 <== NOT EXECUTED 40010250: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 40010254: c6 00 e0 cc ld [ %g3 + 0xcc ], %g3 40010258: 80 ac 00 03 andncc %l0, %g3, %g0 4001025c: 22 bf ff f6 be,a 40010234 40010260: c4 00 80 00 ld [ %g2 ], %g2 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40010264: 84 10 20 01 mov 1, %g2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 40010268: 90 10 00 01 mov %g1, %o0 4001026c: 92 10 00 19 mov %i1, %o1 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40010270: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 40010274: 40 00 00 ba call 4001055c <_POSIX_signals_Unblock_thread> 40010278: 94 07 bf f4 add %fp, -12, %o2 4001027c: 80 8a 20 ff btst 0xff, %o0 40010280: 12 80 00 5a bne 400103e8 40010284: 01 00 00 00 nop /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 40010288: 40 00 00 a5 call 4001051c <_POSIX_signals_Set_process_signals> 4001028c: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 40010290: a4 24 c0 12 sub %l3, %l2, %l2 40010294: c2 04 40 12 ld [ %l1 + %l2 ], %g1 40010298: 80 a0 60 02 cmp %g1, 2 4001029c: 02 80 00 57 be 400103f8 400102a0: 11 10 00 7c sethi %hi(0x4001f000), %o0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 400102a4: 7f ff e3 36 call 40008f7c <_Thread_Enable_dispatch> 400102a8: b0 10 20 00 clr %i0 return 0; } 400102ac: 81 c7 e0 08 ret 400102b0: 81 e8 00 00 restore * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 400102b4: 40 00 01 38 call 40010794 400102b8: 01 00 00 00 nop 400102bc: 40 00 00 f9 call 400106a0 400102c0: 92 10 00 19 mov %i1, %o1 400102c4: 81 c7 e0 08 ret 400102c8: 91 e8 00 08 restore %g0, %o0, %o0 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 400102cc: 10 bf ff c3 b 400101d8 400102d0: c0 27 bf fc clr [ %fp + -4 ] * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 400102d4: 03 10 00 78 sethi %hi(0x4001e000), %g1 400102d8: da 08 61 d4 ldub [ %g1 + 0x1d4 ], %o5 ! 4001e1d4 400102dc: 13 10 00 7a sethi %hi(0x4001e800), %o1 400102e0: 9a 03 60 01 inc %o5 400102e4: 92 12 63 f8 or %o1, 0x3f8, %o1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 400102e8: 82 10 20 00 clr %g1 400102ec: 90 02 60 0c add %o1, 0xc, %o0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 400102f0: 35 04 00 00 sethi %hi(0x10000000), %i2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 400102f4: c4 02 40 00 ld [ %o1 ], %g2 400102f8: 80 a0 a0 00 cmp %g2, 0 400102fc: 22 80 00 2d be,a 400103b0 40010300: 92 02 60 04 add %o1, 4, %o1 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 40010304: c4 00 a0 04 ld [ %g2 + 4 ], %g2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 40010308: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4001030c: 80 a3 20 00 cmp %o4, 0 40010310: 02 80 00 27 be 400103ac 40010314: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3 40010318: 84 10 20 01 mov 1, %g2 the_thread = (Thread_Control *) object_table[ index ]; 4001031c: 87 28 a0 02 sll %g2, 2, %g3 40010320: c6 02 c0 03 ld [ %o3 + %g3 ], %g3 if ( !the_thread ) 40010324: 80 a0 e0 00 cmp %g3, 0 40010328: 02 80 00 1e be 400103a0 4001032c: 84 00 a0 01 inc %g2 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 40010330: c8 00 e0 14 ld [ %g3 + 0x14 ], %g4 40010334: 80 a1 00 0d cmp %g4, %o5 40010338: 18 80 00 1b bgu 400103a4 4001033c: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40010340: d4 00 e1 60 ld [ %g3 + 0x160 ], %o2 40010344: d4 02 a0 cc ld [ %o2 + 0xcc ], %o2 40010348: 80 ac 00 0a andncc %l0, %o2, %g0 4001034c: 02 80 00 16 be 400103a4 40010350: 80 a3 00 02 cmp %o4, %g2 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 40010354: 80 a1 00 0d cmp %g4, %o5 40010358: 2a 80 00 11 bcs,a 4001039c 4001035c: 9a 10 00 04 mov %g4, %o5 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 40010360: d4 00 60 10 ld [ %g1 + 0x10 ], %o2 40010364: 80 a2 a0 00 cmp %o2, 0 40010368: 02 80 00 0f be 400103a4 4001036c: 80 a3 00 02 cmp %o4, %g2 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 40010370: de 00 e0 10 ld [ %g3 + 0x10 ], %o7 40010374: 80 a3 e0 00 cmp %o7, 0 40010378: 22 80 00 09 be,a 4001039c 4001037c: 9a 10 00 04 mov %g4, %o5 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 40010380: 80 8a 80 1a btst %o2, %i2 40010384: 12 80 00 08 bne 400103a4 40010388: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4001038c: 80 8b c0 1a btst %o7, %i2 40010390: 02 80 00 05 be 400103a4 40010394: 80 a3 00 02 cmp %o4, %g2 40010398: 9a 10 00 04 mov %g4, %o5 4001039c: 82 10 00 03 mov %g3, %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 400103a0: 80 a3 00 02 cmp %o4, %g2 400103a4: 1a bf ff df bcc 40010320 400103a8: 87 28 a0 02 sll %g2, 2, %g3 400103ac: 92 02 60 04 add %o1, 4, %o1 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 400103b0: 80 a2 40 08 cmp %o1, %o0 400103b4: 32 bf ff d1 bne,a 400102f8 400103b8: c4 02 40 00 ld [ %o1 ], %g2 } } } } if ( interested ) { 400103bc: 80 a0 60 00 cmp %g1, 0 400103c0: 02 bf ff b2 be 40010288 400103c4: 84 10 20 01 mov 1, %g2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 400103c8: 90 10 00 01 mov %g1, %o0 400103cc: 92 10 00 19 mov %i1, %o1 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 400103d0: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 400103d4: 40 00 00 62 call 4001055c <_POSIX_signals_Unblock_thread> 400103d8: 94 07 bf f4 add %fp, -12, %o2 400103dc: 80 8a 20 ff btst 0xff, %o0 400103e0: 02 bf ff aa be 40010288 400103e4: 01 00 00 00 nop _Thread_Enable_dispatch(); 400103e8: 7f ff e2 e5 call 40008f7c <_Thread_Enable_dispatch> 400103ec: b0 10 20 00 clr %i0 ! 0 return 0; 400103f0: 81 c7 e0 08 ret 400103f4: 81 e8 00 00 restore */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 400103f8: 7f ff f3 bb call 4000d2e4 <_Chain_Get> 400103fc: 90 12 23 a4 or %o0, 0x3a4, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 40010400: 80 a2 20 00 cmp %o0, 0 40010404: 02 80 00 19 be 40010468 40010408: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4001040c: 92 10 00 08 mov %o0, %o1 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 40010410: c2 22 20 08 st %g1, [ %o0 + 8 ] 40010414: c2 07 bf f8 ld [ %fp + -8 ], %g1 40010418: c2 22 20 0c st %g1, [ %o0 + 0xc ] 4001041c: c2 07 bf fc ld [ %fp + -4 ], %g1 40010420: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 40010424: 11 10 00 7c sethi %hi(0x4001f000), %o0 40010428: 90 12 23 f4 or %o0, 0x3f4, %o0 ! 4001f3f4 <_POSIX_signals_Siginfo> 4001042c: 7f ff dc a6 call 400076c4 <_Chain_Append> 40010430: 90 02 00 12 add %o0, %l2, %o0 40010434: 30 bf ff 9c b,a 400102a4 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 40010438: 40 00 01 0c call 40010868 <__errno> 4001043c: b0 10 3f ff mov -1, %i0 40010440: 82 10 20 03 mov 3, %g1 40010444: c2 22 00 00 st %g1, [ %o0 ] 40010448: 81 c7 e0 08 ret 4001044c: 81 e8 00 00 restore */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40010450: 40 00 01 06 call 40010868 <__errno> 40010454: b0 10 3f ff mov -1, %i0 40010458: 82 10 20 16 mov 0x16, %g1 4001045c: c2 22 00 00 st %g1, [ %o0 ] 40010460: 81 c7 e0 08 ret 40010464: 81 e8 00 00 restore if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 40010468: 7f ff e2 c5 call 40008f7c <_Thread_Enable_dispatch> 4001046c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 40010470: 40 00 00 fe call 40010868 <__errno> 40010474: 01 00 00 00 nop 40010478: 82 10 20 0b mov 0xb, %g1 ! b 4001047c: c2 22 00 00 st %g1, [ %o0 ] 40010480: 81 c7 e0 08 ret 40010484: 81 e8 00 00 restore 4001c4bc : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 4001c4bc: 9d e3 bf a0 save %sp, -96, %sp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 4001c4c0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 4001c4c4: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 4001ee30 <_System_state_Current> 4001c4c8: 80 a0 60 03 cmp %g1, 3 4001c4cc: 02 80 00 04 be 4001c4dc 4001c4d0: 03 10 00 77 sethi %hi(0x4001dc00), %g1 4001c4d4: 81 c7 e0 08 ret <== NOT EXECUTED 4001c4d8: 81 e8 00 00 restore <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 4001c4dc: 21 10 00 78 sethi %hi(0x4001e000), %l0 4001c4e0: e2 00 60 f8 ld [ %g1 + 0xf8 ], %l1 4001c4e4: c2 04 22 e0 ld [ %l0 + 0x2e0 ], %g1 4001c4e8: 80 a0 40 11 cmp %g1, %l1 4001c4ec: 02 80 00 05 be 4001c500 4001c4f0: 01 00 00 00 nop _wrapup_reent(_global_impure_ptr); 4001c4f4: 40 00 01 80 call 4001caf4 <_wrapup_reent> 4001c4f8: 90 10 00 11 mov %l1, %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 = _global_impure_ptr; 4001c4fc: e2 24 22 e0 st %l1, [ %l0 + 0x2e0 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 4001c500: 7f ff d1 32 call 400109c8 4001c504: d0 04 60 04 ld [ %l1 + 4 ], %o0 fclose (stdout); 4001c508: c2 04 22 e0 ld [ %l0 + 0x2e0 ], %g1 4001c50c: 7f ff d1 2f call 400109c8 4001c510: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 4001c514: c2 04 22 e0 ld [ %l0 + 0x2e0 ], %g1 4001c518: f0 00 60 0c ld [ %g1 + 0xc ], %i0 4001c51c: 7f ff d1 2b call 400109c8 4001c520: 81 e8 00 00 restore 4001c524: 01 00 00 00 nop 4002bbec : int link( const char *existing, const char *new ) { 4002bbec: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 4002bbf0: 40 00 85 4a call 4004d118 4002bbf4: 90 10 00 18 mov %i0, %o0 4002bbf8: a0 07 bf e8 add %fp, -24, %l0 4002bbfc: 92 10 00 08 mov %o0, %o1 4002bc00: 94 10 20 00 clr %o2 4002bc04: 90 10 00 18 mov %i0, %o0 4002bc08: 96 10 00 10 mov %l0, %o3 4002bc0c: 98 10 20 01 mov 1, %o4 4002bc10: 7f ff 71 b6 call 400082e8 4002bc14: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 4002bc18: 80 a2 20 00 cmp %o0, 0 4002bc1c: 12 80 00 88 bne 4002be3c 4002bc20: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002bc24: c2 4e 40 00 ldsb [ %i1 ], %g1 4002bc28: 80 a0 60 5c cmp %g1, 0x5c 4002bc2c: 02 80 00 06 be 4002bc44 4002bc30: 80 a0 60 2f cmp %g1, 0x2f 4002bc34: 02 80 00 04 be 4002bc44 4002bc38: 80 a0 60 00 cmp %g1, 0 4002bc3c: 12 80 00 3c bne 4002bd2c 4002bc40: 03 10 01 b0 sethi %hi(0x4006c000), %g1 4002bc44: 03 10 01 b0 sethi %hi(0x4006c000), %g1 4002bc48: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 4002bc4c: 90 10 20 01 mov 1, %o0 4002bc50: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4002bc54: c4 27 bf d4 st %g2, [ %fp + -44 ] 4002bc58: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4002bc5c: c4 27 bf d8 st %g2, [ %fp + -40 ] 4002bc60: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4002bc64: c4 27 bf dc st %g2, [ %fp + -36 ] 4002bc68: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4002bc6c: c4 27 bf e0 st %g2, [ %fp + -32 ] 4002bc70: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002bc74: c2 27 bf e4 st %g1, [ %fp + -28 ] if ( !parent_loc.ops->evalformake_h ) { 4002bc78: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002bc7c: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002bc80: 80 a0 60 00 cmp %g1, 0 4002bc84: 02 80 00 60 be 4002be04 4002bc88: 90 06 40 08 add %i1, %o0, %o0 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 ); 4002bc8c: 94 07 bf fc add %fp, -4, %o2 4002bc90: b2 07 bf d4 add %fp, -44, %i1 4002bc94: 9f c0 40 00 call %g1 4002bc98: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 4002bc9c: a2 92 20 00 orcc %o0, 0, %l1 4002bca0: 12 80 00 4a bne 4002bdc8 4002bca4: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 4002bca8: c4 07 bf e4 ld [ %fp + -28 ], %g2 4002bcac: 80 a0 80 01 cmp %g2, %g1 4002bcb0: 12 80 00 2c bne 4002bd60 4002bcb4: c4 07 bf e0 ld [ %fp + -32 ], %g2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 4002bcb8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4002bcbc: 80 a0 60 00 cmp %g1, 0 4002bcc0: 02 80 00 61 be 4002be44 4002bcc4: d4 07 bf fc ld [ %fp + -4 ], %o2 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 ); 4002bcc8: 90 10 00 10 mov %l0, %o0 4002bccc: 9f c0 40 00 call %g1 4002bcd0: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &existing_loc ); 4002bcd4: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002bcd8: 80 a0 60 00 cmp %g1, 0 4002bcdc: 02 80 00 08 be 4002bcfc 4002bce0: b0 10 00 08 mov %o0, %i0 4002bce4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002bce8: 80 a0 60 00 cmp %g1, 0 4002bcec: 22 80 00 05 be,a 4002bd00 4002bcf0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002bcf4: 9f c0 40 00 call %g1 4002bcf8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 4002bcfc: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002bd00: 80 a0 60 00 cmp %g1, 0 4002bd04: 02 80 00 4e be 4002be3c 4002bd08: 01 00 00 00 nop 4002bd0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002bd10: 80 a0 60 00 cmp %g1, 0 4002bd14: 02 80 00 4a be 4002be3c 4002bd18: 01 00 00 00 nop 4002bd1c: 9f c0 40 00 call %g1 4002bd20: 90 10 00 19 mov %i1, %o0 return result; } 4002bd24: 81 c7 e0 08 ret 4002bd28: 81 e8 00 00 restore /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002bd2c: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 4002bd30: 90 10 20 00 clr %o0 4002bd34: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002bd38: c4 27 bf d4 st %g2, [ %fp + -44 ] 4002bd3c: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002bd40: c4 27 bf d8 st %g2, [ %fp + -40 ] 4002bd44: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4002bd48: c4 27 bf dc st %g2, [ %fp + -36 ] 4002bd4c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4002bd50: c4 27 bf e0 st %g2, [ %fp + -32 ] 4002bd54: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4002bd58: 10 bf ff c8 b 4002bc78 4002bd5c: c2 27 bf e4 st %g1, [ %fp + -28 ] * 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 ); 4002bd60: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002bd64: 80 a0 60 00 cmp %g1, 0 4002bd68: 22 80 00 09 be,a 4002bd8c 4002bd6c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002bd70: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002bd74: 80 a0 60 00 cmp %g1, 0 4002bd78: 22 80 00 05 be,a 4002bd8c 4002bd7c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002bd80: 9f c0 40 00 call %g1 4002bd84: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 4002bd88: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002bd8c: 80 a0 60 00 cmp %g1, 0 4002bd90: 02 80 00 08 be 4002bdb0 4002bd94: 01 00 00 00 nop 4002bd98: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002bd9c: 80 a0 60 00 cmp %g1, 0 4002bda0: 02 80 00 04 be 4002bdb0 4002bda4: 01 00 00 00 nop 4002bda8: 9f c0 40 00 call %g1 4002bdac: 90 10 00 19 mov %i1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 4002bdb0: 40 00 69 9b call 4004641c <__errno> 4002bdb4: b0 10 3f ff mov -1, %i0 4002bdb8: 82 10 20 12 mov 0x12, %g1 4002bdbc: c2 22 00 00 st %g1, [ %o0 ] 4002bdc0: 81 c7 e0 08 ret 4002bdc4: 81 e8 00 00 restore 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 ); 4002bdc8: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002bdcc: 80 a0 60 00 cmp %g1, 0 4002bdd0: 02 80 00 08 be 4002bdf0 4002bdd4: 01 00 00 00 nop 4002bdd8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002bddc: 80 a0 60 00 cmp %g1, 0 4002bde0: 02 80 00 04 be 4002bdf0 4002bde4: 01 00 00 00 nop 4002bde8: 9f c0 40 00 call %g1 4002bdec: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 4002bdf0: 40 00 69 8b call 4004641c <__errno> 4002bdf4: b0 10 3f ff mov -1, %i0 4002bdf8: e2 22 00 00 st %l1, [ %o0 ] 4002bdfc: 81 c7 e0 08 ret 4002be00: 81 e8 00 00 restore */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 4002be04: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002be08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002be0c: 02 80 00 08 be 4002be2c <== NOT EXECUTED 4002be10: 01 00 00 00 nop <== NOT EXECUTED 4002be14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002be18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002be1c: 02 80 00 04 be 4002be2c <== NOT EXECUTED 4002be20: 01 00 00 00 nop <== NOT EXECUTED 4002be24: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002be28: 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 ); 4002be2c: 40 00 69 7c call 4004641c <__errno> <== NOT EXECUTED 4002be30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002be34: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002be38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002be3c: 81 c7 e0 08 ret 4002be40: 81 e8 00 00 restore rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 4002be44: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002be48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002be4c: 02 80 00 0a be 4002be74 <== NOT EXECUTED 4002be50: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002be54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002be58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002be5c: 02 80 00 06 be 4002be74 <== NOT EXECUTED 4002be60: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002be64: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002be68: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002be6c: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 4002be70: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002be74: 02 bf ff ee be 4002be2c <== NOT EXECUTED 4002be78: 01 00 00 00 nop <== NOT EXECUTED 4002be7c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002be80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002be84: 02 bf ff ea be 4002be2c <== NOT EXECUTED 4002be88: 01 00 00 00 nop <== NOT EXECUTED 4002be8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002be90: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4002be94: 30 bf ff e6 b,a 4002be2c <== NOT EXECUTED 4001c318 : off_t lseek( int fd, off_t offset, int whence ) { 4001c318: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001c31c: 03 10 00 78 sethi %hi(0x4001e000), %g1 4001c320: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 4001e124 off_t lseek( int fd, off_t offset, int whence ) { 4001c324: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001c328: 80 a6 00 01 cmp %i0, %g1 4001c32c: 1a 80 00 46 bcc 4001c444 4001c330: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 4001c334: 03 10 00 7a sethi %hi(0x4001e800), %g1 4001c338: e0 00 62 b8 ld [ %g1 + 0x2b8 ], %l0 ! 4001eab8 4001c33c: 83 2e 20 06 sll %i0, 6, %g1 4001c340: b1 2e 20 03 sll %i0, 3, %i0 4001c344: b0 06 00 01 add %i0, %g1, %i0 4001c348: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 4001c34c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001c350: 80 88 61 00 btst 0x100, %g1 4001c354: 02 80 00 3c be 4001c444 4001c358: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 4001c35c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001c360: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 4001c364: 80 a1 20 00 cmp %g4, 0 4001c368: 02 80 00 3f be 4001c464 4001c36c: 80 a6 e0 01 cmp %i3, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 4001c370: 02 80 00 27 be 4001c40c 4001c374: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 4001c378: 80 a6 e0 02 cmp %i3, 2 4001c37c: 02 80 00 11 be 4001c3c0 4001c380: 80 a6 e0 00 cmp %i3, 0 4001c384: 12 80 00 26 bne 4001c41c 4001c388: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 4001c38c: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 4001c390: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001c394: 92 10 00 02 mov %g2, %o1 4001c398: 94 10 00 03 mov %g3, %o2 4001c39c: 96 10 00 1b mov %i3, %o3 4001c3a0: 9f c0 40 00 call %g1 4001c3a4: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 4001c3a8: 80 a2 3f ff cmp %o0, -1 4001c3ac: 02 80 00 13 be 4001c3f8 4001c3b0: 80 a2 7f ff cmp %o1, -1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001c3b4: b2 10 00 09 mov %o1, %i1 4001c3b8: 81 c7 e0 08 ret 4001c3bc: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001c3c0: d8 1c 20 08 ldd [ %l0 + 8 ], %o4 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 4001c3c4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001c3c8: 9a 86 80 0d addcc %i2, %o5, %o5 4001c3cc: 98 46 40 0c addx %i1, %o4, %o4 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 4001c3d0: 92 10 00 02 mov %g2, %o1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001c3d4: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 4001c3d8: 94 10 00 03 mov %g3, %o2 4001c3dc: 96 10 00 1b mov %i3, %o3 4001c3e0: 9f c0 40 00 call %g1 4001c3e4: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 4001c3e8: 80 a2 3f ff cmp %o0, -1 4001c3ec: 12 bf ff f3 bne 4001c3b8 4001c3f0: b2 10 00 09 mov %o1, %i1 4001c3f4: 80 a2 7f ff cmp %o1, -1 4001c3f8: 12 bf ff f0 bne 4001c3b8 4001c3fc: b2 10 00 09 mov %o1, %i1 iop->offset = old_offset; 4001c400: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001c404: 81 c7 e0 08 ret 4001c408: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 4001c40c: 9a 86 80 13 addcc %i2, %l3, %o5 4001c410: 98 46 40 12 addx %i1, %l2, %o4 break; 4001c414: 10 bf ff df b 4001c390 4001c418: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4001c41c: 7f ff d1 13 call 40010868 <__errno> 4001c420: 01 00 00 00 nop 4001c424: 82 10 20 16 mov 0x16, %g1 ! 16 4001c428: c2 22 00 00 st %g1, [ %o0 ] 4001c42c: 11 3f ff ff sethi %hi(0xfffffc00), %o0 4001c430: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 4001c434: 92 10 00 08 mov %o0, %o1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001c438: b0 10 00 08 mov %o0, %i0 4001c43c: 81 c7 e0 08 ret 4001c440: 93 e8 00 09 restore %g0, %o1, %o1 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4001c444: 7f ff d1 09 call 40010868 <__errno> <== NOT EXECUTED 4001c448: 01 00 00 00 nop <== NOT EXECUTED 4001c44c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4001c450: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c454: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 4001c458: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 4001c45c: 10 bf ff d6 b 4001c3b4 <== NOT EXECUTED 4001c460: 92 10 00 08 mov %o0, %o1 <== 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 ); 4001c464: 7f ff d1 01 call 40010868 <__errno> <== NOT EXECUTED 4001c468: 01 00 00 00 nop <== NOT EXECUTED 4001c46c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001c470: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c474: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 4001c478: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 4001c47c: 10 bf ff ce b 4001c3b4 <== NOT EXECUTED 4001c480: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002c040 : int _STAT_NAME( const char *path, struct stat *buf ) { 4002c040: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 4002c044: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4002c048: 02 80 00 34 be 4002c118 <== NOT EXECUTED 4002c04c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 4002c050: 40 00 84 32 call 4004d118 <== NOT EXECUTED 4002c054: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002c058: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4002c05c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002c060: 94 10 20 00 clr %o2 <== NOT EXECUTED 4002c064: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002c068: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4002c06c: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002c070: 7f ff 70 9e call 400082e8 <== NOT EXECUTED 4002c074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 4002c078: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002c07c: 12 80 00 25 bne 4002c110 <== NOT EXECUTED 4002c080: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 4002c084: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4002c088: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002c08c: 02 80 00 29 be 4002c130 <== NOT EXECUTED 4002c090: 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) ); 4002c094: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 4002c098: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 4002c09c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4002c0a0: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 4002c0a4: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 4002c0a8: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 4002c0ac: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4002c0b0: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 4002c0b4: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4002c0b8: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 4002c0bc: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4002c0c0: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 4002c0c4: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 4002c0c8: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 4002c0cc: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 4002c0d0: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 4002c0d4: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 4002c0d8: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 4002c0dc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002c0e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c0e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002c0e8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002c0ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c0f0: 02 80 00 08 be 4002c110 <== NOT EXECUTED 4002c0f4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002c0f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002c0fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c100: 02 80 00 1a be 4002c168 <== NOT EXECUTED 4002c104: 01 00 00 00 nop <== NOT EXECUTED 4002c108: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c10c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 4002c110: 81 c7 e0 08 ret <== NOT EXECUTED 4002c114: 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 ); 4002c118: 40 00 68 c1 call 4004641c <__errno> <== NOT EXECUTED 4002c11c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c120: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002c124: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c128: 81 c7 e0 08 ret <== NOT EXECUTED 4002c12c: 81 e8 00 00 restore <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 4002c130: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002c134: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c138: 02 80 00 08 be 4002c158 <== NOT EXECUTED 4002c13c: 01 00 00 00 nop <== NOT EXECUTED 4002c140: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002c144: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c148: 02 80 00 04 be 4002c158 <== NOT EXECUTED 4002c14c: 01 00 00 00 nop <== NOT EXECUTED 4002c150: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c154: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002c158: 40 00 68 b1 call 4004641c <__errno> <== NOT EXECUTED 4002c15c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c160: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002c164: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c168: 81 c7 e0 08 ret <== NOT EXECUTED 4002c16c: 81 e8 00 00 restore <== NOT EXECUTED 4000c3a4 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000c3a4: 9d e3 bf a0 save %sp, -96, %sp 4000c3a8: 03 10 00 7a sethi %hi(0x4001e800), %g1 4000c3ac: 82 10 62 c8 or %g1, 0x2c8, %g1 ! 4001eac8 4000c3b0: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000c3b4: a0 10 00 18 mov %i0, %l0 4000c3b8: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000c3bc: 7f ff ff ed call 4000c370 4000c3c0: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 4000c3c4: 80 a6 20 00 cmp %i0, 0 4000c3c8: 02 80 00 25 be 4000c45c 4000c3cc: 03 10 00 7b sethi %hi(0x4001ec00), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000c3d0: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 4001ee30 <_System_state_Current> 4000c3d4: 80 a0 60 03 cmp %g1, 3 4000c3d8: 02 80 00 1c be 4000c448 4000c3dc: 03 10 00 78 sethi %hi(0x4001e000), %g1 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4000c3e0: d0 00 61 30 ld [ %g1 + 0x130 ], %o0 ! 4001e130 4000c3e4: 92 10 00 10 mov %l0, %o1 4000c3e8: 94 10 20 00 clr %o2 4000c3ec: 40 00 05 79 call 4000d9d0 <_Protected_heap_Allocate_aligned_with_boundary> 4000c3f0: 96 10 20 00 clr %o3 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 4000c3f4: b0 92 20 00 orcc %o0, 0, %i0 4000c3f8: 02 80 00 1b be 4000c464 4000c3fc: a2 10 00 18 mov %i0, %l1 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4000c400: 03 10 00 79 sethi %hi(0x4001e400), %g1 4000c404: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 4001e7a0 4000c408: 80 a0 60 00 cmp %g1, 0 4000c40c: 02 80 00 05 be 4000c420 4000c410: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000c414: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000c418: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c41c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000c420: 03 10 00 79 sethi %hi(0x4001e400), %g1 4000c424: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 4001e798 4000c428: 80 a0 60 00 cmp %g1, 0 4000c42c: 02 80 00 05 be 4000c440 4000c430: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000c434: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000c438: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c43c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000c440: 81 c7 e0 08 ret 4000c444: 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()) && 4000c448: 7f ff ff b1 call 4000c30c 4000c44c: 01 00 00 00 nop 4000c450: 80 8a 20 ff btst 0xff, %o0 4000c454: 12 bf ff e3 bne 4000c3e0 4000c458: 03 10 00 78 sethi %hi(0x4001e000), %g1 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000c45c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c460: 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) 4000c464: 03 10 00 79 sethi %hi(0x4001e400), %g1 4000c468: c2 00 63 9c ld [ %g1 + 0x39c ], %g1 ! 4001e79c 4000c46c: 80 a0 60 00 cmp %g1, 0 4000c470: 02 80 00 08 be 4000c490 4000c474: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000c478: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000c47c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c480: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000c484: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000c488: 12 bf ff df bne 4000c404 <== NOT EXECUTED 4000c48c: 03 10 00 79 sethi %hi(0x4001e400), %g1 <== NOT EXECUTED errno = ENOMEM; 4000c490: 40 00 10 f6 call 40010868 <__errno> 4000c494: 01 00 00 00 nop 4000c498: 82 10 20 0c mov 0xc, %g1 ! c 4000c49c: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4000c4a0: 81 c7 e0 08 ret 4000c4a4: 81 e8 00 00 restore 4000c354 : 4000c354: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4000c358: 11 10 00 7c sethi %hi(0x4001f000), %o0 <== NOT EXECUTED 4000c35c: 90 12 22 18 or %o0, 0x218, %o0 ! 4001f218 <== NOT EXECUTED 4000c360: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000c364: 7f ff ec d8 call 400076c4 <_Chain_Append> <== NOT EXECUTED 4000c368: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000c36c: 01 00 00 00 nop 4000c370 : void malloc_deferred_frees_process(void) { 4000c370: 9d e3 bf a0 save %sp, -96, %sp 4000c374: 21 10 00 7c sethi %hi(0x4001f000), %l0 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) 4000c378: 10 80 00 04 b 4000c388 4000c37c: a0 14 22 18 or %l0, 0x218, %l0 ! 4001f218 free(to_be_freed); 4000c380: 7f ff fe 89 call 4000bda4 <== NOT EXECUTED 4000c384: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4000c388: 40 00 03 d7 call 4000d2e4 <_Chain_Get> 4000c38c: 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) 4000c390: 80 a2 20 00 cmp %o0, 0 4000c394: 12 bf ff fb bne 4000c380 4000c398: 01 00 00 00 nop free(to_be_freed); } 4000c39c: 81 c7 e0 08 ret 4000c3a0: 81 e8 00 00 restore 40014478 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 40014478: 9d e3 bf a0 save %sp, -96, %sp /* * 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) ) { 4001447c: 7f ff f5 7a call 40011a64 40014480: 90 10 00 18 mov %i0, %o0 40014484: 80 a2 20 00 cmp %o0, 0 40014488: 12 80 00 13 bne 400144d4 4001448c: 01 00 00 00 nop 40014490: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 40014494: 80 a0 60 00 cmp %g1, 0 40014498: 12 80 00 0f bne 400144d4 4001449c: 03 10 00 92 sethi %hi(0x40024800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 400144a0: c2 00 60 90 ld [ %g1 + 0x90 ], %g1 ! 40024890 400144a4: c4 00 60 04 ld [ %g1 + 4 ], %g2 400144a8: 80 a0 80 18 cmp %g2, %i0 400144ac: 22 80 00 02 be,a 400144b4 400144b0: 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) 400144b4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400144b8: 80 a0 60 06 cmp %g1, 6 400144bc: 02 80 00 04 be 400144cc 400144c0: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 400144c4: 7f ff ff 7a call 400142ac 400144c8: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 400144cc: 7f ff c2 11 call 40004d10 400144d0: 90 10 00 18 mov %i0, %o0 } return 0; } 400144d4: 81 c7 e0 08 ret 400144d8: 91 e8 20 00 restore %g0, 0, %o0 400141cc : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 400141cc: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 400141d0: 80 a6 20 00 cmp %i0, 0 400141d4: 02 80 00 16 be 4001422c 400141d8: 80 a6 60 00 cmp %i1, 0 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 400141e0: d0 06 00 00 ld [ %i0 ], %o0 400141e4: a0 10 00 08 mov %o0, %l0 400141e8: a2 10 20 00 clr %l1 if ( b[i] ) { 400141ec: d0 04 00 00 ld [ %l0 ], %o0 400141f0: 80 a2 20 00 cmp %o0, 0 400141f4: 02 80 00 05 be 40014208 400141f8: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 400141fc: 7f ff ff 2f call 40013eb8 40014200: 01 00 00 00 nop b[i] = 0; 40014204: c0 24 00 00 clr [ %l0 ] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 40014210: a0 04 20 04 add %l0, 4, %l0 40014214: d0 06 00 00 ld [ %i0 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 40014218: 7f ff ff 28 call 40013eb8 4001421c: 01 00 00 00 nop *block_table = 0; 40014220: c0 26 00 00 clr [ %i0 ] } 40014224: 81 c7 e0 08 ret 40014228: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 4001422c: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40014230: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40014234: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40014238: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 4001423c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40014240: 96 12 e2 58 or %o3, 0x258, %o3 <== NOT EXECUTED 40014244: 7f ff c1 7a call 4000482c <__assert_func> <== NOT EXECUTED 40014248: 92 10 21 b3 mov 0x1b3, %o1 <== NOT EXECUTED 4001424c: 01 00 00 00 nop 400147a4 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 400147a4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 400147a8: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 * 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 ) 400147ac: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400147b0: 80 a0 40 19 cmp %g1, %i1 400147b4: 16 80 00 07 bge 400147d0 400147b8: 90 10 00 10 mov %l0, %o0 return IMFS_memfile_extend( the_jnode, length ); 400147bc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400147c0: 7f ff ff 91 call 40014604 <== NOT EXECUTED 400147c4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 400147c8: 81 c7 e0 08 ret <== NOT EXECUTED 400147cc: 91 e8 00 08 restore %g0, %o0, %o0 <== 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 ) 400147d0: 22 80 00 0d be,a 40014804 400147d4: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 * 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; 400147d8: f2 24 20 50 st %i1, [ %l0 + 0x50 ] <== NOT EXECUTED 400147dc: f4 24 20 54 st %i2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 400147e0: f4 26 20 0c st %i2, [ %i0 + 0xc ] 400147e4: f2 26 20 08 st %i1, [ %i0 + 8 ] IMFS_update_atime( the_jnode ); 400147e8: 90 07 bf f8 add %fp, -8, %o0 400147ec: 7f ff c1 74 call 40004dbc 400147f0: 92 10 20 00 clr %o1 400147f4: c2 07 bf f8 ld [ %fp + -8 ], %g1 400147f8: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 400147fc: 81 c7 e0 08 ret 40014800: 91 e8 20 00 restore %g0, 0, %o0 * 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 ) 40014804: 80 a0 40 1a cmp %g1, %i2 40014808: 3a bf ff f5 bcc,a 400147dc 4001480c: f2 24 20 50 st %i1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 40014810: 10 bf ff eb b 400147bc <== NOT EXECUTED 40014814: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40014818 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 40014818: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001481c: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 40014820: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40014824: 80 a0 60 06 cmp %g1, 6 40014828: 02 80 00 0f be 40014864 4001482c: 90 10 00 10 mov %l0, %o0 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 )) 40014830: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 40014834: 92 10 00 02 mov %g2, %o1 40014838: 7f ff ff 73 call 40014604 4001483c: 94 10 00 03 mov %g3, %o2 40014840: 80 a2 20 00 cmp %o0, 0 40014844: 12 80 00 1b bne 400148b0 40014848: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 4001484c: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 40014850: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 40014854: d8 3e 20 08 std %o4, [ %i0 + 8 ] } return iop->offset; } 40014858: b2 10 00 03 mov %g3, %i1 4001485c: 81 c7 e0 08 ret 40014860: 91 e8 00 02 restore %g0, %g2, %o0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 40014864: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 40014868: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 4001486c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40014870: 14 80 00 0c bg 400148a0 <== NOT EXECUTED 40014874: c8 06 20 14 ld [ %i0 + 0x14 ], %g4 <== NOT EXECUTED 40014878: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4001487c: 02 80 00 07 be 40014898 <== NOT EXECUTED 40014880: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 40014884: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 40014888: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 4001488c: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 40014890: 81 c7 e0 08 ret <== NOT EXECUTED 40014894: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 40014898: 28 bf ff fc bleu,a 40014888 <== NOT EXECUTED 4001489c: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 400148a0: c4 3e 20 10 std %g2, [ %i0 + 0x10 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 400148a4: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 400148a8: 81 c7 e0 08 ret <== NOT EXECUTED 400148ac: 91 e8 00 02 restore %g0, %g2, %o0 <== 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 ); 400148b0: 40 00 07 ae call 40016768 <__errno> <== NOT EXECUTED 400148b4: 01 00 00 00 nop <== NOT EXECUTED 400148b8: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 400148bc: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 400148c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400148c4: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 400148c8: 10 bf ff e4 b 40014858 <== NOT EXECUTED 400148cc: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 40014b9c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40014b9c: 9d e3 bf a0 save %sp, -96, %sp the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 40014ba0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40014ba4: a0 10 00 18 mov %i0, %l0 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 40014ba8: 80 88 62 04 btst 0x204, %g1 40014bac: 02 80 00 06 be 40014bc4 40014bb0: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 && (the_jnode->type == IMFS_LINEAR_FILE)) { 40014bb4: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40014bb8: 80 a0 a0 06 cmp %g2, 6 40014bbc: 22 80 00 0c be,a 40014bec 40014bc0: d8 04 60 54 ld [ %l1 + 0x54 ], %o4 <== 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) 40014bc4: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 40014bc8: 80 88 62 00 btst 0x200, %g1 40014bcc: 22 80 00 05 be,a 40014be0 40014bd0: c4 3c 20 08 std %g2, [ %l0 + 8 ] iop->offset = the_jnode->info.file.size; 40014bd4: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] 40014bd8: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2 iop->size = the_jnode->info.file.size; 40014bdc: c4 3c 20 08 std %g2, [ %l0 + 8 ] 40014be0: b0 10 20 00 clr %i0 return 0; } 40014be4: 81 c7 e0 08 ret 40014be8: 81 e8 00 00 restore * 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; 40014bec: d6 04 60 58 ld [ %l1 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 40014bf0: 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; 40014bf4: c0 24 60 5c clr [ %l1 + 0x5c ] <== 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; 40014bf8: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED 40014bfc: c0 24 60 54 clr [ %l1 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; 40014c00: c0 24 60 60 clr [ %l1 + 0x60 ] <== 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; 40014c04: c0 24 60 58 clr [ %l1 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 40014c08: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 40014c0c: 12 80 00 06 bne 40014c24 <== NOT EXECUTED 40014c10: c2 24 60 48 st %g1, [ %l1 + 0x48 ] <== NOT EXECUTED 40014c14: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 40014c18: 84 10 20 00 clr %g2 <== NOT EXECUTED 40014c1c: 10 bf ff eb b 40014bc8 <== NOT EXECUTED 40014c20: 86 10 20 00 clr %g3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 40014c24: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40014c28: 92 10 20 00 clr %o1 <== NOT EXECUTED 40014c2c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40014c30: 7f ff ff 28 call 400148d0 <== NOT EXECUTED 40014c34: b0 10 3f ff mov -1, %i0 <== 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) 40014c38: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40014c3c: 02 bf ff ea be 40014be4 <== NOT EXECUTED 40014c40: 01 00 00 00 nop <== NOT EXECUTED 40014c44: 10 bf ff e0 b 40014bc4 <== NOT EXECUTED 40014c48: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 400144dc : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 400144dc: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 400144e0: e0 06 40 00 ld [ %i1 ], %l0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 400144e4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400144e8: 80 a0 60 00 cmp %g1, 0 400144ec: 22 80 00 06 be,a 40014504 400144f0: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 400144f4: 7f ff d4 ba call 400097dc <_Chain_Extract> 400144f8: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 400144fc: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40014500: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40014504: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40014508: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4001450c: 90 07 bf f8 add %fp, -8, %o0 40014510: 7f ff c2 2b call 40004dbc 40014514: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40014518: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 4001451c: 90 10 00 10 mov %l0, %o0 40014520: 7f ff ff d6 call 40014478 40014524: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } 40014528: 81 c7 e0 08 ret 4001452c: 91 e8 00 08 restore %g0, %o0, %o0 4000ab30 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000ab30: 13 10 00 75 sethi %hi(0x4001d400), %o1 4000ab34: 15 10 00 75 sethi %hi(0x4001d400), %o2 4000ab38: 92 12 60 3c or %o1, 0x3c, %o1 4000ab3c: 94 12 a2 00 or %o2, 0x200, %o2 4000ab40: 96 10 00 0a mov %o2, %o3 4000ab44: 82 13 c0 00 mov %o7, %g1 4000ab48: 40 00 03 73 call 4000b914 4000ab4c: 9e 10 40 00 mov %g1, %o7 4000ab50: 01 00 00 00 nop <== NOT EXECUTED 400036d0 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400036d0: 9d e3 bf 88 save %sp, -120, %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) ) ) 400036d4: 03 00 00 3c sethi %hi(0xf000), %g1 400036d8: b3 2e 60 10 sll %i1, 0x10, %i1 400036dc: b3 36 60 10 srl %i1, 0x10, %i1 400036e0: 80 8e 40 01 btst %i1, %g1 400036e4: 02 80 00 4f be 40003820 400036e8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400036ec: c2 4e 00 00 ldsb [ %i0 ], %g1 400036f0: 80 a0 60 5c cmp %g1, 0x5c 400036f4: 02 80 00 1c be 40003764 400036f8: 80 a0 60 2f cmp %g1, 0x2f 400036fc: 02 80 00 1a be 40003764 40003700: 80 a0 60 00 cmp %g1, 0 40003704: 02 80 00 19 be 40003768 40003708: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000370c: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 4001e238 40003710: c4 00 60 04 ld [ %g1 + 4 ], %g2 40003714: c4 27 bf e8 st %g2, [ %fp + -24 ] 40003718: c4 00 60 08 ld [ %g1 + 8 ], %g2 4000371c: c4 27 bf ec st %g2, [ %fp + -20 ] 40003720: c4 00 60 0c ld [ %g1 + 0xc ], %g2 40003724: c4 27 bf f0 st %g2, [ %fp + -16 ] 40003728: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000372c: c4 27 bf f4 st %g2, [ %fp + -12 ] 40003730: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40003734: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !temp_loc.ops->evalformake_h ) { 40003738: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000373c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003740: 80 a0 60 00 cmp %g1, 0 40003744: 12 80 00 19 bne 400037a8 40003748: 90 10 20 00 clr %o0 if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000374c: 40 00 34 47 call 40010868 <__errno> <== NOT EXECUTED 40003750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003754: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000375c: 81 c7 e0 08 ret 40003760: 81 e8 00 00 restore int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40003764: 03 10 00 78 sethi %hi(0x4001e000), %g1 40003768: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 4001e238 4000376c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40003770: c4 27 bf e8 st %g2, [ %fp + -24 ] 40003774: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40003778: c4 27 bf ec st %g2, [ %fp + -20 ] 4000377c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 40003780: c4 27 bf f0 st %g2, [ %fp + -16 ] 40003784: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 40003788: c4 27 bf f4 st %g2, [ %fp + -12 ] 4000378c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40003790: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !temp_loc.ops->evalformake_h ) { 40003794: c2 07 bf f4 ld [ %fp + -12 ], %g1 40003798: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000379c: 80 a0 60 00 cmp %g1, 0 400037a0: 02 bf ff eb be 4000374c 400037a4: 90 10 20 01 mov 1, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 400037a8: 90 06 00 08 add %i0, %o0, %o0 400037ac: a0 07 bf e8 add %fp, -24, %l0 400037b0: 94 07 bf fc add %fp, -4, %o2 400037b4: 92 10 00 10 mov %l0, %o1 400037b8: 9f c0 40 00 call %g1 400037bc: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 400037c0: 80 a2 20 00 cmp %o0, 0 400037c4: 12 bf ff e6 bne 4000375c 400037c8: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !temp_loc.ops->mknod_h ) { 400037cc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 400037d0: 80 a0 60 00 cmp %g1, 0 400037d4: 02 80 00 19 be 40003838 400037d8: d0 07 bf fc ld [ %fp + -4 ], %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 ); 400037dc: 92 10 00 19 mov %i1, %o1 400037e0: 94 10 00 1a mov %i2, %o2 400037e4: 96 10 00 1b mov %i3, %o3 400037e8: 9f c0 40 00 call %g1 400037ec: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400037f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400037f4: 80 a0 60 00 cmp %g1, 0 400037f8: 02 bf ff d9 be 4000375c 400037fc: b0 10 00 08 mov %o0, %i0 40003800: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003804: 80 a0 60 00 cmp %g1, 0 40003808: 02 80 00 0a be 40003830 4000380c: 01 00 00 00 nop 40003810: 9f c0 40 00 call %g1 40003814: 90 10 00 10 mov %l0, %o0 return result; } 40003818: 81 c7 e0 08 ret 4000381c: 81 e8 00 00 restore 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 ); 40003820: 40 00 34 12 call 40010868 <__errno> <== NOT EXECUTED 40003824: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003828: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000382c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003830: 81 c7 e0 08 ret 40003834: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 40003838: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000383c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003840: 02 bf ff c3 be 4000374c <== NOT EXECUTED 40003844: 01 00 00 00 nop <== NOT EXECUTED 40003848: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000384c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003850: 30 bf ff bf b,a 4000374c <== NOT EXECUTED 40003874 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 40003874: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 40003878: 80 a6 60 00 cmp %i1, 0 4000387c: 02 80 00 94 be 40003acc 40003880: a0 10 00 18 mov %i0, %l0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 40003884: 80 a6 a0 01 cmp %i2, 1 40003888: 18 80 00 91 bgu 40003acc 4000388c: 01 00 00 00 nop errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 40003890: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40003894: 80 a0 60 00 cmp %g1, 0 40003898: 02 80 00 98 be 40003af8 4000389c: 80 a6 e0 00 cmp %i3, 0 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 400038a0: 02 80 00 05 be 400038b4 400038a4: 90 10 20 6c mov 0x6c, %o0 size += strlen( device ) + 1; 400038a8: 40 00 37 a7 call 40011744 <== NOT EXECUTED 400038ac: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 400038b0: 90 02 20 6d add %o0, 0x6d, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 400038b4: 40 00 22 bc call 4000c3a4 400038b8: 01 00 00 00 nop if ( !temp_mt_entry ) { 400038bc: a2 92 20 00 orcc %o0, 0, %l1 400038c0: 02 80 00 97 be 40003b1c 400038c4: a6 10 00 11 mov %l1, %l3 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 400038c8: f4 24 60 30 st %i2, [ %l1 + 0x30 ] if ( device ) { 400038cc: 80 a6 e0 00 cmp %i3, 0 400038d0: 02 80 00 7d be 40003ac4 400038d4: e2 24 60 2c st %l1, [ %l1 + 0x2c ] temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 400038d8: 90 04 60 6c add %l1, 0x6c, %o0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 400038dc: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 400038e0: 40 00 37 76 call 400116b8 <== NOT EXECUTED 400038e4: d0 24 60 68 st %o0, [ %l1 + 0x68 ] <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 400038e8: 80 a7 20 00 cmp %i4, 0 400038ec: 22 80 00 6e be,a 40003aa4 400038f0: c0 24 60 1c clr [ %l1 + 0x1c ] if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 400038f4: 40 00 37 94 call 40011744 400038f8: 90 10 00 1c mov %i4, %o0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 400038fc: a4 07 bf ec add %fp, -20, %l2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 40003900: 92 10 00 08 mov %o0, %o1 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 40003904: 94 10 20 07 mov 7, %o2 40003908: 90 10 00 1c mov %i4, %o0 4000390c: 96 10 00 12 mov %l2, %o3 40003910: 7f ff fe b7 call 400033ec 40003914: 98 10 20 01 mov 1, %o4 40003918: 80 a2 3f ff cmp %o0, -1 4000391c: 02 80 00 7b be 40003b08 40003920: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 40003924: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40003928: 80 a0 60 00 cmp %g1, 0 4000392c: 02 80 00 46 be 40003a44 40003930: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40003934: 9f c0 40 00 call %g1 40003938: 90 10 00 12 mov %l2, %o0 4000393c: 80 a2 20 01 cmp %o0, 1 40003940: 12 80 00 69 bne 40003ae4 40003944: 09 10 00 7a sethi %hi(0x4001e800), %g4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40003948: c2 01 22 f8 ld [ %g4 + 0x2f8 ], %g1 ! 4001eaf8 4000394c: 88 11 22 f8 or %g4, 0x2f8, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40003950: 88 01 20 04 add %g4, 4, %g4 40003954: 80 a0 40 04 cmp %g1, %g4 40003958: 02 80 00 0e be 40003990 4000395c: c6 07 bf ec ld [ %fp + -20 ], %g3 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 40003960: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40003964: 80 a0 80 03 cmp %g2, %g3 40003968: 32 80 00 07 bne,a 40003984 4000396c: c2 00 40 00 ld [ %g1 ], %g1 40003970: 30 80 00 48 b,a 40003a90 <== NOT EXECUTED 40003974: 80 a0 80 03 cmp %g2, %g3 40003978: 02 80 00 46 be 40003a90 4000397c: 01 00 00 00 nop * 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 ) { 40003980: c2 00 40 00 ld [ %g1 ], %g1 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40003984: 80 a0 40 04 cmp %g1, %g4 40003988: 32 bf ff fb bne,a 40003974 4000398c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 * 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; 40003990: c6 24 60 08 st %g3, [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = loc.handlers; 40003994: c6 07 bf f4 ld [ %fp + -12 ], %g3 temp_mt_entry->mt_point_node.ops = loc.ops; 40003998: c4 07 bf f8 ld [ %fp + -8 ], %g2 * 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; 4000399c: c6 24 60 10 st %g3, [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 400039a0: c6 07 bf fc ld [ %fp + -4 ], %g3 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 400039a4: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 */ 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; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 400039a8: c6 24 60 18 st %g3, [ %l1 + 0x18 ] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 400039ac: 80 a0 60 00 cmp %g1, 0 400039b0: 02 80 00 25 be 40003a44 400039b4: c4 24 60 14 st %g2, [ %l1 + 0x14 ] errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 400039b8: 90 10 00 11 mov %l1, %o0 400039bc: 9f c0 40 00 call %g1 400039c0: a6 10 00 12 mov %l2, %l3 400039c4: 80 a2 20 00 cmp %o0, 0 400039c8: 12 80 00 24 bne 40003a58 400039cc: 90 10 00 11 mov %l1, %o0 temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 400039d0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 400039d4: 9f c0 40 00 call %g1 400039d8: 90 10 00 11 mov %l1, %o0 400039dc: 80 a2 20 00 cmp %o0, 0 400039e0: 12 80 00 0b bne 40003a0c 400039e4: 11 10 00 7a sethi %hi(0x4001e800), %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 400039e8: 92 10 00 11 mov %l1, %o1 400039ec: 40 00 0f 36 call 400076c4 <_Chain_Append> 400039f0: 90 12 22 f8 or %o0, 0x2f8, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 400039f4: 80 a4 20 00 cmp %l0, 0 400039f8: 02 80 00 03 be 40003a04 400039fc: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 40003a00: e2 24 00 00 st %l1, [ %l0 ] 40003a04: 81 c7 e0 08 ret 40003a08: 81 e8 00 00 restore temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 40003a0c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40003a10: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 40003a14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003a18: 02 80 00 04 be 40003a28 <== NOT EXECUTED 40003a1c: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 40003a20: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003a24: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40003a28: 40 00 20 df call 4000bda4 <== NOT EXECUTED 40003a2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( loc_to_free ) 40003a30: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40003a34: 32 80 00 0c bne,a 40003a64 <== NOT EXECUTED 40003a38: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); return -1; } 40003a3c: 81 c7 e0 08 ret <== NOT EXECUTED 40003a40: 91 e8 3f ff restore %g0, -1, %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; 40003a44: 40 00 33 89 call 40010868 <__errno> <== NOT EXECUTED 40003a48: 01 00 00 00 nop <== NOT EXECUTED 40003a4c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40003a50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40003a54: 90 10 00 11 mov %l1, %o0 40003a58: 40 00 20 d3 call 4000bda4 40003a5c: a6 10 00 12 mov %l2, %l3 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 40003a60: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40003a64: 80 a0 60 00 cmp %g1, 0 40003a68: 02 bf ff e7 be 40003a04 40003a6c: b0 10 3f ff mov -1, %i0 40003a70: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003a74: 80 a0 60 00 cmp %g1, 0 40003a78: 02 bf ff e3 be 40003a04 40003a7c: 90 10 00 13 mov %l3, %o0 40003a80: 9f c0 40 00 call %g1 40003a84: 01 00 00 00 nop 40003a88: 81 c7 e0 08 ret 40003a8c: 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; 40003a90: 40 00 33 76 call 40010868 <__errno> 40003a94: 01 00 00 00 nop 40003a98: 82 10 20 10 mov 0x10, %g1 ! 10 goto cleanup_and_bail; 40003a9c: 10 bf ff ee b 40003a54 40003aa0: c2 22 00 00 st %g1, [ %o0 ] * 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; temp_mt_entry->mt_fs_root.handlers = NULL; 40003aa4: c0 24 60 24 clr [ %l1 + 0x24 ] temp_mt_entry->mt_fs_root.ops = NULL; 40003aa8: c0 24 60 28 clr [ %l1 + 0x28 ] temp_mt_entry->mt_point_node.node_access = NULL; 40003aac: c0 24 60 08 clr [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 40003ab0: c0 24 60 10 clr [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = NULL; 40003ab4: c0 24 60 14 clr [ %l1 + 0x14 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 40003ab8: c0 24 60 18 clr [ %l1 + 0x18 ] 40003abc: 10 bf ff c5 b 400039d0 40003ac0: a6 10 20 00 clr %l3 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; 40003ac4: 10 bf ff 89 b 400038e8 40003ac8: c0 24 60 68 clr [ %l1 + 0x68 ] * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 40003acc: 40 00 33 67 call 40010868 <__errno> 40003ad0: b0 10 3f ff mov -1, %i0 40003ad4: 82 10 20 16 mov 0x16, %g1 40003ad8: c2 22 00 00 st %g1, [ %o0 ] return -1; 40003adc: 81 c7 e0 08 ret 40003ae0: 81 e8 00 00 restore /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 40003ae4: 40 00 33 61 call 40010868 <__errno> 40003ae8: 01 00 00 00 nop 40003aec: 82 10 20 14 mov 0x14, %g1 ! 14 goto cleanup_and_bail; 40003af0: 10 bf ff d9 b 40003a54 40003af4: c2 22 00 00 st %g1, [ %o0 ] return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 40003af8: 40 00 33 5c call 40010868 <__errno> <== NOT EXECUTED 40003afc: a6 10 20 00 clr %l3 <== NOT EXECUTED 40003b00: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003b04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40003b08: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40003b0c: 40 00 20 a6 call 4000bda4 <== NOT EXECUTED 40003b10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003b14: 81 c7 e0 08 ret <== NOT EXECUTED 40003b18: 81 e8 00 00 restore <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 40003b1c: 40 00 33 53 call 40010868 <__errno> <== NOT EXECUTED 40003b20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003b24: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40003b28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 40003b2c: 81 c7 e0 08 ret <== NOT EXECUTED 40003b30: 81 e8 00 00 restore <== NOT EXECUTED 40003ba4 : */ int newlib_free_buffers( FILE *fp ) { 40003ba4: 9d e3 bf a0 save %sp, -96, %sp switch ( fileno(fp) ) { 40003ba8: 40 00 34 49 call 40010ccc 40003bac: 90 10 00 18 mov %i0, %o0 40003bb0: 80 a2 20 02 cmp %o0, 2 40003bb4: 28 80 00 06 bleu,a 40003bcc 40003bb8: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 40003bbc: 40 00 33 83 call 400109c8 <== NOT EXECUTED 40003bc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 40003bc4: 81 c7 e0 08 ret 40003bc8: 91 e8 20 00 restore %g0, 0, %o0 { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 40003bcc: 80 88 60 80 btst 0x80, %g1 40003bd0: 02 bf ff fd be 40003bc4 40003bd4: 01 00 00 00 nop free( fp->_bf._base ); 40003bd8: 40 00 20 73 call 4000bda4 <== NOT EXECUTED 40003bdc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 40003be0: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 40003be4: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40003be8: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 40003bec: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40003bf0: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED break; default: fclose(fp); } return 0; } 40003bf4: 81 c7 e0 08 ret <== NOT EXECUTED 40003bf8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40003c44 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 40003c44: 9d e3 bf a0 save %sp, -96, %sp rtems_device_driver status; if ( !initialized ) { 40003c48: 03 10 00 8e sethi %hi(0x40023800), %g1 40003c4c: c4 48 60 4c ldsb [ %g1 + 0x4c ], %g2 ! 4002384c 40003c50: 80 a0 a0 00 cmp %g2, 0 40003c54: 02 80 00 04 be 40003c64 40003c58: 84 10 20 01 mov 1, %g2 NULL_major = major; } return RTEMS_SUCCESSFUL; } 40003c5c: 81 c7 e0 08 ret 40003c60: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 40003c64: 11 10 00 85 sethi %hi(0x40021400), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 40003c68: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] status = rtems_io_register_name( 40003c6c: 90 12 22 00 or %o0, 0x200, %o0 40003c70: 92 10 00 18 mov %i0, %o1 40003c74: 40 00 00 51 call 40003db8 40003c78: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40003c7c: 80 a2 20 00 cmp %o0, 0 40003c80: 12 80 00 05 bne 40003c94 40003c84: 03 10 00 8e sethi %hi(0x40023800), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 40003c88: f0 20 63 34 st %i0, [ %g1 + 0x334 ] ! 40023b34 } return RTEMS_SUCCESSFUL; } 40003c8c: 81 c7 e0 08 ret 40003c90: 91 e8 20 00 restore %g0, 0, %o0 major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 40003c94: 40 00 11 aa call 4000833c <== NOT EXECUTED 40003c98: 01 00 00 00 nop 40003c9c: 01 00 00 00 nop 40003c20 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 40003c20: 80 a2 a0 00 cmp %o2, 0 40003c24: 02 80 00 04 be 40003c34 40003c28: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 40003c2c: c2 02 a0 14 ld [ %o2 + 0x14 ], %g1 <== NOT EXECUTED 40003c30: c2 22 a0 1c st %g1, [ %o2 + 0x1c ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 40003c34: 81 c3 e0 08 retl 40003c38: 90 10 20 00 clr %o0 40003e44 : int open( const char *pathname, int flags, ... ) { 40003e44: 9d e3 bf 88 save %sp, -120, %sp eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); 40003e48: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40003e4c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40003e50: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40003e54: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40003e58: a2 06 60 01 add %i1, 1, %l1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40003e5c: 80 8c 60 02 btst 2, %l1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40003e60: a2 0c 60 01 and %l1, 1, %l1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40003e64: 02 80 00 03 be 40003e70 40003e68: a3 2c 60 02 sll %l1, 2, %l1 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40003e6c: a2 14 60 02 or %l1, 2, %l1 va_start(ap, flags); mode = va_arg( ap, int ); 40003e70: 82 07 a0 50 add %fp, 0x50, %g1 40003e74: e4 07 a0 4c ld [ %fp + 0x4c ], %l2 40003e78: c2 27 bf fc st %g1, [ %fp + -4 ] * 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(); 40003e7c: 40 00 20 d6 call 4000c1d4 40003e80: a6 10 20 17 mov 0x17, %l3 if ( iop == 0 ) { 40003e84: a0 92 20 00 orcc %o0, 0, %l0 40003e88: 02 80 00 6c be 40004038 40003e8c: 01 00 00 00 nop /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 40003e90: 40 00 36 2d call 40011744 40003e94: 90 10 00 18 mov %i0, %o0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40003e98: 94 10 00 11 mov %l1, %o2 pathname, strlen( pathname ), eval_flags, &loc, true ); 40003e9c: 92 10 00 08 mov %o0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40003ea0: a2 07 bf e8 add %fp, -24, %l1 40003ea4: 90 10 00 18 mov %i0, %o0 40003ea8: 96 10 00 11 mov %l1, %o3 40003eac: 7f ff fd 50 call 400033ec 40003eb0: 98 10 20 01 mov 1, %o4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 40003eb4: 80 a2 3f ff cmp %o0, -1 40003eb8: 02 80 00 65 be 4000404c 40003ebc: 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)) { 40003ec0: a8 10 00 11 mov %l1, %l4 40003ec4: 80 a0 6a 00 cmp %g1, 0xa00 40003ec8: 02 80 00 4a be 40003ff0 40003ecc: a6 10 20 11 mov 0x11, %l3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003ed0: c2 07 bf f0 ld [ %fp + -16 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003ed4: e6 04 20 18 ld [ %l0 + 0x18 ], %l3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003ed8: c2 24 20 40 st %g1, [ %l0 + 0x40 ] iop->file_info = loc.node_access; 40003edc: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 40003ee0: 90 10 00 19 mov %i1, %o0 40003ee4: 40 00 20 fd call 4000c2d8 40003ee8: c2 24 20 3c st %g1, [ %l0 + 0x3c ] iop->pathinfo = loc; 40003eec: c4 07 bf e8 ld [ %fp + -24 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40003ef0: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 40003ef4: c4 24 20 1c st %g2, [ %l0 + 0x1c ] 40003ef8: c4 07 bf ec ld [ %fp + -20 ], %g2 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003efc: 90 12 00 13 or %o0, %l3, %o0 iop->pathinfo = loc; 40003f00: c4 24 20 20 st %g2, [ %l0 + 0x20 ] 40003f04: c4 07 bf f0 ld [ %fp + -16 ], %g2 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003f08: d0 24 20 18 st %o0, [ %l0 + 0x18 ] iop->pathinfo = loc; 40003f0c: c4 24 20 24 st %g2, [ %l0 + 0x24 ] 40003f10: c4 07 bf f4 ld [ %fp + -12 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40003f14: 80 a0 60 00 cmp %g1, 0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 40003f18: c4 24 20 28 st %g2, [ %l0 + 0x28 ] 40003f1c: c4 07 bf f8 ld [ %fp + -8 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40003f20: 02 80 00 32 be 40003fe8 40003f24: c4 24 20 2c st %g2, [ %l0 + 0x2c ] 40003f28: c2 00 40 00 ld [ %g1 ], %g1 40003f2c: 80 a0 60 00 cmp %g1, 0 40003f30: 02 80 00 2e be 40003fe8 40003f34: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40003f38: 96 10 00 12 mov %l2, %o3 40003f3c: 90 10 00 10 mov %l0, %o0 40003f40: 9f c0 40 00 call %g1 40003f44: 94 10 00 19 mov %i1, %o2 if ( rc ) { 40003f48: 80 a2 20 00 cmp %o0, 0 40003f4c: 12 80 00 12 bne 40003f94 40003f50: 80 8e 64 00 btst 0x400, %i1 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40003f54: 12 80 00 48 bne 40004074 40003f58: 23 10 00 7a sethi %hi(0x4001e800), %l1 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003f5c: c2 04 62 b8 ld [ %l1 + 0x2b8 ], %g1 ! 4001eab8 40003f60: a0 24 00 01 sub %l0, %g1, %l0 40003f64: a1 3c 20 03 sra %l0, 3, %l0 40003f68: 85 2c 20 06 sll %l0, 6, %g2 40003f6c: 83 2c 20 03 sll %l0, 3, %g1 40003f70: 82 20 80 01 sub %g2, %g1, %g1 40003f74: 85 28 60 06 sll %g1, 6, %g2 40003f78: 82 00 40 02 add %g1, %g2, %g1 40003f7c: 82 00 40 10 add %g1, %l0, %g1 40003f80: b1 28 60 0f sll %g1, 0xf, %i0 40003f84: b0 26 00 01 sub %i0, %g1, %i0 40003f88: b1 2e 20 03 sll %i0, 3, %i0 } 40003f8c: 81 c7 e0 08 ret 40003f90: 91 ee 00 10 restore %i0, %l0, %o0 goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 40003f94: a8 10 00 11 mov %l1, %l4 40003f98: 40 00 32 34 call 40010868 <__errno> 40003f9c: 01 00 00 00 nop 40003fa0: e6 02 00 00 ld [ %o0 ], %l3 */ done: va_end(ap); if ( rc ) { 40003fa4: 80 a4 e0 00 cmp %l3, 0 40003fa8: 12 80 00 12 bne 40003ff0 40003fac: 23 10 00 7a sethi %hi(0x4001e800), %l1 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003fb0: c2 04 62 b8 ld [ %l1 + 0x2b8 ], %g1 ! 4001eab8 <== NOT EXECUTED 40003fb4: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 40003fb8: a1 3c 20 03 sra %l0, 3, %l0 <== NOT EXECUTED 40003fbc: 85 2c 20 06 sll %l0, 6, %g2 <== NOT EXECUTED 40003fc0: 83 2c 20 03 sll %l0, 3, %g1 <== NOT EXECUTED 40003fc4: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED 40003fc8: 85 28 60 06 sll %g1, 6, %g2 <== NOT EXECUTED 40003fcc: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40003fd0: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 40003fd4: b1 28 60 0f sll %g1, 0xf, %i0 <== NOT EXECUTED 40003fd8: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED 40003fdc: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED } 40003fe0: 81 c7 e0 08 ret <== NOT EXECUTED 40003fe4: 91 ee 00 10 restore %i0, %l0, %o0 <== 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; 40003fe8: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 40003fec: a6 10 20 86 mov 0x86, %l3 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 40003ff0: 80 a4 20 00 cmp %l0, 0 40003ff4: 02 80 00 05 be 40004008 40003ff8: 80 a5 20 00 cmp %l4, 0 rtems_libio_free( iop ); 40003ffc: 40 00 20 5f call 4000c178 40004000: 90 10 00 10 mov %l0, %o0 if ( loc_to_free ) 40004004: 80 a5 20 00 cmp %l4, 0 40004008: 02 80 00 0c be 40004038 4000400c: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40004010: c2 05 20 0c ld [ %l4 + 0xc ], %g1 40004014: 80 a0 60 00 cmp %g1, 0 40004018: 02 80 00 08 be 40004038 4000401c: 01 00 00 00 nop 40004020: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004024: 80 a0 60 00 cmp %g1, 0 40004028: 02 80 00 04 be 40004038 4000402c: 01 00 00 00 nop 40004030: 9f c0 40 00 call %g1 40004034: 90 10 00 14 mov %l4, %o0 rtems_set_errno_and_return_minus_one( rc ); 40004038: 40 00 32 0c call 40010868 <__errno> 4000403c: b0 10 3f ff mov -1, %i0 40004040: e6 22 00 00 st %l3, [ %o0 ] 40004044: 81 c7 e0 08 ret 40004048: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 4000404c: 40 00 32 07 call 40010868 <__errno> 40004050: 01 00 00 00 nop 40004054: c2 02 00 00 ld [ %o0 ], %g1 40004058: 80 a0 60 02 cmp %g1, 2 4000405c: 02 80 00 31 be 40004120 40004060: 80 8e 62 00 btst 0x200, %i1 rc = errno; 40004064: 40 00 32 01 call 40010868 <__errno> 40004068: a8 10 20 00 clr %l4 goto done; 4000406c: 10 bf ff ce b 40003fa4 40004070: e6 02 00 00 ld [ %o0 ], %l3 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 40004074: c2 04 62 b8 ld [ %l1 + 0x2b8 ], %g1 40004078: 92 10 20 00 clr %o1 4000407c: 82 24 00 01 sub %l0, %g1, %g1 40004080: 83 38 60 03 sra %g1, 3, %g1 40004084: 87 28 60 06 sll %g1, 6, %g3 40004088: 85 28 60 03 sll %g1, 3, %g2 4000408c: 84 20 c0 02 sub %g3, %g2, %g2 40004090: 87 28 a0 06 sll %g2, 6, %g3 40004094: 84 00 80 03 add %g2, %g3, %g2 40004098: 84 00 80 01 add %g2, %g1, %g2 4000409c: 91 28 a0 0f sll %g2, 0xf, %o0 400040a0: 84 22 00 02 sub %o0, %g2, %g2 400040a4: 94 10 20 00 clr %o2 400040a8: 91 28 a0 03 sll %g2, 3, %o0 400040ac: 40 00 1f 69 call 4000be50 400040b0: 90 02 00 01 add %o0, %g1, %o0 if ( rc ) { 400040b4: a6 92 20 00 orcc %o0, 0, %l3 400040b8: 02 bf ff aa be 40003f60 400040bc: c2 04 62 b8 ld [ %l1 + 0x2b8 ], %g1 if(errno) rc = errno; 400040c0: 40 00 31 ea call 40010868 <__errno> <== NOT EXECUTED 400040c4: 01 00 00 00 nop <== NOT EXECUTED 400040c8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400040cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400040d0: 12 80 00 30 bne 40004190 <== NOT EXECUTED 400040d4: 01 00 00 00 nop <== NOT EXECUTED close( iop - rtems_libio_iops ); 400040d8: c2 04 62 b8 ld [ %l1 + 0x2b8 ], %g1 <== NOT EXECUTED 400040dc: a8 10 20 00 clr %l4 <== NOT EXECUTED 400040e0: 82 24 00 01 sub %l0, %g1, %g1 <== NOT EXECUTED 400040e4: 83 38 60 03 sra %g1, 3, %g1 <== NOT EXECUTED 400040e8: 87 28 60 06 sll %g1, 6, %g3 <== NOT EXECUTED 400040ec: 85 28 60 03 sll %g1, 3, %g2 <== NOT EXECUTED 400040f0: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 400040f4: 87 28 a0 06 sll %g2, 6, %g3 <== NOT EXECUTED 400040f8: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED 400040fc: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40004100: 87 28 a0 0f sll %g2, 0xf, %g3 <== NOT EXECUTED 40004104: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 40004108: a0 10 20 00 clr %l0 <== NOT EXECUTED 4000410c: 91 28 a0 03 sll %g2, 3, %o0 <== NOT EXECUTED 40004110: 40 00 1e f5 call 4000bce4 <== NOT EXECUTED 40004114: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40004118: 10 bf ff a4 b 40003fa8 <== NOT EXECUTED 4000411c: 80 a4 e0 00 cmp %l3, 0 <== 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) ) { 40004120: a8 10 20 00 clr %l4 40004124: 02 bf ff b3 be 40003ff0 40004128: a6 10 20 02 mov 2, %l3 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 4000412c: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40004130: 90 10 00 18 mov %i0, %o0 40004134: 92 14 80 09 or %l2, %o1, %o1 40004138: 94 10 20 00 clr %o2 4000413c: 93 2a 60 10 sll %o1, 0x10, %o1 40004140: 96 10 20 00 clr %o3 40004144: 7f ff fd 63 call 400036d0 40004148: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 4000414c: 80 a2 20 00 cmp %o0, 0 40004150: 12 bf ff 92 bne 40003f98 40004154: 01 00 00 00 nop rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 40004158: 40 00 35 7b call 40011744 4000415c: 90 10 00 18 mov %i0, %o0 40004160: 94 10 20 00 clr %o2 40004164: 92 10 00 08 mov %o0, %o1 40004168: 96 10 00 11 mov %l1, %o3 4000416c: 90 10 00 18 mov %i0, %o0 40004170: 98 10 20 01 mov 1, %o4 40004174: 7f ff fc 9e call 400033ec 40004178: a8 10 20 00 clr %l4 if ( status != 0 ) { /* The file did not exist */ 4000417c: 80 a2 20 00 cmp %o0, 0 40004180: 12 bf ff 9c bne 40003ff0 40004184: a6 10 20 0d mov 0xd, %l3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40004188: 10 bf ff 53 b 40003ed4 4000418c: c2 07 bf f0 ld [ %fp + -16 ], %g1 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 40004190: 40 00 31 b6 call 40010868 <__errno> <== NOT EXECUTED 40004194: 01 00 00 00 nop <== NOT EXECUTED 40004198: 10 bf ff d0 b 400040d8 <== NOT EXECUTED 4000419c: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED 40003dd0 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 40003dd0: 9d e3 bf a0 save %sp, -96, %sp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 40003dd4: 21 10 00 73 sethi %hi(0x4001cc00), %l0 40003dd8: 92 10 20 00 clr %o1 40003ddc: 90 14 23 70 or %l0, 0x370, %o0 40003de0: 40 00 00 19 call 40003e44 40003de4: 94 10 20 00 clr %o2 40003de8: 80 a2 3f ff cmp %o0, -1 40003dec: 02 80 00 0e be 40003e24 40003df0: 90 14 23 70 or %l0, 0x370, %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) 40003df4: 92 10 20 01 mov 1, %o1 40003df8: 40 00 00 13 call 40003e44 40003dfc: 94 10 20 00 clr %o2 40003e00: 80 a2 3f ff cmp %o0, -1 40003e04: 02 80 00 0c be 40003e34 40003e08: 92 10 20 01 mov 1, %o1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40003e0c: 90 14 23 70 or %l0, 0x370, %o0 40003e10: 40 00 00 0d call 40003e44 40003e14: 94 10 20 00 clr %o2 40003e18: 80 a2 3f ff cmp %o0, -1 40003e1c: 02 80 00 04 be 40003e2c 40003e20: 11 15 55 11 sethi %hi(0x55544400), %o0 40003e24: 81 c7 e0 08 ret 40003e28: 81 e8 00 00 restore rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 40003e2c: 40 00 0d 37 call 40007308 <== NOT EXECUTED 40003e30: 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( 0x55544431 ); /* error STD1 */ 40003e34: 11 15 55 11 sethi %hi(0x55544400), %o0 <== NOT EXECUTED 40003e38: 40 00 0d 34 call 40007308 <== NOT EXECUTED 40003e3c: 90 12 20 31 or %o0, 0x31, %o0 ! 55544431 <== NOT EXECUTED 40003e40: 01 00 00 00 nop 4000497c : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 4000497c: 9d e3 bf a0 save %sp, -96, %sp int i; if (tty->termios.c_oflag & OPOST) { 40004980: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 40004984: 80 88 60 01 btst 1, %g1 40004988: 02 80 00 19 be 400049ec 4000498c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 40004990: b0 0e 20 ff and %i0, 0xff, %i0 40004994: 80 a6 20 09 cmp %i0, 9 40004998: 22 80 00 42 be,a 40004aa0 4000499c: c6 06 60 28 ld [ %i1 + 0x28 ], %g3 400049a0: 08 80 00 19 bleu 40004a04 400049a4: 80 a6 20 08 cmp %i0, 8 400049a8: 80 a6 20 0a cmp %i0, 0xa 400049ac: 02 80 00 22 be 40004a34 400049b0: 80 a6 20 0d cmp %i0, 0xd 400049b4: 02 80 00 2d be 40004a68 400049b8: 80 88 60 10 btst 0x10, %g1 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 400049bc: 80 88 60 02 btst 2, %g1 400049c0: 12 80 00 46 bne 40004ad8 400049c4: 03 10 00 78 sethi %hi(0x4001e000), %g1 400049c8: c2 00 62 d8 ld [ %g1 + 0x2d8 ], %g1 ! 4001e2d8 <__ctype_ptr__> c = toupper(c); if (!iscntrl(c)) 400049cc: b0 00 40 18 add %g1, %i0, %i0 400049d0: c2 0e 20 01 ldub [ %i0 + 1 ], %g1 400049d4: 80 88 60 20 btst 0x20, %g1 400049d8: 12 80 00 06 bne 400049f0 400049dc: 94 10 00 19 mov %i1, %o2 tty->column++; 400049e0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 400049e4: 82 00 60 01 inc %g1 400049e8: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 400049ec: 94 10 00 19 mov %i1, %o2 400049f0: 90 07 a0 44 add %fp, 0x44, %o0 400049f4: 7f ff ff 93 call 40004840 400049f8: 92 10 20 01 mov 1, %o1 400049fc: 81 c7 e0 08 ret 40004a00: 81 e8 00 00 restore oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 40004a04: 12 bf ff ef bne 400049c0 <== NOT EXECUTED 40004a08: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 40004a0c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004a10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004a14: 04 bf ff f6 ble 400049ec <== NOT EXECUTED 40004a18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004a1c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += i; break; case '\b': if (tty->column > 0) tty->column--; 40004a20: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004a24: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40004a28: 7f ff ff 86 call 40004840 <== NOT EXECUTED 40004a2c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004a30: 30 80 00 3e b,a 40004b28 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 40004a34: 80 88 60 20 btst 0x20, %g1 40004a38: 32 80 00 02 bne,a 40004a40 40004a3c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 40004a40: 80 88 60 04 btst 4, %g1 40004a44: 02 bf ff eb be 400049f0 40004a48: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40004a4c: 11 10 00 74 sethi %hi(0x4001d000), %o0 40004a50: 92 10 20 01 mov 1, %o1 40004a54: 90 12 22 58 or %o0, 0x258, %o0 40004a58: 7f ff ff 7a call 40004840 40004a5c: 94 10 00 19 mov %i1, %o2 tty->column = 0; 40004a60: 10 bf ff e3 b 400049ec 40004a64: c0 26 60 28 clr [ %i1 + 0x28 ] } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40004a68: 02 80 00 06 be 40004a80 <== NOT EXECUTED 40004a6c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40004a70: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED 40004a74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004a78: 02 bf ff e1 be 400049fc <== NOT EXECUTED 40004a7c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 40004a80: 22 bf ff db be,a 400049ec <== NOT EXECUTED 40004a84: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 40004a88: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 40004a8c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004a90: 02 bf ff d7 be 400049ec <== NOT EXECUTED 40004a94: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; break; 40004a98: 10 bf ff d5 b 400049ec <== NOT EXECUTED 40004a9c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004aa0: 05 00 00 06 sethi %hi(0x1800), %g2 40004aa4: 82 08 40 02 and %g1, %g2, %g1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40004aa8: 92 10 20 08 mov 8, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004aac: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40004ab0: 82 08 e0 07 and %g3, 7, %g1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004ab4: 02 80 00 17 be 40004b10 40004ab8: 92 22 40 01 sub %o1, %g1, %o1 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40004abc: 86 02 40 03 add %o1, %g3, %g3 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004ac0: 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; 40004ac4: c6 26 60 28 st %g3, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004ac8: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40004acc: 7f ff ff 5d call 40004840 <== NOT EXECUTED 40004ad0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004ad4: 30 80 00 15 b,a 40004b28 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 40004ad8: c2 00 62 d8 ld [ %g1 + 0x2d8 ], %g1 <== NOT EXECUTED 40004adc: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 40004ae0: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED 40004ae4: c6 0e 20 01 ldub [ %i0 + 1 ], %g3 <== NOT EXECUTED 40004ae8: 86 08 e0 03 and %g3, 3, %g3 <== NOT EXECUTED 40004aec: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40004af0: 22 80 00 05 be,a 40004b04 <== NOT EXECUTED 40004af4: 84 00 bf e0 add %g2, -32, %g2 <== NOT EXECUTED 40004af8: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED 40004afc: 10 bf ff b4 b 400049cc <== NOT EXECUTED 40004b00: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED 40004b04: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED 40004b08: 10 bf ff b1 b 400049cc <== NOT EXECUTED 40004b0c: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 40004b10: 86 02 40 03 add %o1, %g3, %g3 rtems_termios_puts ( " ", i, tty); 40004b14: 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; 40004b18: c6 26 60 28 st %g3, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 40004b1c: 11 10 00 74 sethi %hi(0x4001d000), %o0 40004b20: 7f ff ff 48 call 40004840 40004b24: 90 12 22 60 or %o0, 0x260, %o0 ! 4001d260 <__FUNCTION__.5769+0x258> return; 40004b28: 81 c7 e0 08 ret 40004b2c: 81 e8 00 00 restore 4000fc1c : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4000fc1c: 9d e3 bf 78 save %sp, -136, %sp rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4000fc20: 23 10 00 76 sethi %hi(0x4001d800), %l1 4000fc24: a0 07 bf dc add %fp, -36, %l0 4000fc28: 92 10 20 03 mov 3, %o1 4000fc2c: 90 14 61 50 or %l1, 0x150, %o0 4000fc30: 94 10 20 07 mov 7, %o2 4000fc34: 96 10 00 10 mov %l0, %o3 4000fc38: 7f ff cd ed call 400033ec 4000fc3c: 98 10 20 01 mov 1, %o4 4000fc40: 80 a2 20 00 cmp %o0, 0 4000fc44: 12 80 00 43 bne 4000fd50 4000fc48: c2 07 bf e8 ld [ %fp + -24 ], %g1 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 4000fc4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000fc50: 22 80 00 09 be,a 4000fc74 <== NOT EXECUTED 4000fc54: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000fc58: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001e81c <== NOT EXECUTED 4000fc5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000fc60: 22 80 00 05 be,a 4000fc74 <== NOT EXECUTED 4000fc64: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000fc68: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000fc6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000fc70: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000fc74: c4 10 61 06 lduh [ %g1 + 0x106 ], %g2 ! 4001e906 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000fc78: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000fc7c: 95 28 a0 10 sll %g2, 0x10, %o2 4000fc80: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000fc84: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000fc88: c4 30 61 06 sth %g2, [ %g1 + 0x106 ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000fc8c: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 4000fc90: 03 00 00 19 sethi %hi(0x6400), %g1 4000fc94: 84 10 a1 70 or %g2, 0x170, %g2 4000fc98: 82 10 62 6f or %g1, 0x26f, %g1 4000fc9c: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000fca0: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000fca4: c4 3f bf f0 std %g2, [ %fp + -16 ] 4000fca8: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000fcac: 90 07 bf fa add %fp, -6, %o0 4000fcb0: 13 10 00 76 sethi %hi(0x4001d800), %o1 4000fcb4: 40 00 05 d8 call 40011414 4000fcb8: 92 12 61 58 or %o1, 0x158, %o1 ! 4001d958 <__FUNCTION__.5918+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4000fcbc: 90 10 00 10 mov %l0, %o0 4000fcc0: 40 00 00 5a call 4000fe28 4000fcc4: 92 10 21 80 mov 0x180, %o1 4000fcc8: 80 a2 20 00 cmp %o0, 0 4000fccc: 12 80 00 1d bne 4000fd40 4000fcd0: 90 10 00 10 mov %l0, %o0 return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 4000fcd4: 7f ff d0 5c call 40003e44 4000fcd8: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 4000fcdc: 80 a2 20 00 cmp %o0, 0 4000fce0: 06 80 00 2f bl 4000fd9c 4000fce4: d0 26 00 00 st %o0, [ %i0 ] the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4000fce8: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 4000fcec: c4 00 61 24 ld [ %g1 + 0x124 ], %g2 ! 4001e124 <== NOT EXECUTED 4000fcf0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000fcf4: 0a 80 00 23 bcs 4000fd80 <== NOT EXECUTED 4000fcf8: 82 10 20 00 clr %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000fcfc: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000fd00: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000fd04: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000fd08: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000fd0c: 7f ff d0 4e call 40003e44 <== NOT EXECUTED 4000fd10: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 4000fd14: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 4000fd18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fd1c: 06 80 00 26 bl 4000fdb4 <== NOT EXECUTED 4000fd20: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4000fd24: 40 00 00 4b call 4000fe50 <== NOT EXECUTED 4000fd28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4000fd2c: 40 00 02 cf call 40010868 <__errno> 4000fd30: b0 10 3f ff mov -1, %i0 4000fd34: e2 22 00 00 st %l1, [ %o0 ] } 4000fd38: 81 c7 e0 08 ret 4000fd3c: 81 e8 00 00 restore memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 4000fd40: 40 00 02 ca call 40010868 <__errno> <== NOT EXECUTED 4000fd44: 01 00 00 00 nop <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4000fd48: 81 c7 e0 08 ret <== NOT EXECUTED 4000fd4c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) 4000fd50: 40 00 02 c6 call 40010868 <__errno> 4000fd54: 01 00 00 00 nop 4000fd58: c2 02 00 00 ld [ %o0 ], %g1 4000fd5c: 80 a0 60 02 cmp %g1, 2 4000fd60: 12 bf ff fa bne 4000fd48 4000fd64: 90 14 61 50 or %l1, 0x150, %o0 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4000fd68: 7f ff ce 50 call 400036a8 4000fd6c: 92 10 23 ff mov 0x3ff, %o1 4000fd70: 80 a2 20 00 cmp %o0, 0 4000fd74: 02 bf ff c0 be 4000fc74 4000fd78: 03 10 00 7a sethi %hi(0x4001e800), %g1 4000fd7c: 30 bf ff f3 b,a 4000fd48 <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4000fd80: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000fd84: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4001eab8 <== NOT EXECUTED 4000fd88: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4000fd8c: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 4000fd90: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 4000fd94: 10 bf ff da b 4000fcfc <== NOT EXECUTED 4000fd98: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 4000fd9c: 40 00 02 b3 call 40010868 <__errno> 4000fda0: 01 00 00 00 nop 4000fda4: e2 02 00 00 ld [ %o0 ], %l1 /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 4000fda8: 40 00 00 2a call 4000fe50 4000fdac: 90 10 00 10 mov %l0, %o0 4000fdb0: 30 bf ff df b,a 4000fd2c iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4000fdb4: 40 00 02 ad call 40010868 <__errno> <== NOT EXECUTED 4000fdb8: 01 00 00 00 nop <== NOT EXECUTED 4000fdbc: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 4000fdc0: 7f ff ef c9 call 4000bce4 <== NOT EXECUTED 4000fdc4: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 4000fdc8: 30 bf ff d7 b,a 4000fd24 <== NOT EXECUTED 4000e1f8 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000e1f8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 4000e1fc: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000e200: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 4000e204: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000e208: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000e20c: 12 80 00 12 bne 4000e254 <== NOT EXECUTED 4000e210: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 4000e214: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000e218: 02 80 00 0f be 4000e254 <== NOT EXECUTED 4000e21c: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4000e220: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000e224: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e228: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000e22c: 7f ff e2 88 call 40006c4c <== NOT EXECUTED 4000e230: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000e234: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e238: 12 80 00 07 bne 4000e254 <== NOT EXECUTED 4000e23c: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000e240: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000e244: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000e248: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000e24c: 7f ff e2 c7 call 40006d68 <== NOT EXECUTED 4000e250: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 4000e254: 81 c7 e0 08 ret <== NOT EXECUTED 4000e258: 81 e8 00 00 restore <== NOT EXECUTED 4000e180 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4000e180: 81 c3 e0 08 retl <== NOT EXECUTED 4000e184: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED 4000e25c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000e25c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000e260: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000e264: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000e268: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e26c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000e270: 7f ff e2 77 call 40006c4c <== NOT EXECUTED 4000e274: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000e278: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e27c: 12 80 00 2f bne 4000e338 <== NOT EXECUTED 4000e280: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4000e284: a4 10 20 00 clr %l2 <== NOT EXECUTED 4000e288: b0 10 20 00 clr %i0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4000e28c: 02 80 00 26 be 4000e324 <== NOT EXECUTED 4000e290: a2 10 20 00 clr %l1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4000e294: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4000e298: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000e29c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000e2a0: 12 80 00 2a bne 4000e348 <== NOT EXECUTED 4000e2a4: 82 26 80 12 sub %i2, %l2, %g1 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4000e2a8: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000e2ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e2b0: 22 80 00 1d be,a 4000e324 <== NOT EXECUTED 4000e2b4: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4000e2b8: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000e2bc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000e2c0: 32 80 00 19 bne,a 4000e324 <== NOT EXECUTED 4000e2c4: a2 10 3f f5 mov -11, %l1 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 4000e2c8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000e2cc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 4000e2d0: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000e2d4: 7f ff e2 a5 call 40006d68 <== NOT EXECUTED 4000e2d8: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000e2dc: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000e2e0: 40 00 04 a9 call 4000f584 <== NOT EXECUTED 4000e2e4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e2e8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000e2ec: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4000e2f0: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000e2f4: 92 10 20 00 clr %o1 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4000e2f8: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000e2fc: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000e300: 7f ff e2 53 call 40006c4c <== NOT EXECUTED 4000e304: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000e308: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e30c: 12 80 00 32 bne 4000e3d4 <== NOT EXECUTED 4000e310: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4000e314: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000e318: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000e31c: 02 bf ff df be 4000e298 <== NOT EXECUTED 4000e320: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4000e324: 7f ff e2 91 call 40006d68 <== NOT EXECUTED 4000e328: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 4000e32c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000e330: 04 80 00 04 ble 4000e340 <== NOT EXECUTED 4000e334: 01 00 00 00 nop <== NOT EXECUTED return read; return ret; } 4000e338: 81 c7 e0 08 ret <== NOT EXECUTED 4000e33c: 81 e8 00 00 restore <== NOT EXECUTED 4000e340: 81 c7 e0 08 ret <== NOT EXECUTED 4000e344: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4000e348: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000e34c: 38 80 00 02 bgu,a 4000e354 <== NOT EXECUTED 4000e350: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4000e354: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000e358: e8 04 20 04 ld [ %l0 + 4 ], %l4 <== NOT EXECUTED 4000e35c: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED if (chunk > chunk1) { 4000e360: 80 a4 40 14 cmp %l1, %l4 <== NOT EXECUTED 4000e364: 14 80 00 1e bg 4000e3dc <== NOT EXECUTED 4000e368: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4000e36c: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED 4000e370: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000e374: 40 00 0b 78 call 40011154 <== NOT EXECUTED 4000e378: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED pipe->Start += chunk; 4000e37c: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000e380: d2 04 20 04 ld [ %l0 + 4 ], %o1 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; 4000e384: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000e388: 40 00 2f 75 call 4001a15c <.urem> <== NOT EXECUTED 4000e38c: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000e390: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4000e394: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000e398: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4000e39c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e3a0: 12 80 00 03 bne 4000e3ac <== NOT EXECUTED 4000e3a4: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 4000e3a8: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 4000e3ac: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000e3b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e3b4: 32 80 00 15 bne,a 4000e408 <== NOT EXECUTED 4000e3b8: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 4000e3bc: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4000e3c0: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000e3c4: 0a bf ff b5 bcs 4000e298 <== NOT EXECUTED 4000e3c8: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED 4000e3cc: 10 bf ff d6 b 4000e324 <== NOT EXECUTED 4000e3d0: a2 10 20 00 clr %l1 <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000e3d4: 10 bf ff d6 b 4000e32c <== NOT EXECUTED 4000e3d8: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4000e3dc: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 4000e3e0: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000e3e4: 40 00 0b 5c call 40011154 <== NOT EXECUTED 4000e3e8: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4000e3ec: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 4000e3f0: 90 04 80 14 add %l2, %l4, %o0 <== NOT EXECUTED 4000e3f4: 94 24 40 14 sub %l1, %l4, %o2 <== NOT EXECUTED 4000e3f8: 40 00 0b 57 call 40011154 <== NOT EXECUTED 4000e3fc: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; 4000e400: 10 bf ff e0 b 4000e380 <== NOT EXECUTED 4000e404: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4000e408: 40 00 04 48 call 4000f528 <== NOT EXECUTED 4000e40c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 4000e410: 10 bf ff ec b 4000e3c0 <== NOT EXECUTED 4000e414: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 4000e634 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000e634: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 4000e638: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4000e63c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e640: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000e644: 7f ff e1 82 call 40006c4c <== NOT EXECUTED 4000e648: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4000e64c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e650: 12 80 00 48 bne 4000e770 <== NOT EXECUTED 4000e654: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4000e658: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4000e65c: 80 8c a0 02 btst 2, %l2 <== NOT EXECUTED 4000e660: 02 80 00 05 be 4000e674 <== NOT EXECUTED 4000e664: a4 0c a0 06 and %l2, 6, %l2 <== NOT EXECUTED pipe->Readers --; 4000e668: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000e66c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000e670: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4000e674: 80 8c a0 04 btst 4, %l2 <== NOT EXECUTED 4000e678: 32 80 00 1d bne,a 4000e6ec <== NOT EXECUTED 4000e67c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4000e680: 23 10 00 7a sethi %hi(0x4001e800), %l1 <== NOT EXECUTED 4000e684: d0 04 61 00 ld [ %l1 + 0x100 ], %o0 ! 4001e900 <== NOT EXECUTED 4000e688: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e68c: 7f ff e1 70 call 40006c4c <== NOT EXECUTED 4000e690: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4000e694: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e698: 12 80 00 36 bne 4000e770 <== NOT EXECUTED 4000e69c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4000e6a0: 7f ff e1 b2 call 40006d68 <== NOT EXECUTED 4000e6a4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4000e6a8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000e6ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e6b0: 12 80 00 12 bne 4000e6f8 <== NOT EXECUTED 4000e6b4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000e6b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e6bc: 02 80 00 1d be 4000e730 <== NOT EXECUTED 4000e6c0: 80 a4 a0 04 cmp %l2, 4 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4000e6c4: 02 80 00 06 be 4000e6dc <== NOT EXECUTED 4000e6c8: d0 04 61 00 ld [ %l1 + 0x100 ], %o0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4000e6cc: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000e6d0: 40 00 03 96 call 4000f528 <== NOT EXECUTED 4000e6d4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4000e6d8: d0 04 61 00 ld [ %l1 + 0x100 ], %o0 <== NOT EXECUTED 4000e6dc: 7f ff e1 a3 call 40006d68 <== NOT EXECUTED 4000e6e0: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000e6e4: 81 c7 e0 08 ret <== NOT EXECUTED 4000e6e8: 81 e8 00 00 restore <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 4000e6ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000e6f0: 10 bf ff e4 b 4000e680 <== NOT EXECUTED 4000e6f4: c2 24 20 14 st %g1, [ %l0 + 0x14 ] <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4000e6f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e6fc: 12 bf ff f8 bne 4000e6dc <== NOT EXECUTED 4000e700: d0 04 61 00 ld [ %l1 + 0x100 ], %o0 <== NOT EXECUTED 4000e704: 80 a4 a0 02 cmp %l2, 2 <== NOT EXECUTED 4000e708: 02 bf ff f5 be 4000e6dc <== NOT EXECUTED 4000e70c: 01 00 00 00 nop <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000e710: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000e714: 40 00 03 85 call 4000f528 <== NOT EXECUTED 4000e718: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4000e71c: d0 04 61 00 ld [ %l1 + 0x100 ], %o0 <== NOT EXECUTED 4000e720: 7f ff e1 92 call 40006d68 <== NOT EXECUTED 4000e724: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000e728: 81 c7 e0 08 ret <== NOT EXECUTED 4000e72c: 81 e8 00 00 restore <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4000e730: 40 00 03 64 call 4000f4c0 <== NOT EXECUTED 4000e734: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000e738: 40 00 03 62 call 4000f4c0 <== NOT EXECUTED 4000e73c: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000e740: 7f ff e1 16 call 40006b98 <== NOT EXECUTED 4000e744: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000e748: 7f ff f5 97 call 4000bda4 <== NOT EXECUTED 4000e74c: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED free(pipe); 4000e750: 7f ff f5 95 call 4000bda4 <== NOT EXECUTED 4000e754: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4000e758: d0 04 61 00 ld [ %l1 + 0x100 ], %o0 <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 4000e75c: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4000e760: 7f ff e1 82 call 40006d68 <== NOT EXECUTED 4000e764: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000e768: 81 c7 e0 08 ret <== NOT EXECUTED 4000e76c: 81 e8 00 00 restore <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 4000e770: 7f ff e2 e6 call 40007308 <== NOT EXECUTED 4000e774: 01 00 00 00 nop 4000e778: 01 00 00 00 nop 4000e418 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4000e418: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4000e41c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4000e420: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000e424: 12 80 00 04 bne 4000e434 <== NOT EXECUTED 4000e428: b0 10 20 00 clr %i0 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4000e42c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e430: 81 e8 00 00 restore <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4000e434: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000e438: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e43c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000e440: 7f ff e2 03 call 40006c4c <== NOT EXECUTED 4000e444: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000e448: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e44c: 12 bf ff f8 bne 4000e42c <== NOT EXECUTED 4000e450: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4000e454: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000e458: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e45c: 02 80 00 56 be 4000e5b4 <== NOT EXECUTED 4000e460: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4000e464: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED 4000e468: 80 a6 80 15 cmp %i2, %l5 <== NOT EXECUTED 4000e46c: 18 80 00 03 bgu 4000e478 <== NOT EXECUTED 4000e470: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 4000e474: a4 10 00 1a mov %i2, %l2 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4000e478: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000e47c: b0 10 20 00 clr %i0 <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4000e480: a8 07 bf fc add %fp, -4, %l4 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 4000e484: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000e488: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED 4000e48c: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000e490: 1a 80 00 28 bcc 4000e530 <== NOT EXECUTED 4000e494: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 4000e498: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000e49c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000e4a0: 32 80 00 46 bne,a 4000e5b8 <== NOT EXECUTED 4000e4a4: a2 10 3f f5 mov -11, %l1 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 4000e4a8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000e4ac: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 4000e4b0: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000e4b4: 7f ff e2 2d call 40006d68 <== NOT EXECUTED 4000e4b8: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000e4bc: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000e4c0: 40 00 04 31 call 4000f584 <== NOT EXECUTED 4000e4c4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000e4c8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000e4cc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4000e4d0: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000e4d4: 92 10 20 00 clr %o1 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4000e4d8: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000e4dc: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000e4e0: 7f ff e1 db call 40006c4c <== NOT EXECUTED 4000e4e4: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000e4e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e4ec: 12 80 00 43 bne 4000e5f8 <== NOT EXECUTED 4000e4f0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4000e4f4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000e4f8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000e4fc: 12 80 00 2f bne 4000e5b8 <== NOT EXECUTED 4000e500: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4000e504: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000e508: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e50c: 02 80 00 2b be 4000e5b8 <== NOT EXECUTED 4000e510: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED 4000e514: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 4000e518: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000e51c: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED 4000e520: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000e524: 2a bf ff de bcs,a 4000e49c <== NOT EXECUTED 4000e528: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4000e52c: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED 4000e530: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000e534: 38 80 00 02 bgu,a 4000e53c <== NOT EXECUTED 4000e538: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4000e53c: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 4000e540: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 4000e544: 40 00 2f 06 call 4001a15c <.urem> <== NOT EXECUTED 4000e548: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000e54c: a4 25 40 08 sub %l5, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000e550: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000e554: 04 80 00 2b ble 4000e600 <== NOT EXECUTED 4000e558: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4000e55c: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED 4000e560: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000e564: 40 00 0a fc call 40011154 <== NOT EXECUTED 4000e568: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4000e56c: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4000e570: 92 04 80 13 add %l2, %l3, %o1 <== NOT EXECUTED 4000e574: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000e578: 40 00 0a f7 call 40011154 <== NOT EXECUTED 4000e57c: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4000e580: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000e584: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4000e588: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000e58c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e590: 12 80 00 22 bne 4000e618 <== NOT EXECUTED 4000e594: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4000e598: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4000e59c: 80 a6 80 18 cmp %i2, %i0 <== NOT EXECUTED 4000e5a0: 08 80 00 23 bleu 4000e62c <== NOT EXECUTED 4000e5a4: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED 4000e5a8: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED 4000e5ac: 10 bf ff b6 b 4000e484 <== NOT EXECUTED 4000e5b0: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 4000e5b4: b0 10 20 00 clr %i0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4000e5b8: 7f ff e1 ec call 40006d68 <== NOT EXECUTED 4000e5bc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4000e5c0: 80 a4 7f e0 cmp %l1, -32 <== NOT EXECUTED 4000e5c4: 02 80 00 07 be 4000e5e0 <== NOT EXECUTED 4000e5c8: 01 00 00 00 nop <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) 4000e5cc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000e5d0: 14 bf ff 97 bg 4000e42c <== NOT EXECUTED 4000e5d4: 01 00 00 00 nop <== NOT EXECUTED return written; return ret; } 4000e5d8: 81 c7 e0 08 ret <== NOT EXECUTED 4000e5dc: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 4000e5e0: 40 00 02 5b call 4000ef4c <== NOT EXECUTED 4000e5e4: 01 00 00 00 nop <== NOT EXECUTED 4000e5e8: 40 00 02 df call 4000f164 <== NOT EXECUTED 4000e5ec: 92 10 20 0d mov 0xd, %o1 ! d <== NOT EXECUTED #endif if (written > 0) 4000e5f0: 10 bf ff f8 b 4000e5d0 <== NOT EXECUTED 4000e5f4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000e5f8: 10 bf ff f5 b 4000e5cc <== NOT EXECUTED 4000e5fc: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4000e600: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED 4000e604: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000e608: 40 00 0a d3 call 40011154 <== NOT EXECUTED 4000e60c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED pipe->Length += chunk; 4000e610: 10 bf ff dd b 4000e584 <== NOT EXECUTED 4000e614: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4000e618: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000e61c: 40 00 03 c3 call 4000f528 <== NOT EXECUTED 4000e620: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 4000e624: 10 bf ff de b 4000e59c <== NOT EXECUTED 4000e628: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4000e62c: 10 bf ff e3 b 4000e5b8 <== NOT EXECUTED 4000e630: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000758c : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 4000758c: 9d e3 bf 98 save %sp, -104, %sp if ( !once_control || !init_routine ) 40007590: 80 a6 60 00 cmp %i1, 0 40007594: 02 80 00 19 be 400075f8 40007598: a0 10 00 18 mov %i0, %l0 4000759c: 80 a6 20 00 cmp %i0, 0 400075a0: 02 80 00 16 be 400075f8 400075a4: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 400075a8: c2 06 20 04 ld [ %i0 + 4 ], %g1 400075ac: 80 a0 60 00 cmp %g1, 0 400075b0: 12 80 00 10 bne 400075f0 400075b4: b0 10 20 00 clr %i0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 400075b8: a2 07 bf fc add %fp, -4, %l1 400075bc: 90 10 21 00 mov 0x100, %o0 400075c0: 92 10 21 00 mov 0x100, %o1 400075c4: 40 00 03 0b call 400081f0 400075c8: 94 10 00 11 mov %l1, %o2 if ( !once_control->init_executed ) { 400075cc: c2 04 20 04 ld [ %l0 + 4 ], %g1 400075d0: 80 a0 60 00 cmp %g1, 0 400075d4: 02 80 00 0b be 40007600 400075d8: 82 10 20 01 mov 1, %g1 once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 400075dc: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED 400075e0: 94 10 00 11 mov %l1, %o2 400075e4: 92 10 21 00 mov 0x100, %o1 400075e8: 40 00 03 02 call 400081f0 400075ec: b0 10 20 00 clr %i0 } return 0; } 400075f0: 81 c7 e0 08 ret 400075f4: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 400075f8: 81 c7 e0 08 ret 400075fc: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; 40007600: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 40007604: 9f c6 40 00 call %i1 40007608: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 4000760c: 10 bf ff f5 b 400075e0 40007610: d0 07 bf fc ld [ %fp + -4 ], %o0 40007188 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 40007188: 9d e3 bf a0 save %sp, -96, %sp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 4000718c: 03 10 00 82 sethi %hi(0x40020800), %g1 40007190: c2 00 62 88 ld [ %g1 + 0x288 ], %g1 ! 40020a88 <_ISR_Nest_level> 40007194: 80 a0 60 00 cmp %g1, 0 40007198: 12 80 00 15 bne 400071ec 4000719c: 03 10 00 82 sethi %hi(0x40020800), %g1 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400071a0: 21 10 00 82 sethi %hi(0x40020800), %l0 400071a4: c6 00 61 f0 ld [ %g1 + 0x1f0 ], %g3 400071a8: c4 04 22 ac ld [ %l0 + 0x2ac ], %g2 400071ac: 86 00 e0 01 inc %g3 400071b0: c6 20 61 f0 st %g3, [ %g1 + 0x1f0 ] 400071b4: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400071b8: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 400071bc: 80 a0 a0 00 cmp %g2, 0 400071c0: 12 80 00 0d bne 400071f4 400071c4: 01 00 00 00 nop thread_support->cancelation_requested ) 400071c8: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 400071cc: 80 a0 60 00 cmp %g1, 0 400071d0: 02 80 00 09 be 400071f4 400071d4: 01 00 00 00 nop cancel = true; _Thread_Enable_dispatch(); 400071d8: 40 00 0a 38 call 40009ab8 <_Thread_Enable_dispatch> 400071dc: b2 10 3f ff mov -1, %i1 ! ffffffff if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 400071e0: f0 04 22 ac ld [ %l0 + 0x2ac ], %i0 400071e4: 40 00 19 8f call 4000d820 <_POSIX_Thread_Exit> 400071e8: 81 e8 00 00 restore 400071ec: 81 c7 e0 08 ret <== NOT EXECUTED 400071f0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 400071f4: 40 00 0a 31 call 40009ab8 <_Thread_Enable_dispatch> 400071f8: 81 e8 00 00 restore 400071fc: 01 00 00 00 nop 4001c548 : ssize_t read( int fd, void *buffer, size_t count ) { 4001c548: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001c54c: 03 10 00 78 sethi %hi(0x4001e000), %g1 4001c550: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 4001e124 4001c554: 80 a6 00 01 cmp %i0, %g1 4001c558: 1a 80 00 23 bcc 4001c5e4 4001c55c: 03 10 00 7a sethi %hi(0x4001e800), %g1 iop = rtems_libio_iop( fd ); 4001c560: e0 00 62 b8 ld [ %g1 + 0x2b8 ], %l0 ! 4001eab8 4001c564: 83 2e 20 06 sll %i0, 6, %g1 4001c568: b1 2e 20 03 sll %i0, 3, %i0 4001c56c: b0 06 00 01 add %i0, %g1, %i0 4001c570: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001c574: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001c578: 80 88 61 00 btst 0x100, %g1 4001c57c: 02 80 00 1a be 4001c5e4 4001c580: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001c584: 02 80 00 1e be 4001c5fc 4001c588: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001c58c: 02 80 00 14 be 4001c5dc 4001c590: b0 10 20 00 clr %i0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001c594: 80 88 60 02 btst 2, %g1 4001c598: 02 80 00 19 be 4001c5fc 4001c59c: 01 00 00 00 nop /* * Now process the read(). */ if ( !iop->handlers->read_h ) 4001c5a0: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001c5a4: c2 00 60 08 ld [ %g1 + 8 ], %g1 4001c5a8: 80 a0 60 00 cmp %g1, 0 4001c5ac: 02 80 00 1a be 4001c614 4001c5b0: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 4001c5b4: 94 10 00 1a mov %i2, %o2 4001c5b8: 9f c0 40 00 call %g1 4001c5bc: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001c5c0: b0 92 20 00 orcc %o0, 0, %i0 4001c5c4: 04 80 00 06 ble 4001c5dc 4001c5c8: 85 3e 20 1f sra %i0, 0x1f, %g2 iop->offset += rc; 4001c5cc: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001c5d0: 86 83 40 18 addcc %o5, %i0, %g3 4001c5d4: 84 43 00 02 addx %o4, %g2, %g2 4001c5d8: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001c5dc: 81 c7 e0 08 ret 4001c5e0: 81 e8 00 00 restore ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 4001c5e4: 7f ff d0 a1 call 40010868 <__errno> 4001c5e8: b0 10 3f ff mov -1, %i0 4001c5ec: 82 10 20 09 mov 9, %g1 4001c5f0: c2 22 00 00 st %g1, [ %o0 ] 4001c5f4: 81 c7 e0 08 ret 4001c5f8: 81 e8 00 00 restore rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001c5fc: 7f ff d0 9b call 40010868 <__errno> <== NOT EXECUTED 4001c600: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c604: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001c608: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c60c: 81 c7 e0 08 ret <== NOT EXECUTED 4001c610: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001c614: 7f ff d0 95 call 40010868 <__errno> <== NOT EXECUTED 4001c618: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c61c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001c620: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c624: 81 c7 e0 08 ret <== NOT EXECUTED 4001c628: 81 e8 00 00 restore <== NOT EXECUTED 4002c628 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 4002c628: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 4002c62c: 80 a6 60 00 cmp %i1, 0 4002c630: 02 80 00 2b be 4002c6dc 4002c634: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 4002c638: 40 00 82 b8 call 4004d118 4002c63c: 90 10 00 18 mov %i0, %o0 4002c640: a0 07 bf ec add %fp, -20, %l0 4002c644: 92 10 00 08 mov %o0, %o1 4002c648: 94 10 20 00 clr %o2 4002c64c: 90 10 00 18 mov %i0, %o0 4002c650: 96 10 00 10 mov %l0, %o3 4002c654: 98 10 20 00 clr %o4 4002c658: 7f ff 6f 24 call 400082e8 4002c65c: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 4002c660: 80 a2 20 00 cmp %o0, 0 4002c664: 12 80 00 1c bne 4002c6d4 4002c668: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 4002c66c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4002c670: 80 a0 60 00 cmp %g1, 0 4002c674: 22 80 00 31 be,a 4002c738 4002c678: 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 ){ 4002c67c: 9f c0 40 00 call %g1 4002c680: 90 10 00 10 mov %l0, %o0 4002c684: 80 a2 20 04 cmp %o0, 4 4002c688: 12 80 00 1b bne 4002c6f4 4002c68c: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 4002c690: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 4002c694: 80 a0 60 00 cmp %g1, 0 4002c698: 02 80 00 27 be 4002c734 4002c69c: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 4002c6a0: 94 10 00 1a mov %i2, %o2 4002c6a4: 9f c0 40 00 call %g1 4002c6a8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002c6ac: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002c6b0: 80 a0 60 00 cmp %g1, 0 4002c6b4: 02 80 00 08 be 4002c6d4 4002c6b8: b0 10 00 08 mov %o0, %i0 4002c6bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002c6c0: 80 a0 60 00 cmp %g1, 0 4002c6c4: 02 80 00 26 be 4002c75c 4002c6c8: 01 00 00 00 nop 4002c6cc: 9f c0 40 00 call %g1 4002c6d0: 90 10 00 10 mov %l0, %o0 return result; } 4002c6d4: 81 c7 e0 08 ret 4002c6d8: 81 e8 00 00 restore { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 4002c6dc: 40 00 67 50 call 4004641c <__errno> <== NOT EXECUTED 4002c6e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c6e4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002c6e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c6ec: 81 c7 e0 08 ret <== NOT EXECUTED 4002c6f0: 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 ); 4002c6f4: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002c6f8: 80 a0 60 00 cmp %g1, 0 4002c6fc: 02 80 00 08 be 4002c71c 4002c700: 01 00 00 00 nop 4002c704: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002c708: 80 a0 60 00 cmp %g1, 0 4002c70c: 02 80 00 04 be 4002c71c 4002c710: 01 00 00 00 nop 4002c714: 9f c0 40 00 call %g1 4002c718: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 4002c71c: 40 00 67 40 call 4004641c <__errno> 4002c720: b0 10 3f ff mov -1, %i0 4002c724: 82 10 20 16 mov 0x16, %g1 4002c728: c2 22 00 00 st %g1, [ %o0 ] 4002c72c: 81 c7 e0 08 ret 4002c730: 81 e8 00 00 restore } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 4002c734: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002c738: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c73c: 02 80 00 04 be 4002c74c <== NOT EXECUTED 4002c740: 01 00 00 00 nop <== NOT EXECUTED 4002c744: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c748: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002c74c: 40 00 67 34 call 4004641c <__errno> <== NOT EXECUTED 4002c750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c754: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002c758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c75c: 81 c7 e0 08 ret <== NOT EXECUTED 4002c760: 81 e8 00 00 restore <== NOT EXECUTED 40005994 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 40005994: 9d e3 bf a0 save %sp, -96, %sp int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 40005998: 03 10 00 8b sethi %hi(0x40022c00), %g1 4000599c: c2 00 63 54 ld [ %g1 + 0x354 ], %g1 ! 40022f54 400059a0: 80 a6 00 01 cmp %i0, %g1 400059a4: 1a 80 00 4a bcc 40005acc 400059a8: 03 10 00 90 sethi %hi(0x40024000), %g1 iop = rtems_libio_iop( fd ); 400059ac: e4 00 60 bc ld [ %g1 + 0xbc ], %l2 ! 400240bc 400059b0: 83 2e 20 06 sll %i0, 6, %g1 400059b4: b1 2e 20 03 sll %i0, 3, %i0 400059b8: b0 06 00 01 add %i0, %g1, %i0 400059bc: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 400059c0: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 400059c4: 80 88 61 00 btst 0x100, %g1 400059c8: 02 80 00 41 be 40005acc 400059cc: 80 88 60 02 btst 2, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 400059d0: 02 80 00 39 be 40005ab4 400059d4: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 400059d8: 02 80 00 37 be 40005ab4 400059dc: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 400059e0: 04 80 00 35 ble 40005ab4 400059e4: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 400059e8: 14 80 00 33 bg 40005ab4 400059ec: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 400059f0: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 400059f4: c2 00 60 08 ld [ %g1 + 8 ], %g1 400059f8: 80 a0 60 00 cmp %g1, 0 400059fc: 02 80 00 3c be 40005aec 40005a00: 86 10 20 00 clr %g3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40005a04: 84 10 00 19 mov %i1, %g2 40005a08: 88 10 20 00 clr %g4 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 40005a0c: da 00 80 00 ld [ %g2 ], %o5 40005a10: 80 a3 60 00 cmp %o5, 0 40005a14: 02 80 00 28 be 40005ab4 40005a18: 86 00 e0 01 inc %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 40005a1c: da 00 a0 04 ld [ %g2 + 4 ], %o5 40005a20: 80 a3 60 00 cmp %o5, 0 40005a24: 02 80 00 24 be 40005ab4 40005a28: 84 00 a0 08 add %g2, 8, %g2 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 40005a2c: 9a 01 00 0d add %g4, %o5, %o5 if ( total < old ) 40005a30: 80 a1 00 0d cmp %g4, %o5 40005a34: 14 80 00 20 bg 40005ab4 40005a38: 80 a6 80 03 cmp %i2, %g3 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40005a3c: 14 bf ff f4 bg 40005a0c 40005a40: 88 10 00 0d mov %o5, %g4 40005a44: a6 10 20 00 clr %l3 40005a48: 10 80 00 04 b 40005a58 40005a4c: b0 10 20 00 clr %i0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40005a50: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 <== NOT EXECUTED 40005a54: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 40005a58: d2 06 40 00 ld [ %i1 ], %o1 40005a5c: d4 06 60 04 ld [ %i1 + 4 ], %o2 40005a60: 9f c0 40 00 call %g1 40005a64: 90 10 00 12 mov %l2, %o0 if ( bytes < 0 ) 40005a68: 80 a2 20 00 cmp %o0, 0 40005a6c: 06 80 00 1e bl 40005ae4 40005a70: 01 00 00 00 nop return -1; if ( bytes > 0 ) { 40005a74: 02 80 00 07 be 40005a90 40005a78: a1 3a 20 1f sra %o0, 0x1f, %l0 iop->offset += bytes; 40005a7c: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 <== NOT EXECUTED 40005a80: 86 80 c0 08 addcc %g3, %o0, %g3 <== NOT EXECUTED total += bytes; 40005a84: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 40005a88: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 40005a8c: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 40005a90: c2 06 60 04 ld [ %i1 + 4 ], %g1 40005a94: 80 a2 00 01 cmp %o0, %g1 40005a98: 12 80 00 05 bne 40005aac 40005a9c: a6 04 e0 01 inc %l3 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40005aa0: 80 a6 80 13 cmp %i2, %l3 <== NOT EXECUTED 40005aa4: 14 bf ff eb bg 40005a50 <== NOT EXECUTED 40005aa8: b2 06 60 08 add %i1, 8, %i1 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40005aac: 81 c7 e0 08 ret 40005ab0: 81 e8 00 00 restore /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 40005ab4: 40 00 35 f2 call 4001327c <__errno> 40005ab8: b0 10 3f ff mov -1, %i0 40005abc: 82 10 20 16 mov 0x16, %g1 40005ac0: c2 22 00 00 st %g1, [ %o0 ] 40005ac4: 81 c7 e0 08 ret 40005ac8: 81 e8 00 00 restore rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 40005acc: 40 00 35 ec call 4001327c <__errno> <== NOT EXECUTED 40005ad0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005ad4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40005ad8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005adc: 81 c7 e0 08 ret <== NOT EXECUTED 40005ae0: 81 e8 00 00 restore <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40005ae4: 81 c7 e0 08 ret <== NOT EXECUTED 40005ae8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40005aec: 40 00 35 e4 call 4001327c <__errno> <== NOT EXECUTED 40005af0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005af4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40005af8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005afc: 81 c7 e0 08 ret <== NOT EXECUTED 40005b00: 81 e8 00 00 restore <== NOT EXECUTED 4001c6b0 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001c6b0: 9d e3 bf 98 save %sp, -104, %sp 4001c6b4: 21 10 00 7a sethi %hi(0x4001e800), %l0 4001c6b8: a0 14 22 c8 or %l0, 0x2c8, %l0 ! 4001eac8 4001c6bc: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 4001c6c0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 4001c6c4: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 4001ee30 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001c6c8: 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())) { 4001c6cc: 80 a0 60 03 cmp %g1, 3 4001c6d0: 02 80 00 36 be 4001c7a8 4001c6d4: c4 24 20 10 st %g2, [ %l0 + 0x10 ] } /* * Continue with realloc(). */ if ( !ptr ) 4001c6d8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4001c6dc: 02 80 00 3e be 4001c7d4 4001c6e0: 80 a6 60 00 cmp %i1, 0 return malloc( size ); if ( !size ) { 4001c6e4: 02 80 00 11 be 4001c728 4001c6e8: 23 10 00 78 sethi %hi(0x4001e000), %l1 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 4001c6ec: d0 04 61 30 ld [ %l1 + 0x130 ], %o0 ! 4001e130 4001c6f0: 92 10 00 18 mov %i0, %o1 4001c6f4: 40 00 00 75 call 4001c8c8 <_Protected_heap_Get_block_size> 4001c6f8: 94 07 bf fc add %fp, -4, %o2 4001c6fc: 80 8a 20 ff btst 0xff, %o0 4001c700: 02 80 00 0f be 4001c73c 4001c704: d0 04 61 30 ld [ %l1 + 0x130 ], %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 ) ) { 4001c708: 92 10 00 18 mov %i0, %o1 4001c70c: 40 00 00 7c call 4001c8fc <_Protected_heap_Resize_block> 4001c710: 94 10 00 19 mov %i1, %o2 4001c714: 80 8a 20 ff btst 0xff, %o0 4001c718: 02 80 00 0f be 4001c754 4001c71c: 01 00 00 00 nop memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 4001c720: 81 c7 e0 08 ret 4001c724: 81 e8 00 00 restore */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 4001c728: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001c72c: 7f ff bd 9e call 4000bda4 <== NOT EXECUTED 4001c730: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 4001c734: 81 c7 e0 08 ret <== NOT EXECUTED 4001c738: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 4001c73c: 7f ff d0 4b call 40010868 <__errno> 4001c740: b0 10 20 00 clr %i0 4001c744: 82 10 20 16 mov 0x16, %g1 4001c748: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4001c74c: 81 c7 e0 08 ret 4001c750: 81 e8 00 00 restore * 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 ); 4001c754: 7f ff bf 14 call 4000c3a4 4001c758: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001c75c: c2 04 20 04 ld [ %l0 + 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 ); 4001c760: a2 10 00 08 mov %o0, %l1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001c764: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 4001c768: 80 a2 20 00 cmp %o0, 0 4001c76c: 02 80 00 18 be 4001c7cc 4001c770: c2 24 20 04 st %g1, [ %l0 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4001c774: c2 07 bf fc ld [ %fp + -4 ], %g1 4001c778: 80 a6 40 01 cmp %i1, %g1 4001c77c: 08 80 00 03 bleu 4001c788 4001c780: 94 10 00 19 mov %i1, %o2 4001c784: 94 10 00 01 mov %g1, %o2 4001c788: 92 10 00 18 mov %i0, %o1 4001c78c: 7f ff d2 72 call 40011154 4001c790: 90 10 00 11 mov %l1, %o0 free( ptr ); 4001c794: 90 10 00 18 mov %i0, %o0 4001c798: 7f ff bd 83 call 4000bda4 4001c79c: b0 10 00 11 mov %l1, %i0 return new_area; 4001c7a0: 81 c7 e0 08 ret 4001c7a4: 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) 4001c7a8: 03 10 00 7b sethi %hi(0x4001ec00), %g1 4001c7ac: c2 00 60 90 ld [ %g1 + 0x90 ], %g1 ! 4001ec90 <_Thread_Dispatch_disable_level> 4001c7b0: 80 a0 60 00 cmp %g1, 0 4001c7b4: 12 80 00 06 bne 4001c7cc 4001c7b8: 03 10 00 7b sethi %hi(0x4001ec00), %g1 return (void *) 0; if (_ISR_Nest_level > 0) 4001c7bc: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001ed28 <_ISR_Nest_level> 4001c7c0: 80 a0 60 00 cmp %g1, 0 4001c7c4: 02 bf ff c6 be 4001c6dc 4001c7c8: 80 a6 20 00 cmp %i0, 0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 4001c7cc: 81 c7 e0 08 ret 4001c7d0: 91 e8 20 00 restore %g0, 0, %o0 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 4001c7d4: 7f ff be f4 call 4000c3a4 4001c7d8: 90 10 00 19 mov %i1, %o0 4001c7dc: 81 c7 e0 08 ret 4001c7e0: 91 e8 00 08 restore %g0, %o0, %o0 40009a38 : #include int rmdir( const char *pathname ) { 40009a38: 9d e3 bf 78 save %sp, -136, %sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 40009a3c: 7f ff f9 ca call 40008164 40009a40: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 40009a44: a0 92 20 00 orcc %o0, 0, %l0 40009a48: 32 80 00 95 bne,a 40009c9c 40009a4c: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 40009a50: c2 4e 00 00 ldsb [ %i0 ], %g1 40009a54: 80 a0 60 5c cmp %g1, 0x5c 40009a58: 02 80 00 13 be 40009aa4 40009a5c: 80 a0 60 2f cmp %g1, 0x2f 40009a60: 02 80 00 11 be 40009aa4 40009a64: 80 a0 60 00 cmp %g1, 0 40009a68: 02 80 00 10 be 40009aa8 <== NOT EXECUTED 40009a6c: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 40009a70: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED 40009a74: a2 10 20 00 clr %l1 <== NOT EXECUTED 40009a78: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40009a7c: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 40009a80: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 40009a84: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 40009a88: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 40009a8c: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED 40009a90: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40009a94: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED 40009a98: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40009a9c: 10 80 00 0f b 40009ad8 <== NOT EXECUTED 40009aa0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED 40009aa4: 03 10 01 b0 sethi %hi(0x4006c000), %g1 40009aa8: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 40009aac: a2 10 20 00 clr %l1 40009ab0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40009ab4: c4 27 bf ec st %g2, [ %fp + -20 ] 40009ab8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40009abc: c4 27 bf f0 st %g2, [ %fp + -16 ] 40009ac0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 40009ac4: c4 27 bf f4 st %g2, [ %fp + -12 ] 40009ac8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 40009acc: c4 27 bf f8 st %g2, [ %fp + -8 ] 40009ad0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40009ad4: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009ad8: c2 07 bf ec ld [ %fp + -20 ], %g1 name = pathname + parentpathlen; 40009adc: b0 06 00 10 add %i0, %l0, %i0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009ae0: c2 27 bf d8 st %g1, [ %fp + -40 ] 40009ae4: c2 07 bf f0 ld [ %fp + -16 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40009ae8: 90 10 00 18 mov %i0, %o0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009aec: c2 27 bf dc st %g1, [ %fp + -36 ] 40009af0: c2 07 bf f4 ld [ %fp + -12 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 40009af4: a0 07 bf d8 add %fp, -40, %l0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009af8: c2 27 bf e0 st %g1, [ %fp + -32 ] 40009afc: c2 07 bf f8 ld [ %fp + -8 ], %g1 40009b00: c2 27 bf e4 st %g1, [ %fp + -28 ] 40009b04: c2 07 bf fc ld [ %fp + -4 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40009b08: 40 01 0d 84 call 4004d118 40009b0c: c2 27 bf e8 st %g1, [ %fp + -24 ] 40009b10: 92 10 00 08 mov %o0, %o1 40009b14: 7f ff f9 75 call 400080e8 40009b18: 90 10 00 18 mov %i0, %o0 40009b1c: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 40009b20: 40 01 0d 7e call 4004d118 40009b24: 90 10 00 18 mov %i0, %o0 40009b28: 94 10 20 00 clr %o2 40009b2c: 92 10 00 08 mov %o0, %o1 40009b30: 96 10 00 10 mov %l0, %o3 40009b34: 90 10 00 18 mov %i0, %o0 40009b38: 7f ff f9 ab call 400081e4 40009b3c: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 40009b40: 80 a2 20 00 cmp %o0, 0 40009b44: 12 80 00 2a bne 40009bec 40009b48: c4 07 bf e4 ld [ %fp + -28 ], %g2 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40009b4c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40009b50: 80 a0 60 00 cmp %g1, 0 40009b54: 22 80 00 78 be,a 40009d34 40009b58: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 40009b5c: 9f c0 40 00 call %g1 40009b60: 90 10 00 10 mov %l0, %o0 40009b64: 80 a2 20 01 cmp %o0, 1 40009b68: 12 80 00 26 bne 40009c00 40009b6c: c2 07 bf e0 ld [ %fp + -32 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40009b70: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40009b74: 80 a0 60 00 cmp %g1, 0 40009b78: 02 80 00 53 be 40009cc4 40009b7c: a4 07 bf ec add %fp, -20, %l2 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 40009b80: 92 10 00 10 mov %l0, %o1 40009b84: 9f c0 40 00 call %g1 40009b88: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 40009b8c: c2 07 bf e4 ld [ %fp + -28 ], %g1 40009b90: 80 a0 60 00 cmp %g1, 0 40009b94: 02 80 00 08 be 40009bb4 40009b98: b0 10 00 08 mov %o0, %i0 40009b9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009ba0: 80 a0 60 00 cmp %g1, 0 40009ba4: 02 80 00 05 be 40009bb8 40009ba8: 80 8c 60 ff btst 0xff, %l1 40009bac: 9f c0 40 00 call %g1 40009bb0: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40009bb4: 80 8c 60 ff btst 0xff, %l1 40009bb8: 02 80 00 0b be 40009be4 40009bbc: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40009bc0: 80 a0 60 00 cmp %g1, 0 40009bc4: 02 80 00 5a be 40009d2c 40009bc8: 01 00 00 00 nop 40009bcc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009bd0: 80 a0 60 00 cmp %g1, 0 40009bd4: 02 80 00 56 be 40009d2c 40009bd8: 01 00 00 00 nop 40009bdc: 9f c0 40 00 call %g1 40009be0: 90 10 00 12 mov %l2, %o0 40009be4: 81 c7 e0 08 ret 40009be8: 81 e8 00 00 restore name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 40009bec: 80 8c 60 ff btst 0xff, %l1 40009bf0: 12 80 00 20 bne 40009c70 40009bf4: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 40009bf8: 81 c7 e0 08 ret 40009bfc: 91 e8 3f ff restore %g0, -1, %o0 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 40009c00: c2 07 bf e4 ld [ %fp + -28 ], %g1 40009c04: 80 a0 60 00 cmp %g1, 0 40009c08: 02 80 00 09 be 40009c2c 40009c0c: 80 8c 60 ff btst 0xff, %l1 40009c10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009c14: 80 a0 60 00 cmp %g1, 0 40009c18: 02 80 00 05 be 40009c2c 40009c1c: 80 8c 60 ff btst 0xff, %l1 40009c20: 9f c0 40 00 call %g1 40009c24: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40009c28: 80 8c 60 ff btst 0xff, %l1 40009c2c: 02 80 00 0b be 40009c58 40009c30: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40009c34: 80 a0 60 00 cmp %g1, 0 40009c38: 02 80 00 08 be 40009c58 40009c3c: 01 00 00 00 nop 40009c40: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009c44: 80 a0 60 00 cmp %g1, 0 40009c48: 02 80 00 04 be 40009c58 40009c4c: 01 00 00 00 nop 40009c50: 9f c0 40 00 call %g1 40009c54: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40009c58: 40 00 f1 f1 call 4004641c <__errno> 40009c5c: b0 10 3f ff mov -1, %i0 40009c60: 82 10 20 14 mov 0x14, %g1 40009c64: c2 22 00 00 st %g1, [ %o0 ] 40009c68: 81 c7 e0 08 ret 40009c6c: 81 e8 00 00 restore result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 40009c70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009c74: 02 bf ff dc be 40009be4 <== NOT EXECUTED 40009c78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009c7c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009c80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009c84: 02 bf ff d8 be 40009be4 <== NOT EXECUTED 40009c88: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 40009c8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009c90: 01 00 00 00 nop <== NOT EXECUTED 40009c94: 81 c7 e0 08 ret <== NOT EXECUTED 40009c98: 81 e8 00 00 restore <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 40009c9c: 92 10 00 10 mov %l0, %o1 40009ca0: 94 10 20 02 mov 2, %o2 40009ca4: 96 07 bf ec add %fp, -20, %o3 40009ca8: 7f ff f9 90 call 400082e8 40009cac: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 40009cb0: 80 a2 20 00 cmp %o0, 0 40009cb4: 12 bf ff d1 bne 40009bf8 40009cb8: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009cbc: 10 bf ff 88 b 40009adc 40009cc0: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 40009cc4: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 40009cc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009ccc: 02 80 00 09 be 40009cf0 <== NOT EXECUTED 40009cd0: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40009cd4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009cd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009cdc: 02 80 00 05 be 40009cf0 <== NOT EXECUTED 40009ce0: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40009ce4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009ce8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 40009cec: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40009cf0: 02 80 00 0b be 40009d1c <== NOT EXECUTED 40009cf4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 40009cf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009cfc: 02 80 00 08 be 40009d1c <== NOT EXECUTED 40009d00: 01 00 00 00 nop <== NOT EXECUTED 40009d04: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009d08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009d0c: 02 80 00 04 be 40009d1c <== NOT EXECUTED 40009d10: 01 00 00 00 nop <== NOT EXECUTED 40009d14: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009d18: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009d1c: 40 00 f1 c0 call 4004641c <__errno> <== NOT EXECUTED 40009d20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009d24: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009d28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009d2c: 81 c7 e0 08 ret <== NOT EXECUTED 40009d30: 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 ); 40009d34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009d38: 12 bf ff eb bne 40009ce4 <== NOT EXECUTED 40009d3c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40009d40: 30 bf ff ec b,a 40009cf0 <== NOT EXECUTED 40016c6c : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 40016c6c: 11 10 00 a7 sethi %hi(0x40029c00), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40016c70: 81 c3 e0 08 retl <== NOT EXECUTED 40016c74: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 40029dc0 <== NOT EXECUTED 40012f5c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40012f5c: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40012f60: 90 10 00 18 mov %i0, %o0 40012f64: 40 00 00 0b call 40012f90 40012f68: 92 10 00 19 mov %i1, %o1 if (nap) 40012f6c: 80 a2 20 00 cmp %o0, 0 40012f70: 02 80 00 05 be 40012f84 40012f74: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 40012f78: f0 02 00 00 ld [ %o0 ], %i0 40012f7c: 81 c7 e0 08 ret 40012f80: 81 e8 00 00 restore nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 40012f84: 40 00 0f 3a call 40016c6c <== NOT EXECUTED 40012f88: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40012f8c: 01 00 00 00 nop 400107b8 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 400107b8: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 400107bc: d0 06 00 00 ld [ %i0 ], %o0 400107c0: 80 a2 20 00 cmp %o0, 0 400107c4: 02 80 00 1d be 40010838 400107c8: 13 10 00 76 sethi %hi(0x4001d800), %o1 400107cc: 40 00 03 8d call 40011600 400107d0: 92 12 61 40 or %o1, 0x140, %o1 ! 4001d940 <__FUNCTION__.5918+0x18> 400107d4: 80 a2 20 00 cmp %o0, 0 400107d8: 02 80 00 11 be 4001081c 400107dc: 84 10 20 00 clr %g2 default_ap = ap++; for ( ; ap->name; ap++) if (ap->local_value == local_value) 400107e0: c2 06 20 04 ld [ %i0 + 4 ], %g1 400107e4: 80 a0 40 19 cmp %g1, %i1 400107e8: 32 80 00 07 bne,a 40010804 400107ec: b0 06 20 0c add %i0, 0xc, %i0 400107f0: 30 80 00 14 b,a 40010840 400107f4: 80 a0 40 19 cmp %g1, %i1 400107f8: 02 80 00 12 be 40010840 400107fc: 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++) 40010800: b0 06 20 0c add %i0, 0xc, %i0 40010804: c2 06 00 00 ld [ %i0 ], %g1 40010808: 80 a0 60 00 cmp %g1, 0 4001080c: 32 bf ff fa bne,a 400107f4 40010810: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (ap->local_value == local_value) return ap; return default_ap; } 40010814: 81 c7 e0 08 ret 40010818: 91 e8 00 02 restore %g0, %g2, %o0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4001081c: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 40010820: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40010824: 02 80 00 07 be 40010840 <== NOT EXECUTED 40010828: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED 4001082c: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 40010830: 10 bf ff ec b 400107e0 <== NOT EXECUTED 40010834: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 40010838: 81 c7 e0 08 ret <== NOT EXECUTED 4001083c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40010840: 81 c7 e0 08 ret 40010844: 81 e8 00 00 restore 4000eebc : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000eebc: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000eec0: d0 06 00 00 ld [ %i0 ], %o0 4000eec4: 80 a2 20 00 cmp %o0, 0 4000eec8: 02 80 00 1d be 4000ef3c 4000eecc: 13 10 00 76 sethi %hi(0x4001d800), %o1 4000eed0: 40 00 09 cc call 40011600 4000eed4: 92 12 61 40 or %o1, 0x140, %o1 ! 4001d940 <__FUNCTION__.5918+0x18> 4000eed8: 80 a2 20 00 cmp %o0, 0 4000eedc: 02 80 00 11 be 4000ef20 4000eee0: 84 10 20 00 clr %g2 default_ap = ap++; for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4000eee4: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000eee8: 80 a0 40 19 cmp %g1, %i1 4000eeec: 32 80 00 07 bne,a 4000ef08 4000eef0: b0 06 20 0c add %i0, 0xc, %i0 4000eef4: 30 80 00 14 b,a 4000ef44 4000eef8: 80 a0 40 19 cmp %g1, %i1 4000eefc: 02 80 00 12 be 4000ef44 4000ef00: 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++) 4000ef04: b0 06 20 0c add %i0, 0xc, %i0 4000ef08: c2 06 00 00 ld [ %i0 ], %g1 4000ef0c: 80 a0 60 00 cmp %g1, 0 4000ef10: 32 bf ff fa bne,a 4000eef8 4000ef14: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000ef18: 81 c7 e0 08 ret 4000ef1c: 91 e8 00 02 restore %g0, %g2, %o0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000ef20: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 4000ef24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000ef28: 02 80 00 07 be 4000ef44 <== NOT EXECUTED 4000ef2c: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED 4000ef30: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000ef34: 10 bf ff ec b 4000eee4 <== NOT EXECUTED 4000ef38: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000ef3c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ef40: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ef44: 81 c7 e0 08 ret 4000ef48: 81 e8 00 00 restore 4000fe00 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000fe00: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000fe04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000fe08: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fe0c: 40 00 02 6b call 400107b8 <== NOT EXECUTED 4000fe10: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000fe14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fe18: 32 80 00 02 bne,a 4000fe20 <== NOT EXECUTED 4000fe1c: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000fe20: 81 c7 e0 08 ret <== NOT EXECUTED 4000fe24: 81 e8 00 00 restore <== NOT EXECUTED 4000345c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 4000345c: 9d e3 bf a0 save %sp, -96, %sp const char *p; if ( !name ) 40003460: 80 a6 20 00 cmp %i0, 0 40003464: 12 80 00 05 bne 40003478 40003468: 80 a6 60 00 cmp %i1, 0 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 4000347c: 80 a6 a0 00 cmp %i2, 0 return NULL; if ( !length ) 40003480: 22 bf ff fc be,a 40003470 40003484: b2 10 20 00 clr %i1 return NULL; value[0] = '\0'; 40003488: c0 2e 40 00 clrb [ %i1 ] p = rtems_bsp_cmdline_get_param_raw( name ); 4000348c: 40 00 00 25 call 40003520 40003490: 90 10 00 18 mov %i0, %o0 if ( !p ) 40003494: 80 a2 20 00 cmp %o0, 0 40003498: 22 bf ff f6 be,a 40003470 4000349c: b2 10 20 00 clr %i1 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 400034b0: b4 86 bf ff addcc %i2, -1, %i2 400034b4: 02 bf ff ef be 40003470 400034b8: 88 10 20 00 clr %g4 400034bc: 82 10 20 00 clr %g1 400034c0: 10 80 00 12 b 40003508 400034c4: 9a 10 20 00 clr %o5 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 400034c8: 32 80 00 06 bne,a 400034e0 400034cc: c6 2e 40 04 stb %g3, [ %i1 + %g4 ] <== NOT EXECUTED 400034d0: 80 a0 a0 20 cmp %g2, 0x20 400034d4: 02 bf ff e7 be 40003470 400034d8: 01 00 00 00 nop break; value[i++] = *p++; 400034dc: c6 2e 40 04 stb %g3, [ %i1 + %g4 ] 400034e0: 82 00 60 01 inc %g1 value[i] = '\0'; 400034e4: c0 2e 40 01 clrb [ %i1 + %g1 ] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 400034f8: 88 10 00 01 mov %g1, %g4 400034fc: 80 a0 40 1a cmp %g1, %i2 40003500: 1a bf ff dc bcc 40003470 40003504: 01 00 00 00 nop if ( *p == '\"' ) { 40003508: 85 38 a0 18 sra %g2, 0x18, %g2 4000350c: 80 a0 a0 22 cmp %g2, 0x22 40003510: 12 bf ff ee bne 400034c8 40003514: 80 8b 60 01 btst 1, %o5 quotes++; 40003518: 10 bf ff f1 b 400034dc <== NOT EXECUTED 4000351c: 9a 03 60 01 inc %o5 <== NOT EXECUTED 40003554 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 40003554: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 40003558: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000355c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003560: 7f ff ff bf call 4000345c <== NOT EXECUTED 40003564: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if ( !p ) 40003568: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000356c: 12 80 00 05 bne 40003580 <== NOT EXECUTED 40003570: 01 00 00 00 nop <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 40003574: b2 10 20 00 clr %i1 ! 0 <== NOT EXECUTED } 40003578: 81 c7 e0 08 ret <== NOT EXECUTED 4000357c: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 40003580: 40 00 39 c0 call 40011c80 <== NOT EXECUTED 40003584: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( *rhs != '=' ) 40003588: c2 4c 40 08 ldsb [ %l1 + %o0 ], %g1 <== NOT EXECUTED 4000358c: 80 a0 60 3d cmp %g1, 0x3d <== NOT EXECUTED 40003590: 12 bf ff f9 bne 40003574 <== NOT EXECUTED 40003594: a2 04 40 08 add %l1, %o0, %l1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 40003598: c6 0c 60 01 ldub [ %l1 + 1 ], %g3 <== NOT EXECUTED 4000359c: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED 400035a0: 89 38 a0 18 sra %g2, 0x18, %g4 <== NOT EXECUTED 400035a4: 80 a1 20 22 cmp %g4, 0x22 <== NOT EXECUTED 400035a8: 02 80 00 14 be 400035f8 <== NOT EXECUTED 400035ac: 82 04 60 01 add %l1, 1, %g1 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) 400035b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400035b4: 02 80 00 09 be 400035d8 <== NOT EXECUTED 400035b8: 84 10 00 19 mov %i1, %g2 <== NOT EXECUTED *d++ = *rhs++; 400035bc: c6 28 80 00 stb %g3, [ %g2 ] <== NOT EXECUTED 400035c0: 82 00 60 01 inc %g1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 400035c4: c6 48 40 00 ldsb [ %g1 ], %g3 <== NOT EXECUTED *d++ = *rhs++; 400035c8: 84 00 a0 01 inc %g2 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 400035cc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400035d0: 12 bf ff fb bne 400035bc <== NOT EXECUTED 400035d4: c6 08 40 00 ldub [ %g1 ], %g3 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 400035d8: c6 48 bf ff ldsb [ %g2 + -1 ], %g3 <== NOT EXECUTED 400035dc: 80 a0 e0 22 cmp %g3, 0x22 <== NOT EXECUTED 400035e0: 02 80 00 03 be 400035ec <== NOT EXECUTED 400035e4: 82 00 bf ff add %g2, -1, %g1 <== NOT EXECUTED 400035e8: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED d--; *d = '\0'; 400035ec: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED return value; } 400035f0: 81 c7 e0 08 ret <== NOT EXECUTED 400035f4: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 400035f8: c6 0c 60 02 ldub [ %l1 + 2 ], %g3 <== NOT EXECUTED 400035fc: 82 04 60 02 add %l1, 2, %g1 <== NOT EXECUTED 40003600: 10 bf ff ec b 400035b0 <== NOT EXECUTED 40003604: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED 40003e34 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003e34: 9d e3 bf 60 save %sp, -160, %sp Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40003e38: 80 a6 60 00 cmp %i1, 0 40003e3c: 02 80 00 72 be 40004004 40003e40: 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. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 40003e44: 40 00 15 f4 call 40009614 <_TOD_Get_uptime> 40003e48: 90 07 bf f0 add %fp, -16, %o0 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40003e4c: 92 07 bf f0 add %fp, -16, %o1 40003e50: a8 07 bf e8 add %fp, -24, %l4 40003e54: 11 10 00 b5 sethi %hi(0x4002d400), %o0 40003e58: 94 10 00 14 mov %l4, %o2 40003e5c: 40 00 20 80 call 4000c05c <_Timespec_Subtract> 40003e60: 90 12 21 f8 or %o0, 0x1f8, %o0 } } } #endif (*print)( 40003e64: 90 10 00 18 mov %i0, %o0 40003e68: 13 10 00 8a sethi %hi(0x40022800), %o1 40003e6c: 37 10 00 b3 sethi %hi(0x4002cc00), %i3 40003e70: 92 12 60 50 or %o1, 0x50, %o1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003e74: 3b 10 00 8a sethi %hi(0x40022800), %i5 /* * 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 ) { 40003e78: 2f 10 00 b4 sethi %hi(0x4002d000), %l7 } } } #endif (*print)( 40003e7c: 9f c6 40 00 call %i1 40003e80: 2d 10 00 8a sethi %hi(0x40022800), %l6 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003e84: a4 07 bf c8 add %fp, -56, %l2 } } } #endif (*print)( 40003e88: b6 16 e3 94 or %i3, 0x394, %i3 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003e8c: ba 17 61 c8 or %i5, 0x1c8, %i5 /* * 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 ) { 40003e90: ae 15 e0 ec or %l7, 0xec, %l7 /* * Print the information */ (*print)( context, 40003e94: ac 15 a1 e0 or %l6, 0x1e0, %l6 40003e98: a6 07 bf e0 add %fp, -32, %l3 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40003e9c: aa 07 bf fc add %fp, -4, %l5 40003ea0: b8 07 bf f8 add %fp, -8, %i4 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 40003ea4: b4 07 bf d8 add %fp, -40, %i2 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40003ea8: c2 06 c0 00 ld [ %i3 ], %g1 40003eac: 80 a0 60 00 cmp %g1, 0 40003eb0: 22 80 00 47 be,a 40003fcc 40003eb4: b6 06 e0 04 add %i3, 4, %i3 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40003eb8: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40003ebc: 80 a4 60 00 cmp %l1, 0 40003ec0: 22 80 00 43 be,a 40003fcc 40003ec4: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40003ec8: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40003ecc: 86 90 60 00 orcc %g1, 0, %g3 40003ed0: 02 80 00 3e be 40003fc8 40003ed4: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40003ed8: 10 80 00 17 b 40003f34 40003edc: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40003ee0: 96 10 00 1c mov %i4, %o3 40003ee4: 90 10 00 13 mov %l3, %o0 40003ee8: 40 00 1f cb call 4000be14 <_Timespec_Divide> 40003eec: 92 10 00 14 mov %l4, %o1 /* * Print the information */ (*print)( context, 40003ef0: d0 07 bf e4 ld [ %fp + -28 ], %o0 40003ef4: 40 00 6d 16 call 4001f34c <.udiv> 40003ef8: 92 10 23 e8 mov 0x3e8, %o1 40003efc: d4 07 bf e0 ld [ %fp + -32 ], %o2 40003f00: d8 07 bf fc ld [ %fp + -4 ], %o4 40003f04: da 07 bf f8 ld [ %fp + -8 ], %o5 40003f08: 96 10 00 08 mov %o0, %o3 40003f0c: 92 10 00 16 mov %l6, %o1 40003f10: 9f c6 40 00 call %i1 40003f14: 90 10 00 18 mov %i0, %o0 40003f18: 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++ ) { 40003f1c: 83 28 e0 10 sll %g3, 0x10, %g1 40003f20: 83 30 60 10 srl %g1, 0x10, %g1 40003f24: 80 a0 40 10 cmp %g1, %l0 40003f28: 2a 80 00 29 bcs,a 40003fcc 40003f2c: b6 06 e0 04 add %i3, 4, %i3 the_thread = (Thread_Control *)information->local_table[ i ]; 40003f30: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40003f34: 83 2c 20 02 sll %l0, 2, %g1 40003f38: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003f3c: 94 10 00 12 mov %l2, %o2 40003f40: 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 ) 40003f44: 80 a0 60 00 cmp %g1, 0 40003f48: 02 bf ff f5 be 40003f1c 40003f4c: a0 04 20 01 inc %l0 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003f50: d0 00 60 08 ld [ %g1 + 8 ], %o0 40003f54: 40 00 10 83 call 40008160 40003f58: c2 27 bf c4 st %g1, [ %fp + -60 ] (*print)( 40003f5c: c2 07 bf c4 ld [ %fp + -60 ], %g1 40003f60: 90 10 00 18 mov %i0, %o0 40003f64: d4 00 60 08 ld [ %g1 + 8 ], %o2 40003f68: 92 10 00 1d mov %i5, %o1 40003f6c: 9f c6 40 00 call %i1 40003f70: 96 10 00 12 mov %l2, %o3 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40003f74: c2 07 bf c4 ld [ %fp + -60 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003f78: c4 05 c0 00 ld [ %l7 ], %g2 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40003f7c: c6 00 60 84 ld [ %g1 + 0x84 ], %g3 40003f80: c6 27 bf e0 st %g3, [ %fp + -32 ] 40003f84: c6 00 60 88 ld [ %g1 + 0x88 ], %g3 40003f88: c6 27 bf e4 st %g3, [ %fp + -28 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003f8c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 40003f90: c2 00 60 08 ld [ %g1 + 8 ], %g1 40003f94: 80 a0 80 01 cmp %g2, %g1 40003f98: 32 bf ff d2 bne,a 40003ee0 40003f9c: 94 10 00 15 mov %l5, %o2 Timestamp_Control used; _Timestamp_Subtract( 40003fa0: 92 07 bf f0 add %fp, -16, %o1 40003fa4: 94 10 00 1a mov %i2, %o2 40003fa8: 11 10 00 b4 sethi %hi(0x4002d000), %o0 40003fac: 40 00 20 2c call 4000c05c <_Timespec_Subtract> 40003fb0: 90 12 20 f4 or %o0, 0xf4, %o0 ! 4002d0f4 <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 40003fb4: 90 10 00 13 mov %l3, %o0 40003fb8: 40 00 1f 7e call 4000bdb0 <_Timespec_Add_to> 40003fbc: 92 10 00 1a mov %i2, %o1 }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40003fc0: 10 bf ff c8 b 40003ee0 40003fc4: 94 10 00 15 mov %l5, %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++ ) { 40003fc8: b6 06 e0 04 add %i3, 4, %i3 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 40003fcc: 03 10 00 b3 sethi %hi(0x4002cc00), %g1 40003fd0: 82 10 63 a4 or %g1, 0x3a4, %g1 ! 4002cfa4 <_Objects_Information_table+0x14> 40003fd4: 80 a6 c0 01 cmp %i3, %g1 40003fd8: 32 bf ff b5 bne,a 40003eac 40003fdc: c2 06 c0 00 ld [ %i3 ], %g1 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 40003fe0: d0 07 bf ec ld [ %fp + -20 ], %o0 40003fe4: 40 00 6c da call 4001f34c <.udiv> 40003fe8: 92 10 23 e8 mov 0x3e8, %o1 40003fec: d4 07 bf e8 ld [ %fp + -24 ], %o2 40003ff0: 96 10 00 08 mov %o0, %o3 40003ff4: 13 10 00 8a sethi %hi(0x40022800), %o1 40003ff8: 90 10 00 18 mov %i0, %o0 40003ffc: 9f c6 40 00 call %i1 40004000: 92 12 61 f8 or %o1, 0x1f8, %o1 40004004: 81 c7 e0 08 ret 40004008: 81 e8 00 00 restore 4000fdcc : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4000fdcc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000fdd0: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000fdd4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000fdd8: 40 00 00 0a call 4000fe00 <== NOT EXECUTED 4000fddc: 90 12 21 ec or %o0, 0x1ec, %o0 <== NOT EXECUTED 4000fde0: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000fde4: 02 80 00 05 be 4000fdf8 <== NOT EXECUTED 4000fde8: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000fdec: 40 00 02 9f call 40010868 <__errno> <== NOT EXECUTED 4000fdf0: 01 00 00 00 nop <== NOT EXECUTED 4000fdf4: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000fdf8: 81 c7 e0 08 ret <== NOT EXECUTED 4000fdfc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40008b40 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 40008b40: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40008b44: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 40008b48: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008b4c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008b50: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008b54: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 40008b58: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008b5c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008b60: 7f ff ff 7e call 40008958 <== NOT EXECUTED 40008b64: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40008b68: 81 c7 e0 08 ret <== NOT EXECUTED 40008b6c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003268 : } int rtems_filesystem_dirname( const char *pathname ) { 40003268: 9d e3 bf a0 save %sp, -96, %sp int len = strlen( pathname ); 4000326c: 40 00 39 36 call 40011744 40003270: 90 10 00 18 mov %i0, %o0 while ( len ) { 40003274: 80 a2 20 00 cmp %o0, 0 40003278: 02 80 00 19 be 400032dc 4000327c: 84 10 00 08 mov %o0, %g2 len--; 40003280: 90 02 3f ff add %o0, -1, %o0 if ( rtems_filesystem_is_separator( pathname[len] ) ) 40003284: c2 4e 00 08 ldsb [ %i0 + %o0 ], %g1 40003288: 80 a0 60 5c cmp %g1, 0x5c 4000328c: 02 80 00 14 be 400032dc 40003290: 80 a0 60 2f cmp %g1, 0x2f 40003294: 02 80 00 12 be 400032dc 40003298: 80 a0 60 00 cmp %g1, 0 4000329c: 12 80 00 09 bne 400032c0 400032a0: a0 06 00 02 add %i0, %g2, %l0 break; } return len; } 400032a4: 81 c7 e0 08 ret <== NOT EXECUTED 400032a8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { int len = strlen( pathname ); while ( len ) { len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 400032ac: 80 a0 60 2f cmp %g1, 0x2f 400032b0: 02 80 00 0b be 400032dc 400032b4: 80 a0 60 00 cmp %g1, 0 400032b8: 02 80 00 09 be 400032dc 400032bc: a0 04 3f ff add %l0, -1, %l0 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 400032c0: 80 a2 20 00 cmp %o0, 0 400032c4: 02 80 00 07 be 400032e0 400032c8: b0 10 00 08 mov %o0, %i0 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 400032cc: c2 4c 3f fe ldsb [ %l0 + -2 ], %g1 400032d0: 80 a0 60 5c cmp %g1, 0x5c 400032d4: 12 bf ff f6 bne 400032ac 400032d8: 90 02 3f ff add %o0, -1, %o0 break; } return len; } 400032dc: b0 10 00 08 mov %o0, %i0 400032e0: 81 c7 e0 08 ret 400032e4: 81 e8 00 00 restore 400033ec : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 400033ec: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 400033f0: 80 a6 20 00 cmp %i0, 0 400033f4: 02 80 00 33 be 400034c0 400033f8: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 400033fc: 22 80 00 2b be,a 400034a8 40003400: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40003404: c2 4e 00 00 ldsb [ %i0 ], %g1 40003408: 80 a0 60 5c cmp %g1, 0x5c 4000340c: 02 80 00 06 be 40003424 40003410: 80 a0 60 2f cmp %g1, 0x2f 40003414: 02 80 00 04 be 40003424 40003418: 80 a0 60 00 cmp %g1, 0 4000341c: 12 80 00 13 bne 40003468 40003420: 03 10 00 78 sethi %hi(0x4001e000), %g1 40003424: 03 10 00 78 sethi %hi(0x4001e000), %g1 40003428: c4 00 62 38 ld [ %g1 + 0x238 ], %g2 ! 4001e238 4000342c: 86 10 20 01 mov 1, %g3 40003430: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4 40003434: 82 10 20 01 mov 1, %g1 40003438: c8 26 c0 00 st %g4, [ %i3 ] 4000343c: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4 40003440: c8 26 e0 04 st %g4, [ %i3 + 4 ] 40003444: c8 00 a0 20 ld [ %g2 + 0x20 ], %g4 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 40003448: b2 26 40 01 sub %i1, %g1, %i1 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 4000344c: c8 26 e0 08 st %g4, [ %i3 + 8 ] 40003450: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4 40003454: c8 26 e0 0c st %g4, [ %i3 + 0xc ] 40003458: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2 4000345c: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 40003460: 7f ff ff a2 call 400032e8 40003464: 91 ee 00 03 restore %i0, %g3, %o0 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40003468: c4 00 62 38 ld [ %g1 + 0x238 ], %g2 4000346c: 86 10 20 00 clr %g3 40003470: c8 00 a0 04 ld [ %g2 + 4 ], %g4 40003474: 82 10 20 00 clr %g1 40003478: c8 26 c0 00 st %g4, [ %i3 ] 4000347c: c8 00 a0 08 ld [ %g2 + 8 ], %g4 40003480: c8 26 e0 04 st %g4, [ %i3 + 4 ] 40003484: c8 00 a0 0c ld [ %g2 + 0xc ], %g4 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 40003488: b2 26 40 01 sub %i1, %g1, %i1 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 4000348c: c8 26 e0 08 st %g4, [ %i3 + 8 ] 40003490: c8 00 a0 10 ld [ %g2 + 0x10 ], %g4 40003494: c8 26 e0 0c st %g4, [ %i3 + 0xc ] 40003498: c4 00 a0 14 ld [ %g2 + 0x14 ], %g2 4000349c: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 400034a0: 7f ff ff 92 call 400032e8 400034a4: 91 ee 00 03 restore %i0, %g3, %o0 if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400034a8: 40 00 34 f0 call 40010868 <__errno> <== NOT EXECUTED 400034ac: 01 00 00 00 nop <== NOT EXECUTED 400034b0: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 400034b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 400034b8: 81 c7 e0 08 ret <== NOT EXECUTED 400034bc: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 400034c0: 40 00 34 ea call 40010868 <__errno> 400034c4: b0 10 3f ff mov -1, %i0 400034c8: 82 10 20 0e mov 0xe, %g1 400034cc: c2 22 00 00 st %g1, [ %o0 ] 400034d0: 81 c7 e0 08 ret 400034d4: 81 e8 00 00 restore 400032e8 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 400032e8: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 400032ec: 80 a6 20 00 cmp %i0, 0 400032f0: 02 80 00 33 be 400033bc 400032f4: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 400032f8: 02 80 00 37 be 400033d4 400032fc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 40003300: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 40003304: c2 00 40 00 ld [ %g1 ], %g1 40003308: 80 a0 60 00 cmp %g1, 0 4000330c: 02 80 00 26 be 400033a4 40003310: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 40003314: 92 10 00 19 mov %i1, %o1 40003318: 94 10 00 1a mov %i2, %o2 4000331c: 9f c0 40 00 call %g1 40003320: 96 10 00 1b mov %i3, %o3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 40003324: b0 92 20 00 orcc %o0, 0, %i0 40003328: 12 80 00 0f bne 40003364 4000332c: 80 a7 20 00 cmp %i4, 0 40003330: 02 80 00 2d be 400033e4 40003334: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40003338: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 4000333c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40003340: 80 a0 60 00 cmp %g1, 0 40003344: 22 80 00 13 be,a 40003390 40003348: 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 ); 4000334c: 9f c0 40 00 call %g1 40003350: 90 10 00 1b mov %i3, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 40003354: 90 02 3f fd add %o0, -3, %o0 40003358: 80 a2 20 01 cmp %o0, 1 4000335c: 28 80 00 04 bleu,a 4000336c 40003360: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 40003364: 81 c7 e0 08 ret 40003368: 81 e8 00 00 restore type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 4000336c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40003370: 80 a0 60 00 cmp %g1, 0 40003374: 02 80 00 06 be 4000338c 40003378: 90 10 00 1b mov %i3, %o0 * 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 ); 4000337c: 9f c0 40 00 call %g1 40003380: 92 10 00 1a mov %i2, %o1 } } return result; } 40003384: 81 c7 e0 08 ret 40003388: 91 e8 00 08 restore %g0, %o0, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 4000338c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40003390: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003394: 02 80 00 04 be 400033a4 <== NOT EXECUTED 40003398: 01 00 00 00 nop <== NOT EXECUTED 4000339c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400033a0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400033a4: 40 00 35 31 call 40010868 <__errno> <== NOT EXECUTED 400033a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033ac: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400033b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033b4: 81 c7 e0 08 ret <== NOT EXECUTED 400033b8: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 400033bc: 40 00 35 2b call 40010868 <__errno> <== NOT EXECUTED 400033c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033c4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400033c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033cc: 81 c7 e0 08 ret <== NOT EXECUTED 400033d0: 81 e8 00 00 restore <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400033d4: 40 00 35 25 call 40010868 <__errno> <== NOT EXECUTED 400033d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033dc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 400033e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033e4: 81 c7 e0 08 ret 400033e8: 81 e8 00 00 restore 40003090 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 40003090: 9d e3 bf 88 save %sp, -120, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 40003094: 21 10 00 78 sethi %hi(0x4001e000), %l0 40003098: c2 04 22 38 ld [ %l0 + 0x238 ], %g1 ! 4001e238 4000309c: 84 10 20 12 mov 0x12, %g2 init_fs_mount_table(); 400030a0: 40 00 01 ed call 40003854 400030a4: c4 30 60 2c sth %g2, [ %g1 + 0x2c ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 400030a8: 03 10 00 73 sethi %hi(0x4001cc00), %g1 400030ac: c2 00 62 4c ld [ %g1 + 0x24c ], %g1 ! 4001ce4c 400030b0: 80 a0 60 00 cmp %g1, 0 400030b4: 02 80 00 45 be 400031c8 400030b8: 03 10 00 78 sethi %hi(0x4001e000), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 400030bc: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 4001e12c status = mount( 400030c0: 90 07 bf fc add %fp, -4, %o0 400030c4: d8 00 60 0c ld [ %g1 + 0xc ], %o4 400030c8: d2 00 40 00 ld [ %g1 ], %o1 400030cc: d4 00 60 04 ld [ %g1 + 4 ], %o2 400030d0: 40 00 01 e9 call 40003874 400030d4: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 400030d8: 80 a2 3f ff cmp %o0, -1 400030dc: 02 80 00 40 be 400031dc 400030e0: c4 07 bf fc ld [ %fp + -4 ], %g2 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 400030e4: c2 04 22 38 ld [ %l0 + 0x238 ], %g1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 400030e8: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 400030ec: c0 30 60 2e clrh [ %g1 + 0x2e ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 400030f0: c6 20 60 18 st %g3, [ %g1 + 0x18 ] 400030f4: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 400030f8: a4 07 bf e8 add %fp, -24, %l2 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 400030fc: c6 20 60 1c st %g3, [ %g1 + 0x1c ] 40003100: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003104: 23 10 00 74 sethi %hi(0x4001d000), %l1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40003108: c6 20 60 20 st %g3, [ %g1 + 0x20 ] 4000310c: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003110: 92 10 20 01 mov 1, %o1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40003114: c6 20 60 24 st %g3, [ %g1 + 0x24 ] 40003118: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4000311c: 94 10 20 00 clr %o2 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40003120: c4 20 60 28 st %g2, [ %g1 + 0x28 ] /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003124: 96 10 00 12 mov %l2, %o3 40003128: 98 10 20 00 clr %o4 4000312c: 40 00 00 b0 call 400033ec 40003130: 90 14 62 40 or %l1, 0x240, %o0 rtems_filesystem_root = loc; 40003134: c2 04 22 38 ld [ %l0 + 0x238 ], %g1 40003138: c4 07 bf e8 ld [ %fp + -24 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4000313c: 96 10 00 12 mov %l2, %o3 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 40003140: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 40003144: c4 07 bf ec ld [ %fp + -20 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003148: 92 10 20 01 mov 1, %o1 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4000314c: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 40003150: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003154: 94 10 20 00 clr %o2 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 40003158: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4000315c: c4 07 bf f4 ld [ %fp + -12 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003160: 98 10 20 00 clr %o4 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 40003164: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 40003168: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4000316c: 90 14 62 40 or %l1, 0x240, %o0 40003170: 40 00 00 9f call 400033ec 40003174: c4 20 60 28 st %g2, [ %g1 + 0x28 ] rtems_filesystem_current = loc; 40003178: c4 07 bf e8 ld [ %fp + -24 ], %g2 4000317c: c2 04 22 38 ld [ %l0 + 0x238 ], %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); 40003180: 11 10 00 74 sethi %hi(0x4001d000), %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 40003184: c4 20 60 04 st %g2, [ %g1 + 4 ] 40003188: c4 07 bf ec ld [ %fp + -20 ], %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); 4000318c: 90 12 22 48 or %o0, 0x248, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 40003190: c4 20 60 08 st %g2, [ %g1 + 8 ] 40003194: 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); 40003198: 92 10 21 ff mov 0x1ff, %o1 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 4000319c: c4 20 60 0c st %g2, [ %g1 + 0xc ] 400031a0: c4 07 bf f4 ld [ %fp + -12 ], %g2 400031a4: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 400031a8: c4 07 bf f8 ld [ %fp + -8 ], %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); 400031ac: 40 00 01 3f call 400036a8 400031b0: c4 20 60 14 st %g2, [ %g1 + 0x14 ] if ( status != 0 ) 400031b4: 80 a2 20 00 cmp %o0, 0 400031b8: 12 80 00 07 bne 400031d4 400031bc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 400031c0: 81 c7 e0 08 ret 400031c4: 81 e8 00 00 restore /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 400031c8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 400031cc: 40 00 10 4f call 40007308 <== NOT EXECUTED 400031d0: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 400031d4: 40 00 10 4d call 40007308 <== NOT EXECUTED 400031d8: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 400031dc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 400031e0: 40 00 10 4a call 40007308 <== NOT EXECUTED 400031e4: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 400031e8: 01 00 00 00 nop 4000c080 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4000c080: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000c084: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 4000c088: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 4000c08c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4000c090: 81 c3 e0 08 retl <== NOT EXECUTED 4000c094: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 400031ec : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 400031ec: 82 10 00 08 mov %o0, %g1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 400031f0: 80 a2 60 00 cmp %o1, 0 400031f4: 12 80 00 04 bne 40003204 400031f8: c4 0a 00 00 ldub [ %o0 ], %g2 pathname++; pathnamelen--; stripped++; } return stripped; } 400031fc: 81 c3 e0 08 retl <== NOT EXECUTED 40003200: 90 10 20 00 clr %o0 <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 40003204: 85 28 a0 18 sll %g2, 0x18, %g2 40003208: 85 38 a0 18 sra %g2, 0x18, %g2 4000320c: 80 a0 a0 00 cmp %g2, 0 40003210: 02 80 00 14 be 40003260 40003214: 90 10 20 00 clr %o0 40003218: 80 a0 a0 5c cmp %g2, 0x5c 4000321c: 02 80 00 04 be 4000322c 40003220: 80 a0 a0 2f cmp %g2, 0x2f 40003224: 12 80 00 0f bne 40003260 40003228: 01 00 00 00 nop { pathname++; pathnamelen--; stripped++; 4000322c: 90 02 20 01 inc %o0 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 40003230: 80 a2 40 08 cmp %o1, %o0 40003234: 02 80 00 0b be 40003260 40003238: c4 08 40 08 ldub [ %g1 + %o0 ], %g2 4000323c: 85 28 a0 18 sll %g2, 0x18, %g2 40003240: 85 38 a0 18 sra %g2, 0x18, %g2 40003244: 80 a0 a0 00 cmp %g2, 0 40003248: 02 80 00 06 be 40003260 4000324c: 80 a0 a0 5c cmp %g2, 0x5c 40003250: 02 bf ff f7 be 4000322c 40003254: 80 a0 a0 2f cmp %g2, 0x2f 40003258: 22 bf ff f6 be,a 40003230 4000325c: 90 02 20 01 inc %o0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 40003260: 81 c3 e0 08 retl 40003264: 01 00 00 00 nop 40002f00 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40002f00: 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, strlen( name ), 0x00, &loc, true ); 40002f04: 40 00 3a 10 call 40011744 <== NOT EXECUTED 40002f08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002f0c: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40002f10: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40002f14: 94 10 20 00 clr %o2 <== NOT EXECUTED 40002f18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002f1c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40002f20: 40 00 01 33 call 400033ec <== NOT EXECUTED 40002f24: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002f28: c4 07 bf f8 ld [ %fp + -8 ], %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, strlen( name ), 0x00, &loc, true ); 40002f2c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002f30: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40002f34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f38: 02 80 00 13 be 40002f84 <== NOT EXECUTED 40002f3c: e4 07 bf ec ld [ %fp + -20 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 40002f40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40002f48: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40002f4c: 02 80 00 1a be 40002fb4 <== NOT EXECUTED 40002f50: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002f54: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40002f58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f5c: 02 80 00 2b be 40003008 <== NOT EXECUTED 40002f60: 01 00 00 00 nop <== NOT EXECUTED 40002f64: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002f68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f6c: 02 80 00 27 be 40003008 <== NOT EXECUTED 40002f70: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40002f74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f78: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED 40002f7c: 81 c7 e0 08 ret <== NOT EXECUTED 40002f80: 81 e8 00 00 restore <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 40002f84: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002f88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f8c: 02 80 00 04 be 40002f9c <== NOT EXECUTED 40002f90: 01 00 00 00 nop <== NOT EXECUTED 40002f94: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f98: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002f9c: 40 00 36 33 call 40010868 <__errno> <== NOT EXECUTED 40002fa0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002fa4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002fa8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002fac: 81 c7 e0 08 ret <== NOT EXECUTED 40002fb0: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40002fb4: 12 bf ff e9 bne 40002f58 <== NOT EXECUTED 40002fb8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 40002fbc: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 40002fc0: 40 00 39 e1 call 40011744 <== NOT EXECUTED 40002fc4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002fc8: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40002fcc: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40002fd0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== 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; 40002fd4: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40002fd8: c4 04 a0 54 ld [ %l2 + 0x54 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002fdc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002fe0: 02 80 00 0c be 40003010 <== NOT EXECUTED 40002fe4: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40002fe8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002fec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002ff0: 02 80 00 08 be 40003010 <== NOT EXECUTED 40002ff4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40002ff8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002ffc: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003000: 81 c7 e0 08 ret <== NOT EXECUTED 40003004: 81 e8 00 00 restore <== NOT EXECUTED 40003008: 81 c7 e0 08 ret <== NOT EXECUTED 4000300c: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40003010: 81 c7 e0 08 ret <== NOT EXECUTED 40003014: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40009320 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40009320: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40009324: 03 10 00 95 sethi %hi(0x40025400), %g1 40009328: c2 00 60 68 ld [ %g1 + 0x68 ], %g1 ! 40025468 <_ISR_Nest_level> rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 4000932c: 09 10 00 97 sethi %hi(0x40025c00), %g4 if ( rtems_interrupt_is_in_progress() ) 40009330: 80 a0 60 00 cmp %g1, 0 40009334: 84 10 20 12 mov 0x12, %g2 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40009338: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 4000933c: 12 80 00 49 bne 40009460 40009340: c6 01 21 54 ld [ %g4 + 0x154 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 40009344: 80 a6 a0 00 cmp %i2, 0 40009348: 02 80 00 4b be 40009474 4000934c: 80 a6 60 00 cmp %i1, 0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 40009350: 02 80 00 49 be 40009474 40009354: c6 26 80 00 st %g3, [ %i2 ] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009358: c4 06 40 00 ld [ %i1 ], %g2 4000935c: 80 a0 a0 00 cmp %g2, 0 40009360: 22 80 00 42 be,a 40009468 40009364: c4 06 60 04 ld [ %i1 + 4 ], %g2 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 40009368: 80 a0 c0 18 cmp %g3, %i0 4000936c: 08 80 00 3d bleu 40009460 40009370: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009374: 05 10 00 94 sethi %hi(0x40025000), %g2 40009378: c6 00 a3 d0 ld [ %g2 + 0x3d0 ], %g3 ! 400253d0 <_Thread_Dispatch_disable_level> 4000937c: 86 00 e0 01 inc %g3 40009380: c6 20 a3 d0 st %g3, [ %g2 + 0x3d0 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 40009384: 80 a6 20 00 cmp %i0, 0 40009388: 12 80 00 2b bne 40009434 4000938c: 05 10 00 97 sethi %hi(0x40025c00), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 40009390: da 01 21 54 ld [ %g4 + 0x154 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 40009394: 80 a3 60 00 cmp %o5, 0 40009398: 02 80 00 3a be 40009480 4000939c: d8 00 a1 58 ld [ %g2 + 0x158 ], %o4 400093a0: 10 80 00 05 b 400093b4 400093a4: 86 10 00 0c mov %o4, %g3 400093a8: 80 a3 40 18 cmp %o5, %i0 400093ac: 08 80 00 0b bleu 400093d8 400093b0: 86 00 e0 18 add %g3, 0x18, %g3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 400093b4: c8 00 c0 00 ld [ %g3 ], %g4 400093b8: 80 a1 20 00 cmp %g4, 0 400093bc: 32 bf ff fb bne,a 400093a8 400093c0: b0 06 20 01 inc %i0 400093c4: c8 00 e0 04 ld [ %g3 + 4 ], %g4 400093c8: 80 a1 20 00 cmp %g4, 0 400093cc: 32 bf ff f7 bne,a 400093a8 400093d0: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 400093d4: 80 a3 40 18 cmp %o5, %i0 400093d8: 02 80 00 2b be 40009484 400093dc: f0 26 80 00 st %i0, [ %i2 ] 400093e0: 85 2e 20 03 sll %i0, 3, %g2 400093e4: 87 2e 20 05 sll %i0, 5, %g3 400093e8: 84 20 c0 02 sub %g3, %g2, %g2 400093ec: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400093f0: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 400093f4: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400093f8: c6 20 80 00 st %g3, [ %g2 ] 400093fc: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40009400: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40009404: c6 20 a0 04 st %g3, [ %g2 + 4 ] 40009408: c6 00 60 08 ld [ %g1 + 8 ], %g3 4000940c: c6 20 a0 08 st %g3, [ %g2 + 8 ] 40009410: c6 00 60 0c ld [ %g1 + 0xc ], %g3 40009414: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 40009418: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 4000941c: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 40009420: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 40009424: 40 00 07 57 call 4000b180 <_Thread_Enable_dispatch> 40009428: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 4000942c: 40 00 26 d6 call 40012f84 40009430: 81 e8 00 00 restore _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 40009434: c6 00 a1 58 ld [ %g2 + 0x158 ], %g3 40009438: 89 2e 20 05 sll %i0, 5, %g4 4000943c: 85 2e 20 03 sll %i0, 3, %g2 40009440: 84 21 00 02 sub %g4, %g2, %g2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009444: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 40009448: 80 a1 20 00 cmp %g4, 0 4000944c: 02 80 00 12 be 40009494 40009450: 84 00 c0 02 add %g3, %g2, %g2 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 40009454: 40 00 07 4b call 4000b180 <_Thread_Enable_dispatch> 40009458: 01 00 00 00 nop 4000945c: 84 10 20 0c mov 0xc, %g2 ! c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 40009460: 81 c7 e0 08 ret 40009464: 91 e8 00 02 restore %g0, %g2, %o0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009468: 80 a0 a0 00 cmp %g2, 0 4000946c: 12 bf ff c0 bne 4000936c 40009470: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40009474: 84 10 20 09 mov 9, %g2 } 40009478: 81 c7 e0 08 ret 4000947c: 91 e8 00 02 restore %g0, %g2, %o0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 40009480: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 40009484: 40 00 07 3f call 4000b180 <_Thread_Enable_dispatch> 40009488: 01 00 00 00 nop return sc; 4000948c: 10 bf ff f5 b 40009460 40009490: 84 10 20 05 mov 5, %g2 ! 5 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009494: c6 00 a0 04 ld [ %g2 + 4 ], %g3 40009498: 80 a0 e0 00 cmp %g3, 0 4000949c: 12 bf ff ee bne 40009454 400094a0: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 400094a4: 10 bf ff d3 b 400093f0 400094a8: f0 26 80 00 st %i0, [ %i2 ] 4000c1d4 : * 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 ) { 4000c1d4: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop, *next; rtems_status_code rc; rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4000c1d8: 21 10 00 7a sethi %hi(0x4001e800), %l0 4000c1dc: d0 04 22 c0 ld [ %l0 + 0x2c0 ], %o0 ! 4001eac0 4000c1e0: 92 10 20 00 clr %o1 4000c1e4: 7f ff ea 9a call 40006c4c 4000c1e8: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000c1ec: 23 10 00 7a sethi %hi(0x4001e800), %l1 4000c1f0: c2 04 62 bc ld [ %l1 + 0x2bc ], %g1 ! 4001eabc 4000c1f4: 80 a0 60 00 cmp %g1, 0 4000c1f8: 12 80 00 07 bne 4000c214 4000c1fc: 05 10 00 7a sethi %hi(0x4001e800), %g2 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 4000c200: b0 10 20 00 clr %i0 failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000c204: 7f ff ea d9 call 40006d68 4000c208: d0 04 22 c0 ld [ %l0 + 0x2c0 ], %o0 return iop; } 4000c20c: 81 c7 e0 08 ret 4000c210: 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( 4000c214: c4 00 a2 b8 ld [ %g2 + 0x2b8 ], %g2 4000c218: 92 10 20 01 mov 1, %o1 4000c21c: 82 20 40 02 sub %g1, %g2, %g1 4000c220: 83 38 60 03 sra %g1, 3, %g1 4000c224: 87 28 60 06 sll %g1, 6, %g3 4000c228: 85 28 60 03 sll %g1, 3, %g2 4000c22c: 84 20 c0 02 sub %g3, %g2, %g2 4000c230: 87 28 a0 06 sll %g2, 6, %g3 4000c234: 84 00 80 03 add %g2, %g3, %g2 4000c238: 84 00 80 01 add %g2, %g1, %g2 4000c23c: 87 28 a0 0f sll %g2, 0xf, %g3 4000c240: 84 20 c0 02 sub %g3, %g2, %g2 4000c244: 07 13 10 92 sethi %hi(0x4c424800), %g3 4000c248: 85 28 a0 03 sll %g2, 3, %g2 4000c24c: 86 10 e1 00 or %g3, 0x100, %g3 4000c250: 82 00 80 01 add %g2, %g1, %g1 4000c254: 94 10 20 54 mov 0x54, %o2 4000c258: 96 10 20 00 clr %o3 4000c25c: 90 10 40 03 or %g1, %g3, %o0 4000c260: 7f ff e9 da call 400069c8 4000c264: 98 07 bf fc add %fp, -4, %o4 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 4000c268: 80 a2 20 00 cmp %o0, 0 4000c26c: 32 bf ff e6 bne,a 4000c204 4000c270: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000c274: f0 04 62 bc ld [ %l1 + 0x2bc ], %i0 next = iop->data1; 4000c278: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000c27c: c0 26 20 30 clr [ %i0 + 0x30 ] 4000c280: c0 26 20 1c clr [ %i0 + 0x1c ] 4000c284: c0 26 20 34 clr [ %i0 + 0x34 ] 4000c288: c0 26 00 00 clr [ %i0 ] 4000c28c: c0 26 20 04 clr [ %i0 + 4 ] 4000c290: c0 26 20 08 clr [ %i0 + 8 ] 4000c294: c0 26 20 0c clr [ %i0 + 0xc ] 4000c298: c0 26 20 10 clr [ %i0 + 0x10 ] 4000c29c: c0 26 20 14 clr [ %i0 + 0x14 ] 4000c2a0: c0 26 20 20 clr [ %i0 + 0x20 ] 4000c2a4: c0 26 20 24 clr [ %i0 + 0x24 ] 4000c2a8: c0 26 20 28 clr [ %i0 + 0x28 ] 4000c2ac: c0 26 20 2c clr [ %i0 + 0x2c ] 4000c2b0: c0 26 20 40 clr [ %i0 + 0x40 ] 4000c2b4: c0 26 20 44 clr [ %i0 + 0x44 ] 4000c2b8: c0 26 20 38 clr [ %i0 + 0x38 ] 4000c2bc: c0 26 20 3c clr [ %i0 + 0x3c ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4000c2c0: c2 24 62 bc st %g1, [ %l1 + 0x2bc ] 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; 4000c2c4: 82 10 21 00 mov 0x100, %g1 4000c2c8: c2 26 20 18 st %g1, [ %i0 + 0x18 ] iop->sem = sema; 4000c2cc: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_libio_iop_freelist = next; goto done; 4000c2d0: 10 bf ff cd b 4000c204 4000c2d4: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 400034d8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 400034d8: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 400034dc: 21 10 00 78 sethi %hi(0x4001e000), %l0 400034e0: d0 04 21 24 ld [ %l0 + 0x124 ], %o0 ! 4001e124 400034e4: 80 a2 20 00 cmp %o0, 0 400034e8: 22 80 00 1c be,a 40003558 400034ec: 11 13 10 92 sethi %hi(0x4c424800), %o0 <== NOT EXECUTED { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 400034f0: 40 00 21 e8 call 4000bc90 400034f4: 92 10 20 48 mov 0x48, %o1 400034f8: 03 10 00 7a sethi %hi(0x4001e800), %g1 400034fc: d0 20 62 b8 st %o0, [ %g1 + 0x2b8 ] ! 4001eab8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 40003500: 80 a2 20 00 cmp %o0, 0 40003504: 02 80 00 29 be 400035a8 40003508: 82 10 00 08 mov %o0, %g1 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 4000350c: c6 04 21 24 ld [ %l0 + 0x124 ], %g3 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; 40003510: 05 10 00 7a sethi %hi(0x4001e800), %g2 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40003514: 80 a0 e0 01 cmp %g3, 1 40003518: 08 80 00 0e bleu 40003550 4000351c: d0 20 a2 bc st %o0, [ %g2 + 0x2bc ] 40003520: 82 02 20 48 add %o0, 0x48, %g1 40003524: 84 10 20 01 mov 1, %g2 iop->data1 = iop + 1; 40003528: c2 20 7f f0 st %g1, [ %g1 + -16 ] 4000352c: 84 00 a0 01 inc %g2 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40003530: 80 a0 80 03 cmp %g2, %g3 40003534: 12 bf ff fd bne 40003528 40003538: 82 00 60 48 add %g1, 0x48, %g1 4000353c: 84 00 bf ff add %g2, -1, %g2 40003540: 83 28 a0 06 sll %g2, 6, %g1 40003544: 85 28 a0 03 sll %g2, 3, %g2 40003548: 82 00 80 01 add %g2, %g1, %g1 4000354c: 82 02 00 01 add %o0, %g1, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 40003550: c0 20 60 38 clr [ %g1 + 0x38 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 40003554: 11 13 10 92 sethi %hi(0x4c424800), %o0 40003558: 92 10 20 01 mov 1, %o1 4000355c: 90 12 21 4f or %o0, 0x14f, %o0 40003560: 94 10 20 54 mov 0x54, %o2 40003564: 96 10 20 00 clr %o3 40003568: 19 10 00 7a sethi %hi(0x4001e800), %o4 4000356c: 40 00 0d 17 call 400069c8 40003570: 98 13 22 c0 or %o4, 0x2c0, %o4 ! 4001eac0 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 40003574: 80 a2 20 00 cmp %o0, 0 40003578: 12 80 00 0a bne 400035a0 4000357c: 03 10 00 78 sethi %hi(0x4001e000), %g1 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 40003580: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001e120 40003584: 80 a0 60 00 cmp %g1, 0 40003588: 02 80 00 04 be 40003598 4000358c: 01 00 00 00 nop (* rtems_fs_init_helper)(); 40003590: 9f c0 40 00 call %g1 40003594: 01 00 00 00 nop 40003598: 81 c7 e0 08 ret 4000359c: 81 e8 00 00 restore RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 400035a0: 40 00 0f 5a call 40007308 <== NOT EXECUTED 400035a4: 01 00 00 00 nop <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 400035a8: 40 00 0f 58 call 40007308 <== NOT EXECUTED 400035ac: 90 10 20 1a mov 0x1a, %o0 ! 1a <== NOT EXECUTED 400035b0: 01 00 00 00 nop 4002c4c4 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 4002c4c4: 9d e3 bf 88 save %sp, -120, %sp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 4002c4c8: 90 10 20 00 clr %o0 4002c4cc: 92 10 20 00 clr %o1 4002c4d0: 40 00 06 db call 4002e03c 4002c4d4: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 4002c4d8: b0 92 20 00 orcc %o0, 0, %i0 4002c4dc: 12 80 00 51 bne 4002c620 4002c4e0: 21 10 01 b0 sethi %hi(0x4006c000), %l0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 4002c4e4: e6 04 21 98 ld [ %l0 + 0x198 ], %l3 ! 4006c198 4002c4e8: 23 10 01 c0 sethi %hi(0x40070000), %l1 4002c4ec: a2 14 60 b8 or %l1, 0xb8, %l1 ! 400700b8 4002c4f0: 80 a4 c0 11 cmp %l3, %l1 4002c4f4: 02 80 00 3a be 4002c5dc 4002c4f8: a4 14 21 98 or %l0, 0x198, %l2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 4002c4fc: 92 10 00 11 mov %l1, %o1 4002c500: 94 10 20 48 mov 0x48, %o2 4002c504: 40 00 74 99 call 40049768 4002c508: 90 10 00 13 mov %l3, %o0 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002c50c: 03 10 01 c0 sethi %hi(0x40070000), %g1 4002c510: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 400700a0 } 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*/ 4002c514: c6 07 bf fc ld [ %fp + -4 ], %g3 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002c518: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 } 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*/ 4002c51c: c6 24 c0 00 st %g3, [ %l3 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002c520: c4 24 e0 18 st %g2, [ %l3 + 0x18 ] 4002c524: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c528: a2 07 bf e8 add %fp, -24, %l1 *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; 4002c52c: c4 24 e0 1c st %g2, [ %l3 + 0x1c ] 4002c530: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c534: 25 10 01 88 sethi %hi(0x40062000), %l2 *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; 4002c538: c4 24 e0 20 st %g2, [ %l3 + 0x20 ] 4002c53c: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c540: 92 10 20 01 mov 1, %o1 *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; 4002c544: c4 24 e0 24 st %g2, [ %l3 + 0x24 ] 4002c548: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c54c: 94 10 20 00 clr %o2 *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; 4002c550: c2 24 e0 28 st %g1, [ %l3 + 0x28 ] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c554: 96 10 00 11 mov %l1, %o3 4002c558: 98 10 20 00 clr %o4 4002c55c: 7f ff 6f 63 call 400082e8 4002c560: 90 14 a3 a8 or %l2, 0x3a8, %o0 rtems_filesystem_root = loc; 4002c564: c2 04 21 98 ld [ %l0 + 0x198 ], %g1 4002c568: c4 07 bf e8 ld [ %fp + -24 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c56c: 90 14 a3 a8 or %l2, 0x3a8, %o0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4002c570: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 4002c574: c4 07 bf ec ld [ %fp + -20 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c578: 96 10 00 11 mov %l1, %o3 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4002c57c: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4002c580: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c584: 92 10 20 01 mov 1, %o1 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4002c588: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4002c58c: c4 07 bf f4 ld [ %fp + -12 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c590: 94 10 20 00 clr %o2 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4002c594: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 4002c598: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c59c: 98 10 20 00 clr %o4 4002c5a0: 7f ff 6f 52 call 400082e8 4002c5a4: c4 20 60 28 st %g2, [ %g1 + 0x28 ] rtems_filesystem_current = loc; 4002c5a8: c4 07 bf e8 ld [ %fp + -24 ], %g2 4002c5ac: c2 04 21 98 ld [ %l0 + 0x198 ], %g1 4002c5b0: c4 20 60 04 st %g2, [ %g1 + 4 ] 4002c5b4: c4 07 bf ec ld [ %fp + -20 ], %g2 4002c5b8: c4 20 60 08 st %g2, [ %g1 + 8 ] 4002c5bc: c4 07 bf f0 ld [ %fp + -16 ], %g2 4002c5c0: c4 20 60 0c st %g2, [ %g1 + 0xc ] 4002c5c4: c4 07 bf f4 ld [ %fp + -12 ], %g2 4002c5c8: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 4002c5cc: c4 07 bf f8 ld [ %fp + -8 ], %g2 4002c5d0: c4 20 60 14 st %g2, [ %g1 + 0x14 ] return RTEMS_SUCCESSFUL; } 4002c5d4: 81 c7 e0 08 ret 4002c5d8: 91 e8 20 00 restore %g0, 0, %o0 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)); 4002c5dc: 90 10 20 48 mov 0x48, %o0 4002c5e0: 7f ff 71 33 call 40008aac 4002c5e4: b0 10 20 1a mov 0x1a, %i0 if (!tmp) 4002c5e8: a6 92 20 00 orcc %o0, 0, %l3 4002c5ec: 02 80 00 0d be 4002c620 4002c5f0: 92 10 00 12 mov %l2, %o1 #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); 4002c5f4: 90 10 20 00 clr %o0 4002c5f8: 15 10 00 b0 sethi %hi(0x4002c000), %o2 4002c5fc: 40 00 07 a6 call 4002e494 4002c600: 94 12 a3 90 or %o2, 0x390, %o2 ! 4002c390 if (sc != RTEMS_SUCCESSFUL) { 4002c604: b0 92 20 00 orcc %o0, 0, %i0 4002c608: 12 80 00 04 bne 4002c618 4002c60c: 01 00 00 00 nop * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 4002c610: 10 bf ff bb b 4002c4fc 4002c614: e6 24 21 98 st %l3, [ %l0 + 0x198 ] 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); 4002c618: 7f ff 6f 6f call 400083d4 <== NOT EXECUTED 4002c61c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return sc; 4002c620: 81 c7 e0 08 ret <== NOT EXECUTED 4002c624: 81 e8 00 00 restore <== NOT EXECUTED 4002c408 : * 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) { 4002c408: 9d e3 bf 98 save %sp, -104, %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); 4002c40c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002c410: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002c414: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 4002c418: 40 00 07 09 call 4002e03c <== NOT EXECUTED 4002c41c: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002c420: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002c424: 12 80 00 14 bne 4002c474 <== NOT EXECUTED 4002c428: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 4002c42c: 21 10 01 b0 sethi %hi(0x4006c000), %l0 <== NOT EXECUTED 4002c430: e6 04 21 98 ld [ %l0 + 0x198 ], %l3 ! 4006c198 <== NOT EXECUTED 4002c434: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 4002c438: c6 04 c0 00 ld [ %l3 ], %g3 <== NOT EXECUTED 4002c43c: 82 14 21 98 or %l0, 0x198, %g1 <== NOT EXECUTED 4002c440: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 4002c444: 02 80 00 0e be 4002c47c <== NOT EXECUTED 4002c448: a2 10 00 01 mov %g1, %l1 <== 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, 4002c44c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4002c450: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4002c454: 40 00 08 6e call 4002e60c <== NOT EXECUTED 4002c458: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 4002c45c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002c460: 02 80 00 10 be 4002c4a0 <== NOT EXECUTED 4002c464: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 4002c468: 05 10 01 c0 sethi %hi(0x40070000), %g2 <== NOT EXECUTED 4002c46c: 84 10 a0 b8 or %g2, 0xb8, %g2 ! 400700b8 <== NOT EXECUTED 4002c470: c4 24 21 98 st %g2, [ %l0 + 0x198 ] <== NOT EXECUTED return sc; } 4002c474: 81 c7 e0 08 ret <== NOT EXECUTED 4002c478: 91 e8 00 01 restore %g0, %g1, %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); 4002c47c: 40 00 08 36 call 4002e554 <== NOT EXECUTED 4002c480: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002c484: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002c488: 12 bf ff fb bne 4002c474 <== NOT EXECUTED 4002c48c: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 4002c490: 7f ff ff c0 call 4002c390 <== NOT EXECUTED 4002c494: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 4002c498: 10 bf ff ee b 4002c450 <== NOT EXECUTED 4002c49c: 90 10 00 12 mov %l2, %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); 4002c4a0: 15 10 00 b0 sethi %hi(0x4002c000), %o2 <== NOT EXECUTED 4002c4a4: 40 00 07 fc call 4002e494 <== NOT EXECUTED 4002c4a8: 94 12 a3 90 or %o2, 0x390, %o2 ! 4002c390 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4002c4ac: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002c4b0: 12 bf ff ef bne 4002c46c <== NOT EXECUTED 4002c4b4: 05 10 01 c0 sethi %hi(0x40070000), %g2 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 4002c4b8: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 4002c4bc: 10 bf ff ee b 4002c474 <== NOT EXECUTED 4002c4c0: c4 24 21 98 st %g2, [ %l0 + 0x198 ] <== NOT EXECUTED 40008bb0 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 40008bb0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 40008bb4: 03 10 01 af sethi %hi(0x4006bc00), %g1 <== NOT EXECUTED 40008bb8: d0 00 62 b0 ld [ %g1 + 0x2b0 ], %o0 ! 4006beb0 <== NOT EXECUTED 40008bbc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008bc0: 40 00 19 18 call 4000f020 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40008bc4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 40008bc8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 40008bcc: 02 80 00 08 be 40008bec <== NOT EXECUTED 40008bd0: 03 10 01 c0 sethi %hi(0x40070000), %g1 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 40008bd4: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 40008bd8: 82 10 60 70 or %g1, 0x70, %g1 <== NOT EXECUTED 40008bdc: c4 18 60 28 ldd [ %g1 + 0x28 ], %g2 <== NOT EXECUTED 40008be0: 86 80 c0 04 addcc %g3, %g4, %g3 <== NOT EXECUTED 40008be4: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 40008be8: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 40008bec: 81 c7 e0 08 ret <== NOT EXECUTED 40008bf0: 81 e8 00 00 restore <== NOT EXECUTED 40008bf4 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 40008bf4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 40008bf8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40008bfc: 02 80 00 14 be 40008c4c <== NOT EXECUTED 40008c00: 03 10 01 af sethi %hi(0x4006bc00), %g1 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 40008c04: d0 00 62 b0 ld [ %g1 + 0x2b0 ], %o0 ! 4006beb0 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 40008c08: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 40008c0c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008c10: 40 00 19 04 call 4000f020 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40008c14: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 40008c18: 03 10 01 c0 sethi %hi(0x40070000), %g1 <== NOT EXECUTED 40008c1c: d8 07 bf fc ld [ %fp + -4 ], %o4 <== NOT EXECUTED 40008c20: 82 10 60 70 or %g1, 0x70, %g1 <== NOT EXECUTED 40008c24: c4 18 60 20 ldd [ %g1 + 0x20 ], %g2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008c28: da 00 60 2c ld [ %g1 + 0x2c ], %o5 <== NOT EXECUTED if (current_depth > s->max_depth) 40008c2c: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 40008c30: 86 80 c0 0c addcc %g3, %o4, %g3 <== NOT EXECUTED 40008c34: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 40008c38: c4 38 60 20 std %g2, [ %g1 + 0x20 ] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008c3c: 84 20 c0 0d sub %g3, %o5, %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40008c40: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 40008c44: 38 80 00 02 bgu,a 40008c4c <== NOT EXECUTED 40008c48: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 40008c4c: 81 c7 e0 08 ret <== NOT EXECUTED 40008c50: 81 e8 00 00 restore <== NOT EXECUTED 40008c54 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40008c54: 03 10 01 c0 sethi %hi(0x40070000), %g1 <== NOT EXECUTED 40008c58: c0 20 60 70 clr [ %g1 + 0x70 ] ! 40070070 <== NOT EXECUTED 40008c5c: c0 20 60 74 clr [ %g1 + 0x74 ] <== NOT EXECUTED 40008c60: 82 10 60 70 or %g1, 0x70, %g1 <== NOT EXECUTED 40008c64: c0 20 60 28 clr [ %g1 + 0x28 ] <== NOT EXECUTED 40008c68: c0 20 60 2c clr [ %g1 + 0x2c ] <== NOT EXECUTED 40008c6c: c0 20 60 08 clr [ %g1 + 8 ] <== NOT EXECUTED 40008c70: c0 20 60 0c clr [ %g1 + 0xc ] <== NOT EXECUTED 40008c74: c0 20 60 10 clr [ %g1 + 0x10 ] <== NOT EXECUTED 40008c78: c0 20 60 14 clr [ %g1 + 0x14 ] <== NOT EXECUTED 40008c7c: c0 20 60 18 clr [ %g1 + 0x18 ] <== NOT EXECUTED 40008c80: c0 20 60 1c clr [ %g1 + 0x1c ] <== NOT EXECUTED 40008c84: c0 20 60 20 clr [ %g1 + 0x20 ] <== NOT EXECUTED } 40008c88: 81 c3 e0 08 retl <== NOT EXECUTED 40008c8c: c0 20 60 24 clr [ %g1 + 0x24 ] <== NOT EXECUTED 40011d00 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40011d00: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40011d04: a0 96 20 00 orcc %i0, 0, %l0 40011d08: 02 80 00 20 be 40011d88 40011d0c: 03 10 00 95 sethi %hi(0x40025400), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40011d10: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 40025570 <_System_state_Current> 40011d14: 80 a0 60 03 cmp %g1, 3 40011d18: 02 80 00 17 be 40011d74 40011d1c: c0 24 00 00 clr [ %l0 ] /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 40011d20: 7f ff cc 9a call 40004f88 40011d24: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 40011d28: 03 10 00 91 sethi %hi(0x40024400), %g1 40011d2c: d0 00 63 a0 ld [ %g1 + 0x3a0 ], %o0 ! 400247a0 40011d30: 94 10 00 19 mov %i1, %o2 40011d34: 92 10 00 1a mov %i2, %o1 40011d38: 7f ff e3 41 call 4000aa3c <_Protected_heap_Allocate_aligned_with_boundary> 40011d3c: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40011d40: b2 92 20 00 orcc %o0, 0, %i1 40011d44: 02 80 00 12 be 40011d8c 40011d48: 03 10 00 93 sethi %hi(0x40024c00), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 40011d4c: c2 00 62 28 ld [ %g1 + 0x228 ], %g1 ! 40024e28 40011d50: 80 a0 60 00 cmp %g1, 0 40011d54: 22 80 00 06 be,a 40011d6c 40011d58: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 40011d5c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40011d60: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011d64: 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; 40011d68: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 40011d6c: 81 c7 e0 08 ret 40011d70: 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()) && 40011d74: 7f ff cc 6c call 40004f24 40011d78: 01 00 00 00 nop 40011d7c: 80 8a 20 ff btst 0xff, %o0 40011d80: 12 bf ff e8 bne 40011d20 40011d84: 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; 40011d88: b0 10 20 16 mov 0x16, %i0 ! 16 } 40011d8c: 81 c7 e0 08 ret 40011d90: 81 e8 00 00 restore 40008b0c : void rtems_panic( const char *printf_format, ... ) { 40008b0c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40008b10: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40008b14: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40008b18: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40008b1c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008b20: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008b24: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008b28: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40008b2c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008b30: 7f ff ff 8a call 40008958 <== NOT EXECUTED 40008b34: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 40008b38: 81 c7 e0 08 ret <== NOT EXECUTED 40008b3c: 81 e8 00 00 restore <== NOT EXECUTED 4000e188 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4000e188: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 4000e18c: 03 10 00 79 sethi %hi(0x4001e400), %g1 4000e190: c2 08 63 94 ldub [ %g1 + 0x394 ], %g1 ! 4001e794 4000e194: 80 a0 60 00 cmp %g1, 0 4000e198: 02 80 00 13 be 4000e1e4 4000e19c: 19 10 00 7a sethi %hi(0x4001e800), %o4 return; if (rtems_pipe_semaphore) 4000e1a0: c2 03 21 00 ld [ %o4 + 0x100 ], %g1 ! 4001e900 <== NOT EXECUTED 4000e1a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e1a8: 12 80 00 0f bne 4000e1e4 <== NOT EXECUTED 4000e1ac: 98 13 21 00 or %o4, 0x100, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4000e1b0: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 4000e1b4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000e1b8: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 4000e1bc: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 4000e1c0: 7f ff e2 02 call 400069c8 <== NOT EXECUTED 4000e1c4: 96 10 20 00 clr %o3 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 4000e1c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e1cc: 12 80 00 08 bne 4000e1ec <== NOT EXECUTED 4000e1d0: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4000e1d4: 7f ff e0 d9 call 40006538 <== NOT EXECUTED 4000e1d8: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 4000e1dc: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000e1e0: d0 30 61 06 sth %o0, [ %g1 + 0x106 ] ! 4001e906 <== NOT EXECUTED 4000e1e4: 81 c7 e0 08 ret 4000e1e8: 81 e8 00 00 restore sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4000e1ec: 7f ff e4 47 call 40007308 <== NOT EXECUTED 4000e1f0: 01 00 00 00 nop 4000e1f4: 01 00 00 00 nop 400066d4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 400066d4: 9d e3 bf a0 save %sp, -96, %sp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 400066d8: 21 10 01 c0 sethi %hi(0x40070000), %l0 400066dc: c2 04 22 ec ld [ %l0 + 0x2ec ], %g1 ! 400702ec <_Thread_Executing> ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 400066e0: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 400066e4: 80 a7 80 08 cmp %fp, %o0 400066e8: 0a 80 00 06 bcs 40006700 400066ec: a2 10 20 00 clr %l1 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 400066f0: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 400066f4: 82 02 00 01 add %o0, %g1, %g1 400066f8: 80 a0 40 1e cmp %g1, %fp 400066fc: a2 60 3f ff subx %g0, -1, %l1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 40006700: 03 10 01 b5 sethi %hi(0x4006d400), %g1 40006704: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 4006d410 40006708: 80 a0 a0 00 cmp %g2, 0 4000670c: 02 80 00 09 be 40006730 40006710: 82 10 20 01 mov 1, %g1 pattern_ok = (!memcmp( 40006714: 90 02 20 08 add %o0, 8, %o0 40006718: 13 10 01 c0 sethi %hi(0x40070000), %o1 4000671c: 94 10 20 10 mov 0x10, %o2 40006720: 40 01 0b e1 call 400496a4 40006724: 92 12 60 40 or %o1, 0x40, %o1 40006728: 80 a0 00 08 cmp %g0, %o0 4000672c: 82 60 3f ff subx %g0, -1, %g1 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 40006730: 80 8c 60 ff btst 0xff, %l1 40006734: 02 80 00 05 be 40006748 40006738: 92 08 60 ff and %g1, 0xff, %o1 4000673c: 92 88 60 ff andcc %g1, 0xff, %o1 40006740: 12 80 00 05 bne 40006754 40006744: b0 10 20 00 clr %i0 return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 40006748: d0 04 22 ec ld [ %l0 + 0x2ec ], %o0 <== NOT EXECUTED 4000674c: 7f ff ff b8 call 4000662c <== NOT EXECUTED 40006750: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 40006754: 81 c7 e0 08 ret 40006758: 81 e8 00 00 restore 40006610 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 40006610: 13 10 00 25 sethi %hi(0x40009400), %o1 <== NOT EXECUTED 40006614: 90 10 20 00 clr %o0 <== NOT EXECUTED 40006618: 92 12 63 d4 or %o1, 0x3d4, %o1 <== NOT EXECUTED 4000661c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40006620: 7f ff ff e6 call 400065b8 <== NOT EXECUTED 40006624: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006628: 01 00 00 00 nop 400065b8 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 400065b8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED print_context = context; 400065bc: 23 10 01 b5 sethi %hi(0x4006d400), %l1 <== NOT EXECUTED print_handler = print; 400065c0: 21 10 01 b5 sethi %hi(0x4006d400), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 400065c4: f0 24 60 14 st %i0, [ %l1 + 0x14 ] <== NOT EXECUTED print_handler = print; 400065c8: f2 24 20 18 st %i1, [ %l0 + 0x18 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 400065cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400065d0: 13 10 01 88 sethi %hi(0x40062000), %o1 <== NOT EXECUTED 400065d4: 9f c6 40 00 call %i1 <== NOT EXECUTED 400065d8: 92 12 61 20 or %o1, 0x120, %o1 ! 40062120 <== NOT EXECUTED (*print)( context, 400065dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400065e0: 13 10 01 88 sethi %hi(0x40062000), %o1 <== NOT EXECUTED 400065e4: 9f c6 40 00 call %i1 <== NOT EXECUTED 400065e8: 92 12 61 38 or %o1, 0x138, %o1 ! 40062138 <== 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 ); 400065ec: 11 10 00 19 sethi %hi(0x40006400), %o0 <== NOT EXECUTED 400065f0: 40 00 1f ff call 4000e5ec <== NOT EXECUTED 400065f4: 90 12 20 2c or %o0, 0x2c, %o0 ! 4000642c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 400065f8: 7f ff ff 8d call 4000642c <== NOT EXECUTED 400065fc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 40006600: c0 24 60 14 clr [ %l1 + 0x14 ] <== NOT EXECUTED print_handler = NULL; 40006604: c0 24 20 18 clr [ %l0 + 0x18 ] <== NOT EXECUTED } 40006608: 81 c7 e0 08 ret <== NOT EXECUTED 4000660c: 81 e8 00 00 restore <== NOT EXECUTED 4000675c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 4000675c: 9d e3 bf a0 save %sp, -96, %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; 40006760: c2 06 20 c8 ld [ %i0 + 0xc8 ], %g1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 40006764: 80 a7 80 01 cmp %fp, %g1 40006768: 0a 80 00 07 bcs 40006784 4000676c: 90 00 60 08 add %g1, 8, %o0 void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 40006770: c4 06 20 c4 ld [ %i0 + 0xc4 ], %g2 40006774: 82 00 40 02 add %g1, %g2, %g1 40006778: 80 a7 80 01 cmp %fp, %g1 4000677c: 28 80 00 0b bleu,a 400067a8 40006780: 13 10 01 c0 sethi %hi(0x40070000), %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, 40006784: 13 10 01 c0 sethi %hi(0x40070000), %o1 <== NOT EXECUTED 40006788: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000678c: 40 01 0b c6 call 400496a4 <== NOT EXECUTED 40006790: 92 12 60 40 or %o1, 0x40, %o1 <== NOT EXECUTED 40006794: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40006798: b2 60 3f ff subx %g0, -1, %i1 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 4000679c: b2 0e 60 01 and %i1, 1, %i1 <== NOT EXECUTED 400067a0: 7f ff ff a3 call 4000662c <== NOT EXECUTED 400067a4: 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, 400067a8: 94 10 20 10 mov 0x10, %o2 400067ac: 92 12 60 40 or %o1, 0x40, %o1 400067b0: 40 01 0b bd call 400496a4 400067b4: b2 10 20 00 clr %i1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 400067b8: 80 a2 20 00 cmp %o0, 0 400067bc: 12 bf ff f9 bne 400067a0 400067c0: b2 0e 60 01 and %i1, 1, %i1 400067c4: 81 c7 e0 08 ret 400067c8: 81 e8 00 00 restore 4000dfd4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000dfd4: 9d e3 bf 98 save %sp, -104, %sp 4000dfd8: a4 10 00 18 mov %i0, %l2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000dfdc: 80 a6 60 00 cmp %i1, 0 4000dfe0: 02 80 00 1c be 4000e050 4000dfe4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000dfe8: 40 00 0e aa call 40011a90 <__errno> 4000dfec: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000dff0: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000dff4: c0 22 00 00 clr [ %o0 ] *n = 0; 4000dff8: c0 26 40 00 clr [ %i1 ] 4000dffc: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000e000: 40 00 1a 1c call 40014870 4000e004: 90 10 00 12 mov %l2, %o0 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e008: 80 a6 a0 00 cmp %i2, 0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000e00c: a0 10 00 08 mov %o0, %l0 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e010: 02 80 00 1b be 4000e07c 4000e014: a2 10 00 09 mov %o1, %l1 *endptr = end; 4000e018: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e01c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e020: 80 a0 40 12 cmp %g1, %l2 4000e024: 02 80 00 0b be 4000e050 4000e028: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e02c: 03 10 00 87 sethi %hi(0x40021c00), %g1 4000e030: d4 18 62 d0 ldd [ %g1 + 0x2d0 ], %o2 ! 40021ed0 <_CPU_Trap_slot_template+0x14> 4000e034: 90 10 00 10 mov %l0, %o0 4000e038: 40 00 42 77 call 4001ea14 <__gtdf2> 4000e03c: 92 10 00 11 mov %l1, %o1 4000e040: 80 a2 20 00 cmp %o0, 0 4000e044: 14 80 00 05 bg 4000e058 4000e048: b0 10 20 00 clr %i0 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e04c: e0 3e 40 00 std %l0, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000e050: 81 c7 e0 08 ret 4000e054: 81 e8 00 00 restore return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e058: 40 00 0e 8e call 40011a90 <__errno> 4000e05c: b0 10 20 0a mov 0xa, %i0 4000e060: c2 02 00 00 ld [ %o0 ], %g1 4000e064: 80 a0 60 22 cmp %g1, 0x22 4000e068: 02 bf ff fa be 4000e050 4000e06c: 01 00 00 00 nop /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e070: e0 3e 40 00 std %l0, [ %i1 ] <== NOT EXECUTED 4000e074: 81 c7 e0 08 ret <== NOT EXECUTED 4000e078: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e07c: 10 bf ff e9 b 4000e020 4000e080: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e084 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e084: 9d e3 bf 98 save %sp, -104, %sp 4000e088: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e08c: 80 a6 60 00 cmp %i1, 0 4000e090: 02 80 00 19 be 4000e0f4 4000e094: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e098: 40 00 0e 7e call 40011a90 <__errno> 4000e09c: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000e0a0: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000e0a4: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e0a8: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000e0ac: 40 00 19 de call 40014824 4000e0b0: 90 10 00 10 mov %l0, %o0 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e0b4: 80 a6 a0 00 cmp %i2, 0 4000e0b8: 02 80 00 1a be 4000e120 4000e0bc: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e0c0: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e0c4: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e0c8: 80 a0 40 10 cmp %g1, %l0 4000e0cc: 02 80 00 0a be 4000e0f4 4000e0d0: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e0d4: 90 10 00 11 mov %l1, %o0 4000e0d8: 13 1f df ff sethi %hi(0x7f7ffc00), %o1 4000e0dc: 40 00 3f 96 call 4001df34 <__gtsf2> 4000e0e0: 92 12 63 ff or %o1, 0x3ff, %o1 ! 7f7fffff 4000e0e4: 80 a2 20 00 cmp %o0, 0 4000e0e8: 14 80 00 05 bg 4000e0fc 4000e0ec: b0 10 20 00 clr %i0 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e0f0: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000e0f4: 81 c7 e0 08 ret 4000e0f8: 81 e8 00 00 restore return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e0fc: 40 00 0e 65 call 40011a90 <__errno> 4000e100: b0 10 20 0a mov 0xa, %i0 4000e104: c2 02 00 00 ld [ %o0 ], %g1 4000e108: 80 a0 60 22 cmp %g1, 0x22 4000e10c: 02 bf ff fa be 4000e0f4 4000e110: 01 00 00 00 nop /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e114: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000e118: 81 c7 e0 08 ret <== NOT EXECUTED 4000e11c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e120: 10 bf ff ea b 4000e0c8 4000e124: c2 07 bf fc ld [ %fp + -4 ], %g1 40021334 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 40021334: 9d e3 bf 98 save %sp, -104, %sp 40021338: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4002133c: 80 a6 60 00 cmp %i1, 0 40021340: 02 80 00 18 be 400213a0 40021344: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 40021348: 40 00 94 35 call 4004641c <__errno> 4002134c: 01 00 00 00 nop 40021350: c0 22 00 00 clr [ %o0 ] *n = 0; 40021354: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 40021358: 94 10 00 1b mov %i3, %o2 4002135c: 90 10 00 10 mov %l0, %o0 40021360: 40 00 b3 e5 call 4004e2f4 40021364: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 40021368: 80 a6 a0 00 cmp %i2, 0 4002136c: 02 80 00 18 be 400213cc 40021370: a2 10 00 08 mov %o0, %l1 *endptr = end; 40021374: c2 07 bf fc ld [ %fp + -4 ], %g1 40021378: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4002137c: 80 a0 40 10 cmp %g1, %l0 40021380: 02 80 00 08 be 400213a0 40021384: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 40021388: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4002138c: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40021390: 80 a4 40 01 cmp %l1, %g1 40021394: 02 80 00 05 be 400213a8 40021398: b0 10 20 00 clr %i0 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4002139c: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 400213a0: 81 c7 e0 08 ret 400213a4: 81 e8 00 00 restore return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 400213a8: 40 00 94 1d call 4004641c <__errno> 400213ac: b0 10 20 0a mov 0xa, %i0 400213b0: c2 02 00 00 ld [ %o0 ], %g1 400213b4: 80 a0 60 22 cmp %g1, 0x22 400213b8: 02 bf ff fa be 400213a0 400213bc: 01 00 00 00 nop /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 400213c0: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 400213c4: 81 c7 e0 08 ret <== NOT EXECUTED 400213c8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400213cc: 10 bf ff ec b 4002137c 400213d0: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e294 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e294: 9d e3 bf 98 save %sp, -104, %sp 4000e298: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e29c: 80 a6 60 00 cmp %i1, 0 4000e2a0: 02 80 00 24 be 4000e330 4000e2a4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e2a8: 40 00 0d fa call 40011a90 <__errno> 4000e2ac: 01 00 00 00 nop #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4000e2b0: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000e2b4: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e2b8: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4000e2bc: 90 10 00 10 mov %l0, %o0 4000e2c0: 40 00 19 f5 call 40014a94 4000e2c4: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e2c8: 80 a6 a0 00 cmp %i2, 0 4000e2cc: 02 80 00 1b be 4000e338 4000e2d0: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e2d4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e2d8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e2dc: 80 a0 40 10 cmp %g1, %l0 4000e2e0: 02 80 00 14 be 4000e330 4000e2e4: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e2e8: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000e2ec: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000e2f0: 80 a4 40 01 cmp %l1, %g1 4000e2f4: 02 80 00 08 be 4000e314 4000e2f8: 03 20 00 00 sethi %hi(0x80000000), %g1 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4000e2fc: 80 a4 40 01 cmp %l1, %g1 4000e300: 02 80 00 05 be 4000e314 4000e304: 01 00 00 00 nop return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e308: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; 4000e30c: 81 c7 e0 08 ret 4000e310: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4000e314: 40 00 0d df call 40011a90 <__errno> 4000e318: 01 00 00 00 nop 4000e31c: c2 02 00 00 ld [ %o0 ], %g1 4000e320: 80 a0 60 22 cmp %g1, 0x22 4000e324: 32 bf ff fa bne,a 4000e30c 4000e328: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4000e32c: b0 10 20 0a mov 0xa, %i0 } 4000e330: 81 c7 e0 08 ret 4000e334: 81 e8 00 00 restore 4000e338: 10 bf ff e9 b 4000e2dc 4000e33c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e1c8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e1c8: 9d e3 bf 90 save %sp, -112, %sp 4000e1cc: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e1d0: 80 a6 60 00 cmp %i1, 0 4000e1d4: 02 80 00 29 be 4000e278 4000e1d8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e1dc: 40 00 0e 2d call 40011a90 <__errno> 4000e1e0: 01 00 00 00 nop #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4000e1e4: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000e1e8: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e1ec: c0 26 40 00 clr [ %i1 ] 4000e1f0: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4000e1f4: 90 10 00 10 mov %l0, %o0 4000e1f8: 40 00 1a 31 call 40014abc 4000e1fc: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e200: 80 a6 a0 00 cmp %i2, 0 4000e204: 02 80 00 22 be 4000e28c 4000e208: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e20c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e210: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e214: 80 a0 40 10 cmp %g1, %l0 4000e218: 02 80 00 18 be 4000e278 4000e21c: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e220: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000e224: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000e228: 80 a4 40 01 cmp %l1, %g1 4000e22c: 02 80 00 15 be 4000e280 4000e230: 80 a2 7f ff cmp %o1, -1 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4000e234: 03 20 00 00 sethi %hi(0x80000000), %g1 4000e238: 80 a4 40 01 cmp %l1, %g1 4000e23c: 02 80 00 06 be 4000e254 4000e240: 80 a2 60 00 cmp %o1, 0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e244: d2 26 60 04 st %o1, [ %i1 + 4 ] 4000e248: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; 4000e24c: 81 c7 e0 08 ret 4000e250: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4000e254: 32 bf ff fd bne,a 4000e248 4000e258: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED 4000e25c: 40 00 0e 0d call 40011a90 <__errno> 4000e260: d2 27 bf f4 st %o1, [ %fp + -12 ] 4000e264: c2 02 00 00 ld [ %o0 ], %g1 4000e268: 80 a0 60 22 cmp %g1, 0x22 4000e26c: 12 bf ff f6 bne 4000e244 4000e270: d2 07 bf f4 ld [ %fp + -12 ], %o1 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4000e274: b0 10 20 0a mov 0xa, %i0 } 4000e278: 81 c7 e0 08 ret 4000e27c: 81 e8 00 00 restore return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e280: 12 bf ff ee bne 4000e238 4000e284: 03 20 00 00 sethi %hi(0x80000000), %g1 4000e288: 30 bf ff f5 b,a 4000e25c 4000e28c: 10 bf ff e2 b 4000e214 4000e290: c2 07 bf fc ld [ %fp + -4 ], %g1 400213d4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 400213d4: 9d e3 bf 98 save %sp, -104, %sp 400213d8: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 400213dc: 80 a6 60 00 cmp %i1, 0 400213e0: 02 80 00 16 be 40021438 400213e4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 400213e8: 40 00 94 0d call 4004641c <__errno> 400213ec: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 400213f0: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 400213f4: c0 22 00 00 clr [ %o0 ] *n = 0; 400213f8: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 400213fc: 90 10 00 10 mov %l0, %o0 40021400: 40 00 b4 f3 call 4004e7cc 40021404: 94 10 20 10 mov 0x10, %o2 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 40021408: 80 a6 a0 00 cmp %i2, 0 4002140c: 02 80 00 16 be 40021464 40021410: a2 10 00 08 mov %o0, %l1 *endptr = end; 40021414: c2 07 bf fc ld [ %fp + -4 ], %g1 40021418: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4002141c: 80 a0 40 10 cmp %g1, %l0 40021420: 02 80 00 06 be 40021438 40021424: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 40021428: 80 a4 7f ff cmp %l1, -1 4002142c: 02 80 00 05 be 40021440 40021430: b0 10 20 00 clr %i0 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 40021434: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 40021438: 81 c7 e0 08 ret 4002143c: 81 e8 00 00 restore return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 40021440: 40 00 93 f7 call 4004641c <__errno> <== NOT EXECUTED 40021444: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 40021448: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4002144c: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 40021450: 02 bf ff fa be 40021438 <== NOT EXECUTED 40021454: 01 00 00 00 nop <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 40021458: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4002145c: 81 c7 e0 08 ret <== NOT EXECUTED 40021460: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40021464: 10 bf ff ee b 4002141c 40021468: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e438 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e438: 9d e3 bf 98 save %sp, -104, %sp 4000e43c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e440: 80 a6 60 00 cmp %i1, 0 4000e444: 02 80 00 16 be 4000e49c 4000e448: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e44c: 40 00 0d 91 call 40011a90 <__errno> 4000e450: 01 00 00 00 nop 4000e454: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e458: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4000e45c: 94 10 00 1b mov %i3, %o2 4000e460: 90 10 00 10 mov %l0, %o0 4000e464: 40 00 1a c2 call 40014f6c 4000e468: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e46c: 80 a6 a0 00 cmp %i2, 0 4000e470: 02 80 00 16 be 4000e4c8 4000e474: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e478: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e47c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e480: 80 a0 40 10 cmp %g1, %l0 4000e484: 02 80 00 06 be 4000e49c 4000e488: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e48c: 80 a4 7f ff cmp %l1, -1 4000e490: 02 80 00 05 be 4000e4a4 4000e494: b0 10 20 00 clr %i0 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e498: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000e49c: 81 c7 e0 08 ret 4000e4a0: 81 e8 00 00 restore return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e4a4: 40 00 0d 7b call 40011a90 <__errno> 4000e4a8: b0 10 20 0a mov 0xa, %i0 4000e4ac: c2 02 00 00 ld [ %o0 ], %g1 4000e4b0: 80 a0 60 22 cmp %g1, 0x22 4000e4b4: 02 bf ff fa be 4000e49c 4000e4b8: 01 00 00 00 nop /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e4bc: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000e4c0: 81 c7 e0 08 ret <== NOT EXECUTED 4000e4c4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e4c8: 10 bf ff ee b 4000e480 4000e4cc: c2 07 bf fc ld [ %fp + -4 ], %g1 400214cc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 400214cc: 9d e3 bf 98 save %sp, -104, %sp 400214d0: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 400214d4: 80 a6 60 00 cmp %i1, 0 400214d8: 02 80 00 16 be 40021530 400214dc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 400214e0: 40 00 93 cf call 4004641c <__errno> 400214e4: 01 00 00 00 nop #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 400214e8: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 400214ec: c0 22 00 00 clr [ %o0 ] *n = 0; 400214f0: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 400214f4: 90 10 00 10 mov %l0, %o0 400214f8: 40 00 b4 b5 call 4004e7cc 400214fc: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 40021500: 80 a6 a0 00 cmp %i2, 0 40021504: 02 80 00 16 be 4002155c 40021508: a2 10 00 08 mov %o0, %l1 *endptr = end; 4002150c: c2 07 bf fc ld [ %fp + -4 ], %g1 40021510: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 40021514: 80 a0 40 10 cmp %g1, %l0 40021518: 02 80 00 06 be 40021530 4002151c: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 40021520: 80 a4 7f ff cmp %l1, -1 40021524: 02 80 00 05 be 40021538 40021528: b0 10 20 00 clr %i0 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4002152c: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 40021530: 81 c7 e0 08 ret 40021534: 81 e8 00 00 restore return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 40021538: 40 00 93 b9 call 4004641c <__errno> 4002153c: b0 10 20 0a mov 0xa, %i0 40021540: c2 02 00 00 ld [ %o0 ], %g1 40021544: 80 a0 60 22 cmp %g1, 0x22 40021548: 02 bf ff fa be 40021530 4002154c: 01 00 00 00 nop /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 40021550: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40021554: 81 c7 e0 08 ret <== NOT EXECUTED 40021558: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4002155c: 10 bf ff ee b 40021514 40021560: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e4d0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e4d0: 9d e3 bf 90 save %sp, -112, %sp 4000e4d4: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e4d8: 80 a6 60 00 cmp %i1, 0 4000e4dc: 02 80 00 23 be 4000e568 4000e4e0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e4e4: 40 00 0d 6b call 40011a90 <__errno> 4000e4e8: 01 00 00 00 nop #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4000e4ec: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000e4f0: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e4f4: c0 26 40 00 clr [ %i1 ] 4000e4f8: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4000e4fc: 90 10 00 10 mov %l0, %o0 4000e500: 40 00 1a a5 call 40014f94 4000e504: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e508: 80 a6 a0 00 cmp %i2, 0 4000e50c: 02 80 00 19 be 4000e570 4000e510: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e514: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e518: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e51c: 80 a0 40 10 cmp %g1, %l0 4000e520: 02 80 00 12 be 4000e568 4000e524: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e528: 80 a4 7f ff cmp %l1, -1 4000e52c: 02 80 00 06 be 4000e544 4000e530: 80 a2 7f ff cmp %o1, -1 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e534: d2 26 60 04 st %o1, [ %i1 + 4 ] 4000e538: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000e53c: 81 c7 e0 08 ret 4000e540: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4000e544: 32 bf ff fd bne,a 4000e538 4000e548: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED 4000e54c: 40 00 0d 51 call 40011a90 <__errno> 4000e550: d2 27 bf f4 st %o1, [ %fp + -12 ] 4000e554: c2 02 00 00 ld [ %o0 ], %g1 4000e558: b0 10 20 0a mov 0xa, %i0 4000e55c: 80 a0 60 22 cmp %g1, 0x22 4000e560: 12 bf ff f5 bne 4000e534 4000e564: d2 07 bf f4 ld [ %fp + -12 ], %o1 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4000e568: 81 c7 e0 08 ret 4000e56c: 81 e8 00 00 restore 4000e570: 10 bf ff eb b 4000e51c 4000e574: c2 07 bf fc ld [ %fp + -4 ], %g1 400057c0 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 400057c0: 82 10 00 08 mov %o0, %g1 int baud_index; switch (termios_baud) { 400057c4: 80 a2 20 09 cmp %o0, 9 400057c8: 02 80 00 2d be 4000587c 400057cc: 90 10 20 09 mov 9, %o0 400057d0: 80 a0 60 09 cmp %g1, 9 400057d4: 04 80 00 1a ble 4000583c 400057d8: 80 a0 60 04 cmp %g1, 4 400057dc: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 400057e0: 02 80 00 27 be 4000587c <== NOT EXECUTED 400057e4: 90 10 20 0e mov 0xe, %o0 <== NOT EXECUTED 400057e8: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 400057ec: 04 80 00 26 ble 40005884 <== NOT EXECUTED 400057f0: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 400057f4: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 400057f8: 86 10 a0 02 or %g2, 2, %g3 ! 1002 <== NOT EXECUTED 400057fc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40005800: 02 80 00 1f be 4000587c <== NOT EXECUTED 40005804: 90 10 20 11 mov 0x11, %o0 <== NOT EXECUTED 40005808: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000580c: 04 80 00 38 ble 400058ec <== NOT EXECUTED 40005810: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED 40005814: 86 10 a0 03 or %g2, 3, %g3 <== NOT EXECUTED 40005818: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000581c: 02 80 00 18 be 4000587c <== NOT EXECUTED 40005820: 90 10 20 12 mov 0x12, %o0 <== NOT EXECUTED 40005824: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 40005828: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000582c: 02 80 00 14 be 4000587c <== NOT EXECUTED 40005830: 90 10 20 13 mov 0x13, %o0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 40005834: 81 c3 e0 08 retl 40005838: 90 10 3f ff mov -1, %o0 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4000583c: 02 80 00 10 be 4000587c 40005840: 90 10 20 04 mov 4, %o0 40005844: 80 a0 60 04 cmp %g1, 4 40005848: 14 80 00 1c bg 400058b8 4000584c: 80 a0 60 06 cmp %g1, 6 40005850: 80 a0 60 01 cmp %g1, 1 40005854: 02 80 00 0a be 4000587c 40005858: 90 10 20 01 mov 1, %o0 4000585c: 80 a0 60 01 cmp %g1, 1 40005860: 04 80 00 2b ble 4000590c 40005864: 80 a0 60 02 cmp %g1, 2 40005868: 02 80 00 05 be 4000587c <== NOT EXECUTED 4000586c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40005870: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40005874: 12 bf ff f0 bne 40005834 <== NOT EXECUTED 40005878: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED 4000587c: 81 c3 e0 08 retl <== NOT EXECUTED 40005880: 01 00 00 00 nop <== NOT EXECUTED 40005884: 02 bf ff fe be 4000587c <== NOT EXECUTED 40005888: 90 10 20 0b mov 0xb, %o0 ! b <== NOT EXECUTED 4000588c: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 40005890: 06 bf ff fb bl 4000587c <== NOT EXECUTED 40005894: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 40005898: 80 a0 60 0c cmp %g1, 0xc <== NOT EXECUTED 4000589c: 02 bf ff f8 be 4000587c <== NOT EXECUTED 400058a0: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED 400058a4: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 400058a8: 12 bf ff e3 bne 40005834 <== NOT EXECUTED 400058ac: 90 10 20 0d mov 0xd, %o0 <== NOT EXECUTED 400058b0: 81 c3 e0 08 retl <== NOT EXECUTED 400058b4: 01 00 00 00 nop <== NOT EXECUTED 400058b8: 02 bf ff f1 be 4000587c <== NOT EXECUTED 400058bc: 90 10 20 06 mov 6, %o0 ! 6 <== NOT EXECUTED 400058c0: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 400058c4: 06 bf ff ee bl 4000587c <== NOT EXECUTED 400058c8: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED 400058cc: 80 a0 60 07 cmp %g1, 7 <== NOT EXECUTED 400058d0: 02 bf ff eb be 4000587c <== NOT EXECUTED 400058d4: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED 400058d8: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 400058dc: 12 bf ff d6 bne 40005834 <== NOT EXECUTED 400058e0: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED 400058e4: 81 c3 e0 08 retl <== NOT EXECUTED 400058e8: 01 00 00 00 nop <== NOT EXECUTED 400058ec: 02 bf ff e4 be 4000587c <== NOT EXECUTED 400058f0: 90 10 20 0f mov 0xf, %o0 ! f <== NOT EXECUTED 400058f4: 84 10 a0 01 or %g2, 1, %g2 <== NOT EXECUTED 400058f8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400058fc: 12 bf ff ce bne 40005834 <== NOT EXECUTED 40005900: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED 40005904: 81 c3 e0 08 retl <== NOT EXECUTED 40005908: 01 00 00 00 nop <== NOT EXECUTED 4000590c: 80 a0 60 00 cmp %g1, 0 40005910: 12 bf ff c9 bne 40005834 40005914: 90 10 20 00 clr %o0 case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 40005918: 81 c3 e0 08 retl <== NOT EXECUTED 4000591c: 01 00 00 00 nop 4000423c : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 4000423c: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 40004240: d0 20 62 28 st %o0, [ %g1 + 0x228 ] ! 4001e228 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40004244: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 40004248: 90 10 20 00 clr %o0 <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; 4000424c: d2 20 62 2c st %o1, [ %g1 + 0x22c ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40004250: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40004254: 81 c3 e0 08 retl <== NOT EXECUTED 40004258: d4 20 62 30 st %o2, [ %g1 + 0x230 ] ! 4001e230 <== NOT EXECUTED 40005970 : } } rtems_status_code rtems_termios_close (void *arg) { 40005970: 9d e3 bf a0 save %sp, -96, %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); 40005974: 23 10 00 7a sethi %hi(0x4001e800), %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; 40005978: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4000597c: d0 04 63 04 ld [ %l1 + 0x304 ], %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; 40005980: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005984: 92 10 20 00 clr %o1 40005988: 40 00 04 b1 call 40006c4c 4000598c: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40005990: 80 a2 20 00 cmp %o0, 0 40005994: 12 80 00 6e bne 40005b4c 40005998: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 4000599c: c2 04 20 08 ld [ %l0 + 8 ], %g1 400059a0: 82 00 7f ff add %g1, -1, %g1 400059a4: 80 a0 60 00 cmp %g1, 0 400059a8: 12 80 00 3a bne 40005a90 400059ac: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400059b0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 400059b4: 03 10 00 79 sethi %hi(0x4001e400), %g1 400059b8: 85 28 a0 05 sll %g2, 5, %g2 400059bc: 82 10 63 f4 or %g1, 0x3f4, %g1 400059c0: 82 00 40 02 add %g1, %g2, %g1 400059c4: c2 00 60 04 ld [ %g1 + 4 ], %g1 400059c8: 80 a0 60 00 cmp %g1, 0 400059cc: 22 80 00 48 be,a 40005aec 400059d0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400059d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400059d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 400059dc: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 400059e0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400059e4: 22 80 00 4f be,a 40005b20 <== NOT EXECUTED 400059e8: 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) 400059ec: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 400059f0: 80 a0 60 00 cmp %g1, 0 400059f4: 22 80 00 07 be,a 40005a10 400059f8: c2 04 00 00 ld [ %l0 ], %g1 (*tty->device.lastClose)(tty->major, tty->minor, arg); 400059fc: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 40005a00: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40005a04: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005a08: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40005a0c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40005a10: 80 a0 60 00 cmp %g1, 0 40005a14: 22 80 00 27 be,a 40005ab0 40005a18: c2 04 20 04 ld [ %l0 + 4 ], %g1 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 40005a1c: c4 04 20 04 ld [ %l0 + 4 ], %g2 40005a20: c4 20 60 04 st %g2, [ %g1 + 4 ] } if (tty->back == NULL) { 40005a24: c4 04 20 04 ld [ %l0 + 4 ], %g2 40005a28: 80 a0 a0 00 cmp %g2, 0 40005a2c: 22 80 00 2b be,a 40005ad8 40005a30: 05 10 00 7a sethi %hi(0x4001e800), %g2 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 40005a34: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40005a38: 40 00 04 58 call 40006b98 40005a3c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 40005a40: 40 00 04 56 call 40006b98 40005a44: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40005a48: 40 00 04 54 call 40006b98 40005a4c: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 40005a50: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40005a54: 80 a0 60 00 cmp %g1, 0 40005a58: 02 80 00 13 be 40005aa4 40005a5c: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 40005a60: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005a64: 80 a0 60 02 cmp %g1, 2 40005a68: 02 80 00 0f be 40005aa4 40005a6c: 01 00 00 00 nop rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 40005a70: 40 00 18 cd call 4000bda4 40005a74: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40005a78: 40 00 18 cb call 4000bda4 40005a7c: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40005a80: 40 00 18 c9 call 4000bda4 40005a84: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40005a88: 40 00 18 c7 call 4000bda4 40005a8c: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 40005a90: d0 04 63 04 ld [ %l1 + 0x304 ], %o0 40005a94: 40 00 04 b5 call 40006d68 40005a98: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40005a9c: 81 c7 e0 08 ret 40005aa0: 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); 40005aa4: 40 00 04 3d call 40006b98 <== NOT EXECUTED 40005aa8: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40005aac: 30 bf ff f1 b,a 40005a70 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 40005ab0: 05 10 00 7a sethi %hi(0x4001e800), %g2 if ( rtems_termios_ttyTail != NULL ) { 40005ab4: 80 a0 60 00 cmp %g1, 0 40005ab8: 02 80 00 27 be 40005b54 40005abc: c2 20 a3 08 st %g1, [ %g2 + 0x308 ] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 40005ac0: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 40005ac4: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 40005ac8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005acc: 12 bf ff da bne 40005a34 <== NOT EXECUTED 40005ad0: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 40005ad4: 05 10 00 7a sethi %hi(0x4001e800), %g2 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { 40005ad8: 80 a0 60 00 cmp %g1, 0 40005adc: 02 bf ff d7 be 40005a38 40005ae0: c2 20 a3 0c st %g1, [ %g2 + 0x30c ] rtems_termios_ttyHead->back = NULL; 40005ae4: 10 bf ff d5 b 40005a38 40005ae8: c0 20 60 04 clr [ %g1 + 4 ] } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005aec: 92 10 20 00 clr %o1 40005af0: 40 00 04 57 call 40006c4c 40005af4: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40005af8: 80 a2 20 00 cmp %o0, 0 40005afc: 12 80 00 14 bne 40005b4c 40005b00: 01 00 00 00 nop rtems_fatal_error_occurred (sc); } drainOutput (tty); 40005b04: 7f ff fd 80 call 40005104 40005b08: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40005b0c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005b10: 80 a0 60 02 cmp %g1, 2 40005b14: 32 bf ff b7 bne,a 400059f0 40005b18: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 40005b1c: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 40005b20: 40 00 03 0a call 40006748 <== NOT EXECUTED 40005b24: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40005b28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005b2c: 12 80 00 08 bne 40005b4c <== NOT EXECUTED 40005b30: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 40005b34: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40005b38: 40 00 03 04 call 40006748 <== NOT EXECUTED 40005b3c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40005b40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005b44: 22 bf ff ab be,a 400059f0 <== NOT EXECUTED 40005b48: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005b4c: 40 00 05 ef call 40007308 <== NOT EXECUTED 40005b50: 01 00 00 00 nop <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 40005b54: 03 10 00 7a sethi %hi(0x4001e800), %g1 40005b58: 10 bf ff b8 b 40005a38 40005b5c: c0 20 63 0c clr [ %g1 + 0x30c ] ! 4001eb0c 40004474 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40004474: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40004478: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4000447c: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40004480: 84 00 80 19 add %g2, %i1, %g2 <== NOT EXECUTED 40004484: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004488: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000448c: 02 80 00 10 be 400044cc <== NOT EXECUTED 40004490: 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 ) { 40004494: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40004498: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4000449c: 02 80 00 04 be 400044ac <== NOT EXECUTED 400044a0: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== 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); 400044a4: 7f ff ff 74 call 40004274 <== NOT EXECUTED 400044a8: 81 e8 00 00 restore <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400044ac: c2 00 60 a8 ld [ %g1 + 0xa8 ], %g1 <== NOT EXECUTED 400044b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044b4: 02 80 00 04 be 400044c4 <== NOT EXECUTED 400044b8: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 400044bc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400044c0: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 400044c4: 81 c7 e0 08 ret <== NOT EXECUTED 400044c8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 400044cc: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400044d0: 40 00 08 9e call 40006748 <== NOT EXECUTED 400044d4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 400044d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400044dc: 02 bf ff fa be 400044c4 <== NOT EXECUTED 400044e0: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400044e4: 40 00 0b 89 call 40007308 <== NOT EXECUTED 400044e8: 01 00 00 00 nop 400044ec: 01 00 00 00 nop 400044f0 : * 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) { 400044f0: 9d e3 bf a0 save %sp, -96, %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) { 400044f4: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400044f8: 23 10 00 79 sethi %hi(0x4001e400), %l1 <== NOT EXECUTED 400044fc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004500: a2 14 63 f4 or %l1, 0x3f4, %l1 <== NOT EXECUTED 40004504: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40004508: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED 4000450c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004510: 02 80 00 22 be 40004598 <== NOT EXECUTED 40004514: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED while (len--) { 40004518: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000451c: 22 80 00 0f be,a 40004558 <== NOT EXECUTED 40004520: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 40004524: 10 80 00 05 b 40004538 <== NOT EXECUTED 40004528: a4 10 20 00 clr %l2 <== NOT EXECUTED 4000452c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004530: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40004534: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40004538: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED 4000453c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004540: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004544: a4 04 a0 01 inc %l2 <== 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--) { 40004548: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED 4000454c: 32 bf ff f8 bne,a 4000452c <== NOT EXECUTED 40004550: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40004554: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 40004558: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000455c: 12 80 00 0d bne 40004590 <== NOT EXECUTED 40004560: 01 00 00 00 nop <== NOT EXECUTED 40004564: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 40004568: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000456c: 02 80 00 09 be 40004590 <== NOT EXECUTED 40004570: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004574: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 40004578: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000457c: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40004580: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004584: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED 40004588: 81 c7 e0 08 ret <== NOT EXECUTED 4000458c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 40004590: 81 c7 e0 08 ret <== NOT EXECUTED 40004594: 91 e8 20 00 restore %g0, 0, %o0 <== 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); 40004598: a2 10 00 1a mov %i2, %l1 <== 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, 4000459c: ae 06 20 4a add %i0, 0x4a, %l7 <== 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); 400045a0: ac 06 20 30 add %i0, 0x30, %l6 <== NOT EXECUTED 400045a4: a8 10 20 00 clr %l4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400045a8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400045ac: 02 80 00 1c be 4000461c <== NOT EXECUTED 400045b0: b0 10 20 00 clr %i0 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 400045b4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400045b8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400045bc: 02 80 00 0b be 400045e8 <== NOT EXECUTED 400045c0: 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]) { 400045c4: c4 0c 20 4a ldub [ %l0 + 0x4a ], %g2 <== NOT EXECUTED 400045c8: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED 400045cc: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 400045d0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400045d4: 02 80 00 63 be 40004760 <== NOT EXECUTED 400045d8: c4 0c 20 49 ldub [ %l0 + 0x49 ], %g2 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 400045dc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400045e0: 02 80 00 68 be 40004780 <== NOT EXECUTED 400045e4: 01 00 00 00 nop <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 400045e8: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 400045ec: 02 80 00 22 be 40004674 <== NOT EXECUTED 400045f0: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 400045f4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400045f8: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 400045fc: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 40004600: 02 80 00 0e be 40004638 <== NOT EXECUTED 40004604: 01 00 00 00 nop <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004608: b2 06 60 01 inc %i1 <== NOT EXECUTED 4000460c: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40004610: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40004614: 12 bf ff e8 bne 400045b4 <== NOT EXECUTED 40004618: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 4000461c: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40004620: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40004624: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40004628: 40 00 09 d0 call 40006d68 <== NOT EXECUTED 4000462c: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED return dropped; 40004630: 81 c7 e0 08 ret <== NOT EXECUTED 40004634: 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); 40004638: 7f ff f5 f7 call 40001e14 <== NOT EXECUTED 4000463c: 01 00 00 00 nop <== NOT EXECUTED 40004640: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40004644: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004648: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== 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; 4000464c: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 40004650: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004654: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004658: 12 80 00 57 bne 400047b4 <== NOT EXECUTED 4000465c: 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); 40004660: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40004664: 7f ff f5 f0 call 40001e24 <== NOT EXECUTED 40004668: b2 06 60 01 inc %i1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4000466c: 10 bf ff e9 b 40004610 <== NOT EXECUTED 40004670: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40004674: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 40004678: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 4000467c: 40 00 56 b8 call 4001a15c <.urem> <== NOT EXECUTED 40004680: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40004684: 7f ff f5 e4 call 40001e14 <== NOT EXECUTED 40004688: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED 4000468c: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 40004690: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 40004694: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 40004698: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 4000469c: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 400046a0: 40 00 56 af call 4001a15c <.urem> <== NOT EXECUTED 400046a4: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 400046a8: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 <== NOT EXECUTED 400046ac: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400046b0: 08 80 00 13 bleu 400046fc <== NOT EXECUTED 400046b4: 01 00 00 00 nop <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 400046b8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 400046bc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400046c0: 12 80 00 0f bne 400046fc <== NOT EXECUTED 400046c4: 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; 400046c8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400046cc: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 400046d0: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400046d4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400046d8: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 400046dc: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 400046e0: 02 80 00 3d be 400047d4 <== NOT EXECUTED 400046e4: 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)) 400046e8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400046ec: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 400046f0: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 400046f4: 02 80 00 49 be 40004818 <== NOT EXECUTED 400046f8: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 400046fc: 7f ff f5 ca call 40001e24 <== NOT EXECUTED 40004700: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40004704: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 40004708: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 4000470c: 22 80 00 22 be,a 40004794 <== NOT EXECUTED 40004710: b0 06 20 01 inc %i0 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 40004714: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40004718: e4 28 40 13 stb %l2, [ %g1 + %l3 ] <== 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 )) { 4000471c: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 40004720: e6 24 20 60 st %l3, [ %l0 + 0x60 ] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40004724: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004728: 32 bf ff b9 bne,a 4000460c <== NOT EXECUTED 4000472c: b2 06 60 01 inc %i1 <== NOT EXECUTED 40004730: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 40004734: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004738: 22 bf ff b5 be,a 4000460c <== NOT EXECUTED 4000473c: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004740: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 40004744: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004748: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4000474c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004750: 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; 40004754: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004758: 10 bf ff ae b 40004610 <== NOT EXECUTED 4000475c: a2 04 7f ff add %l1, -1, %l1 <== 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]) { 40004760: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004764: 02 80 00 0f be 400047a0 <== NOT EXECUTED 40004768: 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; 4000476c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 40004770: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 40004774: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 40004778: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 4000477c: 30 bf ff 9e b,a 400045f4 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 40004780: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 40004784: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 40004788: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 4000478c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 40004790: 30 bf ff 99 b,a 400045f4 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004794: b2 06 60 01 inc %i1 <== NOT EXECUTED 40004798: 10 bf ff 9e b 40004610 <== NOT EXECUTED 4000479c: a2 04 7f ff add %l1, -1, %l1 <== 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; 400047a0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 400047a4: a8 10 20 01 mov 1, %l4 <== 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; 400047a8: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED 400047ac: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 400047b0: 30 bf ff 91 b,a 400045f4 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 400047b4: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 <== 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, 400047b8: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 400047bc: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400047c0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400047c4: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 400047c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400047cc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400047d0: 30 bf ff a4 b,a 40004660 <== 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) || 400047d4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400047d8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400047dc: 12 80 00 06 bne 400047f4 <== NOT EXECUTED 400047e0: 01 00 00 00 nop <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 400047e4: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 400047e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400047ec: 12 bf ff c4 bne 400046fc <== NOT EXECUTED 400047f0: 01 00 00 00 nop <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 400047f4: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400047f8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400047fc: d0 04 20 10 ld [ %l0 + 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; 40004800: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004804: 92 10 00 17 mov %l7, %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; 40004808: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000480c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004810: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004814: 30 bf ff ba b,a 400046fc <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40004818: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4000481c: c2 04 20 ac ld [ %l0 + 0xac ], %g1 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40004820: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 40004824: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40004828: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000482c: 02 bf ff b4 be 400046fc <== NOT EXECUTED 40004830: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40004834: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004838: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 4000483c: 30 bf ff b0 b,a 400046fc <== NOT EXECUTED 400041ec : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 400041ec: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 400041f0: 19 10 00 7a sethi %hi(0x4001e800), %o4 400041f4: c2 03 23 04 ld [ %o4 + 0x304 ], %g1 ! 4001eb04 400041f8: 80 a0 60 00 cmp %g1, 0 400041fc: 02 80 00 04 be 4000420c 40004200: 98 13 23 04 or %o4, 0x304, %o4 40004204: 81 c7 e0 08 ret 40004208: 81 e8 00 00 restore sc = rtems_semaphore_create ( 4000420c: 11 15 14 9b sethi %hi(0x54526c00), %o0 40004210: 92 10 20 01 mov 1, %o1 40004214: 90 12 21 69 or %o0, 0x169, %o0 40004218: 94 10 20 54 mov 0x54, %o2 4000421c: 40 00 09 eb call 400069c8 40004220: 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) 40004224: 80 a2 20 00 cmp %o0, 0 40004228: 02 bf ff f7 be 40004204 4000422c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40004230: 40 00 0c 36 call 40007308 <== NOT EXECUTED 40004234: 01 00 00 00 nop 40004238: 01 00 00 00 nop 40005564 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40005564: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005568: c2 06 00 00 ld [ %i0 ], %g1 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 4000556c: c0 26 20 0c clr [ %i0 + 0xc ] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005570: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40005574: e4 06 20 08 ld [ %i0 + 8 ], %l2 rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005578: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 4000557c: 92 10 20 00 clr %o1 40005580: 40 00 05 b3 call 40006c4c 40005584: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40005588: a2 92 20 00 orcc %o0, 0, %l1 4000558c: 32 80 00 16 bne,a 400055e4 40005590: e2 26 20 0c st %l1, [ %i0 + 0xc ] <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 40005594: c2 06 20 04 ld [ %i0 + 4 ], %g1 40005598: 80 a0 60 04 cmp %g1, 4 4000559c: 22 80 00 0c be,a 400055cc 400055a0: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400055a4: 18 80 00 12 bgu 400055ec 400055a8: 05 10 01 19 sethi %hi(0x40046400), %g2 400055ac: 80 a0 60 02 cmp %g1, 2 400055b0: 22 80 00 26 be,a 40005648 400055b4: d2 06 20 08 ld [ %i0 + 8 ], %o1 400055b8: 08 80 00 81 bleu 400057bc 400055bc: 80 a0 60 01 cmp %g1, 1 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 400055c0: 7f ff fe d1 call 40005104 400055c4: 90 10 00 10 mov %l0, %o0 break; 400055c8: 30 80 00 04 b,a 400055d8 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 400055cc: c2 24 20 dc st %g1, [ %l0 + 0xdc ] <== NOT EXECUTED 400055d0: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED 400055d4: c2 24 20 e0 st %g1, [ %l0 + 0xe0 ] <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 400055d8: 40 00 05 e4 call 40006d68 400055dc: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 args->ioctl_return = sc; 400055e0: e2 26 20 0c st %l1, [ %i0 + 0xc ] return sc; } 400055e4: 81 c7 e0 08 ret 400055e8: 91 e8 00 11 restore %g0, %l1, %o0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 400055ec: 84 10 a2 7f or %g2, 0x27f, %g2 <== NOT EXECUTED 400055f0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400055f4: 02 80 00 66 be 4000578c <== NOT EXECUTED 400055f8: 01 00 00 00 nop <== NOT EXECUTED 400055fc: 18 80 00 77 bgu 400057d8 <== NOT EXECUTED 40005600: 05 10 01 1d sethi %hi(0x40047400), %g2 <== NOT EXECUTED 40005604: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40005608: 22 80 00 98 be,a 40005868 <== NOT EXECUTED 4000560c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40005610: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40005614: 03 10 00 79 sethi %hi(0x4001e400), %g1 <== NOT EXECUTED 40005618: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 4000561c: 82 10 63 f4 or %g1, 0x3f4, %g1 <== NOT EXECUTED 40005620: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40005624: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40005628: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000562c: 02 bf ff eb be 400055d8 <== NOT EXECUTED 40005630: a2 10 20 0a mov 0xa, %l1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40005634: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005638: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000563c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40005640: 10 bf ff e6 b 400055d8 <== NOT EXECUTED 40005644: a2 10 00 08 mov %o0, %l1 <== 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; 40005648: a4 04 20 30 add %l0, 0x30, %l2 4000564c: 94 10 20 24 mov 0x24, %o2 40005650: 40 00 2e c1 call 40011154 40005654: 90 10 00 12 mov %l2, %o0 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 40005658: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 4000565c: 80 88 62 00 btst 0x200, %g1 40005660: 02 80 00 19 be 400056c4 40005664: 01 00 00 00 nop 40005668: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000566c: 80 88 64 00 btst 0x400, %g1 40005670: 12 80 00 15 bne 400056c4 40005674: 01 00 00 00 nop !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 40005678: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 4000567c: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 40005680: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 40005684: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005688: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 4000568c: 02 80 00 0e be 400056c4 <== NOT EXECUTED 40005690: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40005694: 7f ff f1 e0 call 40001e14 <== NOT EXECUTED 40005698: 01 00 00 00 nop <== NOT EXECUTED 4000569c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400056a0: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400056a4: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== 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; 400056a8: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 400056ac: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400056b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400056b4: 12 80 00 a7 bne 40005950 <== NOT EXECUTED 400056b8: 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); 400056bc: 7f ff f1 da call 40001e24 <== NOT EXECUTED 400056c0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 400056c4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 400056c8: 80 88 64 00 btst 0x400, %g1 400056cc: 02 80 00 0c be 400056fc 400056d0: 03 00 00 04 sethi %hi(0x1000), %g1 400056d4: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 400056d8: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400056dc: 12 80 00 08 bne 400056fc <== NOT EXECUTED 400056e0: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 400056e4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400056e8: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 400056ec: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 400056f0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400056f4: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 400056f8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 400056fc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40005700: 80 88 61 00 btst 0x100, %g1 40005704: 12 80 00 5d bne 40005878 40005708: c4 04 20 38 ld [ %l0 + 0x38 ], %g2 /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 4000570c: 80 a0 a0 00 cmp %g2, 0 40005710: 06 80 00 84 bl 40005920 40005714: 01 00 00 00 nop tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40005718: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000571c: 05 00 00 04 sethi %hi(0x1000), %g2 40005720: 80 88 40 02 btst %g1, %g2 40005724: 02 80 00 06 be 4000573c 40005728: 80 88 64 00 btst 0x400, %g1 tty->flow_ctrl |= FL_MDXOF; 4000572c: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED 40005730: 84 10 a4 00 or %g2, 0x400, %g2 <== NOT EXECUTED 40005734: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 40005738: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 4000573c: 22 80 00 06 be,a 40005754 40005740: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40005744: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40005748: 82 10 62 00 or %g1, 0x200, %g1 4000574c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 40005750: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 40005754: 80 88 60 02 btst 2, %g1 40005758: 02 80 00 5e be 400058d0 4000575c: 01 00 00 00 nop else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005760: c0 24 20 6c clr [ %l0 + 0x6c ] tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40005764: c0 24 20 70 clr [ %l0 + 0x70 ] tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40005768: c0 24 20 74 clr [ %l0 + 0x74 ] else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4000576c: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 40005770: 80 a0 60 00 cmp %g1, 0 40005774: 02 bf ff 99 be 400055d8 40005778: 01 00 00 00 nop (*tty->device.setAttributes)(tty->minor, &tty->termios); 4000577c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 40005780: 9f c0 40 00 call %g1 40005784: 92 10 00 12 mov %l2, %o1 40005788: 30 bf ff 94 b,a 400055d8 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 4000578c: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 40005790: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40005794: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED 40005798: 0c 80 00 5f bneg 40005914 <== NOT EXECUTED 4000579c: 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; 400057a0: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED 400057a4: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 400057a8: c6 06 20 08 ld [ %i0 + 8 ], %g3 <== NOT EXECUTED 400057ac: 84 21 00 02 sub %g4, %g2, %g2 <== NOT EXECUTED 400057b0: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 400057b4: 10 bf ff 89 b 400055d8 <== NOT EXECUTED 400057b8: c2 20 c0 00 st %g1, [ %g3 ] <== 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) { 400057bc: 32 bf ff 96 bne,a 40005614 400057c0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 400057c4: d0 06 20 08 ld [ %i0 + 8 ], %o0 400057c8: 92 04 20 30 add %l0, 0x30, %o1 400057cc: 40 00 2e 62 call 40011154 400057d0: 94 10 20 24 mov 0x24, %o2 break; 400057d4: 30 bf ff 81 b,a 400055d8 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 400057d8: 84 10 a0 1a or %g2, 0x1a, %g2 <== NOT EXECUTED 400057dc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400057e0: 02 80 00 1e be 40005858 <== NOT EXECUTED 400057e4: 05 20 01 1d sethi %hi(0x80047400), %g2 <== NOT EXECUTED 400057e8: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <== NOT EXECUTED 400057ec: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400057f0: 32 bf ff 89 bne,a 40005614 <== NOT EXECUTED 400057f4: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400057f8: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 400057fc: 25 10 00 79 sethi %hi(0x4001e400), %l2 <== NOT EXECUTED 40005800: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40005804: a4 14 a3 f4 or %l2, 0x3f4, %l2 <== NOT EXECUTED 40005808: 82 04 80 01 add %l2, %g1, %g1 <== NOT EXECUTED 4000580c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40005810: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005814: 22 80 00 06 be,a 4000582c <== NOT EXECUTED 40005818: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 4000581c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005820: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005824: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 40005828: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 4000582c: c0 24 20 d0 clr [ %l0 + 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); 40005830: c4 00 40 00 ld [ %g1 ], %g2 <== 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) { 40005834: 83 28 a0 05 sll %g2, 5, %g1 <== NOT EXECUTED 40005838: c2 04 80 01 ld [ %l2 + %g1 ], %g1 <== NOT EXECUTED 4000583c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005840: 02 bf ff 66 be 400055d8 <== NOT EXECUTED 40005844: c4 24 20 cc st %g2, [ %l0 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 40005848: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000584c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005850: 10 bf ff 62 b 400055d8 <== NOT EXECUTED 40005854: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 40005858: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 4000585c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED break; 40005860: 10 bf ff 5e b 400055d8 <== NOT EXECUTED 40005864: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 40005868: c2 24 20 d4 st %g1, [ %l0 + 0xd4 ] <== NOT EXECUTED 4000586c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 40005870: 10 bf ff 5a b 400055d8 <== NOT EXECUTED 40005874: c2 24 20 d8 st %g1, [ %l0 + 0xd8 ] <== 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) && 40005878: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000587c: 06 80 00 29 bl 40005920 <== NOT EXECUTED 40005880: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 40005884: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005888: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 4000588c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 40005890: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005894: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40005898: 02 80 00 09 be 400058bc <== NOT EXECUTED 4000589c: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 400058a0: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 400058a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400058a8: 02 80 00 05 be 400058bc <== NOT EXECUTED 400058ac: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400058b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400058b4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400058b8: c4 04 20 38 ld [ %l0 + 0x38 ], %g2 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400058bc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400058c0: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400058c4: c2 24 20 b8 st %g1, [ %l0 + 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) { 400058c8: 10 bf ff 92 b 40005710 <== NOT EXECUTED 400058cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 400058d0: 40 00 03 12 call 40006518 <== NOT EXECUTED 400058d4: e6 0c 20 46 ldub [ %l0 + 0x46 ], %l3 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 400058d8: 40 00 51 3b call 40019dc4 <.umul> <== NOT EXECUTED 400058dc: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 400058e0: 40 00 51 73 call 40019eac <.udiv> <== NOT EXECUTED 400058e4: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 400058e8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400058ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400058f0: 02 80 00 11 be 40005934 <== NOT EXECUTED 400058f4: d0 24 20 54 st %o0, [ %l0 + 0x54 ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 400058f8: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 400058fc: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40005900: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005904: 12 bf ff 99 bne 40005768 <== NOT EXECUTED 40005908: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 4000590c: 10 bf ff 98 b 4000576c <== NOT EXECUTED 40005910: d0 24 20 74 st %o0, [ %l0 + 0x74 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 40005914: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40005918: 10 bf ff a2 b 400057a0 <== NOT EXECUTED 4000591c: 82 00 40 02 add %g1, %g2, %g1 <== 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; 40005920: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005924: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40005928: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 4000592c: 10 bf ff 7c b 4000571c <== NOT EXECUTED 40005930: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 40005934: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40005938: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000593c: 32 bf ff 8a bne,a 40005764 <== NOT EXECUTED 40005940: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 40005944: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40005948: 10 bf ff 89 b 4000576c <== NOT EXECUTED 4000594c: c2 24 20 6c st %g1, [ %l0 + 0x6c ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 40005950: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 <== 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, 40005954: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40005958: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 4000595c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40005960: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40005964: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005968: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 4000596c: 30 bf ff 54 b,a 400056bc <== NOT EXECUTED 40005ae8 : #include int rtems_termios_number_to_baud( int32_t baud ) { 40005ae8: 82 10 00 08 mov %o0, %g1 int termios_baud; switch (baud) { 40005aec: 80 a2 24 b0 cmp %o0, 0x4b0 40005af0: 02 80 00 32 be 40005bb8 40005af4: 90 10 20 09 mov 9, %o0 40005af8: 80 a0 64 b0 cmp %g1, 0x4b0 40005afc: 04 80 00 1e ble 40005b74 40005b00: 80 a0 60 86 cmp %g1, 0x86 40005b04: 05 00 00 12 sethi %hi(0x4800), %g2 40005b08: 84 10 a3 00 or %g2, 0x300, %g2 ! 4b00 40005b0c: 80 a0 40 02 cmp %g1, %g2 40005b10: 02 80 00 2a be 40005bb8 40005b14: 90 10 20 0e mov 0xe, %o0 40005b18: 80 a0 40 02 cmp %g1, %g2 40005b1c: 04 80 00 29 ble 40005bc0 40005b20: 80 a0 69 60 cmp %g1, 0x960 40005b24: 07 00 00 70 sethi %hi(0x1c000), %g3 case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 40005b28: 05 00 00 04 sethi %hi(0x1000), %g2 int32_t baud ) { int termios_baud; switch (baud) { 40005b2c: 86 10 e2 00 or %g3, 0x200, %g3 40005b30: 80 a0 40 03 cmp %g1, %g3 40005b34: 02 80 00 21 be 40005bb8 40005b38: 90 10 a0 02 or %g2, 2, %o0 40005b3c: 80 a0 40 03 cmp %g1, %g3 40005b40: 04 80 00 46 ble 40005c58 40005b44: 07 00 00 25 sethi %hi(0x9400), %g3 40005b48: 07 00 00 e1 sethi %hi(0x38400), %g3 40005b4c: 80 a0 40 03 cmp %g1, %g3 40005b50: 02 80 00 1a be 40005bb8 40005b54: 90 10 a0 03 or %g2, 3, %o0 case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 40005b58: 90 10 a0 04 or %g2, 4, %o0 int32_t baud ) { int termios_baud; switch (baud) { 40005b5c: 05 00 01 c2 sethi %hi(0x70800), %g2 40005b60: 80 a0 40 02 cmp %g1, %g2 40005b64: 02 80 00 4b be 40005c90 40005b68: 01 00 00 00 nop case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 40005b6c: 81 c3 e0 08 retl 40005b70: 90 10 3f ff mov -1, %o0 ! ffffffff int32_t baud ) { int termios_baud; switch (baud) { 40005b74: 02 80 00 11 be 40005bb8 40005b78: 90 10 20 04 mov 4, %o0 40005b7c: 80 a0 60 86 cmp %g1, 0x86 40005b80: 04 80 00 21 ble 40005c04 40005b84: 80 a0 60 32 cmp %g1, 0x32 40005b88: 80 a0 60 c8 cmp %g1, 0xc8 40005b8c: 02 80 00 0b be 40005bb8 40005b90: 90 10 20 06 mov 6, %o0 40005b94: 80 a0 60 c8 cmp %g1, 0xc8 40005b98: 04 80 00 28 ble 40005c38 40005b9c: 80 a0 60 96 cmp %g1, 0x96 40005ba0: 80 a0 61 2c cmp %g1, 0x12c 40005ba4: 02 80 00 05 be 40005bb8 40005ba8: 90 10 20 07 mov 7, %o0 40005bac: 80 a0 62 58 cmp %g1, 0x258 40005bb0: 12 bf ff ef bne 40005b6c 40005bb4: 90 10 20 08 mov 8, %o0 40005bb8: 81 c3 e0 08 retl 40005bbc: 01 00 00 00 nop 40005bc0: 02 bf ff fe be 40005bb8 40005bc4: 90 10 20 0b mov 0xb, %o0 ! b 40005bc8: 80 a0 69 60 cmp %g1, 0x960 40005bcc: 04 80 00 2f ble 40005c88 40005bd0: 80 a0 67 08 cmp %g1, 0x708 40005bd4: 05 00 00 04 sethi %hi(0x1000), %g2 40005bd8: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 12c0 40005bdc: 80 a0 40 02 cmp %g1, %g2 40005be0: 02 bf ff f6 be 40005bb8 40005be4: 90 10 20 0c mov 0xc, %o0 40005be8: 05 00 00 09 sethi %hi(0x2400), %g2 40005bec: 84 10 a1 80 or %g2, 0x180, %g2 ! 2580 40005bf0: 80 a0 40 02 cmp %g1, %g2 40005bf4: 12 bf ff de bne 40005b6c 40005bf8: 90 10 20 0d mov 0xd, %o0 40005bfc: 81 c3 e0 08 retl 40005c00: 01 00 00 00 nop 40005c04: 02 bf ff ed be 40005bb8 40005c08: 90 10 20 01 mov 1, %o0 ! 1 40005c0c: 80 a0 60 32 cmp %g1, 0x32 40005c10: 04 80 00 0e ble 40005c48 40005c14: 80 a0 60 00 cmp %g1, 0 40005c18: 80 a0 60 4b cmp %g1, 0x4b 40005c1c: 02 bf ff e7 be 40005bb8 40005c20: 90 10 20 02 mov 2, %o0 40005c24: 80 a0 60 6e cmp %g1, 0x6e 40005c28: 12 bf ff d1 bne 40005b6c 40005c2c: 90 10 20 03 mov 3, %o0 40005c30: 81 c3 e0 08 retl 40005c34: 01 00 00 00 nop 40005c38: 12 bf ff cd bne 40005b6c 40005c3c: 90 10 20 05 mov 5, %o0 ! 5 40005c40: 81 c3 e0 08 retl 40005c44: 01 00 00 00 nop 40005c48: 12 bf ff c9 bne 40005b6c 40005c4c: 90 10 20 00 clr %o0 ! 0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 40005c50: 81 c3 e0 08 retl 40005c54: 01 00 00 00 nop int32_t baud ) { int termios_baud; switch (baud) { 40005c58: 86 10 e2 00 or %g3, 0x200, %g3 40005c5c: 80 a0 40 03 cmp %g1, %g3 40005c60: 02 bf ff d6 be 40005bb8 40005c64: 90 10 20 0f mov 0xf, %o0 case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 40005c68: 90 10 a0 01 or %g2, 1, %o0 int32_t baud ) { int termios_baud; switch (baud) { 40005c6c: 05 00 00 38 sethi %hi(0xe000), %g2 40005c70: 84 10 a1 00 or %g2, 0x100, %g2 ! e100 40005c74: 80 a0 40 02 cmp %g1, %g2 40005c78: 32 bf ff d0 bne,a 40005bb8 40005c7c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40005c80: 81 c3 e0 08 retl 40005c84: 01 00 00 00 nop 40005c88: 12 bf ff b9 bne 40005b6c 40005c8c: 90 10 20 0a mov 0xa, %o0 ! a 40005c90: 81 c3 e0 08 retl 40005c94: 01 00 00 00 nop 40005b60 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 40005b60: 9d e3 bf a0 save %sp, -96, %sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 40005b64: 23 10 00 7a sethi %hi(0x4001e800), %l1 40005b68: d0 04 63 04 ld [ %l1 + 0x304 ], %o0 ! 4001eb04 40005b6c: 92 10 20 00 clr %o1 40005b70: 40 00 04 37 call 40006c4c 40005b74: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40005b78: a0 92 20 00 orcc %o0, 0, %l0 40005b7c: 32 80 00 29 bne,a 40005c20 40005b80: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40005b84: 29 10 00 7a sethi %hi(0x4001e800), %l4 40005b88: e4 05 23 0c ld [ %l4 + 0x30c ], %l2 ! 4001eb0c 40005b8c: 80 a4 a0 00 cmp %l2, 0 40005b90: 32 80 00 08 bne,a 40005bb0 40005b94: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005b98: 10 80 00 33 b 40005c64 40005b9c: 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) { 40005ba0: 80 a4 a0 00 cmp %l2, 0 40005ba4: 02 80 00 30 be 40005c64 40005ba8: 90 10 20 01 mov 1, %o0 if ((tty->major == major) && (tty->minor == minor)) 40005bac: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 <== NOT EXECUTED 40005bb0: 80 a0 40 18 cmp %g1, %i0 40005bb4: 32 bf ff fb bne,a 40005ba0 40005bb8: e4 04 80 00 ld [ %l2 ], %l2 40005bbc: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 40005bc0: 80 a0 40 19 cmp %g1, %i1 40005bc4: 32 bf ff f7 bne,a 40005ba0 40005bc8: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 40005bcc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40005bd0: c6 06 80 00 ld [ %i2 ], %g3 if (!tty->refcount++) { 40005bd4: 84 00 60 01 add %g1, 1, %g2 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40005bd8: e4 20 e0 38 st %l2, [ %g3 + 0x38 ] if (!tty->refcount++) { 40005bdc: 80 a0 60 00 cmp %g1, 0 40005be0: 12 80 00 0d bne 40005c14 40005be4: c4 24 a0 08 st %g2, [ %l2 + 8 ] if (tty->device.firstOpen) 40005be8: c2 04 a0 98 ld [ %l2 + 0x98 ], %g1 40005bec: 80 a0 60 00 cmp %g1, 0 40005bf0: 02 80 00 05 be 40005c04 40005bf4: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 40005bf8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40005bfc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005c00: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005c04: c2 04 a0 b4 ld [ %l2 + 0xb4 ], %g1 40005c08: 80 a0 60 02 cmp %g1, 2 40005c0c: 22 80 00 07 be,a 40005c28 40005c10: d0 04 a0 c4 ld [ %l2 + 0xc4 ], %o0 <== NOT EXECUTED (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 40005c14: 40 00 04 55 call 40006d68 40005c18: d0 04 63 04 ld [ %l1 + 0x304 ], %o0 return RTEMS_SUCCESSFUL; } 40005c1c: b0 10 00 10 mov %l0, %i0 40005c20: 81 c7 e0 08 ret 40005c24: 81 e8 00 00 restore (*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, 40005c28: 13 10 00 18 sethi %hi(0x40006000), %o1 <== NOT EXECUTED 40005c2c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40005c30: 40 00 05 22 call 400070b8 <== NOT EXECUTED 40005c34: 92 12 60 50 or %o1, 0x50, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005c38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005c3c: 12 80 00 bf bne 40005f38 <== NOT EXECUTED 40005c40: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 40005c44: d0 04 a0 c8 ld [ %l2 + 0xc8 ], %o0 <== NOT EXECUTED 40005c48: 13 10 00 17 sethi %hi(0x40005c00), %o1 <== NOT EXECUTED 40005c4c: 40 00 05 1b call 400070b8 <== NOT EXECUTED 40005c50: 92 12 63 b8 or %o1, 0x3b8, %o1 ! 40005fb8 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005c54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005c58: 02 bf ff ef be 40005c14 <== NOT EXECUTED 40005c5c: 01 00 00 00 nop <== NOT EXECUTED 40005c60: 30 80 00 b6 b,a 40005f38 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005c64: 40 00 18 0b call 4000bc90 40005c68: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 40005c6c: a6 92 20 00 orcc %o0, 0, %l3 40005c70: 02 80 00 99 be 40005ed4 40005c74: a4 10 00 13 mov %l3, %l2 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40005c78: 03 10 00 78 sethi %hi(0x4001e000), %g1 40005c7c: c2 00 62 2c ld [ %g1 + 0x22c ], %g1 ! 4001e22c 40005c80: c2 24 e0 64 st %g1, [ %l3 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40005c84: d0 04 e0 64 ld [ %l3 + 0x64 ], %o0 40005c88: 40 00 19 c7 call 4000c3a4 40005c8c: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 40005c90: 80 a2 20 00 cmp %o0, 0 40005c94: 02 80 00 8e be 40005ecc 40005c98: d0 24 e0 58 st %o0, [ %l3 + 0x58 ] return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40005c9c: 03 10 00 78 sethi %hi(0x4001e000), %g1 40005ca0: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 4001e230 40005ca4: c2 24 e0 88 st %g1, [ %l3 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40005ca8: d0 04 e0 88 ld [ %l3 + 0x88 ], %o0 40005cac: 40 00 19 be call 4000c3a4 40005cb0: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40005cb4: 80 a2 20 00 cmp %o0, 0 40005cb8: 02 80 00 8c be 40005ee8 40005cbc: d0 24 e0 7c st %o0, [ %l3 + 0x7c ] return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40005cc0: 03 10 00 78 sethi %hi(0x4001e000), %g1 40005cc4: 40 00 19 b8 call 4000c3a4 40005cc8: d0 00 62 28 ld [ %g1 + 0x228 ], %o0 ! 4001e228 if (tty->cbuf == NULL) { 40005ccc: 80 a2 20 00 cmp %o0, 0 40005cd0: 02 80 00 9c be 40005f40 40005cd4: d0 24 e0 1c st %o0, [ %l3 + 0x1c ] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005cd8: c2 05 23 0c ld [ %l4 + 0x30c ], %g1 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 40005cdc: c0 24 e0 d4 clr [ %l3 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40005ce0: c0 24 e0 d8 clr [ %l3 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40005ce4: c0 24 e0 dc clr [ %l3 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40005ce8: c0 24 e0 e0 clr [ %l3 + 0xe0 ] tty->tty_rcvwakeup = 0; 40005cec: c0 24 e0 e4 clr [ %l3 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005cf0: c2 24 c0 00 st %g1, [ %l3 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40005cf4: 80 a0 60 00 cmp %g1, 0 40005cf8: 02 80 00 03 be 40005d04 40005cfc: c0 24 e0 04 clr [ %l3 + 4 ] rtems_termios_ttyHead->back = tty; 40005d00: e6 20 60 04 st %l3, [ %g1 + 4 ] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40005d04: 03 10 00 7a sethi %hi(0x4001e800), %g1 40005d08: c4 00 63 08 ld [ %g1 + 0x308 ], %g2 ! 4001eb08 40005d0c: 80 a0 a0 00 cmp %g2, 0 40005d10: 02 80 00 a8 be 40005fb0 40005d14: e6 25 23 0c st %l3, [ %l4 + 0x30c ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40005d18: 29 10 00 78 sethi %hi(0x4001e000), %l4 40005d1c: d0 4d 22 34 ldsb [ %l4 + 0x234 ], %o0 ! 4001e234 40005d20: 03 15 14 9a sethi %hi(0x54526800), %g1 40005d24: 82 10 61 00 or %g1, 0x100, %g1 ! 54526900 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 40005d28: f2 24 e0 10 st %i1, [ %l3 + 0x10 ] tty->major = major; 40005d2c: f0 24 e0 0c st %i0, [ %l3 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40005d30: 90 12 00 01 or %o0, %g1, %o0 40005d34: 92 10 20 01 mov 1, %o1 40005d38: 94 10 20 54 mov 0x54, %o2 40005d3c: 96 10 20 00 clr %o3 40005d40: 40 00 03 22 call 400069c8 40005d44: 98 04 e0 14 add %l3, 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) 40005d48: 80 a2 20 00 cmp %o0, 0 40005d4c: 12 80 00 7b bne 40005f38 40005d50: 03 15 14 9b sethi %hi(0x54526c00), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40005d54: d0 4d 22 34 ldsb [ %l4 + 0x234 ], %o0 40005d58: 82 10 63 00 or %g1, 0x300, %g1 40005d5c: 92 10 20 01 mov 1, %o1 40005d60: 90 12 00 01 or %o0, %g1, %o0 40005d64: 94 10 20 54 mov 0x54, %o2 40005d68: 96 10 20 00 clr %o3 40005d6c: 40 00 03 17 call 400069c8 40005d70: 98 04 e0 18 add %l3, 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) 40005d74: 80 a2 20 00 cmp %o0, 0 40005d78: 12 80 00 70 bne 40005f38 40005d7c: 03 15 14 9e sethi %hi(0x54527800), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40005d80: d0 4d 22 34 ldsb [ %l4 + 0x234 ], %o0 40005d84: 92 10 20 00 clr %o1 40005d88: 90 12 00 01 or %o0, %g1, %o0 40005d8c: 94 10 20 20 mov 0x20, %o2 40005d90: 96 10 20 00 clr %o3 40005d94: 40 00 03 0d call 400069c8 40005d98: 98 04 e0 8c add %l3, 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) 40005d9c: 80 a2 20 00 cmp %o0, 0 40005da0: 12 80 00 66 bne 40005f38 40005da4: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40005da8: c0 24 e0 94 clr [ %l3 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 40005dac: 90 04 e0 98 add %l3, 0x98, %o0 40005db0: 40 00 2c e9 call 40011154 40005db4: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005db8: c2 04 e0 b4 ld [ %l3 + 0xb4 ], %g1 40005dbc: 80 a0 60 02 cmp %g1, 2 40005dc0: 02 80 00 65 be 40005f54 40005dc4: d0 4d 22 34 ldsb [ %l4 + 0x234 ], %o0 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 40005dc8: c2 04 e0 a0 ld [ %l3 + 0xa0 ], %g1 40005dcc: 80 a0 60 00 cmp %g1, 0 40005dd0: 02 80 00 4f be 40005f0c 40005dd4: d0 4d 22 34 ldsb [ %l4 + 0x234 ], %o0 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 40005dd8: c2 04 e0 b4 ld [ %l3 + 0xb4 ], %g1 40005ddc: 80 a0 60 02 cmp %g1, 2 40005de0: 02 80 00 4c be 40005f10 40005de4: 03 15 14 9c sethi %hi(0x54527000), %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; 40005de8: c0 24 e0 b8 clr [ %l3 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40005dec: c6 04 e0 64 ld [ %l3 + 0x64 ], %g3 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40005df0: c2 0d 22 34 ldub [ %l4 + 0x234 ], %g1 /* 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; 40005df4: 87 30 e0 01 srl %g3, 1, %g3 40005df8: c6 24 e0 bc st %g3, [ %l3 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40005dfc: 07 00 00 09 sethi %hi(0x2400), %g3 40005e00: 86 10 e1 02 or %g3, 0x102, %g3 ! 2502 40005e04: c6 24 e0 30 st %g3, [ %l3 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40005e08: 07 00 00 06 sethi %hi(0x1800), %g3 40005e0c: 86 10 e0 05 or %g3, 5, %g3 ! 1805 40005e10: c6 24 e0 34 st %g3, [ %l3 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40005e14: 86 10 28 bd mov 0x8bd, %g3 40005e18: c6 24 e0 38 st %g3, [ %l3 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40005e1c: 07 00 00 20 sethi %hi(0x8000), %g3 40005e20: 86 10 e2 3b or %g3, 0x23b, %g3 ! 823b 40005e24: c6 24 e0 3c st %g3, [ %l3 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 40005e28: 86 10 20 03 mov 3, %g3 40005e2c: c6 2c e0 41 stb %g3, [ %l3 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40005e30: 86 10 20 1c mov 0x1c, %g3 40005e34: c6 2c e0 42 stb %g3, [ %l3 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40005e38: 86 10 20 7f mov 0x7f, %g3 40005e3c: c6 2c e0 43 stb %g3, [ %l3 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40005e40: 86 10 20 15 mov 0x15, %g3 40005e44: c6 2c e0 44 stb %g3, [ %l3 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40005e48: 86 10 20 04 mov 4, %g3 40005e4c: c6 2c e0 45 stb %g3, [ %l3 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40005e50: 86 10 20 11 mov 0x11, %g3 40005e54: c6 2c e0 49 stb %g3, [ %l3 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 40005e58: 86 10 20 13 mov 0x13, %g3 40005e5c: c6 2c e0 4a stb %g3, [ %l3 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40005e60: 86 10 20 1a mov 0x1a, %g3 40005e64: c6 2c e0 4b stb %g3, [ %l3 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 40005e68: 86 10 20 12 mov 0x12, %g3 40005e6c: c6 2c e0 4d stb %g3, [ %l3 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40005e70: 86 10 20 0f mov 0xf, %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; 40005e74: c4 04 e0 64 ld [ %l3 + 0x64 ], %g2 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 40005e78: c6 2c e0 4e stb %g3, [ %l3 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40005e7c: 86 10 20 17 mov 0x17, %g3 40005e80: c6 2c e0 4f stb %g3, [ %l3 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40005e84: 86 10 20 16 mov 0x16, %g3 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'; 40005e88: c0 2c e0 4c clrb [ %l3 + 0x4c ] 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'; 40005e8c: c6 2c e0 50 stb %g3, [ %l3 + 0x50 ] 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'; 40005e90: c0 2c e0 51 clrb [ %l3 + 0x51 ] 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; 40005e94: 87 28 a0 01 sll %g2, 1, %g3 40005e98: 84 00 c0 02 add %g3, %g2, %g2 40005e9c: 85 30 a0 02 srl %g2, 2, %g2 40005ea0: c4 24 e0 c0 st %g2, [ %l3 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 40005ea4: 84 00 60 01 add %g1, 1, %g2 40005ea8: 83 28 60 18 sll %g1, 0x18, %g1 40005eac: 83 38 60 18 sra %g1, 0x18, %g1 40005eb0: 80 a0 60 7a cmp %g1, 0x7a 40005eb4: 12 bf ff 46 bne 40005bcc 40005eb8: c4 2d 22 34 stb %g2, [ %l4 + 0x234 ] c = 'a'; 40005ebc: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 40005ec0: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 40005ec4: 10 bf ff 42 b 40005bcc <== NOT EXECUTED 40005ec8: c4 28 62 34 stb %g2, [ %g1 + 0x234 ] ! 4001e234 <== 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); 40005ecc: 40 00 17 b6 call 4000bda4 <== NOT EXECUTED 40005ed0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005ed4: d0 04 63 04 ld [ %l1 + 0x304 ], %o0 <== NOT EXECUTED 40005ed8: 40 00 03 a4 call 40006d68 <== NOT EXECUTED 40005edc: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 40005ee0: 81 c7 e0 08 ret <== NOT EXECUTED 40005ee4: 91 e8 00 10 restore %g0, %l0, %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)); 40005ee8: d0 04 e0 58 ld [ %l3 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40005eec: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); 40005ef0: 40 00 17 ad call 4000bda4 <== NOT EXECUTED 40005ef4: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED free(tty); 40005ef8: 40 00 17 ab call 4000bda4 <== NOT EXECUTED 40005efc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005f00: 40 00 03 9a call 40006d68 <== NOT EXECUTED 40005f04: d0 04 63 04 ld [ %l1 + 0x304 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 40005f08: 30 bf ff 46 b,a 40005c20 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 40005f0c: 03 15 14 9c sethi %hi(0x54527000), %g1 <== NOT EXECUTED 40005f10: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <== NOT EXECUTED 40005f14: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005f18: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40005f1c: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40005f20: 96 10 20 00 clr %o3 <== NOT EXECUTED 40005f24: 40 00 02 a9 call 400069c8 <== NOT EXECUTED 40005f28: 98 04 e0 68 add %l3, 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) 40005f2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005f30: 02 bf ff ae be 40005de8 <== NOT EXECUTED 40005f34: 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); 40005f38: 40 00 04 f4 call 40007308 <== NOT EXECUTED 40005f3c: 01 00 00 00 nop <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 40005f40: d0 04 e0 7c ld [ %l3 + 0x7c ], %o0 <== NOT EXECUTED 40005f44: 40 00 17 98 call 4000bda4 <== NOT EXECUTED 40005f48: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40005f4c: 10 bf ff e9 b 40005ef0 <== NOT EXECUTED 40005f50: d0 04 e0 58 ld [ %l3 + 0x58 ], %o0 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 40005f54: 03 15 1e 15 sethi %hi(0x54785400), %g1 <== NOT EXECUTED 40005f58: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40005f5c: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40005f60: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005f64: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005f68: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005f6c: 40 00 03 ab call 40006e18 <== NOT EXECUTED 40005f70: 9a 04 e0 c8 add %l3, 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) 40005f74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005f78: 12 bf ff f0 bne 40005f38 <== NOT EXECUTED 40005f7c: 03 14 9e 15 sethi %hi(0x52785400), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 40005f80: d0 4d 22 34 ldsb [ %l4 + 0x234 ], %o0 <== NOT EXECUTED 40005f84: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40005f88: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40005f8c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005f90: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005f94: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005f98: 40 00 03 a0 call 40006e18 <== NOT EXECUTED 40005f9c: 9a 04 e0 c4 add %l3, 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) 40005fa0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005fa4: 22 bf ff 8a be,a 40005dcc <== NOT EXECUTED 40005fa8: c2 04 e0 a0 ld [ %l3 + 0xa0 ], %g1 <== NOT EXECUTED 40005fac: 30 bf ff e3 b,a 40005f38 <== 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; 40005fb0: 10 bf ff 5a b 40005d18 40005fb4: e6 20 63 08 st %l3, [ %g1 + 0x308 ] 40004840 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40004840: 9d e3 bf a0 save %sp, -96, %sp const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 40004844: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 40004848: 80 a0 60 00 cmp %g1, 0 4000484c: 02 80 00 42 be 40004954 40004850: a8 10 00 18 mov %i0, %l4 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 40004854: e6 06 a0 80 ld [ %i2 + 0x80 ], %l3 <== NOT EXECUTED while (len) { 40004858: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000485c: 02 80 00 43 be 40004968 <== NOT EXECUTED 40004860: a4 10 20 02 mov 2, %l2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 40004864: aa 10 20 01 mov 1, %l5 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 40004868: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 4000486c: 40 00 56 3c call 4001a15c <.urem> <== NOT EXECUTED 40004870: 90 04 e0 01 add %l3, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40004874: 7f ff f5 68 call 40001e14 <== NOT EXECUTED 40004878: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED 4000487c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 40004880: e2 06 a0 84 ld [ %i2 + 0x84 ], %l1 <== NOT EXECUTED 40004884: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 40004888: 12 80 00 13 bne 400048d4 <== NOT EXECUTED 4000488c: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40004890: e4 26 a0 94 st %l2, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40004894: 7f ff f5 64 call 40001e24 <== NOT EXECUTED 40004898: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 4000489c: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 400048a0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400048a4: 40 00 08 ea call 40006c4c <== NOT EXECUTED 400048a8: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 400048ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400048b0: 12 80 00 30 bne 40004970 <== NOT EXECUTED 400048b4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 400048b8: 7f ff f5 57 call 40001e14 <== NOT EXECUTED 400048bc: 01 00 00 00 nop <== NOT EXECUTED 400048c0: a0 10 00 08 mov %o0, %l0 <== 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) { 400048c4: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 400048c8: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 400048cc: 22 bf ff f2 be,a 40004894 <== NOT EXECUTED 400048d0: e4 26 a0 94 st %l2, [ %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++; 400048d4: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1 <== NOT EXECUTED 400048d8: c6 0d 00 00 ldub [ %l4 ], %g3 <== NOT EXECUTED 400048dc: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2 <== NOT EXECUTED 400048e0: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 400048e4: c2 06 a0 94 ld [ %i2 + 0x94 ], %g1 <== 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; 400048e8: e6 26 a0 80 st %l3, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 400048ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400048f0: 12 80 00 0a bne 40004918 <== NOT EXECUTED 400048f4: 01 00 00 00 nop <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 400048f8: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400048fc: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40004900: 02 80 00 0c be 40004930 <== NOT EXECUTED 40004904: 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; 40004908: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 4000490c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 40004910: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 40004914: ea 26 a0 94 st %l5, [ %i2 + 0x94 ] <== NOT EXECUTED } rtems_interrupt_enable (level); 40004918: 7f ff f5 43 call 40001e24 <== NOT EXECUTED 4000491c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 40004920: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED 40004924: 02 80 00 11 be 40004968 <== NOT EXECUTED 40004928: a8 05 20 01 inc %l4 <== NOT EXECUTED 4000492c: 30 bf ff cf b,a 40004868 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 40004930: c4 06 a0 84 ld [ %i2 + 0x84 ], %g2 <== 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, 40004934: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1 <== NOT EXECUTED 40004938: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 <== NOT EXECUTED 4000493c: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 40004940: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40004944: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004948: 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; 4000494c: 10 bf ff f3 b 40004918 <== NOT EXECUTED 40004950: ea 26 a0 94 st %l5, [ %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); 40004954: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 40004958: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 4000495c: 92 10 00 18 mov %i0, %o1 40004960: 9f c0 40 00 call %g1 40004964: 94 10 00 19 mov %i1, %o2 return; 40004968: 81 c7 e0 08 ret 4000496c: 81 e8 00 00 restore 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); 40004970: 40 00 0a 66 call 40007308 <== NOT EXECUTED 40004974: 01 00 00 00 nop 40004978: 01 00 00 00 nop 40005198 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40005198: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4000519c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 400051a0: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 <== 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; 400051a4: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 400051a8: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400051ac: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 400051b0: 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); 400051b4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400051b8: 40 00 06 a5 call 40006c4c <== NOT EXECUTED 400051bc: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 400051c0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400051c4: 12 80 00 10 bne 40005204 <== NOT EXECUTED 400051c8: 05 10 00 79 sethi %hi(0x4001e400), %g2 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 400051cc: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 400051d0: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400051d4: 84 10 a3 f4 or %g2, 0x3f4, %g2 <== NOT EXECUTED 400051d8: 82 00 60 08 add %g1, 8, %g1 <== NOT EXECUTED 400051dc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 400051e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400051e4: 02 80 00 0a be 4000520c <== NOT EXECUTED 400051e8: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 400051ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400051f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400051f4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 400051f8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 400051fc: 40 00 06 db call 40006d68 <== NOT EXECUTED 40005200: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED return sc; 40005204: 81 c7 e0 08 ret <== NOT EXECUTED 40005208: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 4000520c: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40005210: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40005214: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005218: 22 80 00 20 be,a 40005298 <== NOT EXECUTED 4000521c: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005220: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40005224: 22 80 00 16 be,a 4000527c <== NOT EXECUTED 40005228: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED 4000522c: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 40005230: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40005234: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40005238: 26 80 00 09 bl,a 4000525c <== NOT EXECUTED 4000523c: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40005240: 10 80 00 0f b 4000527c <== NOT EXECUTED 40005244: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005248: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 4000524c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005250: 24 80 00 0b ble,a 4000527c <== NOT EXECUTED 40005254: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40005258: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 4000525c: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40005260: c4 08 80 01 ldub [ %g2 + %g1 ], %g2 <== NOT EXECUTED 40005264: 82 00 60 01 inc %g1 <== NOT EXECUTED 40005268: c4 2d 00 00 stb %g2, [ %l4 ] <== NOT EXECUTED 4000526c: c2 24 20 24 st %g1, [ %l0 + 0x24 ] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005270: 12 bf ff f6 bne 40005248 <== NOT EXECUTED 40005274: a8 05 20 01 inc %l4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40005278: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 4000527c: 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; 40005280: a6 20 40 13 sub %g1, %l3, %l3 <== NOT EXECUTED 40005284: e6 25 a0 1c st %l3, [ %l6 + 0x1c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40005288: 40 00 06 b8 call 40006d68 <== NOT EXECUTED 4000528c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40005290: 81 c7 e0 08 ret <== NOT EXECUTED 40005294: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 40005298: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== 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; 4000529c: c4 24 20 2c st %g2, [ %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; 400052a0: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 400052a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400052a8: 02 80 00 06 be 400052c0 <== NOT EXECUTED 400052ac: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 400052b0: c4 04 20 b4 ld [ %l0 + 0xb4 ], %g2 <== NOT EXECUTED 400052b4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400052b8: 22 80 00 67 be,a 40005454 <== NOT EXECUTED 400052bc: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== 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; 400052c0: 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) && 400052c4: 25 10 00 78 sethi %hi(0x4001e000), %l2 <== 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, 400052c8: 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) && 400052cc: a4 14 a2 28 or %l2, 0x228, %l2 <== 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, 400052d0: aa 10 20 01 mov 1, %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400052d4: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400052d8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400052dc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400052e0: 02 80 00 3d be 400053d4 <== NOT EXECUTED 400052e4: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 400052e8: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400052ec: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 400052f0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400052f4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400052f8: 16 80 00 37 bge 400053d4 <== NOT EXECUTED 400052fc: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 40005300: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40005304: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40005308: 40 00 53 95 call 4001a15c <.urem> <== NOT EXECUTED 4000530c: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40005310: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40005314: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40005318: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4000531c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40005320: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40005324: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40005328: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 4000532c: 40 00 53 8c call 4001a15c <.urem> <== NOT EXECUTED 40005330: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 40005334: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40005338: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000533c: 3a 80 00 18 bcc,a 4000539c <== NOT EXECUTED 40005340: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40005344: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005348: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000534c: 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)) 40005350: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005354: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 40005358: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 4000535c: 22 80 00 30 be,a 4000541c <== NOT EXECUTED 40005360: 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) { 40005364: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005368: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4000536c: 22 80 00 0c be,a 4000539c <== NOT EXECUTED 40005370: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40005374: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40005378: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 <== 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; 4000537c: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED 40005380: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40005384: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005388: 22 80 00 05 be,a 4000539c <== NOT EXECUTED 4000538c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40005390: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005394: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40005398: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 4000539c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 400053a0: 02 80 00 17 be 400053fc <== NOT EXECUTED 400053a4: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 400053a8: 7f ff ff 0f call 40004fe4 <== NOT EXECUTED 400053ac: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400053b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400053b4: 32 80 00 02 bne,a 400053bc <== NOT EXECUTED 400053b8: aa 10 20 00 clr %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400053bc: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400053c0: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400053c4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400053c8: 12 bf ff c8 bne 400052e8 <== NOT EXECUTED 400053cc: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 400053d0: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 400053d4: 02 bf ff 94 be 40005224 <== NOT EXECUTED 400053d8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 400053dc: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 400053e0: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 400053e4: 40 00 06 1a call 40006c4c <== NOT EXECUTED 400053e8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 400053ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400053f0: 02 bf ff b9 be 400052d4 <== NOT EXECUTED 400053f4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400053f8: 30 bf ff 8b b,a 40005224 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 400053fc: 7f ff fe fa call 40004fe4 <== NOT EXECUTED 40005400: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40005404: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40005408: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 4000540c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005410: 36 bf ff eb bge,a 400053bc <== NOT EXECUTED 40005414: aa 10 20 00 clr %l5 <== NOT EXECUTED 40005418: 30 bf ff e9 b,a 400053bc <== 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)) 4000541c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005420: 22 80 00 07 be,a 4000543c <== NOT EXECUTED 40005424: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 40005428: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== 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)) 4000542c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40005430: 02 bf ff cd be 40005364 <== NOT EXECUTED 40005434: 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, 40005438: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 4000543c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40005440: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40005444: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005448: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 4000544c: 10 bf ff d4 b 4000539c <== NOT EXECUTED 40005450: 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) { 40005454: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40005458: 02 80 00 0e be 40005490 <== NOT EXECUTED 4000545c: 01 00 00 00 nop <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40005460: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005464: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40005468: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000546c: 06 80 00 3a bl 40005554 <== NOT EXECUTED 40005470: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40005474: 7f ff fe dc call 40004fe4 <== NOT EXECUTED 40005478: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000547c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005480: 12 bf ff 69 bne 40005224 <== NOT EXECUTED 40005484: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40005488: 10 bf ff f6 b 40005460 <== NOT EXECUTED 4000548c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 40005490: 40 00 04 2a call 40006538 <== NOT EXECUTED 40005494: 01 00 00 00 nop <== NOT EXECUTED 40005498: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 4000549c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400054a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400054a4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 400054a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400054ac: 06 80 00 10 bl 400054ec <== NOT EXECUTED 400054b0: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 400054b4: 7f ff fe cc call 40004fe4 <== NOT EXECUTED 400054b8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400054bc: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 400054c0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 400054c4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400054c8: 16 bf ff 56 bge 40005220 <== NOT EXECUTED 400054cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 400054d0: 22 bf ff f4 be,a 400054a0 <== NOT EXECUTED 400054d4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400054d8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400054dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400054e0: 22 bf ff f0 be,a 400054a0 <== NOT EXECUTED 400054e4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400054e8: 30 bf ff ea b,a 40005490 <== NOT EXECUTED rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 400054ec: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 400054f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400054f4: 02 80 00 0d be 40005528 <== NOT EXECUTED 400054f8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 400054fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005500: 02 80 00 06 be 40005518 <== NOT EXECUTED 40005504: 01 00 00 00 nop <== NOT EXECUTED 40005508: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 4000550c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005510: 12 80 00 09 bne 40005534 <== NOT EXECUTED 40005514: 01 00 00 00 nop <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 40005518: 40 00 07 05 call 4000712c <== NOT EXECUTED 4000551c: 90 10 20 01 mov 1, %o0 ! 1 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 40005520: 10 bf ff e0 b 400054a0 <== NOT EXECUTED 40005524: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40005528: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000552c: 02 bf ff 3e be 40005224 <== NOT EXECUTED 40005530: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 40005534: 40 00 04 01 call 40006538 <== NOT EXECUTED 40005538: 01 00 00 00 nop <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 4000553c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 40005540: 90 22 00 11 sub %o0, %l1, %o0 <== NOT EXECUTED 40005544: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40005548: 08 bf ff f4 bleu 40005518 <== NOT EXECUTED 4000554c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40005550: 30 bf ff 35 b,a 40005224 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 40005554: 40 00 06 f6 call 4000712c <== NOT EXECUTED 40005558: 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) { 4000555c: 10 bf ff c1 b 40005460 <== NOT EXECUTED 40005560: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004274 : * 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) { 40004274: 9d e3 bf a0 save %sp, -96, %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)) 40004278: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000427c: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40004280: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40004284: 02 80 00 44 be 40004394 <== NOT EXECUTED 40004288: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 4000428c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004290: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40004294: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40004298: 22 80 00 50 be,a 400043d8 <== NOT EXECUTED 4000429c: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 400042a0: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 400042a4: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 400042a8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400042ac: 22 80 00 30 be,a 4000436c <== NOT EXECUTED 400042b0: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 400042b4: 7f ff f6 d8 call 40001e14 <== NOT EXECUTED 400042b8: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 400042bc: e2 06 20 90 ld [ %i0 + 0x90 ], %l1 <== NOT EXECUTED tty->t_dqlen = 0; 400042c0: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400042c4: 7f ff f6 d8 call 40001e24 <== NOT EXECUTED 400042c8: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 400042cc: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 400042d0: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 400042d4: 40 00 57 a2 call 4001a15c <.urem> <== NOT EXECUTED 400042d8: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 400042dc: 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; 400042e0: d0 24 20 84 st %o0, [ %l0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 400042e4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400042e8: 02 80 00 55 be 4000443c <== NOT EXECUTED 400042ec: 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) { 400042f0: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 400042f4: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 400042f8: 22 80 00 48 be,a 40004418 <== NOT EXECUTED 400042fc: c2 04 20 d4 ld [ %l0 + 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)) 40004300: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004304: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40004308: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 4000430c: 02 80 00 4f be 40004448 <== NOT EXECUTED 40004310: 01 00 00 00 nop <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40004314: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40004318: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000431c: 18 80 00 1b bgu 40004388 <== NOT EXECUTED 40004320: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 40004324: f0 04 20 80 ld [ %l0 + 0x80 ], %i0 <== NOT EXECUTED 40004328: b0 26 00 11 sub %i0, %l1, %i0 <== NOT EXECUTED /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 4000432c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004330: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40004334: 02 80 00 04 be 40004344 <== NOT EXECUTED 40004338: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 4000433c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004340: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40004344: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40004348: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 4000434c: d0 04 20 10 ld [ %l0 + 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*/ 40004350: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004354: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED 40004358: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000435c: c4 24 20 94 st %g2, [ %l0 + 0x94 ] <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40004360: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40004364: 81 c7 e0 08 ret <== NOT EXECUTED 40004368: 81 e8 00 00 restore <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 4000436c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40004370: 12 bf ff fd bne 40004364 <== NOT EXECUTED 40004374: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40004378: 40 00 0a 7c call 40006d68 <== NOT EXECUTED 4000437c: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 40004380: 81 c7 e0 08 ret <== NOT EXECUTED 40004384: 81 e8 00 00 restore <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 40004388: f0 04 20 88 ld [ %l0 + 0x88 ], %i0 <== NOT EXECUTED 4000438c: 10 bf ff e8 b 4000432c <== NOT EXECUTED 40004390: b0 26 00 11 sub %i0, %l1, %i0 <== 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, 40004394: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40004398: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 4000439c: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 400043a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400043a4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 400043a8: 7f ff f6 9b call 40001e14 <== NOT EXECUTED 400043ac: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400043b0: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400043b4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== 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--; 400043b8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400043bc: 82 10 60 02 or %g1, 2, %g1 <== 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--; 400043c0: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400043c4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400043c8: 7f ff f6 97 call 40001e24 <== NOT EXECUTED 400043cc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 400043d0: 81 c7 e0 08 ret <== NOT EXECUTED 400043d4: 81 e8 00 00 restore <== 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, 400043d8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400043dc: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED 400043e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400043e4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 400043e8: 7f ff f6 8b call 40001e14 <== NOT EXECUTED 400043ec: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400043f0: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400043f4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400043f8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400043fc: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 40004400: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40004404: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40004408: 7f ff f6 87 call 40001e24 <== NOT EXECUTED 4000440c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40004410: 81 c7 e0 08 ret <== NOT EXECUTED 40004414: 81 e8 00 00 restore <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40004418: c0 24 20 94 clr [ %l0 + 0x94 ] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4000441c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004420: 02 bf ff d0 be 40004360 <== NOT EXECUTED 40004424: b0 10 20 00 clr %i0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40004428: d2 04 20 d8 ld [ %l0 + 0xd8 ], %o1 <== NOT EXECUTED 4000442c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004430: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40004434: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED 40004438: 30 bf ff f6 b,a 40004410 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4000443c: 40 00 0a 4b call 40006d68 <== NOT EXECUTED 40004440: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40004444: 30 bf ff ab b,a 400042f0 <== 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); 40004448: 7f ff f6 73 call 40001e14 <== NOT EXECUTED 4000444c: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 40004450: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40004454: 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; 40004458: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4000445c: c4 24 20 94 st %g2, [ %l0 + 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; 40004460: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40004464: 7f ff f6 70 call 40001e24 <== NOT EXECUTED 40004468: b0 10 20 00 clr %i0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4000446c: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED 40004470: 30 bf ff e8 b,a 40004410 <== NOT EXECUTED 40006050 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40006050: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40006054: a0 07 bf f8 add %fp, -8, %l0 <== NOT EXECUTED 40006058: a2 07 bf ff add %fp, -1, %l1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4000605c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40006060: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40006064: 94 10 20 00 clr %o2 <== NOT EXECUTED 40006068: 40 00 01 57 call 400065c4 <== NOT EXECUTED 4000606c: 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) { 40006070: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40006074: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40006078: 32 80 00 16 bne,a 400060d0 <== NOT EXECUTED 4000607c: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40006080: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED 40006084: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006088: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 4000608c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40006090: 02 bf ff f3 be 4000605c <== NOT EXECUTED 40006094: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40006098: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 4000609c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400060a0: 7f ff f9 14 call 400044f0 <== NOT EXECUTED 400060a4: 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 | 400060a8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 400060ac: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400060b0: 94 10 20 00 clr %o2 <== NOT EXECUTED 400060b4: 40 00 01 44 call 400065c4 <== NOT EXECUTED 400060b8: 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) { 400060bc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400060c0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400060c4: 22 bf ff f0 be,a 40006084 <== NOT EXECUTED 400060c8: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 400060cc: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 400060d0: 40 00 03 9d call 40006f44 <== NOT EXECUTED 400060d4: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 400060d8: 10 bf ff e2 b 40006060 <== NOT EXECUTED 400060dc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4000425c : 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); 4000425c: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40004260: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004264: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40004268: 40 00 09 38 call 40006748 <== NOT EXECUTED 4000426c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40004270: 01 00 00 00 nop 40005fb8 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40005fb8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40005fbc: 23 10 00 79 sethi %hi(0x4001e400), %l1 <== NOT EXECUTED 40005fc0: a0 07 bf fc add %fp, -4, %l0 <== NOT EXECUTED 40005fc4: a2 14 63 f4 or %l1, 0x3f4, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005fc8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005fcc: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005fd0: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005fd4: 40 00 01 7c call 400065c4 <== NOT EXECUTED 40005fd8: 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) { 40005fdc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40005fe0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005fe4: 12 80 00 16 bne 4000603c <== NOT EXECUTED 40005fe8: 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) { 40005fec: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40005ff0: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40005ff4: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 40005ff8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40005ffc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006000: 02 80 00 04 be 40006010 <== NOT EXECUTED 40006004: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40006008: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000600c: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40006010: 7f ff f8 99 call 40004274 <== NOT EXECUTED 40006014: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40006018: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 4000601c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40006020: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40006024: 40 00 01 68 call 400065c4 <== NOT EXECUTED 40006028: 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) { 4000602c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40006030: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40006034: 02 bf ff ee be 40005fec <== NOT EXECUTED 40006038: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 4000603c: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40006040: 40 00 03 c1 call 40006f44 <== NOT EXECUTED 40006044: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40006048: 10 bf ff e1 b 40005fcc <== NOT EXECUTED 4000604c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005030 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40005030: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005034: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005038: 92 10 20 00 clr %o1 rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4000503c: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005040: 94 10 20 00 clr %o2 40005044: 40 00 07 02 call 40006c4c 40005048: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 if (sc != RTEMS_SUCCESSFUL) 4000504c: a2 92 20 00 orcc %o0, 0, %l1 40005050: 12 80 00 0f bne 4000508c 40005054: 03 10 00 79 sethi %hi(0x4001e400), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40005058: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 4000505c: 85 28 a0 05 sll %g2, 5, %g2 40005060: 82 10 63 f4 or %g1, 0x3f4, %g1 40005064: 82 00 40 02 add %g1, %g2, %g1 40005068: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4000506c: 80 a0 60 00 cmp %g1, 0 40005070: 02 80 00 09 be 40005094 40005074: 92 10 00 18 mov %i0, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40005078: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000507c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005080: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40005084: 40 00 07 39 call 40006d68 <== NOT EXECUTED 40005088: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 4000508c: 81 c7 e0 08 ret <== NOT EXECUTED 40005090: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 40005094: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 40005098: 80 88 60 01 btst 1, %g1 4000509c: 22 80 00 16 be,a 400050f4 400050a0: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0 <== NOT EXECUTED uint32_t count = args->count; 400050a4: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 char *buffer = args->buffer; 400050a8: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 while (count--) 400050ac: 80 a4 e0 00 cmp %l3, 0 400050b0: a4 10 20 00 clr %l2 400050b4: 02 80 00 0a be 400050dc 400050b8: 82 10 20 00 clr %g1 oproc (*buffer++, tty); 400050bc: d0 0d 00 12 ldub [ %l4 + %l2 ], %o0 400050c0: 7f ff fe 2f call 4000497c 400050c4: 92 10 00 10 mov %l0, %o1 400050c8: a4 04 a0 01 inc %l2 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 400050cc: 80 a4 80 13 cmp %l2, %l3 400050d0: 32 bf ff fc bne,a 400050c0 400050d4: d0 0d 00 12 ldub [ %l4 + %l2 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 400050d8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400050dc: c2 26 20 1c st %g1, [ %i0 + 0x1c ] } rtems_semaphore_release (tty->osem); 400050e0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 400050e4: 40 00 07 21 call 40006d68 400050e8: b0 10 00 11 mov %l1, %i0 return sc; } 400050ec: 81 c7 e0 08 ret 400050f0: 81 e8 00 00 restore while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 400050f4: 7f ff fd d3 call 40004840 <== NOT EXECUTED 400050f8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 400050fc: 10 bf ff f8 b 400050dc <== NOT EXECUTED 40005100: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED 40008958 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 40008958: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 4000895c: 29 08 00 00 sethi %hi(0x20000000), %l4 <== NOT EXECUTED 40008960: a8 8e 00 14 andcc %i0, %l4, %l4 <== NOT EXECUTED 40008964: 02 80 00 0f be 400089a0 <== NOT EXECUTED 40008968: 05 10 00 a9 sethi %hi(0x4002a400), %g2 <== NOT EXECUTED { if (rtems_panic_in_progress++) 4000896c: c6 00 a2 d8 ld [ %g2 + 0x2d8 ], %g3 ! 4002a6d8 <== NOT EXECUTED 40008970: 82 00 e0 01 add %g3, 1, %g1 <== NOT EXECUTED 40008974: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40008978: 02 80 00 07 be 40008994 <== NOT EXECUTED 4000897c: c2 20 a2 d8 st %g1, [ %g2 + 0x2d8 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008980: 03 10 00 aa sethi %hi(0x4002a800), %g1 <== NOT EXECUTED 40008984: c6 00 60 c0 ld [ %g1 + 0xc0 ], %g3 ! 4002a8c0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008988: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4000898c: c6 20 60 c0 st %g3, [ %g1 + 0xc0 ] <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 40008990: c2 00 a2 d8 ld [ %g2 + 0x2d8 ], %g1 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40008994: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008998: 14 80 00 3c bg 40008a88 <== NOT EXECUTED 4000899c: a4 10 20 00 clr %l2 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 400089a0: 21 10 00 a7 sethi %hi(0x40029c00), %l0 <== NOT EXECUTED 400089a4: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 ! 40029e00 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 400089a8: 27 1c 00 00 sethi %hi(0x70000000), %l3 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 400089ac: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 400089b0: 40 00 3d 98 call 40018010 <== NOT EXECUTED 400089b4: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 400089b8: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 400089bc: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 400089c0: 12 80 00 45 bne 40008ad4 <== NOT EXECUTED 400089c4: a6 2e 00 13 andn %i0, %l3, %l3 <== 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); 400089c8: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 <== NOT EXECUTED 400089cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400089d0: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400089d4: 40 00 55 4c call 4001df04 <== NOT EXECUTED 400089d8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 400089dc: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400089e0: 12 80 00 31 bne 40008aa4 <== NOT EXECUTED 400089e4: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 400089e8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400089ec: 02 80 00 12 be 40008a34 <== NOT EXECUTED 400089f0: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 400089f4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400089f8: 04 80 00 09 ble 40008a1c <== NOT EXECUTED 400089fc: 13 10 00 9f sethi %hi(0x40027c00), %o1 <== NOT EXECUTED 40008a00: 40 00 41 ab call 400190ac <== NOT EXECUTED 40008a04: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008a08: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40008a0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008a10: 12 80 00 35 bne 40008ae4 <== NOT EXECUTED 40008a14: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40008a18: 13 10 00 9f sethi %hi(0x40027c00), %o1 <== NOT EXECUTED 40008a1c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008a20: 92 12 63 90 or %o1, 0x390, %o1 <== NOT EXECUTED 40008a24: 40 00 3e 4f call 40018360 <== NOT EXECUTED 40008a28: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40008a2c: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40008a30: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 <== NOT EXECUTED 40008a34: 13 10 00 9f sethi %hi(0x40027c00), %o1 <== NOT EXECUTED 40008a38: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008a3c: 40 00 3e 49 call 40018360 <== NOT EXECUTED 40008a40: 92 12 62 88 or %o1, 0x288, %o1 <== NOT EXECUTED (void) fflush(stderr); 40008a44: c2 04 22 00 ld [ %l0 + 0x200 ], %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"); 40008a48: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED (void) fflush(stderr); 40008a4c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008a50: 40 00 3d 70 call 40018010 <== NOT EXECUTED 40008a54: a4 04 c0 12 add %l3, %l2, %l2 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40008a58: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40008a5c: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40008a60: 02 80 00 0a be 40008a88 <== NOT EXECUTED 40008a64: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40008a68: 22 80 00 0a be,a 40008a90 <== NOT EXECUTED 40008a6c: 13 10 00 9f sethi %hi(0x40027c00), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40008a70: 13 10 00 9f sethi %hi(0x40027c00), %o1 <== NOT EXECUTED 40008a74: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008a78: 40 00 00 32 call 40008b40 <== NOT EXECUTED 40008a7c: 92 12 63 a8 or %o1, 0x3a8, %o1 <== NOT EXECUTED _exit(local_errno); 40008a80: 40 00 03 5e call 400097f8 <_exit> <== NOT EXECUTED 40008a84: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 40008a88: 81 c7 e0 08 ret <== NOT EXECUTED 40008a8c: 91 e8 00 12 restore %g0, %l2, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 40008a90: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008a94: 40 00 00 2b call 40008b40 <== NOT EXECUTED 40008a98: 92 12 63 c0 or %o1, 0x3c0, %o1 <== NOT EXECUTED abort(); 40008a9c: 40 00 3c 46 call 40017bb4 <== NOT EXECUTED 40008aa0: 01 00 00 00 nop <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40008aa4: 03 10 00 a7 sethi %hi(0x40029c00), %g1 <== NOT EXECUTED 40008aa8: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 40029e00 <_impure_ptr> <== NOT EXECUTED 40008aac: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008ab0: 7f ff ff a3 call 4000893c <== NOT EXECUTED 40008ab4: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40008ab8: 13 10 00 9f sethi %hi(0x40027c00), %o1 <== NOT EXECUTED 40008abc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008ac0: 92 12 63 70 or %o1, 0x370, %o1 <== NOT EXECUTED 40008ac4: 40 00 3e 27 call 40018360 <== NOT EXECUTED 40008ac8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008acc: 10 bf ff c7 b 400089e8 <== NOT EXECUTED 40008ad0: a4 04 80 08 add %l2, %o0, %l2 <== 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; 40008ad4: 40 00 3c 46 call 40017bec <__errno> <== NOT EXECUTED 40008ad8: 01 00 00 00 nop <== NOT EXECUTED 40008adc: 10 bf ff bb b 400089c8 <== NOT EXECUTED 40008ae0: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 40008ae4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008ae8: 40 00 41 71 call 400190ac <== NOT EXECUTED 40008aec: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40008af0: 13 10 00 9f sethi %hi(0x40027c00), %o1 <== NOT EXECUTED 40008af4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008af8: 92 12 63 80 or %o1, 0x380, %o1 <== NOT EXECUTED 40008afc: 40 00 3e 19 call 40018360 <== NOT EXECUTED 40008b00: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 40008b04: 10 bf ff cb b 40008a30 <== NOT EXECUTED 40008b08: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED 4002b10c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4002b10c: 9d e3 bf a0 save %sp, -96, %sp 4002b110: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002b114: 2b 10 01 b2 sethi %hi(0x4006c800), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 4002b118: 29 10 01 b2 sethi %hi(0x4006c800), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4002b11c: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002b120: aa 15 61 c8 or %l5, 0x1c8, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 4002b124: a8 15 21 b8 or %l4, 0x1b8, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4002b128: a4 10 20 00 clr %l2 4002b12c: a2 10 20 00 clr %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002b130: c2 06 20 04 ld [ %i0 + 4 ], %g1 4002b134: 82 00 7f ff add %g1, -1, %g1 4002b138: 80 a0 60 00 cmp %g1, 0 4002b13c: 06 80 00 24 bl 4002b1cc 4002b140: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002b144: c2 06 00 00 ld [ %i0 ], %g1 4002b148: e0 08 40 00 ldub [ %g1 ], %l0 4002b14c: 84 00 60 01 add %g1, 1, %g2 if (c == ':') 4002b150: 80 a4 20 3a cmp %l0, 0x3a 4002b154: 02 80 00 25 be 4002b1e8 4002b158: c4 26 00 00 st %g2, [ %i0 ] break; if (sign == 0) { 4002b15c: 80 a4 a0 00 cmp %l2, 0 4002b160: 32 80 00 06 bne,a 4002b178 4002b164: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 4002b168: 80 a4 20 2d cmp %l0, 0x2d 4002b16c: 02 80 00 30 be 4002b22c 4002b170: a4 10 20 01 mov 1, %l2 limit++; continue; } sign = 1; } if (!isdigit(c)) 4002b174: c2 05 00 00 ld [ %l4 ], %g1 4002b178: 82 00 40 10 add %g1, %l0, %g1 4002b17c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 4002b180: 80 88 60 04 btst 4, %g1 4002b184: 02 80 00 28 be 4002b224 4002b188: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 4002b18c: 40 00 ce 0b call 4005e9b8 <.udiv> 4002b190: 92 10 20 0a mov 0xa, %o1 4002b194: 80 a4 40 08 cmp %l1, %o0 4002b198: 18 80 00 23 bgu 4002b224 4002b19c: 01 00 00 00 nop 4002b1a0: 02 80 00 1b be 4002b20c 4002b1a4: a0 04 3f d0 add %l0, -48, %l0 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 4002b1a8: 83 2c 60 03 sll %l1, 3, %g1 4002b1ac: a3 2c 60 01 sll %l1, 1, %l1 4002b1b0: a2 04 40 01 add %l1, %g1, %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002b1b4: c2 06 20 04 ld [ %i0 + 4 ], %g1 return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 4002b1b8: a2 04 00 11 add %l0, %l1, %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002b1bc: 82 00 7f ff add %g1, -1, %g1 4002b1c0: 80 a0 60 00 cmp %g1, 0 4002b1c4: 16 bf ff e0 bge 4002b144 4002b1c8: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002b1cc: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 4002b1d0: 40 00 82 63 call 4004bb5c <__srget_r> <== NOT EXECUTED 4002b1d4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4002b1d8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 4002b1dc: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 4002b1e0: 12 bf ff e0 bne 4002b160 <== NOT EXECUTED 4002b1e4: 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) 4002b1e8: 80 a4 a0 00 cmp %l2, 0 4002b1ec: 02 80 00 0e be 4002b224 4002b1f0: 90 10 00 12 mov %l2, %o0 return 0; *val = i * sign; 4002b1f4: 92 10 00 11 mov %l1, %o1 4002b1f8: 7f ff 60 26 call 40003290 <.umul> 4002b1fc: b0 10 20 01 mov 1, %i0 4002b200: d0 26 40 00 st %o0, [ %i1 ] return 1; 4002b204: 81 c7 e0 08 ret 4002b208: 81 e8 00 00 restore sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 4002b20c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4002b210: 40 00 ce 96 call 4005ec68 <.urem> <== NOT EXECUTED 4002b214: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4002b218: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 4002b21c: 08 bf ff e4 bleu 4002b1ac <== NOT EXECUTED 4002b220: 83 2c 60 03 sll %l1, 3, %g1 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 4002b224: 81 c7 e0 08 ret <== NOT EXECUTED 4002b228: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 4002b22c: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 4002b230: 10 bf ff c0 b 4002b130 <== NOT EXECUTED 4002b234: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 4002b238 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 4002b238: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 4002b23c: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 4002b240: 21 10 01 b2 sethi %hi(0x4006c800), %l0 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 4002b244: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 4002b248: 10 80 00 19 b 4002b2ac 4002b24c: a0 14 21 c8 or %l0, 0x1c8, %l0 4002b250: c2 06 00 00 ld [ %i0 ], %g1 4002b254: d0 08 40 00 ldub [ %g1 ], %o0 4002b258: 84 00 60 01 add %g1, 1, %g2 if (c == ':') { 4002b25c: 80 a2 20 3a cmp %o0, 0x3a 4002b260: 02 80 00 1e be 4002b2d8 4002b264: c4 26 00 00 st %g2, [ %i0 ] if (nlFlag) return 0; break; } if (c == '\n') { 4002b268: 80 a2 20 0a cmp %o0, 0xa 4002b26c: 02 80 00 28 be 4002b30c 4002b270: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) return 0; break; } if (c == EOF) 4002b274: 02 80 00 29 be 4002b318 4002b278: 01 00 00 00 nop return 0; if (*nleft < 2) 4002b27c: c2 06 c0 00 ld [ %i3 ], %g1 4002b280: 80 a0 60 01 cmp %g1, 1 4002b284: 08 80 00 25 bleu 4002b318 4002b288: 01 00 00 00 nop return 0; **bufp = c; 4002b28c: c2 06 80 00 ld [ %i2 ], %g1 4002b290: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 4002b294: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 4002b298: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002b29c: 84 00 a0 01 inc %g2 --(*nleft); 4002b2a0: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002b2a4: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 4002b2a8: c2 26 c0 00 st %g1, [ %i3 ] { int c; *name = *bufp; for (;;) { c = getc(fp); 4002b2ac: c2 06 20 04 ld [ %i0 + 4 ], %g1 4002b2b0: 82 00 7f ff add %g1, -1, %g1 4002b2b4: 80 a0 60 00 cmp %g1, 0 4002b2b8: 16 bf ff e6 bge 4002b250 4002b2bc: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002b2c0: d0 04 00 00 ld [ %l0 ], %o0 4002b2c4: 40 00 82 26 call 4004bb5c <__srget_r> 4002b2c8: 92 10 00 18 mov %i0, %o1 if (c == ':') { 4002b2cc: 80 a2 20 3a cmp %o0, 0x3a 4002b2d0: 12 bf ff e7 bne 4002b26c 4002b2d4: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 4002b2d8: 80 a7 20 00 cmp %i4, 0 4002b2dc: 12 80 00 0f bne 4002b318 4002b2e0: 01 00 00 00 nop return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 4002b2e4: c2 06 80 00 ld [ %i2 ], %g1 4002b2e8: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 4002b2ec: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 4002b2f0: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4002b2f4: 84 00 a0 01 inc %g2 --(*nleft); 4002b2f8: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4002b2fc: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 4002b300: c2 26 c0 00 st %g1, [ %i3 ] return 1; 4002b304: 81 c7 e0 08 ret 4002b308: 91 e8 20 01 restore %g0, 1, %o0 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 4002b30c: 80 a7 20 00 cmp %i4, 0 4002b310: 32 bf ff f6 bne,a 4002b2e8 4002b314: c2 06 80 00 ld [ %i2 ], %g1 } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 4002b318: 81 c7 e0 08 ret <== NOT EXECUTED 4002b31c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4002b320 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4002b320: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b324: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4002b328: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002b32c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b330: a2 07 a0 4c add %fp, 0x4c, %l1 4002b334: a0 07 a0 50 add %fp, 0x50, %l0 4002b338: 90 10 00 18 mov %i0, %o0 4002b33c: 92 10 00 19 mov %i1, %o1 4002b340: 94 10 00 11 mov %l1, %o2 4002b344: 7f ff ff bd call 4002b238 4002b348: 96 10 00 10 mov %l0, %o3 4002b34c: 80 a2 20 00 cmp %o0, 0 4002b350: 12 80 00 04 bne 4002b360 4002b354: 90 10 00 18 mov %i0, %o0 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 4002b358: 81 c7 e0 08 ret <== NOT EXECUTED 4002b35c: 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) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 4002b360: 92 06 60 04 add %i1, 4, %o1 4002b364: 94 10 00 11 mov %l1, %o2 4002b368: 96 10 00 10 mov %l0, %o3 4002b36c: 7f ff ff b3 call 4002b238 4002b370: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b374: 80 a2 20 00 cmp %o0, 0 4002b378: 02 bf ff f8 be 4002b358 4002b37c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 4002b380: 7f ff ff 63 call 4002b10c 4002b384: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b388: 80 a2 20 00 cmp %o0, 0 4002b38c: 02 bf ff f3 be 4002b358 4002b390: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 4002b394: 94 10 00 11 mov %l1, %o2 4002b398: 96 10 00 10 mov %l0, %o3 4002b39c: 92 07 bf f8 add %fp, -8, %o1 4002b3a0: 7f ff ff a6 call 4002b238 4002b3a4: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b3a8: 80 a2 20 00 cmp %o0, 0 4002b3ac: 02 bf ff eb be 4002b358 4002b3b0: da 07 bf f8 ld [ %fp + -8 ], %o5 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 4002b3b4: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b3b8: 84 10 00 0d mov %o5, %g2 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; 4002b3bc: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b3c0: c6 0b 40 00 ldub [ %o5 ], %g3 4002b3c4: 88 10 20 01 mov 1, %g4 4002b3c8: 83 28 e0 18 sll %g3, 0x18, %g1 4002b3cc: 80 a0 60 00 cmp %g1, 0 4002b3d0: 02 80 00 0e be 4002b408 4002b3d4: 86 10 20 17 mov 0x17, %g3 4002b3d8: 84 00 a0 01 inc %g2 4002b3dc: c6 08 80 00 ldub [ %g2 ], %g3 if(*cp == ',') 4002b3e0: 83 38 60 18 sra %g1, 0x18, %g1 memcount++; 4002b3e4: 82 18 60 2c xor %g1, 0x2c, %g1 4002b3e8: 80 a0 00 01 cmp %g0, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b3ec: 83 28 e0 18 sll %g3, 0x18, %g1 if(*cp == ',') memcount++; 4002b3f0: 88 61 3f ff subx %g4, -1, %g4 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b3f4: 80 a0 60 00 cmp %g1, 0 4002b3f8: 32 bf ff f9 bne,a 4002b3dc 4002b3fc: 84 00 a0 01 inc %g2 4002b400: 87 29 20 02 sll %g4, 2, %g3 4002b404: 86 00 e0 13 add %g3, 0x13, %g3 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 4002b408: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 4002b40c: 80 a0 40 03 cmp %g1, %g3 4002b410: 0a bf ff d2 bcs 4002b358 4002b414: c4 07 a0 4c ld [ %fp + 0x4c ], %g2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b418: 86 10 20 01 mov 1, %g3 /* * 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); 4002b41c: 84 00 a0 0f add %g2, 0xf, %g2 4002b420: 84 08 bf f0 and %g2, -16, %g2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4002b424: da 20 80 00 st %o5, [ %g2 ] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b428: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * 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); 4002b42c: c4 26 60 0c st %g2, [ %i1 + 0xc ] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b430: c4 08 40 00 ldub [ %g1 ], %g2 4002b434: 88 10 20 04 mov 4, %g4 4002b438: 85 28 a0 18 sll %g2, 0x18, %g2 4002b43c: 80 a0 a0 00 cmp %g2, 0 4002b440: 12 80 00 09 bne 4002b464 4002b444: 82 00 60 01 inc %g1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4002b448: 10 80 00 13 b 4002b494 <== NOT EXECUTED 4002b44c: 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++) { 4002b450: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 4002b454: 85 28 a0 18 sll %g2, 0x18, %g2 4002b458: 80 a0 a0 00 cmp %g2, 0 4002b45c: 02 80 00 0c be 4002b48c 4002b460: 82 00 60 01 inc %g1 if(*cp == ',') { 4002b464: 85 38 a0 18 sra %g2, 0x18, %g2 4002b468: 80 a0 a0 2c cmp %g2, 0x2c 4002b46c: 32 bf ff fa bne,a 4002b454 4002b470: c4 08 40 00 ldub [ %g1 ], %g2 *cp = '\0'; 4002b474: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 4002b478: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 4002b47c: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 4002b480: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4002b484: 10 bf ff f3 b 4002b450 <== NOT EXECUTED 4002b488: c2 21 00 02 st %g1, [ %g4 + %g2 ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b48c: 89 28 e0 02 sll %g3, 2, %g4 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4002b490: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4002b494: c0 20 40 04 clr [ %g1 + %g4 ] return 1; 4002b498: 81 c7 e0 08 ret 4002b49c: 91 e8 20 01 restore %g0, 1, %o0 4002b4ec : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4002b4ec: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b4f0: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4002b4f4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002b4f8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b4fc: a2 07 a0 4c add %fp, 0x4c, %l1 4002b500: a0 07 a0 50 add %fp, 0x50, %l0 4002b504: 90 10 00 18 mov %i0, %o0 4002b508: 92 10 00 19 mov %i1, %o1 4002b50c: 94 10 00 11 mov %l1, %o2 4002b510: 7f ff ff 4a call 4002b238 4002b514: 96 10 00 10 mov %l0, %o3 4002b518: 80 a2 20 00 cmp %o0, 0 4002b51c: 12 80 00 04 bne 4002b52c 4002b520: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 4002b524: 81 c7 e0 08 ret <== NOT EXECUTED 4002b528: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 4002b52c: 92 06 60 04 add %i1, 4, %o1 4002b530: 94 10 00 11 mov %l1, %o2 4002b534: 96 10 00 10 mov %l0, %o3 4002b538: 7f ff ff 40 call 4002b238 4002b53c: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b540: 80 a2 20 00 cmp %o0, 0 4002b544: 02 bf ff f8 be 4002b524 4002b548: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 4002b54c: 7f ff fe f0 call 4002b10c 4002b550: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b554: 80 a2 20 00 cmp %o0, 0 4002b558: 02 bf ff f3 be 4002b524 4002b55c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 4002b560: 7f ff fe eb call 4002b10c 4002b564: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b568: 80 a2 20 00 cmp %o0, 0 4002b56c: 02 bf ff ee be 4002b524 4002b570: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 4002b574: 92 06 60 0c add %i1, 0xc, %o1 4002b578: 94 10 00 11 mov %l1, %o2 4002b57c: 96 10 00 10 mov %l0, %o3 4002b580: 7f ff ff 2e call 4002b238 4002b584: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b588: 80 a2 20 00 cmp %o0, 0 4002b58c: 02 bf ff e6 be 4002b524 4002b590: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 4002b594: 92 06 60 10 add %i1, 0x10, %o1 4002b598: 94 10 00 11 mov %l1, %o2 4002b59c: 96 10 00 10 mov %l0, %o3 4002b5a0: 7f ff ff 26 call 4002b238 4002b5a4: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b5a8: 80 a2 20 00 cmp %o0, 0 4002b5ac: 02 bf ff de be 4002b524 4002b5b0: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 4002b5b4: 92 06 60 14 add %i1, 0x14, %o1 4002b5b8: 94 10 00 11 mov %l1, %o2 4002b5bc: 96 10 00 10 mov %l0, %o3 4002b5c0: 7f ff ff 1e call 4002b238 4002b5c4: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b5c8: 80 a2 20 00 cmp %o0, 0 4002b5cc: 02 bf ff d6 be 4002b524 4002b5d0: 90 10 00 18 mov %i0, %o0 || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 4002b5d4: 94 10 00 11 mov %l1, %o2 4002b5d8: 96 10 00 10 mov %l0, %o3 4002b5dc: 92 06 60 18 add %i1, 0x18, %o1 4002b5e0: 7f ff ff 16 call 4002b238 4002b5e4: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b5e8: 80 a2 20 00 cmp %o0, 0 4002b5ec: 02 bf ff ce be 4002b524 4002b5f0: c2 07 bf fc ld [ %fp + -4 ], %g1 || !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; 4002b5f4: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 4002b5f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002b5fc: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 4002b600: 81 c7 e0 08 ret 4002b604: 91 e8 20 01 restore %g0, 1, %o0 40009ee4 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 40009ee4: 9d e3 bf 98 save %sp, -104, %sp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 40009ee8: 90 10 00 19 mov %i1, %o0 40009eec: 40 00 18 62 call 40010074 <_POSIX_Absolute_timeout_to_ticks> 40009ef0: 92 07 bf fc add %fp, -4, %o1 if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 40009ef4: 80 a2 20 03 cmp %o0, 3 40009ef8: 02 80 00 07 be 40009f14 40009efc: d4 07 bf fc ld [ %fp + -4 ], %o2 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 40009f00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009f04: 40 00 1b 4a call 40010c2c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 40009f08: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40009f0c: 81 c7 e0 08 ret <== NOT EXECUTED 40009f10: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 40009f14: 90 10 00 18 mov %i0, %o0 40009f18: 40 00 1b 45 call 40010c2c <_POSIX_Semaphore_Wait_support> 40009f1c: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40009f20: 81 c7 e0 08 ret 40009f24: 91 e8 00 08 restore %g0, %o0, %o0 4002b098 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 4002b098: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 4002b09c: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED 4002b0a0: d0 30 60 32 sth %o0, [ %g1 + 0x32 ] <== NOT EXECUTED return 0; } 4002b0a4: 81 c3 e0 08 retl <== NOT EXECUTED 4002b0a8: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002b740 : return NULL; return &grent; } void setgrent(void) { 4002b740: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 4002b744: 7f ff ff c4 call 4002b654 <== NOT EXECUTED 4002b748: 21 10 01 bf sethi %hi(0x4006fc00), %l0 <== NOT EXECUTED if (group_fp != NULL) 4002b74c: d0 04 21 14 ld [ %l0 + 0x114 ], %o0 ! 4006fd14 <== NOT EXECUTED 4002b750: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b754: 22 80 00 05 be,a 4002b768 <== NOT EXECUTED 4002b758: 11 10 01 85 sethi %hi(0x40061400), %o0 <== NOT EXECUTED fclose(group_fp); 4002b75c: 40 00 6b 88 call 4004657c <== NOT EXECUTED 4002b760: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 4002b764: 11 10 01 85 sethi %hi(0x40061400), %o0 <== NOT EXECUTED 4002b768: 13 10 01 ae sethi %hi(0x4006b800), %o1 <== NOT EXECUTED 4002b76c: 90 12 23 58 or %o0, 0x358, %o0 <== NOT EXECUTED 4002b770: 40 00 6d d2 call 40046eb8 <== NOT EXECUTED 4002b774: 92 12 61 80 or %o1, 0x180, %o1 <== NOT EXECUTED 4002b778: d0 24 21 14 st %o0, [ %l0 + 0x114 ] <== NOT EXECUTED } 4002b77c: 81 c7 e0 08 ret <== NOT EXECUTED 4002b780: 81 e8 00 00 restore <== NOT EXECUTED 4002b940 : return NULL; return &pwent; } void setpwent(void) { 4002b940: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 4002b944: 7f ff ff 44 call 4002b654 <== NOT EXECUTED 4002b948: 21 10 01 bf sethi %hi(0x4006fc00), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 4002b94c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 ! 4006fc2c <== NOT EXECUTED 4002b950: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b954: 22 80 00 05 be,a 4002b968 <== NOT EXECUTED 4002b958: 11 10 01 85 sethi %hi(0x40061400), %o0 <== NOT EXECUTED fclose(passwd_fp); 4002b95c: 40 00 6b 08 call 4004657c <== NOT EXECUTED 4002b960: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4002b964: 11 10 01 85 sethi %hi(0x40061400), %o0 <== NOT EXECUTED 4002b968: 13 10 01 ae sethi %hi(0x4006b800), %o1 <== NOT EXECUTED 4002b96c: 90 12 22 a0 or %o0, 0x2a0, %o0 <== NOT EXECUTED 4002b970: 40 00 6d 52 call 40046eb8 <== NOT EXECUTED 4002b974: 92 12 61 80 or %o1, 0x180, %o1 <== NOT EXECUTED 4002b978: d0 24 20 2c st %o0, [ %l0 + 0x2c ] <== NOT EXECUTED } 4002b97c: 81 c7 e0 08 ret <== NOT EXECUTED 4002b980: 81 e8 00 00 restore <== NOT EXECUTED 4000851c : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 4000851c: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 40008520: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 <== NOT EXECUTED 40008524: d0 30 60 30 sth %o0, [ %g1 + 0x30 ] <== NOT EXECUTED return 0; } 40008528: 81 c3 e0 08 retl <== NOT EXECUTED 4000852c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009638 : #include int sigsuspend( const sigset_t *sigmask ) { 40009638: 9d e3 bf 98 save %sp, -104, %sp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 4000963c: 90 10 20 01 mov 1, %o0 40009640: 92 10 00 18 mov %i0, %o1 40009644: a0 07 bf fc add %fp, -4, %l0 40009648: 7f ff ff f1 call 4000960c 4000964c: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 40009650: a2 07 bf f8 add %fp, -8, %l1 40009654: 7f ff ff b7 call 40009530 40009658: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 4000965c: 90 10 00 11 mov %l1, %o0 40009660: 92 10 20 00 clr %o1 40009664: 40 00 00 2b call 40009710 40009668: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 4000966c: 92 10 00 10 mov %l0, %o1 status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); (void) sigfillset( &all_signals ); status = sigtimedwait( &all_signals, NULL, NULL ); 40009670: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 40009674: 94 10 20 00 clr %o2 40009678: 7f ff ff e5 call 4000960c 4000967c: 90 10 20 00 clr %o0 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 40009680: 80 a4 7f ff cmp %l1, -1 40009684: 12 80 00 05 bne 40009698 40009688: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 4000968c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009690: 81 c7 e0 08 ret <== NOT EXECUTED 40009694: 81 e8 00 00 restore <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 40009698: 40 00 28 86 call 400138b0 <__errno> 4000969c: b0 10 3f ff mov -1, %i0 400096a0: 82 10 20 04 mov 4, %g1 400096a4: c2 22 00 00 st %g1, [ %o0 ] 400096a8: 81 c7 e0 08 ret 400096ac: 81 e8 00 00 restore 40004fe4 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40004fe4: 9d e3 bf a0 save %sp, -96, %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)) { 40004fe8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004fec: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40004ff0: 32 80 00 05 bne,a 40005004 <== NOT EXECUTED 40004ff4: 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); 40004ff8: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 40004ffc: 7f ff ff 7a call 40004de4 <== NOT EXECUTED 40005000: 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); 40005004: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005008: 40 00 07 11 call 40006c4c <== NOT EXECUTED 4000500c: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40005010: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40005014: 7f ff ff 74 call 40004de4 <== NOT EXECUTED 40005018: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000501c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40005020: 40 00 07 52 call 40006d68 <== NOT EXECUTED 40005024: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40005028: 81 c7 e0 08 ret <== NOT EXECUTED 4000502c: 81 e8 00 00 restore <== NOT EXECUTED 40009d44 : int _STAT_NAME( const char *path, struct stat *buf ) { 40009d44: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40009d48: 80 a6 60 00 cmp %i1, 0 40009d4c: 02 80 00 34 be 40009e1c 40009d50: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 40009d54: 40 01 0c f1 call 4004d118 40009d58: 90 10 00 18 mov %i0, %o0 40009d5c: a0 07 bf ec add %fp, -20, %l0 40009d60: 92 10 00 08 mov %o0, %o1 40009d64: 94 10 20 00 clr %o2 40009d68: 90 10 00 18 mov %i0, %o0 40009d6c: 96 10 00 10 mov %l0, %o3 40009d70: 98 10 20 01 mov 1, %o4 40009d74: 7f ff f9 5d call 400082e8 40009d78: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 40009d7c: 80 a2 20 00 cmp %o0, 0 40009d80: 12 80 00 25 bne 40009e14 40009d84: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 40009d88: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40009d8c: 80 a0 a0 00 cmp %g2, 0 40009d90: 02 80 00 29 be 40009e34 40009d94: 92 10 00 19 mov %i1, %o1 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40009d98: c0 26 40 00 clr [ %i1 ] 40009d9c: c0 26 60 04 clr [ %i1 + 4 ] 40009da0: c0 26 60 08 clr [ %i1 + 8 ] 40009da4: c0 26 60 0c clr [ %i1 + 0xc ] 40009da8: c0 26 60 10 clr [ %i1 + 0x10 ] 40009dac: c0 26 60 14 clr [ %i1 + 0x14 ] 40009db0: c0 26 60 18 clr [ %i1 + 0x18 ] 40009db4: c0 26 60 1c clr [ %i1 + 0x1c ] 40009db8: c0 26 60 20 clr [ %i1 + 0x20 ] 40009dbc: c0 26 60 24 clr [ %i1 + 0x24 ] 40009dc0: c0 26 60 28 clr [ %i1 + 0x28 ] 40009dc4: c0 26 60 2c clr [ %i1 + 0x2c ] 40009dc8: c0 26 60 30 clr [ %i1 + 0x30 ] 40009dcc: c0 26 60 34 clr [ %i1 + 0x34 ] 40009dd0: c0 26 60 38 clr [ %i1 + 0x38 ] 40009dd4: c0 26 60 3c clr [ %i1 + 0x3c ] 40009dd8: c0 26 60 40 clr [ %i1 + 0x40 ] 40009ddc: c0 26 60 44 clr [ %i1 + 0x44 ] status = (*loc.handlers->fstat_h)( &loc, buf ); 40009de0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40009de4: 9f c0 40 00 call %g1 40009de8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40009dec: c2 07 bf f8 ld [ %fp + -8 ], %g1 40009df0: 80 a0 60 00 cmp %g1, 0 40009df4: 02 80 00 08 be 40009e14 40009df8: b0 10 00 08 mov %o0, %i0 40009dfc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009e00: 80 a0 60 00 cmp %g1, 0 40009e04: 02 80 00 1a be 40009e6c 40009e08: 01 00 00 00 nop 40009e0c: 9f c0 40 00 call %g1 40009e10: 90 10 00 10 mov %l0, %o0 return status; } 40009e14: 81 c7 e0 08 ret 40009e18: 81 e8 00 00 restore /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 40009e1c: 40 00 f1 80 call 4004641c <__errno> 40009e20: b0 10 3f ff mov -1, %i0 40009e24: 82 10 20 0e mov 0xe, %g1 40009e28: c2 22 00 00 st %g1, [ %o0 ] 40009e2c: 81 c7 e0 08 ret 40009e30: 81 e8 00 00 restore 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 40009e34: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40009e38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009e3c: 02 80 00 08 be 40009e5c <== NOT EXECUTED 40009e40: 01 00 00 00 nop <== NOT EXECUTED 40009e44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009e48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009e4c: 02 80 00 04 be 40009e5c <== NOT EXECUTED 40009e50: 01 00 00 00 nop <== NOT EXECUTED 40009e54: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009e58: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009e5c: 40 00 f1 70 call 4004641c <__errno> <== NOT EXECUTED 40009e60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009e64: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009e68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009e6c: 81 c7 e0 08 ret <== NOT EXECUTED 40009e70: 81 e8 00 00 restore <== NOT EXECUTED 4002c7f8 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 4002c7f8: 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, strlen( path ), 0x0, &loc, true ) ) 4002c7fc: 40 00 82 47 call 4004d118 <== NOT EXECUTED 4002c800: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002c804: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4002c808: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002c80c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4002c810: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002c814: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4002c818: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4002c81c: 7f ff 6e b3 call 400082e8 <== NOT EXECUTED 4002c820: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c824: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002c828: 12 80 00 23 bne 4002c8b4 <== NOT EXECUTED 4002c82c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; 4002c830: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002c834: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 4002c838: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c83c: 02 80 00 20 be 4002c8bc <== NOT EXECUTED 4002c840: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 4002c844: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 4002c848: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 4002c84c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4002c850: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 4002c854: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 4002c858: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 4002c85c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4002c860: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 4002c864: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4002c868: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 4002c86c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4002c870: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 4002c874: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 4002c878: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 4002c87c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002c880: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 4002c884: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c888: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002c88c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002c890: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c894: 02 80 00 08 be 4002c8b4 <== NOT EXECUTED 4002c898: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002c89c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002c8a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c8a4: 02 80 00 0a be 4002c8cc <== NOT EXECUTED 4002c8a8: 01 00 00 00 nop <== NOT EXECUTED 4002c8ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c8b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 4002c8b4: 81 c7 e0 08 ret <== NOT EXECUTED 4002c8b8: 81 e8 00 00 restore <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002c8bc: 40 00 66 d8 call 4004641c <__errno> <== NOT EXECUTED 4002c8c0: 01 00 00 00 nop <== NOT EXECUTED 4002c8c4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4002c8c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c8cc: 81 c7 e0 08 ret <== NOT EXECUTED 4002c8d0: 81 e8 00 00 restore <== NOT EXECUTED 4002c8d4 : int symlink( const char *actualpath, const char *sympath ) { 4002c8d4: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4002c8d8: c2 4e 40 00 ldsb [ %i1 ], %g1 4002c8dc: 80 a0 60 5c cmp %g1, 0x5c 4002c8e0: 02 80 00 07 be 4002c8fc 4002c8e4: a2 10 00 18 mov %i0, %l1 4002c8e8: 80 a0 60 2f cmp %g1, 0x2f 4002c8ec: 02 80 00 04 be 4002c8fc 4002c8f0: 80 a0 60 00 cmp %g1, 0 4002c8f4: 12 80 00 2f bne 4002c9b0 4002c8f8: 03 10 01 b0 sethi %hi(0x4006c000), %g1 4002c8fc: 03 10 01 b0 sethi %hi(0x4006c000), %g1 4002c900: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 4002c904: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4002c908: c4 27 bf e8 st %g2, [ %fp + -24 ] 4002c90c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4002c910: c4 27 bf ec st %g2, [ %fp + -20 ] 4002c914: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4002c918: c4 27 bf f0 st %g2, [ %fp + -16 ] 4002c91c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4002c920: c4 27 bf f4 st %g2, [ %fp + -12 ] 4002c924: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002c928: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !loc.ops->evalformake_h ) { 4002c92c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002c930: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002c934: 80 a0 60 00 cmp %g1, 0 4002c938: 02 80 00 2e be 4002c9f0 4002c93c: 90 10 20 01 mov 1, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 4002c940: 90 06 40 08 add %i1, %o0, %o0 4002c944: a0 07 bf e8 add %fp, -24, %l0 4002c948: 94 07 bf fc add %fp, -4, %o2 4002c94c: 92 10 00 10 mov %l0, %o1 4002c950: 9f c0 40 00 call %g1 4002c954: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 4002c958: 80 a2 20 00 cmp %o0, 0 4002c95c: 12 80 00 13 bne 4002c9a8 4002c960: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 4002c964: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 4002c968: 80 a0 60 00 cmp %g1, 0 4002c96c: 02 80 00 27 be 4002ca08 4002c970: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 4002c974: 92 10 00 11 mov %l1, %o1 4002c978: 9f c0 40 00 call %g1 4002c97c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002c980: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002c984: 80 a0 60 00 cmp %g1, 0 4002c988: 02 80 00 08 be 4002c9a8 4002c98c: b0 10 00 08 mov %o0, %i0 4002c990: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002c994: 80 a0 60 00 cmp %g1, 0 4002c998: 02 80 00 1a be 4002ca00 4002c99c: 01 00 00 00 nop 4002c9a0: 9f c0 40 00 call %g1 4002c9a4: 90 10 00 10 mov %l0, %o0 return result; } 4002c9a8: 81 c7 e0 08 ret 4002c9ac: 81 e8 00 00 restore rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4002c9b0: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 4002c9b4: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002c9b8: c4 27 bf e8 st %g2, [ %fp + -24 ] 4002c9bc: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002c9c0: c4 27 bf ec st %g2, [ %fp + -20 ] 4002c9c4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4002c9c8: c4 27 bf f0 st %g2, [ %fp + -16 ] 4002c9cc: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4002c9d0: c4 27 bf f4 st %g2, [ %fp + -12 ] 4002c9d4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4002c9d8: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !loc.ops->evalformake_h ) { 4002c9dc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002c9e0: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002c9e4: 80 a0 60 00 cmp %g1, 0 4002c9e8: 12 bf ff d6 bne 4002c940 4002c9ec: 90 10 20 00 clr %o0 if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002c9f0: 40 00 66 8b call 4004641c <__errno> <== NOT EXECUTED 4002c9f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c9f8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002c9fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ca00: 81 c7 e0 08 ret <== NOT EXECUTED 4002ca04: 81 e8 00 00 restore <== 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 ); 4002ca08: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002ca0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ca10: 02 bf ff f8 be 4002c9f0 <== NOT EXECUTED 4002ca14: 01 00 00 00 nop <== NOT EXECUTED 4002ca18: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ca1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002ca20: 30 bf ff f4 b,a 4002c9f0 <== NOT EXECUTED 40015720 : int tcsetattr( int fd, int opt, struct termios *tp ) { 40015720: 9d e3 bf a0 save %sp, -96, %sp switch (opt) { 40015724: 80 a6 60 00 cmp %i1, 0 40015728: 02 80 00 10 be 40015768 4001572c: 80 a6 60 01 cmp %i1, 1 40015730: 02 80 00 08 be 40015750 <== NOT EXECUTED 40015734: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015738: 40 00 16 1d call 4001afac <__errno> <== NOT EXECUTED 4001573c: 01 00 00 00 nop <== NOT EXECUTED 40015740: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40015744: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 40015748: 81 c7 e0 08 ret <== NOT EXECUTED 4001574c: 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) 40015750: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40015754: 40 00 0f 6d call 40019508 <== NOT EXECUTED 40015758: 94 10 20 00 clr %o2 <== NOT EXECUTED 4001575c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40015760: 06 bf ff fa bl 40015748 <== NOT EXECUTED 40015764: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40015768: 40 00 0f 68 call 40019508 4001576c: 93 e8 20 02 restore %g0, 2, %o1 40015770: 01 00 00 00 nop 4000fe50 : #include int unlink( const char *path ) { 4000fe50: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4000fe54: 7f ff cd 05 call 40003268 4000fe58: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 4000fe5c: a0 92 20 00 orcc %o0, 0, %l0 4000fe60: 32 80 00 91 bne,a 400100a4 4000fe64: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4000fe68: c2 4e 00 00 ldsb [ %i0 ], %g1 4000fe6c: 80 a0 60 5c cmp %g1, 0x5c 4000fe70: 02 80 00 13 be 4000febc 4000fe74: 80 a0 60 2f cmp %g1, 0x2f 4000fe78: 02 80 00 11 be 4000febc 4000fe7c: 80 a0 60 00 cmp %g1, 0 4000fe80: 02 80 00 10 be 4000fec0 <== NOT EXECUTED 4000fe84: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 4000fe88: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 4001e238 <== NOT EXECUTED 4000fe8c: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000fe90: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4000fe94: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 4000fe98: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4000fe9c: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 4000fea0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4000fea4: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED 4000fea8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4000feac: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED 4000feb0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4000feb4: 10 80 00 0f b 4000fef0 <== NOT EXECUTED 4000feb8: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED 4000febc: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000fec0: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 4001e238 4000fec4: a2 10 20 00 clr %l1 4000fec8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000fecc: c4 27 bf ec st %g2, [ %fp + -20 ] 4000fed0: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000fed4: c4 27 bf f0 st %g2, [ %fp + -16 ] 4000fed8: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4000fedc: c4 27 bf f4 st %g2, [ %fp + -12 ] 4000fee0: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4000fee4: c4 27 bf f8 st %g2, [ %fp + -8 ] 4000fee8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000feec: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000fef0: c2 07 bf ec ld [ %fp + -20 ], %g1 name = path + parentpathlen; 4000fef4: b0 06 00 10 add %i0, %l0, %i0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000fef8: c2 27 bf d8 st %g1, [ %fp + -40 ] 4000fefc: c2 07 bf f0 ld [ %fp + -16 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000ff00: 90 10 00 18 mov %i0, %o0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ff04: c2 27 bf dc st %g1, [ %fp + -36 ] 4000ff08: c2 07 bf f4 ld [ %fp + -12 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000ff0c: a0 07 bf d8 add %fp, -40, %l0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ff10: c2 27 bf e0 st %g1, [ %fp + -32 ] 4000ff14: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000ff18: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000ff1c: c2 07 bf fc ld [ %fp + -4 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000ff20: 40 00 06 09 call 40011744 4000ff24: c2 27 bf e8 st %g1, [ %fp + -24 ] 4000ff28: 92 10 00 08 mov %o0, %o1 4000ff2c: 7f ff cc b0 call 400031ec 4000ff30: 90 10 00 18 mov %i0, %o0 4000ff34: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000ff38: 40 00 06 03 call 40011744 4000ff3c: 90 10 00 18 mov %i0, %o0 4000ff40: 94 10 20 00 clr %o2 4000ff44: 92 10 00 08 mov %o0, %o1 4000ff48: 96 10 00 10 mov %l0, %o3 4000ff4c: 90 10 00 18 mov %i0, %o0 4000ff50: 7f ff cc e6 call 400032e8 4000ff54: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000ff58: 80 a2 20 00 cmp %o0, 0 4000ff5c: 12 80 00 2a bne 40010004 4000ff60: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4000ff64: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000ff68: 80 a0 60 00 cmp %g1, 0 4000ff6c: 22 80 00 37 be,a 40010048 4000ff70: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 4000ff74: 9f c0 40 00 call %g1 4000ff78: 90 10 00 10 mov %l0, %o0 4000ff7c: 80 a2 20 01 cmp %o0, 1 4000ff80: 02 80 00 53 be 400100cc 4000ff84: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 4000ff88: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000ff8c: 80 a0 60 00 cmp %g1, 0 4000ff90: 02 80 00 2d be 40010044 4000ff94: a4 07 bf ec add %fp, -20, %l2 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4000ff98: 92 10 00 10 mov %l0, %o1 4000ff9c: 9f c0 40 00 call %g1 4000ffa0: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 4000ffa4: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000ffa8: 80 a0 60 00 cmp %g1, 0 4000ffac: 02 80 00 08 be 4000ffcc 4000ffb0: b0 10 00 08 mov %o0, %i0 4000ffb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000ffb8: 80 a0 60 00 cmp %g1, 0 4000ffbc: 02 80 00 05 be 4000ffd0 4000ffc0: 80 8c 60 ff btst 0xff, %l1 4000ffc4: 9f c0 40 00 call %g1 4000ffc8: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000ffcc: 80 8c 60 ff btst 0xff, %l1 4000ffd0: 02 80 00 0b be 4000fffc 4000ffd4: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000ffd8: 80 a0 60 00 cmp %g1, 0 4000ffdc: 02 80 00 56 be 40010134 4000ffe0: 01 00 00 00 nop 4000ffe4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000ffe8: 80 a0 60 00 cmp %g1, 0 4000ffec: 02 80 00 52 be 40010134 4000fff0: 01 00 00 00 nop 4000fff4: 9f c0 40 00 call %g1 4000fff8: 90 10 00 12 mov %l2, %o0 4000fffc: 81 c7 e0 08 ret 40010000: 81 e8 00 00 restore name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 40010004: 80 8c 60 ff btst 0xff, %l1 40010008: 12 80 00 04 bne 40010018 4001000c: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 40010010: 81 c7 e0 08 ret <== NOT EXECUTED 40010014: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 40010018: 80 a0 60 00 cmp %g1, 0 4001001c: 02 bf ff f8 be 4000fffc 40010020: b0 10 3f ff mov -1, %i0 40010024: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40010028: 80 a0 60 00 cmp %g1, 0 4001002c: 02 bf ff f4 be 4000fffc 40010030: 90 07 bf ec add %fp, -20, %o0 40010034: 9f c0 40 00 call %g1 40010038: 01 00 00 00 nop 4001003c: 81 c7 e0 08 ret 40010040: 81 e8 00 00 restore rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 40010044: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40010048: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001004c: 02 80 00 05 be 40010060 <== NOT EXECUTED 40010050: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40010054: 9f c0 40 00 call %g1 <== NOT EXECUTED 40010058: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 4001005c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40010060: 02 80 00 0b be 4001008c <== NOT EXECUTED 40010064: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 40010068: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001006c: 02 80 00 08 be 4001008c <== NOT EXECUTED 40010070: 01 00 00 00 nop <== NOT EXECUTED 40010074: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40010078: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001007c: 02 80 00 04 be 4001008c <== NOT EXECUTED 40010080: 01 00 00 00 nop <== NOT EXECUTED 40010084: 9f c0 40 00 call %g1 <== NOT EXECUTED 40010088: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001008c: 40 00 01 f7 call 40010868 <__errno> <== NOT EXECUTED 40010090: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40010094: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40010098: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001009c: 81 c7 e0 08 ret <== NOT EXECUTED 400100a0: 81 e8 00 00 restore <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 400100a4: 92 10 00 10 mov %l0, %o1 400100a8: 94 10 20 02 mov 2, %o2 400100ac: 96 07 bf ec add %fp, -20, %o3 400100b0: 7f ff cc cf call 400033ec 400100b4: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 400100b8: 80 a2 20 00 cmp %o0, 0 400100bc: 12 bf ff d5 bne 40010010 400100c0: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400100c4: 10 bf ff 8c b 4000fef4 400100c8: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 400100cc: c2 07 bf e4 ld [ %fp + -28 ], %g1 400100d0: 80 a0 60 00 cmp %g1, 0 400100d4: 02 80 00 09 be 400100f8 400100d8: 80 8c 60 ff btst 0xff, %l1 400100dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400100e0: 80 a0 60 00 cmp %g1, 0 400100e4: 02 80 00 05 be 400100f8 400100e8: 80 8c 60 ff btst 0xff, %l1 400100ec: 9f c0 40 00 call %g1 400100f0: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 400100f4: 80 8c 60 ff btst 0xff, %l1 400100f8: 02 80 00 0b be 40010124 400100fc: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40010100: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010104: 02 80 00 08 be 40010124 <== NOT EXECUTED 40010108: 01 00 00 00 nop <== NOT EXECUTED 4001010c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40010110: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010114: 02 80 00 04 be 40010124 <== NOT EXECUTED 40010118: 01 00 00 00 nop <== NOT EXECUTED 4001011c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40010120: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 40010124: 40 00 01 d1 call 40010868 <__errno> 40010128: b0 10 3f ff mov -1, %i0 4001012c: 82 10 20 15 mov 0x15, %g1 40010130: c2 22 00 00 st %g1, [ %o0 ] 40010134: 81 c7 e0 08 ret 40010138: 81 e8 00 00 restore 4000c0fc : */ int unmount( const char *path ) { 4000c0fc: 9d e3 bf 88 save %sp, -120, %sp * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 4000c100: 40 01 04 06 call 4004d118 4000c104: 90 10 00 18 mov %i0, %o0 4000c108: a0 07 bf ec add %fp, -20, %l0 4000c10c: 92 10 00 08 mov %o0, %o1 4000c110: 94 10 20 00 clr %o2 4000c114: 90 10 00 18 mov %i0, %o0 4000c118: 96 10 00 10 mov %l0, %o3 4000c11c: 7f ff f0 73 call 400082e8 4000c120: 98 10 20 01 mov 1, %o4 4000c124: 80 a2 20 00 cmp %o0, 0 4000c128: 12 80 00 3e bne 4000c220 4000c12c: e2 07 bf fc ld [ %fp + -4 ], %l1 return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 4000c130: c2 07 bf ec ld [ %fp + -20 ], %g1 4000c134: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 4000c138: 80 a0 80 01 cmp %g2, %g1 4000c13c: 12 80 00 41 bne 4000c240 4000c140: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4000c144: 80 a0 60 00 cmp %g1, 0 4000c148: 22 80 00 09 be,a 4000c16c 4000c14c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000c150: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000c154: 80 a0 60 00 cmp %g1, 0 4000c158: 22 80 00 05 be,a 4000c16c 4000c15c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000c160: 9f c0 40 00 call %g1 4000c164: 90 10 00 10 mov %l0, %o0 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 4000c168: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000c16c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000c170: 80 a0 60 00 cmp %g1, 0 4000c174: 02 80 00 61 be 4000c2f8 4000c178: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 4000c17c: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000c180: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000c184: 80 a0 60 00 cmp %g1, 0 4000c188: 02 80 00 5c be 4000c2f8 4000c18c: 03 10 01 b0 sethi %hi(0x4006c000), %g1 * 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 ) 4000c190: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 4006c198 4000c194: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000c198: 80 a0 40 11 cmp %g1, %l1 4000c19c: 02 80 00 23 be 4000c228 4000c1a0: 07 10 01 c0 sethi %hi(0x40070000), %g3 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c1a4: c2 00 e0 a0 ld [ %g3 + 0xa0 ], %g1 ! 400700a0 4000c1a8: 86 10 e0 a0 or %g3, 0xa0, %g3 4000c1ac: 86 00 e0 04 add %g3, 4, %g3 4000c1b0: 80 a0 40 03 cmp %g1, %g3 4000c1b4: 02 80 00 0f be 4000c1f0 4000c1b8: 01 00 00 00 nop !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 4000c1bc: c8 04 60 2c ld [ %l1 + 0x2c ], %g4 4000c1c0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000c1c4: 80 a0 80 04 cmp %g2, %g4 4000c1c8: 32 80 00 07 bne,a 4000c1e4 4000c1cc: c2 00 40 00 ld [ %g1 ], %g1 4000c1d0: 30 80 00 16 b,a 4000c228 <== NOT EXECUTED 4000c1d4: 80 a1 00 02 cmp %g4, %g2 4000c1d8: 02 80 00 14 be 4000c228 4000c1dc: 01 00 00 00 nop * 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 ) { 4000c1e0: c2 00 40 00 ld [ %g1 ], %g1 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c1e4: 80 a0 40 03 cmp %g1, %g3 4000c1e8: 32 bf ff fb bne,a 4000c1d4 4000c1ec: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 * 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 ) 4000c1f0: 7f ff f1 3e call 400086e8 4000c1f4: 90 10 00 11 mov %l1, %o0 4000c1f8: 80 a2 20 01 cmp %o0, 1 4000c1fc: 02 80 00 0b be 4000c228 4000c200: 01 00 00 00 nop * 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 ) 4000c204: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000c208: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000c20c: 9f c0 40 00 call %g1 4000c210: 90 10 00 11 mov %l1, %o0 4000c214: 80 a2 20 00 cmp %o0, 0 4000c218: 22 80 00 19 be,a 4000c27c 4000c21c: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4000c220: 81 c7 e0 08 ret 4000c224: 91 e8 3f ff restore %g0, -1, %o0 * 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 ); 4000c228: 40 00 e8 7d call 4004641c <__errno> 4000c22c: b0 10 3f ff mov -1, %i0 4000c230: 82 10 20 10 mov 0x10, %g1 4000c234: c2 22 00 00 st %g1, [ %o0 ] 4000c238: 81 c7 e0 08 ret 4000c23c: 81 e8 00 00 restore /* * 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 ); 4000c240: 80 a0 60 00 cmp %g1, 0 4000c244: 02 80 00 08 be 4000c264 4000c248: 01 00 00 00 nop 4000c24c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000c250: 80 a0 60 00 cmp %g1, 0 4000c254: 02 80 00 04 be 4000c264 4000c258: 01 00 00 00 nop 4000c25c: 9f c0 40 00 call %g1 4000c260: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4000c264: 40 00 e8 6e call 4004641c <__errno> 4000c268: b0 10 3f ff mov -1, %i0 4000c26c: 82 10 20 0d mov 0xd, %g1 4000c270: c2 22 00 00 st %g1, [ %o0 ] 4000c274: 81 c7 e0 08 ret 4000c278: 81 e8 00 00 restore * 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){ 4000c27c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000c280: 9f c0 40 00 call %g1 4000c284: 90 10 00 11 mov %l1, %o0 4000c288: 80 a2 20 00 cmp %o0, 0 4000c28c: 32 80 00 13 bne,a 4000c2d8 4000c290: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4000c294: 40 00 06 40 call 4000db94 <_Chain_Extract> 4000c298: 90 10 00 11 mov %l1, %o0 /* * 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 ); 4000c29c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000c2a0: 80 a0 60 00 cmp %g1, 0 4000c2a4: 02 80 00 09 be 4000c2c8 4000c2a8: 90 10 00 11 mov %l1, %o0 4000c2ac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000c2b0: 80 a0 60 00 cmp %g1, 0 4000c2b4: 02 80 00 05 be 4000c2c8 4000c2b8: 01 00 00 00 nop 4000c2bc: 9f c0 40 00 call %g1 4000c2c0: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 4000c2c4: 90 10 00 11 mov %l1, %o0 4000c2c8: 7f ff f0 43 call 400083d4 4000c2cc: b0 10 20 00 clr %i0 return 0; 4000c2d0: 81 c7 e0 08 ret 4000c2d4: 81 e8 00 00 restore * 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 ) 4000c2d8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 4000c2dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c2e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000c2e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c2e8: 02 bf ff ce be 4000c220 <== NOT EXECUTED 4000c2ec: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4000c2f0: 40 00 05 2e call 4000d7a8 <== NOT EXECUTED 4000c2f4: 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 ); 4000c2f8: 40 00 e8 49 call 4004641c <__errno> <== NOT EXECUTED 4000c2fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000c300: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000c304: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c308: 81 c7 e0 08 ret <== NOT EXECUTED 4000c30c: 81 e8 00 00 restore <== NOT EXECUTED 4002cac0 : int utime( const char *path, const struct utimbuf *times ) { 4002cac0: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 4002cac4: 40 00 81 95 call 4004d118 4002cac8: 90 10 00 18 mov %i0, %o0 4002cacc: a0 07 bf ec add %fp, -20, %l0 4002cad0: 92 10 00 08 mov %o0, %o1 4002cad4: 94 10 20 00 clr %o2 4002cad8: 90 10 00 18 mov %i0, %o0 4002cadc: 96 10 00 10 mov %l0, %o3 4002cae0: 98 10 20 01 mov 1, %o4 4002cae4: 7f ff 6e 01 call 400082e8 4002cae8: b0 10 3f ff mov -1, %i0 4002caec: 80 a2 20 00 cmp %o0, 0 4002caf0: 12 80 00 14 bne 4002cb40 4002caf4: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 4002caf8: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 4002cafc: 80 a0 60 00 cmp %g1, 0 4002cb00: 22 80 00 12 be,a 4002cb48 4002cb04: 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 ); 4002cb08: d4 06 60 04 ld [ %i1 + 4 ], %o2 4002cb0c: d2 06 40 00 ld [ %i1 ], %o1 4002cb10: 9f c0 40 00 call %g1 4002cb14: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 4002cb18: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002cb1c: 80 a0 60 00 cmp %g1, 0 4002cb20: 02 80 00 08 be 4002cb40 4002cb24: b0 10 00 08 mov %o0, %i0 4002cb28: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002cb2c: 80 a0 60 00 cmp %g1, 0 4002cb30: 02 80 00 0f be 4002cb6c 4002cb34: 01 00 00 00 nop 4002cb38: 9f c0 40 00 call %g1 4002cb3c: 90 10 00 10 mov %l0, %o0 return result; } 4002cb40: 81 c7 e0 08 ret 4002cb44: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 4002cb48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002cb4c: 02 80 00 04 be 4002cb5c <== NOT EXECUTED 4002cb50: 01 00 00 00 nop <== NOT EXECUTED 4002cb54: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002cb58: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002cb5c: 40 00 66 30 call 4004641c <__errno> <== NOT EXECUTED 4002cb60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002cb64: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002cb68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002cb6c: 81 c7 e0 08 ret <== NOT EXECUTED 4002cb70: 81 e8 00 00 restore <== NOT EXECUTED 400060e0 : */ void vprintk( const char *fmt, va_list ap ) { 400060e0: 9d e3 bf 88 save %sp, -120, %sp for (; *fmt != '\0'; fmt++) { 400060e4: c2 0e 00 00 ldub [ %i0 ], %g1 400060e8: 83 28 60 18 sll %g1, 0x18, %g1 400060ec: 80 a0 60 00 cmp %g1, 0 400060f0: 02 80 00 53 be 4000623c 400060f4: 29 10 00 78 sethi %hi(0x4001e000), %l4 400060f8: 3b 10 00 74 sethi %hi(0x4001d000), %i5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 400060fc: 37 10 00 74 sethi %hi(0x4001d000), %i3 bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 40006100: a8 15 22 1c or %l4, 0x21c, %l4 40006104: ba 17 62 80 or %i5, 0x280, %i5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40006108: b6 16 e1 d0 or %i3, 0x1d0, %i3 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 4000610c: ac 07 bf e8 add %fp, -24, %l6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 40006110: 91 38 60 18 sra %g1, 0x18, %o0 40006114: 80 a2 20 25 cmp %o0, 0x25 40006118: 32 80 00 41 bne,a 4000621c 4000611c: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(*fmt); continue; } fmt++; 40006120: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40006124: c2 0e 00 00 ldub [ %i0 ], %g1 40006128: 85 28 60 18 sll %g1, 0x18, %g2 4000612c: 87 38 a0 18 sra %g2, 0x18, %g3 40006130: 80 a0 e0 30 cmp %g3, 0x30 40006134: 02 80 00 8d be 40006368 40006138: b8 10 20 20 mov 0x20, %i4 lead = '0'; fmt++; } if (*fmt == '-' ) { 4000613c: 87 38 a0 18 sra %g2, 0x18, %g3 40006140: 80 a0 e0 2d cmp %g3, 0x2d 40006144: 02 80 00 84 be 40006354 40006148: aa 10 20 00 clr %l5 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4000614c: 82 00 7f d0 add %g1, -48, %g1 40006150: 82 08 60 ff and %g1, 0xff, %g1 40006154: 80 a0 60 09 cmp %g1, 9 40006158: 18 80 00 0f bgu 40006194 4000615c: a0 10 20 00 clr %l0 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; 40006160: b0 06 20 01 inc %i0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40006164: c2 0e 00 00 ldub [ %i0 ], %g1 width *= 10; width += ((unsigned) *fmt - '0'); 40006168: 87 38 a0 18 sra %g2, 0x18, %g3 4000616c: 89 2c 20 03 sll %l0, 3, %g4 40006170: 85 28 60 18 sll %g1, 0x18, %g2 40006174: a1 2c 20 01 sll %l0, 1, %l0 40006178: a0 04 00 04 add %l0, %g4, %l0 4000617c: a0 04 00 03 add %l0, %g3, %l0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40006180: 86 00 7f d0 add %g1, -48, %g3 40006184: 86 08 e0 ff and %g3, 0xff, %g3 40006188: 80 a0 e0 09 cmp %g3, 9 4000618c: 08 bf ff f5 bleu 40006160 40006190: a0 04 3f d0 add %l0, -48, %l0 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40006194: 83 38 a0 18 sra %g2, 0x18, %g1 40006198: 80 a0 60 6c cmp %g1, 0x6c 4000619c: 02 80 00 78 be 4000637c 400061a0: 80 a0 60 63 cmp %g1, 0x63 lflag = true; c = *++fmt; } if ( c == 'c' ) { 400061a4: 22 80 00 7e be,a 4000639c 400061a8: d0 06 40 00 ld [ %i1 ], %o0 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { 400061ac: 80 a0 60 73 cmp %g1, 0x73 400061b0: 02 80 00 86 be 400063c8 400061b4: 80 a0 60 4f cmp %g1, 0x4f continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 400061b8: 02 80 00 64 be 40006348 400061bc: 80 a0 60 6f cmp %g1, 0x6f 400061c0: 02 80 00 62 be 40006348 400061c4: 80 a0 60 49 cmp %g1, 0x49 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 400061c8: 02 80 00 1f be 40006244 400061cc: 80 a0 60 69 cmp %g1, 0x69 400061d0: 02 80 00 1d be 40006244 400061d4: 80 a0 60 44 cmp %g1, 0x44 400061d8: 02 80 00 1b be 40006244 400061dc: 80 a0 60 64 cmp %g1, 0x64 400061e0: 02 80 00 19 be 40006244 400061e4: 80 a0 60 55 cmp %g1, 0x55 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 400061e8: 02 80 00 c7 be 40006504 400061ec: 80 a0 60 75 cmp %g1, 0x75 400061f0: 02 80 00 c5 be 40006504 400061f4: 91 38 a0 18 sra %g2, 0x18, %o0 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 400061f8: 80 a2 20 58 cmp %o0, 0x58 400061fc: 02 80 00 bf be 400064f8 40006200: 80 a2 20 78 cmp %o0, 0x78 40006204: 02 80 00 bd be 400064f8 40006208: 80 a2 20 70 cmp %o0, 0x70 base = 16; sign = false; } else if ( c == 'p' ) { 4000620c: 82 10 20 00 clr %g1 40006210: 02 80 00 0f be 4000624c 40006214: aa 10 20 10 mov 0x10, %l5 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 40006218: c2 05 00 00 ld [ %l4 ], %g1 4000621c: 9f c0 40 00 call %g1 40006220: 01 00 00 00 nop void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40006224: b0 06 20 01 inc %i0 40006228: c2 0e 00 00 ldub [ %i0 ], %g1 4000622c: 83 28 60 18 sll %g1, 0x18, %g1 40006230: 80 a0 60 00 cmp %g1, 0 40006234: 12 bf ff b8 bne 40006114 40006238: 91 38 60 18 sra %g1, 0x18, %o0 4000623c: 81 c7 e0 08 ret 40006240: 81 e8 00 00 restore base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 40006244: 82 10 20 01 mov 1, %g1 40006248: aa 10 20 0a mov 0xa, %l5 } printNum( 4000624c: e6 06 40 00 ld [ %i1 ], %l3 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 40006250: 80 88 60 ff btst 0xff, %g1 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 40006254: b2 06 60 04 add %i1, 4, %i1 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 40006258: 02 80 00 05 be 4000626c 4000625c: b8 0f 20 30 and %i4, 0x30, %i4 40006260: 80 a4 e0 00 cmp %l3, 0 40006264: 26 80 00 9f bl,a 400064e0 40006268: c2 05 00 00 ld [ %l4 ], %g1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 4000626c: 90 10 00 13 mov %l3, %o0 40006270: 92 10 00 15 mov %l5, %o1 40006274: 40 00 4f 0e call 40019eac <.udiv> 40006278: ae 10 20 01 mov 1, %l7 4000627c: a2 92 20 00 orcc %o0, 0, %l1 40006280: 02 80 00 12 be 400062c8 40006284: a4 10 20 00 clr %l2 40006288: 10 80 00 03 b 40006294 4000628c: ae 10 00 15 mov %l5, %l7 40006290: a2 10 00 08 mov %o0, %l1 toPrint[count++] = (char) (unsigned_num - (n * base)); 40006294: 92 10 00 11 mov %l1, %o1 40006298: 40 00 4e cb call 40019dc4 <.umul> 4000629c: 90 10 00 17 mov %l7, %o0 400062a0: 90 24 c0 08 sub %l3, %o0, %o0 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 400062a4: 92 10 00 15 mov %l5, %o1 toPrint[count++] = (char) (unsigned_num - (n * base)); 400062a8: d0 2d 80 12 stb %o0, [ %l6 + %l2 ] } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 400062ac: 90 10 00 11 mov %l1, %o0 400062b0: 40 00 4e ff call 40019eac <.udiv> 400062b4: a4 04 a0 01 inc %l2 400062b8: 80 a2 20 00 cmp %o0, 0 400062bc: 12 bf ff f5 bne 40006290 400062c0: a6 10 00 11 mov %l1, %l3 400062c4: ae 04 a0 01 add %l2, 1, %l7 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 400062c8: a4 07 80 12 add %fp, %l2, %l2 for (n=maxwidth ; n > count; n-- ) 400062cc: 80 a4 00 17 cmp %l0, %l7 400062d0: 08 80 00 09 bleu 400062f4 400062d4: e6 2c bf e8 stb %l3, [ %l2 + -24 ] BSP_output_char(lead); 400062d8: c2 05 00 00 ld [ %l4 ], %g1 400062dc: 9f c0 40 00 call %g1 400062e0: 90 10 00 1c mov %i4, %o0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 400062e4: a0 04 3f ff add %l0, -1, %l0 400062e8: 80 a4 00 17 cmp %l0, %l7 400062ec: 38 bf ff fc bgu,a 400062dc 400062f0: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(lead); for (n = 0; n < count; n++) { 400062f4: 80 a5 e0 00 cmp %l7, 0 400062f8: 02 bf ff cb be 40006224 400062fc: a2 05 ff ff add %l7, -1, %l1 40006300: a0 10 20 00 clr %l0 40006304: a2 05 80 11 add %l6, %l1, %l1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40006308: c4 4c 40 00 ldsb [ %l1 ], %g2 4000630c: c2 05 00 00 ld [ %l4 ], %g1 40006310: d0 4f 40 02 ldsb [ %i5 + %g2 ], %o0 40006314: 9f c0 40 00 call %g1 40006318: a0 04 20 01 inc %l0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 4000631c: 80 a4 00 17 cmp %l0, %l7 40006320: 0a bf ff fa bcs 40006308 40006324: a2 04 7f ff add %l1, -1, %l1 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40006328: b0 06 20 01 inc %i0 4000632c: c2 0e 00 00 ldub [ %i0 ], %g1 40006330: 83 28 60 18 sll %g1, 0x18, %g1 40006334: 80 a0 60 00 cmp %g1, 0 40006338: 12 bf ff 77 bne 40006114 4000633c: 91 38 60 18 sra %g1, 0x18, %o0 40006340: 81 c7 e0 08 ret <== NOT EXECUTED 40006344: 81 e8 00 00 restore <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 40006348: 82 10 20 00 clr %g1 4000634c: 10 bf ff c0 b 4000624c 40006350: aa 10 20 08 mov 8, %l5 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; 40006354: b0 06 20 01 inc %i0 40006358: c2 0e 00 00 ldub [ %i0 ], %g1 4000635c: aa 10 20 01 mov 1, %l5 40006360: 10 bf ff 7b b 4000614c 40006364: 85 28 60 18 sll %g1, 0x18, %g2 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 40006368: b0 06 20 01 inc %i0 4000636c: c2 0e 00 00 ldub [ %i0 ], %g1 40006370: b8 10 20 30 mov 0x30, %i4 40006374: 10 bf ff 72 b 4000613c 40006378: 85 28 60 18 sll %g1, 0x18, %g2 fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; 4000637c: b0 06 20 01 inc %i0 40006380: c2 0e 00 00 ldub [ %i0 ], %g1 40006384: 85 28 60 18 sll %g1, 0x18, %g2 } if ( c == 'c' ) { 40006388: 83 38 a0 18 sra %g2, 0x18, %g1 4000638c: 80 a0 60 63 cmp %g1, 0x63 40006390: 12 bf ff 88 bne 400061b0 40006394: 80 a0 60 73 cmp %g1, 0x73 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 40006398: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED BSP_output_char(chr); 4000639c: c2 05 00 00 ld [ %l4 ], %g1 400063a0: 91 2a 20 18 sll %o0, 0x18, %o0 400063a4: 9f c0 40 00 call %g1 400063a8: 91 3a 20 18 sra %o0, 0x18, %o0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 400063ac: b0 06 20 01 inc %i0 400063b0: c2 0e 00 00 ldub [ %i0 ], %g1 400063b4: 83 28 60 18 sll %g1, 0x18, %g1 400063b8: 80 a0 60 00 cmp %g1, 0 400063bc: 12 bf ff 55 bne 40006110 400063c0: b2 06 60 04 add %i1, 4, %i1 400063c4: 30 bf ff df b,a 40006340 <== NOT EXECUTED } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 400063c8: e4 06 40 00 ld [ %i1 ], %l2 if ( str == NULL ) { 400063cc: 80 a4 a0 00 cmp %l2, 0 400063d0: 02 80 00 50 be 40006510 400063d4: b2 06 60 04 add %i1, 4, %i1 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 400063d8: c2 4c 80 00 ldsb [ %l2 ], %g1 400063dc: 80 a0 60 00 cmp %g1, 0 400063e0: 02 80 00 07 be 400063fc 400063e4: a2 10 20 00 clr %l1 400063e8: a2 04 60 01 inc %l1 400063ec: c2 4c 80 11 ldsb [ %l2 + %l1 ], %g1 400063f0: 80 a0 60 00 cmp %g1, 0 400063f4: 32 bf ff fe bne,a 400063ec 400063f8: a2 04 60 01 inc %l1 ; /* leading spaces */ if ( !minus ) 400063fc: aa 8d 60 ff andcc %l5, 0xff, %l5 40006400: 12 80 00 0e bne 40006438 40006404: 80 a4 20 00 cmp %l0, 0 for ( i=len ; i 40006410: 80 a4 20 00 cmp %l0, 0 40006414: a6 10 00 11 mov %l1, %l3 BSP_output_char(' '); 40006418: c2 05 00 00 ld [ %l4 ], %g1 4000641c: 9f c0 40 00 call %g1 40006420: 90 10 20 20 mov 0x20, %o0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 40006430: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(' '); /* no width option */ if (width == 0) { 40006434: 80 a4 20 00 cmp %l0, 0 40006438: 32 80 00 07 bne,a 40006454 4000643c: d0 4c 80 00 ldsb [ %l2 ], %o0 width = len; } /* output the string */ for ( i=0 ; i 40006448: 80 a5 60 00 cmp %l5, 0 4000644c: a0 10 00 11 mov %l1, %l0 40006450: d0 4c 80 00 ldsb [ %l2 ], %o0 40006454: 80 a2 20 00 cmp %o0, 0 40006458: 02 80 00 0f be 40006494 4000645c: 80 a5 60 00 cmp %l5, 0 BSP_output_char(*str); 40006460: c2 05 00 00 ld [ %l4 ], %g1 40006464: 9f c0 40 00 call %g1 40006468: a4 04 a0 01 inc %l2 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 40006470: d0 4c 80 00 ldsb [ %l2 ], %o0 BSP_output_char(*str); 40006474: c2 05 00 00 ld [ %l4 ], %g1 40006478: 9f c0 40 00 call %g1 4000647c: 01 00 00 00 nop if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 4000648c: a4 04 a0 01 inc %l2 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 40006490: 80 a5 60 00 cmp %l5, 0 40006494: 22 bf ff 65 be,a 40006228 40006498: b0 06 20 01 inc %i0 for ( i=len ; i 400064a4: b0 06 20 01 inc %i0 BSP_output_char(' '); 400064a8: c2 05 00 00 ld [ %l4 ], %g1 400064ac: 9f c0 40 00 call %g1 400064b0: 90 10 20 20 mov 0x20, %o0 for ( i=0 ; i 400064c0: c2 05 00 00 ld [ %l4 ], %g1 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 400064c4: b0 06 20 01 inc %i0 400064c8: c2 0e 00 00 ldub [ %i0 ], %g1 400064cc: 83 28 60 18 sll %g1, 0x18, %g1 400064d0: 80 a0 60 00 cmp %g1, 0 400064d4: 32 bf ff 10 bne,a 40006114 400064d8: 91 38 60 18 sra %g1, 0x18, %o0 400064dc: 30 bf ff 99 b,a 40006340 <== NOT EXECUTED unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 400064e0: 9f c0 40 00 call %g1 400064e4: 90 10 20 2d mov 0x2d, %o0 unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 400064e8: 80 a0 00 10 cmp %g0, %l0 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 400064ec: a6 20 00 13 neg %l3 if (maxwidth) maxwidth--; 400064f0: 10 bf ff 5f b 4000626c 400064f4: a0 64 20 00 subx %l0, 0, %l0 } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 400064f8: 82 10 20 00 clr %g1 400064fc: 10 bf ff 54 b 4000624c 40006500: aa 10 20 10 mov 0x10, %l5 if ( c == 'o' || c == 'O' ) { base = 8; sign = false; } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 40006504: 82 10 20 00 clr %g1 40006508: 10 bf ff 51 b 4000624c 4000650c: aa 10 20 0a mov 0xa, %l5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40006510: 10 bf ff b2 b 400063d8 40006514: a4 10 00 1b mov %i3, %l2 4001c7e4 : ssize_t write( int fd, const void *buffer, size_t count ) { 4001c7e4: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001c7e8: 03 10 00 78 sethi %hi(0x4001e000), %g1 4001c7ec: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 4001e124 4001c7f0: 80 a6 00 01 cmp %i0, %g1 4001c7f4: 1a 80 00 23 bcc 4001c880 4001c7f8: 03 10 00 7a sethi %hi(0x4001e800), %g1 iop = rtems_libio_iop( fd ); 4001c7fc: e0 00 62 b8 ld [ %g1 + 0x2b8 ], %l0 ! 4001eab8 4001c800: 83 2e 20 06 sll %i0, 6, %g1 4001c804: b1 2e 20 03 sll %i0, 3, %i0 4001c808: b0 06 00 01 add %i0, %g1, %i0 4001c80c: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001c810: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001c814: 80 88 61 00 btst 0x100, %g1 4001c818: 02 80 00 1a be 4001c880 4001c81c: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001c820: 02 80 00 1e be 4001c898 4001c824: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001c828: 02 80 00 14 be 4001c878 4001c82c: b0 10 20 00 clr %i0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001c830: 80 88 60 04 btst 4, %g1 4001c834: 02 80 00 19 be 4001c898 4001c838: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 4001c83c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001c840: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4001c844: 80 a0 60 00 cmp %g1, 0 4001c848: 02 80 00 1a be 4001c8b0 4001c84c: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 4001c850: 94 10 00 1a mov %i2, %o2 4001c854: 9f c0 40 00 call %g1 4001c858: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001c85c: b0 92 20 00 orcc %o0, 0, %i0 4001c860: 04 80 00 06 ble 4001c878 4001c864: 85 3e 20 1f sra %i0, 0x1f, %g2 iop->offset += rc; 4001c868: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001c86c: 86 83 40 18 addcc %o5, %i0, %g3 4001c870: 84 43 00 02 addx %o4, %g2, %g2 4001c874: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001c878: 81 c7 e0 08 ret 4001c87c: 81 e8 00 00 restore ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 4001c880: 7f ff cf fa call 40010868 <__errno> <== NOT EXECUTED 4001c884: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c888: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4001c88c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c890: 81 c7 e0 08 ret <== NOT EXECUTED 4001c894: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001c898: 7f ff cf f4 call 40010868 <__errno> <== NOT EXECUTED 4001c89c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c8a0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001c8a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c8a8: 81 c7 e0 08 ret <== NOT EXECUTED 4001c8ac: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001c8b0: 7f ff cf ee call 40010868 <__errno> <== NOT EXECUTED 4001c8b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c8b8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001c8bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c8c0: 81 c7 e0 08 ret <== NOT EXECUTED 4001c8c4: 81 e8 00 00 restore <== NOT EXECUTED 40008130 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 40008130: 9d e3 bf a0 save %sp, -96, %sp int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 40008134: 03 10 00 8b sethi %hi(0x40022c00), %g1 40008138: c2 00 63 54 ld [ %g1 + 0x354 ], %g1 ! 40022f54 4000813c: 80 a6 00 01 cmp %i0, %g1 40008140: 1a 80 00 58 bcc 400082a0 40008144: 03 10 00 90 sethi %hi(0x40024000), %g1 iop = rtems_libio_iop( fd ); 40008148: e6 00 60 bc ld [ %g1 + 0xbc ], %l3 ! 400240bc 4000814c: 83 2e 20 06 sll %i0, 6, %g1 40008150: b1 2e 20 03 sll %i0, 3, %i0 40008154: b0 06 00 01 add %i0, %g1, %i0 40008158: a6 04 c0 18 add %l3, %i0, %l3 rtems_libio_check_is_open( iop ); 4000815c: c2 04 e0 18 ld [ %l3 + 0x18 ], %g1 40008160: 80 88 61 00 btst 0x100, %g1 40008164: 02 80 00 4f be 400082a0 40008168: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000816c: 02 80 00 1d be 400081e0 40008170: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 40008174: 02 80 00 1b be 400081e0 40008178: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 4000817c: 04 80 00 19 ble 400081e0 40008180: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 40008184: 14 80 00 17 bg 400081e0 40008188: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 4000818c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40008190: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40008194: 80 a0 60 00 cmp %g1, 0 40008198: 02 80 00 48 be 400082b8 4000819c: 17 00 00 1f sethi %hi(0x7c00), %o3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 400081a0: 82 10 00 19 mov %i1, %g1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 400081a4: 96 12 e3 ff or %o3, 0x3ff, %o3 if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400081a8: 9a 10 20 01 mov 1, %o5 400081ac: 86 10 20 00 clr %g3 400081b0: 88 10 20 00 clr %g4 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 400081b4: c4 00 40 00 ld [ %g1 ], %g2 400081b8: 80 a0 a0 00 cmp %g2, 0 400081bc: 02 80 00 09 be 400081e0 400081c0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 400081c4: c4 00 60 04 ld [ %g1 + 4 ], %g2 400081c8: 80 a0 00 02 cmp %g0, %g2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 400081cc: 84 01 00 02 add %g4, %g2, %g2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 400081d0: 98 40 3f ff addx %g0, -1, %o4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 400081d4: 80 a0 80 0b cmp %g2, %o3 400081d8: 04 80 00 08 ble 400081f8 400081dc: 9a 0b 40 0c and %o5, %o4, %o5 rtems_set_errno_and_return_minus_one( EINVAL ); 400081e0: 40 00 2c 27 call 4001327c <__errno> 400081e4: b0 10 3f ff mov -1, %i0 400081e8: 82 10 20 16 mov 0x16, %g1 400081ec: c2 22 00 00 st %g1, [ %o0 ] 400081f0: 81 c7 e0 08 ret 400081f4: 81 e8 00 00 restore all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 400081f8: 80 a1 00 02 cmp %g4, %g2 400081fc: 14 bf ff f9 bg 400081e0 40008200: 86 00 e0 01 inc %g3 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 40008204: 80 a6 80 03 cmp %i2, %g3 40008208: 04 80 00 04 ble 40008218 4000820c: 82 00 60 08 add %g1, 8, %g1 40008210: 10 bf ff e9 b 400081b4 40008214: 88 10 00 02 mov %g2, %g4 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 40008218: 80 8b 60 ff btst 0xff, %o5 <== NOT EXECUTED 4000821c: a4 10 20 00 clr %l2 <== NOT EXECUTED 40008220: 12 bf ff f4 bne 400081f0 <== NOT EXECUTED 40008224: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 40008228: d4 06 60 04 ld [ %i1 + 4 ], %o2 <== NOT EXECUTED 4000822c: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 40008230: 12 80 00 07 bne 4000824c <== NOT EXECUTED 40008234: a4 04 a0 01 inc %l2 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40008238: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED 4000823c: 14 bf ff fb bg 40008228 <== NOT EXECUTED 40008240: b2 06 60 08 add %i1, 8, %i1 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40008244: 81 c7 e0 08 ret <== NOT EXECUTED 40008248: 81 e8 00 00 restore <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 4000824c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED 40008250: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 40008254: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 40008258: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000825c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if ( bytes < 0 ) 40008260: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008264: 06 80 00 1b bl 400082d0 <== NOT EXECUTED 40008268: 01 00 00 00 nop <== NOT EXECUTED return -1; if ( bytes > 0 ) { 4000826c: 02 80 00 07 be 40008288 <== NOT EXECUTED 40008270: a1 3a 20 1f sra %o0, 0x1f, %l0 <== NOT EXECUTED iop->offset += bytes; 40008274: c4 1c e0 10 ldd [ %l3 + 0x10 ], %g2 <== NOT EXECUTED 40008278: 86 80 c0 08 addcc %g3, %o0, %g3 <== NOT EXECUTED total += bytes; 4000827c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 40008280: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 40008284: c4 3c e0 10 std %g2, [ %l3 + 0x10 ] <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 40008288: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED 4000828c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40008290: 02 bf ff eb be 4000823c <== NOT EXECUTED 40008294: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED break; } return total; } 40008298: 81 c7 e0 08 ret <== NOT EXECUTED 4000829c: 81 e8 00 00 restore <== NOT EXECUTED ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 400082a0: 40 00 2b f7 call 4001327c <__errno> 400082a4: b0 10 3f ff mov -1, %i0 400082a8: 82 10 20 09 mov 9, %g1 400082ac: c2 22 00 00 st %g1, [ %o0 ] 400082b0: 81 c7 e0 08 ret 400082b4: 81 e8 00 00 restore if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400082b8: 40 00 2b f1 call 4001327c <__errno> <== NOT EXECUTED 400082bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400082c0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400082c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400082c8: 81 c7 e0 08 ret <== NOT EXECUTED 400082cc: 81 e8 00 00 restore <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 400082d0: 81 c7 e0 08 ret <== NOT EXECUTED 400082d4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED