4000f0e0 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4000f0e0: 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(); 4000f0e4: 40 00 05 12 call 4001052c 4000f0e8: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000f0ec: 91 2a 20 10 sll %o0, 0x10, %o0 4000f0f0: 91 32 20 10 srl %o0, 0x10, %o0 4000f0f4: 80 a2 20 00 cmp %o0, 0 4000f0f8: 22 80 00 0c be,a 4000f128 4000f0fc: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] 4000f100: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 4000f104: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000f108: 22 80 00 08 be,a 4000f128 <== NOT EXECUTED 4000f10c: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4000f110: 40 00 18 2a call 400151b8 <__errno> <== NOT EXECUTED 4000f114: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000f118: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000f11c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000f120: 81 c7 e0 08 ret <== NOT EXECUTED 4000f124: 81 e8 00 00 restore <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; 4000f128: f4 34 20 3a sth %i2, [ %l0 + 0x3a ] IMFS_update_ctime( jnode ); 4000f12c: 90 07 bf f8 add %fp, -8, %o0 4000f130: 7f ff d2 6c call 40003ae0 4000f134: 92 10 20 00 clr %o1 4000f138: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000f13c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000f140: 81 c7 e0 08 ret 4000f144: 91 e8 20 00 restore %g0, 0, %o0 4000da7c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000da7c: 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 ) 4000da80: 80 a6 20 00 cmp %i0, 0 4000da84: 12 80 00 04 bne 4000da94 4000da88: a0 10 20 00 clr %l0 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000da8c: 81 c7 e0 08 ret <== NOT EXECUTED 4000da90: 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 ); 4000da94: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000da98: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 4001d058 4000da9c: 92 10 00 1a mov %i2, %o1 4000daa0: d4 10 60 2c lduh [ %g1 + 0x2c ], %o2 4000daa4: 90 10 00 19 mov %i1, %o0 4000daa8: b6 2e c0 0a andn %i3, %o2, %i3 4000daac: 95 2e e0 10 sll %i3, 0x10, %o2 4000dab0: 7f ff ff c8 call 4000d9d0 4000dab4: 95 32 a0 10 srl %o2, 0x10, %o2 if ( !node ) 4000dab8: a0 92 20 00 orcc %o0, 0, %l0 4000dabc: 02 bf ff f4 be 4000da8c 4000dac0: 80 a6 60 07 cmp %i1, 7 return NULL; /* * Set the type specific information */ switch (type) { 4000dac4: 28 80 00 0a bleu,a 4000daec 4000dac8: b3 2e 60 02 sll %i1, 2, %i1 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4000dacc: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000dad0: 15 10 00 71 sethi %hi(0x4001c400), %o2 <== NOT EXECUTED 4000dad4: 17 10 00 6f sethi %hi(0x4001bc00), %o3 <== NOT EXECUTED 4000dad8: 90 12 22 f0 or %o0, 0x2f0, %o0 <== NOT EXECUTED 4000dadc: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 4000dae0: 96 12 e1 d8 or %o3, 0x1d8, %o3 <== NOT EXECUTED 4000dae4: 7f ff d0 d8 call 40001e44 <__assert_func> <== NOT EXECUTED 4000dae8: 92 10 20 5c mov 0x5c, %o1 <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4000daec: 03 10 00 36 sethi %hi(0x4000d800), %g1 4000daf0: 82 10 61 b0 or %g1, 0x1b0, %g1 ! 4000d9b0 4000daf4: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000daf8: 81 c0 40 00 jmp %g1 4000dafc: 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; 4000db00: c2 07 00 00 ld [ %i4 ], %g1 4000db04: 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; 4000db08: 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; 4000db0c: d0 06 00 00 ld [ %i0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 4000db10: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 4000db14: d0 24 20 08 st %o0, [ %l0 + 8 ] node->st_ino = ++fs_info->ino_count; 4000db18: 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 ); 4000db1c: 90 02 20 50 add %o0, 0x50, %o0 4000db20: 82 00 60 01 inc %g1 4000db24: c2 20 80 00 st %g1, [ %g2 ] 4000db28: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 4000db2c: 92 10 00 10 mov %l0, %o1 4000db30: 7f ff e2 64 call 400064c0 <_Chain_Append> 4000db34: b0 10 00 10 mov %l0, %i0 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000db38: 81 c7 e0 08 ret 4000db3c: 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; 4000db40: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 4000db44: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000db48: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000db4c: c0 24 20 50 clr [ %l0 + 0x50 ] 4000db50: c0 24 20 54 clr [ %l0 + 0x54 ] node->info.file.indirect = 0; 4000db54: c0 24 20 58 clr [ %l0 + 0x58 ] node->info.file.doubly_indirect = 0; 4000db58: c0 24 20 5c clr [ %l0 + 0x5c ] node->info.file.triply_indirect = 0; break; 4000db5c: 10 bf ff eb b 4000db08 4000db60: c0 24 20 60 clr [ %l0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 4000db64: 10 bf ff e9 b 4000db08 4000db68: 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; 4000db6c: 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; 4000db70: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 4000db74: c4 24 20 54 st %g2, [ %l0 + 0x54 ] break; 4000db78: 10 bf ff e4 b 4000db08 4000db7c: 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); 4000db80: 82 04 20 54 add %l0, 0x54, %g1 the_chain->permanent_null = NULL; 4000db84: 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); 4000db88: c2 24 20 50 st %g1, [ %l0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000db8c: 82 04 20 50 add %l0, 0x50, %g1 4000db90: 10 bf ff de b 4000db08 4000db94: c2 24 20 58 st %g1, [ %l0 + 0x58 ] 40003c04 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40003c04: 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 ); 40003c08: 80 a6 20 00 cmp %i0, 0 40003c0c: 02 80 00 2b be 40003cb8 40003c10: 80 a6 60 00 cmp %i1, 0 assert( level >= 0 ); 40003c14: 06 80 00 38 bl 40003cf4 40003c18: 11 10 00 96 sethi %hi(0x40025800), %o0 assert( the_directory->type == IMFS_DIRECTORY ); 40003c1c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40003c20: 80 a0 60 01 cmp %g1, 1 40003c24: 12 80 00 2d bne 40003cd8 40003c28: a8 06 20 54 add %i0, 0x54, %l4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40003c2c: e6 06 20 50 ld [ %i0 + 0x50 ], %l3 40003c30: 80 a4 c0 14 cmp %l3, %l4 40003c34: 02 80 00 1b be 40003ca0 40003c38: 25 10 00 9d sethi %hi(0x40027400), %l2 40003c3c: 23 10 00 96 sethi %hi(0x40025800), %l1 40003c40: a4 14 a1 b0 or %l2, 0x1b0, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40003c44: a2 14 61 a0 or %l1, 0x1a0, %l1 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40003c48: 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; 40003c4c: a0 10 20 00 clr %l0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40003c50: c2 04 80 00 ld [ %l2 ], %g1 40003c54: 90 10 00 11 mov %l1, %o0 40003c58: d6 00 60 08 ld [ %g1 + 8 ], %o3 40003c5c: 92 10 20 01 mov 1, %o1 40003c60: 40 00 46 34 call 40015530 40003c64: 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++ ) 40003c68: a0 04 20 01 inc %l0 40003c6c: 80 a6 40 10 cmp %i1, %l0 40003c70: 36 bf ff f9 bge,a 40003c54 40003c74: c2 04 80 00 ld [ %l2 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40003c78: 7f ff ff 7d call 40003a6c 40003c7c: 90 10 00 13 mov %l3, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40003c80: c2 04 e0 48 ld [ %l3 + 0x48 ], %g1 40003c84: 80 a0 60 01 cmp %g1, 1 40003c88: 22 80 00 08 be,a 40003ca8 40003c8c: 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 ) { 40003c90: 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; 40003c94: 80 a4 c0 14 cmp %l3, %l4 40003c98: 12 bf ff ee bne 40003c50 40003c9c: a0 10 20 00 clr %l0 40003ca0: 81 c7 e0 08 ret 40003ca4: 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 ); 40003ca8: 7f ff ff d7 call 40003c04 40003cac: 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 ) { 40003cb0: 10 bf ff f9 b 40003c94 40003cb4: 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 ); 40003cb8: 11 10 00 96 sethi %hi(0x40025800), %o0 <== NOT EXECUTED 40003cbc: 15 10 00 96 sethi %hi(0x40025800), %o2 <== NOT EXECUTED 40003cc0: 17 10 00 96 sethi %hi(0x40025800), %o3 <== NOT EXECUTED 40003cc4: 90 12 20 80 or %o0, 0x80, %o0 <== NOT EXECUTED 40003cc8: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40003ccc: 96 12 e1 58 or %o3, 0x158, %o3 <== NOT EXECUTED 40003cd0: 40 00 02 01 call 400044d4 <__assert_func> <== NOT EXECUTED 40003cd4: 92 10 20 84 mov 0x84, %o1 <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 40003cd8: 15 10 00 96 sethi %hi(0x40025800), %o2 <== NOT EXECUTED 40003cdc: 17 10 00 96 sethi %hi(0x40025800), %o3 <== NOT EXECUTED 40003ce0: 90 12 20 80 or %o0, 0x80, %o0 <== NOT EXECUTED 40003ce4: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40003ce8: 96 12 e1 78 or %o3, 0x178, %o3 <== NOT EXECUTED 40003cec: 40 00 01 fa call 400044d4 <__assert_func> <== NOT EXECUTED 40003cf0: 92 10 20 88 mov 0x88, %o1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 40003cf4: 15 10 00 96 sethi %hi(0x40025800), %o2 <== NOT EXECUTED 40003cf8: 17 10 00 96 sethi %hi(0x40025800), %o3 <== NOT EXECUTED 40003cfc: 90 12 20 80 or %o0, 0x80, %o0 <== NOT EXECUTED 40003d00: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40003d04: 96 12 e1 68 or %o3, 0x168, %o3 <== NOT EXECUTED 40003d08: 40 00 01 f3 call 400044d4 <__assert_func> <== NOT EXECUTED 40003d0c: 92 10 20 86 mov 0x86, %o1 <== NOT EXECUTED 40003d10: 01 00 00 00 nop 40009bc8 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009bc8: 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; 40009bcc: 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 ) 40009bd0: 2b 10 00 74 sethi %hi(0x4001d000), %l5 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009bd4: 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 ) 40009bd8: aa 15 60 58 or %l5, 0x58, %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 40009bdc: a4 10 20 00 clr %l2 40009be0: a6 07 bf d8 add %fp, -40, %l3 40009be4: 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 ); 40009be8: 90 04 40 12 add %l1, %l2, %o0 40009bec: 92 10 00 19 mov %i1, %o1 40009bf0: 94 10 00 13 mov %l3, %o2 40009bf4: 40 00 02 7e call 4000a5ec 40009bf8: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 40009bfc: 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 ); 40009c00: ac 10 00 08 mov %o0, %l6 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 40009c04: 80 a0 60 00 cmp %g1, 0 40009c08: 02 80 00 59 be 40009d6c 40009c0c: 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; 40009c10: 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 ) 40009c14: 80 a2 20 00 cmp %o0, 0 40009c18: 12 80 00 11 bne 40009c5c 40009c1c: 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 ) { 40009c20: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40009c24: 80 a0 a0 01 cmp %g2, 1 40009c28: 22 80 00 60 be,a 40009da8 40009c2c: c8 00 60 5c ld [ %g1 + 0x5c ], %g4 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 40009c30: 7f ff ff 50 call 40009970 40009c34: 90 10 00 1b mov %i3, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 40009c38: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 40009c3c: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 40009c40: 7f ff ff 6f call 400099fc 40009c44: 90 10 00 1b mov %i3, %o0 40009c48: 80 a2 20 00 cmp %o0, 0 40009c4c: 02 80 00 74 be 40009e1c 40009c50: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009c54: 81 c7 e0 08 ret 40009c58: 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 ) 40009c5c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 40009c60: 80 a0 a0 01 cmp %g2, 1 40009c64: 02 80 00 3b be 40009d50 40009c68: 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 ) { 40009c6c: 80 a5 a0 03 cmp %l6, 3 40009c70: 02 80 00 0b be 40009c9c 40009c74: a0 10 00 01 mov %g1, %l0 40009c78: 80 a5 a0 04 cmp %l6, 4 40009c7c: 02 80 00 2f be 40009d38 40009c80: 80 a5 a0 02 cmp %l6, 2 40009c84: 02 80 00 1a be 40009cec 40009c88: 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) ) { 40009c8c: 12 bf ff d8 bne 40009bec 40009c90: 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 ) { 40009c94: 10 bf ff e4 b 40009c24 <== NOT EXECUTED 40009c98: 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 ) { 40009c9c: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 40009ca0: 80 a0 60 03 cmp %g1, 3 40009ca4: 02 80 00 38 be 40009d84 40009ca8: 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 ) { 40009cac: 02 80 00 62 be 40009e34 40009cb0: 90 10 00 1b mov %i3, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 40009cb4: 80 a0 60 01 cmp %g1, 1 40009cb8: 12 80 00 53 bne 40009e04 40009cbc: 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 ) { 40009cc0: c8 04 20 5c ld [ %l0 + 0x5c ], %g4 40009cc4: 80 a1 20 00 cmp %g4, 0 40009cc8: 12 80 00 3b bne 40009db4 40009ccc: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 40009cd0: 40 00 02 16 call 4000a528 40009cd4: 92 10 00 13 mov %l3, %o1 if ( !node ) 40009cd8: a0 92 20 00 orcc %o0, 0, %l0 40009cdc: 02 80 00 24 be 40009d6c 40009ce0: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 40009ce4: 10 bf ff c1 b 40009be8 40009ce8: 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 ) 40009cec: c4 05 40 00 ld [ %l5 ], %g2 40009cf0: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 40009cf4: 80 a0 80 01 cmp %g2, %g1 40009cf8: 02 bf ff bd be 40009bec 40009cfc: 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) { 40009d00: c8 06 e0 10 ld [ %i3 + 0x10 ], %g4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 40009d04: c4 01 20 1c ld [ %g4 + 0x1c ], %g2 40009d08: 80 a0 80 01 cmp %g2, %g1 40009d0c: 22 80 00 58 be,a 40009e6c 40009d10: c4 01 20 14 ld [ %g4 + 0x14 ], %g2 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 40009d14: e0 00 60 08 ld [ %g1 + 8 ], %l0 40009d18: 80 a4 20 00 cmp %l0, 0 40009d1c: 32 bf ff b4 bne,a 40009bec 40009d20: e0 26 c0 00 st %l0, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 40009d24: 40 00 16 47 call 4000f640 <__errno> 40009d28: b0 10 3f ff mov -1, %i0 40009d2c: ec 22 00 00 st %l6, [ %o0 ] 40009d30: 81 c7 e0 08 ret 40009d34: 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 ); 40009d38: 40 00 16 42 call 4000f640 <__errno> 40009d3c: b0 10 3f ff mov -1, %i0 40009d40: 82 10 20 5b mov 0x5b, %g1 40009d44: c2 22 00 00 st %g1, [ %o0 ] 40009d48: 81 c7 e0 08 ret 40009d4c: 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 ) ) 40009d50: 7f ff ff 2b call 400099fc 40009d54: 92 10 20 01 mov 1, %o1 40009d58: 80 a2 20 00 cmp %o0, 0 40009d5c: 02 80 00 3e be 40009e54 40009d60: 01 00 00 00 nop 40009d64: 10 bf ff c2 b 40009c6c 40009d68: 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 ); 40009d6c: 40 00 16 35 call 4000f640 <__errno> 40009d70: b0 10 3f ff mov -1, %i0 40009d74: 82 10 20 02 mov 2, %g1 40009d78: c2 22 00 00 st %g1, [ %o0 ] 40009d7c: 81 c7 e0 08 ret 40009d80: 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 ); 40009d84: 90 10 00 1b mov %i3, %o0 40009d88: 7f ff ff 35 call 40009a5c 40009d8c: 92 10 20 00 clr %o1 node = pathloc->node_access; 40009d90: e0 06 c0 00 ld [ %i3 ], %l0 if ( !node ) 40009d94: 80 a4 20 00 cmp %l0, 0 40009d98: 02 80 00 1b be 40009e04 40009d9c: 01 00 00 00 nop } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 40009da0: 10 bf ff c5 b 40009cb4 40009da4: 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 ) { 40009da8: 80 a1 20 00 cmp %g4, 0 40009dac: 02 bf ff a1 be 40009c30 40009db0: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 40009db4: c4 01 20 28 ld [ %g4 + 0x28 ], %g2 *pathloc = newloc; 40009db8: 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; 40009dbc: d8 01 20 24 ld [ %g4 + 0x24 ], %o4 40009dc0: da 01 20 20 ld [ %g4 + 0x20 ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009dc4: c2 00 80 00 ld [ %g2 ], %g1 40009dc8: 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; 40009dcc: c8 01 20 1c ld [ %g4 + 0x1c ], %g4 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009dd0: 92 06 40 03 add %i1, %g3, %o1 40009dd4: 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; 40009dd8: d6 26 e0 10 st %o3, [ %i3 + 0x10 ] 40009ddc: d8 26 e0 08 st %o4, [ %i3 + 8 ] 40009de0: da 26 e0 04 st %o5, [ %i3 + 4 ] 40009de4: c8 26 c0 00 st %g4, [ %i3 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009de8: 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; 40009dec: c4 26 e0 0c st %g2, [ %i3 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009df0: 94 10 00 1a mov %i2, %o2 40009df4: 9f c0 40 00 call %g1 40009df8: 96 10 00 1b mov %i3, %o3 40009dfc: 81 c7 e0 08 ret 40009e00: 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 ); 40009e04: 40 00 16 0f call 4000f640 <__errno> 40009e08: b0 10 3f ff mov -1, %i0 40009e0c: 82 10 20 14 mov 0x14, %g1 40009e10: c2 22 00 00 st %g1, [ %o0 ] 40009e14: 81 c7 e0 08 ret 40009e18: 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 ); 40009e1c: 40 00 16 09 call 4000f640 <__errno> 40009e20: b0 10 3f ff mov -1, %i0 40009e24: 82 10 20 0d mov 0xd, %g1 40009e28: c2 22 00 00 st %g1, [ %o0 ] return result; } 40009e2c: 81 c7 e0 08 ret 40009e30: 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 ); 40009e34: 7f ff ff 25 call 40009ac8 40009e38: 92 10 20 00 clr %o1 node = pathloc->node_access; 40009e3c: e0 06 c0 00 ld [ %i3 ], %l0 if ( result == -1 ) 40009e40: 80 a2 3f ff cmp %o0, -1 40009e44: 02 bf ff 84 be 40009c54 40009e48: 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; 40009e4c: 10 bf ff 9a b 40009cb4 40009e50: 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 ); 40009e54: 40 00 15 fb call 4000f640 <__errno> 40009e58: b0 10 3f ff mov -1, %i0 40009e5c: 82 10 20 0d mov 0xd, %g1 40009e60: c2 22 00 00 st %g1, [ %o0 ] 40009e64: 81 c7 e0 08 ret 40009e68: 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; 40009e6c: 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; 40009e70: d8 01 20 10 ld [ %g4 + 0x10 ], %o4 40009e74: da 01 20 0c ld [ %g4 + 0xc ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 40009e78: c2 00 80 00 ld [ %g2 ], %g1 40009e7c: 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; 40009e80: 10 bf ff d4 b 40009dd0 40009e84: c8 01 20 08 ld [ %g4 + 8 ], %g4 40009f60 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 40009f60: 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; 40009f64: e0 06 40 00 ld [ %i1 ], %l0 /* * Get the path length. */ pathlen = strlen( path ); 40009f68: 90 10 00 18 mov %i0, %o0 40009f6c: 40 00 19 6c call 4001051c 40009f70: 2d 10 00 74 sethi %hi(0x4001d000), %l6 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 40009f74: a2 10 00 18 mov %i0, %l1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 40009f78: a6 10 20 00 clr %l3 40009f7c: a8 07 bf d8 add %fp, -40, %l4 40009f80: aa 07 bf fc add %fp, -4, %l5 40009f84: 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 ) 40009f88: ac 15 a0 58 or %l6, 0x58, %l6 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 40009f8c: 92 10 00 12 mov %l2, %o1 40009f90: 90 04 40 13 add %l1, %l3, %o0 40009f94: 94 10 00 14 mov %l4, %o2 40009f98: 40 00 01 95 call 4000a5ec 40009f9c: 96 10 00 15 mov %l5, %o3 pathlen -= len; i += len; if ( !pathloc->node_access ) 40009fa0: c2 06 40 00 ld [ %i1 ], %g1 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 40009fa4: 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 ); 40009fa8: ae 10 00 08 mov %o0, %l7 pathlen -= len; i += len; if ( !pathloc->node_access ) 40009fac: 80 a0 60 00 cmp %g1, 0 40009fb0: 02 80 00 5e be 4000a128 40009fb4: a4 24 80 1d sub %l2, %i5, %l2 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 40009fb8: 80 a2 20 00 cmp %o0, 0 40009fbc: 32 80 00 08 bne,a 40009fdc 40009fc0: 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 ); 40009fc4: 40 00 15 9f call 4000f640 <__errno> 40009fc8: b0 10 3f ff mov -1, %i0 40009fcc: 82 10 20 11 mov 0x11, %g1 40009fd0: c2 22 00 00 st %g1, [ %o0 ] 40009fd4: 81 c7 e0 08 ret 40009fd8: 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 ) 40009fdc: 80 a0 a0 01 cmp %g2, 1 40009fe0: 02 80 00 58 be 4000a140 40009fe4: 90 10 00 19 mov %i1, %o0 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 40009fe8: 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 ) { 40009fec: 80 a5 e0 02 cmp %l7, 2 40009ff0: 02 80 00 30 be 4000a0b0 40009ff4: a0 10 00 01 mov %g1, %l0 40009ff8: 80 a5 e0 02 cmp %l7, 2 40009ffc: 08 80 00 0d bleu 4000a030 4000a000: 80 a5 e0 00 cmp %l7, 0 4000a004: 80 a5 e0 03 cmp %l7, 3 4000a008: 02 80 00 12 be 4000a050 4000a00c: 80 a5 e0 04 cmp %l7, 4 4000a010: 12 bf ff e0 bne 40009f90 4000a014: 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 ); 4000a018: 40 00 15 8a call 4000f640 <__errno> 4000a01c: b0 10 3f ff mov -1, %i0 4000a020: 82 10 20 5b mov 0x5b, %g1 4000a024: c2 22 00 00 st %g1, [ %o0 ] 4000a028: 81 c7 e0 08 ret 4000a02c: 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 ) { 4000a030: 12 bf ff d8 bne 40009f90 4000a034: 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 ); 4000a038: 40 00 15 82 call 4000f640 <__errno> <== NOT EXECUTED 4000a03c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a040: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 4000a044: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a048: 81 c7 e0 08 ret <== NOT EXECUTED 4000a04c: 81 e8 00 00 restore <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4000a050: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000a054: 80 a0 60 03 cmp %g1, 3 4000a058: 02 80 00 7f be 4000a254 4000a05c: 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 ) { 4000a060: 02 80 00 7e be 4000a258 4000a064: 90 10 00 19 mov %i1, %o0 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 4000a068: 80 a4 20 00 cmp %l0, 0 4000a06c: 02 80 00 61 be 4000a1f0 4000a070: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000a074: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a078: 80 a0 60 01 cmp %g1, 1 4000a07c: 12 80 00 5d bne 4000a1f0 4000a080: 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 ) { 4000a084: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 4000a088: 80 a0 e0 00 cmp %g3, 0 4000a08c: 12 80 00 5f bne 4000a208 4000a090: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000a094: 40 00 01 25 call 4000a528 4000a098: 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 ) 4000a09c: a0 92 20 00 orcc %o0, 0, %l0 4000a0a0: 02 80 00 17 be 4000a0fc 4000a0a4: c2 07 bf fc ld [ %fp + -4 ], %g1 done = true; else pathloc->node_access = node; 4000a0a8: 10 bf ff b9 b 40009f8c 4000a0ac: 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 ) 4000a0b0: c4 05 80 00 ld [ %l6 ], %g2 4000a0b4: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 4000a0b8: 80 a0 80 01 cmp %g2, %g1 4000a0bc: 02 bf ff b5 be 40009f90 4000a0c0: 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){ 4000a0c4: c6 06 60 10 ld [ %i1 + 0x10 ], %g3 4000a0c8: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 4000a0cc: 80 a0 80 01 cmp %g2, %g1 4000a0d0: 22 80 00 6f be,a 4000a28c 4000a0d4: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4000a0d8: e0 00 60 08 ld [ %g1 + 8 ], %l0 4000a0dc: 80 a4 20 00 cmp %l0, 0 4000a0e0: 32 bf ff ac bne,a 40009f90 4000a0e4: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a0e8: 40 00 15 56 call 4000f640 <__errno> 4000a0ec: b0 10 3f ff mov -1, %i0 4000a0f0: ee 22 00 00 st %l7, [ %o0 ] 4000a0f4: 81 c7 e0 08 ret 4000a0f8: 81 e8 00 00 restore case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4000a0fc: 82 24 c0 01 sub %l3, %g1, %g1 4000a100: 82 04 40 01 add %l1, %g1, %g1 4000a104: 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++) { 4000a108: c2 4c 40 13 ldsb [ %l1 + %l3 ], %g1 4000a10c: 80 a0 60 00 cmp %g1, 0 4000a110: 02 80 00 23 be 4000a19c 4000a114: 80 a0 60 2f cmp %g1, 0x2f if ( !IMFS_is_separator( path[ i ] ) ) 4000a118: 02 80 00 11 be 4000a15c 4000a11c: 80 a0 60 5c cmp %g1, 0x5c 4000a120: 22 80 00 10 be,a 4000a160 4000a124: a2 04 40 13 add %l1, %l3, %l1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000a128: 40 00 15 46 call 4000f640 <__errno> <== NOT EXECUTED 4000a12c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a130: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 4000a134: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a138: 81 c7 e0 08 ret <== NOT EXECUTED 4000a13c: 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 ) ) 4000a140: 7f ff fe 2f call 400099fc 4000a144: 92 10 20 01 mov 1, %o1 4000a148: 80 a2 20 00 cmp %o0, 0 4000a14c: 02 80 00 4a be 4000a274 4000a150: 01 00 00 00 nop 4000a154: 10 bf ff a5 b 40009fe8 4000a158: 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 ); 4000a15c: 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++) { 4000a160: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 4000a164: 80 a0 60 00 cmp %g1, 0 4000a168: 02 80 00 0d be 4000a19c 4000a16c: a2 04 60 01 inc %l1 if ( !IMFS_is_separator( path[ i ] ) ) 4000a170: 80 a0 60 5c cmp %g1, 0x5c 4000a174: 02 bf ff fb be 4000a160 4000a178: 80 a0 60 2f cmp %g1, 0x2f 4000a17c: 22 bf ff fa be,a 4000a164 4000a180: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000a184: 40 00 15 2f call 4000f640 <__errno> 4000a188: b0 10 3f ff mov -1, %i0 4000a18c: 82 10 20 02 mov 2, %g1 4000a190: c2 22 00 00 st %g1, [ %o0 ] 4000a194: 81 c7 e0 08 ret 4000a198: 81 e8 00 00 restore /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4000a19c: 7f ff fd f5 call 40009970 4000a1a0: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 4000a1a4: c2 06 40 00 ld [ %i1 ], %g1 4000a1a8: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000a1ac: 80 a0 60 01 cmp %g1, 1 4000a1b0: 12 80 00 10 bne 4000a1f0 4000a1b4: 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 ) ) 4000a1b8: 90 10 00 19 mov %i1, %o0 4000a1bc: 7f ff fe 10 call 400099fc 4000a1c0: 92 10 20 03 mov 3, %o1 4000a1c4: 80 a2 20 00 cmp %o0, 0 4000a1c8: 02 80 00 04 be 4000a1d8 4000a1cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000a1d0: 81 c7 e0 08 ret 4000a1d4: 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 ); 4000a1d8: 40 00 15 1a call 4000f640 <__errno> 4000a1dc: b0 10 3f ff mov -1, %i0 4000a1e0: 82 10 20 0d mov 0xd, %g1 4000a1e4: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000a1e8: 81 c7 e0 08 ret 4000a1ec: 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 ); 4000a1f0: 40 00 15 14 call 4000f640 <__errno> 4000a1f4: b0 10 3f ff mov -1, %i0 4000a1f8: 82 10 20 14 mov 0x14, %g1 4000a1fc: c2 22 00 00 st %g1, [ %o0 ] 4000a200: 81 c7 e0 08 ret 4000a204: 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; 4000a208: c4 00 e0 28 ld [ %g3 + 0x28 ], %g2 *pathloc = newloc; 4000a20c: 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; 4000a210: da 00 e0 24 ld [ %g3 + 0x24 ], %o5 4000a214: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a218: 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; 4000a21c: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a220: 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; 4000a224: d8 26 60 10 st %o4, [ %i1 + 0x10 ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a228: 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; 4000a22c: da 26 60 08 st %o5, [ %i1 + 8 ] 4000a230: c8 26 60 04 st %g4, [ %i1 + 4 ] 4000a234: c6 26 40 00 st %g3, [ %i1 ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a238: 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; 4000a23c: c4 26 60 0c st %g2, [ %i1 + 0xc ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a240: 92 10 00 19 mov %i1, %o1 4000a244: 9f c0 40 00 call %g1 4000a248: 94 10 00 1a mov %i2, %o2 4000a24c: 81 c7 e0 08 ret 4000a250: 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 ); 4000a254: 90 10 00 19 mov %i1, %o0 4000a258: 7f ff ff 0c call 40009e88 4000a25c: 92 10 20 00 clr %o1 if ( result == -1 ) 4000a260: 80 a2 3f ff cmp %o0, -1 4000a264: 02 bf ff 5c be 40009fd4 4000a268: b0 10 00 08 mov %o0, %i0 4000a26c: 10 bf ff 7f b 4000a068 4000a270: 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 ); 4000a274: 40 00 14 f3 call 4000f640 <__errno> 4000a278: b0 10 3f ff mov -1, %i0 4000a27c: 82 10 20 0d mov 0xd, %g1 4000a280: c2 22 00 00 st %g1, [ %o0 ] 4000a284: 81 c7 e0 08 ret 4000a288: 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; 4000a28c: 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; 4000a290: da 00 e0 10 ld [ %g3 + 0x10 ], %o5 4000a294: c8 00 e0 0c ld [ %g3 + 0xc ], %g4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a298: 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; 4000a29c: 10 bf ff e1 b 4000a220 4000a2a0: c6 00 e0 08 ld [ %g3 + 8 ], %g3 40009a5c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009a5c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 40009a60: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 40009a64: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40009a68: 80 a0 a0 03 cmp %g2, 3 40009a6c: 12 80 00 14 bne 40009abc 40009a70: 90 10 00 18 mov %i0, %o0 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 40009a74: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 IMFS_Set_handlers( node ); 40009a78: 7f ff ff be call 40009970 40009a7c: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 40009a80: 90 10 00 18 mov %i0, %o0 40009a84: 92 10 00 19 mov %i1, %o1 40009a88: 7f ff ff dd call 400099fc 40009a8c: b0 10 20 00 clr %i0 40009a90: 80 a2 20 00 cmp %o0, 0 40009a94: 02 80 00 04 be 40009aa4 40009a98: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009a9c: 81 c7 e0 08 ret 40009aa0: 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 ); 40009aa4: 40 00 16 e7 call 4000f640 <__errno> <== NOT EXECUTED 40009aa8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009aac: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40009ab0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 40009ab4: 81 c7 e0 08 ret <== NOT EXECUTED 40009ab8: 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); 40009abc: 7f ff f1 92 call 40006104 <== NOT EXECUTED 40009ac0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40009ac4: 01 00 00 00 nop 40009e88 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009e88: 9d e3 bf a0 save %sp, -96, %sp 40009e8c: 21 10 00 74 sethi %hi(0x4001d000), %l0 40009e90: a2 10 00 18 mov %i0, %l1 40009e94: c2 04 20 58 ld [ %l0 + 0x58 ], %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 ) ) ); 40009e98: 10 80 00 07 b 40009eb4 40009e9c: a6 14 20 58 or %l0, 0x58, %l3 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 40009ea0: 02 80 00 21 be 40009f24 40009ea4: 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 ) ) ); 40009ea8: 80 a0 a0 01 cmp %g2, 1 40009eac: 18 80 00 1b bgu 40009f18 40009eb0: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 40009eb4: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 40009eb8: e4 04 40 00 ld [ %l1 ], %l2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 40009ebc: 84 00 a0 01 inc %g2 40009ec0: c4 30 60 2e sth %g2, [ %g1 + 0x2e ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 40009ec4: 85 28 a0 10 sll %g2, 0x10, %g2 40009ec8: 85 30 a0 10 srl %g2, 0x10, %g2 40009ecc: 80 a0 a0 05 cmp %g2, 5 40009ed0: 18 80 00 1d bgu 40009f44 40009ed4: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 40009ed8: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 40009edc: 80 a0 a0 03 cmp %g2, 3 40009ee0: 12 bf ff f0 bne 40009ea0 40009ee4: 80 a0 a0 04 cmp %g2, 4 result = IMFS_evaluate_hard_link( node, flags ); 40009ee8: 90 10 00 11 mov %l1, %o0 40009eec: 7f ff fe dc call 40009a5c 40009ef0: 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 ) ) ); 40009ef4: 80 a2 20 00 cmp %o0, 0 40009ef8: 12 80 00 08 bne 40009f18 40009efc: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 40009f00: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 40009f04: 84 00 bf fd add %g2, -3, %g2 40009f08: 80 a0 a0 01 cmp %g2, 1 40009f0c: 08 bf ff ea bleu 40009eb4 40009f10: c2 04 c0 00 ld [ %l3 ], %g1 40009f14: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 40009f18: c0 30 60 2e clrh [ %g1 + 0x2e ] return result; } 40009f1c: 81 c7 e0 08 ret 40009f20: 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 ); 40009f24: 90 10 00 11 mov %l1, %o0 40009f28: 7f ff fe e8 call 40009ac8 40009f2c: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 40009f30: 80 a2 20 00 cmp %o0, 0 40009f34: 22 bf ff f4 be,a 40009f04 40009f38: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 40009f3c: 10 bf ff f7 b 40009f18 40009f40: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 40009f44: 40 00 15 bf call 4000f640 <__errno> 40009f48: c0 30 60 2e clrh [ %g1 + 0x2e ] 40009f4c: 82 10 20 5c mov 0x5c, %g1 40009f50: c2 22 00 00 st %g1, [ %o0 ] 40009f54: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 40009f58: 81 c7 e0 08 ret 40009f5c: 91 e8 00 08 restore %g0, %o0, %o0 400099fc : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 400099fc: 9d e3 bf a0 save %sp, -96, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 40009a00: 40 00 04 de call 4000ad78 40009a04: e0 06 00 00 ld [ %i0 ], %l0 st_gid = getegid(); 40009a08: 40 00 04 d8 call 4000ad68 40009a0c: 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 ) 40009a10: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 40009a14: a3 2c 60 10 sll %l1, 0x10, %l1 40009a18: a3 34 60 10 srl %l1, 0x10, %l1 40009a1c: 80 a4 40 01 cmp %l1, %g1 40009a20: 02 80 00 09 be 40009a44 40009a24: 83 2e 60 06 sll %i1, 6, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 40009a28: c2 14 20 3a lduh [ %l0 + 0x3a ], %g1 40009a2c: 91 2a 20 10 sll %o0, 0x10, %o0 40009a30: 91 32 20 10 srl %o0, 0x10, %o0 40009a34: 80 a2 00 01 cmp %o0, %g1 40009a38: 02 80 00 03 be 40009a44 40009a3c: 83 2e 60 03 sll %i1, 3, %g1 40009a40: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED flags_to_test <<= 3; 40009a44: c4 14 20 2e lduh [ %l0 + 0x2e ], %g2 40009a48: 82 28 40 02 andn %g1, %g2, %g1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 40009a4c: 80 a0 00 01 cmp %g0, %g1 40009a50: b0 60 3f ff subx %g0, -1, %i0 40009a54: 81 c7 e0 08 ret 40009a58: 81 e8 00 00 restore 40009ac8 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009ac8: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 40009acc: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 40009ad0: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40009ad4: 80 a0 a0 04 cmp %g2, 4 40009ad8: 12 80 00 39 bne 40009bbc 40009adc: 01 00 00 00 nop rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 40009ae0: c4 00 60 08 ld [ %g1 + 8 ], %g2 40009ae4: 80 a0 a0 00 cmp %g2, 0 40009ae8: 02 80 00 33 be 40009bb4 40009aec: 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; 40009af0: c4 26 00 00 st %g2, [ %i0 ] rtems_filesystem_get_sym_start_loc( 40009af4: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40009af8: c6 48 80 00 ldsb [ %g2 ], %g3 40009afc: 80 a0 e0 5c cmp %g3, 0x5c 40009b00: 02 80 00 19 be 40009b64 40009b04: 80 a0 e0 2f cmp %g3, 0x2f 40009b08: 02 80 00 17 be 40009b64 40009b0c: 80 a0 e0 00 cmp %g3, 0 40009b10: 02 80 00 15 be 40009b64 40009b14: 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] ), 40009b18: a0 00 80 10 add %g2, %l0, %l0 40009b1c: 40 00 1a 80 call 4001051c 40009b20: 90 10 00 10 mov %l0, %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 40009b24: 94 10 00 19 mov %i1, %o2 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 40009b28: 92 10 00 08 mov %o0, %o1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 40009b2c: 96 10 00 18 mov %i0, %o3 40009b30: 40 00 00 26 call 40009bc8 40009b34: 90 10 00 10 mov %l0, %o0 40009b38: a0 10 00 08 mov %o0, %l0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 40009b3c: 7f ff ff 8d call 40009970 40009b40: 90 10 00 18 mov %i0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 40009b44: 90 10 00 18 mov %i0, %o0 40009b48: 7f ff ff ad call 400099fc 40009b4c: 92 10 00 19 mov %i1, %o1 40009b50: 80 a2 20 00 cmp %o0, 0 40009b54: 02 80 00 13 be 40009ba0 40009b58: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009b5c: 81 c7 e0 08 ret 40009b60: 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( 40009b64: 05 10 00 74 sethi %hi(0x4001d000), %g2 40009b68: c4 00 a0 58 ld [ %g2 + 0x58 ], %g2 ! 4001d058 40009b6c: a0 10 20 01 mov 1, %l0 40009b70: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3 40009b74: c6 26 00 00 st %g3, [ %i0 ] 40009b78: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 40009b7c: c6 26 20 04 st %g3, [ %i0 + 4 ] 40009b80: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 40009b84: c6 26 20 08 st %g3, [ %i0 + 8 ] 40009b88: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 40009b8c: c6 26 20 0c st %g3, [ %i0 + 0xc ] 40009b90: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2 40009b94: c4 26 20 10 st %g2, [ %i0 + 0x10 ] 40009b98: 10 bf ff e0 b 40009b18 40009b9c: 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 ); 40009ba0: 40 00 16 a8 call 4000f640 <__errno> <== NOT EXECUTED 40009ba4: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED 40009ba8: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40009bac: 10 bf ff ec b 40009b5c <== NOT EXECUTED 40009bb0: 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 ); 40009bb4: 7f ff f1 54 call 40006104 <== NOT EXECUTED 40009bb8: 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); 40009bbc: 7f ff f1 52 call 40006104 <== NOT EXECUTED 40009bc0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40009bc4: 01 00 00 00 nop 4000db98 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000db98: 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(); 4000db9c: 7f ff f4 77 call 4000ad78 4000dba0: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000dba4: 91 2a 20 10 sll %o0, 0x10, %o0 4000dba8: 91 32 20 10 srl %o0, 0x10, %o0 4000dbac: 80 a2 20 00 cmp %o0, 0 4000dbb0: 22 80 00 0c be,a 4000dbe0 4000dbb4: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 4000dbb8: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 4000dbbc: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000dbc0: 22 80 00 08 be,a 4000dbe0 <== NOT EXECUTED 4000dbc4: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4000dbc8: 40 00 06 9e call 4000f640 <__errno> <== NOT EXECUTED 4000dbcc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000dbd0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000dbd4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000dbd8: 81 c7 e0 08 ret <== NOT EXECUTED 4000dbdc: 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 ); 4000dbe0: 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); 4000dbe4: 82 08 70 00 and %g1, -4096, %g1 IMFS_update_ctime( jnode ); 4000dbe8: 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); 4000dbec: b2 0e 6f ff and %i1, 0xfff, %i1 4000dbf0: b2 16 40 01 or %i1, %g1, %i1 IMFS_update_ctime( jnode ); 4000dbf4: 7f ff f4 65 call 4000ad88 4000dbf8: f2 34 20 2e sth %i1, [ %l0 + 0x2e ] 4000dbfc: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000dc00: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000dc04: 81 c7 e0 08 ret 4000dc08: 91 e8 20 00 restore %g0, 0, %o0 4000a464 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000a464: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a468: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000a46c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000a470: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000a474: 40 00 0b e6 call 4000d40c <== NOT EXECUTED 4000a478: 90 04 60 50 add %l1, 0x50, %o0 <== NOT EXECUTED if (! err) { 4000a47c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a480: 02 80 00 06 be 4000a498 <== NOT EXECUTED 4000a484: 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); 4000a488: 06 80 00 14 bl 4000a4d8 <== NOT EXECUTED 4000a48c: 01 00 00 00 nop <== NOT EXECUTED } 4000a490: 81 c7 e0 08 ret <== NOT EXECUTED 4000a494: 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; 4000a498: 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) 4000a49c: 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; 4000a4a0: 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) 4000a4a4: 40 00 02 72 call 4000ae6c <== NOT EXECUTED 4000a4a8: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED 4000a4ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a4b0: 12 80 00 08 bne 4000a4d0 <== NOT EXECUTED 4000a4b4: 01 00 00 00 nop <== NOT EXECUTED 4000a4b8: c2 14 60 30 lduh [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 4000a4bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a4c0: 12 80 00 04 bne 4000a4d0 <== NOT EXECUTED 4000a4c4: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 4000a4c8: 40 00 01 b6 call 4000aba0 <== NOT EXECUTED 4000a4cc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000a4d0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a4d4: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000a4d8: 40 00 14 5a call 4000f640 <__errno> <== NOT EXECUTED 4000a4dc: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a4e0: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000a4e4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a4e8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000a300 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000a300: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 4000a304: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED 4000a308: 82 10 62 7e or %g1, 0x27e, %g1 ! 8004667e <== NOT EXECUTED 4000a30c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000a310: 02 80 00 0c be 4000a340 <== NOT EXECUTED 4000a314: 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); 4000a318: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 4000a31c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a320: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000a324: 40 00 0b 2b call 4000cfd0 <== NOT EXECUTED 4000a328: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a32c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a330: 06 80 00 13 bl 4000a37c <== NOT EXECUTED 4000a334: b2 20 00 18 neg %i0, %i1 <== NOT EXECUTED } 4000a338: 81 c7 e0 08 ret <== NOT EXECUTED 4000a33c: 81 e8 00 00 restore <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 4000a340: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000a344: 02 80 00 0e be 4000a37c <== NOT EXECUTED 4000a348: b2 10 20 0e mov 0xe, %i1 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 4000a34c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000a350: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a354: 02 80 00 06 be 4000a36c <== NOT EXECUTED 4000a358: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 4000a35c: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 4000a360: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000a364: 81 c7 e0 08 ret <== NOT EXECUTED 4000a368: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000a36c: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000a370: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000a374: 81 c7 e0 08 ret <== NOT EXECUTED 4000a378: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4000a37c: 40 00 14 b1 call 4000f640 <__errno> <== NOT EXECUTED 4000a380: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a384: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED } 4000a388: 81 c7 e0 08 ret <== NOT EXECUTED 4000a38c: 81 e8 00 00 restore <== NOT EXECUTED 4000a2a4 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4000a2a4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000a2a8: 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 ) { 4000a2ac: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000a2b0: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000a2b4: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 4000a2b8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a2bc: 40 00 0b 27 call 4000cf58 <== NOT EXECUTED 4000a2c0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000a2c4: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 4000a2c8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a2cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000a2d0: 06 80 00 05 bl 4000a2e4 <== NOT EXECUTED 4000a2d4: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED } 4000a2d8: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 4000a2dc: 81 c7 e0 08 ret <== NOT EXECUTED 4000a2e0: 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); 4000a2e4: 40 00 14 d7 call 4000f640 <__errno> <== NOT EXECUTED 4000a2e8: a0 20 00 10 neg %l0 <== NOT EXECUTED 4000a2ec: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 4000a2f0: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 4000a2f4: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 4000a2f8: 10 bf ff f8 b 4000a2d8 <== NOT EXECUTED 4000a2fc: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 4000a4ec : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000a4ec: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4000a4f0: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000a4f4: 92 10 00 18 mov %i0, %o1 IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4000a4f8: 40 00 0c 17 call 4000d554 4000a4fc: 90 02 20 50 add %o0, 0x50, %o0 IMFS_FIFO_RETURN(err); 4000a500: b0 92 20 00 orcc %o0, 0, %i0 4000a504: 06 80 00 04 bl 4000a514 4000a508: 01 00 00 00 nop } 4000a50c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a510: 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); 4000a514: 40 00 14 4b call 4000f640 <__errno> 4000a518: b0 20 00 18 neg %i0 4000a51c: f0 22 00 00 st %i0, [ %o0 ] } 4000a520: 81 c7 e0 08 ret 4000a524: 91 e8 3f ff restore %g0, -1, %o0 4000a3fc : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000a3fc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a400: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000a404: 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); 4000a408: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000a40c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a410: 40 00 0b 09 call 4000d034 <== NOT EXECUTED 4000a414: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 4000a418: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a41c: 04 80 00 08 ble 4000a43c <== NOT EXECUTED 4000a420: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 4000a424: 40 00 02 59 call 4000ad88 <== NOT EXECUTED 4000a428: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a42c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000a430: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED 4000a434: 81 c7 e0 08 ret <== NOT EXECUTED 4000a438: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a43c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000a440: 12 80 00 04 bne 4000a450 <== NOT EXECUTED 4000a444: 01 00 00 00 nop <== NOT EXECUTED } 4000a448: 81 c7 e0 08 ret <== NOT EXECUTED 4000a44c: 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); 4000a450: 40 00 14 7c call 4000f640 <__errno> <== NOT EXECUTED 4000a454: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a458: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000a45c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a460: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000a390 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000a390: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a394: 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 ) { 4000a398: 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); 4000a39c: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000a3a0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a3a4: 40 00 0b 93 call 4000d1f0 <== NOT EXECUTED 4000a3a8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 4000a3ac: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a3b0: 04 80 00 09 ble 4000a3d4 <== NOT EXECUTED 4000a3b4: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 4000a3b8: 40 00 02 74 call 4000ad88 <== NOT EXECUTED 4000a3bc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a3c0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000a3c4: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4000a3c8: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 4000a3cc: 81 c7 e0 08 ret <== NOT EXECUTED 4000a3d0: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000a3d4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000a3d8: 12 80 00 04 bne 4000a3e8 <== NOT EXECUTED 4000a3dc: 01 00 00 00 nop <== NOT EXECUTED } 4000a3e0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a3e4: 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); 4000a3e8: 40 00 14 96 call 4000f640 <__errno> <== NOT EXECUTED 4000a3ec: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a3f0: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000a3f4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a3f8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000a528 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000a528: 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 ); 4000a52c: 80 a6 20 00 cmp %i0, 0 4000a530: 02 80 00 26 be 4000a5c8 4000a534: 80 a6 60 00 cmp %i1, 0 if ( !name ) 4000a538: 02 80 00 11 be 4000a57c 4000a53c: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000a540: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000a544: 40 00 17 a5 call 400103d8 4000a548: 92 12 63 40 or %o1, 0x340, %o1 ! 4001c340 4000a54c: 80 a2 20 00 cmp %o0, 0 4000a550: 02 80 00 09 be 4000a574 4000a554: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000a558: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000a55c: 40 00 17 9f call 400103d8 4000a560: 92 12 63 48 or %o1, 0x348, %o1 ! 4001c348 4000a564: 80 a2 20 00 cmp %o0, 0 4000a568: 32 80 00 07 bne,a 4000a584 4000a56c: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 return directory->Parent; 4000a570: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000a574: 81 c7 e0 08 ret <== NOT EXECUTED 4000a578: 81 e8 00 00 restore <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000a57c: 81 c7 e0 08 ret 4000a580: 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; 4000a584: 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; 4000a588: 80 a4 00 18 cmp %l0, %i0 4000a58c: 12 80 00 07 bne 4000a5a8 4000a590: 90 10 00 19 mov %i1, %o0 4000a594: 81 c7 e0 08 ret 4000a598: 91 e8 20 00 restore %g0, 0, %o0 4000a59c: 80 a4 00 18 cmp %l0, %i0 4000a5a0: 02 bf ff f7 be 4000a57c 4000a5a4: 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 ) ) 4000a5a8: 40 00 17 8c call 400103d8 4000a5ac: 92 04 20 0c add %l0, 0xc, %o1 4000a5b0: 80 a2 20 00 cmp %o0, 0 4000a5b4: 32 bf ff fa bne,a 4000a59c 4000a5b8: e0 04 00 00 ld [ %l0 ], %l0 4000a5bc: b0 10 00 10 mov %l0, %i0 4000a5c0: 81 c7 e0 08 ret 4000a5c4: 81 e8 00 00 restore /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000a5c8: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000a5cc: 15 10 00 70 sethi %hi(0x4001c000), %o2 <== NOT EXECUTED 4000a5d0: 17 10 00 70 sethi %hi(0x4001c000), %o3 <== NOT EXECUTED 4000a5d4: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED 4000a5d8: 94 12 a3 50 or %o2, 0x350, %o2 <== NOT EXECUTED 4000a5dc: 96 12 e3 30 or %o3, 0x330, %o3 <== NOT EXECUTED 4000a5e0: 7f ff de 19 call 40001e44 <__assert_func> <== NOT EXECUTED 4000a5e4: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED 4000a5e8: 01 00 00 00 nop 4000ff10 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4000ff10: 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; 4000ff14: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 4000ff18: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4000ff1c: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 4000ff20: 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; 4000ff24: e4 06 20 1c ld [ %i0 + 0x1c ], %l2 loc = temp_mt_entry->mt_fs_root; 4000ff28: c8 27 bf f0 st %g4, [ %fp + -16 ] 4000ff2c: c6 27 bf f4 st %g3, [ %fp + -12 ] 4000ff30: c4 27 bf f8 st %g2, [ %fp + -8 ] 4000ff34: 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; 4000ff38: c0 26 20 1c clr [ %i0 + 0x1c ] 4000ff3c: a0 07 bf ec add %fp, -20, %l0 do { next = jnode->Parent; loc.node_access = (void *)jnode; 4000ff40: e4 27 bf ec st %l2, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4000ff44: e2 04 a0 08 ld [ %l2 + 8 ], %l1 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4000ff48: 7f ff fd 02 call 4000f350 4000ff4c: 90 10 00 10 mov %l0, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 4000ff50: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 4000ff54: 80 a0 60 01 cmp %g1, 1 4000ff58: 12 80 00 17 bne 4000ffb4 4000ff5c: 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; 4000ff60: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 4000ff64: 80 a0 40 02 cmp %g1, %g2 4000ff68: 22 80 00 14 be,a 4000ffb8 4000ff6c: 90 10 20 00 clr %o0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4000ff70: 80 a4 a0 00 cmp %l2, 0 4000ff74: 02 80 00 0e be 4000ffac 4000ff78: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 4000ff7c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 4000ff80: 80 a0 60 01 cmp %g1, 1 4000ff84: 32 bf ff f0 bne,a 4000ff44 4000ff88: e4 27 bf ec st %l2, [ %fp + -20 ] <== NOT EXECUTED 4000ff8c: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 4000ff90: 84 04 a0 54 add %l2, 0x54, %g2 4000ff94: 80 a0 40 02 cmp %g1, %g2 4000ff98: 22 bf ff eb be,a 4000ff44 4000ff9c: e4 27 bf ec st %l2, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4000ffa0: a4 90 60 00 orcc %g1, 0, %l2 4000ffa4: 32 bf ff e8 bne,a 4000ff44 4000ffa8: e4 27 bf ec st %l2, [ %fp + -20 ] return 0; } 4000ffac: 81 c7 e0 08 ret 4000ffb0: 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 ); 4000ffb4: 90 10 20 00 clr %o0 4000ffb8: 7f ff cc bc call 400032a8 4000ffbc: 92 10 00 10 mov %l0, %o1 if (result != 0) 4000ffc0: 80 a2 20 00 cmp %o0, 0 4000ffc4: 02 bf ff eb be 4000ff70 4000ffc8: 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); 4000ffcc: 81 c7 e0 08 ret <== NOT EXECUTED 4000ffd0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000a5ec : const char *path, int pathlen, char *token, int *token_len ) { 4000a5ec: 9d e3 bf a0 save %sp, -96, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4000a5f0: c2 0e 00 00 ldub [ %i0 ], %g1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4000a5f4: 87 28 60 18 sll %g1, 0x18, %g3 4000a5f8: 85 38 e0 18 sra %g3, 0x18, %g2 4000a5fc: 80 a0 a0 2f cmp %g2, 0x2f 4000a600: 02 80 00 34 be 4000a6d0 4000a604: 80 a0 a0 5c cmp %g2, 0x5c 4000a608: 02 80 00 32 be 4000a6d0 4000a60c: 80 a0 00 02 cmp %g0, %g2 4000a610: 84 40 20 00 addx %g0, 0, %g2 4000a614: 80 a6 60 00 cmp %i1, 0 4000a618: 04 80 00 30 ble 4000a6d8 4000a61c: 86 08 a0 ff and %g2, 0xff, %g3 4000a620: 86 88 a0 ff andcc %g2, 0xff, %g3 4000a624: 02 80 00 2e be 4000a6dc 4000a628: 80 a0 e0 00 cmp %g3, 0 token[i] = c; 4000a62c: c2 2e 80 00 stb %g1, [ %i2 ] 4000a630: 82 10 20 00 clr %g1 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4000a634: 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) ) { 4000a638: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 4000a63c: 80 a0 a0 5c cmp %g2, 0x5c 4000a640: 02 80 00 07 be 4000a65c 4000a644: c6 0e 00 01 ldub [ %i0 + %g1 ], %g3 4000a648: 80 a0 a0 2f cmp %g2, 0x2f 4000a64c: 02 80 00 04 be 4000a65c 4000a650: 80 a6 40 01 cmp %i1, %g1 4000a654: 14 80 00 18 bg 4000a6b4 4000a658: 80 a0 a0 00 cmp %g2, 0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4000a65c: 84 06 80 01 add %i2, %g1, %g2 4000a660: c4 48 bf ff ldsb [ %g2 + -1 ], %g2 4000a664: 80 a0 a0 00 cmp %g2, 0 4000a668: 32 80 00 02 bne,a 4000a670 4000a66c: c0 2e 80 01 clrb [ %i2 + %g1 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 4000a670: 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 ) 4000a674: 90 10 00 1a mov %i2, %o0 4000a678: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000a67c: b0 10 20 02 mov 2, %i0 4000a680: 40 00 17 56 call 400103d8 4000a684: 92 12 63 70 or %o1, 0x370, %o1 4000a688: 80 a2 20 00 cmp %o0, 0 4000a68c: 02 80 00 19 be 4000a6f0 4000a690: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4000a694: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000a698: 40 00 17 50 call 400103d8 4000a69c: 92 12 63 68 or %o1, 0x368, %o1 ! 4001c368 <__FUNCTION__.5482+0x18> 4000a6a0: 80 a0 00 08 cmp %g0, %o0 4000a6a4: b0 60 20 00 subx %g0, 0, %i0 4000a6a8: b0 0e 20 02 and %i0, 2, %i0 type = IMFS_CURRENT_DIR; } return type; } 4000a6ac: 81 c7 e0 08 ret 4000a6b0: 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) ) { 4000a6b4: 22 bf ff eb be,a 4000a660 4000a6b8: 84 06 80 01 add %i2, %g1, %g2 <== NOT EXECUTED token[i] = c; if ( i == IMFS_NAME_MAX ) 4000a6bc: 80 a0 60 20 cmp %g1, 0x20 4000a6c0: 12 bf ff dd bne 4000a634 4000a6c4: c6 2e 80 01 stb %g3, [ %i2 + %g1 ] 4000a6c8: 81 c7 e0 08 ret 4000a6cc: 91 e8 20 04 restore %g0, 4, %o0 4000a6d0: 80 a0 00 03 cmp %g0, %g3 4000a6d4: 86 40 20 00 addx %g0, 0, %g3 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4000a6d8: 80 a0 e0 00 cmp %g3, 0 4000a6dc: 12 80 00 07 bne 4000a6f8 4000a6e0: 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'; 4000a6e4: b0 10 20 00 clr %i0 4000a6e8: 82 10 20 00 clr %g1 /* * Set token_len to the number of characters copied. */ *token_len = i; 4000a6ec: c2 26 c0 00 st %g1, [ %i3 ] 4000a6f0: 81 c7 e0 08 ret 4000a6f4: 81 e8 00 00 restore */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4000a6f8: 80 a6 60 00 cmp %i1, 0 4000a6fc: b0 10 20 01 mov 1, %i0 4000a700: 12 bf ff fb bne 4000a6ec 4000a704: 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'; 4000a708: 10 bf ff f8 b 4000a6e8 4000a70c: b0 10 20 00 clr %i0 4000a710 : 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 ) { 4000a710: 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, 4000a714: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000a718: c2 00 63 48 ld [ %g1 + 0x348 ], %g1 ! 4001cf48 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4000a71c: 80 a0 60 10 cmp %g1, 0x10 4000a720: 02 80 00 0a be 4000a748 4000a724: 86 10 20 00 clr %g3 4000a728: 84 10 20 20 mov 0x20, %g2 4000a72c: 80 a0 40 02 cmp %g1, %g2 4000a730: 02 80 00 06 be 4000a748 4000a734: 86 00 e0 01 inc %g3 4000a738: 80 a0 e0 05 cmp %g3, 5 4000a73c: 12 bf ff fc bne 4000a72c 4000a740: 85 28 a0 01 sll %g2, 1, %g2 4000a744: 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) 4000a748: 05 10 00 75 sethi %hi(0x4001d400), %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(); 4000a74c: 40 00 0c bc call 4000da3c 4000a750: c2 20 a3 08 st %g1, [ %g2 + 0x308 ] ! 4001d708 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; 4000a754: 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(); 4000a758: 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; 4000a75c: 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; 4000a760: 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; 4000a764: 13 10 00 71 sethi %hi(0x4001c400), %o1 4000a768: 90 06 20 38 add %i0, 0x38, %o0 4000a76c: 40 00 15 f0 call 4000ff2c 4000a770: 92 12 62 c0 or %o1, 0x2c0, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000a774: 90 10 20 01 mov 1, %o0 4000a778: 40 00 00 c5 call 4000aa8c 4000a77c: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ) { 4000a780: 80 a2 20 00 cmp %o0, 0 4000a784: 02 80 00 0c be 4000a7b4 4000a788: 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; 4000a78c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000a790: 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; 4000a794: 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; 4000a798: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000a79c: 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; 4000a7a0: 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(); 4000a7a4: 40 00 09 ef call 4000cf60 4000a7a8: b0 10 20 00 clr %i0 return 0; } 4000a7ac: 81 c7 e0 08 ret 4000a7b0: 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); 4000a7b4: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 <== NOT EXECUTED 4000a7b8: 40 00 00 fa call 4000aba0 <== NOT EXECUTED 4000a7bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000a7c0: 40 00 13 a0 call 4000f640 <__errno> <== NOT EXECUTED 4000a7c4: 01 00 00 00 nop <== NOT EXECUTED 4000a7c8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000a7cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a7d0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a7d4: 81 e8 00 00 restore <== NOT EXECUTED 40002ef4 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40002ef4: 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; 40002ef8: c2 06 00 00 ld [ %i0 ], %g1 40002efc: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40002f00: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 40002f04: 80 a0 60 07 cmp %g1, 7 40002f08: 18 80 00 1f bgu 40002f84 40002f0c: 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 ); 40002f10: 40 00 4c 48 call 40016030 40002f14: 90 10 00 1a mov %i2, %o0 40002f18: a0 07 bf b0 add %fp, -80, %l0 40002f1c: 92 10 00 08 mov %o0, %o1 40002f20: 96 07 bf fc add %fp, -4, %o3 40002f24: 94 10 00 10 mov %l0, %o2 40002f28: 40 00 34 5c call 40010098 40002f2c: 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( 40002f30: 90 10 00 19 mov %i1, %o0 40002f34: 94 10 00 10 mov %l0, %o2 40002f38: 92 10 20 03 mov 3, %o1 40002f3c: 17 00 00 28 sethi %hi(0xa000), %o3 40002f40: 98 07 bf d8 add %fp, -40, %o4 40002f44: 40 00 30 b4 call 4000f214 40002f48: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40002f4c: 80 a2 20 00 cmp %o0, 0 40002f50: 02 80 00 13 be 40002f9c 40002f54: 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 ); 40002f58: 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++; 40002f5c: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 40002f60: 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++; 40002f64: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 40002f68: 40 00 02 de call 40003ae0 40002f6c: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] 40002f70: c4 07 bf f4 ld [ %fp + -12 ], %g2 40002f74: c2 07 bf d8 ld [ %fp + -40 ], %g1 40002f78: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40002f7c: 81 c7 e0 08 ret 40002f80: 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 ); 40002f84: 40 00 48 8d call 400151b8 <__errno> 40002f88: b0 10 3f ff mov -1, %i0 40002f8c: 82 10 20 1f mov 0x1f, %g1 40002f90: c2 22 00 00 st %g1, [ %o0 ] 40002f94: 81 c7 e0 08 ret 40002f98: 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 ); 40002f9c: 40 00 48 87 call 400151b8 <__errno> <== NOT EXECUTED 40002fa0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002fa4: 82 10 20 0c mov 0xc, %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 40012fcc : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40012fcc: 9d e3 bf a0 save %sp, -96, %sp block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 40012fd0: 80 a6 20 00 cmp %i0, 0 40012fd4: 02 80 00 18 be 40013034 40012fd8: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012fdc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012fe0: 80 a0 60 05 cmp %g1, 5 40012fe4: 12 80 00 1b bne 40013050 40012fe8: 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 ); 40012fec: 92 10 00 19 mov %i1, %o1 40012ff0: 7f ff fe 64 call 40012980 40012ff4: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 40012ff8: 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 ); 40012ffc: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 40013000: 80 a0 60 00 cmp %g1, 0 40013004: 02 80 00 04 be 40013014 40013008: b0 10 20 00 clr %i0 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 4001300c: 81 c7 e0 08 ret 40013010: 81 e8 00 00 restore #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 40013014: 7f ff fe 4e call 4001294c 40013018: b0 10 20 01 mov 1, %i0 if ( !memory ) 4001301c: 80 a2 20 00 cmp %o0, 0 40013020: 02 bf ff fb be 4001300c 40013024: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 40013028: d0 24 00 00 st %o0, [ %l0 ] return 0; } 4001302c: 81 c7 e0 08 ret 40013030: 91 e8 20 00 restore %g0, 0, %o0 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 40013034: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013038: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 4001303c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013040: 94 12 a1 08 or %o2, 0x108, %o2 <== NOT EXECUTED 40013044: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED 40013048: 7f ff c1 42 call 40003550 <__assert_func> <== NOT EXECUTED 4001304c: 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 ); 40013050: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013054: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013058: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 4001305c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013060: 94 12 a1 08 or %o2, 0x108, %o2 <== NOT EXECUTED 40013064: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED 40013068: 7f ff c1 3a call 40003550 <__assert_func> <== NOT EXECUTED 4001306c: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 40013070: 01 00 00 00 nop 40013074 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40013074: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013078: 80 a6 20 00 cmp %i0, 0 4001307c: 02 80 00 5e be 400131f4 40013080: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40013084: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013088: 80 a0 60 05 cmp %g1, 5 4001308c: 12 80 00 53 bne 400131d8 40013090: 03 10 00 8e sethi %hi(0x40023800), %g1 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 40013094: e2 00 60 00 ld [ %g1 ], %l1 40013098: a1 34 60 02 srl %l1, 2, %l0 4001309c: 92 10 00 10 mov %l0, %o1 400130a0: 40 00 2d 41 call 4001e5a4 <.umul> 400130a4: 90 04 20 01 add %l0, 1, %o0 400130a8: 92 10 00 10 mov %l0, %o1 400130ac: 40 00 2d 3e call 4001e5a4 <.umul> 400130b0: 90 02 20 01 inc %o0 400130b4: 92 10 00 11 mov %l1, %o1 400130b8: 40 00 2d 3b call 4001e5a4 <.umul> 400130bc: 90 02 3f ff add %o0, -1, %o0 400130c0: 82 10 20 00 clr %g1 400130c4: 80 a0 40 19 cmp %g1, %i1 400130c8: 34 80 00 0e bg,a 40013100 400130cc: e4 06 20 50 ld [ %i0 + 0x50 ], %l2 <== NOT EXECUTED 400130d0: 80 a0 40 19 cmp %g1, %i1 400130d4: 02 80 00 08 be 400130f4 400130d8: 80 a2 00 1a cmp %o0, %i2 rtems_set_errno_and_return_minus_one( EINVAL ); 400130dc: 40 00 08 37 call 400151b8 <__errno> <== NOT EXECUTED 400130e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400130e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400130e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400130ec: 81 c7 e0 08 ret <== NOT EXECUTED 400130f0: 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 ) 400130f4: 08 bf ff fa bleu 400130dc 400130f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 400130fc: e4 06 20 50 ld [ %i0 + 0x50 ], %l2 40013100: 80 a6 40 12 cmp %i1, %l2 40013104: 04 80 00 2a ble 400131ac 40013108: 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; 4001310c: a7 3c 60 1f sra %l1, 0x1f, %l3 <== NOT EXECUTED 40013110: 96 10 00 11 mov %l1, %o3 40013114: 94 10 00 13 mov %l3, %o2 40013118: 90 10 00 19 mov %i1, %o0 4001311c: 40 00 2e e7 call 4001ecb8 <__divdi3> 40013120: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013124: 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; 40013128: a0 10 00 09 mov %o1, %l0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001312c: 94 10 00 13 mov %l3, %o2 40013130: 92 10 00 14 mov %l4, %o1 40013134: 40 00 2e e1 call 4001ecb8 <__divdi3> 40013138: 96 10 00 11 mov %l1, %o3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4001313c: 80 a4 00 09 cmp %l0, %o1 40013140: 0a 80 00 1f bcs 400131bc 40013144: a4 10 00 09 mov %o1, %l2 40013148: 10 80 00 05 b 4001315c 4001314c: a2 10 00 09 mov %o1, %l1 40013150: 80 a4 00 11 cmp %l0, %l1 40013154: 2a 80 00 1b bcs,a 400131c0 40013158: f4 26 20 54 st %i2, [ %i0 + 0x54 ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4001315c: 90 10 00 18 mov %i0, %o0 40013160: 7f ff ff 9b call 40012fcc 40013164: 92 10 00 11 mov %l1, %o1 40013168: 80 a2 20 00 cmp %o0, 0 4001316c: 22 bf ff f9 be,a 40013150 40013170: a2 04 60 01 inc %l1 for ( ; block>=old_blocks ; block-- ) { 40013174: 10 80 00 06 b 4001318c <== NOT EXECUTED 40013178: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4001317c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40013180: 7f ff fe d0 call 40012cc0 <== NOT EXECUTED 40013184: 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-- ) { 40013188: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 4001318c: 08 bf ff fc bleu 4001317c <== NOT EXECUTED 40013190: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 40013194: 40 00 08 09 call 400151b8 <__errno> <== NOT EXECUTED 40013198: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001319c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 400131a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400131a4: 81 c7 e0 08 ret <== NOT EXECUTED 400131a8: 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 ) 400131ac: 02 80 00 08 be 400131cc 400131b0: 80 a6 80 14 cmp %i2, %l4 400131b4: 81 c7 e0 08 ret 400131b8: 91 e8 20 00 restore %g0, 0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 400131bc: f4 26 20 54 st %i2, [ %i0 + 0x54 ] <== NOT EXECUTED 400131c0: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 400131c4: 81 c7 e0 08 ret 400131c8: 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 ) 400131cc: 18 bf ff d1 bgu 40013110 400131d0: a7 3c 60 1f sra %l1, 0x1f, %l3 400131d4: 30 bf ff f8 b,a 400131b4 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400131d8: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400131dc: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 400131e0: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 400131e4: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 400131e8: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED 400131ec: 7f ff c0 d9 call 40003550 <__assert_func> <== NOT EXECUTED 400131f0: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 400131f4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400131f8: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 400131fc: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013200: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 40013204: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED 40013208: 7f ff c0 d2 call 40003550 <__assert_func> <== NOT EXECUTED 4001320c: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED 40013210: 01 00 00 00 nop 40012980 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40012980: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012984: 80 a6 20 00 cmp %i0, 0 40012988: 02 80 00 91 be 40012bcc 4001298c: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012990: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012994: 80 a0 60 05 cmp %g1, 5 40012998: 12 80 00 94 bne 40012be8 4001299c: 03 10 00 8e sethi %hi(0x40023800), %g1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 400129a0: e0 00 60 00 ld [ %g1 ], %l0 400129a4: a1 34 20 02 srl %l0, 2, %l0 400129a8: 82 04 3f ff add %l0, -1, %g1 400129ac: 80 a6 40 01 cmp %i1, %g1 400129b0: 08 80 00 20 bleu 40012a30 400129b4: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 400129b8: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED 400129bc: 40 00 2e fa call 4001e5a4 <.umul> <== NOT EXECUTED 400129c0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400129c4: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 400129c8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 400129cc: 18 80 00 21 bgu 40012a50 <== NOT EXECUTED 400129d0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 400129d4: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 400129d8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400129dc: 40 00 2f d8 call 4001e93c <.urem> <== NOT EXECUTED 400129e0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 400129e4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 400129e8: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 400129ec: 40 00 2f 28 call 4001e68c <.udiv> <== NOT EXECUTED 400129f0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 400129f4: 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; 400129f8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 400129fc: 02 80 00 42 be 40012b04 <== NOT EXECUTED 40012a00: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 40012a04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012a08: 02 80 00 5e be 40012b80 <== NOT EXECUTED 40012a0c: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 40012a10: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40012a14: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 40012a18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012a1c: 02 80 00 52 be 40012b64 <== NOT EXECUTED 40012a20: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 40012a24: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012a28: 81 c7 e0 08 ret <== NOT EXECUTED 40012a2c: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40012a30: 02 80 00 40 be 40012b30 40012a34: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 if ( !p ) { 40012a38: 80 a2 20 00 cmp %o0, 0 40012a3c: 02 80 00 43 be 40012b48 40012a40: 01 00 00 00 nop p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 40012a44: b3 2e 60 02 sll %i1, 2, %i1 40012a48: 81 c7 e0 08 ret 40012a4c: 91 ea 00 19 restore %o0, %i1, %o0 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 40012a50: 90 02 20 01 inc %o0 <== NOT EXECUTED 40012a54: 40 00 2e d4 call 4001e5a4 <.umul> <== NOT EXECUTED 40012a58: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012a5c: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40012a60: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40012a64: 18 80 00 31 bgu 40012b28 <== NOT EXECUTED 40012a68: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 40012a6c: a2 26 40 11 sub %i1, %l1, %l1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40012a70: 40 00 2f b3 call 4001e93c <.urem> <== NOT EXECUTED 40012a74: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012a78: 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; 40012a7c: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012a80: 40 00 2f 03 call 4001e68c <.udiv> <== NOT EXECUTED 40012a84: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40012a88: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012a8c: 40 00 2f 00 call 4001e68c <.udiv> <== NOT EXECUTED 40012a90: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40012a94: 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; 40012a98: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40012a9c: 40 00 2f a8 call 4001e93c <.urem> <== NOT EXECUTED 40012aa0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40012aa4: 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; 40012aa8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40012aac: 02 80 00 3c be 40012b9c <== NOT EXECUTED 40012ab0: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 40012ab4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012ab8: 02 80 00 53 be 40012c04 <== NOT EXECUTED 40012abc: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 40012ac0: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012ac4: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 40012ac8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40012acc: 02 80 00 55 be 40012c20 <== NOT EXECUTED 40012ad0: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 40012ad4: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40012ad8: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 40012adc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012ae0: 12 bf ff d9 bne 40012a44 <== NOT EXECUTED 40012ae4: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40012ae8: 7f ff ff 99 call 4001294c <== NOT EXECUTED 40012aec: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40012af0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012af4: 22 80 00 13 be,a 40012b40 <== NOT EXECUTED 40012af8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40012afc: 10 bf ff d2 b 40012a44 <== NOT EXECUTED 40012b00: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 40012b04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012b08: 02 80 00 0e be 40012b40 <== NOT EXECUTED 40012b0c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40012b10: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 40012b14: 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 ]; 40012b18: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40012b1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012b20: 12 80 00 08 bne 40012b40 <== NOT EXECUTED 40012b24: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40012b28: 81 c7 e0 08 ret <== NOT EXECUTED 40012b2c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 40012b30: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40012b34: 80 a2 20 00 cmp %o0, 0 40012b38: 02 bf ff fc be 40012b28 40012b3c: b0 02 00 19 add %o0, %i1, %i0 /* * This means the requested block number is out of range. */ return 0; } 40012b40: 81 c7 e0 08 ret 40012b44: 81 e8 00 00 restore p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40012b48: 7f ff ff 81 call 4001294c 40012b4c: 01 00 00 00 nop if ( !p ) 40012b50: 80 a2 20 00 cmp %o0, 0 40012b54: 22 bf ff fb be,a 40012b40 40012b58: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 40012b5c: 10 bf ff ba b 40012a44 40012b60: d0 26 20 58 st %o0, [ %i0 + 0x58 ] info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 40012b64: 7f ff ff 7a call 4001294c <== NOT EXECUTED 40012b68: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40012b6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012b70: 22 bf ff f4 be,a 40012b40 <== NOT EXECUTED 40012b74: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40012b78: 10 bf ff ab b 40012a24 <== NOT EXECUTED 40012b7c: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40012b80: 7f ff ff 73 call 4001294c <== NOT EXECUTED 40012b84: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40012b88: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40012b8c: 22 bf ff ed be,a 40012b40 <== NOT EXECUTED 40012b90: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40012b94: 10 bf ff 9f b 40012a10 <== NOT EXECUTED 40012b98: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 40012b9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012ba0: 02 bf ff e8 be 40012b40 <== NOT EXECUTED 40012ba4: 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 ]; 40012ba8: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012bac: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 40012bb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012bb4: 02 bf ff e3 be 40012b40 <== NOT EXECUTED 40012bb8: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40012bbc: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 40012bc0: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 40012bc4: 81 c7 e0 08 ret <== NOT EXECUTED 40012bc8: 91 ee 00 19 restore %i0, %i1, %o0 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40012bcc: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012bd0: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40012bd4: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40012bd8: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED 40012bdc: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED 40012be0: 7f ff c2 5c call 40003550 <__assert_func> <== NOT EXECUTED 40012be4: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012be8: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012bec: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40012bf0: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40012bf4: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED 40012bf8: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED 40012bfc: 7f ff c2 55 call 40003550 <__assert_func> <== NOT EXECUTED 40012c00: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40012c04: 7f ff ff 52 call 4001294c <== NOT EXECUTED 40012c08: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40012c0c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40012c10: 22 bf ff cc be,a 40012b40 <== NOT EXECUTED 40012c14: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 40012c18: 10 bf ff aa b 40012ac0 <== NOT EXECUTED 40012c1c: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 40012c20: 7f ff ff 4b call 4001294c <== NOT EXECUTED 40012c24: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40012c28: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40012c2c: 22 bf ff c5 be,a 40012b40 <== NOT EXECUTED 40012c30: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40012c34: 10 bf ff a8 b 40012ad4 <== NOT EXECUTED 40012c38: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED 400136bc : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 400136bc: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400136c0: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 400136c4: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 400136c8: 02 80 00 ae be 40013980 400136cc: 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 || 400136d0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400136d4: 84 00 7f fb add %g1, -5, %g2 400136d8: 80 a0 a0 01 cmp %g2, 1 400136dc: 18 80 00 a1 bgu 40013960 400136e0: 80 a6 e0 00 cmp %i3, 0 /* * Error checks on arguments */ assert( dest ); 400136e4: 02 80 00 b7 be 400139c0 400136e8: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 400136ec: 02 80 00 87 be 40013908 400136f0: 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) { 400136f4: 02 80 00 5e be 4001386c 400136f8: 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 ) 400136fc: 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; 40013700: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 40013704: 80 a0 c0 02 cmp %g3, %g2 40013708: c8 04 20 54 ld [ %l0 + 0x54 ], %g4 4001370c: 14 80 00 56 bg 40013864 40013710: 9a 07 00 1a add %i4, %i2, %o5 40013714: 80 a0 c0 02 cmp %g3, %g2 40013718: 02 80 00 51 be 4001385c 4001371c: 80 a3 40 04 cmp %o5, %g4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40013720: 29 10 00 8e sethi %hi(0x40023800), %l4 40013724: e2 05 20 00 ld [ %l4 ], %l1 40013728: 90 10 00 12 mov %l2, %o0 4001372c: ab 3c 60 1f sra %l1, 0x1f, %l5 40013730: 96 10 00 11 mov %l1, %o3 40013734: 94 10 00 15 mov %l5, %o2 40013738: 40 00 2e 47 call 4001f054 <__moddi3> 4001373c: 92 10 00 13 mov %l3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013740: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40013744: ac 10 00 09 mov %o1, %l6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013748: 94 10 00 15 mov %l5, %o2 4001374c: 92 10 00 13 mov %l3, %o1 40013750: 40 00 2d 5a call 4001ecb8 <__divdi3> 40013754: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40013758: 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; 4001375c: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 40013760: aa 10 00 1b mov %i3, %l5 40013764: 02 80 00 14 be 400137b4 40013768: 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 ); 4001376c: 90 10 00 10 mov %l0, %o0 40013770: 7f ff fc 84 call 40012980 40013774: 94 10 20 00 clr %o2 assert( block_ptr ); 40013778: 80 a2 20 00 cmp %o0, 0 4001377c: 02 80 00 89 be 400139a0 40013780: 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; 40013784: 80 a7 00 11 cmp %i4, %l1 40013788: 18 80 00 4c bgu 400138b8 4001378c: 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 ); 40013790: d2 02 00 00 ld [ %o0 ], %o1 40013794: 94 10 00 18 mov %i0, %o2 40013798: 90 10 00 1b mov %i3, %o0 4001379c: 40 00 08 c2 call 40015aa4 400137a0: 92 02 40 16 add %o1, %l6, %o1 dest += to_copy; block++; my_length -= to_copy; 400137a4: e2 05 20 00 ld [ %l4 ], %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; 400137a8: aa 06 c0 18 add %i3, %i0, %l5 block++; 400137ac: a4 04 a0 01 inc %l2 my_length -= to_copy; 400137b0: 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 ) { 400137b4: 80 a7 00 11 cmp %i4, %l1 400137b8: 0a 80 00 15 bcs 4001380c 400137bc: 80 a7 20 00 cmp %i4, 0 400137c0: a8 15 20 00 mov %l4, %l4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400137c4: 90 10 00 10 mov %l0, %o0 400137c8: 92 10 00 12 mov %l2, %o1 400137cc: 7f ff fc 6d call 40012980 400137d0: 94 10 20 00 clr %o2 assert( block_ptr ); 400137d4: 80 a2 20 00 cmp %o0, 0 400137d8: 02 80 00 52 be 40013920 400137dc: 94 10 00 11 mov %l1, %o2 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 400137e0: d2 02 00 00 ld [ %o0 ], %o1 400137e4: 40 00 08 b0 call 40015aa4 400137e8: 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 ) { 400137ec: 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; 400137f0: 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; 400137f4: 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 ) { 400137f8: 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++; 400137fc: 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 ) { 40013800: 08 bf ff f1 bleu 400137c4 40013804: 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 ) { 40013808: 80 a7 20 00 cmp %i4, 0 4001380c: 02 80 00 0e be 40013844 40013810: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013814: 92 10 00 12 mov %l2, %o1 40013818: 90 10 00 10 mov %l0, %o0 4001381c: 7f ff fc 59 call 40012980 40013820: 94 10 20 00 clr %o2 assert( block_ptr ); 40013824: 80 a2 20 00 cmp %o0, 0 40013828: 02 80 00 46 be 40013940 4001382c: b0 06 00 1c add %i0, %i4, %i0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 40013830: d2 02 00 00 ld [ %o0 ], %o1 40013834: 90 10 00 15 mov %l5, %o0 40013838: 40 00 08 9b call 40015aa4 4001383c: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 40013840: 90 07 bf f8 add %fp, -8, %o0 40013844: 7f ff c0 a7 call 40003ae0 40013848: 92 10 20 00 clr %o1 4001384c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013850: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return copied; } 40013854: 81 c7 e0 08 ret 40013858: 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 ) 4001385c: 08 bf ff b2 bleu 40013724 40013860: 29 10 00 8e sethi %hi(0x40023800), %l4 my_length = the_jnode->info.file.size - start; 40013864: 10 bf ff af b 40013720 40013868: 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)) 4001386c: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 40013870: 82 10 20 00 clr %g1 <== NOT EXECUTED 40013874: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 40013878: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 4001387c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40013880: 04 80 00 10 ble 400138c0 <== NOT EXECUTED 40013884: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 40013888: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 4001388c: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40013890: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40013894: 40 00 08 84 call 40015aa4 <== NOT EXECUTED 40013898: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4001389c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 400138a0: 7f ff c0 90 call 40003ae0 <== NOT EXECUTED 400138a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400138a8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400138ac: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 400138b0: 81 c7 e0 08 ret <== NOT EXECUTED 400138b4: 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; 400138b8: 10 bf ff b6 b 40013790 400138bc: 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)) 400138c0: 02 80 00 0d be 400138f4 <== NOT EXECUTED 400138c4: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 400138c8: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 400138cc: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 400138d0: 40 00 08 75 call 40015aa4 <== NOT EXECUTED 400138d4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 400138d8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 400138dc: 7f ff c0 81 call 40003ae0 <== NOT EXECUTED 400138e0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400138e4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400138e8: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 400138ec: 81 c7 e0 08 ret <== NOT EXECUTED 400138f0: 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)) 400138f4: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 400138f8: 38 bf ff e5 bgu,a 4001388c <== NOT EXECUTED 400138fc: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED 40013900: 10 bf ff f2 b 400138c8 <== NOT EXECUTED 40013904: 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 ); 40013908: 40 00 06 2c call 400151b8 <__errno> <== NOT EXECUTED 4001390c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013910: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40013914: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013918: 81 c7 e0 08 ret <== NOT EXECUTED 4001391c: 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 ); 40013920: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013924: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013928: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 4001392c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013930: 94 12 a0 98 or %o2, 0x98, %o2 <== NOT EXECUTED 40013934: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 40013938: 7f ff bf 06 call 40003550 <__assert_func> <== NOT EXECUTED 4001393c: 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 ); 40013940: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013944: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013948: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 4001394c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013950: 94 12 a0 98 or %o2, 0x98, %o2 <== NOT EXECUTED 40013954: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 40013958: 7f ff be fe call 40003550 <__assert_func> <== NOT EXECUTED 4001395c: 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 || 40013960: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013964: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013968: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 4001396c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013970: 94 12 a0 98 or %o2, 0x98, %o2 <== NOT EXECUTED 40013974: 96 12 e0 08 or %o3, 8, %o3 <== NOT EXECUTED 40013978: 7f ff be f6 call 40003550 <__assert_func> <== NOT EXECUTED 4001397c: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40013980: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013984: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013988: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 4001398c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013990: 94 12 a0 98 or %o2, 0x98, %o2 <== NOT EXECUTED 40013994: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED 40013998: 7f ff be ee call 40003550 <__assert_func> <== NOT EXECUTED 4001399c: 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 ); 400139a0: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400139a4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400139a8: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 400139ac: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 400139b0: 94 12 a0 98 or %o2, 0x98, %o2 <== NOT EXECUTED 400139b4: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 400139b8: 7f ff be e6 call 40003550 <__assert_func> <== NOT EXECUTED 400139bc: 92 10 22 96 mov 0x296, %o1 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 400139c0: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400139c4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400139c8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400139cc: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 400139d0: 94 12 a0 98 or %o2, 0x98, %o2 <== NOT EXECUTED 400139d4: 96 12 e0 58 or %o3, 0x58, %o3 <== NOT EXECUTED 400139d8: 7f ff be de call 40003550 <__assert_func> <== NOT EXECUTED 400139dc: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED 400139e0: 01 00 00 00 nop 40012d1c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 40012d1c: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012d20: 80 a6 20 00 cmp %i0, 0 40012d24: 02 80 00 62 be 40012eac 40012d28: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012d2c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012d30: 80 a0 60 05 cmp %g1, 5 40012d34: 12 80 00 65 bne 40012ec8 40012d38: 23 10 00 8e sethi %hi(0x40023800), %l1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40012d3c: 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; 40012d40: e6 04 60 00 ld [ %l1 ], %l3 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40012d44: 80 a0 60 00 cmp %g1, 0 40012d48: 02 80 00 05 be 40012d5c 40012d4c: a7 34 e0 02 srl %l3, 2, %l3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 40012d50: 90 06 20 58 add %i0, 0x58, %o0 40012d54: 7f ff ff ba call 40012c3c 40012d58: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 40012d5c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 40012d60: 80 a0 60 00 cmp %g1, 0 40012d64: 02 80 00 1b be 40012dd0 40012d68: c4 04 60 00 ld [ %l1 ], %g2 for ( i=0 ; i <== NOT EXECUTED 40012d78: 90 10 20 00 clr %o0 <== NOT EXECUTED 40012d7c: 25 10 00 8e sethi %hi(0x40023800), %l2 <== NOT EXECUTED 40012d80: a4 14 a0 00 mov %l2, %l2 ! 40023800 <== NOT EXECUTED 40012d84: 10 80 00 03 b 40012d90 <== NOT EXECUTED 40012d88: a0 10 20 00 clr %l0 <== NOT EXECUTED 40012d8c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 40012d90: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40012d94: c4 00 40 08 ld [ %g1 + %o0 ], %g2 <== NOT EXECUTED 40012d98: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40012d9c: 02 80 00 04 be 40012dac <== NOT EXECUTED 40012da0: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40012da4: 7f ff ff a6 call 40012c3c <== NOT EXECUTED 40012da8: 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 40012dc0: 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 ); 40012dc4: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 40012dc8: 7f ff ff 9d call 40012c3c <== NOT EXECUTED 40012dcc: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 40012dd0: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 40012dd4: 80 a2 20 00 cmp %o0, 0 40012dd8: 02 80 00 33 be 40012ea4 40012ddc: c2 04 60 00 ld [ %l1 ], %g1 for ( i=0 ; i <== NOT EXECUTED 40012dec: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 40012df0: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40012df4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40012df8: 22 80 00 29 be,a 40012e9c <== NOT EXECUTED 40012dfc: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 40012e00: 25 10 00 8e sethi %hi(0x40023800), %l2 <== NOT EXECUTED 40012e04: aa 10 20 00 clr %l5 <== NOT EXECUTED 40012e08: a4 14 a0 00 mov %l2, %l2 <== NOT EXECUTED 40012e0c: a8 10 20 00 clr %l4 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 40012e18: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 40012e1c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40012e20: a0 10 20 00 clr %l0 <== NOT EXECUTED if ( p[j] ) { 40012e24: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40012e28: c2 04 40 08 ld [ %l1 + %o0 ], %g1 <== NOT EXECUTED 40012e2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012e30: 02 80 00 04 be 40012e40 <== NOT EXECUTED 40012e34: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 40012e38: 7f ff ff 81 call 40012c3c <== NOT EXECUTED 40012e3c: 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 40012e54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40012e58: 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( 40012e5c: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 40012e60: 7f ff ff 77 call 40012c3c <== NOT EXECUTED 40012e64: 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 40012e7c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 40012e80: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40012e84: ab 2d 20 02 sll %l4, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 40012e88: e2 02 00 15 ld [ %o0 + %l5 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40012e8c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40012e90: 12 bf ff e1 bne 40012e14 <== NOT EXECUTED 40012e94: 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( 40012e98: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 40012e9c: 7f ff ff 68 call 40012c3c <== NOT EXECUTED 40012ea0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 40012ea4: 81 c7 e0 08 ret 40012ea8: 91 e8 20 00 restore %g0, 0, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 40012eac: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012eb0: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40012eb4: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40012eb8: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED 40012ebc: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED 40012ec0: 7f ff c1 a4 call 40003550 <__assert_func> <== NOT EXECUTED 40012ec4: 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 ); 40012ec8: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012ecc: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40012ed0: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40012ed4: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED 40012ed8: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED 40012edc: 7f ff c1 9d call 40003550 <__assert_func> <== NOT EXECUTED 40012ee0: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 40012ee4: 01 00 00 00 nop 40012cc0 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40012cc0: 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 ); 40012cc4: 94 10 20 00 clr %o2 <== NOT EXECUTED 40012cc8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40012ccc: 7f ff ff 2d call 40012980 <== NOT EXECUTED 40012cd0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 40012cd4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012cd8: 02 80 00 08 be 40012cf8 <== NOT EXECUTED 40012cdc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 40012ce0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_ptr = 0; 40012ce4: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 40012ce8: 7f ff ff 10 call 40012928 <== NOT EXECUTED 40012cec: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED } return 1; } 40012cf0: 81 c7 e0 08 ret <== NOT EXECUTED 40012cf4: 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 ); 40012cf8: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40012cfc: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012d00: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40012d04: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40012d08: 94 12 a0 e8 or %o2, 0xe8, %o2 <== NOT EXECUTED 40012d0c: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 40012d10: 7f ff c2 10 call 40003550 <__assert_func> <== NOT EXECUTED 40012d14: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED 40012d18: 01 00 00 00 nop 40013340 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 40013340: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013344: a0 96 20 00 orcc %i0, 0, %l0 40013348: 02 80 00 85 be 4001355c 4001334c: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40013350: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013354: 80 a0 60 05 cmp %g1, 5 40013358: 12 80 00 8f bne 40013594 4001335c: 80 a6 e0 00 cmp %i3, 0 /* * Error check arguments */ assert( source ); 40013360: 02 80 00 86 be 40013578 40013364: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 40013368: 02 80 00 67 be 40013504 4001336c: 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 ) { 40013370: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40013374: 80 a0 60 00 cmp %g1, 0 40013378: 06 80 00 57 bl 400134d4 4001337c: 94 07 00 1a add %i4, %i2, %o2 40013380: 80 a0 60 00 cmp %g1, 0 40013384: 22 80 00 51 be,a 400134c8 40013388: 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; 4001338c: 25 10 00 8e sethi %hi(0x40023800), %l2 <== NOT EXECUTED 40013390: e2 04 a0 00 ld [ %l2 ], %l1 40013394: 90 10 00 19 mov %i1, %o0 40013398: a7 3c 60 1f sra %l1, 0x1f, %l3 4001339c: 96 10 00 11 mov %l1, %o3 400133a0: 94 10 00 13 mov %l3, %o2 400133a4: 40 00 2f 2c call 4001f054 <__moddi3> 400133a8: 92 10 00 1a mov %i2, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 400133ac: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 400133b0: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 400133b4: 90 10 00 19 mov %i1, %o0 400133b8: 92 10 00 1a mov %i2, %o1 400133bc: 40 00 2e 3f call 4001ecb8 <__divdi3> 400133c0: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 400133c4: b0 10 20 00 clr %i0 400133c8: 80 a5 20 00 cmp %l4, 0 400133cc: 02 80 00 14 be 4001341c 400133d0: 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 ); 400133d4: 90 10 00 10 mov %l0, %o0 400133d8: 7f ff fd 6a call 40012980 400133dc: 94 10 20 00 clr %o2 assert( block_ptr ); 400133e0: 80 a2 20 00 cmp %o0, 0 400133e4: 02 80 00 73 be 400135b0 400133e8: 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; 400133ec: 80 a6 00 1c cmp %i0, %i4 400133f0: 38 80 00 02 bgu,a 400133f8 400133f4: 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 ); 400133f8: d0 02 00 00 ld [ %o0 ], %o0 400133fc: 92 10 00 1b mov %i3, %o1 40013400: 90 02 00 14 add %o0, %l4, %o0 40013404: 40 00 09 a8 call 40015aa4 40013408: 94 10 00 18 mov %i0, %o2 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4001340c: e2 04 a0 00 ld [ %l2 ], %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; 40013410: b6 06 c0 18 add %i3, %i0, %i3 block++; 40013414: a6 04 e0 01 inc %l3 my_length -= to_copy; 40013418: 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 ) { 4001341c: 80 a7 00 11 cmp %i4, %l1 40013420: 0a 80 00 15 bcs 40013474 40013424: 80 a7 20 00 cmp %i4, 0 40013428: a4 14 a0 00 mov %l2, %l2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001342c: 90 10 00 10 mov %l0, %o0 40013430: 92 10 00 13 mov %l3, %o1 40013434: 7f ff fd 53 call 40012980 40013438: 94 10 20 00 clr %o2 assert( block_ptr ); 4001343c: 80 a2 20 00 cmp %o0, 0 40013440: 02 80 00 37 be 4001351c 40013444: 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 ); 40013448: d0 02 00 00 ld [ %o0 ], %o0 4001344c: 40 00 09 96 call 40015aa4 40013450: 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 ) { 40013454: 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; 40013458: 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; 4001345c: 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 ) { 40013460: 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++; 40013464: 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 ) { 40013468: 08 bf ff f1 bleu 4001342c 4001346c: b0 06 00 11 add %i0, %l1, %i0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 40013470: 80 a7 20 00 cmp %i4, 0 40013474: 02 80 00 0e be 400134ac 40013478: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001347c: 92 10 00 13 mov %l3, %o1 40013480: 90 10 00 10 mov %l0, %o0 40013484: 7f ff fd 3f call 40012980 40013488: 94 10 20 00 clr %o2 assert( block_ptr ); 4001348c: 80 a2 20 00 cmp %o0, 0 40013490: 02 80 00 2b be 4001353c 40013494: 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 ); 40013498: d0 02 00 00 ld [ %o0 ], %o0 4001349c: 92 10 00 1b mov %i3, %o1 400134a0: 40 00 09 81 call 40015aa4 400134a4: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 400134a8: 90 07 bf f8 add %fp, -8, %o0 400134ac: 7f ff c1 8d call 40003ae0 400134b0: 92 10 20 00 clr %o1 400134b4: c2 07 bf f8 ld [ %fp + -8 ], %g1 400134b8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 400134bc: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 400134c0: 81 c7 e0 08 ret 400134c4: 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 ) { 400134c8: 80 a0 40 0a cmp %g1, %o2 400134cc: 1a bf ff b1 bcc 40013390 400134d0: 25 10 00 8e sethi %hi(0x40023800), %l2 status = IMFS_memfile_extend( the_jnode, last_byte ); 400134d4: 90 10 00 10 mov %l0, %o0 400134d8: 7f ff fe e7 call 40013074 400134dc: 92 10 20 00 clr %o1 if ( status ) 400134e0: 80 a2 20 00 cmp %o0, 0 400134e4: 02 bf ff ab be 40013390 400134e8: 25 10 00 8e sethi %hi(0x40023800), %l2 rtems_set_errno_and_return_minus_one( ENOSPC ); 400134ec: 40 00 07 33 call 400151b8 <__errno> <== NOT EXECUTED 400134f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400134f4: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 400134f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400134fc: 81 c7 e0 08 ret <== NOT EXECUTED 40013500: 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 ); 40013504: 40 00 07 2d call 400151b8 <__errno> <== NOT EXECUTED 40013508: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001350c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40013510: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013514: 81 c7 e0 08 ret <== NOT EXECUTED 40013518: 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 ); 4001351c: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013520: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013524: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013528: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 4001352c: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 40013530: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 40013534: 7f ff c0 07 call 40003550 <__assert_func> <== NOT EXECUTED 40013538: 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 ); 4001353c: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013540: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013544: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013548: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 4001354c: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 40013550: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 40013554: 7f ff bf ff call 40003550 <__assert_func> <== NOT EXECUTED 40013558: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001355c: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013560: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013564: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013568: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 4001356c: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED 40013570: 7f ff bf f8 call 40003550 <__assert_func> <== NOT EXECUTED 40013574: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 40013578: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001357c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013580: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40013584: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 40013588: 96 12 e0 00 mov %o3, %o3 <== NOT EXECUTED 4001358c: 7f ff bf f1 call 40003550 <__assert_func> <== NOT EXECUTED 40013590: 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 ); 40013594: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013598: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 4001359c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 400135a0: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 400135a4: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED 400135a8: 7f ff bf ea call 40003550 <__assert_func> <== NOT EXECUTED 400135ac: 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 ); 400135b0: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400135b4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400135b8: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 400135bc: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 400135c0: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 400135c4: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 400135c8: 7f ff bf e2 call 40003550 <__assert_func> <== NOT EXECUTED 400135cc: 92 10 23 1c mov 0x31c, %o1 <== NOT EXECUTED 400135d0: 01 00 00 00 nop 4000a7d8 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a7d8: 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 ); 4000a7dc: 40 00 17 50 call 4001051c 4000a7e0: 90 10 00 18 mov %i0, %o0 4000a7e4: 96 07 bf fc add %fp, -4, %o3 4000a7e8: 92 10 00 08 mov %o0, %o1 4000a7ec: a0 07 bf b8 add %fp, -72, %l0 4000a7f0: 90 10 00 18 mov %i0, %o0 4000a7f4: 7f ff ff 7e call 4000a5ec 4000a7f8: 94 10 00 10 mov %l0, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000a7fc: 97 2e 60 10 sll %i1, 0x10, %o3 4000a800: 03 00 00 3c sethi %hi(0xf000), %g1 4000a804: 97 32 e0 10 srl %o3, 0x10, %o3 4000a808: 05 00 00 10 sethi %hi(0x4000), %g2 4000a80c: 82 0a c0 01 and %o3, %g1, %g1 4000a810: 80 a0 40 02 cmp %g1, %g2 4000a814: 02 80 00 24 be 4000a8a4 4000a818: 05 00 00 20 sethi %hi(0x8000), %g2 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000a81c: 80 a0 40 02 cmp %g1, %g2 4000a820: 02 80 00 0c be 4000a850 4000a824: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000a828: 05 00 00 08 sethi %hi(0x2000), %g2 4000a82c: 80 a0 40 02 cmp %g1, %g2 4000a830: 02 80 00 12 be 4000a878 4000a834: 05 00 00 18 sethi %hi(0x6000), %g2 4000a838: 80 a0 40 02 cmp %g1, %g2 4000a83c: 02 80 00 0f be 4000a878 4000a840: 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)) 4000a844: 80 a0 40 02 cmp %g1, %g2 4000a848: 12 80 00 21 bne 4000a8cc 4000a84c: 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( 4000a850: 90 10 00 1c mov %i4, %o0 4000a854: 94 10 00 10 mov %l0, %o2 4000a858: 98 07 bf e0 add %fp, -32, %o4 4000a85c: 40 00 0c 88 call 4000da7c 4000a860: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000a864: 80 a2 20 00 cmp %o0, 0 4000a868: 02 80 00 1f be 4000a8e4 4000a86c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4000a870: 81 c7 e0 08 ret 4000a874: 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 ); 4000a878: f4 3f bf e0 std %i2, [ %fp + -32 ] 4000a87c: 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( 4000a880: 90 10 00 1c mov %i4, %o0 4000a884: 94 10 00 10 mov %l0, %o2 4000a888: 98 07 bf e0 add %fp, -32, %o4 4000a88c: 40 00 0c 7c call 4000da7c 4000a890: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000a894: 80 a2 20 00 cmp %o0, 0 4000a898: 12 80 00 17 bne 4000a8f4 4000a89c: 01 00 00 00 nop 4000a8a0: 30 80 00 11 b,a 4000a8e4 <== 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 ); 4000a8a4: 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( 4000a8a8: 90 10 00 1c mov %i4, %o0 4000a8ac: 94 10 00 10 mov %l0, %o2 4000a8b0: 98 07 bf e0 add %fp, -32, %o4 4000a8b4: 40 00 0c 72 call 4000da7c 4000a8b8: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000a8bc: 80 a2 20 00 cmp %o0, 0 4000a8c0: 12 80 00 0d bne 4000a8f4 4000a8c4: 01 00 00 00 nop 4000a8c8: 30 80 00 07 b,a 4000a8e4 <== 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 ); 4000a8cc: 40 00 13 5d call 4000f640 <__errno> <== NOT EXECUTED 4000a8d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a8d4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000a8d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a8dc: 81 c7 e0 08 ret <== NOT EXECUTED 4000a8e0: 81 e8 00 00 restore <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000a8e4: 40 00 13 57 call 4000f640 <__errno> <== NOT EXECUTED 4000a8e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a8ec: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000a8f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000a8f4: 81 c7 e0 08 ret 4000a8f8: 81 e8 00 00 restore 400030d8 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 400030d8: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 400030dc: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 400030e0: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400030e4: 80 a0 a0 01 cmp %g2, 1 400030e8: 12 80 00 05 bne 400030fc 400030ec: 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; 400030f0: f0 20 60 5c st %i0, [ %g1 + 0x5c ] return 0; } 400030f4: 81 c7 e0 08 ret 400030f8: 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 ); 400030fc: 40 00 48 2f call 400151b8 <__errno> <== NOT EXECUTED 40003100: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003104: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40003108: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000310c: 81 c7 e0 08 ret <== NOT EXECUTED 40003110: 81 e8 00 00 restore <== NOT EXECUTED 40003a6c : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 40003a6c: 9d e3 bf a0 save %sp, -96, %sp assert( the_jnode ); 40003a70: 80 a6 20 00 cmp %i0, 0 40003a74: 02 80 00 5b be 40003be0 40003a78: 21 10 00 9d sethi %hi(0x40027400), %l0 fprintf(stdout, "%s", the_jnode->name ); 40003a7c: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 ! 400275b0 <_impure_ptr> 40003a80: 90 06 20 0c add %i0, 0xc, %o0 40003a84: 40 00 43 8b call 400148b0 40003a88: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 40003a8c: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 40003a90: 80 a2 a0 07 cmp %o2, 7 40003a94: 08 80 00 0f bleu 40003ad0 40003a98: 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 ); 40003a9c: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 <== NOT EXECUTED 40003aa0: 13 10 00 96 sethi %hi(0x40025800), %o1 <== NOT EXECUTED 40003aa4: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40003aa8: 40 00 43 24 call 40014738 <== NOT EXECUTED 40003aac: 92 12 61 48 or %o1, 0x148, %o1 <== NOT EXECUTED assert(0); 40003ab0: 92 10 20 6c mov 0x6c, %o1 <== NOT EXECUTED assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); assert(0); 40003ab4: 11 10 00 96 sethi %hi(0x40025800), %o0 <== NOT EXECUTED 40003ab8: 15 10 00 96 sethi %hi(0x40025800), %o2 <== NOT EXECUTED 40003abc: 17 10 00 95 sethi %hi(0x40025400), %o3 <== NOT EXECUTED 40003ac0: 90 12 20 80 or %o0, 0x80, %o0 <== NOT EXECUTED 40003ac4: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40003ac8: 40 00 02 83 call 400044d4 <__assert_func> <== NOT EXECUTED 40003acc: 96 12 e2 38 or %o3, 0x238, %o3 <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 40003ad0: 05 10 00 0e sethi %hi(0x40003800), %g2 40003ad4: 84 10 a2 10 or %g2, 0x210, %g2 ! 40003a10 40003ad8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40003adc: 81 c0 40 00 jmp %g1 40003ae0: 01 00 00 00 nop fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 40003ae4: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 <== NOT EXECUTED 40003ae8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003aec: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40003af0: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40003af4: 11 10 00 96 sethi %hi(0x40025800), %o0 <== NOT EXECUTED 40003af8: 40 00 46 8e call 40015530 <== NOT EXECUTED 40003afc: 90 12 21 30 or %o0, 0x130, %o0 ! 40025930 <__FUNCTION__.5671+0x2f0> <== NOT EXECUTED assert(0); 40003b00: 10 bf ff ed b 40003ab4 <== NOT EXECUTED 40003b04: 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)", 40003b08: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 <== NOT EXECUTED 40003b0c: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 <== NOT EXECUTED 40003b10: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 <== NOT EXECUTED 40003b14: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40003b18: 13 10 00 96 sethi %hi(0x40025800), %o1 <== NOT EXECUTED 40003b1c: 40 00 43 07 call 40014738 <== NOT EXECUTED 40003b20: 92 12 60 f8 or %o1, 0xf8, %o1 ! 400258f8 <__FUNCTION__.5671+0x2b8> <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003b24: 31 10 00 95 sethi %hi(0x40025400), %i0 <== NOT EXECUTED 40003b28: 40 00 4a 8c call 40016558 <== NOT EXECUTED 40003b2c: 91 ee 23 88 restore %i0, 0x388, %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 ")", 40003b30: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 40003b34: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 40003b38: d0 00 60 08 ld [ %g1 + 8 ], %o0 40003b3c: 13 10 00 96 sethi %hi(0x40025800), %o1 40003b40: 40 00 42 fe call 40014738 40003b44: 92 12 61 08 or %o1, 0x108, %o1 ! 40025908 <__FUNCTION__.5671+0x2c8> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003b48: 31 10 00 95 sethi %hi(0x40025400), %i0 40003b4c: 40 00 4a 83 call 40016558 40003b50: 91 ee 23 88 restore %i0, 0x388, %o0 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40003b54: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 <== NOT EXECUTED 40003b58: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003b5c: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40003b60: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40003b64: 11 10 00 96 sethi %hi(0x40025800), %o0 <== NOT EXECUTED 40003b68: 40 00 46 72 call 40015530 <== NOT EXECUTED 40003b6c: 90 12 21 18 or %o0, 0x118, %o0 ! 40025918 <__FUNCTION__.5671+0x2d8> <== NOT EXECUTED assert(0); 40003b70: 10 bf ff d1 b 40003ab4 <== NOT EXECUTED 40003b74: 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" ); 40003b78: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 <== NOT EXECUTED 40003b7c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003b80: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40003b84: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40003b88: 11 10 00 96 sethi %hi(0x40025800), %o0 <== NOT EXECUTED 40003b8c: 40 00 46 69 call 40015530 <== NOT EXECUTED 40003b90: 90 12 21 18 or %o0, 0x118, %o0 ! 40025918 <__FUNCTION__.5671+0x2d8> <== NOT EXECUTED assert(0); 40003b94: 10 bf ff c8 b 40003ab4 <== NOT EXECUTED 40003b98: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40003b9c: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 40003ba0: d6 06 20 54 ld [ %i0 + 0x54 ], %o3 40003ba4: d4 06 20 50 ld [ %i0 + 0x50 ], %o2 40003ba8: d0 00 60 08 ld [ %g1 + 8 ], %o0 40003bac: 13 10 00 96 sethi %hi(0x40025800), %o1 40003bb0: 40 00 42 e2 call 40014738 40003bb4: 92 12 60 e0 or %o1, 0xe0, %o1 ! 400258e0 <__FUNCTION__.5671+0x2a0> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003bb8: 31 10 00 95 sethi %hi(0x40025400), %i0 40003bbc: 40 00 4a 67 call 40016558 40003bc0: 91 ee 23 88 restore %i0, 0x388, %o0 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 40003bc4: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 40003bc8: 90 10 20 2f mov 0x2f, %o0 40003bcc: d2 00 60 08 ld [ %g1 + 8 ], %o1 40003bd0: 40 00 42 f4 call 400147a0 40003bd4: 31 10 00 95 sethi %hi(0x40025400), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003bd8: 40 00 4a 60 call 40016558 40003bdc: 91 ee 23 88 restore %i0, 0x388, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 40003be0: 11 10 00 96 sethi %hi(0x40025800), %o0 <== NOT EXECUTED 40003be4: 15 10 00 96 sethi %hi(0x40025800), %o2 <== NOT EXECUTED 40003be8: 17 10 00 96 sethi %hi(0x40025800), %o3 <== NOT EXECUTED 40003bec: 90 12 20 80 or %o0, 0x80, %o0 <== NOT EXECUTED 40003bf0: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40003bf4: 96 12 e0 d0 or %o3, 0xd0, %o3 <== NOT EXECUTED 40003bf8: 40 00 02 37 call 400044d4 <__assert_func> <== NOT EXECUTED 40003bfc: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED 40003c00: 01 00 00 00 nop 40003120 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 40003120: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 40003124: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 40003128: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000312c: 80 a0 a0 04 cmp %g2, 4 40003130: 12 80 00 19 bne 40003194 40003134: 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++ ) 40003138: 02 80 00 15 be 4000318c 4000313c: 86 10 20 00 clr %g3 40003140: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40003144: 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 ); 40003148: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 4000314c: 80 a1 20 00 cmp %g4, 0 40003150: 12 80 00 08 bne 40003170 40003154: c4 08 80 00 ldub [ %g2 ], %g2 40003158: 30 80 00 13 b,a 400031a4 <== NOT EXECUTED 4000315c: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40003160: c8 48 80 18 ldsb [ %g2 + %i0 ], %g4 40003164: 80 a1 20 00 cmp %g4, 0 40003168: 02 80 00 07 be 40003184 4000316c: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; 40003170: 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++ ) 40003174: b0 06 20 01 inc %i0 40003178: 80 a6 80 18 cmp %i2, %i0 4000317c: 18 bf ff f8 bgu 4000315c 40003180: 86 10 00 18 mov %i0, %g3 buf[i] = node->info.sym_link.name[i]; return i; } 40003184: 81 c7 e0 08 ret 40003188: 81 e8 00 00 restore 4000318c: 81 c7 e0 08 ret <== NOT EXECUTED 40003190: 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 ); 40003194: 40 00 48 09 call 400151b8 <__errno> <== NOT EXECUTED 40003198: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000319c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400031a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400031a4: 81 c7 e0 08 ret <== NOT EXECUTED 400031a8: 81 e8 00 00 restore <== NOT EXECUTED 400031ac : 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 */ ) { 400031ac: 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; 400031b0: e0 06 40 00 ld [ %i1 ], %l0 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 400031b4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 400031b8: 90 04 20 0c add %l0, 0xc, %o0 <== NOT EXECUTED 400031bc: 40 00 4b d2 call 40016104 <== NOT EXECUTED 400031c0: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 400031c4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400031c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400031cc: 22 80 00 05 be,a 400031e0 <== NOT EXECUTED 400031d0: 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 ); 400031d4: 40 00 14 ac call 40008484 <_Chain_Extract> <== NOT EXECUTED 400031d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 400031dc: 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 ); 400031e0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400031e4: 90 00 60 50 add %g1, 0x50, %o0 <== NOT EXECUTED 400031e8: 40 00 14 9b call 40008454 <_Chain_Append> <== NOT EXECUTED 400031ec: 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 ); 400031f0: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 400031f4: 40 00 02 3b call 40003ae0 <== NOT EXECUTED 400031f8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400031fc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40003200: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED return 0; } 40003204: 81 c7 e0 08 ret <== NOT EXECUTED 40003208: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000a908 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000a908: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000a90c: 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 ) { 4000a910: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000a914: 80 a0 60 00 cmp %g1, 0 4000a918: 22 80 00 06 be,a 4000a930 4000a91c: 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 ); 4000a920: 40 00 05 dd call 4000c094 <_Chain_Extract> 4000a924: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000a928: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000a92c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000a930: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000a934: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000a938: 90 07 bf f8 add %fp, -8, %o0 4000a93c: 40 00 01 13 call 4000ad88 4000a940: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000a944: 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) ) { 4000a948: 90 10 00 10 mov %l0, %o0 4000a94c: 40 00 01 48 call 4000ae6c 4000a950: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000a954: 80 a2 20 00 cmp %o0, 0 4000a958: 12 80 00 12 bne 4000a9a0 4000a95c: 01 00 00 00 nop 4000a960: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000a964: 80 a0 60 00 cmp %g1, 0 4000a968: 12 80 00 0e bne 4000a9a0 4000a96c: 03 10 00 74 sethi %hi(0x4001d000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000a970: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 4001d058 4000a974: c4 06 40 00 ld [ %i1 ], %g2 4000a978: c6 00 60 04 ld [ %g1 + 4 ], %g3 4000a97c: 80 a0 c0 02 cmp %g3, %g2 4000a980: 22 80 00 02 be,a 4000a988 4000a984: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000a988: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a98c: 80 a0 60 04 cmp %g1, 4 4000a990: 22 80 00 06 be,a 4000a9a8 4000a994: 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 ); 4000a998: 40 00 00 82 call 4000aba0 4000a99c: 90 10 00 10 mov %l0, %o0 } return 0; } 4000a9a0: 81 c7 e0 08 ret 4000a9a4: 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 ) 4000a9a8: 80 a2 20 00 cmp %o0, 0 4000a9ac: 02 bf ff fb be 4000a998 4000a9b0: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 4000a9b4: 40 00 00 7b call 4000aba0 4000a9b8: 01 00 00 00 nop 4000a9bc: 30 bf ff f7 b,a 4000a998 4000a9e0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000a9e0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000a9e4: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 4000a9e8: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000a9ec: 80 a0 a0 07 cmp %g2, 7 4000a9f0: 08 80 00 08 bleu 4000aa10 4000a9f4: 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 ); 4000a9f8: 40 00 13 12 call 4000f640 <__errno> <== NOT EXECUTED 4000a9fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000aa00: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000aa04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000aa08: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa0c: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000aa10: 07 10 00 2a sethi %hi(0x4000a800), %g3 4000aa14: 86 10 e1 c0 or %g3, 0x1c0, %g3 ! 4000a9c0 4000aa18: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 4000aa1c: 81 c0 80 00 jmp %g2 4000aa20: 01 00 00 00 nop case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4000aa24: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000aa28: 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; 4000aa2c: c6 10 60 2e lduh [ %g1 + 0x2e ], %g3 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000aa30: 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; 4000aa34: c6 36 60 0c sth %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000aa38: 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; 4000aa3c: 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; 4000aa40: 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; 4000aa44: 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; 4000aa48: 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; 4000aa4c: 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; 4000aa50: 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; 4000aa54: 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; 4000aa58: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 4000aa5c: 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; 4000aa60: 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; 4000aa64: 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; 4000aa68: 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; } 4000aa6c: 81 c7 e0 08 ret 4000aa70: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000aa74: 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; 4000aa78: 10 bf ff ed b 4000aa2c 4000aa7c: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000aa80: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 4000aa84: 10 bf ff ea b 4000aa2c 4000aa88: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] 4000320c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4000320c: 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 ); 40003210: 40 00 4b 88 call 40016030 40003214: 90 10 00 1a mov %i2, %o0 40003218: 96 07 bf fc add %fp, -4, %o3 4000321c: 92 10 00 08 mov %o0, %o1 40003220: a0 07 bf b8 add %fp, -72, %l0 40003224: 90 10 00 1a mov %i2, %o0 40003228: 40 00 33 9c call 40010098 4000322c: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 40003230: 40 00 4b 6b call 40015fdc 40003234: 90 10 00 19 mov %i1, %o0 if (info.sym_link.name == NULL) { 40003238: 80 a2 20 00 cmp %o0, 0 4000323c: 02 80 00 15 be 40003290 40003240: 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( 40003244: 90 10 00 18 mov %i0, %o0 40003248: 94 10 00 10 mov %l0, %o2 4000324c: 92 10 20 04 mov 4, %o1 40003250: 17 00 00 28 sethi %hi(0xa000), %o3 40003254: 98 07 bf e0 add %fp, -32, %o4 40003258: 96 12 e1 ff or %o3, 0x1ff, %o3 4000325c: 40 00 2f ee call 4000f214 40003260: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 40003264: 80 a2 20 00 cmp %o0, 0 40003268: 12 80 00 08 bne 40003288 4000326c: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 40003270: 40 00 01 f1 call 40003a34 <== NOT EXECUTED 40003274: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 40003278: 40 00 47 d0 call 400151b8 <__errno> <== NOT EXECUTED 4000327c: 01 00 00 00 nop <== NOT EXECUTED 40003280: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40003284: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40003288: 81 c7 e0 08 ret 4000328c: 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); 40003290: 40 00 47 ca call 400151b8 <__errno> <== NOT EXECUTED 40003294: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003298: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000329c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400032a0: 81 c7 e0 08 ret <== NOT EXECUTED 400032a4: 81 e8 00 00 restore <== NOT EXECUTED 400032a8 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 400032a8: 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; 400032ac: 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 ) { 400032b0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400032b4: 80 a0 60 03 cmp %g1, 3 400032b8: 02 80 00 09 be 400032dc 400032bc: a2 10 00 18 mov %i0, %l1 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 400032c0: c2 06 60 08 ld [ %i1 + 8 ], %g1 400032c4: 90 10 00 11 mov %l1, %o0 400032c8: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400032cc: 9f c0 40 00 call %g1 400032d0: 92 10 00 19 mov %i1, %o1 return result; } 400032d4: 81 c7 e0 08 ret 400032d8: 91 e8 00 08 restore %g0, %o0, %o0 * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 400032dc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400032e0: 80 a0 60 00 cmp %g1, 0 400032e4: 02 80 00 25 be 40003378 400032e8: a4 07 bf e4 add %fp, -28, %l2 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 400032ec: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 400032f0: da 06 60 04 ld [ %i1 + 4 ], %o5 400032f4: c8 06 60 08 ld [ %i1 + 8 ], %g4 400032f8: c6 06 60 0c ld [ %i1 + 0xc ], %g3 400032fc: c4 27 bf f4 st %g2, [ %fp + -12 ] the_link.node_access = node->info.hard_link.link_node; 40003300: 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; 40003304: da 27 bf e8 st %o5, [ %fp + -24 ] 40003308: c8 27 bf ec st %g4, [ %fp + -20 ] 4000330c: c6 27 bf f0 st %g3, [ %fp + -16 ] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 40003310: 40 00 30 10 call 4000f350 40003314: 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) 40003318: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 4000331c: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 40003320: 80 a0 a0 01 cmp %g2, 1 40003324: 02 80 00 0a be 4000334c 40003328: 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 ); 4000332c: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40003330: c6 30 60 30 sth %g3, [ %g1 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40003334: 40 00 01 eb call 40003ae0 40003338: 92 10 20 00 clr %o1 4000333c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40003340: c4 07 bf f8 ld [ %fp + -8 ], %g2 40003344: 10 bf ff df b 400032c0 40003348: 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 ); 4000334c: c2 07 bf ec ld [ %fp + -20 ], %g1 40003350: 90 10 00 18 mov %i0, %o0 40003354: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40003358: 92 10 00 12 mov %l2, %o1 4000335c: 9f c0 40 00 call %g1 40003360: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40003364: 80 a2 20 00 cmp %o0, 0 40003368: 22 bf ff d7 be,a 400032c4 4000336c: c2 06 60 08 ld [ %i1 + 8 ], %g1 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 40003370: 81 c7 e0 08 ret 40003374: 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 ); 40003378: 40 00 47 90 call 400151b8 <__errno> <== NOT EXECUTED 4000337c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003380: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40003384: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003388: 81 c7 e0 08 ret <== NOT EXECUTED 4000338c: 81 e8 00 00 restore <== NOT EXECUTED 40003390 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40003390: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40003394: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40003398: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000339c: 80 a0 a0 01 cmp %g2, 1 400033a0: 12 80 00 09 bne 400033c4 400033a4: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 400033a8: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 400033ac: 80 a0 a0 00 cmp %g2, 0 400033b0: 02 80 00 0b be 400033dc 400033b4: 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; 400033b8: c0 20 60 5c clr [ %g1 + 0x5c ] return 0; } 400033bc: 81 c7 e0 08 ret 400033c0: 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 ); 400033c4: 40 00 47 7d call 400151b8 <__errno> <== NOT EXECUTED 400033c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033cc: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400033d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033d4: 81 c7 e0 08 ret <== NOT EXECUTED 400033d8: 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 */ 400033dc: 40 00 47 77 call 400151b8 <__errno> <== NOT EXECUTED 400033e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400033e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033ec: 81 c7 e0 08 ret <== NOT EXECUTED 400033f0: 81 e8 00 00 restore <== NOT EXECUTED 400023b0 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 400023b0: 9d e3 bf a0 save %sp, -96, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 400023b4: 03 10 00 75 sethi %hi(0x4001d400), %g1 400023b8: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4001d5b8 400023bc: 80 a0 60 00 cmp %g1, 0 400023c0: 02 80 00 05 be 400023d4 400023c4: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 400023c8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 400023cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400023d0: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 400023d4: 40 00 23 58 call 4000b134 400023d8: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 400023dc: 03 10 00 75 sethi %hi(0x4001d400), %g1 400023e0: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 4001d5bc 400023e4: 80 a0 60 00 cmp %g1, 0 400023e8: 02 80 00 08 be 40002408 400023ec: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 400023f0: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 400023f4: 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)( 400023f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400023fc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 40002400: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40002404: 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 ( 40002408: 23 10 00 75 sethi %hi(0x4001d400), %l1 4000240c: c2 0c 61 b5 ldub [ %l1 + 0x1b5 ], %g1 ! 4001d5b5 40002410: 80 a0 60 00 cmp %g1, 0 40002414: 12 80 00 10 bne 40002454 40002418: 21 10 00 73 sethi %hi(0x4001cc00), %l0 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 4000241c: 03 10 00 74 sethi %hi(0x4001d000), %g1 40002420: c2 08 60 20 ldub [ %g1 + 0x20 ], %g1 ! 4001d020 40002424: 80 a0 60 00 cmp %g1, 0 40002428: 12 80 00 13 bne 40002474 4000242c: 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 ); 40002430: 21 10 00 73 sethi %hi(0x4001cc00), %l0 40002434: d0 04 23 50 ld [ %l0 + 0x350 ], %o0 ! 4001cf50 40002438: 92 10 00 18 mov %i0, %o1 4000243c: 94 10 00 19 mov %i1, %o2 40002440: 40 00 11 69 call 400069e4 <_Heap_Initialize> 40002444: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 40002448: 80 a2 20 00 cmp %o0, 0 4000244c: 02 80 00 13 be 40002498 40002450: 01 00 00 00 nop rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 40002454: d0 04 23 50 ld [ %l0 + 0x350 ], %o0 40002458: 21 10 00 75 sethi %hi(0x4001d400), %l0 4000245c: 40 00 14 ae call 40007714 <_Protected_heap_Get_size> 40002460: e2 04 23 90 ld [ %l0 + 0x390 ], %l1 ! 4001d790 40002464: 90 02 00 11 add %o0, %l1, %o0 40002468: d0 24 23 90 st %o0, [ %l0 + 0x390 ] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 4000246c: 81 c7 e0 08 ret 40002470: 81 e8 00 00 restore if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 40002474: 92 10 20 00 clr %o1 40002478: 40 00 36 ec call 40010028 4000247c: 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 ) { 40002480: c2 0c 61 b5 ldub [ %l1 + 0x1b5 ], %g1 40002484: 80 a0 60 00 cmp %g1, 0 40002488: 22 bf ff eb be,a 40002434 4000248c: 21 10 00 73 sethi %hi(0x4001cc00), %l0 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 40002490: 10 bf ff f2 b 40002458 <== NOT EXECUTED 40002494: d0 04 23 50 ld [ %l0 + 0x350 ], %o0 ! 4001cf50 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 40002498: 40 00 0f 1b call 40006104 <== NOT EXECUTED 4000249c: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED 400024a0: 01 00 00 00 nop 40005228 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 40005228: 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 ) 4000522c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40005230: 02 80 00 3b be 4000531c <== NOT EXECUTED 40005234: 27 10 01 b0 sethi %hi(0x4006c000), %l3 <== NOT EXECUTED return; if ( !print_handler ) 40005238: e8 04 e1 24 ld [ %l3 + 0x124 ], %l4 ! 4006c124 <== NOT EXECUTED 4000523c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40005240: 02 80 00 37 be 4000531c <== NOT EXECUTED 40005244: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 40005248: 02 80 00 3e be 40005340 <== NOT EXECUTED 4000524c: 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); 40005250: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40005254: 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); 40005258: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 4000525c: 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 ); 40005260: 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); 40005264: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40005268: 7f ff ff d8 call 400051c8 <== NOT EXECUTED 4000526c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( high_water_mark ) 40005270: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40005274: 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 ) 40005278: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 4000527c: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 40005280: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40005284: 02 80 00 44 be 40005394 <== NOT EXECUTED 40005288: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED (*print_handler)( 4000528c: ee 06 20 08 ld [ %i0 + 8 ], %l7 <== NOT EXECUTED 40005290: 2b 10 01 b0 sethi %hi(0x4006c000), %l5 <== NOT EXECUTED 40005294: fa 05 61 20 ld [ %l5 + 0x120 ], %i5 ! 4006c120 <== NOT EXECUTED 40005298: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 4000529c: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 400052a0: 40 00 1a 87 call 4000bcbc <== NOT EXECUTED 400052a4: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 400052a8: 13 10 01 83 sethi %hi(0x40060c00), %o1 <== NOT EXECUTED 400052ac: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 400052b0: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED 400052b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 400052b8: 9f c5 00 00 call %l4 <== NOT EXECUTED 400052bc: 92 12 62 38 or %o1, 0x238, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 400052c0: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 400052c4: c2 04 e1 24 ld [ %l3 + 0x124 ], %g1 <== NOT EXECUTED 400052c8: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 400052cc: d0 05 61 20 ld [ %l5 + 0x120 ], %o0 <== NOT EXECUTED 400052d0: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 400052d4: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 400052d8: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 400052dc: 9a 10 00 11 mov %l1, %o5 <== NOT EXECUTED 400052e0: 13 10 01 83 sethi %hi(0x40060c00), %o1 <== NOT EXECUTED 400052e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400052e8: 92 12 62 58 or %o1, 0x258, %o1 ! 40060e58 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 400052ec: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED 400052f0: c4 00 61 1c ld [ %g1 + 0x11c ], %g2 ! 4006c11c <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 400052f4: 03 10 01 b0 sethi %hi(0x4006c000), %g1 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 400052f8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400052fc: 02 80 00 0a be 40005324 <== NOT EXECUTED 40005300: 05 10 01 b0 sethi %hi(0x4006c000), %g2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40005304: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 <== NOT EXECUTED 40005308: d0 00 a1 20 ld [ %g2 + 0x120 ], %o0 <== NOT EXECUTED 4000530c: 13 10 01 83 sethi %hi(0x40060c00), %o1 <== NOT EXECUTED 40005310: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40005314: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005318: 92 12 62 88 or %o1, 0x288, %o1 <== NOT EXECUTED 4000531c: 81 c7 e0 08 ret <== NOT EXECUTED 40005320: 81 e8 00 00 restore <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 40005324: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 <== NOT EXECUTED 40005328: d0 00 a1 20 ld [ %g2 + 0x120 ], %o0 <== NOT EXECUTED 4000532c: 13 10 01 83 sethi %hi(0x40060c00), %o1 <== NOT EXECUTED 40005330: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005334: 92 12 62 78 or %o1, 0x278, %o1 ! 40060e78 <== NOT EXECUTED 40005338: 81 c7 e0 08 ret <== NOT EXECUTED 4000533c: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 40005340: 25 10 01 bb sethi %hi(0x4006ec00), %l2 <== NOT EXECUTED 40005344: a4 14 a0 20 or %l2, 0x20, %l2 ! 4006ec20 <== NOT EXECUTED 40005348: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED 4000534c: ac 10 20 00 clr %l6 <== NOT EXECUTED 40005350: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005354: 02 bf ff f2 be 4000531c <== NOT EXECUTED 40005358: 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); 4000535c: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40005360: 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); 40005364: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40005368: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 4000536c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40005370: 7f ff ff 96 call 400051c8 <== NOT EXECUTED 40005374: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( high_water_mark ) 40005378: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 4000537c: 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 ) 40005380: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40005384: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 40005388: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000538c: 12 bf ff c0 bne 4000528c <== NOT EXECUTED 40005390: 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 ); 40005394: 2b 10 01 b0 sethi %hi(0x4006c000), %l5 <== NOT EXECUTED 40005398: d0 05 61 20 ld [ %l5 + 0x120 ], %o0 ! 4006c120 <== NOT EXECUTED 4000539c: 13 10 01 83 sethi %hi(0x40060c00), %o1 <== NOT EXECUTED 400053a0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 400053a4: 9f c5 00 00 call %l4 <== NOT EXECUTED 400053a8: 92 12 62 48 or %o1, 0x248, %o1 <== NOT EXECUTED } (*print_handler)( 400053ac: 10 bf ff c6 b 400052c4 <== NOT EXECUTED 400053b0: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 400051c8 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 400051c8: 82 02 20 10 add %o0, 0x10, %g1 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 400051cc: 86 0a 7f fc and %o1, -4, %g3 <== NOT EXECUTED 400051d0: 86 00 40 03 add %g1, %g3, %g3 <== NOT EXECUTED 400051d4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400051d8: 1a 80 00 10 bcc 40005218 <== NOT EXECUTED 400051dc: 05 29 69 69 sethi %hi(0xa5a5a400), %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 400051e0: c8 02 20 10 ld [ %o0 + 0x10 ], %g4 <== NOT EXECUTED 400051e4: 84 10 a1 a5 or %g2, 0x1a5, %g2 <== NOT EXECUTED 400051e8: 80 a1 00 02 cmp %g4, %g2 <== NOT EXECUTED 400051ec: 22 80 00 08 be,a 4000520c <== NOT EXECUTED 400051f0: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED return (void *) base; 400051f4: 81 c3 e0 08 retl <== NOT EXECUTED 400051f8: 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) 400051fc: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 40005200: 12 80 00 08 bne 40005220 <== NOT EXECUTED 40005204: 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++) 40005208: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 4000520c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40005210: 38 bf ff fb bgu,a 400051fc <== NOT EXECUTED 40005214: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 40005218: 81 c3 e0 08 retl <== NOT EXECUTED 4000521c: 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; 40005220: 81 c3 e0 08 retl <== NOT EXECUTED 40005224: 01 00 00 00 nop 40005428 : * * 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) { 40005428: 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"); 4000542c: 11 10 01 83 sethi %hi(0x40060c00), %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); 40005430: e0 06 20 c8 ld [ %i0 + 0xc8 ], %l0 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 40005434: 40 00 0c 5d call 400085a8 <== NOT EXECUTED 40005438: 90 12 22 f8 or %o0, 0x2f8, %o0 <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 4000543c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40005440: 11 10 01 83 sethi %hi(0x40060c00), %o0 <== NOT EXECUTED 40005444: 40 00 0c 59 call 400085a8 <== NOT EXECUTED 40005448: 90 12 23 08 or %o0, 0x308, %o0 ! 40060f08 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 4000544c: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED 40005450: 11 10 01 83 sethi %hi(0x40060c00), %o0 <== NOT EXECUTED 40005454: 40 00 0c 55 call 400085a8 <== NOT EXECUTED 40005458: 90 12 23 28 or %o0, 0x328, %o0 ! 40060f28 <== NOT EXECUTED printk( 4000545c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 40005460: 11 10 01 83 sethi %hi(0x40060c00), %o0 <== NOT EXECUTED 40005464: 40 00 0c 51 call 400085a8 <== NOT EXECUTED 40005468: 90 12 23 40 or %o0, 0x340, %o0 ! 40060f40 <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 4000546c: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 40005470: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED 40005474: 40 00 1a 12 call 4000bcbc <== NOT EXECUTED 40005478: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED 4000547c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40005480: 11 10 01 83 sethi %hi(0x40060c00), %o0 <== NOT EXECUTED 40005484: 40 00 0c 49 call 400085a8 <== NOT EXECUTED 40005488: 90 12 23 58 or %o0, 0x358, %o0 ! 40060f58 <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) 4000548c: d2 06 20 c4 ld [ %i0 + 0xc4 ], %o1 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 40005490: d4 06 20 c8 ld [ %i0 + 0xc8 ], %o2 <== NOT EXECUTED 40005494: 11 10 01 83 sethi %hi(0x40060c00), %o0 <== NOT EXECUTED 40005498: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED 4000549c: 40 00 0c 43 call 400085a8 <== NOT EXECUTED 400054a0: 90 12 23 70 or %o0, 0x370, %o0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { 400054a4: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 400054a8: 02 80 00 04 be 400054b8 <== NOT EXECUTED 400054ac: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 400054b0: 40 00 1c 3f call 4000c5ac <== NOT EXECUTED 400054b4: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 400054b8: 11 10 01 83 sethi %hi(0x40060c00), %o0 <== NOT EXECUTED 400054bc: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 400054c0: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED 400054c4: 40 00 0c 39 call 400085a8 <== NOT EXECUTED 400054c8: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED 400054cc: 30 bf ff f9 b,a 400054b0 <== NOT EXECUTED 4000c3b4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000c3b4: 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; 4000c3b8: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000c3bc: 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 ) { 4000c3c0: 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; 4000c3c4: e4 06 20 08 ld [ %i0 + 8 ], %l2 4000c3c8: 18 80 00 75 bgu 4000c59c <_Heap_Allocate_aligned_with_boundary+0x1e8> 4000c3cc: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4000c3d0: 80 a6 e0 00 cmp %i3, 0 4000c3d4: 12 80 00 70 bne 4000c594 <_Heap_Allocate_aligned_with_boundary+0x1e0> 4000c3d8: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000c3dc: 80 a4 00 12 cmp %l0, %l2 4000c3e0: 02 80 00 72 be 4000c5a8 <_Heap_Allocate_aligned_with_boundary+0x1f4> 4000c3e4: 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; 4000c3e8: 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; 4000c3ec: 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; 4000c3f0: 82 20 40 19 sub %g1, %i1, %g1 4000c3f4: 10 80 00 09 b 4000c418 <_Heap_Allocate_aligned_with_boundary+0x64> 4000c3f8: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 4000c3fc: 80 a6 20 00 cmp %i0, 0 4000c400: 32 80 00 57 bne,a 4000c55c <_Heap_Allocate_aligned_with_boundary+0x1a8> 4000c404: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 4000c408: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000c40c: 80 a4 00 12 cmp %l0, %l2 4000c410: 22 80 00 5a be,a 4000c578 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000c414: 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 ) { 4000c418: e6 04 a0 04 ld [ %l2 + 4 ], %l3 4000c41c: 80 a5 00 13 cmp %l4, %l3 4000c420: 1a bf ff fa bcc 4000c408 <_Heap_Allocate_aligned_with_boundary+0x54> 4000c424: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 4000c428: 80 a6 a0 00 cmp %i2, 0 4000c42c: 02 bf ff f4 be 4000c3fc <_Heap_Allocate_aligned_with_boundary+0x48> 4000c430: 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; 4000c434: 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; 4000c438: 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; 4000c43c: a6 0c ff fe and %l3, -2, %l3 4000c440: 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; 4000c444: 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; 4000c448: 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); 4000c44c: 90 10 00 18 mov %i0, %o0 4000c450: a6 00 40 13 add %g1, %l3, %l3 4000c454: 40 00 32 b8 call 40018f34 <.urem> 4000c458: 92 10 00 1a mov %i2, %o1 4000c45c: 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 ) { 4000c460: 80 a4 c0 18 cmp %l3, %i0 4000c464: 1a 80 00 06 bcc 4000c47c <_Heap_Allocate_aligned_with_boundary+0xc8> 4000c468: ac 04 a0 08 add %l2, 8, %l6 4000c46c: 90 10 00 13 mov %l3, %o0 4000c470: 40 00 32 b1 call 40018f34 <.urem> 4000c474: 92 10 00 1a mov %i2, %o1 4000c478: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4000c47c: 80 a6 e0 00 cmp %i3, 0 4000c480: 02 80 00 26 be 4000c518 <_Heap_Allocate_aligned_with_boundary+0x164> 4000c484: 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; 4000c488: a6 06 00 19 add %i0, %i1, %l3 4000c48c: 92 10 00 1b mov %i3, %o1 4000c490: 40 00 32 a9 call 40018f34 <.urem> 4000c494: 90 10 00 13 mov %l3, %o0 4000c498: 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 ) { 4000c49c: 80 a4 c0 08 cmp %l3, %o0 4000c4a0: 08 80 00 1e bleu 4000c518 <_Heap_Allocate_aligned_with_boundary+0x164> 4000c4a4: 80 a5 80 18 cmp %l6, %i0 4000c4a8: 80 a6 00 08 cmp %i0, %o0 4000c4ac: 1a 80 00 1b bcc 4000c518 <_Heap_Allocate_aligned_with_boundary+0x164> 4000c4b0: 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; 4000c4b4: 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 ) { 4000c4b8: 80 a5 40 08 cmp %l5, %o0 4000c4bc: 28 80 00 0a bleu,a 4000c4e4 <_Heap_Allocate_aligned_with_boundary+0x130> 4000c4c0: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 4000c4c4: 10 bf ff d2 b 4000c40c <_Heap_Allocate_aligned_with_boundary+0x58> 4000c4c8: 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 ) { 4000c4cc: 1a 80 00 13 bcc 4000c518 <_Heap_Allocate_aligned_with_boundary+0x164> 4000c4d0: 80 a5 80 18 cmp %l6, %i0 if ( boundary_line < boundary_floor ) { 4000c4d4: 80 a5 40 08 cmp %l5, %o0 4000c4d8: 38 bf ff cd bgu,a 4000c40c <_Heap_Allocate_aligned_with_boundary+0x58> 4000c4dc: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 4000c4e0: b0 22 00 19 sub %o0, %i1, %i0 4000c4e4: 92 10 00 1a mov %i2, %o1 4000c4e8: 40 00 32 93 call 40018f34 <.urem> 4000c4ec: 90 10 00 18 mov %i0, %o0 4000c4f0: 92 10 00 1b mov %i3, %o1 4000c4f4: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4000c4f8: a6 06 00 19 add %i0, %i1, %l3 4000c4fc: 40 00 32 8e call 40018f34 <.urem> 4000c500: 90 10 00 13 mov %l3, %o0 4000c504: 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 ) { 4000c508: 80 a4 c0 08 cmp %l3, %o0 4000c50c: 18 bf ff f0 bgu 4000c4cc <_Heap_Allocate_aligned_with_boundary+0x118> 4000c510: 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 ) { 4000c514: 80 a5 80 18 cmp %l6, %i0 4000c518: 18 bf ff bc bgu 4000c408 <_Heap_Allocate_aligned_with_boundary+0x54> 4000c51c: 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; 4000c520: 90 10 00 18 mov %i0, %o0 4000c524: a6 20 40 12 sub %g1, %l2, %l3 4000c528: 92 10 00 1d mov %i5, %o1 4000c52c: 40 00 32 82 call 40018f34 <.urem> 4000c530: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 4000c534: 90 a4 c0 08 subcc %l3, %o0, %o0 4000c538: 02 bf ff b2 be 4000c400 <_Heap_Allocate_aligned_with_boundary+0x4c> 4000c53c: 80 a6 20 00 cmp %i0, 0 4000c540: 80 a5 c0 08 cmp %l7, %o0 4000c544: 38 bf ff b2 bgu,a 4000c40c <_Heap_Allocate_aligned_with_boundary+0x58> 4000c548: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 4000c54c: 80 a6 20 00 cmp %i0, 0 4000c550: 22 bf ff af be,a 4000c40c <_Heap_Allocate_aligned_with_boundary+0x58> 4000c554: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000c558: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000c55c: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000c560: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000c564: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000c568: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000c56c: 90 10 00 10 mov %l0, %o0 4000c570: 7f ff e9 ba call 40006c58 <_Heap_Block_allocate> 4000c574: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4000c578: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 4000c57c: 80 a0 40 11 cmp %g1, %l1 4000c580: 1a 80 00 08 bcc 4000c5a0 <_Heap_Allocate_aligned_with_boundary+0x1ec> 4000c584: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000c588: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 4000c58c: 81 c7 e0 08 ret 4000c590: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4000c594: 08 80 00 07 bleu 4000c5b0 <_Heap_Allocate_aligned_with_boundary+0x1fc> 4000c598: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000c59c: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 4000c5a0: 81 c7 e0 08 ret 4000c5a4: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000c5a8: 10 bf ff f4 b 4000c578 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000c5ac: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4000c5b0: 22 bf ff 8b be,a 4000c3dc <_Heap_Allocate_aligned_with_boundary+0x28> 4000c5b4: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 4000c5b8: 10 bf ff 8a b 4000c3e0 <_Heap_Allocate_aligned_with_boundary+0x2c> 4000c5bc: 80 a4 00 12 cmp %l0, %l2 40007bdc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 40007bdc: 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; 40007be0: 25 10 00 20 sethi %hi(0x40008000), %l2 40007be4: 80 8e a0 ff btst 0xff, %i2 40007be8: a4 14 a1 dc or %l2, 0x1dc, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 40007bec: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 40007bf0: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 40007bf4: 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; 40007bf8: 12 80 00 04 bne 40007c08 <_Heap_Walk+0x2c> 40007bfc: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40007c00: 25 10 00 1e sethi %hi(0x40007800), %l2 40007c04: a4 14 a3 d4 or %l2, 0x3d4, %l2 ! 40007bd4 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 40007c08: 03 10 00 80 sethi %hi(0x40020000), %g1 40007c0c: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 ! 400202e0 <_System_state_Current> 40007c10: 80 a0 60 03 cmp %g1, 3 40007c14: 22 80 00 04 be,a 40007c24 <_Heap_Walk+0x48> 40007c18: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 40007c1c: 81 c7 e0 08 ret 40007c20: 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)( 40007c24: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40007c28: c4 06 20 08 ld [ %i0 + 8 ], %g2 40007c2c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40007c30: 90 10 00 19 mov %i1, %o0 40007c34: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 40007c38: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 40007c3c: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40007c40: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40007c44: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40007c48: 92 10 20 00 clr %o1 40007c4c: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007c50: 96 10 00 15 mov %l5, %o3 40007c54: 94 12 a1 38 or %o2, 0x138, %o2 40007c58: 9f c4 80 00 call %l2 40007c5c: 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 ) { 40007c60: 80 a5 60 00 cmp %l5, 0 40007c64: 02 80 00 36 be 40007d3c <_Heap_Walk+0x160> 40007c68: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 40007c6c: 12 80 00 3c bne 40007d5c <_Heap_Walk+0x180> 40007c70: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 40007c74: 7f ff e7 94 call 40001ac4 <.urem> 40007c78: 92 10 00 15 mov %l5, %o1 40007c7c: 80 a2 20 00 cmp %o0, 0 40007c80: 12 80 00 40 bne 40007d80 <_Heap_Walk+0x1a4> 40007c84: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 40007c88: 7f ff e7 8f call 40001ac4 <.urem> 40007c8c: 92 10 00 15 mov %l5, %o1 40007c90: 80 a2 20 00 cmp %o0, 0 40007c94: 32 80 00 44 bne,a 40007da4 <_Heap_Walk+0x1c8> 40007c98: 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; 40007c9c: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 40007ca0: ae 8d a0 01 andcc %l6, 1, %l7 40007ca4: 22 80 00 48 be,a 40007dc4 <_Heap_Walk+0x1e8> 40007ca8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 40007cac: d6 04 00 00 ld [ %l0 ], %o3 40007cb0: 80 a5 40 0b cmp %l5, %o3 40007cb4: 32 80 00 1a bne,a 40007d1c <_Heap_Walk+0x140> 40007cb8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 40007cbc: c2 05 20 04 ld [ %l4 + 4 ], %g1 40007cc0: 82 08 7f fe and %g1, -2, %g1 40007cc4: 82 05 00 01 add %l4, %g1, %g1 40007cc8: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007ccc: 80 88 60 01 btst 1, %g1 40007cd0: 22 80 01 23 be,a 4000815c <_Heap_Walk+0x580> 40007cd4: 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; 40007cd8: 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 ) { 40007cdc: 80 a6 00 11 cmp %i0, %l1 40007ce0: 02 80 00 6f be 40007e9c <_Heap_Walk+0x2c0> 40007ce4: 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; 40007ce8: 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 40007cec: 80 a7 00 11 cmp %i4, %l1 40007cf0: 28 80 00 3c bleu,a 40007de0 <_Heap_Walk+0x204> 40007cf4: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 40007cf8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007cfc: 96 10 00 11 mov %l1, %o3 40007d00: 92 10 20 01 mov 1, %o1 40007d04: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007d08: b0 10 20 00 clr %i0 40007d0c: 9f c4 80 00 call %l2 40007d10: 94 12 a2 e0 or %o2, 0x2e0, %o2 40007d14: 81 c7 e0 08 ret 40007d18: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 40007d1c: 98 10 00 15 mov %l5, %o4 40007d20: 92 10 20 01 mov 1, %o1 40007d24: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007d28: b0 10 20 00 clr %i0 40007d2c: 9f c4 80 00 call %l2 40007d30: 94 12 a2 98 or %o2, 0x298, %o2 40007d34: 81 c7 e0 08 ret 40007d38: 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" ); 40007d3c: 90 10 00 19 mov %i1, %o0 40007d40: 92 10 20 01 mov 1, %o1 40007d44: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007d48: b0 10 20 00 clr %i0 40007d4c: 9f c4 80 00 call %l2 40007d50: 94 12 a1 d0 or %o2, 0x1d0, %o2 40007d54: 81 c7 e0 08 ret 40007d58: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 40007d5c: 90 10 00 19 mov %i1, %o0 40007d60: 96 10 00 15 mov %l5, %o3 40007d64: 92 10 20 01 mov 1, %o1 40007d68: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007d6c: b0 10 20 00 clr %i0 40007d70: 9f c4 80 00 call %l2 40007d74: 94 12 a1 e8 or %o2, 0x1e8, %o2 40007d78: 81 c7 e0 08 ret 40007d7c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 40007d80: 90 10 00 19 mov %i1, %o0 40007d84: 96 10 00 13 mov %l3, %o3 40007d88: 92 10 20 01 mov 1, %o1 40007d8c: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007d90: b0 10 20 00 clr %i0 40007d94: 9f c4 80 00 call %l2 40007d98: 94 12 a2 08 or %o2, 0x208, %o2 40007d9c: 81 c7 e0 08 ret 40007da0: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 40007da4: 96 10 00 10 mov %l0, %o3 40007da8: 92 10 20 01 mov 1, %o1 40007dac: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007db0: b0 10 20 00 clr %i0 40007db4: 9f c4 80 00 call %l2 40007db8: 94 12 a2 30 or %o2, 0x230, %o2 40007dbc: 81 c7 e0 08 ret 40007dc0: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 40007dc4: 92 10 20 01 mov 1, %o1 40007dc8: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007dcc: b0 10 20 00 clr %i0 40007dd0: 9f c4 80 00 call %l2 40007dd4: 94 12 a2 68 or %o2, 0x268, %o2 40007dd8: 81 c7 e0 08 ret 40007ddc: 81 e8 00 00 restore 40007de0: 80 a6 c0 11 cmp %i3, %l1 40007de4: 0a bf ff c6 bcs 40007cfc <_Heap_Walk+0x120> 40007de8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 40007dec: 90 04 60 08 add %l1, 8, %o0 40007df0: 7f ff e7 35 call 40001ac4 <.urem> 40007df4: 92 10 00 1a mov %i2, %o1 40007df8: 80 a2 20 00 cmp %o0, 0 40007dfc: 12 80 00 df bne 40008178 <_Heap_Walk+0x59c> 40007e00: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40007e04: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007e08: 82 08 7f fe and %g1, -2, %g1 40007e0c: 82 04 40 01 add %l1, %g1, %g1 40007e10: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007e14: 80 88 60 01 btst 1, %g1 40007e18: 12 80 00 ea bne 400081c0 <_Heap_Walk+0x5e4> 40007e1c: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 40007e20: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40007e24: 80 a6 00 0c cmp %i0, %o4 40007e28: 02 80 00 19 be 40007e8c <_Heap_Walk+0x2b0> 40007e2c: ba 10 00 11 mov %l1, %i5 40007e30: 30 80 00 dc b,a 400081a0 <_Heap_Walk+0x5c4> <== NOT EXECUTED 40007e34: 0a bf ff b2 bcs 40007cfc <_Heap_Walk+0x120> 40007e38: 90 10 00 19 mov %i1, %o0 40007e3c: 80 a6 c0 11 cmp %i3, %l1 40007e40: 0a bf ff b0 bcs 40007d00 <_Heap_Walk+0x124> 40007e44: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 40007e48: 90 04 60 08 add %l1, 8, %o0 40007e4c: 7f ff e7 1e call 40001ac4 <.urem> 40007e50: 92 10 00 1a mov %i2, %o1 40007e54: 80 a2 20 00 cmp %o0, 0 40007e58: 32 80 00 c8 bne,a 40008178 <_Heap_Walk+0x59c> 40007e5c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40007e60: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007e64: 82 08 7f fe and %g1, -2, %g1 40007e68: 82 00 40 11 add %g1, %l1, %g1 40007e6c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007e70: 80 88 60 01 btst 1, %g1 40007e74: 32 80 00 d2 bne,a 400081bc <_Heap_Walk+0x5e0> 40007e78: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 40007e7c: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40007e80: 80 a3 00 1d cmp %o4, %i5 40007e84: 12 80 00 c5 bne 40008198 <_Heap_Walk+0x5bc> 40007e88: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 40007e8c: 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 ) { 40007e90: 80 a6 00 11 cmp %i0, %l1 40007e94: 12 bf ff e8 bne 40007e34 <_Heap_Walk+0x258> 40007e98: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40007e9c: 80 a5 00 10 cmp %l4, %l0 40007ea0: 02 bf ff 5f be 40007c1c <_Heap_Walk+0x40> 40007ea4: 37 10 00 75 sethi %hi(0x4001d400), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007ea8: 35 10 00 75 sethi %hi(0x4001d400), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007eac: 39 10 00 76 sethi %hi(0x4001d800), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007eb0: 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)( 40007eb4: b6 16 e3 88 or %i3, 0x388, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007eb8: b4 16 a3 a0 or %i2, 0x3a0, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007ebc: b8 17 21 38 or %i4, 0x138, %i4 40007ec0: 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; 40007ec4: 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 ) { 40007ec8: 80 a5 e0 00 cmp %l7, 0 40007ecc: 02 80 00 16 be 40007f24 <_Heap_Walk+0x348> 40007ed0: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 40007ed4: 90 10 00 19 mov %i1, %o0 40007ed8: 92 10 20 00 clr %o1 40007edc: 94 10 00 1b mov %i3, %o2 40007ee0: 96 10 00 10 mov %l0, %o3 40007ee4: 9f c4 80 00 call %l2 40007ee8: 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 40007eec: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40007ef0: 80 a0 40 11 cmp %g1, %l1 40007ef4: 28 80 00 18 bleu,a 40007f54 <_Heap_Walk+0x378> 40007ef8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 40007efc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007f00: 96 10 00 10 mov %l0, %o3 40007f04: 98 10 00 11 mov %l1, %o4 40007f08: 92 10 20 01 mov 1, %o1 40007f0c: 15 10 00 75 sethi %hi(0x4001d400), %o2 40007f10: b0 10 20 00 clr %i0 40007f14: 9f c4 80 00 call %l2 40007f18: 94 12 a3 c8 or %o2, 0x3c8, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 40007f1c: 81 c7 e0 08 ret 40007f20: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007f24: da 04 00 00 ld [ %l0 ], %o5 40007f28: 90 10 00 19 mov %i1, %o0 40007f2c: 92 10 20 00 clr %o1 40007f30: 94 10 00 1a mov %i2, %o2 40007f34: 96 10 00 10 mov %l0, %o3 40007f38: 9f c4 80 00 call %l2 40007f3c: 98 10 00 16 mov %l6, %o4 40007f40: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40007f44: 80 a0 40 11 cmp %g1, %l1 40007f48: 18 bf ff ee bgu 40007f00 <_Heap_Walk+0x324> 40007f4c: 90 10 00 19 mov %i1, %o0 40007f50: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40007f54: 80 a0 40 11 cmp %g1, %l1 40007f58: 0a bf ff ea bcs 40007f00 <_Heap_Walk+0x324> 40007f5c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 40007f60: 90 10 00 16 mov %l6, %o0 40007f64: 7f ff e6 d8 call 40001ac4 <.urem> 40007f68: 92 10 00 1d mov %i5, %o1 40007f6c: 80 a2 20 00 cmp %o0, 0 40007f70: 12 80 00 5d bne 400080e4 <_Heap_Walk+0x508> 40007f74: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 40007f78: 18 80 00 65 bgu 4000810c <_Heap_Walk+0x530> 40007f7c: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 40007f80: 3a 80 00 6e bcc,a 40008138 <_Heap_Walk+0x55c> 40007f84: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 40007f88: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007f8c: 80 88 60 01 btst 1, %g1 40007f90: 12 80 00 40 bne 40008090 <_Heap_Walk+0x4b4> 40007f94: 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; 40007f98: 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)( 40007f9c: 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; 40007fa0: 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; 40007fa4: 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; 40007fa8: 1b 10 00 76 sethi %hi(0x4001d800), %o5 40007fac: 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; 40007fb0: 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); 40007fb4: 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; 40007fb8: 02 80 00 07 be 40007fd4 <_Heap_Walk+0x3f8> 40007fbc: 9a 13 60 90 or %o5, 0x90, %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)" : ""), 40007fc0: 1b 10 00 76 sethi %hi(0x4001d800), %o5 40007fc4: 80 a3 00 18 cmp %o4, %i0 40007fc8: 02 80 00 03 be 40007fd4 <_Heap_Walk+0x3f8> 40007fcc: 9a 13 60 a0 or %o5, 0xa0, %o5 40007fd0: 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)( 40007fd4: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007fd8: 05 10 00 76 sethi %hi(0x4001d800), %g2 40007fdc: 80 a0 c0 01 cmp %g3, %g1 40007fe0: 02 80 00 07 be 40007ffc <_Heap_Walk+0x420> 40007fe4: 84 10 a0 b0 or %g2, 0xb0, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007fe8: 05 10 00 76 sethi %hi(0x4001d800), %g2 40007fec: 80 a0 40 18 cmp %g1, %i0 40007ff0: 02 80 00 03 be 40007ffc <_Heap_Walk+0x420> 40007ff4: 84 10 a0 c0 or %g2, 0xc0, %g2 40007ff8: 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)( 40007ffc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008000: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 40008004: 90 10 00 19 mov %i1, %o0 40008008: 92 10 20 00 clr %o1 4000800c: 15 10 00 76 sethi %hi(0x4001d800), %o2 40008010: 96 10 00 10 mov %l0, %o3 40008014: 9f c4 80 00 call %l2 40008018: 94 12 a0 d0 or %o2, 0xd0, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 4000801c: da 05 c0 00 ld [ %l7 ], %o5 40008020: 80 a5 80 0d cmp %l6, %o5 40008024: 02 80 00 0c be 40008054 <_Heap_Walk+0x478> 40008028: 90 10 00 19 mov %i1, %o0 (*printer)( 4000802c: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 40008030: 96 10 00 10 mov %l0, %o3 40008034: 98 10 00 16 mov %l6, %o4 40008038: 92 10 20 01 mov 1, %o1 4000803c: 15 10 00 76 sethi %hi(0x4001d800), %o2 40008040: b0 10 20 00 clr %i0 40008044: 9f c4 80 00 call %l2 40008048: 94 12 a1 00 or %o2, 0x100, %o2 4000804c: 81 c7 e0 08 ret 40008050: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 40008054: 80 8d 20 01 btst 1, %l4 40008058: 02 80 00 1c be 400080c8 <_Heap_Walk+0x4ec> 4000805c: 96 10 00 10 mov %l0, %o3 40008060: 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 ) { 40008064: 80 a0 40 18 cmp %g1, %i0 40008068: 12 80 00 07 bne 40008084 <_Heap_Walk+0x4a8> 4000806c: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40008070: 10 80 00 0f b 400080ac <_Heap_Walk+0x4d0> <== NOT EXECUTED 40008074: 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 ) { 40008078: 80 a0 40 18 cmp %g1, %i0 4000807c: 02 80 00 0a be 400080a4 <_Heap_Walk+0x4c8> 40008080: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 40008084: 32 bf ff fd bne,a 40008078 <_Heap_Walk+0x49c> 40008088: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 4000808c: 80 a5 40 11 cmp %l5, %l1 40008090: 02 bf fe e3 be 40007c1c <_Heap_Walk+0x40> 40008094: 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 ) { 40008098: ec 04 60 04 ld [ %l1 + 4 ], %l6 4000809c: 10 bf ff 8a b 40007ec4 <_Heap_Walk+0x2e8> 400080a0: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 400080a4: 90 10 00 19 mov %i1, %o0 400080a8: 96 10 00 10 mov %l0, %o3 400080ac: 92 10 20 01 mov 1, %o1 400080b0: 15 10 00 76 sethi %hi(0x4001d800), %o2 400080b4: b0 10 20 00 clr %i0 400080b8: 9f c4 80 00 call %l2 400080bc: 94 12 a1 70 or %o2, 0x170, %o2 400080c0: 81 c7 e0 08 ret 400080c4: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 400080c8: 92 10 20 01 mov 1, %o1 400080cc: 15 10 00 76 sethi %hi(0x4001d800), %o2 400080d0: b0 10 20 00 clr %i0 400080d4: 9f c4 80 00 call %l2 400080d8: 94 12 a1 40 or %o2, 0x140, %o2 400080dc: 81 c7 e0 08 ret 400080e0: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 400080e4: 90 10 00 19 mov %i1, %o0 400080e8: 96 10 00 10 mov %l0, %o3 400080ec: 98 10 00 16 mov %l6, %o4 400080f0: 92 10 20 01 mov 1, %o1 400080f4: 15 10 00 75 sethi %hi(0x4001d400), %o2 400080f8: b0 10 20 00 clr %i0 400080fc: 9f c4 80 00 call %l2 40008100: 94 12 a3 f8 or %o2, 0x3f8, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 40008104: 81 c7 e0 08 ret 40008108: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 4000810c: 90 10 00 19 mov %i1, %o0 40008110: 96 10 00 10 mov %l0, %o3 40008114: 98 10 00 16 mov %l6, %o4 40008118: 9a 10 00 13 mov %l3, %o5 4000811c: 92 10 20 01 mov 1, %o1 40008120: 15 10 00 76 sethi %hi(0x4001d800), %o2 40008124: b0 10 20 00 clr %i0 40008128: 9f c4 80 00 call %l2 4000812c: 94 12 a0 28 or %o2, 0x28, %o2 block, block_size, min_block_size ); return false; 40008130: 81 c7 e0 08 ret 40008134: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 40008138: 96 10 00 10 mov %l0, %o3 4000813c: 98 10 00 11 mov %l1, %o4 40008140: 92 10 20 01 mov 1, %o1 40008144: 15 10 00 76 sethi %hi(0x4001d800), %o2 40008148: b0 10 20 00 clr %i0 4000814c: 9f c4 80 00 call %l2 40008150: 94 12 a0 58 or %o2, 0x58, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 40008154: 81 c7 e0 08 ret 40008158: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 4000815c: 92 10 20 01 mov 1, %o1 40008160: 15 10 00 75 sethi %hi(0x4001d400), %o2 40008164: b0 10 20 00 clr %i0 40008168: 9f c4 80 00 call %l2 4000816c: 94 12 a2 c8 or %o2, 0x2c8, %o2 40008170: 81 c7 e0 08 ret 40008174: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 40008178: 96 10 00 11 mov %l1, %o3 4000817c: 92 10 20 01 mov 1, %o1 40008180: 15 10 00 75 sethi %hi(0x4001d400), %o2 40008184: b0 10 20 00 clr %i0 40008188: 9f c4 80 00 call %l2 4000818c: 94 12 a3 00 or %o2, 0x300, %o2 40008190: 81 c7 e0 08 ret 40008194: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 40008198: 90 10 00 19 mov %i1, %o0 4000819c: 96 10 00 11 mov %l1, %o3 400081a0: 92 10 20 01 mov 1, %o1 400081a4: 15 10 00 75 sethi %hi(0x4001d400), %o2 400081a8: b0 10 20 00 clr %i0 400081ac: 9f c4 80 00 call %l2 400081b0: 94 12 a3 50 or %o2, 0x350, %o2 400081b4: 81 c7 e0 08 ret 400081b8: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 400081bc: 96 10 00 11 mov %l1, %o3 400081c0: 92 10 20 01 mov 1, %o1 400081c4: 15 10 00 75 sethi %hi(0x4001d400), %o2 400081c8: b0 10 20 00 clr %i0 400081cc: 9f c4 80 00 call %l2 400081d0: 94 12 a3 30 or %o2, 0x330, %o2 400081d4: 81 c7 e0 08 ret 400081d8: 81 e8 00 00 restore 40006f18 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40006f18: 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 ) 40006f1c: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 40006f20: 80 a5 20 00 cmp %l4, 0 40006f24: 02 80 00 ab be 400071d0 <_Objects_Extend_information+0x2b8> 40006f28: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 40006f2c: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40006f30: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 40006f34: ab 2d 60 10 sll %l5, 0x10, %l5 40006f38: 92 10 00 12 mov %l2, %o1 40006f3c: 40 00 47 52 call 40018c84 <.udiv> 40006f40: 91 35 60 10 srl %l5, 0x10, %o0 40006f44: 91 2a 20 10 sll %o0, 0x10, %o0 40006f48: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 40006f4c: 80 a7 20 00 cmp %i4, 0 40006f50: 02 80 00 a7 be 400071ec <_Objects_Extend_information+0x2d4> 40006f54: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 40006f58: c2 05 00 00 ld [ %l4 ], %g1 40006f5c: 80 a0 60 00 cmp %g1, 0 40006f60: 02 80 00 a4 be 400071f0 <_Objects_Extend_information+0x2d8> 40006f64: a2 10 00 13 mov %l3, %l1 40006f68: 10 80 00 06 b 40006f80 <_Objects_Extend_information+0x68> 40006f6c: a0 10 20 00 clr %l0 40006f70: c2 05 00 01 ld [ %l4 + %g1 ], %g1 40006f74: 80 a0 60 00 cmp %g1, 0 40006f78: 22 80 00 08 be,a 40006f98 <_Objects_Extend_information+0x80> 40006f7c: 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++ ) { 40006f80: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40006f84: 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++ ) { 40006f88: 80 a7 00 10 cmp %i4, %l0 40006f8c: 18 bf ff f9 bgu 40006f70 <_Objects_Extend_information+0x58> 40006f90: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40006f94: 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 ) { 40006f98: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40006f9c: 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 ) { 40006fa0: 82 10 63 ff or %g1, 0x3ff, %g1 40006fa4: 80 a5 40 01 cmp %l5, %g1 40006fa8: 18 80 00 96 bgu 40007200 <_Objects_Extend_information+0x2e8> 40006fac: 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; 40006fb0: 40 00 46 fb call 40018b9c <.umul> 40006fb4: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 40006fb8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006fbc: 80 a0 60 00 cmp %g1, 0 40006fc0: 12 80 00 6d bne 40007174 <_Objects_Extend_information+0x25c> 40006fc4: 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 ); 40006fc8: 40 00 08 bd call 400092bc <_Workspace_Allocate_or_fatal_error> 40006fcc: 01 00 00 00 nop 40006fd0: 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 ) { 40006fd4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006fd8: 80 a4 40 01 cmp %l1, %g1 40006fdc: 2a 80 00 43 bcs,a 400070e8 <_Objects_Extend_information+0x1d0> 40006fe0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 40006fe4: 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 ); 40006fe8: 91 2d 20 01 sll %l4, 1, %o0 40006fec: 90 02 00 14 add %o0, %l4, %o0 40006ff0: 90 05 40 08 add %l5, %o0, %o0 40006ff4: 90 02 00 13 add %o0, %l3, %o0 40006ff8: 40 00 08 c0 call 400092f8 <_Workspace_Allocate> 40006ffc: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 40007000: ac 92 20 00 orcc %o0, 0, %l6 40007004: 02 80 00 7d be 400071f8 <_Objects_Extend_information+0x2e0> 40007008: 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 ) { 4000700c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007010: 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); 40007014: ae 05 80 14 add %l6, %l4, %l7 40007018: 0a 80 00 5e bcs 40007190 <_Objects_Extend_information+0x278> 4000701c: 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++ ) { 40007020: 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, 40007024: 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++ ) { 40007028: 02 80 00 08 be 40007048 <_Objects_Extend_information+0x130> 4000702c: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 40007030: 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++ ) { 40007034: 82 00 60 01 inc %g1 40007038: 80 a4 c0 01 cmp %l3, %g1 4000703c: 18 bf ff fd bgu 40007030 <_Objects_Extend_information+0x118> 40007040: c0 20 80 14 clr [ %g2 + %l4 ] 40007044: 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 ); 40007048: 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; 4000704c: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007050: 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 ; 40007054: 80 a4 40 03 cmp %l1, %g3 40007058: 1a 80 00 0a bcc 40007080 <_Objects_Extend_information+0x168> 4000705c: c0 25 80 1d clr [ %l6 + %i5 ] 40007060: 85 2c 60 02 sll %l1, 2, %g2 40007064: 82 10 00 11 mov %l1, %g1 40007068: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 4000706c: 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++ ) { 40007070: 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 ; 40007074: 80 a0 40 03 cmp %g1, %g3 40007078: 0a bf ff fd bcs 4000706c <_Objects_Extend_information+0x154> 4000707c: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40007080: 7f ff eb 17 call 40001cdc 40007084: 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( 40007088: c6 06 00 00 ld [ %i0 ], %g3 4000708c: 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; 40007090: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40007094: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40007098: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 4000709c: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 400070a0: 87 28 e0 18 sll %g3, 0x18, %g3 400070a4: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 400070a8: 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( 400070ac: ab 2d 60 10 sll %l5, 0x10, %l5 400070b0: 03 00 00 40 sethi %hi(0x10000), %g1 400070b4: ab 35 60 10 srl %l5, 0x10, %l5 400070b8: 82 10 c0 01 or %g3, %g1, %g1 400070bc: 82 10 40 02 or %g1, %g2, %g1 400070c0: 82 10 40 15 or %g1, %l5, %g1 400070c4: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 400070c8: 7f ff eb 09 call 40001cec 400070cc: 01 00 00 00 nop if ( old_tables ) 400070d0: 80 a4 e0 00 cmp %l3, 0 400070d4: 22 80 00 05 be,a 400070e8 <_Objects_Extend_information+0x1d0> 400070d8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 400070dc: 40 00 08 90 call 4000931c <_Workspace_Free> 400070e0: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 400070e4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 400070e8: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 400070ec: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 400070f0: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 400070f4: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400070f8: 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; 400070fc: 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( 40007100: 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( 40007104: a4 07 bf f4 add %fp, -12, %l2 40007108: 40 00 14 00 call 4000c108 <_Chain_Initialize> 4000710c: 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 ) { 40007110: 30 80 00 0c b,a 40007140 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 40007114: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40007118: 83 28 60 18 sll %g1, 0x18, %g1 4000711c: 85 28 a0 1b sll %g2, 0x1b, %g2 40007120: 82 10 40 14 or %g1, %l4, %g1 40007124: 82 10 40 02 or %g1, %g2, %g1 40007128: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4000712c: 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( 40007130: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40007134: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007138: 7f ff fc e2 call 400064c0 <_Chain_Append> 4000713c: 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 ) { 40007140: 40 00 13 df call 4000c0bc <_Chain_Get> 40007144: 90 10 00 12 mov %l2, %o0 40007148: 80 a2 20 00 cmp %o0, 0 4000714c: 32 bf ff f2 bne,a 40007114 <_Objects_Extend_information+0x1fc> 40007150: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 40007154: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007158: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 4000715c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 40007160: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007164: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 40007168: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 4000716c: 81 c7 e0 08 ret 40007170: 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 ); 40007174: 40 00 08 61 call 400092f8 <_Workspace_Allocate> 40007178: 01 00 00 00 nop if ( !new_object_block ) 4000717c: a4 92 20 00 orcc %o0, 0, %l2 40007180: 32 bf ff 96 bne,a 40006fd8 <_Objects_Extend_information+0xc0> 40007184: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007188: 81 c7 e0 08 ret 4000718c: 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, 40007190: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 40007194: 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, 40007198: 40 00 23 65 call 4000ff2c 4000719c: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 400071a0: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 400071a4: 94 10 00 1d mov %i5, %o2 400071a8: 40 00 23 61 call 4000ff2c 400071ac: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 400071b0: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 400071b4: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 400071b8: 94 04 c0 0a add %l3, %o2, %o2 400071bc: 90 10 00 14 mov %l4, %o0 400071c0: 40 00 23 5b call 4000ff2c 400071c4: 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 ); 400071c8: 10 bf ff a1 b 4000704c <_Objects_Extend_information+0x134> 400071cc: 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 ) 400071d0: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 400071d4: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 400071d8: ab 2d 60 10 sll %l5, 0x10, %l5 400071dc: a2 10 00 13 mov %l3, %l1 400071e0: a0 10 20 00 clr %l0 400071e4: 10 bf ff 6c b 40006f94 <_Objects_Extend_information+0x7c> 400071e8: 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 ) 400071ec: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 400071f0: 10 bf ff 69 b 40006f94 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 400071f4: 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 ); 400071f8: 40 00 08 49 call 4000931c <_Workspace_Free> 400071fc: 90 10 00 12 mov %l2, %o0 return; 40007200: 81 c7 e0 08 ret 40007204: 81 e8 00 00 restore 40007620 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40007620: 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 ); 40007624: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 40007628: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 4000762c: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40007630: 92 10 00 11 mov %l1, %o1 40007634: 40 00 45 94 call 40018c84 <.udiv> 40007638: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 4000763c: 80 a2 20 00 cmp %o0, 0 40007640: 02 80 00 12 be 40007688 <_Objects_Shrink_information+0x68> 40007644: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 40007648: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 4000764c: c4 00 c0 00 ld [ %g3 ], %g2 40007650: 80 a4 40 02 cmp %l1, %g2 40007654: 12 80 00 09 bne 40007678 <_Objects_Shrink_information+0x58> 40007658: 82 10 20 00 clr %g1 4000765c: 10 80 00 0d b 40007690 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 40007660: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 40007664: 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 ] == 40007668: 80 a4 40 02 cmp %l1, %g2 4000766c: 02 80 00 09 be 40007690 <_Objects_Shrink_information+0x70> 40007670: 84 04 a0 04 add %l2, 4, %g2 40007674: 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++ ) { 40007678: 82 00 60 01 inc %g1 4000767c: 80 a2 00 01 cmp %o0, %g1 40007680: 38 bf ff f9 bgu,a 40007664 <_Objects_Shrink_information+0x44> 40007684: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 40007688: 81 c7 e0 08 ret 4000768c: 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; 40007690: 10 80 00 06 b 400076a8 <_Objects_Shrink_information+0x88> 40007694: 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 ); 40007698: 80 a4 60 00 cmp %l1, 0 4000769c: 22 80 00 12 be,a 400076e4 <_Objects_Shrink_information+0xc4> 400076a0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400076a4: 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 ); 400076a8: 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) && 400076ac: 80 a0 40 10 cmp %g1, %l0 400076b0: 0a bf ff fa bcs 40007698 <_Objects_Shrink_information+0x78> 400076b4: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 400076b8: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 400076bc: 84 04 00 02 add %l0, %g2, %g2 400076c0: 80 a0 40 02 cmp %g1, %g2 400076c4: 1a bf ff f6 bcc 4000769c <_Objects_Shrink_information+0x7c> 400076c8: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 400076cc: 40 00 12 72 call 4000c094 <_Chain_Extract> 400076d0: 01 00 00 00 nop } } while ( the_object ); 400076d4: 80 a4 60 00 cmp %l1, 0 400076d8: 12 bf ff f4 bne 400076a8 <_Objects_Shrink_information+0x88> 400076dc: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 400076e0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 400076e4: 40 00 07 0e call 4000931c <_Workspace_Free> 400076e8: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400076ec: 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; 400076f0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 400076f4: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 400076f8: 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; 400076fc: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 40007700: 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; 40007704: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007708: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 4000770c: 81 c7 e0 08 ret 40007710: 81 e8 00 00 restore 40005c90 <_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) { 40005c90: 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; 40005c94: c4 06 60 68 ld [ %i1 + 0x68 ], %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40005c98: 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; 40005c9c: 84 00 a0 01 inc %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40005ca0: 80 a0 60 00 cmp %g1, 0 40005ca4: 12 80 00 0e bne 40005cdc <_POSIX_Timer_TSR+0x4c> 40005ca8: c4 26 60 68 st %g2, [ %i1 + 0x68 ] ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 40005cac: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 40005cb0: 80 a0 60 00 cmp %g1, 0 40005cb4: 32 80 00 0b bne,a 40005ce0 <_POSIX_Timer_TSR+0x50> 40005cb8: 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; 40005cbc: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 40005cc0: 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 ) ) { 40005cc4: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 40005cc8: 40 00 19 98 call 4000c328 40005ccc: 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; 40005cd0: c0 26 60 68 clr [ %i1 + 0x68 ] 40005cd4: 81 c7 e0 08 ret 40005cd8: 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( 40005cdc: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 40005ce0: d4 06 60 08 ld [ %i1 + 8 ], %o2 40005ce4: 90 06 60 10 add %i1, 0x10, %o0 40005ce8: 17 10 00 17 sethi %hi(0x40005c00), %o3 40005cec: 98 10 00 19 mov %i1, %o4 40005cf0: 40 00 1a b3 call 4000c7bc <_POSIX_Timer_Insert_helper> 40005cf4: 96 12 e0 90 or %o3, 0x90, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 40005cf8: 80 8a 20 ff btst 0xff, %o0 40005cfc: 02 bf ff f6 be 40005cd4 <_POSIX_Timer_TSR+0x44> 40005d00: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 40005d04: 40 00 05 da call 4000746c <_TOD_Get> 40005d08: 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; 40005d0c: 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 ) || 40005d10: 10 bf ff ed b 40005cc4 <_POSIX_Timer_TSR+0x34> 40005d14: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000f260 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 4000f260: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4000f264: 7f ff ca 9e call 40001cdc 4000f268: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000f26c: 85 2e 20 04 sll %i0, 4, %g2 4000f270: 83 2e 20 02 sll %i0, 2, %g1 4000f274: 82 20 80 01 sub %g2, %g1, %g1 4000f278: 05 10 00 77 sethi %hi(0x4001dc00), %g2 4000f27c: 84 10 a2 e4 or %g2, 0x2e4, %g2 ! 4001dee4 <_POSIX_signals_Vectors> 4000f280: c4 00 80 01 ld [ %g2 + %g1 ], %g2 4000f284: 80 a0 a0 02 cmp %g2, 2 4000f288: 02 80 00 11 be 4000f2cc <_POSIX_signals_Clear_process_signals+0x6c> 4000f28c: 05 10 00 78 sethi %hi(0x4001e000), %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4000f290: 05 10 00 78 sethi %hi(0x4001e000), %g2 4000f294: c6 00 a0 b0 ld [ %g2 + 0xb0 ], %g3 ! 4001e0b0 <_POSIX_signals_Pending> 4000f298: b0 06 3f ff add %i0, -1, %i0 4000f29c: 82 10 20 01 mov 1, %g1 4000f2a0: 83 28 40 18 sll %g1, %i0, %g1 4000f2a4: 82 28 c0 01 andn %g3, %g1, %g1 if ( !_POSIX_signals_Pending ) 4000f2a8: 80 a0 60 00 cmp %g1, 0 4000f2ac: 12 80 00 06 bne 4000f2c4 <_POSIX_signals_Clear_process_signals+0x64> 4000f2b0: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] _Thread_Do_post_task_switch_extension--; 4000f2b4: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000f2b8: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 4001d9f0 <_Thread_Do_post_task_switch_extension> 4000f2bc: 84 00 bf ff add %g2, -1, %g2 4000f2c0: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] } _ISR_Enable( level ); 4000f2c4: 7f ff ca 8a call 40001cec 4000f2c8: 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 ] ) ) 4000f2cc: 84 10 a0 b4 or %g2, 0xb4, %g2 4000f2d0: c6 00 40 02 ld [ %g1 + %g2 ], %g3 4000f2d4: 82 00 40 02 add %g1, %g2, %g1 4000f2d8: 82 00 60 04 add %g1, 4, %g1 4000f2dc: 80 a0 c0 01 cmp %g3, %g1 4000f2e0: 02 bf ff ed be 4000f294 <_POSIX_signals_Clear_process_signals+0x34> 4000f2e4: 05 10 00 78 sethi %hi(0x4001e000), %g2 if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 4000f2e8: 7f ff ca 81 call 40001cec <== NOT EXECUTED 4000f2ec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000f2f0: 01 00 00 00 nop 4000f334 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4000f334: 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 ) ) { 4000f338: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000f33c: 05 04 00 20 sethi %hi(0x10008000), %g2 4000f340: 88 06 7f ff add %i1, -1, %g4 4000f344: 9a 08 40 02 and %g1, %g2, %o5 4000f348: 86 10 20 01 mov 1, %g3 4000f34c: 80 a3 40 02 cmp %o5, %g2 4000f350: 89 28 c0 04 sll %g3, %g4, %g4 4000f354: 02 80 00 25 be 4000f3e8 <_POSIX_signals_Unblock_thread+0xb4> 4000f358: c4 06 21 60 ld [ %i0 + 0x160 ], %g2 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 4000f35c: c4 00 a0 c4 ld [ %g2 + 0xc4 ], %g2 4000f360: 80 a9 00 02 andncc %g4, %g2, %g0 4000f364: 02 80 00 1f be 4000f3e0 <_POSIX_signals_Unblock_thread+0xac> 4000f368: 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 ) { 4000f36c: 80 88 40 02 btst %g1, %g2 4000f370: 02 80 00 11 be 4000f3b4 <_POSIX_signals_Unblock_thread+0x80> 4000f374: c6 2e 20 74 stb %g3, [ %i0 + 0x74 ] the_thread->Wait.return_code = EINTR; 4000f378: 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) ){ 4000f37c: 80 88 60 08 btst 8, %g1 4000f380: 02 80 00 18 be 4000f3e0 <_POSIX_signals_Unblock_thread+0xac> 4000f384: c4 26 20 34 st %g2, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000f388: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000f38c: 80 a0 60 02 cmp %g1, 2 4000f390: 02 80 00 36 be 4000f468 <_POSIX_signals_Unblock_thread+0x134> 4000f394: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000f398: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000f39c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000f3a0: b0 10 20 00 clr %i0 4000f3a4: 7f ff e1 79 call 40007988 <_Thread_Clear_state> 4000f3a8: 92 12 63 f8 or %o1, 0x3f8, %o1 4000f3ac: 81 c7 e0 08 ret 4000f3b0: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 4000f3b4: 80 a0 60 00 cmp %g1, 0 4000f3b8: 12 80 00 0a bne 4000f3e0 <_POSIX_signals_Unblock_thread+0xac> 4000f3bc: 03 10 00 76 sethi %hi(0x4001d800), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4000f3c0: c2 00 61 e8 ld [ %g1 + 0x1e8 ], %g1 ! 4001d9e8 <_ISR_Nest_level> 4000f3c4: 80 a0 60 00 cmp %g1, 0 4000f3c8: 02 80 00 06 be 4000f3e0 <_POSIX_signals_Unblock_thread+0xac> 4000f3cc: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000f3d0: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001da0c <_Thread_Executing> 4000f3d4: 80 a6 00 01 cmp %i0, %g1 4000f3d8: 02 80 00 21 be 4000f45c <_POSIX_signals_Unblock_thread+0x128> 4000f3dc: 03 10 00 76 sethi %hi(0x4001d800), %g1 _ISR_Signals_to_thread_executing = true; } } return false; } 4000f3e0: 81 c7 e0 08 ret 4000f3e4: 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) ) { 4000f3e8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000f3ec: 80 89 00 01 btst %g4, %g1 4000f3f0: 22 80 00 12 be,a 4000f438 <_POSIX_signals_Unblock_thread+0x104> 4000f3f4: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 the_thread->Wait.return_code = EINTR; 4000f3f8: 82 10 20 04 mov 4, %g1 4000f3fc: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4000f400: 80 a6 a0 00 cmp %i2, 0 4000f404: 02 80 00 11 be 4000f448 <_POSIX_signals_Unblock_thread+0x114> 4000f408: 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; 4000f40c: c4 06 80 00 ld [ %i2 ], %g2 4000f410: c4 20 40 00 st %g2, [ %g1 ] 4000f414: c4 06 a0 04 ld [ %i2 + 4 ], %g2 4000f418: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000f41c: c4 06 a0 08 ld [ %i2 + 8 ], %g2 4000f420: c4 20 60 08 st %g2, [ %g1 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 4000f424: 90 10 00 18 mov %i0, %o0 4000f428: 7f ff e4 4c call 40008558 <_Thread_queue_Extract_with_proxy> 4000f42c: b0 10 20 01 mov 1, %i0 return true; 4000f430: 81 c7 e0 08 ret 4000f434: 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) ) { 4000f438: 80 a9 00 01 andncc %g4, %g1, %g0 4000f43c: 12 bf ff f0 bne 4000f3fc <_POSIX_signals_Unblock_thread+0xc8> 4000f440: 82 10 20 04 mov 4, %g1 4000f444: 30 bf ff e7 b,a 4000f3e0 <_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; 4000f448: 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; 4000f44c: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 4000f450: 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; 4000f454: 10 bf ff f4 b 4000f424 <_POSIX_signals_Unblock_thread+0xf0> 4000f458: 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; 4000f45c: c6 28 62 a8 stb %g3, [ %g1 + 0x2a8 ] 4000f460: 81 c7 e0 08 ret 4000f464: 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 ); 4000f468: 7f ff e7 35 call 4000913c <_Watchdog_Remove> 4000f46c: 90 06 20 48 add %i0, 0x48, %o0 4000f470: 10 bf ff cb b 4000f39c <_POSIX_signals_Unblock_thread+0x68> 4000f474: 90 10 00 18 mov %i0, %o0 40007778 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 40007778: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 4000777c: 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 ); 40007780: 40 00 04 4d call 400088b4 <_Thread_Set_transient> 40007784: 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 ) 40007788: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000778c: 80 a0 40 19 cmp %g1, %i1 40007790: 02 80 00 05 be 400077a4 <_Thread_Change_priority+0x2c> 40007794: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 40007798: 92 10 00 19 mov %i1, %o1 4000779c: 40 00 03 ca call 400086c4 <_Thread_Set_priority> 400077a0: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 400077a4: 7f ff e9 4e call 40001cdc 400077a8: 01 00 00 00 nop 400077ac: 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; 400077b0: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 400077b4: 80 a4 a0 04 cmp %l2, 4 400077b8: 02 80 00 18 be 40007818 <_Thread_Change_priority+0xa0> 400077bc: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 400077c0: 02 80 00 0b be 400077ec <_Thread_Change_priority+0x74> 400077c4: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 400077c8: 7f ff e9 49 call 40001cec <== NOT EXECUTED 400077cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 400077d0: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 400077d4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 400077d8: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 400077dc: 32 80 00 0d bne,a 40007810 <_Thread_Change_priority+0x98> <== NOT EXECUTED 400077e0: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 400077e4: 81 c7 e0 08 ret 400077e8: 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 ); 400077ec: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 400077f0: 7f ff e9 3f call 40001cec 400077f4: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 400077f8: 03 00 00 ef sethi %hi(0x3bc00), %g1 400077fc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40007800: 80 8c 80 01 btst %l2, %g1 40007804: 02 bf ff f8 be 400077e4 <_Thread_Change_priority+0x6c> 40007808: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 4000780c: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 40007810: 40 00 03 7d call 40008604 <_Thread_queue_Requeue> 40007814: 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 ) ) { 40007818: 12 80 00 14 bne 40007868 <_Thread_Change_priority+0xf0> 4000781c: 23 10 00 76 sethi %hi(0x4001d800), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40007820: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40007824: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 40007828: 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 ); 4000782c: c0 24 20 10 clr [ %l0 + 0x10 ] 40007830: 84 10 c0 02 or %g3, %g2, %g2 40007834: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 40007838: c4 14 62 00 lduh [ %l1 + 0x200 ], %g2 4000783c: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 40007840: 80 8e a0 ff btst 0xff, %i2 40007844: 82 10 80 01 or %g2, %g1, %g1 40007848: c2 34 62 00 sth %g1, [ %l1 + 0x200 ] 4000784c: 02 80 00 48 be 4000796c <_Thread_Change_priority+0x1f4> 40007850: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40007854: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40007858: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 4000785c: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 40007860: 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; 40007864: 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 ); 40007868: 7f ff e9 21 call 40001cec 4000786c: 90 10 00 18 mov %i0, %o0 40007870: 7f ff e9 1b call 40001cdc 40007874: 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 ); 40007878: c2 14 62 00 lduh [ %l1 + 0x200 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 4000787c: 05 10 00 76 sethi %hi(0x4001d800), %g2 40007880: 83 28 60 10 sll %g1, 0x10, %g1 40007884: da 00 a0 a4 ld [ %g2 + 0xa4 ], %o5 40007888: 85 30 60 10 srl %g1, 0x10, %g2 4000788c: 80 a0 a0 ff cmp %g2, 0xff 40007890: 08 80 00 27 bleu 4000792c <_Thread_Change_priority+0x1b4> 40007894: 07 10 00 70 sethi %hi(0x4001c000), %g3 40007898: 83 30 60 18 srl %g1, 0x18, %g1 4000789c: 86 10 e0 e8 or %g3, 0xe8, %g3 400078a0: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 400078a4: 09 10 00 76 sethi %hi(0x4001d800), %g4 400078a8: 85 28 a0 10 sll %g2, 0x10, %g2 400078ac: 88 11 22 80 or %g4, 0x280, %g4 400078b0: 83 30 a0 0f srl %g2, 0xf, %g1 400078b4: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 400078b8: 83 28 60 10 sll %g1, 0x10, %g1 400078bc: 89 30 60 10 srl %g1, 0x10, %g4 400078c0: 80 a1 20 ff cmp %g4, 0xff 400078c4: 18 80 00 28 bgu 40007964 <_Thread_Change_priority+0x1ec> 400078c8: 83 30 60 18 srl %g1, 0x18, %g1 400078cc: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 400078d0: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 400078d4: 85 30 a0 0c srl %g2, 0xc, %g2 400078d8: 83 28 60 10 sll %g1, 0x10, %g1 400078dc: 83 30 60 10 srl %g1, 0x10, %g1 400078e0: 82 00 40 02 add %g1, %g2, %g1 400078e4: 85 28 60 04 sll %g1, 4, %g2 400078e8: 83 28 60 02 sll %g1, 2, %g1 400078ec: 82 20 80 01 sub %g2, %g1, %g1 400078f0: 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 ); 400078f4: 05 10 00 76 sethi %hi(0x4001d800), %g2 400078f8: c4 00 a2 0c ld [ %g2 + 0x20c ], %g2 ! 4001da0c <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 400078fc: 07 10 00 76 sethi %hi(0x4001d800), %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() && 40007900: 80 a0 40 02 cmp %g1, %g2 40007904: 02 80 00 08 be 40007924 <_Thread_Change_priority+0x1ac> 40007908: c2 20 e1 dc st %g1, [ %g3 + 0x1dc ] _Thread_Executing->is_preemptible ) 4000790c: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 40007910: 80 a0 60 00 cmp %g1, 0 40007914: 02 80 00 04 be 40007924 <_Thread_Change_priority+0x1ac> 40007918: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 4000791c: 03 10 00 76 sethi %hi(0x4001d800), %g1 40007920: c4 28 62 1c stb %g2, [ %g1 + 0x21c ] ! 4001da1c <_Context_Switch_necessary> _ISR_Enable( level ); 40007924: 7f ff e8 f2 call 40001cec 40007928: 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 ); 4000792c: 86 10 e0 e8 or %g3, 0xe8, %g3 40007930: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40007934: 09 10 00 76 sethi %hi(0x4001d800), %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 ); 40007938: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4000793c: 88 11 22 80 or %g4, 0x280, %g4 40007940: 85 28 a0 10 sll %g2, 0x10, %g2 40007944: 83 30 a0 0f srl %g2, 0xf, %g1 40007948: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 4000794c: 83 28 60 10 sll %g1, 0x10, %g1 40007950: 89 30 60 10 srl %g1, 0x10, %g4 40007954: 80 a1 20 ff cmp %g4, 0xff 40007958: 28 bf ff de bleu,a 400078d0 <_Thread_Change_priority+0x158> 4000795c: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40007960: 83 30 60 18 srl %g1, 0x18, %g1 40007964: 10 bf ff dc b 400078d4 <_Thread_Change_priority+0x15c> 40007968: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000796c: 84 00 60 04 add %g1, 4, %g2 40007970: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 40007974: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 40007978: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000797c: 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; 40007980: 10 bf ff ba b 40007868 <_Thread_Change_priority+0xf0> 40007984: e0 20 80 00 st %l0, [ %g2 ] 40008b28 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 40008b28: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 40008b2c: 03 10 00 76 sethi %hi(0x4001d800), %g1 40008b30: e0 00 62 0c ld [ %g1 + 0x20c ], %l0 ! 4001da0c <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 40008b34: 7f ff e4 6a call 40001cdc 40008b38: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 40008b3c: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 40008b40: c4 04 40 00 ld [ %l1 ], %g2 40008b44: c2 04 60 08 ld [ %l1 + 8 ], %g1 40008b48: 80 a0 80 01 cmp %g2, %g1 40008b4c: 02 80 00 19 be 40008bb0 <_Thread_Yield_processor+0x88> 40008b50: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40008b54: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 40008b58: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 40008b5c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008b60: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40008b64: 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; 40008b68: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 40008b6c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008b70: 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; 40008b74: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 40008b78: 7f ff e4 5d call 40001cec 40008b7c: 01 00 00 00 nop 40008b80: 7f ff e4 57 call 40001cdc 40008b84: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 40008b88: 03 10 00 76 sethi %hi(0x4001d800), %g1 40008b8c: c4 00 61 dc ld [ %g1 + 0x1dc ], %g2 ! 4001d9dc <_Thread_Heir> 40008b90: 80 a4 00 02 cmp %l0, %g2 40008b94: 22 80 00 0e be,a 40008bcc <_Thread_Yield_processor+0xa4> 40008b98: 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; 40008b9c: 84 10 20 01 mov 1, %g2 40008ba0: 03 10 00 76 sethi %hi(0x4001d800), %g1 40008ba4: c4 28 62 1c stb %g2, [ %g1 + 0x21c ] ! 4001da1c <_Context_Switch_necessary> _ISR_Enable( level ); 40008ba8: 7f ff e4 51 call 40001cec 40008bac: 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 ) ) 40008bb0: 03 10 00 76 sethi %hi(0x4001d800), %g1 40008bb4: c2 00 61 dc ld [ %g1 + 0x1dc ], %g1 ! 4001d9dc <_Thread_Heir> 40008bb8: 80 a4 00 01 cmp %l0, %g1 40008bbc: 32 bf ff f9 bne,a 40008ba0 <_Thread_Yield_processor+0x78> 40008bc0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 40008bc4: 7f ff e4 4a call 40001cec 40008bc8: 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; 40008bcc: 10 bf ff f4 b 40008b9c <_Thread_Yield_processor+0x74> 40008bd0: c4 20 61 dc st %g2, [ %g1 + 0x1dc ] 40008348 <_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 ) { 40008348: 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; 4000834c: 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); 40008350: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40008354: 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); 40008358: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000835c: 82 06 60 38 add %i1, 0x38, %g1 40008360: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 40008364: 2d 10 00 73 sethi %hi(0x4001cc00), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40008368: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 4000836c: 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 ]; 40008370: ab 28 60 04 sll %g1, 4, %l5 40008374: ac 15 a3 f4 or %l6, 0x3f4, %l6 40008378: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 4000837c: 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 ]; 40008380: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008384: 12 80 00 24 bne 40008414 <_Thread_queue_Enqueue_priority+0xcc> 40008388: 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; 4000838c: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40008390: 7f ff e6 53 call 40001cdc 40008394: 01 00 00 00 nop 40008398: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 4000839c: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400083a0: 80 a0 40 16 cmp %g1, %l6 400083a4: 02 80 00 3a be 4000848c <_Thread_queue_Enqueue_priority+0x144> 400083a8: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 400083ac: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 400083b0: 80 a4 00 13 cmp %l0, %l3 400083b4: 18 80 00 0b bgu 400083e0 <_Thread_queue_Enqueue_priority+0x98> 400083b8: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400083bc: 10 80 00 36 b 40008494 <_Thread_queue_Enqueue_priority+0x14c> 400083c0: 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 ) ) { 400083c4: 80 a4 40 16 cmp %l1, %l6 400083c8: 02 80 00 32 be 40008490 <_Thread_queue_Enqueue_priority+0x148> 400083cc: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 400083d0: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 400083d4: 80 a4 00 13 cmp %l0, %l3 400083d8: 28 80 00 2f bleu,a 40008494 <_Thread_queue_Enqueue_priority+0x14c> 400083dc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 400083e0: 7f ff e6 43 call 40001cec 400083e4: 90 10 00 12 mov %l2, %o0 400083e8: 7f ff e6 3d call 40001cdc 400083ec: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400083f0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400083f4: 80 8d 00 01 btst %l4, %g1 400083f8: 32 bf ff f3 bne,a 400083c4 <_Thread_queue_Enqueue_priority+0x7c> 400083fc: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40008400: 7f ff e6 3b call 40001cec <== NOT EXECUTED 40008404: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40008408: 30 bf ff e2 b,a 40008390 <_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 ); 4000840c: 7f ff e6 38 call 40001cec 40008410: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40008414: 7f ff e6 32 call 40001cdc 40008418: 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; 4000841c: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 40008420: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 40008424: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40008428: 80 a0 40 15 cmp %g1, %l5 4000842c: 02 80 00 20 be 400084ac <_Thread_queue_Enqueue_priority+0x164> 40008430: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 40008434: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 40008438: 80 a4 00 13 cmp %l0, %l3 4000843c: 0a 80 00 0b bcs 40008468 <_Thread_queue_Enqueue_priority+0x120> 40008440: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40008444: 10 80 00 1b b 400084b0 <_Thread_queue_Enqueue_priority+0x168> 40008448: 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 ) ) { 4000844c: 80 a4 40 15 cmp %l1, %l5 40008450: 02 80 00 17 be 400084ac <_Thread_queue_Enqueue_priority+0x164> 40008454: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 40008458: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 4000845c: 80 a4 00 13 cmp %l0, %l3 40008460: 3a 80 00 14 bcc,a 400084b0 <_Thread_queue_Enqueue_priority+0x168> 40008464: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40008468: 7f ff e6 21 call 40001cec 4000846c: 90 10 00 12 mov %l2, %o0 40008470: 7f ff e6 1b call 40001cdc 40008474: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008478: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 4000847c: 80 8d 00 01 btst %l4, %g1 40008480: 32 bf ff f3 bne,a 4000844c <_Thread_queue_Enqueue_priority+0x104> 40008484: e2 04 60 04 ld [ %l1 + 4 ], %l1 40008488: 30 bf ff e1 b,a 4000840c <_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 ) ) { 4000848c: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40008490: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 40008494: 80 a0 a0 01 cmp %g2, 1 40008498: 02 80 00 17 be 400084f4 <_Thread_queue_Enqueue_priority+0x1ac> 4000849c: 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; 400084a0: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 400084a4: 81 c7 e0 08 ret 400084a8: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400084ac: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400084b0: 80 a0 a0 01 cmp %g2, 1 400084b4: 32 bf ff fc bne,a 400084a4 <_Thread_queue_Enqueue_priority+0x15c> 400084b8: 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 ) 400084bc: 80 a4 00 13 cmp %l0, %l3 400084c0: 02 80 00 1a be 40008528 <_Thread_queue_Enqueue_priority+0x1e0> 400084c4: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400084c8: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400084cc: 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; 400084d0: 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; 400084d4: 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; 400084d8: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 400084dc: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 400084e0: b0 10 20 01 mov 1, %i0 400084e4: 7f ff e6 02 call 40001cec 400084e8: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 400084ec: 81 c7 e0 08 ret 400084f0: 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 ) 400084f4: 02 80 00 0d be 40008528 <_Thread_queue_Enqueue_priority+0x1e0> 400084f8: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 400084fc: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008500: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40008504: 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; 40008508: 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; 4000850c: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40008510: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008514: b0 10 20 01 mov 1, %i0 40008518: 7f ff e5 f5 call 40001cec 4000851c: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008520: 81 c7 e0 08 ret 40008524: 81 e8 00 00 restore 40008528: 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; 4000852c: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008530: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40008534: 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; 40008538: 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; 4000853c: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008540: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008544: b0 10 20 01 mov 1, %i0 40008548: 7f ff e5 e9 call 40001cec 4000854c: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008550: 81 c7 e0 08 ret 40008554: 81 e8 00 00 restore 40008604 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40008604: 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 ) 40008608: 80 a6 20 00 cmp %i0, 0 4000860c: 02 80 00 13 be 40008658 <_Thread_queue_Requeue+0x54> 40008610: 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 ) { 40008614: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 40008618: 80 a4 60 01 cmp %l1, 1 4000861c: 02 80 00 04 be 4000862c <_Thread_queue_Requeue+0x28> 40008620: 01 00 00 00 nop 40008624: 81 c7 e0 08 ret <== NOT EXECUTED 40008628: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 4000862c: 7f ff e5 ac call 40001cdc 40008630: 01 00 00 00 nop 40008634: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40008638: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000863c: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008640: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40008644: 80 88 80 01 btst %g2, %g1 40008648: 12 80 00 06 bne 40008660 <_Thread_queue_Requeue+0x5c> 4000864c: 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 ); 40008650: 7f ff e5 a7 call 40001cec 40008654: 90 10 00 10 mov %l0, %o0 40008658: 81 c7 e0 08 ret 4000865c: 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 ); 40008660: 92 10 00 19 mov %i1, %o1 40008664: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 40008668: 40 00 10 c3 call 4000c974 <_Thread_queue_Extract_priority_helper> 4000866c: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 40008670: 90 10 00 18 mov %i0, %o0 40008674: 92 10 00 19 mov %i1, %o1 40008678: 7f ff ff 34 call 40008348 <_Thread_queue_Enqueue_priority> 4000867c: 94 07 bf fc add %fp, -4, %o2 40008680: 30 bf ff f4 b,a 40008650 <_Thread_queue_Requeue+0x4c> 40015acc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40015acc: 9d e3 bf 88 save %sp, -120, %sp 40015ad0: 2d 10 00 f8 sethi %hi(0x4003e000), %l6 40015ad4: ba 07 bf f4 add %fp, -12, %i5 40015ad8: a8 07 bf f8 add %fp, -8, %l4 40015adc: a4 07 bf e8 add %fp, -24, %l2 40015ae0: ae 07 bf ec add %fp, -20, %l7 40015ae4: 2b 10 00 f7 sethi %hi(0x4003dc00), %l5 40015ae8: 39 10 00 f7 sethi %hi(0x4003dc00), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40015aec: c0 27 bf f8 clr [ %fp + -8 ] 40015af0: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40015af4: 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); 40015af8: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40015afc: 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); 40015b00: ee 27 bf e8 st %l7, [ %fp + -24 ] 40015b04: ac 15 a0 a4 or %l6, 0xa4, %l6 40015b08: aa 15 63 e0 or %l5, 0x3e0, %l5 40015b0c: b8 17 23 50 or %i4, 0x350, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b10: 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 ); 40015b14: 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 ); 40015b18: 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 ); 40015b1c: 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; 40015b20: 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; 40015b24: 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; 40015b28: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40015b2c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b30: 90 10 00 11 mov %l1, %o0 40015b34: 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; 40015b38: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b3c: 40 00 12 3c call 4001a42c <_Watchdog_Adjust_to_chain> 40015b40: 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; 40015b44: 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(); 40015b48: 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 ) { 40015b4c: 80 a4 00 09 cmp %l0, %o1 40015b50: 38 80 00 2f bgu,a 40015c0c <_Timer_server_Body+0x140> 40015b54: 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 ) { 40015b58: 80 a4 00 09 cmp %l0, %o1 40015b5c: 0a 80 00 30 bcs 40015c1c <_Timer_server_Body+0x150> 40015b60: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 40015b64: 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 ); 40015b68: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40015b6c: 40 00 02 b5 call 40016640 <_Chain_Get> 40015b70: 01 00 00 00 nop if ( timer == NULL ) { 40015b74: 80 a2 20 00 cmp %o0, 0 40015b78: 02 80 00 10 be 40015bb8 <_Timer_server_Body+0xec> 40015b7c: 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 ) { 40015b80: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40015b84: 80 a0 60 01 cmp %g1, 1 40015b88: 02 80 00 29 be 40015c2c <_Timer_server_Body+0x160> 40015b8c: 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 ) { 40015b90: 12 bf ff f6 bne 40015b68 <_Timer_server_Body+0x9c> 40015b94: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 40015b98: 40 00 12 5b call 4001a504 <_Watchdog_Insert> 40015b9c: 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 ); 40015ba0: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40015ba4: 40 00 02 a7 call 40016640 <_Chain_Get> 40015ba8: 01 00 00 00 nop if ( timer == NULL ) { 40015bac: 80 a2 20 00 cmp %o0, 0 40015bb0: 32 bf ff f5 bne,a 40015b84 <_Timer_server_Body+0xb8> 40015bb4: 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 ); 40015bb8: 7f ff e3 a4 call 4000ea48 40015bbc: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 40015bc0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40015bc4: 80 a5 00 01 cmp %l4, %g1 40015bc8: 02 80 00 1d be 40015c3c <_Timer_server_Body+0x170> 40015bcc: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 40015bd0: 7f ff e3 a2 call 4000ea58 <== NOT EXECUTED 40015bd4: 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; 40015bd8: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40015bdc: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015be0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40015be4: 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; 40015be8: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015bec: 40 00 12 10 call 4001a42c <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 40015bf0: 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; 40015bf4: 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(); 40015bf8: 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 ) { 40015bfc: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 40015c00: 08 bf ff d7 bleu 40015b5c <_Timer_server_Body+0x90> <== NOT EXECUTED 40015c04: 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 ); 40015c08: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 40015c0c: 90 10 00 13 mov %l3, %o0 40015c10: 40 00 12 07 call 4001a42c <_Watchdog_Adjust_to_chain> 40015c14: 94 10 00 12 mov %l2, %o2 40015c18: 30 bf ff d3 b,a 40015b64 <_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 ); 40015c1c: 90 10 00 13 mov %l3, %o0 40015c20: 40 00 11 d3 call 4001a36c <_Watchdog_Adjust> 40015c24: 92 10 20 01 mov 1, %o1 40015c28: 30 bf ff cf b,a 40015b64 <_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 ); 40015c2c: 92 02 20 10 add %o0, 0x10, %o1 40015c30: 40 00 12 35 call 4001a504 <_Watchdog_Insert> 40015c34: 90 10 00 11 mov %l1, %o0 40015c38: 30 bf ff cc b,a 40015b68 <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 40015c3c: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 40015c40: 7f ff e3 86 call 4000ea58 40015c44: 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 ) ) { 40015c48: c2 07 bf e8 ld [ %fp + -24 ], %g1 40015c4c: 80 a5 c0 01 cmp %l7, %g1 40015c50: 12 80 00 0c bne 40015c80 <_Timer_server_Body+0x1b4> 40015c54: 01 00 00 00 nop 40015c58: 30 80 00 13 b,a 40015ca4 <_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; 40015c5c: 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; 40015c60: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 40015c64: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 40015c68: 7f ff e3 7c call 4000ea58 40015c6c: 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 ); 40015c70: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 40015c74: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 40015c78: 9f c0 40 00 call %g1 40015c7c: 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 ); 40015c80: 7f ff e3 72 call 4000ea48 40015c84: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40015c88: 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)) 40015c8c: 80 a5 c0 10 cmp %l7, %l0 40015c90: 32 bf ff f3 bne,a 40015c5c <_Timer_server_Body+0x190> 40015c94: 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 ); 40015c98: 7f ff e3 70 call 4000ea58 40015c9c: 01 00 00 00 nop 40015ca0: 30 bf ff a1 b,a 40015b24 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 40015ca4: c0 2e 20 7c clrb [ %i0 + 0x7c ] 40015ca8: c2 07 00 00 ld [ %i4 ], %g1 40015cac: 82 00 60 01 inc %g1 40015cb0: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 40015cb4: d0 06 00 00 ld [ %i0 ], %o0 40015cb8: 40 00 0e fa call 400198a0 <_Thread_Set_state> 40015cbc: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 40015cc0: 7f ff ff 59 call 40015a24 <_Timer_server_Reset_interval_system_watchdog> 40015cc4: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40015cc8: 7f ff ff 6c call 40015a78 <_Timer_server_Reset_tod_system_watchdog> 40015ccc: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40015cd0: 40 00 0c 1f call 40018d4c <_Thread_Enable_dispatch> 40015cd4: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40015cd8: 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; 40015cdc: 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 ); 40015ce0: 40 00 12 76 call 4001a6b8 <_Watchdog_Remove> 40015ce4: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40015ce8: 40 00 12 74 call 4001a6b8 <_Watchdog_Remove> 40015cec: 90 10 00 1a mov %i2, %o0 40015cf0: 30 bf ff 8d b,a 40015b24 <_Timer_server_Body+0x58> 4000b1e4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000b1e4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 4000b1e8: 7f ff de 8a call 40002c10 4000b1ec: 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)); 4000b1f0: 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; 4000b1f4: 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 ) ) { 4000b1f8: 80 a0 40 11 cmp %g1, %l1 4000b1fc: 02 80 00 1f be 4000b278 <_Watchdog_Adjust+0x94> 4000b200: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000b204: 12 80 00 1f bne 4000b280 <_Watchdog_Adjust+0x9c> 4000b208: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000b20c: 80 a6 a0 00 cmp %i2, 0 4000b210: 02 80 00 1a be 4000b278 <_Watchdog_Adjust+0x94> 4000b214: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000b218: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000b21c: 80 a6 80 19 cmp %i2, %i1 4000b220: 1a 80 00 0b bcc 4000b24c <_Watchdog_Adjust+0x68> 4000b224: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 4000b228: 10 80 00 1d b 4000b29c <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000b22c: 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 ) { 4000b230: b4 a6 80 19 subcc %i2, %i1, %i2 4000b234: 02 80 00 11 be 4000b278 <_Watchdog_Adjust+0x94> 4000b238: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000b23c: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000b240: 80 a6 40 1a cmp %i1, %i2 4000b244: 38 80 00 16 bgu,a 4000b29c <_Watchdog_Adjust+0xb8> 4000b248: 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; 4000b24c: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 4000b250: 7f ff de 74 call 40002c20 4000b254: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000b258: 40 00 00 b6 call 4000b530 <_Watchdog_Tickle> 4000b25c: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 4000b260: 7f ff de 6c call 40002c10 4000b264: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000b268: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 4000b26c: 80 a4 40 02 cmp %l1, %g2 4000b270: 12 bf ff f0 bne 4000b230 <_Watchdog_Adjust+0x4c> 4000b274: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 4000b278: 7f ff de 6a call 40002c20 4000b27c: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000b280: 12 bf ff fe bne 4000b278 <_Watchdog_Adjust+0x94> 4000b284: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000b288: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000b28c: b4 00 80 1a add %g2, %i2, %i2 4000b290: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 4000b294: 7f ff de 63 call 40002c20 4000b298: 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; 4000b29c: 10 bf ff f7 b 4000b278 <_Watchdog_Adjust+0x94> 4000b2a0: f4 20 60 10 st %i2, [ %g1 + 0x10 ] 4001b300 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 4001b300: 9d e3 bf a0 save %sp, -96, %sp 4001b304: 40 00 07 04 call 4001cf14 <_fini> 4001b308: 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(); 4001b30c: 7f ff ff e2 call 4001b294 4001b310: 01 00 00 00 nop rtems_shutdown_executive(status); 4001b314: 40 00 00 50 call 4001b454 4001b318: 90 10 00 18 mov %i0, %o0 4001b31c: 30 80 00 00 b,a 4001b31c <_exit+0x1c> <== NOT EXECUTED 4003ea68 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4003ea68: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4003ea6c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4003ea70: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4003ea74: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4003ea78: 7f ff ff 69 call 4003e81c <== NOT EXECUTED 4003ea7c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4003ea80: 01 00 00 00 nop 4000dd2c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4000dd2c: 81 c3 e0 08 retl <== NOT EXECUTED 4000dd30: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000adec <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000adec: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000adf0: 7f ff ff e6 call 4000ad88 <== NOT EXECUTED 4000adf4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000adf8: 01 00 00 00 nop 4002ac9c <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 4002ac9c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002aca0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002aca4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002aca8: 7f ff ff 52 call 4002a9f0 <== NOT EXECUTED 4002acac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002acb0: 01 00 00 00 nop 4002af74 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 4002af74: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002af78: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002af7c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002af80: 7f ff ff b1 call 4002ae44 <== NOT EXECUTED 4002af84: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002af88: 01 00 00 00 nop 4001b420 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 4001b420: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4001b424: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4001b428: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001b42c: 40 00 00 17 call 4001b488 <== NOT EXECUTED 4001b430: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001b434: 01 00 00 00 nop 4005f5b4 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 4005f5b4: 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 ); 4005f5b8: 7f fe 9e 6c call 40006f68 <== NOT EXECUTED 4005f5bc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 4005f5c0: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4005f5c4: 32 80 01 1d bne,a 4005fa38 <_rename_r+0x484> <== NOT EXECUTED 4005f5c8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 4005f5cc: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 4005f5d0: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005f5d4: 02 80 00 13 be 4005f620 <_rename_r+0x6c> <== NOT EXECUTED 4005f5d8: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005f5dc: 02 80 00 11 be 4005f620 <_rename_r+0x6c> <== NOT EXECUTED 4005f5e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f5e4: 02 80 00 10 be 4005f624 <_rename_r+0x70> <== NOT EXECUTED 4005f5e8: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 4005f5ec: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED 4005f5f0: a2 10 20 00 clr %l1 <== NOT EXECUTED 4005f5f4: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4005f5f8: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED 4005f5fc: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4005f600: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4005f604: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4005f608: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4005f60c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4005f610: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4005f614: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4005f618: 10 80 00 0f b 4005f654 <_rename_r+0xa0> <== NOT EXECUTED 4005f61c: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 4005f620: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 4005f624: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED 4005f628: a2 10 20 00 clr %l1 <== NOT EXECUTED 4005f62c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4005f630: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED 4005f634: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 4005f638: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4005f63c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 4005f640: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4005f644: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 4005f648: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4005f64c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4005f650: 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; 4005f654: c2 07 bf d4 ld [ %fp + -44 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; 4005f658: 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; 4005f65c: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED 4005f660: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; 4005f664: 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; 4005f668: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 4005f66c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4005f670: 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; 4005f674: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED 4005f678: 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 ), 4005f67c: 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; 4005f680: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED 4005f684: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4005f688: 7f ff b1 f5 call 4004be5c <== NOT EXECUTED 4005f68c: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED 4005f690: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005f694: 7f fe 9e 16 call 40006eec <== NOT EXECUTED 4005f698: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005f69c: b2 06 40 08 add %i1, %o0, %i1 <== NOT EXECUTED 4005f6a0: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4005f6a4: 7f ff b1 ee call 4004be5c <== NOT EXECUTED 4005f6a8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005f6ac: 94 10 20 00 clr %o2 <== NOT EXECUTED 4005f6b0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005f6b4: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4005f6b8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005f6bc: 7f fe 9e 4b call 40006fe8 <== NOT EXECUTED 4005f6c0: 98 10 20 00 clr %o4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 4005f6c4: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 4005f6c8: 12 80 00 87 bne 4005f8e4 <_rename_r+0x330> <== NOT EXECUTED 4005f6cc: 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 ); 4005f6d0: c2 4e 80 00 ldsb [ %i2 ], %g1 <== NOT EXECUTED 4005f6d4: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005f6d8: 02 80 00 13 be 4005f724 <_rename_r+0x170> <== NOT EXECUTED 4005f6dc: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005f6e0: 02 80 00 11 be 4005f724 <_rename_r+0x170> <== NOT EXECUTED 4005f6e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f6e8: 02 80 00 10 be 4005f728 <_rename_r+0x174> <== NOT EXECUTED 4005f6ec: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 4005f6f0: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED 4005f6f4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4005f6f8: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4005f6fc: c4 27 bf c0 st %g2, [ %fp + -64 ] <== NOT EXECUTED 4005f700: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4005f704: c4 27 bf c4 st %g2, [ %fp + -60 ] <== NOT EXECUTED 4005f708: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4005f70c: c4 27 bf c8 st %g2, [ %fp + -56 ] <== NOT EXECUTED 4005f710: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4005f714: c4 27 bf cc st %g2, [ %fp + -52 ] <== NOT EXECUTED 4005f718: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4005f71c: 10 80 00 0f b 4005f758 <_rename_r+0x1a4> <== NOT EXECUTED 4005f720: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED 4005f724: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 4005f728: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED 4005f72c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4005f730: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4005f734: c4 27 bf c0 st %g2, [ %fp + -64 ] <== NOT EXECUTED 4005f738: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 4005f73c: c4 27 bf c4 st %g2, [ %fp + -60 ] <== NOT EXECUTED 4005f740: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 4005f744: c4 27 bf c8 st %g2, [ %fp + -56 ] <== NOT EXECUTED 4005f748: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 4005f74c: c4 27 bf cc st %g2, [ %fp + -52 ] <== NOT EXECUTED 4005f750: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4005f754: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 4005f758: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005f75c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4005f760: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f764: 02 80 00 98 be 4005f9c4 <_rename_r+0x410> <== NOT EXECUTED 4005f768: 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 ); 4005f76c: 90 06 80 08 add %i2, %o0, %o0 <== NOT EXECUTED 4005f770: b4 07 bf c0 add %fp, -64, %i2 <== NOT EXECUTED 4005f774: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f778: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED if ( result != 0 ) { 4005f77c: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 4005f780: 12 80 00 69 bne 4005f924 <_rename_r+0x370> <== NOT EXECUTED 4005f784: 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 ) { 4005f788: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 4005f78c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4005f790: 12 80 00 2e bne 4005f848 <_rename_r+0x294> <== NOT EXECUTED 4005f794: 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 ) { 4005f798: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 <== NOT EXECUTED 4005f79c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f7a0: 02 80 00 83 be 4005f9ac <_rename_r+0x3f8> <== NOT EXECUTED 4005f7a4: 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 ); 4005f7a8: b2 07 bf d4 add %fp, -44, %i1 <== NOT EXECUTED 4005f7ac: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005f7b0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005f7b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f7b8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005f7bc: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005f7c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f7c4: 02 80 00 08 be 4005f7e4 <_rename_r+0x230> <== NOT EXECUTED 4005f7c8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4005f7cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f7d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f7d4: 02 80 00 05 be 4005f7e8 <_rename_r+0x234> <== NOT EXECUTED 4005f7d8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f7dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f7e0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005f7e4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f7e8: 02 80 00 0d be 4005f81c <_rename_r+0x268> <== NOT EXECUTED 4005f7ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f7f0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005f7f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f7f8: 22 80 00 09 be,a 4005f81c <_rename_r+0x268> <== NOT EXECUTED 4005f7fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f800: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f804: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f808: 22 80 00 05 be,a 4005f81c <_rename_r+0x268> <== NOT EXECUTED 4005f80c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f810: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f814: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005f818: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f81c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f820: 02 80 00 8f be 4005fa5c <_rename_r+0x4a8> <== NOT EXECUTED 4005f824: 01 00 00 00 nop <== NOT EXECUTED 4005f828: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f82c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f830: 02 80 00 8b be 4005fa5c <_rename_r+0x4a8> <== NOT EXECUTED 4005f834: 01 00 00 00 nop <== NOT EXECUTED 4005f838: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f83c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 4005f840: 81 c7 e0 08 ret <== NOT EXECUTED 4005f844: 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 ); 4005f848: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005f84c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f850: 02 80 00 09 be 4005f874 <_rename_r+0x2c0> <== NOT EXECUTED 4005f854: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f858: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f85c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f860: 02 80 00 05 be 4005f874 <_rename_r+0x2c0> <== NOT EXECUTED 4005f864: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f868: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f86c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005f870: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f874: 02 80 00 0d be 4005f8a8 <_rename_r+0x2f4> <== NOT EXECUTED 4005f878: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f87c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005f880: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f884: 22 80 00 09 be,a 4005f8a8 <_rename_r+0x2f4> <== NOT EXECUTED 4005f888: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f88c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f890: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f894: 22 80 00 05 be,a 4005f8a8 <_rename_r+0x2f4> <== NOT EXECUTED 4005f898: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f89c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f8a0: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005f8a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f8a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f8ac: 02 80 00 08 be 4005f8cc <_rename_r+0x318> <== NOT EXECUTED 4005f8b0: 01 00 00 00 nop <== NOT EXECUTED 4005f8b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f8b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f8bc: 02 80 00 04 be 4005f8cc <_rename_r+0x318> <== NOT EXECUTED 4005f8c0: 01 00 00 00 nop <== NOT EXECUTED 4005f8c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f8c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 4005f8cc: 7f ff 96 25 call 40045160 <__errno> <== NOT EXECUTED 4005f8d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005f8d4: 82 10 20 12 mov 0x12, %g1 <== NOT EXECUTED 4005f8d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005f8dc: 81 c7 e0 08 ret <== NOT EXECUTED 4005f8e0: 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 ) 4005f8e4: 02 80 00 0b be 4005f910 <_rename_r+0x35c> <== NOT EXECUTED 4005f8e8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f8ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f8f0: 02 80 00 08 be 4005f910 <_rename_r+0x35c> <== NOT EXECUTED 4005f8f4: 01 00 00 00 nop <== NOT EXECUTED 4005f8f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f8fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f900: 02 80 00 04 be 4005f910 <_rename_r+0x35c> <== NOT EXECUTED 4005f904: 01 00 00 00 nop <== NOT EXECUTED 4005f908: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f90c: 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 ); 4005f910: 7f ff 96 14 call 40045160 <__errno> <== NOT EXECUTED 4005f914: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005f918: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED 4005f91c: 81 c7 e0 08 ret <== NOT EXECUTED 4005f920: 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 ); 4005f924: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005f928: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f92c: 02 80 00 09 be 4005f950 <_rename_r+0x39c> <== NOT EXECUTED 4005f930: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f934: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f938: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f93c: 02 80 00 05 be 4005f950 <_rename_r+0x39c> <== NOT EXECUTED 4005f940: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f944: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f948: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005f94c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f950: 02 80 00 0d be 4005f984 <_rename_r+0x3d0> <== NOT EXECUTED 4005f954: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f958: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005f95c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f960: 22 80 00 09 be,a 4005f984 <_rename_r+0x3d0> <== NOT EXECUTED 4005f964: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f968: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f96c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f970: 22 80 00 05 be,a 4005f984 <_rename_r+0x3d0> <== NOT EXECUTED 4005f974: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f978: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f97c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005f980: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f984: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f988: 02 bf ff e2 be 4005f910 <_rename_r+0x35c> <== NOT EXECUTED 4005f98c: 01 00 00 00 nop <== NOT EXECUTED 4005f990: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f994: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f998: 02 bf ff de be 4005f910 <_rename_r+0x35c> <== NOT EXECUTED 4005f99c: 01 00 00 00 nop <== NOT EXECUTED 4005f9a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f9a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4005f9a8: 30 bf ff da b,a 4005f910 <_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 ); 4005f9ac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4005f9b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f9b4: 02 80 00 05 be 4005f9c8 <_rename_r+0x414> <== NOT EXECUTED 4005f9b8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f9bc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f9c0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005f9c4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f9c8: 02 80 00 0d be 4005f9fc <_rename_r+0x448> <== NOT EXECUTED 4005f9cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f9d0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005f9d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f9d8: 22 80 00 09 be,a 4005f9fc <_rename_r+0x448> <== NOT EXECUTED 4005f9dc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f9e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f9e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f9e8: 22 80 00 05 be,a 4005f9fc <_rename_r+0x448> <== NOT EXECUTED 4005f9ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f9f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f9f4: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005f9f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f9fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005fa00: 02 80 00 08 be 4005fa20 <_rename_r+0x46c> <== NOT EXECUTED 4005fa04: 01 00 00 00 nop <== NOT EXECUTED 4005fa08: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005fa0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005fa10: 02 80 00 04 be 4005fa20 <_rename_r+0x46c> <== NOT EXECUTED 4005fa14: 01 00 00 00 nop <== NOT EXECUTED 4005fa18: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005fa1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4005fa20: 7f ff 95 d0 call 40045160 <__errno> <== NOT EXECUTED 4005fa24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005fa28: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4005fa2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005fa30: 81 c7 e0 08 ret <== NOT EXECUTED 4005fa34: 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, 4005fa38: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005fa3c: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 4005fa40: 96 07 bf d4 add %fp, -44, %o3 <== NOT EXECUTED 4005fa44: 98 10 20 00 clr %o4 <== NOT EXECUTED 4005fa48: 7f fe 9d a9 call 400070ec <== NOT EXECUTED 4005fa4c: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 4005fa50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4005fa54: 02 bf ff 00 be 4005f654 <_rename_r+0xa0> <== NOT EXECUTED 4005fa58: 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; } 4005fa5c: 81 c7 e0 08 ret <== NOT EXECUTED 4005fa60: 81 e8 00 00 restore <== NOT EXECUTED 40008c78 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40008c78: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40008c7c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40008c80: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40008c84: 7f ff ff b1 call 40008b48 <== NOT EXECUTED 40008c88: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40008c8c: 01 00 00 00 nop 4000ef14 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4000ef14: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000ef18: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000ef1c: 7f ff ff 43 call 4000ec28 <== NOT EXECUTED 4000ef20: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000ef24: 01 00 00 00 nop 400294d8 : #include int chdir( const char *pathname ) { 400294d8: 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 ); 400294dc: 40 00 8a 60 call 4004be5c 400294e0: 90 10 00 18 mov %i0, %o0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 400294e4: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 400294e8: 92 10 00 08 mov %o0, %o1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 400294ec: 94 10 20 01 mov 1, %o2 400294f0: 90 10 00 18 mov %i0, %o0 400294f4: 96 10 00 10 mov %l0, %o3 400294f8: 98 10 20 01 mov 1, %o4 400294fc: 7f ff 76 fc call 400070ec 40029500: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 40029504: 80 a2 20 00 cmp %o0, 0 40029508: 12 80 00 31 bne 400295cc 4002950c: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 40029510: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40029514: 80 a0 60 00 cmp %g1, 0 40029518: 22 80 00 2f be,a 400295d4 4002951c: 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 ) { 40029520: 9f c0 40 00 call %g1 40029524: 90 10 00 10 mov %l0, %o0 40029528: 80 a2 20 01 cmp %o0, 1 4002952c: 12 80 00 1b bne 40029598 40029530: 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 ); 40029534: 21 10 01 ab sethi %hi(0x4006ac00), %l0 40029538: d0 04 22 b8 ld [ %l0 + 0x2b8 ], %o0 ! 4006aeb8 4002953c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40029540: 80 a0 60 00 cmp %g1, 0 40029544: 22 80 00 0a be,a 4002956c 40029548: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002954c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40029550: 80 a0 60 00 cmp %g1, 0 40029554: 22 80 00 06 be,a 4002956c 40029558: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002955c: 9f c0 40 00 call %g1 40029560: 90 02 20 04 add %o0, 4, %o0 40029564: d0 04 22 b8 ld [ %l0 + 0x2b8 ], %o0 rtems_filesystem_current = loc; 40029568: c2 07 bf ec ld [ %fp + -20 ], %g1 4002956c: c2 22 20 04 st %g1, [ %o0 + 4 ] 40029570: c2 07 bf f0 ld [ %fp + -16 ], %g1 40029574: c2 22 20 08 st %g1, [ %o0 + 8 ] 40029578: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002957c: c2 22 20 0c st %g1, [ %o0 + 0xc ] 40029580: c2 07 bf f8 ld [ %fp + -8 ], %g1 40029584: c2 22 20 10 st %g1, [ %o0 + 0x10 ] 40029588: c2 07 bf fc ld [ %fp + -4 ], %g1 4002958c: c2 22 20 14 st %g1, [ %o0 + 0x14 ] return 0; } 40029590: 81 c7 e0 08 ret 40029594: 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 ); 40029598: 80 a0 60 00 cmp %g1, 0 4002959c: 02 80 00 08 be 400295bc 400295a0: 01 00 00 00 nop 400295a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400295a8: 80 a0 60 00 cmp %g1, 0 400295ac: 02 80 00 04 be 400295bc 400295b0: 01 00 00 00 nop 400295b4: 9f c0 40 00 call %g1 400295b8: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400295bc: 40 00 6e e9 call 40045160 <__errno> 400295c0: b0 10 3f ff mov -1, %i0 400295c4: 82 10 20 14 mov 0x14, %g1 400295c8: c2 22 00 00 st %g1, [ %o0 ] 400295cc: 81 c7 e0 08 ret 400295d0: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 400295d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400295d8: 02 80 00 04 be 400295e8 <== NOT EXECUTED 400295dc: 01 00 00 00 nop <== NOT EXECUTED 400295e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400295e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400295e8: 40 00 6e de call 40045160 <__errno> <== NOT EXECUTED 400295ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400295f0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400295f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400295f8: 81 c7 e0 08 ret <== NOT EXECUTED 400295fc: 81 e8 00 00 restore <== NOT EXECUTED 40006d20 : int chmod( const char *path, mode_t mode ) { 40006d20: 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 ); 40006d24: 40 01 14 4e call 4004be5c 40006d28: 90 10 00 18 mov %i0, %o0 40006d2c: a0 07 bf ec add %fp, -20, %l0 40006d30: 92 10 00 08 mov %o0, %o1 40006d34: 94 10 20 00 clr %o2 40006d38: 90 10 00 18 mov %i0, %o0 40006d3c: 96 10 00 10 mov %l0, %o3 40006d40: 98 10 20 01 mov 1, %o4 40006d44: 40 00 00 ea call 400070ec 40006d48: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40006d4c: 80 a2 20 00 cmp %o0, 0 40006d50: 12 80 00 16 bne 40006da8 40006d54: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 40006d58: 80 a0 60 00 cmp %g1, 0 40006d5c: 22 80 00 25 be,a 40006df0 40006d60: 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 ){ 40006d64: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006d68: 80 a0 60 00 cmp %g1, 0 40006d6c: 02 80 00 11 be 40006db0 40006d70: 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 ); 40006d74: 90 10 00 10 mov %l0, %o0 40006d78: 9f c0 40 00 call %g1 40006d7c: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40006d80: c2 07 bf f8 ld [ %fp + -8 ], %g1 40006d84: 80 a0 60 00 cmp %g1, 0 40006d88: 02 80 00 08 be 40006da8 40006d8c: b0 10 00 08 mov %o0, %i0 40006d90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006d94: 80 a0 60 00 cmp %g1, 0 40006d98: 02 80 00 23 be 40006e24 40006d9c: 01 00 00 00 nop 40006da0: 9f c0 40 00 call %g1 40006da4: 90 10 00 10 mov %l0, %o0 return result; } 40006da8: 81 c7 e0 08 ret 40006dac: 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 ); 40006db0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40006db4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006db8: 02 80 00 08 be 40006dd8 <== NOT EXECUTED 40006dbc: 01 00 00 00 nop <== NOT EXECUTED 40006dc0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006dc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006dc8: 02 80 00 04 be 40006dd8 <== NOT EXECUTED 40006dcc: 01 00 00 00 nop <== NOT EXECUTED 40006dd0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006dd4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006dd8: 40 00 f8 e2 call 40045160 <__errno> <== NOT EXECUTED 40006ddc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006de0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006de4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006de8: 81 c7 e0 08 ret <== NOT EXECUTED 40006dec: 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 ); 40006df0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006df4: 02 80 00 08 be 40006e14 <== NOT EXECUTED 40006df8: 01 00 00 00 nop <== NOT EXECUTED 40006dfc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006e00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006e04: 02 80 00 04 be 40006e14 <== NOT EXECUTED 40006e08: 01 00 00 00 nop <== NOT EXECUTED 40006e0c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006e10: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 40006e14: 40 00 f8 d3 call 40045160 <__errno> <== NOT EXECUTED 40006e18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006e1c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40006e20: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006e24: 81 c7 e0 08 ret <== NOT EXECUTED 40006e28: 81 e8 00 00 restore <== NOT EXECUTED 40029600 : int chown( const char *path, uid_t owner, gid_t group ) { 40029600: 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 ) ) 40029604: 40 00 8a 16 call 4004be5c 40029608: 90 10 00 18 mov %i0, %o0 4002960c: a0 07 bf ec add %fp, -20, %l0 40029610: 92 10 00 08 mov %o0, %o1 40029614: 94 10 20 00 clr %o2 40029618: 90 10 00 18 mov %i0, %o0 4002961c: 96 10 00 10 mov %l0, %o3 40029620: 98 10 20 01 mov 1, %o4 40029624: 7f ff 76 b2 call 400070ec 40029628: b0 10 3f ff mov -1, %i0 4002962c: 80 a2 20 00 cmp %o0, 0 40029630: 12 80 00 15 bne 40029684 40029634: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 40029638: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 4002963c: 80 a0 60 00 cmp %g1, 0 40029640: 02 80 00 13 be 4002968c 40029644: 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 ); 40029648: 95 2e a0 10 sll %i2, 0x10, %o2 4002964c: 93 32 60 10 srl %o1, 0x10, %o1 40029650: 95 32 a0 10 srl %o2, 0x10, %o2 40029654: 9f c0 40 00 call %g1 40029658: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002965c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40029660: 80 a0 60 00 cmp %g1, 0 40029664: 02 80 00 08 be 40029684 40029668: b0 10 00 08 mov %o0, %i0 4002966c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40029670: 80 a0 60 00 cmp %g1, 0 40029674: 02 80 00 10 be 400296b4 40029678: 01 00 00 00 nop 4002967c: 9f c0 40 00 call %g1 40029680: 90 10 00 10 mov %l0, %o0 return result; } 40029684: 81 c7 e0 08 ret 40029688: 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 ); 4002968c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40029690: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40029694: 02 80 00 04 be 400296a4 <== NOT EXECUTED 40029698: 01 00 00 00 nop <== NOT EXECUTED 4002969c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400296a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400296a4: 40 00 6e af call 40045160 <__errno> <== NOT EXECUTED 400296a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400296ac: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400296b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400296b4: 81 c7 e0 08 ret <== NOT EXECUTED 400296b8: 81 e8 00 00 restore <== NOT EXECUTED 400296bc : #include int chroot( const char *pathname ) { 400296bc: 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) { 400296c0: 21 10 01 ab sethi %hi(0x4006ac00), %l0 400296c4: e2 04 22 b8 ld [ %l0 + 0x2b8 ], %l1 ! 4006aeb8 400296c8: 03 10 01 bb sethi %hi(0x4006ec00), %g1 400296cc: 82 10 60 88 or %g1, 0x88, %g1 ! 4006ec88 400296d0: 80 a4 40 01 cmp %l1, %g1 400296d4: 02 80 00 28 be 40029774 400296d8: 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); 400296dc: 7f ff ff 7f call 400294d8 400296e0: 90 10 00 18 mov %i0, %o0 if (result) { 400296e4: 80 a2 20 00 cmp %o0, 0 400296e8: 12 80 00 2f bne 400297a4 400296ec: 11 10 01 88 sethi %hi(0x40062000), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 400296f0: 92 10 20 01 mov 1, %o1 400296f4: 90 12 23 38 or %o0, 0x338, %o0 400296f8: 94 10 20 00 clr %o2 400296fc: 96 07 bf ec add %fp, -20, %o3 40029700: 7f ff 76 7b call 400070ec 40029704: 98 10 20 00 clr %o4 40029708: 80 a2 20 00 cmp %o0, 0 4002970c: 12 80 00 26 bne 400297a4 40029710: d0 04 22 b8 ld [ %l0 + 0x2b8 ], %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); 40029714: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 40029718: 80 a0 60 00 cmp %g1, 0 4002971c: 22 80 00 0b be,a 40029748 40029720: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40029724: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40029728: 80 a0 60 00 cmp %g1, 0 4002972c: 22 80 00 07 be,a 40029748 40029730: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40029734: 9f c0 40 00 call %g1 40029738: 90 02 20 18 add %o0, 0x18, %o0 4002973c: 03 10 01 ab sethi %hi(0x4006ac00), %g1 40029740: d0 00 62 b8 ld [ %g1 + 0x2b8 ], %o0 ! 4006aeb8 rtems_filesystem_root = loc; 40029744: c2 07 bf ec ld [ %fp + -20 ], %g1 40029748: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 4002974c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40029750: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 40029754: c2 07 bf f4 ld [ %fp + -12 ], %g1 40029758: c2 22 20 20 st %g1, [ %o0 + 0x20 ] 4002975c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40029760: c2 22 20 24 st %g1, [ %o0 + 0x24 ] 40029764: c2 07 bf fc ld [ %fp + -4 ], %g1 40029768: c2 22 20 28 st %g1, [ %o0 + 0x28 ] return 0; } 4002976c: 81 c7 e0 08 ret 40029770: 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*/ 40029774: 40 00 06 d5 call 4002b2c8 40029778: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4002977c: c2 04 22 b8 ld [ %l0 + 0x2b8 ], %g1 40029780: 80 a0 40 11 cmp %g1, %l1 40029784: 12 bf ff d6 bne 400296dc 40029788: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002978c: 40 00 6e 75 call 40045160 <__errno> <== NOT EXECUTED 40029790: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40029794: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40029798: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002979c: 81 c7 e0 08 ret <== NOT EXECUTED 400297a0: 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 ); 400297a4: 40 00 6e 6f call 40045160 <__errno> <== NOT EXECUTED 400297a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400297ac: 40 00 6e 6d call 40045160 <__errno> <== NOT EXECUTED 400297b0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400297b4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400297b8: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 400297bc: 81 c7 e0 08 ret <== NOT EXECUTED 400297c0: 81 e8 00 00 restore <== NOT EXECUTED 400099b0 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 400099b0: 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; 400099b4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 400099b8: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 400099bc: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 400099c0: d2 00 60 0c ld [ %g1 + 0xc ], %o1 400099c4: 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; 400099c8: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 400099cc: 94 07 bf f4 add %fp, -12, %o2 400099d0: 40 00 05 9d call 4000b044 400099d4: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 400099d8: 80 a2 20 00 cmp %o0, 0 400099dc: 12 80 00 04 bne 400099ec 400099e0: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 400099e4: 81 c7 e0 08 ret 400099e8: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 400099ec: 40 00 00 3f call 40009ae8 <== NOT EXECUTED 400099f0: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 400099f4: 81 c7 e0 08 ret <== NOT EXECUTED 400099f8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40009a08 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 40009a08: 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; 40009a0c: e0 06 c0 00 ld [ %i3 ], %l0 if (!device_name_table) 40009a10: 80 a4 20 00 cmp %l0, 0 40009a14: 02 80 00 2f be 40009ad0 40009a18: 03 10 00 42 sethi %hi(0x40010800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 40009a1c: e6 00 60 18 ld [ %g1 + 0x18 ], %l3 ! 40010818 } /* 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 ); 40009a20: a2 10 20 00 clr %l1 for (i = 0; i < rtems_device_table_size; i++) { 40009a24: 80 a4 e0 00 cmp %l3, 0 40009a28: 02 80 00 18 be 40009a88 40009a2c: 82 10 20 00 clr %g1 if (!device_name_table[i].device_name) 40009a30: 85 28 60 04 sll %g1, 4, %g2 40009a34: a9 28 60 02 sll %g1, 2, %l4 40009a38: a8 05 00 02 add %l4, %g2, %l4 40009a3c: 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++) { 40009a40: a2 04 60 01 inc %l1 if (!device_name_table[i].device_name) 40009a44: 80 a4 a0 00 cmp %l2, 0 40009a48: 02 80 00 0d be 40009a7c 40009a4c: a8 04 00 14 add %l0, %l4, %l4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 40009a50: 90 10 00 18 mov %i0, %o0 40009a54: 92 10 00 12 mov %l2, %o1 40009a58: 40 00 10 44 call 4000db68 40009a5c: 94 10 00 19 mov %i1, %o2 40009a60: 80 a2 20 00 cmp %o0, 0 40009a64: 12 80 00 07 bne 40009a80 40009a68: 80 a4 c0 11 cmp %l3, %l1 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 40009a6c: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1 40009a70: 80 a0 60 00 cmp %g1, 0 40009a74: 02 80 00 0b be 40009aa0 40009a78: 03 10 00 42 sethi %hi(0x40010800), %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++) { 40009a7c: 80 a4 c0 11 cmp %l3, %l1 40009a80: 18 bf ff ec bgu 40009a30 40009a84: 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 ); 40009a88: 40 00 0c 98 call 4000cce8 <__errno> 40009a8c: b0 10 3f ff mov -1, %i0 40009a90: 82 10 20 02 mov 2, %g1 40009a94: c2 22 00 00 st %g1, [ %o0 ] } 40009a98: 81 c7 e0 08 ret 40009a9c: 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; 40009aa0: c2 00 61 94 ld [ %g1 + 0x194 ], %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]; 40009aa4: e8 26 c0 00 st %l4, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 40009aa8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40009aac: 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; 40009ab0: 03 10 00 42 sethi %hi(0x40010800), %g1 40009ab4: 82 10 61 48 or %g1, 0x148, %g1 ! 40010948 40009ab8: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 40009abc: 03 10 00 42 sethi %hi(0x40010800), %g1 40009ac0: 82 10 61 00 or %g1, 0x100, %g1 ! 40010900 40009ac4: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 40009ac8: 81 c7 e0 08 ret 40009acc: 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 ); 40009ad0: 40 00 0c 86 call 4000cce8 <__errno> <== NOT EXECUTED 40009ad4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009ad8: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40009adc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009ae0: 81 c7 e0 08 ret <== NOT EXECUTED 40009ae4: 81 e8 00 00 restore <== NOT EXECUTED 40001b9c : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40001b9c: 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( 40001ba0: 23 10 00 42 sethi %hi(0x40010800), %l1 40001ba4: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 ! 40010818 40001ba8: 85 28 60 04 sll %g1, 4, %g2 40001bac: 83 28 60 02 sll %g1, 2, %g1 40001bb0: 40 00 1d f3 call 4000937c <_Workspace_Allocate> 40001bb4: 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) 40001bb8: a0 92 20 00 orcc %o0, 0, %l0 40001bbc: 02 80 00 10 be 40001bfc 40001bc0: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 40001bc4: 92 10 20 00 clr %o1 40001bc8: 85 28 60 04 sll %g1, 4, %g2 40001bcc: 83 28 60 02 sll %g1, 2, %g1 40001bd0: 40 00 2e a6 call 4000d668 40001bd4: 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; 40001bd8: 03 10 00 42 sethi %hi(0x40010800), %g1 40001bdc: 82 10 61 48 or %g1, 0x148, %g1 ! 40010948 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; 40001be0: 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; 40001be4: c2 26 20 24 st %g1, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = &devFS_ops; 40001be8: 03 10 00 42 sethi %hi(0x40010800), %g1 40001bec: 82 10 61 00 or %g1, 0x100, %g1 ! 40010900 40001bf0: 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; } 40001bf4: 81 c7 e0 08 ret 40001bf8: 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 ); 40001bfc: 40 00 2c 3b call 4000cce8 <__errno> <== NOT EXECUTED 40001c00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001c04: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40001c08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001c0c: 81 c7 e0 08 ret <== NOT EXECUTED 40001c10: 81 e8 00 00 restore <== NOT EXECUTED 40001dc4 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 40001dc4: 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; 40001dc8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.command = command; 40001dcc: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; status = rtems_io_control( 40001dd0: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40001dd4: 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; 40001dd8: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; 40001ddc: f4 27 bf f8 st %i2, [ %fp + -8 ] status = rtems_io_control( 40001de0: 40 00 11 37 call 400062bc 40001de4: 94 07 bf f0 add %fp, -16, %o2 np->major, np->minor, (void *) &args ); if ( status ) 40001de8: 80 a2 20 00 cmp %o0, 0 40001dec: 12 80 00 05 bne 40001e00 40001df0: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 40001df4: f0 07 bf fc ld [ %fp + -4 ], %i0 } 40001df8: 81 c7 e0 08 ret 40001dfc: 81 e8 00 00 restore np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40001e00: 40 00 1f 3a call 40009ae8 <== NOT EXECUTED 40001e04: 01 00 00 00 nop <== NOT EXECUTED 40001e08: 81 c7 e0 08 ret <== NOT EXECUTED 40001e0c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40001c14 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40001c14: 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') && 40001c18: c2 4e 00 00 ldsb [ %i0 ], %g1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40001c1c: 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') && 40001c20: 80 a0 60 64 cmp %g1, 0x64 40001c24: 02 80 00 4c be 40001d54 40001c28: 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)) 40001c2c: 03 00 00 3c sethi %hi(0xf000), %g1 40001c30: b2 0e 40 01 and %i1, %g1, %i1 40001c34: 03 00 00 08 sethi %hi(0x2000), %g1 40001c38: 80 a6 40 01 cmp %i1, %g1 40001c3c: 02 80 00 0b be 40001c68 40001c40: 03 00 00 18 sethi %hi(0x6000), %g1 40001c44: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40001c48: 22 80 00 09 be,a 40001c6c <== NOT EXECUTED 40001c4c: e4 07 00 00 ld [ %i4 ], %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40001c50: 40 00 2c 26 call 4000cce8 <__errno> <== NOT EXECUTED 40001c54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001c58: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40001c5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001c60: 81 c7 e0 08 ret <== NOT EXECUTED 40001c64: 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; 40001c68: e4 07 00 00 ld [ %i4 ], %l2 if (!device_name_table) 40001c6c: 80 a4 a0 00 cmp %l2, 0 40001c70: 02 80 00 4d be 40001da4 40001c74: 03 10 00 42 sethi %hi(0x40010800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40001c78: e6 00 60 18 ld [ %g1 + 0x18 ], %l3 ! 40010818 40001c7c: 80 a4 e0 00 cmp %l3, 0 40001c80: 02 80 00 43 be 40001d8c 40001c84: 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 ); 40001c88: a8 10 3f ff mov -1, %l4 40001c8c: 10 80 00 0a b 40001cb4 40001c90: 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) 40001c94: 40 00 2f 2f call 4000d950 40001c98: 01 00 00 00 nop 40001c9c: 80 a2 20 00 cmp %o0, 0 40001ca0: 02 80 00 27 be 40001d3c 40001ca4: 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++){ 40001ca8: 80 a4 40 13 cmp %l1, %l3 40001cac: 1a 80 00 0e bcc 40001ce4 40001cb0: 82 10 00 11 mov %l1, %g1 if (device_name_table[i].device_name == NULL) 40001cb4: 85 28 60 04 sll %g1, 4, %g2 40001cb8: 83 28 60 02 sll %g1, 2, %g1 40001cbc: 82 00 40 02 add %g1, %g2, %g1 40001cc0: d2 04 80 01 ld [ %l2 + %g1 ], %o1 40001cc4: 80 a2 60 00 cmp %o1, 0 40001cc8: 12 bf ff f3 bne 40001c94 40001ccc: 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 ); 40001cd0: 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++){ 40001cd4: a2 04 60 01 inc %l1 40001cd8: 80 a4 40 13 cmp %l1, %l3 40001cdc: 0a bf ff f6 bcs 40001cb4 40001ce0: 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) 40001ce4: 80 a5 3f ff cmp %l4, -1 40001ce8: 02 80 00 29 be 40001d8c 40001cec: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 40001cf0: 7f ff ff 81 call 40001af4 40001cf4: 01 00 00 00 nop 40001cf8: a2 10 00 08 mov %o0, %l1 device_name_table[slot].device_name = (char *)path; 40001cfc: 83 2d 20 04 sll %l4, 4, %g1 device_name_table[slot].device_name_length = strlen(path); 40001d00: 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; 40001d04: a9 2d 20 02 sll %l4, 2, %l4 40001d08: a8 05 00 01 add %l4, %g1, %l4 40001d0c: e0 24 80 14 st %l0, [ %l2 + %l4 ] device_name_table[slot].device_name_length = strlen(path); 40001d10: 40 00 2f 61 call 4000da94 40001d14: 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; 40001d18: 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); 40001d1c: d0 24 a0 04 st %o0, [ %l2 + 4 ] device_name_table[slot].major = major; 40001d20: f4 24 a0 08 st %i2, [ %l2 + 8 ] device_name_table[slot].minor = minor; 40001d24: f6 24 a0 0c st %i3, [ %l2 + 0xc ] device_name_table[slot].mode = mode; _ISR_Enable(level); 40001d28: b0 10 20 00 clr %i0 40001d2c: 7f ff ff 76 call 40001b04 40001d30: 90 10 00 11 mov %l1, %o0 return 0; } 40001d34: 81 c7 e0 08 ret 40001d38: 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 ); 40001d3c: 40 00 2b eb call 4000cce8 <__errno> <== NOT EXECUTED 40001d40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001d44: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 40001d48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001d4c: 81 c7 e0 08 ret <== NOT EXECUTED 40001d50: 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') && 40001d54: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 40001d58: 80 a0 60 65 cmp %g1, 0x65 40001d5c: 12 bf ff b5 bne 40001c30 40001d60: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 40001d64: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 40001d68: 80 a0 60 76 cmp %g1, 0x76 40001d6c: 12 bf ff b1 bne 40001c30 40001d70: 03 00 00 3c sethi %hi(0xf000), %g1 40001d74: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 40001d78: 80 a0 60 00 cmp %g1, 0 40001d7c: 12 bf ff ac bne 40001c2c 40001d80: b0 10 20 00 clr %i0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 40001d84: 81 c7 e0 08 ret 40001d88: 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 ); 40001d8c: 40 00 2b d7 call 4000cce8 <__errno> <== NOT EXECUTED 40001d90: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001d94: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40001d98: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001d9c: 81 c7 e0 08 ret <== NOT EXECUTED 40001da0: 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 ); 40001da4: 40 00 2b d1 call 4000cce8 <__errno> <== NOT EXECUTED 40001da8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001dac: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40001db0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001db4: 81 c7 e0 08 ret <== NOT EXECUTED 40001db8: 81 e8 00 00 restore <== NOT EXECUTED 40001e10 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40001e10: 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; 40001e14: 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; 40001e18: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = iop->flags; 40001e1c: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 40001e20: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 40001e24: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40001e28: 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; 40001e2c: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 40001e30: 94 07 bf f4 add %fp, -12, %o2 40001e34: 40 00 11 7f call 40006430 40001e38: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) 40001e3c: 80 a2 20 00 cmp %o0, 0 40001e40: 12 80 00 04 bne 40001e50 40001e44: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 40001e48: 81 c7 e0 08 ret 40001e4c: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40001e50: 40 00 1f 26 call 40009ae8 <== NOT EXECUTED 40001e54: 01 00 00 00 nop <== NOT EXECUTED return 0; } 40001e58: 81 c7 e0 08 ret <== NOT EXECUTED 40001e5c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40001e60 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40001e60: 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; 40001e64: 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; 40001e68: 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; 40001e6c: 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; 40001e70: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 40001e74: 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; 40001e78: 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( 40001e7c: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED 40001e80: 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; 40001e84: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; 40001e88: 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; 40001e8c: 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( 40001e90: 40 00 11 80 call 40006490 <== NOT EXECUTED 40001e94: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 40001e98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40001e9c: 12 80 00 05 bne 40001eb0 <== NOT EXECUTED 40001ea0: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 40001ea4: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 40001ea8: 81 c7 e0 08 ret <== NOT EXECUTED 40001eac: 81 e8 00 00 restore <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40001eb0: 40 00 1f 0e call 40009ae8 <== NOT EXECUTED 40001eb4: 01 00 00 00 nop <== NOT EXECUTED 40001eb8: 81 c7 e0 08 ret <== NOT EXECUTED 40001ebc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40001ec0 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 40001ec0: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 40001ec4: c2 06 00 00 ld [ %i0 ], %g1 if (!the_dev) 40001ec8: 80 a0 60 00 cmp %g1, 0 40001ecc: 02 80 00 0a be 40001ef4 40001ed0: 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; 40001ed4: 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 ); 40001ed8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 40001edc: c2 00 60 08 ld [ %g1 + 8 ], %g1 buf->st_mode = the_dev->mode; 40001ee0: 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 ); 40001ee4: c2 26 60 18 st %g1, [ %i1 + 0x18 ] 40001ee8: c4 26 60 1c st %g2, [ %i1 + 0x1c ] buf->st_mode = the_dev->mode; return 0; } 40001eec: 81 c7 e0 08 ret 40001ef0: 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 ); 40001ef4: 40 00 2b 7d call 4000cce8 <__errno> <== NOT EXECUTED 40001ef8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001efc: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40001f00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001f04: 81 c7 e0 08 ret <== NOT EXECUTED 40001f08: 81 e8 00 00 restore <== NOT EXECUTED 40001f0c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 40001f0c: 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; 40001f10: 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; 40001f14: 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; 40001f18: 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; 40001f1c: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; args.bytes_moved = 0; 40001f20: 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; 40001f24: 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( 40001f28: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40001f2c: 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; 40001f30: c4 3f bf e8 std %g2, [ %fp + -24 ] args.buffer = (void *) buffer; 40001f34: 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; 40001f38: 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( 40001f3c: 40 00 11 6d call 400064f0 40001f40: 94 07 bf e0 add %fp, -32, %o2 np->major, np->minor, (void *) &args ); if ( status ) 40001f44: 80 a2 20 00 cmp %o0, 0 40001f48: 12 80 00 05 bne 40001f5c 40001f4c: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 40001f50: f0 07 bf fc ld [ %fp + -4 ], %i0 } 40001f54: 81 c7 e0 08 ret 40001f58: 81 e8 00 00 restore np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40001f5c: 40 00 1e e3 call 40009ae8 <== NOT EXECUTED 40001f60: 01 00 00 00 nop <== NOT EXECUTED 40001f64: 81 c7 e0 08 ret <== NOT EXECUTED 40001f68: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000cec4 : */ int device_close( rtems_libio_t *iop ) { 4000cec4: 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; 4000cec8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000cecc: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 4000ced0: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000ced4: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000ced8: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000cedc: 94 07 bf f4 add %fp, -12, %o2 4000cee0: 40 00 05 a2 call 4000e568 4000cee4: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000cee8: 80 a2 20 00 cmp %o0, 0 4000ceec: 12 80 00 04 bne 4000cefc 4000cef0: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000cef4: 81 c7 e0 08 ret 4000cef8: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000cefc: 40 00 07 2a call 4000eba4 <== NOT EXECUTED 4000cf00: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000cf04: 81 c7 e0 08 ret <== NOT EXECUTED 4000cf08: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000cdc4 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000cdc4: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000cdc8: 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; 4000cdcc: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 4000cdd0: 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; 4000cdd4: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000cdd8: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000cddc: 40 00 05 fb call 4000e5c8 4000cde0: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000cde4: 80 a2 20 00 cmp %o0, 0 4000cde8: 12 80 00 05 bne 4000cdfc 4000cdec: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 4000cdf0: f0 07 bf fc ld [ %fp + -4 ], %i0 } 4000cdf4: 81 c7 e0 08 ret 4000cdf8: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000cdfc: 40 00 07 6a call 4000eba4 <== NOT EXECUTED 4000ce00: 01 00 00 00 nop <== NOT EXECUTED 4000ce04: 81 c7 e0 08 ret <== NOT EXECUTED 4000ce08: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000cf0c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000cf0c: 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; 4000cf10: 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; 4000cf14: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000cf18: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 4000cf1c: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 4000cf20: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 4000cf24: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000cf28: 94 07 bf f4 add %fp, -12, %o2 4000cf2c: 40 00 05 bf call 4000e628 4000cf30: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000cf34: 80 a2 20 00 cmp %o0, 0 4000cf38: 12 80 00 04 bne 4000cf48 4000cf3c: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000cf40: 81 c7 e0 08 ret 4000cf44: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000cf48: 40 00 07 17 call 4000eba4 <== NOT EXECUTED 4000cf4c: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000cf50: 81 c7 e0 08 ret <== NOT EXECUTED 4000cf54: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000ce68 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000ce68: 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; 4000ce6c: 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; 4000ce70: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4000ce74: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 4000ce78: 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; 4000ce7c: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000ce80: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 4000ce84: 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; 4000ce88: 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; 4000ce8c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 4000ce90: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000ce94: 40 00 05 fd call 4000e688 <== NOT EXECUTED 4000ce98: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000ce9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cea0: 12 80 00 05 bne 4000ceb4 <== NOT EXECUTED 4000cea4: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000cea8: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 4000ceac: 81 c7 e0 08 ret <== NOT EXECUTED 4000ceb0: 81 e8 00 00 restore <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000ceb4: 40 00 07 3c call 4000eba4 <== NOT EXECUTED 4000ceb8: 01 00 00 00 nop <== NOT EXECUTED 4000cebc: 81 c7 e0 08 ret <== NOT EXECUTED 4000cec0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000ce0c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000ce0c: 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; 4000ce10: 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; 4000ce14: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 4000ce18: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 4000ce1c: 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; 4000ce20: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 4000ce24: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 4000ce28: 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; 4000ce2c: 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; 4000ce30: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 4000ce34: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000ce38: 40 00 06 2c call 4000e6e8 4000ce3c: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000ce40: 80 a2 20 00 cmp %o0, 0 4000ce44: 12 80 00 05 bne 4000ce58 4000ce48: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000ce4c: f0 07 bf fc ld [ %fp + -4 ], %i0 } 4000ce50: 81 c7 e0 08 ret 4000ce54: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000ce58: 40 00 07 53 call 4000eba4 <== NOT EXECUTED 4000ce5c: 01 00 00 00 nop <== NOT EXECUTED 4000ce60: 81 c7 e0 08 ret <== NOT EXECUTED 4000ce64: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003f00 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40003f00: 9d e3 bf a0 save %sp, -96, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40003f04: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40003f08: 80 a0 60 00 cmp %g1, 0 40003f0c: 12 80 00 04 bne 40003f1c 40003f10: 01 00 00 00 nop 40003f14: 81 c7 e0 08 ret 40003f18: 81 e8 00 00 restore rtems_interrupt_disable (level); 40003f1c: 7f ff f7 70 call 40001cdc <== NOT EXECUTED 40003f20: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40003f24: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40003f28: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003f2c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003f30: 02 80 00 14 be 40003f80 <== NOT EXECUTED 40003f34: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40003f38: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED 40003f3c: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40003f40: 7f ff f7 6b call 40001cec <== NOT EXECUTED 40003f44: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40003f48: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40003f4c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003f50: 40 00 06 be call 40005a48 <== NOT EXECUTED 40003f54: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40003f58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003f5c: 12 80 00 0b bne 40003f88 <== NOT EXECUTED 40003f60: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 40003f64: 7f ff f7 5e call 40001cdc <== NOT EXECUTED 40003f68: 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) { 40003f6c: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40003f70: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003f74: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003f78: 32 bf ff f2 bne,a 40003f40 <== NOT EXECUTED 40003f7c: 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); 40003f80: 7f ff f7 5b call 40001cec <== NOT EXECUTED 40003f84: 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); 40003f88: 40 00 08 5f call 40006104 <== NOT EXECUTED 40003f8c: 01 00 00 00 nop 40003f90: 01 00 00 00 nop 40003050 : int dup2( int fildes, int fildes2 ) { 40003050: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40003054: a0 07 bf b8 add %fp, -72, %l0 40003058: 90 10 00 18 mov %i0, %o0 4000305c: 40 00 02 28 call 400038fc 40003060: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40003064: 80 a2 3f ff cmp %o0, -1 40003068: 12 80 00 04 bne 40003078 4000306c: 92 10 00 10 mov %l0, %o1 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 40003070: 81 c7 e0 08 ret 40003074: 91 e8 3f ff restore %g0, -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40003078: 40 00 02 21 call 400038fc 4000307c: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40003080: 80 a2 3f ff cmp %o0, -1 40003084: 02 bf ff fb be 40003070 40003088: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 4000308c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40003090: 40 00 00 cf call 400033cc <== NOT EXECUTED 40003094: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003098: 81 c7 e0 08 ret <== NOT EXECUTED 4000309c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000392c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 4000392c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40003930: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003934: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003938: 02 80 00 0d be 4000396c <== NOT EXECUTED 4000393c: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40003940: 05 10 00 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED 40003944: c4 00 a0 f8 ld [ %g2 + 0xf8 ], %g2 ! 4001d0f8 <__ctype_ptr__> <== NOT EXECUTED 40003948: 82 00 80 08 add %g2, %o0, %g1 <== NOT EXECUTED 4000394c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 40003950: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003954: 02 80 00 06 be 4000396c <== NOT EXECUTED 40003958: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 4000395c: 02 80 00 04 be 4000396c <== NOT EXECUTED 40003960: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40003964: 12 80 00 06 bne 4000397c <== NOT EXECUTED 40003968: 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); 4000396c: 7f ff ff 83 call 40003778 <== NOT EXECUTED 40003970: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003974: 81 c7 e0 08 ret <== NOT EXECUTED 40003978: 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; 4000397c: 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] = '^'; 40003980: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 40003984: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 40003988: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 4000398c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003990: 7f ff ff 2b call 4000363c <== NOT EXECUTED 40003994: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40003998: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 4000399c: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 400039a0: 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')) { 400039a4: 81 c7 e0 08 ret <== NOT EXECUTED 400039a8: 81 e8 00 00 restore <== NOT EXECUTED 40029ec0 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40029ec0: 03 10 01 ba sethi %hi(0x4006e800), %g1 <== NOT EXECUTED 40029ec4: d0 00 62 24 ld [ %g1 + 0x224 ], %o0 ! 4006ea24 <== NOT EXECUTED 40029ec8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029ecc: 02 80 00 05 be 40029ee0 <== NOT EXECUTED 40029ed0: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40029ed4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40029ed8: 40 00 6c fa call 400452c0 <== NOT EXECUTED 40029edc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40029ee0: 81 c3 e0 08 retl <== NOT EXECUTED 40029ee4: 01 00 00 00 nop 40029ee8 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40029ee8: 03 10 01 ba sethi %hi(0x4006e800), %g1 <== NOT EXECUTED 40029eec: d0 00 61 3c ld [ %g1 + 0x13c ], %o0 ! 4006e93c <== NOT EXECUTED 40029ef0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029ef4: 02 80 00 05 be 40029f08 <== NOT EXECUTED 40029ef8: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 40029efc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40029f00: 40 00 6c f0 call 400452c0 <== NOT EXECUTED 40029f04: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40029f08: 81 c3 e0 08 retl <== NOT EXECUTED 40029f0c: 01 00 00 00 nop 400039ac : * 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) { 400039ac: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->ccount == 0) 400039b0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 400039b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400039b8: 02 80 00 36 be 40003a90 <== NOT EXECUTED 400039bc: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 400039c0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400039c4: 12 80 00 35 bne 40003a98 <== NOT EXECUTED 400039c8: 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)) { 400039cc: 27 10 00 74 sethi %hi(0x4001d000), %l3 <== NOT EXECUTED 400039d0: 29 10 00 70 sethi %hi(0x4001c000), %l4 <== NOT EXECUTED 400039d4: 25 10 00 70 sethi %hi(0x4001c000), %l2 <== NOT EXECUTED 400039d8: a6 14 e0 f8 or %l3, 0xf8, %l3 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 400039dc: a8 15 20 98 or %l4, 0x98, %l4 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 400039e0: 10 80 00 0c b 40003a10 <== NOT EXECUTED 400039e4: a4 14 a0 90 or %l2, 0x90, %l2 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 400039e8: 12 80 00 6a bne 40003b90 <== NOT EXECUTED 400039ec: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 400039f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400039f4: 02 80 00 63 be 40003b80 <== NOT EXECUTED 400039f8: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 400039fc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003a00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003a04: 02 80 00 5f be 40003b80 <== NOT EXECUTED 40003a08: 01 00 00 00 nop <== NOT EXECUTED 40003a0c: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 40003a10: c8 04 20 1c ld [ %l0 + 0x1c ], %g4 <== NOT EXECUTED 40003a14: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003a18: c2 24 20 20 st %g1, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40003a1c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003a20: 02 bf ff f4 be 400039f0 <== NOT EXECUTED 40003a24: e2 09 00 01 ldub [ %g4 + %g1 ], %l1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40003a28: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003a2c: 12 80 00 05 bne 40003a40 <== NOT EXECUTED 40003a30: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED 40003a34: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED 40003a38: 22 80 00 54 be,a 40003b88 <== NOT EXECUTED 40003a3c: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 40003a40: 80 a4 60 09 cmp %l1, 9 <== NOT EXECUTED 40003a44: 02 80 00 24 be 40003ad4 <== NOT EXECUTED 40003a48: 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)) { 40003a4c: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40003a50: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 40003a54: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003a58: 12 bf ff e4 bne 400039e8 <== NOT EXECUTED 40003a5c: 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); 40003a60: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 40003a64: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003a68: 90 12 20 98 or %o0, 0x98, %o0 <== NOT EXECUTED 40003a6c: 7f ff fe f4 call 4000363c <== NOT EXECUTED 40003a70: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40003a74: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003a78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003a7c: 02 bf ff de be 400039f4 <== NOT EXECUTED 40003a80: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40003a84: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } } } if (!lineFlag) 40003a88: 12 bf ff dd bne 400039fc <== NOT EXECUTED 40003a8c: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED 40003a90: 81 c7 e0 08 ret <== NOT EXECUTED 40003a94: 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)) { 40003a98: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003a9c: 02 80 00 38 be 40003b7c <== NOT EXECUTED 40003aa0: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 40003aa4: 12 bf ff cb bne 400039d0 <== NOT EXECUTED 40003aa8: 27 10 00 74 sethi %hi(0x4001d000), %l3 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40003aac: 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; 40003ab0: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40003ab4: 7f ff ff 9e call 4000392c <== NOT EXECUTED 40003ab8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40003abc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40003ac0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003ac4: 02 bf ff f3 be 40003a90 <== NOT EXECUTED 40003ac8: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 40003acc: 7f ff ff 98 call 4000392c <== NOT EXECUTED 40003ad0: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003ad4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ad8: 02 80 00 17 be 40003b34 <== NOT EXECUTED 40003adc: 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) 40003ae0: 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)) { 40003ae4: d8 04 c0 00 ld [ %l3 ], %o4 <== NOT EXECUTED 40003ae8: 10 80 00 07 b 40003b04 <== NOT EXECUTED 40003aec: 84 10 20 00 clr %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40003af0: 32 80 00 02 bne,a 40003af8 <== NOT EXECUTED 40003af4: a2 04 60 02 add %l1, 2, %l1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003af8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003afc: 22 80 00 0f be,a 40003b38 <== NOT EXECUTED 40003b00: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 40003b04: c6 09 00 02 ldub [ %g4 + %g2 ], %g3 <== NOT EXECUTED 40003b08: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (c == '\t') { 40003b0c: 80 a0 e0 09 cmp %g3, 9 <== NOT EXECUTED 40003b10: 02 80 00 18 be 40003b70 <== NOT EXECUTED 40003b14: 9a 03 00 03 add %o4, %g3, %o5 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 40003b18: c6 0b 60 01 ldub [ %o5 + 1 ], %g3 <== NOT EXECUTED 40003b1c: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40003b20: 12 bf ff f4 bne 40003af0 <== NOT EXECUTED 40003b24: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003b28: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003b2c: 12 bf ff f6 bne 40003b04 <== NOT EXECUTED 40003b30: a2 04 60 01 inc %l1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003b34: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003b38: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40003b3c: 16 bf ff ae bge 400039f4 <== NOT EXECUTED 40003b40: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40003b44: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003b48: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003b4c: 7f ff fe bc call 4000363c <== NOT EXECUTED 40003b50: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 40003b54: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003b58: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003b5c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40003b60: 06 bf ff f9 bl 40003b44 <== NOT EXECUTED 40003b64: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003b68: 10 bf ff a3 b 400039f4 <== NOT EXECUTED 40003b6c: 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; 40003b70: a2 14 60 07 or %l1, 7, %l1 <== NOT EXECUTED 40003b74: 10 bf ff e1 b 40003af8 <== NOT EXECUTED 40003b78: a2 04 60 01 inc %l1 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 40003b7c: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 40003b80: 81 c7 e0 08 ret <== NOT EXECUTED 40003b84: 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); 40003b88: 7f ff ff 69 call 4000392c <== NOT EXECUTED 40003b8c: 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); 40003b90: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003b94: 7f ff fe aa call 4000363c <== NOT EXECUTED 40003b98: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40003b9c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003ba0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ba4: 22 80 00 05 be,a 40003bb8 <== NOT EXECUTED 40003ba8: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED tty->column--; 40003bac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003bb0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40003bb4: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40003bb8: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 40003bbc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003bc0: 02 bf ff a9 be 40003a64 <== NOT EXECUTED 40003bc4: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 40003bc8: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED 40003bcc: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 40003bd0: 12 bf ff a6 bne 40003a68 <== NOT EXECUTED 40003bd4: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003bd8: 10 bf ff 87 b 400039f4 <== NOT EXECUTED 40003bdc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4003e614 : #include int fchdir( int fd ) { 4003e614: 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 ); 4003e618: 03 10 01 aa sethi %hi(0x4006a800), %g1 <== NOT EXECUTED 4003e61c: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 4006abc4 <== NOT EXECUTED 4003e620: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4003e624: 1a 80 00 55 bcc 4003e778 <== NOT EXECUTED 4003e628: 03 10 01 bb sethi %hi(0x4006ec00), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4003e62c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 4006ec28 <== NOT EXECUTED 4003e630: 85 2e 20 06 sll %i0, 6, %g2 <== NOT EXECUTED 4003e634: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4003e638: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 4003e63c: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4003e640: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4003e644: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4003e648: 02 80 00 4c be 4003e778 <== NOT EXECUTED 4003e64c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003e650: 02 80 00 5d be 4003e7c4 <== NOT EXECUTED 4003e654: 01 00 00 00 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4003e658: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 4003e65c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003e660: 02 80 00 5f be 4003e7dc <== NOT EXECUTED 4003e664: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4003e668: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4003e66c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003e670: 02 80 00 5b be 4003e7dc <== NOT EXECUTED 4003e674: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4003e678: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003e67c: 90 06 20 1c add %i0, 0x1c, %o0 <== NOT EXECUTED 4003e680: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4003e684: 12 80 00 37 bne 4003e760 <== NOT EXECUTED 4003e688: 21 10 01 ab sethi %hi(0x4006ac00), %l0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003e68c: c2 04 22 b8 ld [ %l0 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003e690: 11 10 01 88 sethi %hi(0x40062000), %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003e694: 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)) { 4003e698: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003e69c: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4003e6a0: 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)) { 4003e6a4: 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; 4003e6a8: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4003e6ac: 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)) { 4003e6b0: 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; 4003e6b4: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4003e6b8: 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)) { 4003e6bc: 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; 4003e6c0: c4 27 bf e4 st %g2, [ %fp + -28 ] <== NOT EXECUTED 4003e6c4: 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)) { 4003e6c8: 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; 4003e6cc: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4003e6d0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED 4003e6d4: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003e6d8: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED 4003e6dc: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003e6e0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED 4003e6e4: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003e6e8: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 <== NOT EXECUTED 4003e6ec: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003e6f0: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003e6f4: 7f ff 22 7e call 400070ec <== NOT EXECUTED 4003e6f8: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED 4003e6fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4003e700: 12 80 00 24 bne 4003e790 <== NOT EXECUTED 4003e704: 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 ); 4003e708: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003e70c: 02 80 00 09 be 4003e730 <== NOT EXECUTED 4003e710: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4003e714: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4003e718: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003e71c: 22 80 00 06 be,a 4003e734 <== NOT EXECUTED 4003e720: c2 04 22 b8 ld [ %l0 + 0x2b8 ], %g1 <== NOT EXECUTED 4003e724: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003e728: 90 07 bf d8 add %fp, -40, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4003e72c: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4003e730: c2 04 22 b8 ld [ %l0 + 0x2b8 ], %g1 <== NOT EXECUTED 4003e734: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003e738: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED 4003e73c: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003e740: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 4003e744: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003e748: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 4003e74c: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003e750: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 4003e754: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return 0; } 4003e758: 81 c7 e0 08 ret <== NOT EXECUTED 4003e75c: 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 ); 4003e760: 40 00 1a 80 call 40045160 <__errno> <== NOT EXECUTED 4003e764: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003e768: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 4003e76c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003e770: 81 c7 e0 08 ret <== NOT EXECUTED 4003e774: 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); 4003e778: 40 00 1a 7a call 40045160 <__errno> <== NOT EXECUTED 4003e77c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003e780: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4003e784: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003e788: 81 c7 e0 08 ret <== NOT EXECUTED 4003e78c: 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; 4003e790: c4 07 bf d8 ld [ %fp + -40 ], %g2 <== NOT EXECUTED 4003e794: c2 04 22 b8 ld [ %l0 + 0x2b8 ], %g1 <== NOT EXECUTED 4003e798: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003e79c: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED 4003e7a0: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003e7a4: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED 4003e7a8: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003e7ac: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 4003e7b0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003e7b4: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 4003e7b8: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return -1; 4003e7bc: 81 c7 e0 08 ret <== NOT EXECUTED 4003e7c0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003e7c4: 40 00 1a 67 call 40045160 <__errno> <== NOT EXECUTED 4003e7c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003e7cc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4003e7d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003e7d4: 81 c7 e0 08 ret <== NOT EXECUTED 4003e7d8: 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 ); 4003e7dc: 40 00 1a 61 call 40045160 <__errno> <== NOT EXECUTED 4003e7e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003e7e4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4003e7e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003e7ec: 81 c7 e0 08 ret <== NOT EXECUTED 4003e7f0: 81 e8 00 00 restore <== NOT EXECUTED 400299f8 : int fchmod( int fd, mode_t mode ) { 400299f8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400299fc: 03 10 01 aa sethi %hi(0x4006a800), %g1 <== NOT EXECUTED 40029a00: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 4006abc4 <== NOT EXECUTED 40029a04: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40029a08: 1a 80 00 19 bcc 40029a6c <== NOT EXECUTED 40029a0c: 03 10 01 bb sethi %hi(0x4006ec00), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40029a10: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 ! 4006ec28 <== NOT EXECUTED 40029a14: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40029a18: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 40029a1c: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 40029a20: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40029a24: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 40029a28: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40029a2c: 02 80 00 10 be 40029a6c <== NOT EXECUTED 40029a30: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40029a34: 02 80 00 14 be 40029a84 <== NOT EXECUTED 40029a38: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 40029a3c: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 <== NOT EXECUTED 40029a40: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40029a44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40029a48: 02 80 00 15 be 40029a9c <== NOT EXECUTED 40029a4c: 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 ); 40029a50: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED 40029a54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40029a58: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40029a5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40029a60: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 40029a64: 81 c7 e0 08 ret <== NOT EXECUTED 40029a68: 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); 40029a6c: 40 00 6d bd call 40045160 <__errno> <== NOT EXECUTED 40029a70: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029a74: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40029a78: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029a7c: 81 c7 e0 08 ret <== NOT EXECUTED 40029a80: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40029a84: 40 00 6d b7 call 40045160 <__errno> <== NOT EXECUTED 40029a88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029a8c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40029a90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029a94: 81 c7 e0 08 ret <== NOT EXECUTED 40029a98: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40029a9c: 40 00 6d b1 call 40045160 <__errno> <== NOT EXECUTED 40029aa0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029aa4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40029aa8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029aac: 81 c7 e0 08 ret <== NOT EXECUTED 40029ab0: 81 e8 00 00 restore <== NOT EXECUTED 40029ab4 : int fchown( int fd, uid_t owner, gid_t group ) { 40029ab4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40029ab8: 03 10 01 aa sethi %hi(0x4006a800), %g1 <== NOT EXECUTED 40029abc: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 4006abc4 <== NOT EXECUTED 40029ac0: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40029ac4: 1a 80 00 19 bcc 40029b28 <== NOT EXECUTED 40029ac8: 03 10 01 bb sethi %hi(0x4006ec00), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40029acc: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 ! 4006ec28 <== NOT EXECUTED 40029ad0: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40029ad4: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 40029ad8: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 40029adc: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40029ae0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 40029ae4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40029ae8: 02 80 00 10 be 40029b28 <== NOT EXECUTED 40029aec: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40029af0: 02 80 00 14 be 40029b40 <== NOT EXECUTED 40029af4: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 40029af8: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 40029afc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40029b00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40029b04: 02 80 00 15 be 40029b58 <== NOT EXECUTED 40029b08: 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 ); 40029b0c: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 40029b10: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40029b14: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED 40029b18: 9f c0 40 00 call %g1 <== NOT EXECUTED 40029b1c: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 40029b20: 81 c7 e0 08 ret <== NOT EXECUTED 40029b24: 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); 40029b28: 40 00 6d 8e call 40045160 <__errno> <== NOT EXECUTED 40029b2c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029b30: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40029b34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029b38: 81 c7 e0 08 ret <== NOT EXECUTED 40029b3c: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40029b40: 40 00 6d 88 call 40045160 <__errno> <== NOT EXECUTED 40029b44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029b48: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40029b4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029b50: 81 c7 e0 08 ret <== NOT EXECUTED 40029b54: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40029b58: 40 00 6d 82 call 40045160 <__errno> <== NOT EXECUTED 40029b5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029b60: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40029b64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029b68: 81 c7 e0 08 ret <== NOT EXECUTED 40029b6c: 81 e8 00 00 restore <== NOT EXECUTED 4003e81c : int fcntl( int fd, int cmd, ... ) { 4003e81c: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003e820: 03 10 01 aa sethi %hi(0x4006a800), %g1 4003e824: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 4006abc4 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4003e828: 84 07 a0 4c add %fp, 0x4c, %g2 4003e82c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4003e830: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4003e834: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4003e838: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003e83c: 80 a6 00 01 cmp %i0, %g1 4003e840: 1a 80 00 7a bcc 4003ea28 4003e844: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 4003e848: 21 10 01 bb sethi %hi(0x4006ec00), %l0 4003e84c: c6 04 20 28 ld [ %l0 + 0x28 ], %g3 ! 4006ec28 4003e850: 89 2e 20 06 sll %i0, 6, %g4 4003e854: 93 2e 20 03 sll %i0, 3, %o1 4003e858: 92 02 40 04 add %o1, %g4, %o1 4003e85c: 92 00 c0 09 add %g3, %o1, %o1 rtems_libio_check_is_open(iop); 4003e860: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 4003e864: 80 8a 21 00 btst 0x100, %o0 4003e868: 02 80 00 70 be 4003ea28 4003e86c: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003e870: 08 80 00 08 bleu 4003e890 4003e874: 89 2e 60 02 sll %i1, 2, %g4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 4003e878: 40 00 1a 3a call 40045160 <__errno> 4003e87c: b0 10 3f ff mov -1, %i0 4003e880: 82 10 20 16 mov 0x16, %g1 4003e884: c2 22 00 00 st %g1, [ %o0 ] 4003e888: 81 c7 e0 08 ret 4003e88c: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003e890: 1b 10 00 f9 sethi %hi(0x4003e400), %o5 4003e894: 9a 13 63 f4 or %o5, 0x3f4, %o5 ! 4003e7f4 4003e898: c8 03 40 04 ld [ %o5 + %g4 ], %g4 4003e89c: 81 c1 00 00 jmp %g4 4003e8a0: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4003e8a4: 40 00 1a 2f call 40045160 <__errno> 4003e8a8: b0 10 3f ff mov -1, %i0 ! ffffffff 4003e8ac: 82 10 20 86 mov 0x86, %g1 4003e8b0: c2 22 00 00 st %g1, [ %o0 ] 4003e8b4: 81 c7 e0 08 ret 4003e8b8: 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 ) ); 4003e8bc: d0 00 80 00 ld [ %g2 ], %o0 4003e8c0: 7f ff 23 84 call 400076d0 4003e8c4: 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); 4003e8c8: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003e8cc: 90 0a 22 01 and %o0, 0x201, %o0 4003e8d0: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 4003e8d4: b0 10 20 00 clr %i0 4003e8d8: 82 08 7d fe and %g1, -514, %g1 4003e8dc: 82 12 00 01 or %o0, %g1, %g1 4003e8e0: 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) { 4003e8e4: c2 02 60 40 ld [ %o1 + 0x40 ], %g1 4003e8e8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4003e8ec: 80 a0 60 00 cmp %g1, 0 4003e8f0: 02 80 00 52 be 4003ea38 4003e8f4: 01 00 00 00 nop int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4003e8f8: 9f c0 40 00 call %g1 4003e8fc: 90 10 00 19 mov %i1, %o0 if (err) { 4003e900: b2 92 20 00 orcc %o0, 0, %i1 4003e904: 12 80 00 04 bne 4003e914 4003e908: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4003e90c: 81 c7 e0 08 ret 4003e910: 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; 4003e914: 40 00 1a 13 call 40045160 <__errno> <== NOT EXECUTED 4003e918: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003e91c: 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; } 4003e920: 81 c7 e0 08 ret <== NOT EXECUTED 4003e924: 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 ); 4003e928: 7f ff 22 ba call 40007410 4003e92c: d2 27 bf f4 st %o1, [ %fp + -12 ] 4003e930: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003e934: 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) { 4003e938: 80 a6 20 00 cmp %i0, 0 4003e93c: 36 bf ff eb bge,a 4003e8e8 4003e940: 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; } 4003e944: 81 c7 e0 08 ret <== NOT EXECUTED 4003e948: 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 ) ) 4003e94c: c2 00 80 00 ld [ %g2 ], %g1 4003e950: 80 a0 60 00 cmp %g1, 0 4003e954: 22 80 00 2c be,a 4003ea04 4003e958: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 4003e95c: 90 12 28 00 or %o0, 0x800, %o0 4003e960: b0 10 20 00 clr %i0 4003e964: 10 bf ff e0 b 4003e8e4 4003e968: 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); 4003e96c: b1 32 20 0b srl %o0, 0xb, %i0 4003e970: 10 bf ff dd b 4003e8e4 4003e974: 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 ); 4003e978: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 4003e97c: 80 a0 a0 00 cmp %g2, 0 4003e980: 02 80 00 30 be 4003ea40 4003e984: 80 a0 40 02 cmp %g1, %g2 diop = rtems_libio_iop( fd2 ); 4003e988: b0 10 20 00 clr %i0 <== NOT EXECUTED 4003e98c: 18 80 00 21 bgu 4003ea10 <== NOT EXECUTED 4003e990: 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; 4003e994: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 4003e998: da 02 60 40 ld [ %o1 + 0x40 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003e99c: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4003e9a0: c4 02 60 20 ld [ %o1 + 0x20 ], %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003e9a4: c8 02 60 3c ld [ %o1 + 0x3c ], %g4 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003e9a8: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4003e9ac: c4 02 60 24 ld [ %o1 + 0x24 ], %g2 ret = (int) (diop - rtems_libio_iops); 4003e9b0: 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; 4003e9b4: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 4003e9b8: c4 02 60 28 ld [ %o1 + 0x28 ], %g2 ret = (int) (diop - rtems_libio_iops); 4003e9bc: 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; 4003e9c0: c4 20 60 28 st %g2, [ %g1 + 0x28 ] 4003e9c4: c4 02 60 2c ld [ %o1 + 0x2c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 4003e9c8: da 20 60 40 st %o5, [ %g1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003e9cc: c4 20 60 2c st %g2, [ %g1 + 0x2c ] ret = (int) (diop - rtems_libio_iops); 4003e9d0: 85 28 e0 06 sll %g3, 6, %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003e9d4: c8 20 60 3c st %g4, [ %g1 + 0x3c ] diop->flags = iop->flags; 4003e9d8: d0 20 60 18 st %o0, [ %g1 + 0x18 ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 4003e9dc: 83 28 e0 03 sll %g3, 3, %g1 4003e9e0: 82 20 80 01 sub %g2, %g1, %g1 4003e9e4: 85 28 60 06 sll %g1, 6, %g2 4003e9e8: 82 00 40 02 add %g1, %g2, %g1 4003e9ec: 82 00 40 03 add %g1, %g3, %g1 4003e9f0: b1 28 60 0f sll %g1, 0xf, %i0 4003e9f4: b0 26 00 01 sub %i0, %g1, %i0 4003e9f8: b1 2e 20 03 sll %i0, 3, %i0 4003e9fc: 10 bf ff cf b 4003e938 4003ea00: 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; 4003ea04: b0 10 20 00 clr %i0 <== NOT EXECUTED 4003ea08: 10 bf ff b7 b 4003e8e4 <== NOT EXECUTED 4003ea0c: 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 ); 4003ea10: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 4003ea14: 85 28 a0 03 sll %g2, 3, %g2 <== NOT EXECUTED 4003ea18: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 4003ea1c: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 4003ea20: 10 bf ff dd b 4003e994 <== NOT EXECUTED 4003ea24: 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); 4003ea28: 40 00 19 ce call 40045160 <__errno> <== NOT EXECUTED 4003ea2c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003ea30: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4003ea34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003ea38: 81 c7 e0 08 ret <== NOT EXECUTED 4003ea3c: 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(); 4003ea40: 7f ff 22 e3 call 400075cc 4003ea44: d2 27 bf f4 st %o1, [ %fp + -12 ] if ( diop == 0 ) { 4003ea48: b0 10 3f ff mov -1, %i0 4003ea4c: 82 92 20 00 orcc %o0, 0, %g1 4003ea50: 02 bf ff 8e be 4003e888 4003ea54: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003ea58: c6 04 20 28 ld [ %l0 + 0x28 ], %g3 4003ea5c: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 4003ea60: 10 bf ff cd b 4003e994 4003ea64: b0 10 00 01 mov %g1, %i0 4000d554 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d554: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d558: 21 10 00 75 sethi %hi(0x4001d400), %l0 4000d55c: d0 04 23 0c ld [ %l0 + 0x30c ], %o0 ! 4001d70c */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d560: a2 10 00 18 mov %i0, %l1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d564: 92 10 20 00 clr %o1 4000d568: 94 10 20 00 clr %o2 4000d56c: 7f ff e1 37 call 40005a48 4000d570: b0 10 3f fc mov -4, %i0 4000d574: 80 a2 20 00 cmp %o0, 0 4000d578: 12 80 01 0c bne 4000d9a8 4000d57c: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4000d580: e4 04 40 00 ld [ %l1 ], %l2 <== NOT EXECUTED if (pipe == NULL) { 4000d584: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4000d588: 02 80 00 8e be 4000d7c0 <== NOT EXECUTED 4000d58c: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000d590: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED 4000d594: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d598: 7f ff e1 2c call 40005a48 <== NOT EXECUTED 4000d59c: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000d5a0: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000d5a4: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000d5a8: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000d5ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000d5b0: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000d5b4: 02 80 00 67 be 4000d750 <== NOT EXECUTED 4000d5b8: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000d5bc: 7f ff e1 6a call 40005b64 <== NOT EXECUTED 4000d5c0: d0 04 23 0c ld [ %l0 + 0x30c ], %o0 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4000d5c4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d5c8: 12 80 00 f8 bne 4000d9a8 <== NOT EXECUTED 4000d5cc: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000d5d0: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 4000d5d4: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000d5d8: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000d5dc: 02 80 00 35 be 4000d6b0 <== NOT EXECUTED 4000d5e0: e0 04 40 00 ld [ %l1 ], %l0 <== NOT EXECUTED 4000d5e4: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000d5e8: 02 80 00 61 be 4000d76c <== NOT EXECUTED 4000d5ec: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000d5f0: 22 80 00 07 be,a 4000d60c <== NOT EXECUTED 4000d5f4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4000d5f8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d5fc: 7f ff e1 5a call 40005b64 <== NOT EXECUTED 4000d600: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 4000d604: 81 c7 e0 08 ret <== NOT EXECUTED 4000d608: 81 e8 00 00 restore <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000d60c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000d610: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000d614: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000d618: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 4000d61c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d620: 02 80 00 cc be 4000d950 <== NOT EXECUTED 4000d624: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4000d628: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000d62c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d630: 32 bf ff f3 bne,a 4000d5fc <== NOT EXECUTED 4000d634: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4000d638: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 4000d63c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d640: 32 bf ff ef bne,a 4000d5fc <== NOT EXECUTED 4000d644: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4000d648: 10 80 00 0c b 4000d678 <== NOT EXECUTED 4000d64c: 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)) 4000d650: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d654: 7f ff e0 fd call 40005a48 <== NOT EXECUTED 4000d658: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d65c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d660: 12 80 00 0f bne 4000d69c <== NOT EXECUTED 4000d664: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4000d668: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 4000d66c: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 4000d670: 32 bf ff e3 bne,a 4000d5fc <== NOT EXECUTED 4000d674: 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); 4000d678: 7f ff e1 3b call 40005b64 <== NOT EXECUTED 4000d67c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000d680: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d684: 40 00 03 36 call 4000e35c <== NOT EXECUTED 4000d688: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d68c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d690: 22 bf ff f0 be,a 4000d650 <== NOT EXECUTED 4000d694: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4000d698: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4000d69c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000d6a0: 7f ff ff 5b call 4000d40c <== NOT EXECUTED 4000d6a4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 4000d6a8: 81 c7 e0 08 ret <== NOT EXECUTED 4000d6ac: 81 e8 00 00 restore <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4000d6b0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d6b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d6b8: 32 80 00 06 bne,a 4000d6d0 <== NOT EXECUTED 4000d6bc: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 4000d6c0: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000d6c4: 12 bf ff f6 bne 4000d69c <== NOT EXECUTED 4000d6c8: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000d6cc: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000d6d0: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000d6d4: 88 00 a0 01 add %g2, 1, %g4 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000d6d8: 86 00 e0 01 inc %g3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000d6dc: c8 24 20 14 st %g4, [ %l0 + 0x14 ] <== NOT EXECUTED 4000d6e0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d6e4: 02 80 00 a0 be 4000d964 <== NOT EXECUTED 4000d6e8: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 4000d6ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d6f0: 32 bf ff c3 bne,a 4000d5fc <== NOT EXECUTED 4000d6f4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED prevCounter = pipe->readerCounter; 4000d6f8: 10 80 00 0c b 4000d728 <== NOT EXECUTED 4000d6fc: 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)) 4000d700: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d704: 7f ff e0 d1 call 40005a48 <== NOT EXECUTED 4000d708: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d70c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d710: 12 bf ff e3 bne 4000d69c <== NOT EXECUTED 4000d714: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4000d718: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 4000d71c: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 4000d720: 32 bf ff b7 bne,a 4000d5fc <== NOT EXECUTED 4000d724: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4000d728: 7f ff e1 0f call 40005b64 <== NOT EXECUTED 4000d72c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000d730: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d734: 40 00 03 0a call 4000e35c <== NOT EXECUTED 4000d738: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d73c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d740: 22 bf ff f0 be,a 4000d700 <== NOT EXECUTED 4000d744: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4000d748: 10 bf ff d5 b 4000d69c <== NOT EXECUTED 4000d74c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4000d750: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d754: 12 80 00 89 bne 4000d978 <== NOT EXECUTED 4000d758: d0 04 23 0c ld [ %l0 + 0x30c ], %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000d75c: 7f ff e1 02 call 40005b64 <== NOT EXECUTED 4000d760: e4 24 40 00 st %l2, [ %l1 ] <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000d764: 10 bf ff 9c b 4000d5d4 <== NOT EXECUTED 4000d768: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000d76c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000d770: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000d774: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000d778: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000d77c: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 4000d780: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d784: 02 80 00 6e be 4000d93c <== NOT EXECUTED 4000d788: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000d78c: 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 ++; 4000d790: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000d794: 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 ++; 4000d798: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000d79c: c6 24 20 14 st %g3, [ %l0 + 0x14 ] <== NOT EXECUTED 4000d7a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d7a4: 12 bf ff 95 bne 4000d5f8 <== NOT EXECUTED 4000d7a8: c4 24 20 24 st %g2, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000d7ac: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d7b0: 40 00 02 d4 call 4000e300 <== NOT EXECUTED 4000d7b4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4000d7b8: 10 bf ff 91 b 4000d5fc <== NOT EXECUTED 4000d7bc: 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)); 4000d7c0: 7f ff f6 78 call 4000b1a0 <== NOT EXECUTED 4000d7c4: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 4000d7c8: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 4000d7cc: 02 bf ff 7c be 4000d5bc <== NOT EXECUTED 4000d7d0: a4 10 00 13 mov %l3, %l2 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4000d7d4: 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)); 4000d7d8: c0 24 c0 00 clr [ %l3 ] <== NOT EXECUTED 4000d7dc: c0 24 e0 08 clr [ %l3 + 8 ] <== NOT EXECUTED 4000d7e0: c0 24 e0 0c clr [ %l3 + 0xc ] <== NOT EXECUTED 4000d7e4: c0 24 e0 10 clr [ %l3 + 0x10 ] <== NOT EXECUTED 4000d7e8: c0 24 e0 14 clr [ %l3 + 0x14 ] <== NOT EXECUTED 4000d7ec: c0 24 e0 18 clr [ %l3 + 0x18 ] <== NOT EXECUTED 4000d7f0: c0 24 e0 1c clr [ %l3 + 0x1c ] <== NOT EXECUTED 4000d7f4: c0 24 e0 20 clr [ %l3 + 0x20 ] <== NOT EXECUTED 4000d7f8: c0 24 e0 24 clr [ %l3 + 0x24 ] <== NOT EXECUTED 4000d7fc: c0 24 e0 28 clr [ %l3 + 0x28 ] <== NOT EXECUTED 4000d800: c0 24 e0 2c clr [ %l3 + 0x2c ] <== NOT EXECUTED 4000d804: c0 24 e0 30 clr [ %l3 + 0x30 ] <== NOT EXECUTED pipe->Size = PIPE_BUF; 4000d808: c2 24 e0 04 st %g1, [ %l3 + 4 ] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4000d80c: 7f ff f6 65 call 4000b1a0 <== NOT EXECUTED 4000d810: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED if (! pipe->Buffer) 4000d814: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d818: 02 80 00 46 be 4000d930 <== NOT EXECUTED 4000d81c: d0 24 c0 00 st %o0, [ %l3 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4000d820: 29 10 00 74 sethi %hi(0x4001d000), %l4 <== NOT EXECUTED 4000d824: d0 4d 20 e4 ldsb [ %l4 + 0xe4 ], %o0 ! 4001d0e4 <== NOT EXECUTED 4000d828: 2b 14 12 5c sethi %hi(0x50497000), %l5 <== NOT EXECUTED 4000d82c: 82 15 62 00 or %l5, 0x200, %g1 ! 50497200 <== NOT EXECUTED 4000d830: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d834: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000d838: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d83c: 40 00 02 5f call 4000e1b8 <== NOT EXECUTED 4000d840: 96 04 e0 2c add %l3, 0x2c, %o3 <== NOT EXECUTED 4000d844: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d848: 32 80 00 38 bne,a 4000d928 <== NOT EXECUTED 4000d84c: 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( 4000d850: d0 4d 20 e4 ldsb [ %l4 + 0xe4 ], %o0 <== NOT EXECUTED 4000d854: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 4000d858: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 4000d85c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d860: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000d864: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d868: 40 00 02 54 call 4000e1b8 <== NOT EXECUTED 4000d86c: 96 04 e0 30 add %l3, 0x30, %o3 <== NOT EXECUTED 4000d870: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d874: 12 80 00 2a bne 4000d91c <== NOT EXECUTED 4000d878: 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( 4000d87c: d0 4d 20 e4 ldsb [ %l4 + 0xe4 ], %o0 <== NOT EXECUTED 4000d880: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000d884: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED 4000d888: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000d88c: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000d890: 7f ff df cd call 400057c4 <== NOT EXECUTED 4000d894: 98 04 e0 28 add %l3, 0x28, %o4 <== NOT EXECUTED 4000d898: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d89c: 12 80 00 1e bne 4000d914 <== NOT EXECUTED 4000d8a0: 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 *) 4000d8a4: d2 04 e0 2c ld [ %l3 + 0x2c ], %o1 <== NOT EXECUTED 4000d8a8: 2b 10 00 78 sethi %hi(0x4001e000), %l5 <== NOT EXECUTED 4000d8ac: 94 10 00 16 mov %l6, %o2 <== NOT EXECUTED 4000d8b0: 7f ff e6 be call 400073a8 <_Objects_Get> <== NOT EXECUTED 4000d8b4: 90 15 62 d0 or %l5, 0x2d0, %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 4000d8b8: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 4000d8bc: 27 04 00 00 sethi %hi(0x10000000), %l3 <== NOT EXECUTED 4000d8c0: 82 10 40 13 or %g1, %l3, %g1 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4000d8c4: 7f ff e9 2d call 40007d78 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000d8c8: c2 22 20 4c st %g1, [ %o0 + 0x4c ] <== NOT EXECUTED 4000d8cc: d2 04 a0 30 ld [ %l2 + 0x30 ], %o1 <== NOT EXECUTED 4000d8d0: 94 10 00 16 mov %l6, %o2 <== NOT EXECUTED 4000d8d4: 7f ff e6 b5 call 400073a8 <_Objects_Get> <== NOT EXECUTED 4000d8d8: 90 15 62 d0 or %l5, 0x2d0, %o0 <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4000d8dc: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 4000d8e0: a6 10 40 13 or %g1, %l3, %l3 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4000d8e4: 7f ff e9 25 call 40007d78 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000d8e8: e6 22 20 4c st %l3, [ %o0 + 0x4c ] <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4000d8ec: c2 0d 20 e4 ldub [ %l4 + 0xe4 ], %g1 <== NOT EXECUTED 4000d8f0: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4000d8f4: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4000d8f8: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000d8fc: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 4000d900: 12 bf ff 24 bne 4000d590 <== NOT EXECUTED 4000d904: c4 2d 20 e4 stb %g2, [ %l4 + 0xe4 ] <== NOT EXECUTED c = 'a'; 4000d908: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 4000d90c: 10 bf ff 21 b 4000d590 <== NOT EXECUTED 4000d910: c2 2d 20 e4 stb %g1, [ %l4 + 0xe4 ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4000d914: 40 00 02 61 call 4000e298 <== NOT EXECUTED 4000d918: d0 04 e0 30 ld [ %l3 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4000d91c: 40 00 02 5f call 4000e298 <== NOT EXECUTED 4000d920: d0 04 e0 2c ld [ %l3 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4000d924: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED 4000d928: 7f ff f4 9e call 4000aba0 <== NOT EXECUTED 4000d92c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 4000d930: 7f ff f4 9c call 4000aba0 <== NOT EXECUTED 4000d934: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4000d938: 30 bf ff 21 b,a 4000d5bc <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4000d93c: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d940: 40 00 02 70 call 4000e300 <== NOT EXECUTED 4000d944: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000d948: 10 bf ff 92 b 4000d790 <== NOT EXECUTED 4000d94c: 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); 4000d950: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d954: 40 00 02 6b call 4000e300 <== NOT EXECUTED 4000d958: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 4000d95c: 10 bf ff 34 b 4000d62c <== NOT EXECUTED 4000d960: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4000d964: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d968: 40 00 02 66 call 4000e300 <== NOT EXECUTED 4000d96c: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 4000d970: 10 bf ff 5f b 4000d6ec <== NOT EXECUTED 4000d974: 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); 4000d978: 40 00 02 48 call 4000e298 <== NOT EXECUTED 4000d97c: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000d980: 40 00 02 46 call 4000e298 <== NOT EXECUTED 4000d984: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000d988: 7f ff e0 03 call 40005994 <== NOT EXECUTED 4000d98c: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000d990: 7f ff f4 84 call 4000aba0 <== NOT EXECUTED 4000d994: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED free(pipe); 4000d998: 7f ff f4 82 call 4000aba0 <== NOT EXECUTED 4000d99c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000d9a0: 7f ff e0 71 call 40005b64 <== NOT EXECUTED 4000d9a4: d0 04 23 0c ld [ %l0 + 0x30c ], %o0 <== NOT EXECUTED 4000d9a8: 81 c7 e0 08 ret 4000d9ac: 81 e8 00 00 restore 4000ae9c : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000ae9c: 05 10 01 bb sethi %hi(0x4006ec00), %g2 <== NOT EXECUTED 4000aea0: c2 00 a0 70 ld [ %g2 + 0x70 ], %g1 ! 4006ec70 <== NOT EXECUTED 4000aea4: 84 10 a0 70 or %g2, 0x70, %g2 <== NOT EXECUTED 4000aea8: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED 4000aeac: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000aeb0: 02 80 00 10 be 4000aef0 <== NOT EXECUTED 4000aeb4: 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 ) { 4000aeb8: c8 02 60 10 ld [ %o1 + 0x10 ], %g4 <== NOT EXECUTED 4000aebc: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED 4000aec0: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 4000aec4: 32 80 00 08 bne,a 4000aee4 <== NOT EXECUTED 4000aec8: 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; 4000aecc: 81 c3 e0 08 retl <== NOT EXECUTED 4000aed0: 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 ) { 4000aed4: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 4000aed8: 02 80 00 08 be 4000aef8 <== NOT EXECUTED 4000aedc: 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 ) { 4000aee0: 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; 4000aee4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000aee8: 32 bf ff fb bne,a 4000aed4 <== NOT EXECUTED 4000aeec: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED return true; } } return false; } 4000aef0: 81 c3 e0 08 retl <== NOT EXECUTED 4000aef4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000aef8: 81 c3 e0 08 retl <== NOT EXECUTED 4000aefc: 01 00 00 00 nop 40003714 : long fpathconf( int fd, int name ) { 40003714: 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); 40003718: 03 10 00 84 sethi %hi(0x40021000), %g1 4000371c: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40021214 40003720: 80 a6 00 01 cmp %i0, %g1 40003724: 1a 80 00 3f bcc 40003820 40003728: 03 10 00 86 sethi %hi(0x40021800), %g1 iop = rtems_libio_iop(fd); 4000372c: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 40021a5c 40003730: 85 2e 20 06 sll %i0, 6, %g2 40003734: b1 2e 20 03 sll %i0, 3, %i0 40003738: b0 06 00 02 add %i0, %g2, %i0 4000373c: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 40003740: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40003744: 80 88 61 00 btst 0x100, %g1 40003748: 02 80 00 36 be 40003820 4000374c: 80 88 60 02 btst 2, %g1 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40003750: 02 80 00 3a be 40003838 40003754: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 40003758: 08 80 00 08 bleu 40003778 4000375c: 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 ); 40003760: 40 00 3b 36 call 40012438 <__errno> 40003764: b0 10 3f ff mov -1, %i0 40003768: 82 10 20 16 mov 0x16, %g1 4000376c: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 40003770: 81 c7 e0 08 ret 40003774: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 40003778: b3 2e 60 02 sll %i1, 2, %i1 4000377c: 05 10 00 0d sethi %hi(0x40003400), %g2 40003780: 84 10 a2 e4 or %g2, 0x2e4, %g2 ! 400036e4 40003784: c4 00 80 19 ld [ %g2 + %i1 ], %g2 40003788: 81 c0 80 00 jmp %g2 4000378c: 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; 40003790: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 40003794: 81 c7 e0 08 ret 40003798: 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; 4000379c: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 400037a0: 81 c7 e0 08 ret 400037a4: 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; 400037a8: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 400037ac: 81 c7 e0 08 ret 400037b0: 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; 400037b4: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 400037b8: 81 c7 e0 08 ret 400037bc: 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; 400037c0: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 400037c4: 81 c7 e0 08 ret 400037c8: 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; 400037cc: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 400037d0: 81 c7 e0 08 ret 400037d4: 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; 400037d8: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 400037dc: 81 c7 e0 08 ret 400037e0: 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; 400037e4: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 400037e8: 81 c7 e0 08 ret 400037ec: 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; 400037f0: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 400037f4: 81 c7 e0 08 ret 400037f8: 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; 400037fc: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 40003800: 81 c7 e0 08 ret 40003804: 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; 40003808: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 4000380c: 81 c7 e0 08 ret 40003810: 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; 40003814: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 40003818: 81 c7 e0 08 ret 4000381c: 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); 40003820: 40 00 3b 06 call 40012438 <__errno> 40003824: b0 10 3f ff mov -1, %i0 40003828: 82 10 20 09 mov 9, %g1 4000382c: c2 22 00 00 st %g1, [ %o0 ] 40003830: 81 c7 e0 08 ret 40003834: 81 e8 00 00 restore rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40003838: 40 00 3b 00 call 40012438 <__errno> <== NOT EXECUTED 4000383c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003840: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40003844: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003848: 81 c7 e0 08 ret <== NOT EXECUTED 4000384c: 81 e8 00 00 restore <== NOT EXECUTED 4000aba0 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000aba0: 9d e3 bf a0 save %sp, -96, %sp 4000aba4: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000aba8: 82 10 63 90 or %g1, 0x390, %g1 ! 4001d790 4000abac: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4000abb0: b2 10 00 18 mov %i0, %i1 4000abb4: 84 00 a0 01 inc %g2 if ( !ptr ) 4000abb8: 80 a6 20 00 cmp %i0, 0 4000abbc: 02 80 00 15 be 4000ac10 4000abc0: 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()) && 4000abc4: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000abc8: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 4001daf0 <_System_state_Current> 4000abcc: 80 a0 60 03 cmp %g1, 3 4000abd0: 02 80 00 17 be 4000ac2c 4000abd4: 03 10 00 75 sethi %hi(0x4001d400), %g1 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000abd8: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4001d5b8 4000abdc: 80 a0 60 00 cmp %g1, 0 4000abe0: 02 80 00 06 be 4000abf8 4000abe4: 21 10 00 73 sethi %hi(0x4001cc00), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000abe8: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000abec: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000abf0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4000abf4: 21 10 00 73 sethi %hi(0x4001cc00), %l0 <== NOT EXECUTED 4000abf8: d0 04 23 50 ld [ %l0 + 0x350 ], %o0 ! 4001cf50 4000abfc: 40 00 06 f9 call 4000c7e0 <_Protected_heap_Free> 4000ac00: 92 10 00 19 mov %i1, %o1 4000ac04: 80 8a 20 ff btst 0xff, %o0 4000ac08: 02 80 00 04 be 4000ac18 4000ac0c: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 4000ac10: 81 c7 e0 08 ret 4000ac14: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000ac18: 31 10 00 70 sethi %hi(0x4001c000), %i0 <== NOT EXECUTED 4000ac1c: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000ac20: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000ac24: 7f ff e0 e5 call 40002fb8 <== NOT EXECUTED 4000ac28: 91 ee 23 e8 restore %i0, 0x3e8, %o0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000ac2c: 40 00 01 37 call 4000b108 4000ac30: 01 00 00 00 nop 4000ac34: 80 8a 20 ff btst 0xff, %o0 4000ac38: 12 bf ff e8 bne 4000abd8 4000ac3c: 03 10 00 75 sethi %hi(0x4001d400), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000ac40: 40 00 01 44 call 4000b150 <== NOT EXECUTED 4000ac44: 81 e8 00 00 restore <== NOT EXECUTED 4000ac48: 01 00 00 00 nop 4002b194 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 4002b194: 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 4002b198: 03 10 01 bb sethi %hi(0x4006ec00), %g1 <== NOT EXECUTED 4002b19c: 82 10 60 88 or %g1, 0x88, %g1 ! 4006ec88 <== NOT EXECUTED 4002b1a0: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002b1a4: 02 80 00 18 be 4002b204 <== NOT EXECUTED 4002b1a8: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 4002b1ac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 4002b1b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b1b4: 22 80 00 09 be,a 4002b1d8 <== NOT EXECUTED 4002b1b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002b1bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002b1c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b1c4: 22 80 00 05 be,a 4002b1d8 <== NOT EXECUTED 4002b1c8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002b1cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b1d0: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 4002b1d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002b1d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b1dc: 02 80 00 08 be 4002b1fc <== NOT EXECUTED 4002b1e0: 01 00 00 00 nop <== NOT EXECUTED 4002b1e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002b1e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b1ec: 02 80 00 04 be 4002b1fc <== NOT EXECUTED 4002b1f0: 01 00 00 00 nop <== NOT EXECUTED 4002b1f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b1f8: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 4002b1fc: 7f ff 6f f7 call 400071d8 <== NOT EXECUTED 4002b200: 81 e8 00 00 restore <== NOT EXECUTED 4002b204: 81 c7 e0 08 ret <== NOT EXECUTED 4002b208: 81 e8 00 00 restore <== NOT EXECUTED 4001afb8 : int fstat( int fd, struct stat *sbuf ) { 4001afb8: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 4001afbc: 80 a6 60 00 cmp %i1, 0 4001afc0: 02 80 00 3b be 4001b0ac 4001afc4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 4001afc8: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 4001cf44 4001afcc: 80 a6 00 01 cmp %i0, %g1 4001afd0: 1a 80 00 2b bcc 4001b07c 4001afd4: 03 10 00 75 sethi %hi(0x4001d400), %g1 4001afd8: d0 00 63 84 ld [ %g1 + 0x384 ], %o0 ! 4001d784 4001afdc: 83 2e 20 06 sll %i0, 6, %g1 4001afe0: b1 2e 20 03 sll %i0, 3, %i0 4001afe4: b0 06 00 01 add %i0, %g1, %i0 4001afe8: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 4001afec: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 4001aff0: 80 88 61 00 btst 0x100, %g1 4001aff4: 02 80 00 22 be 4001b07c 4001aff8: 01 00 00 00 nop if ( !iop->handlers ) 4001affc: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4001b000: 80 a0 60 00 cmp %g1, 0 4001b004: 02 80 00 1e be 4001b07c 4001b008: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 4001b00c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001b010: 80 a0 60 00 cmp %g1, 0 4001b014: 02 80 00 20 be 4001b094 4001b018: 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) ); 4001b01c: c0 26 40 00 clr [ %i1 ] 4001b020: c0 26 60 04 clr [ %i1 + 4 ] 4001b024: c0 26 60 08 clr [ %i1 + 8 ] 4001b028: c0 26 60 0c clr [ %i1 + 0xc ] 4001b02c: c0 26 60 10 clr [ %i1 + 0x10 ] 4001b030: c0 26 60 14 clr [ %i1 + 0x14 ] 4001b034: c0 26 60 18 clr [ %i1 + 0x18 ] 4001b038: c0 26 60 1c clr [ %i1 + 0x1c ] 4001b03c: c0 26 60 20 clr [ %i1 + 0x20 ] 4001b040: c0 26 60 24 clr [ %i1 + 0x24 ] 4001b044: c0 26 60 28 clr [ %i1 + 0x28 ] 4001b048: c0 26 60 2c clr [ %i1 + 0x2c ] 4001b04c: c0 26 60 30 clr [ %i1 + 0x30 ] 4001b050: c0 26 60 34 clr [ %i1 + 0x34 ] 4001b054: c0 26 60 38 clr [ %i1 + 0x38 ] 4001b058: c0 26 60 3c clr [ %i1 + 0x3c ] 4001b05c: c0 26 60 40 clr [ %i1 + 0x40 ] 4001b060: c0 26 60 44 clr [ %i1 + 0x44 ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 4001b064: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4001b068: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001b06c: 9f c0 40 00 call %g1 4001b070: 90 02 20 1c add %o0, 0x1c, %o0 } 4001b074: 81 c7 e0 08 ret 4001b078: 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 ); 4001b07c: 7f ff d1 71 call 4000f640 <__errno> 4001b080: b0 10 3f ff mov -1, %i0 4001b084: 82 10 20 09 mov 9, %g1 4001b088: c2 22 00 00 st %g1, [ %o0 ] 4001b08c: 81 c7 e0 08 ret 4001b090: 81 e8 00 00 restore if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b094: 7f ff d1 6b call 4000f640 <__errno> <== NOT EXECUTED 4001b098: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b09c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001b0a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b0a4: 81 c7 e0 08 ret <== NOT EXECUTED 4001b0a8: 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 ); 4001b0ac: 7f ff d1 65 call 4000f640 <__errno> 4001b0b0: b0 10 3f ff mov -1, %i0 4001b0b4: 82 10 20 0e mov 0xe, %g1 4001b0b8: c2 22 00 00 st %g1, [ %o0 ] 4001b0bc: 81 c7 e0 08 ret 4001b0c0: 81 e8 00 00 restore 40029c94 : #include int fsync( int fd ) { 40029c94: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40029c98: 03 10 01 aa sethi %hi(0x4006a800), %g1 40029c9c: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 4006abc4 40029ca0: 80 a6 00 01 cmp %i0, %g1 40029ca4: 1a 80 00 19 bcc 40029d08 40029ca8: 03 10 01 bb sethi %hi(0x4006ec00), %g1 iop = rtems_libio_iop( fd ); 40029cac: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 ! 4006ec28 40029cb0: 83 2e 20 06 sll %i0, 6, %g1 40029cb4: b1 2e 20 03 sll %i0, 3, %i0 40029cb8: b0 06 00 01 add %i0, %g1, %i0 40029cbc: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 40029cc0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 40029cc4: 80 88 61 00 btst 0x100, %g1 40029cc8: 02 80 00 10 be 40029d08 40029ccc: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40029cd0: 02 80 00 14 be 40029d20 40029cd4: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 40029cd8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 40029cdc: 80 a0 60 00 cmp %g1, 0 40029ce0: 02 80 00 0a be 40029d08 40029ce4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 40029ce8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40029cec: 80 a0 60 00 cmp %g1, 0 40029cf0: 02 80 00 12 be 40029d38 40029cf4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 40029cf8: 9f c0 40 00 call %g1 40029cfc: 01 00 00 00 nop } 40029d00: 81 c7 e0 08 ret 40029d04: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40029d08: 40 00 6d 16 call 40045160 <__errno> <== NOT EXECUTED 40029d0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029d10: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40029d14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029d18: 81 c7 e0 08 ret <== NOT EXECUTED 40029d1c: 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 ); 40029d20: 40 00 6d 10 call 40045160 <__errno> 40029d24: b0 10 3f ff mov -1, %i0 40029d28: 82 10 20 16 mov 0x16, %g1 40029d2c: c2 22 00 00 st %g1, [ %o0 ] 40029d30: 81 c7 e0 08 ret 40029d34: 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 ); 40029d38: 40 00 6d 0a call 40045160 <__errno> 40029d3c: b0 10 3f ff mov -1, %i0 40029d40: 82 10 20 86 mov 0x86, %g1 40029d44: c2 22 00 00 st %g1, [ %o0 ] 40029d48: 81 c7 e0 08 ret 40029d4c: 81 e8 00 00 restore 4000ac4c : int ftruncate( int fd, off_t length ) { 4000ac4c: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000ac50: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000ac54: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 4001cf44 4000ac58: 80 a6 00 01 cmp %i0, %g1 4000ac5c: 1a 80 00 2b bcc 4000ad08 4000ac60: 03 10 00 75 sethi %hi(0x4001d400), %g1 iop = rtems_libio_iop( fd ); 4000ac64: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 4001d784 4000ac68: 85 2e 20 06 sll %i0, 6, %g2 4000ac6c: b1 2e 20 03 sll %i0, 3, %i0 4000ac70: b0 06 00 02 add %i0, %g2, %i0 4000ac74: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 4000ac78: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000ac7c: 80 88 61 00 btst 0x100, %g1 4000ac80: 02 80 00 22 be 4000ad08 4000ac84: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000ac88: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000ac8c: c2 27 bf ec st %g1, [ %fp + -20 ] 4000ac90: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000ac94: c2 27 bf f0 st %g1, [ %fp + -16 ] 4000ac98: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000ac9c: c2 27 bf f4 st %g1, [ %fp + -12 ] 4000aca0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 4000aca4: c2 27 bf f8 st %g1, [ %fp + -8 ] 4000aca8: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 4000acac: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000acb0: 80 a0 60 00 cmp %g1, 0 4000acb4: 02 80 00 21 be 4000ad38 4000acb8: 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 ) 4000acbc: 9f c0 40 00 call %g1 4000acc0: 90 07 bf ec add %fp, -20, %o0 4000acc4: 80 a2 20 01 cmp %o0, 1 4000acc8: 02 80 00 22 be 4000ad50 4000accc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000acd0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000acd4: 80 88 60 04 btst 4, %g1 4000acd8: 02 80 00 12 be 4000ad20 4000acdc: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 4000ace0: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000ace4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000ace8: 80 a0 60 00 cmp %g1, 0 4000acec: 02 80 00 13 be 4000ad38 4000acf0: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4000acf4: 92 10 00 19 mov %i1, %o1 4000acf8: 9f c0 40 00 call %g1 4000acfc: 94 10 00 1a mov %i2, %o2 } 4000ad00: 81 c7 e0 08 ret 4000ad04: 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); 4000ad08: 40 00 12 4e call 4000f640 <__errno> <== NOT EXECUTED 4000ad0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ad10: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4000ad14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ad18: 81 c7 e0 08 ret <== NOT EXECUTED 4000ad1c: 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 ); 4000ad20: 40 00 12 48 call 4000f640 <__errno> <== NOT EXECUTED 4000ad24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ad28: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000ad2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ad30: 81 c7 e0 08 ret <== NOT EXECUTED 4000ad34: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000ad38: 40 00 12 42 call 4000f640 <__errno> <== NOT EXECUTED 4000ad3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ad40: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000ad44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ad48: 81 c7 e0 08 ret <== NOT EXECUTED 4000ad4c: 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 ); 4000ad50: 40 00 12 3c call 4000f640 <__errno> 4000ad54: b0 10 3f ff mov -1, %i0 4000ad58: 82 10 20 15 mov 0x15, %g1 4000ad5c: c2 22 00 00 st %g1, [ %o0 ] 4000ad60: 81 c7 e0 08 ret 4000ad64: 81 e8 00 00 restore 4005f4a4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4005f4a4: 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 ); 4005f4a8: 03 10 01 aa sethi %hi(0x4006a800), %g1 4005f4ac: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 4006abc4 4005f4b0: 80 a6 00 01 cmp %i0, %g1 4005f4b4: 1a 80 00 08 bcc 4005f4d4 4005f4b8: a0 10 20 00 clr %l0 4005f4bc: 03 10 01 bb sethi %hi(0x4006ec00), %g1 4005f4c0: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 ! 4006ec28 4005f4c4: 83 2e 20 06 sll %i0, 6, %g1 4005f4c8: b1 2e 20 03 sll %i0, 3, %i0 4005f4cc: b0 06 00 01 add %i0, %g1, %i0 4005f4d0: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4005f4d4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4005f4d8: c2 27 bf ec st %g1, [ %fp + -20 ] 4005f4dc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 4005f4e0: c2 27 bf f0 st %g1, [ %fp + -16 ] 4005f4e4: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 4005f4e8: c2 27 bf f4 st %g1, [ %fp + -12 ] 4005f4ec: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 4005f4f0: c2 27 bf f8 st %g1, [ %fp + -8 ] 4005f4f4: c4 04 20 2c ld [ %l0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 4005f4f8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4005f4fc: 80 a0 60 00 cmp %g1, 0 4005f500: 02 80 00 17 be 4005f55c 4005f504: 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 ) 4005f508: 9f c0 40 00 call %g1 4005f50c: 90 07 bf ec add %fp, -20, %o0 4005f510: 80 a2 20 01 cmp %o0, 1 4005f514: 12 80 00 0c bne 4005f544 4005f518: 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 ) 4005f51c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4005f520: c2 00 60 08 ld [ %g1 + 8 ], %g1 4005f524: 80 a0 60 00 cmp %g1, 0 4005f528: 02 80 00 0d be 4005f55c 4005f52c: 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 ); 4005f530: 92 10 00 19 mov %i1, %o1 4005f534: 9f c0 40 00 call %g1 4005f538: 94 10 00 1a mov %i2, %o2 } 4005f53c: 81 c7 e0 08 ret 4005f540: 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 ); 4005f544: 7f ff 97 07 call 40045160 <__errno> 4005f548: b0 10 3f ff mov -1, %i0 4005f54c: 82 10 20 14 mov 0x14, %g1 4005f550: c2 22 00 00 st %g1, [ %o0 ] 4005f554: 81 c7 e0 08 ret 4005f558: 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 ); 4005f55c: 7f ff 97 01 call 40045160 <__errno> <== NOT EXECUTED 4005f560: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005f564: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4005f568: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005f56c: 81 c7 e0 08 ret <== NOT EXECUTED 4005f570: 81 e8 00 00 restore <== NOT EXECUTED 40029e8c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40029e8c: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 40029e90: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED return _POSIX_types_Gid; } 40029e94: 81 c3 e0 08 retl <== NOT EXECUTED 40029e98: d0 10 60 32 lduh [ %g1 + 0x32 ], %o0 <== NOT EXECUTED 4002a588 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002a588: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4002a58c: 7f ff ff b3 call 4002a458 4002a590: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 4002a594: 11 10 01 81 sethi %hi(0x40060400), %o0 4002a598: 13 10 01 a9 sethi %hi(0x4006a400), %o1 4002a59c: 90 12 20 78 or %o0, 0x78, %o0 4002a5a0: 40 00 6d 97 call 40045bfc 4002a5a4: 92 12 62 a8 or %o1, 0x2a8, %o1 4002a5a8: a0 92 20 00 orcc %o0, 0, %l0 4002a5ac: 12 80 00 0b bne 4002a5d8 4002a5b0: 92 10 00 1a mov %i2, %o1 4002a5b4: 30 80 00 27 b,a 4002a650 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 4002a5b8: 40 00 84 28 call 4004b658 4002a5bc: 92 10 00 18 mov %i0, %o1 4002a5c0: 80 a0 00 08 cmp %g0, %o0 4002a5c4: 82 60 3f ff subx %g0, -1, %g1 } else { match = (grp->gr_gid == gid); } if (match) { 4002a5c8: 80 a0 60 00 cmp %g1, 0 4002a5cc: 12 80 00 14 bne 4002a61c 4002a5d0: 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)) { 4002a5d4: 92 10 00 1a mov %i2, %o1 4002a5d8: 94 10 00 1b mov %i3, %o2 4002a5dc: 96 10 00 1c mov %i4, %o3 4002a5e0: 7f ff fe d1 call 4002a124 4002a5e4: 90 10 00 10 mov %l0, %o0 4002a5e8: 80 a2 20 00 cmp %o0, 0 4002a5ec: 02 80 00 11 be 4002a630 4002a5f0: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 4002a5f4: 32 bf ff f1 bne,a 4002a5b8 4002a5f8: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 4002a5fc: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002a600: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4002a604: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002a608: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002a60c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a610: 02 bf ff f2 be 4002a5d8 <== NOT EXECUTED 4002a614: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4002a618: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002a61c: 40 00 6b 29 call 400452c0 4002a620: b0 10 20 00 clr %i0 *result = grp; 4002a624: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002a628: 81 c7 e0 08 ret 4002a62c: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 4002a630: 40 00 6a cc call 40045160 <__errno> <== NOT EXECUTED 4002a634: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a638: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a63c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4002a640: 40 00 6b 20 call 400452c0 <== NOT EXECUTED 4002a644: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4002a648: 81 c7 e0 08 ret <== NOT EXECUTED 4002a64c: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 4002a650: 40 00 6a c4 call 40045160 <__errno> <== NOT EXECUTED 4002a654: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a658: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a65c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4002a660: 81 c7 e0 08 ret <== NOT EXECUTED 4002a664: 81 e8 00 00 restore <== NOT EXECUTED 4002a2a4 : return NULL; return p; } struct group *getgrent(void) { 4002a2a4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 4002a2a8: 03 10 01 ba sethi %hi(0x4006e800), %g1 <== NOT EXECUTED 4002a2ac: d0 00 62 24 ld [ %g1 + 0x224 ], %o0 ! 4006ea24 <== NOT EXECUTED 4002a2b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a2b4: 32 80 00 04 bne,a 4002a2c4 <== NOT EXECUTED 4002a2b8: 31 10 01 ba sethi %hi(0x4006e800), %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } 4002a2bc: 81 c7 e0 08 ret <== NOT EXECUTED 4002a2c0: 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)) 4002a2c4: 15 10 01 ba sethi %hi(0x4006e800), %o2 <== NOT EXECUTED 4002a2c8: 92 16 22 f0 or %i0, 0x2f0, %o1 <== NOT EXECUTED 4002a2cc: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 4002a2d0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002a2d4: 7f ff ff 94 call 4002a124 <== NOT EXECUTED 4002a2d8: b0 16 22 f0 or %i0, 0x2f0, %i0 <== NOT EXECUTED 4002a2dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a2e0: 02 bf ff f7 be 4002a2bc <== NOT EXECUTED 4002a2e4: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 4002a2e8: 81 c7 e0 08 ret <== NOT EXECUTED 4002a2ec: 81 e8 00 00 restore <== NOT EXECUTED 4002a69c : } struct group *getgrgid( gid_t gid ) { 4002a69c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4002a6a0: 13 10 01 ba sethi %hi(0x4006e800), %o1 <== NOT EXECUTED 4002a6a4: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002a6a8: 92 12 62 f0 or %o1, 0x2f0, %o1 <== NOT EXECUTED 4002a6ac: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4002a6b0: 15 10 01 ba sethi %hi(0x4006e800), %o2 <== NOT EXECUTED 4002a6b4: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002a6b8: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 4002a6bc: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 4002a6c0: 7f ff ff ea call 4002a668 <== NOT EXECUTED 4002a6c4: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002a6c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a6cc: 22 80 00 02 be,a 4002a6d4 <== NOT EXECUTED 4002a6d0: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002a6d4: 81 c7 e0 08 ret <== NOT EXECUTED 4002a6d8: 81 e8 00 00 restore <== NOT EXECUTED 4002a668 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002a668: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4002a66c: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002a670: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002a674: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002a678: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002a67c: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002a680: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4002a684: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 4002a688: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002a68c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002a690: 7f ff ff be call 4002a588 <== NOT EXECUTED 4002a694: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002a698: 01 00 00 00 nop 4002a788 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002a788: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4002a78c: 7f ff ff 33 call 4002a458 4002a790: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 4002a794: 11 10 01 80 sethi %hi(0x40060000), %o0 4002a798: 13 10 01 a9 sethi %hi(0x4006a400), %o1 4002a79c: 90 12 23 c0 or %o0, 0x3c0, %o0 4002a7a0: 40 00 6d 17 call 40045bfc 4002a7a4: 92 12 62 a8 or %o1, 0x2a8, %o1 4002a7a8: a0 92 20 00 orcc %o0, 0, %l0 4002a7ac: 12 80 00 0b bne 4002a7d8 4002a7b0: 92 10 00 1a mov %i2, %o1 4002a7b4: 30 80 00 27 b,a 4002a850 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 4002a7b8: 40 00 83 a8 call 4004b658 4002a7bc: 92 10 00 18 mov %i0, %o1 4002a7c0: 80 a0 00 08 cmp %g0, %o0 4002a7c4: 82 60 3f ff subx %g0, -1, %g1 } else { match = (pwd->pw_uid == uid); } if (match) { 4002a7c8: 80 a0 60 00 cmp %g1, 0 4002a7cc: 12 80 00 14 bne 4002a81c 4002a7d0: 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)) { 4002a7d4: 92 10 00 1a mov %i2, %o1 4002a7d8: 94 10 00 1b mov %i3, %o2 4002a7dc: 96 10 00 1c mov %i4, %o3 4002a7e0: 7f ff fe c4 call 4002a2f0 4002a7e4: 90 10 00 10 mov %l0, %o0 4002a7e8: 80 a2 20 00 cmp %o0, 0 4002a7ec: 02 80 00 11 be 4002a830 4002a7f0: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 4002a7f4: 32 bf ff f1 bne,a 4002a7b8 4002a7f8: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 4002a7fc: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002a800: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4002a804: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002a808: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002a80c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a810: 02 bf ff f2 be 4002a7d8 <== NOT EXECUTED 4002a814: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4002a818: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002a81c: 40 00 6a a9 call 400452c0 4002a820: b0 10 20 00 clr %i0 *result = pwd; 4002a824: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002a828: 81 c7 e0 08 ret 4002a82c: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 4002a830: 40 00 6a 4c call 40045160 <__errno> <== NOT EXECUTED 4002a834: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a838: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a83c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4002a840: 40 00 6a a0 call 400452c0 <== NOT EXECUTED 4002a844: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4002a848: 81 c7 e0 08 ret <== NOT EXECUTED 4002a84c: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 4002a850: 40 00 6a 44 call 40045160 <__errno> <== NOT EXECUTED 4002a854: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a858: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a85c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4002a860: 81 c7 e0 08 ret <== NOT EXECUTED 4002a864: 81 e8 00 00 restore <== NOT EXECUTED 4002a40c : return NULL; return p; } struct passwd *getpwent(void) { 4002a40c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 4002a410: 03 10 01 ba sethi %hi(0x4006e800), %g1 <== NOT EXECUTED 4002a414: d0 00 61 3c ld [ %g1 + 0x13c ], %o0 ! 4006e93c <== NOT EXECUTED 4002a418: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a41c: 32 80 00 04 bne,a 4002a42c <== NOT EXECUTED 4002a420: 31 10 01 ba sethi %hi(0x4006e800), %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } 4002a424: 81 c7 e0 08 ret <== NOT EXECUTED 4002a428: 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)) 4002a42c: 15 10 01 ba sethi %hi(0x4006e800), %o2 <== NOT EXECUTED 4002a430: 92 16 22 08 or %i0, 0x208, %o1 <== NOT EXECUTED 4002a434: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED 4002a438: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002a43c: 7f ff ff ad call 4002a2f0 <== NOT EXECUTED 4002a440: b0 16 22 08 or %i0, 0x208, %i0 <== NOT EXECUTED 4002a444: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a448: 02 bf ff f7 be 4002a424 <== NOT EXECUTED 4002a44c: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 4002a450: 81 c7 e0 08 ret <== NOT EXECUTED 4002a454: 81 e8 00 00 restore <== NOT EXECUTED 4002a89c : } struct passwd *getpwuid( uid_t uid ) { 4002a89c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 4002a8a0: 13 10 01 ba sethi %hi(0x4006e800), %o1 <== NOT EXECUTED 4002a8a4: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002a8a8: 92 12 62 08 or %o1, 0x208, %o1 <== NOT EXECUTED 4002a8ac: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4002a8b0: 15 10 01 ba sethi %hi(0x4006e800), %o2 <== NOT EXECUTED 4002a8b4: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002a8b8: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED 4002a8bc: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 4002a8c0: 7f ff ff ea call 4002a868 <== NOT EXECUTED 4002a8c4: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002a8c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a8cc: 22 80 00 02 be,a 4002a8d4 <== NOT EXECUTED 4002a8d0: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002a8d4: 81 c7 e0 08 ret <== NOT EXECUTED 4002a8d8: 81 e8 00 00 restore <== NOT EXECUTED 4002a868 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002a868: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4002a86c: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002a870: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002a874: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002a878: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002a87c: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002a880: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4002a884: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 4002a888: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002a88c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002a890: 7f ff ff be call 4002a788 <== NOT EXECUTED 4002a894: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002a898: 01 00 00 00 nop 4000ad88 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4000ad88: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000ad8c: 80 a6 20 00 cmp %i0, 0 4000ad90: 02 80 00 11 be 4000add4 4000ad94: 01 00 00 00 nop { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4000ad98: 7f ff db d1 call 40001cdc 4000ad9c: 01 00 00 00 nop 4000ada0: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000ada4: 40 00 05 46 call 4000c2bc <_TOD_Get> 4000ada8: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 4000adac: 7f ff db d0 call 40001cec 4000adb0: 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; 4000adb4: 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; 4000adb8: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 4000adbc: 92 10 23 e8 mov 0x3e8, %o1 4000adc0: 40 00 37 b3 call 40018c8c <.div> 4000adc4: c2 26 00 00 st %g1, [ %i0 ] 4000adc8: 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; } 4000adcc: 81 c7 e0 08 ret 4000add0: 91 e8 20 00 restore %g0, 0, %o0 void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4000add4: 40 00 12 1b call 4000f640 <__errno> <== NOT EXECUTED 4000add8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000addc: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000ade0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4000ade4: 81 c7 e0 08 ret <== NOT EXECUTED 4000ade8: 81 e8 00 00 restore <== NOT EXECUTED 40007310 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 40007310: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 40007314: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED return _POSIX_types_Uid; } 40007318: 81 c3 e0 08 retl <== NOT EXECUTED 4000731c: d0 10 60 30 lduh [ %g1 + 0x30 ], %o0 <== NOT EXECUTED 40013ee4 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40013ee4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40013ee8: e0 06 40 00 ld [ %i1 ], %l0 40013eec: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40013ef0: 82 04 20 54 add %l0, 0x54, %g1 40013ef4: 80 a0 80 01 cmp %g2, %g1 40013ef8: 12 80 00 30 bne 40013fb8 40013efc: 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 ) 40013f00: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40013f04: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40013f08: 80 a4 00 01 cmp %l0, %g1 40013f0c: 02 80 00 31 be 40013fd0 40013f10: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 40013f14: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40013f18: 80 a0 60 00 cmp %g1, 0 40013f1c: 12 80 00 2d bne 40013fd0 40013f20: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 40013f24: c2 04 20 08 ld [ %l0 + 8 ], %g1 40013f28: 80 a0 60 00 cmp %g1, 0 40013f2c: 22 80 00 06 be,a 40013f44 40013f30: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40013f34: 7f ff d1 54 call 40008484 <_Chain_Extract> 40013f38: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40013f3c: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40013f40: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40013f44: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40013f48: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40013f4c: 90 07 bf f8 add %fp, -8, %o0 40013f50: 7f ff be e4 call 40003ae0 40013f54: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40013f58: 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) ) { 40013f5c: 90 10 00 10 mov %l0, %o0 40013f60: 7f ff f1 91 call 400105a4 40013f64: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40013f68: 80 a2 20 00 cmp %o0, 0 40013f6c: 12 80 00 11 bne 40013fb0 40013f70: 01 00 00 00 nop 40013f74: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40013f78: 80 a0 60 00 cmp %g1, 0 40013f7c: 12 80 00 0d bne 40013fb0 40013f80: 03 10 00 8c sethi %hi(0x40023000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40013f84: c2 00 62 10 ld [ %g1 + 0x210 ], %g1 ! 40023210 40013f88: c4 06 40 00 ld [ %i1 ], %g2 40013f8c: c6 00 60 04 ld [ %g1 + 4 ], %g3 40013f90: 80 a0 c0 02 cmp %g3, %g2 40013f94: 22 80 00 02 be,a 40013f9c 40013f98: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 40013f9c: 90 10 00 10 mov %l0, %o0 40013fa0: 7f ff be a5 call 40003a34 40013fa4: b0 10 20 00 clr %i0 40013fa8: 81 c7 e0 08 ret 40013fac: 81 e8 00 00 restore } return 0; } 40013fb0: 81 c7 e0 08 ret 40013fb4: 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 ); 40013fb8: 40 00 04 80 call 400151b8 <__errno> 40013fbc: b0 10 3f ff mov -1, %i0 40013fc0: 82 10 20 5a mov 0x5a, %g1 40013fc4: c2 22 00 00 st %g1, [ %o0 ] 40013fc8: 81 c7 e0 08 ret 40013fcc: 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 ); 40013fd0: 40 00 04 7a call 400151b8 <__errno> 40013fd4: b0 10 3f ff mov -1, %i0 40013fd8: 82 10 20 10 mov 0x10, %g1 40013fdc: c2 22 00 00 st %g1, [ %o0 ] 40013fe0: 81 c7 e0 08 ret 40013fe4: 81 e8 00 00 restore 4002a458 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 4002a458: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 4002a45c: 03 10 01 ba sethi %hi(0x4006e800), %g1 4002a460: c4 48 61 38 ldsb [ %g1 + 0x138 ], %g2 ! 4006e938 4002a464: 80 a0 a0 00 cmp %g2, 0 4002a468: 02 80 00 04 be 4002a478 4002a46c: 84 10 20 01 mov 1, %g2 4002a470: 81 c7 e0 08 ret 4002a474: 81 e8 00 00 restore return; etc_passwd_initted = 1; mkdir("/etc", 0777); 4002a478: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 4002a47c: c4 28 61 38 stb %g2, [ %g1 + 0x138 ] mkdir("/etc", 0777); 4002a480: 11 10 01 80 sethi %hi(0x40060000), %o0 4002a484: 7f ff 75 84 call 40007a94 4002a488: 90 12 23 38 or %o0, 0x338, %o0 ! 40060338 <_rodata_start+0x7a8> /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4002a48c: 31 10 01 80 sethi %hi(0x40060000), %i0 4002a490: 21 10 01 a9 sethi %hi(0x4006a400), %l0 4002a494: 90 16 23 c0 or %i0, 0x3c0, %o0 4002a498: 40 00 6d d9 call 40045bfc 4002a49c: 92 14 22 a8 or %l0, 0x2a8, %o1 4002a4a0: 80 a2 20 00 cmp %o0, 0 4002a4a4: 22 80 00 0d be,a 4002a4d8 4002a4a8: 90 16 23 c0 or %i0, 0x3c0, %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); 4002a4ac: 40 00 6b 85 call 400452c0 4002a4b0: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 4002a4b4: 92 14 22 a8 or %l0, 0x2a8, %o1 4002a4b8: 21 10 01 81 sethi %hi(0x40060400), %l0 4002a4bc: 40 00 6d d0 call 40045bfc 4002a4c0: 90 14 20 78 or %l0, 0x78, %o0 ! 40060478 <_rodata_start+0x8e8> 4002a4c4: 80 a2 20 00 cmp %o0, 0 4002a4c8: 22 80 00 11 be,a 4002a50c 4002a4cc: 90 14 20 78 or %l0, 0x78, %o0 fclose(fp); 4002a4d0: 40 00 6b 7c call 400452c0 <== NOT EXECUTED 4002a4d4: 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) { 4002a4d8: 13 10 01 8e sethi %hi(0x40063800), %o1 4002a4dc: 40 00 6d c8 call 40045bfc 4002a4e0: 92 12 62 10 or %o1, 0x210, %o1 ! 40063a10 4002a4e4: b0 92 20 00 orcc %o0, 0, %i0 4002a4e8: 02 bf ff f3 be 4002a4b4 4002a4ec: 92 10 20 01 mov 1, %o1 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4002a4f0: 94 10 20 66 mov 0x66, %o2 4002a4f4: 96 10 00 18 mov %i0, %o3 4002a4f8: 11 10 01 95 sethi %hi(0x40065400), %o0 4002a4fc: 40 00 72 a0 call 40046f7c 4002a500: 90 12 23 78 or %o0, 0x378, %o0 ! 40065778 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4002a504: 10 bf ff ea b 4002a4ac 4002a508: 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) { 4002a50c: 13 10 01 8e sethi %hi(0x40063800), %o1 4002a510: 40 00 6d bb call 40045bfc 4002a514: 92 12 62 10 or %o1, 0x210, %o1 ! 40063a10 4002a518: b0 92 20 00 orcc %o0, 0, %i0 4002a51c: 02 bf ff d5 be 4002a470 4002a520: 11 10 01 95 sethi %hi(0x40065400), %o0 fprintf( fp, "root:x:0:root\n" 4002a524: 92 10 20 01 mov 1, %o1 4002a528: 94 10 20 2a mov 0x2a, %o2 4002a52c: 96 10 00 18 mov %i0, %o3 4002a530: 40 00 72 93 call 40046f7c 4002a534: 90 12 23 e0 or %o0, 0x3e0, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 4002a538: 40 00 6b 62 call 400452c0 4002a53c: 81 e8 00 00 restore 4002a540: 01 00 00 00 nop 40006384 : int ioctl( int fd, ioctl_command_t command, ... ) { 40006384: 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 ); 40006388: 03 10 00 8d sethi %hi(0x40023400), %g1 4000638c: c2 00 61 b4 ld [ %g1 + 0x1b4 ], %g1 ! 400235b4 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40006390: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40006394: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40006398: 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 ); 4000639c: 80 a6 00 01 cmp %i0, %g1 400063a0: 1a 80 00 18 bcc 40006400 400063a4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] iop = rtems_libio_iop( fd ); 400063a8: 03 10 00 8f sethi %hi(0x40023c00), %g1 400063ac: d0 00 62 cc ld [ %g1 + 0x2cc ], %o0 ! 40023ecc 400063b0: 83 2e 20 06 sll %i0, 6, %g1 400063b4: b1 2e 20 03 sll %i0, 3, %i0 400063b8: b0 06 00 01 add %i0, %g1, %i0 400063bc: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 400063c0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400063c4: 80 88 61 00 btst 0x100, %g1 400063c8: 02 80 00 0e be 40006400 400063cc: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 400063d0: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 400063d4: 80 a0 60 00 cmp %g1, 0 400063d8: 02 80 00 0a be 40006400 400063dc: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 400063e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400063e4: 80 a0 60 00 cmp %g1, 0 400063e8: 02 80 00 0c be 40006418 400063ec: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 400063f0: 9f c0 40 00 call %g1 400063f4: 94 10 00 1a mov %i2, %o2 return rc; } 400063f8: 81 c7 e0 08 ret 400063fc: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40006400: 40 00 3c 7c call 400155f0 <__errno> 40006404: b0 10 3f ff mov -1, %i0 40006408: 82 10 20 09 mov 9, %g1 4000640c: c2 22 00 00 st %g1, [ %o0 ] 40006410: 81 c7 e0 08 ret 40006414: 81 e8 00 00 restore if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006418: 40 00 3c 76 call 400155f0 <__errno> <== NOT EXECUTED 4000641c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006420: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006424: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006428: 81 c7 e0 08 ret <== NOT EXECUTED 4000642c: 81 e8 00 00 restore <== NOT EXECUTED 40003be0 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40003be0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40003be4: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 40003be8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003bec: 02 80 00 03 be 40003bf8 <== NOT EXECUTED 40003bf0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40003bf4: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40003bf8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003bfc: 02 80 00 0c be 40003c2c <== NOT EXECUTED 40003c00: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED c = tolower (c); 40003c04: 05 10 00 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED 40003c08: c4 00 a0 f8 ld [ %g2 + 0xf8 ], %g2 ! 4001d0f8 <__ctype_ptr__> <== NOT EXECUTED 40003c0c: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 40003c10: 84 00 80 10 add %g2, %l0, %g2 <== NOT EXECUTED 40003c14: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 40003c18: 84 08 a0 03 and %g2, 3, %g2 <== NOT EXECUTED 40003c1c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40003c20: 22 80 00 02 be,a 40003c28 <== NOT EXECUTED 40003c24: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED if (c == '\r') { 40003c28: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 40003c2c: 80 a0 a0 0d cmp %g2, 0xd <== NOT EXECUTED 40003c30: 02 80 00 16 be 40003c88 <== NOT EXECUTED 40003c34: 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)) { 40003c38: 02 80 00 41 be 40003d3c <== NOT EXECUTED 40003c3c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003c40: 32 80 00 1a bne,a 40003ca8 <== NOT EXECUTED 40003c44: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 40003c48: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003c4c: 05 10 00 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED 40003c50: c4 00 a0 48 ld [ %g2 + 0x48 ], %g2 ! 4001d048 <== NOT EXECUTED 40003c54: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40003c58: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003c5c: 16 80 00 09 bge 40003c80 <== NOT EXECUTED 40003c60: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40003c64: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40003c68: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003c6c: 12 80 00 39 bne 40003d50 <== NOT EXECUTED 40003c70: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40003c74: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40003c78: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40003c7c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40003c80: 81 c7 e0 08 ret <== NOT EXECUTED 40003c84: 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) 40003c88: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 40003c8c: 02 80 00 04 be 40003c9c <== NOT EXECUTED 40003c90: 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; } 40003c94: 81 c7 e0 08 ret <== NOT EXECUTED 40003c98: 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) 40003c9c: 32 80 00 02 bne,a 40003ca4 <== NOT EXECUTED 40003ca0: 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)) { 40003ca4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003ca8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003cac: 22 bf ff e8 be,a 40003c4c <== NOT EXECUTED 40003cb0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40003cb4: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 <== NOT EXECUTED 40003cb8: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003cbc: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40003cc0: 22 80 00 43 be,a 40003dcc <== NOT EXECUTED 40003cc4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40003cc8: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 <== NOT EXECUTED 40003ccc: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40003cd0: 22 80 00 2e be,a 40003d88 <== NOT EXECUTED 40003cd4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40003cd8: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 <== NOT EXECUTED 40003cdc: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40003ce0: 02 bf ff e8 be 40003c80 <== NOT EXECUTED 40003ce4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40003ce8: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40003cec: 02 80 00 2c be 40003d9c <== NOT EXECUTED 40003cf0: 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]) 40003cf4: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 <== NOT EXECUTED 40003cf8: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40003cfc: 02 80 00 07 be 40003d18 <== NOT EXECUTED 40003d00: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 40003d04: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 <== NOT EXECUTED 40003d08: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40003d0c: 32 bf ff d0 bne,a 40003c4c <== NOT EXECUTED 40003d10: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40003d14: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40003d18: 12 80 00 18 bne 40003d78 <== NOT EXECUTED 40003d1c: 01 00 00 00 nop <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40003d20: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003d24: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40003d28: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40003d2c: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40003d30: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 40003d34: 81 c7 e0 08 ret <== NOT EXECUTED 40003d38: 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)) { 40003d3c: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED 40003d40: 32 bf ff d9 bne,a 40003ca4 <== NOT EXECUTED 40003d44: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003d48: 10 bf ff d8 b 40003ca8 <== NOT EXECUTED 40003d4c: 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); 40003d50: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003d54: 7f ff fe f6 call 4000392c <== NOT EXECUTED 40003d58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003d5c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003d60: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40003d64: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40003d68: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40003d6c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40003d70: 81 c7 e0 08 ret <== NOT EXECUTED 40003d74: 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); 40003d78: 7f ff fe ed call 4000392c <== NOT EXECUTED 40003d7c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003d80: 10 bf ff e9 b 40003d24 <== NOT EXECUTED 40003d84: 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); 40003d88: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003d8c: 7f ff ff 08 call 400039ac <== NOT EXECUTED 40003d90: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 40003d94: 81 c7 e0 08 ret <== NOT EXECUTED 40003d98: 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)) 40003d9c: 22 80 00 05 be,a 40003db0 <== NOT EXECUTED 40003da0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003da4: 7f ff fe e2 call 4000392c <== NOT EXECUTED 40003da8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003dac: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003db0: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40003db4: 86 10 20 0a mov 0xa, %g3 <== NOT EXECUTED 40003db8: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED 40003dbc: 82 00 60 01 inc %g1 <== NOT EXECUTED 40003dc0: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 40003dc4: 81 c7 e0 08 ret <== NOT EXECUTED 40003dc8: 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); 40003dcc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003dd0: 7f ff fe f7 call 400039ac <== NOT EXECUTED 40003dd4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 40003dd8: 81 c7 e0 08 ret <== NOT EXECUTED 40003ddc: 81 e8 00 00 restore <== NOT EXECUTED 4000ef28 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4000ef28: 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() ) 4000ef2c: 7f ff fb 7e call 4000dd24 4000ef30: 01 00 00 00 nop 4000ef34: 80 a2 00 18 cmp %o0, %i0 4000ef38: 12 80 00 b6 bne 4000f210 4000ef3c: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 4000ef40: 02 80 00 ba be 4000f228 4000ef44: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4000ef48: 80 a0 60 1f cmp %g1, 0x1f 4000ef4c: 18 80 00 b7 bgu 4000f228 4000ef50: 23 10 00 77 sethi %hi(0x4001dc00), %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 ) 4000ef54: a5 2e 60 02 sll %i1, 2, %l2 4000ef58: a2 14 62 e4 or %l1, 0x2e4, %l1 4000ef5c: a7 2e 60 04 sll %i1, 4, %l3 4000ef60: 84 24 c0 12 sub %l3, %l2, %g2 4000ef64: 84 04 40 02 add %l1, %g2, %g2 4000ef68: c4 00 a0 08 ld [ %g2 + 8 ], %g2 4000ef6c: 80 a0 a0 01 cmp %g2, 1 4000ef70: 02 80 00 45 be 4000f084 4000ef74: 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 ) ) 4000ef78: 80 a6 60 04 cmp %i1, 4 4000ef7c: 02 80 00 44 be 4000f08c 4000ef80: 80 a6 60 08 cmp %i1, 8 4000ef84: 02 80 00 42 be 4000f08c 4000ef88: 80 a6 60 0b cmp %i1, 0xb 4000ef8c: 02 80 00 40 be 4000f08c 4000ef90: a0 10 20 01 mov 1, %l0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4000ef94: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 4000ef98: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 4000ef9c: 80 a6 a0 00 cmp %i2, 0 4000efa0: 02 80 00 41 be 4000f0a4 4000efa4: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 4000efa8: c2 06 80 00 ld [ %i2 ], %g1 4000efac: c2 27 bf fc st %g1, [ %fp + -4 ] 4000efb0: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000efb4: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 ! 4001d950 <_Thread_Dispatch_disable_level> 4000efb8: 84 00 a0 01 inc %g2 4000efbc: c4 20 61 50 st %g2, [ %g1 + 0x150 ] /* * 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; 4000efc0: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000efc4: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001da0c <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000efc8: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 4000efcc: c4 00 a0 c4 ld [ %g2 + 0xc4 ], %g2 4000efd0: 80 ac 00 02 andncc %l0, %g2, %g0 4000efd4: 12 80 00 1a bne 4000f03c 4000efd8: 09 10 00 78 sethi %hi(0x4001e000), %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 ; 4000efdc: c4 01 20 70 ld [ %g4 + 0x70 ], %g2 ! 4001e070 <_POSIX_signals_Wait_queue> 4000efe0: 88 11 20 70 or %g4, 0x70, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000efe4: 88 01 20 04 add %g4, 4, %g4 4000efe8: 80 a0 80 04 cmp %g2, %g4 4000efec: 02 80 00 30 be 4000f0ac 4000eff0: 82 10 00 02 mov %g2, %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4000eff4: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 4000eff8: 80 8c 00 03 btst %l0, %g3 4000effc: 02 80 00 0c be 4000f02c 4000f000: 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; 4000f004: 10 80 00 0f b 4000f040 4000f008: 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 ; 4000f00c: 80 a0 80 04 cmp %g2, %g4 4000f010: 22 80 00 28 be,a 4000f0b0 4000f014: 03 10 00 73 sethi %hi(0x4001cc00), %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4000f018: 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 ]; 4000f01c: 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) 4000f020: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 4000f024: 12 80 00 06 bne 4000f03c <== NOT EXECUTED 4000f028: 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) 4000f02c: c6 00 e0 c4 ld [ %g3 + 0xc4 ], %g3 4000f030: 80 ac 00 03 andncc %l0, %g3, %g0 4000f034: 22 bf ff f6 be,a 4000f00c 4000f038: 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; 4000f03c: 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 ) ) { 4000f040: 90 10 00 01 mov %g1, %o0 4000f044: 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; 4000f048: 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 ) ) { 4000f04c: 40 00 00 ba call 4000f334 <_POSIX_signals_Unblock_thread> 4000f050: 94 07 bf f4 add %fp, -12, %o2 4000f054: 80 8a 20 ff btst 0xff, %o0 4000f058: 12 80 00 5a bne 4000f1c0 4000f05c: 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 ); 4000f060: 40 00 00 a5 call 4000f2f4 <_POSIX_signals_Set_process_signals> 4000f064: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4000f068: a4 24 c0 12 sub %l3, %l2, %l2 4000f06c: c2 04 40 12 ld [ %l1 + %l2 ], %g1 4000f070: 80 a0 60 02 cmp %g1, 2 4000f074: 02 80 00 57 be 4000f1d0 4000f078: 11 10 00 78 sethi %hi(0x4001e000), %o0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4000f07c: 7f ff e3 3f call 40007d78 <_Thread_Enable_dispatch> 4000f080: b0 10 20 00 clr %i0 return 0; } 4000f084: 81 c7 e0 08 ret 4000f088: 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 ); 4000f08c: 40 00 01 38 call 4000f56c 4000f090: 01 00 00 00 nop 4000f094: 40 00 00 f9 call 4000f478 4000f098: 92 10 00 19 mov %i1, %o1 4000f09c: 81 c7 e0 08 ret 4000f0a0: 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; 4000f0a4: 10 bf ff c3 b 4000efb0 4000f0a8: c0 27 bf fc clr [ %fp + -4 ] * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4000f0ac: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000f0b0: da 08 63 f4 ldub [ %g1 + 0x3f4 ], %o5 ! 4001cff4 4000f0b4: 13 10 00 76 sethi %hi(0x4001d800), %o1 4000f0b8: 9a 03 60 01 inc %o5 4000f0bc: 92 12 60 b8 or %o1, 0xb8, %o1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4000f0c0: 82 10 20 00 clr %g1 4000f0c4: 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) ) { 4000f0c8: 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 ] ) 4000f0cc: c4 02 40 00 ld [ %o1 ], %g2 4000f0d0: 80 a0 a0 00 cmp %g2, 0 4000f0d4: 22 80 00 2d be,a 4000f188 4000f0d8: 92 02 60 04 add %o1, 4, %o1 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4000f0dc: c4 00 a0 04 ld [ %g2 + 4 ], %g2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 4000f0e0: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4000f0e4: 80 a3 20 00 cmp %o4, 0 4000f0e8: 02 80 00 27 be 4000f184 4000f0ec: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3 4000f0f0: 84 10 20 01 mov 1, %g2 the_thread = (Thread_Control *) object_table[ index ]; 4000f0f4: 87 28 a0 02 sll %g2, 2, %g3 4000f0f8: c6 02 c0 03 ld [ %o3 + %g3 ], %g3 if ( !the_thread ) 4000f0fc: 80 a0 e0 00 cmp %g3, 0 4000f100: 02 80 00 1e be 4000f178 4000f104: 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 ) 4000f108: c8 00 e0 14 ld [ %g3 + 0x14 ], %g4 4000f10c: 80 a1 00 0d cmp %g4, %o5 4000f110: 18 80 00 1b bgu 4000f17c 4000f114: 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 ]; 4000f118: d4 00 e1 60 ld [ %g3 + 0x160 ], %o2 4000f11c: d4 02 a0 c4 ld [ %o2 + 0xc4 ], %o2 4000f120: 80 ac 00 0a andncc %l0, %o2, %g0 4000f124: 02 80 00 16 be 4000f17c 4000f128: 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 ) { 4000f12c: 80 a1 00 0d cmp %g4, %o5 4000f130: 2a 80 00 11 bcs,a 4000f174 4000f134: 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 ) ) { 4000f138: d4 00 60 10 ld [ %g1 + 0x10 ], %o2 4000f13c: 80 a2 a0 00 cmp %o2, 0 4000f140: 02 80 00 0f be 4000f17c 4000f144: 80 a3 00 02 cmp %o4, %g2 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4000f148: de 00 e0 10 ld [ %g3 + 0x10 ], %o7 4000f14c: 80 a3 e0 00 cmp %o7, 0 4000f150: 22 80 00 09 be,a 4000f174 4000f154: 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) ) { 4000f158: 80 8a 80 1a btst %o2, %i2 4000f15c: 12 80 00 08 bne 4000f17c 4000f160: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4000f164: 80 8b c0 1a btst %o7, %i2 4000f168: 02 80 00 05 be 4000f17c 4000f16c: 80 a3 00 02 cmp %o4, %g2 4000f170: 9a 10 00 04 mov %g4, %o5 4000f174: 82 10 00 03 mov %g3, %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4000f178: 80 a3 00 02 cmp %o4, %g2 4000f17c: 1a bf ff df bcc 4000f0f8 4000f180: 87 28 a0 02 sll %g2, 2, %g3 4000f184: 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++) { 4000f188: 80 a2 40 08 cmp %o1, %o0 4000f18c: 32 bf ff d1 bne,a 4000f0d0 4000f190: c4 02 40 00 ld [ %o1 ], %g2 } } } } if ( interested ) { 4000f194: 80 a0 60 00 cmp %g1, 0 4000f198: 02 bf ff b2 be 4000f060 4000f19c: 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 ) ) { 4000f1a0: 90 10 00 01 mov %g1, %o0 4000f1a4: 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; 4000f1a8: 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 ) ) { 4000f1ac: 40 00 00 62 call 4000f334 <_POSIX_signals_Unblock_thread> 4000f1b0: 94 07 bf f4 add %fp, -12, %o2 4000f1b4: 80 8a 20 ff btst 0xff, %o0 4000f1b8: 02 bf ff aa be 4000f060 4000f1bc: 01 00 00 00 nop _Thread_Enable_dispatch(); 4000f1c0: 7f ff e2 ee call 40007d78 <_Thread_Enable_dispatch> 4000f1c4: b0 10 20 00 clr %i0 ! 0 return 0; 4000f1c8: 81 c7 e0 08 ret 4000f1cc: 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 *) 4000f1d0: 7f ff f3 bb call 4000c0bc <_Chain_Get> 4000f1d4: 90 12 20 64 or %o0, 0x64, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4000f1d8: 80 a2 20 00 cmp %o0, 0 4000f1dc: 02 80 00 19 be 4000f240 4000f1e0: 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 ); 4000f1e4: 92 10 00 08 mov %o0, %o1 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4000f1e8: c2 22 20 08 st %g1, [ %o0 + 8 ] 4000f1ec: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000f1f0: c2 22 20 0c st %g1, [ %o0 + 0xc ] 4000f1f4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000f1f8: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4000f1fc: 11 10 00 78 sethi %hi(0x4001e000), %o0 4000f200: 90 12 20 b4 or %o0, 0xb4, %o0 ! 4001e0b4 <_POSIX_signals_Siginfo> 4000f204: 7f ff dc af call 400064c0 <_Chain_Append> 4000f208: 90 02 00 12 add %o0, %l2, %o0 4000f20c: 30 bf ff 9c b,a 4000f07c /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 4000f210: 40 00 01 0c call 4000f640 <__errno> 4000f214: b0 10 3f ff mov -1, %i0 4000f218: 82 10 20 03 mov 3, %g1 4000f21c: c2 22 00 00 st %g1, [ %o0 ] 4000f220: 81 c7 e0 08 ret 4000f224: 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 ); 4000f228: 40 00 01 06 call 4000f640 <__errno> 4000f22c: b0 10 3f ff mov -1, %i0 4000f230: 82 10 20 16 mov 0x16, %g1 4000f234: c2 22 00 00 st %g1, [ %o0 ] 4000f238: 81 c7 e0 08 ret 4000f23c: 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(); 4000f240: 7f ff e2 ce call 40007d78 <_Thread_Enable_dispatch> 4000f244: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 4000f248: 40 00 00 fe call 4000f640 <__errno> 4000f24c: 01 00 00 00 nop 4000f250: 82 10 20 0b mov 0xb, %g1 ! b 4000f254: c2 22 00 00 st %g1, [ %o0 ] 4000f258: 81 c7 e0 08 ret 4000f25c: 81 e8 00 00 restore 4001b294 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 4001b294: 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())) 4001b298: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b29c: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 4001daf0 <_System_state_Current> 4001b2a0: 80 a0 60 03 cmp %g1, 3 4001b2a4: 02 80 00 04 be 4001b2b4 4001b2a8: 03 10 00 72 sethi %hi(0x4001c800), %g1 4001b2ac: 81 c7 e0 08 ret <== NOT EXECUTED 4001b2b0: 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) { 4001b2b4: 21 10 00 74 sethi %hi(0x4001d000), %l0 4001b2b8: e2 00 63 10 ld [ %g1 + 0x310 ], %l1 4001b2bc: c2 04 21 00 ld [ %l0 + 0x100 ], %g1 4001b2c0: 80 a0 40 11 cmp %g1, %l1 4001b2c4: 02 80 00 05 be 4001b2d8 4001b2c8: 01 00 00 00 nop _wrapup_reent(_global_impure_ptr); 4001b2cc: 40 00 01 80 call 4001b8cc <_wrapup_reent> 4001b2d0: 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; 4001b2d4: e2 24 21 00 st %l1, [ %l0 + 0x100 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 4001b2d8: 7f ff d1 32 call 4000f7a0 4001b2dc: d0 04 60 04 ld [ %l1 + 4 ], %o0 fclose (stdout); 4001b2e0: c2 04 21 00 ld [ %l0 + 0x100 ], %g1 4001b2e4: 7f ff d1 2f call 4000f7a0 4001b2e8: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 4001b2ec: c2 04 21 00 ld [ %l0 + 0x100 ], %g1 4001b2f0: f0 00 60 0c ld [ %g1 + 0xc ], %i0 4001b2f4: 7f ff d1 2b call 4000f7a0 4001b2f8: 81 e8 00 00 restore 4001b2fc: 01 00 00 00 nop 4002a9f0 : int link( const char *existing, const char *new ) { 4002a9f0: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 4002a9f4: 40 00 85 1a call 4004be5c 4002a9f8: 90 10 00 18 mov %i0, %o0 4002a9fc: a0 07 bf e8 add %fp, -24, %l0 4002aa00: 92 10 00 08 mov %o0, %o1 4002aa04: 94 10 20 00 clr %o2 4002aa08: 90 10 00 18 mov %i0, %o0 4002aa0c: 96 10 00 10 mov %l0, %o3 4002aa10: 98 10 20 01 mov 1, %o4 4002aa14: 7f ff 71 b6 call 400070ec 4002aa18: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 4002aa1c: 80 a2 20 00 cmp %o0, 0 4002aa20: 12 80 00 88 bne 4002ac40 4002aa24: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002aa28: c2 4e 40 00 ldsb [ %i1 ], %g1 4002aa2c: 80 a0 60 5c cmp %g1, 0x5c 4002aa30: 02 80 00 06 be 4002aa48 4002aa34: 80 a0 60 2f cmp %g1, 0x2f 4002aa38: 02 80 00 04 be 4002aa48 4002aa3c: 80 a0 60 00 cmp %g1, 0 4002aa40: 12 80 00 3c bne 4002ab30 4002aa44: 03 10 01 ab sethi %hi(0x4006ac00), %g1 4002aa48: 03 10 01 ab sethi %hi(0x4006ac00), %g1 4002aa4c: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 4002aa50: 90 10 20 01 mov 1, %o0 4002aa54: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4002aa58: c4 27 bf d4 st %g2, [ %fp + -44 ] 4002aa5c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4002aa60: c4 27 bf d8 st %g2, [ %fp + -40 ] 4002aa64: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4002aa68: c4 27 bf dc st %g2, [ %fp + -36 ] 4002aa6c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4002aa70: c4 27 bf e0 st %g2, [ %fp + -32 ] 4002aa74: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002aa78: c2 27 bf e4 st %g1, [ %fp + -28 ] if ( !parent_loc.ops->evalformake_h ) { 4002aa7c: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002aa80: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002aa84: 80 a0 60 00 cmp %g1, 0 4002aa88: 02 80 00 60 be 4002ac08 4002aa8c: 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 ); 4002aa90: 94 07 bf fc add %fp, -4, %o2 4002aa94: b2 07 bf d4 add %fp, -44, %i1 4002aa98: 9f c0 40 00 call %g1 4002aa9c: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 4002aaa0: a2 92 20 00 orcc %o0, 0, %l1 4002aaa4: 12 80 00 4a bne 4002abcc 4002aaa8: 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 ) { 4002aaac: c4 07 bf e4 ld [ %fp + -28 ], %g2 4002aab0: 80 a0 80 01 cmp %g2, %g1 4002aab4: 12 80 00 2c bne 4002ab64 4002aab8: 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 ) { 4002aabc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4002aac0: 80 a0 60 00 cmp %g1, 0 4002aac4: 02 80 00 61 be 4002ac48 4002aac8: 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 ); 4002aacc: 90 10 00 10 mov %l0, %o0 4002aad0: 9f c0 40 00 call %g1 4002aad4: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &existing_loc ); 4002aad8: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002aadc: 80 a0 60 00 cmp %g1, 0 4002aae0: 02 80 00 08 be 4002ab00 4002aae4: b0 10 00 08 mov %o0, %i0 4002aae8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002aaec: 80 a0 60 00 cmp %g1, 0 4002aaf0: 22 80 00 05 be,a 4002ab04 4002aaf4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002aaf8: 9f c0 40 00 call %g1 4002aafc: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 4002ab00: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002ab04: 80 a0 60 00 cmp %g1, 0 4002ab08: 02 80 00 4e be 4002ac40 4002ab0c: 01 00 00 00 nop 4002ab10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002ab14: 80 a0 60 00 cmp %g1, 0 4002ab18: 02 80 00 4a be 4002ac40 4002ab1c: 01 00 00 00 nop 4002ab20: 9f c0 40 00 call %g1 4002ab24: 90 10 00 19 mov %i1, %o0 return result; } 4002ab28: 81 c7 e0 08 ret 4002ab2c: 81 e8 00 00 restore /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002ab30: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 4002ab34: 90 10 20 00 clr %o0 4002ab38: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002ab3c: c4 27 bf d4 st %g2, [ %fp + -44 ] 4002ab40: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002ab44: c4 27 bf d8 st %g2, [ %fp + -40 ] 4002ab48: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4002ab4c: c4 27 bf dc st %g2, [ %fp + -36 ] 4002ab50: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4002ab54: c4 27 bf e0 st %g2, [ %fp + -32 ] 4002ab58: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4002ab5c: 10 bf ff c8 b 4002aa7c 4002ab60: 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 ); 4002ab64: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002ab68: 80 a0 60 00 cmp %g1, 0 4002ab6c: 22 80 00 09 be,a 4002ab90 4002ab70: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002ab74: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002ab78: 80 a0 60 00 cmp %g1, 0 4002ab7c: 22 80 00 05 be,a 4002ab90 4002ab80: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002ab84: 9f c0 40 00 call %g1 4002ab88: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 4002ab8c: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002ab90: 80 a0 60 00 cmp %g1, 0 4002ab94: 02 80 00 08 be 4002abb4 4002ab98: 01 00 00 00 nop 4002ab9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002aba0: 80 a0 60 00 cmp %g1, 0 4002aba4: 02 80 00 04 be 4002abb4 4002aba8: 01 00 00 00 nop 4002abac: 9f c0 40 00 call %g1 4002abb0: 90 10 00 19 mov %i1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 4002abb4: 40 00 69 6b call 40045160 <__errno> 4002abb8: b0 10 3f ff mov -1, %i0 4002abbc: 82 10 20 12 mov 0x12, %g1 4002abc0: c2 22 00 00 st %g1, [ %o0 ] 4002abc4: 81 c7 e0 08 ret 4002abc8: 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 ); 4002abcc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002abd0: 80 a0 60 00 cmp %g1, 0 4002abd4: 02 80 00 08 be 4002abf4 4002abd8: 01 00 00 00 nop 4002abdc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002abe0: 80 a0 60 00 cmp %g1, 0 4002abe4: 02 80 00 04 be 4002abf4 4002abe8: 01 00 00 00 nop 4002abec: 9f c0 40 00 call %g1 4002abf0: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 4002abf4: 40 00 69 5b call 40045160 <__errno> 4002abf8: b0 10 3f ff mov -1, %i0 4002abfc: e2 22 00 00 st %l1, [ %o0 ] 4002ac00: 81 c7 e0 08 ret 4002ac04: 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 ); 4002ac08: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002ac0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ac10: 02 80 00 08 be 4002ac30 <== NOT EXECUTED 4002ac14: 01 00 00 00 nop <== NOT EXECUTED 4002ac18: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002ac1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ac20: 02 80 00 04 be 4002ac30 <== NOT EXECUTED 4002ac24: 01 00 00 00 nop <== NOT EXECUTED 4002ac28: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ac2c: 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 ); 4002ac30: 40 00 69 4c call 40045160 <__errno> <== NOT EXECUTED 4002ac34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ac38: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002ac3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ac40: 81 c7 e0 08 ret 4002ac44: 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 ); 4002ac48: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002ac4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ac50: 02 80 00 0a be 4002ac78 <== NOT EXECUTED 4002ac54: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002ac58: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002ac5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ac60: 02 80 00 06 be 4002ac78 <== NOT EXECUTED 4002ac64: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002ac68: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ac6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002ac70: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 4002ac74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002ac78: 02 bf ff ee be 4002ac30 <== NOT EXECUTED 4002ac7c: 01 00 00 00 nop <== NOT EXECUTED 4002ac80: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002ac84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ac88: 02 bf ff ea be 4002ac30 <== NOT EXECUTED 4002ac8c: 01 00 00 00 nop <== NOT EXECUTED 4002ac90: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ac94: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4002ac98: 30 bf ff e6 b,a 4002ac30 <== NOT EXECUTED 4001b0f0 : off_t lseek( int fd, off_t offset, int whence ) { 4001b0f0: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001b0f4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b0f8: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 4001cf44 off_t lseek( int fd, off_t offset, int whence ) { 4001b0fc: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001b100: 80 a6 00 01 cmp %i0, %g1 4001b104: 1a 80 00 46 bcc 4001b21c 4001b108: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 4001b10c: 03 10 00 75 sethi %hi(0x4001d400), %g1 4001b110: e0 00 63 84 ld [ %g1 + 0x384 ], %l0 ! 4001d784 4001b114: 83 2e 20 06 sll %i0, 6, %g1 4001b118: b1 2e 20 03 sll %i0, 3, %i0 4001b11c: b0 06 00 01 add %i0, %g1, %i0 4001b120: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 4001b124: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b128: 80 88 61 00 btst 0x100, %g1 4001b12c: 02 80 00 3c be 4001b21c 4001b130: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 4001b134: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b138: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 4001b13c: 80 a1 20 00 cmp %g4, 0 4001b140: 02 80 00 3f be 4001b23c 4001b144: 80 a6 e0 01 cmp %i3, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 4001b148: 02 80 00 27 be 4001b1e4 4001b14c: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 4001b150: 80 a6 e0 02 cmp %i3, 2 4001b154: 02 80 00 11 be 4001b198 4001b158: 80 a6 e0 00 cmp %i3, 0 4001b15c: 12 80 00 26 bne 4001b1f4 4001b160: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 4001b164: 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 ); 4001b168: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001b16c: 92 10 00 02 mov %g2, %o1 4001b170: 94 10 00 03 mov %g3, %o2 4001b174: 96 10 00 1b mov %i3, %o3 4001b178: 9f c0 40 00 call %g1 4001b17c: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 4001b180: 80 a2 3f ff cmp %o0, -1 4001b184: 02 80 00 13 be 4001b1d0 4001b188: 80 a2 7f ff cmp %o1, -1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001b18c: b2 10 00 09 mov %o1, %i1 4001b190: 81 c7 e0 08 ret 4001b194: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001b198: 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 ); 4001b19c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001b1a0: 9a 86 80 0d addcc %i2, %o5, %o5 4001b1a4: 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 ); 4001b1a8: 92 10 00 02 mov %g2, %o1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001b1ac: 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 ); 4001b1b0: 94 10 00 03 mov %g3, %o2 4001b1b4: 96 10 00 1b mov %i3, %o3 4001b1b8: 9f c0 40 00 call %g1 4001b1bc: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 4001b1c0: 80 a2 3f ff cmp %o0, -1 4001b1c4: 12 bf ff f3 bne 4001b190 4001b1c8: b2 10 00 09 mov %o1, %i1 4001b1cc: 80 a2 7f ff cmp %o1, -1 4001b1d0: 12 bf ff f0 bne 4001b190 4001b1d4: b2 10 00 09 mov %o1, %i1 iop->offset = old_offset; 4001b1d8: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001b1dc: 81 c7 e0 08 ret 4001b1e0: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 4001b1e4: 9a 86 80 13 addcc %i2, %l3, %o5 4001b1e8: 98 46 40 12 addx %i1, %l2, %o4 break; 4001b1ec: 10 bf ff df b 4001b168 4001b1f0: 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 ); 4001b1f4: 7f ff d1 13 call 4000f640 <__errno> 4001b1f8: 01 00 00 00 nop 4001b1fc: 82 10 20 16 mov 0x16, %g1 ! 16 4001b200: c2 22 00 00 st %g1, [ %o0 ] 4001b204: 11 3f ff ff sethi %hi(0xfffffc00), %o0 4001b208: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 4001b20c: 92 10 00 08 mov %o0, %o1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001b210: b0 10 00 08 mov %o0, %i0 4001b214: 81 c7 e0 08 ret 4001b218: 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); 4001b21c: 7f ff d1 09 call 4000f640 <__errno> <== NOT EXECUTED 4001b220: 01 00 00 00 nop <== NOT EXECUTED 4001b224: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4001b228: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b22c: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 4001b230: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 4001b234: 10 bf ff d6 b 4001b18c <== NOT EXECUTED 4001b238: 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 ); 4001b23c: 7f ff d1 01 call 4000f640 <__errno> <== NOT EXECUTED 4001b240: 01 00 00 00 nop <== NOT EXECUTED 4001b244: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001b248: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b24c: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 4001b250: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 4001b254: 10 bf ff ce b 4001b18c <== NOT EXECUTED 4001b258: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002ae44 : int _STAT_NAME( const char *path, struct stat *buf ) { 4002ae44: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 4002ae48: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4002ae4c: 02 80 00 34 be 4002af1c <== NOT EXECUTED 4002ae50: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 4002ae54: 40 00 84 02 call 4004be5c <== NOT EXECUTED 4002ae58: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002ae5c: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4002ae60: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002ae64: 94 10 20 00 clr %o2 <== NOT EXECUTED 4002ae68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002ae6c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4002ae70: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002ae74: 7f ff 70 9e call 400070ec <== NOT EXECUTED 4002ae78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 4002ae7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002ae80: 12 80 00 25 bne 4002af14 <== NOT EXECUTED 4002ae84: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 4002ae88: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4002ae8c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002ae90: 02 80 00 29 be 4002af34 <== NOT EXECUTED 4002ae94: 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) ); 4002ae98: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 4002ae9c: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 4002aea0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4002aea4: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 4002aea8: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 4002aeac: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 4002aeb0: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4002aeb4: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 4002aeb8: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4002aebc: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 4002aec0: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4002aec4: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 4002aec8: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 4002aecc: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 4002aed0: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 4002aed4: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 4002aed8: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 4002aedc: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 4002aee0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002aee4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002aee8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002aeec: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002aef0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002aef4: 02 80 00 08 be 4002af14 <== NOT EXECUTED 4002aef8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002aefc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002af00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002af04: 02 80 00 1a be 4002af6c <== NOT EXECUTED 4002af08: 01 00 00 00 nop <== NOT EXECUTED 4002af0c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002af10: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 4002af14: 81 c7 e0 08 ret <== NOT EXECUTED 4002af18: 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 ); 4002af1c: 40 00 68 91 call 40045160 <__errno> <== NOT EXECUTED 4002af20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002af24: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002af28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002af2c: 81 c7 e0 08 ret <== NOT EXECUTED 4002af30: 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 ); 4002af34: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002af38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002af3c: 02 80 00 08 be 4002af5c <== NOT EXECUTED 4002af40: 01 00 00 00 nop <== NOT EXECUTED 4002af44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002af48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002af4c: 02 80 00 04 be 4002af5c <== NOT EXECUTED 4002af50: 01 00 00 00 nop <== NOT EXECUTED 4002af54: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002af58: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002af5c: 40 00 68 81 call 40045160 <__errno> <== NOT EXECUTED 4002af60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002af64: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002af68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002af6c: 81 c7 e0 08 ret <== NOT EXECUTED 4002af70: 81 e8 00 00 restore <== NOT EXECUTED 4000b1a0 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000b1a0: 9d e3 bf a0 save %sp, -96, %sp 4000b1a4: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000b1a8: 82 10 63 90 or %g1, 0x390, %g1 ! 4001d790 4000b1ac: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000b1b0: a0 10 00 18 mov %i0, %l0 4000b1b4: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000b1b8: 7f ff ff ed call 4000b16c 4000b1bc: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 4000b1c0: 80 a6 20 00 cmp %i0, 0 4000b1c4: 02 80 00 25 be 4000b258 4000b1c8: 03 10 00 76 sethi %hi(0x4001d800), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000b1cc: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 4001daf0 <_System_state_Current> 4000b1d0: 80 a0 60 03 cmp %g1, 3 4000b1d4: 02 80 00 1c be 4000b244 4000b1d8: 03 10 00 73 sethi %hi(0x4001cc00), %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 ); 4000b1dc: d0 00 63 50 ld [ %g1 + 0x350 ], %o0 ! 4001cf50 4000b1e0: 92 10 00 10 mov %l0, %o1 4000b1e4: 94 10 20 00 clr %o2 4000b1e8: 40 00 05 70 call 4000c7a8 <_Protected_heap_Allocate_aligned_with_boundary> 4000b1ec: 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 ) { 4000b1f0: b0 92 20 00 orcc %o0, 0, %i0 4000b1f4: 02 80 00 1b be 4000b260 4000b1f8: 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 ) 4000b1fc: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000b200: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 4001d5c0 4000b204: 80 a0 60 00 cmp %g1, 0 4000b208: 02 80 00 05 be 4000b21c 4000b20c: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000b210: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000b214: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b218: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000b21c: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000b220: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4001d5b8 4000b224: 80 a0 60 00 cmp %g1, 0 4000b228: 02 80 00 05 be 4000b23c 4000b22c: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000b230: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b234: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b238: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b23c: 81 c7 e0 08 ret 4000b240: 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()) && 4000b244: 7f ff ff b1 call 4000b108 4000b248: 01 00 00 00 nop 4000b24c: 80 8a 20 ff btst 0xff, %o0 4000b250: 12 bf ff e3 bne 4000b1dc 4000b254: 03 10 00 73 sethi %hi(0x4001cc00), %g1 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000b258: 81 c7 e0 08 ret <== NOT EXECUTED 4000b25c: 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) 4000b260: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000b264: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 4001d5bc 4000b268: 80 a0 60 00 cmp %g1, 0 4000b26c: 02 80 00 08 be 4000b28c 4000b270: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000b274: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b278: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b27c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000b280: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000b284: 12 bf ff df bne 4000b200 <== NOT EXECUTED 4000b288: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED errno = ENOMEM; 4000b28c: 40 00 10 ed call 4000f640 <__errno> 4000b290: 01 00 00 00 nop 4000b294: 82 10 20 0c mov 0xc, %g1 ! c 4000b298: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4000b29c: 81 c7 e0 08 ret 4000b2a0: 81 e8 00 00 restore 4000b150 : 4000b150: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4000b154: 11 10 00 77 sethi %hi(0x4001dc00), %o0 <== NOT EXECUTED 4000b158: 90 12 22 d8 or %o0, 0x2d8, %o0 ! 4001ded8 <== NOT EXECUTED 4000b15c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000b160: 7f ff ec d8 call 400064c0 <_Chain_Append> <== NOT EXECUTED 4000b164: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000b168: 01 00 00 00 nop 4000b16c : void malloc_deferred_frees_process(void) { 4000b16c: 9d e3 bf a0 save %sp, -96, %sp 4000b170: 21 10 00 77 sethi %hi(0x4001dc00), %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) 4000b174: 10 80 00 04 b 4000b184 4000b178: a0 14 22 d8 or %l0, 0x2d8, %l0 ! 4001ded8 free(to_be_freed); 4000b17c: 7f ff fe 89 call 4000aba0 <== NOT EXECUTED 4000b180: 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 ); 4000b184: 40 00 03 ce call 4000c0bc <_Chain_Get> 4000b188: 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) 4000b18c: 80 a2 20 00 cmp %o0, 0 4000b190: 12 bf ff fb bne 4000b17c 4000b194: 01 00 00 00 nop free(to_be_freed); } 4000b198: 81 c7 e0 08 ret 4000b19c: 81 e8 00 00 restore 40012ee8 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 40012ee8: 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) ) { 40012eec: 7f ff f5 ae call 400105a4 40012ef0: 90 10 00 18 mov %i0, %o0 40012ef4: 80 a2 20 00 cmp %o0, 0 40012ef8: 12 80 00 13 bne 40012f44 40012efc: 01 00 00 00 nop 40012f00: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 40012f04: 80 a0 60 00 cmp %g1, 0 40012f08: 12 80 00 0f bne 40012f44 40012f0c: 03 10 00 8c sethi %hi(0x40023000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 40012f10: c2 00 62 10 ld [ %g1 + 0x210 ], %g1 ! 40023210 40012f14: c4 00 60 04 ld [ %g1 + 4 ], %g2 40012f18: 80 a0 80 18 cmp %g2, %i0 40012f1c: 22 80 00 02 be,a 40012f24 40012f20: 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) 40012f24: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012f28: 80 a0 60 06 cmp %g1, 6 40012f2c: 02 80 00 04 be 40012f3c 40012f30: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 40012f34: 7f ff ff 7a call 40012d1c 40012f38: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 40012f3c: 7f ff c2 be call 40003a34 40012f40: 90 10 00 18 mov %i0, %o0 } return 0; } 40012f44: 81 c7 e0 08 ret 40012f48: 91 e8 20 00 restore %g0, 0, %o0 40012c3c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40012c3c: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 40012c40: 80 a6 20 00 cmp %i0, 0 40012c44: 02 80 00 16 be 40012c9c 40012c48: 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 40012c50: d0 06 00 00 ld [ %i0 ], %o0 40012c54: a0 10 00 08 mov %o0, %l0 40012c58: a2 10 20 00 clr %l1 if ( b[i] ) { 40012c5c: d0 04 00 00 ld [ %l0 ], %o0 40012c60: 80 a2 20 00 cmp %o0, 0 40012c64: 02 80 00 05 be 40012c78 40012c68: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40012c6c: 7f ff ff 2f call 40012928 40012c70: 01 00 00 00 nop b[i] = 0; 40012c74: 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 40012c80: a0 04 20 04 add %l0, 4, %l0 40012c84: 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 ); 40012c88: 7f ff ff 28 call 40012928 40012c8c: 01 00 00 00 nop *block_table = 0; 40012c90: c0 26 00 00 clr [ %i0 ] } 40012c94: 81 c7 e0 08 ret 40012c98: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 40012c9c: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40012ca0: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012ca4: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40012ca8: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40012cac: 94 12 a0 c8 or %o2, 0xc8, %o2 <== NOT EXECUTED 40012cb0: 96 12 e3 e0 or %o3, 0x3e0, %o3 <== NOT EXECUTED 40012cb4: 7f ff c2 27 call 40003550 <__assert_func> <== NOT EXECUTED 40012cb8: 92 10 21 b3 mov 0x1b3, %o1 <== NOT EXECUTED 40012cbc: 01 00 00 00 nop 40013214 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 40013214: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40013218: 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 ) 4001321c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40013220: 80 a0 40 19 cmp %g1, %i1 40013224: 16 80 00 07 bge 40013240 40013228: 90 10 00 10 mov %l0, %o0 return IMFS_memfile_extend( the_jnode, length ); 4001322c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40013230: 7f ff ff 91 call 40013074 <== NOT EXECUTED 40013234: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40013238: 81 c7 e0 08 ret <== NOT EXECUTED 4001323c: 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 ) 40013240: 22 80 00 0d be,a 40013274 40013244: 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; 40013248: f2 24 20 50 st %i1, [ %l0 + 0x50 ] <== NOT EXECUTED 4001324c: f4 24 20 54 st %i2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 40013250: f4 26 20 0c st %i2, [ %i0 + 0xc ] 40013254: f2 26 20 08 st %i1, [ %i0 + 8 ] IMFS_update_atime( the_jnode ); 40013258: 90 07 bf f8 add %fp, -8, %o0 4001325c: 7f ff c2 21 call 40003ae0 40013260: 92 10 20 00 clr %o1 40013264: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013268: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 4001326c: 81 c7 e0 08 ret 40013270: 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 ) 40013274: 80 a0 40 1a cmp %g1, %i2 40013278: 3a bf ff f5 bcc,a 4001324c 4001327c: f2 24 20 50 st %i1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 40013280: 10 bf ff eb b 4001322c <== NOT EXECUTED 40013284: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40013288 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 40013288: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001328c: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 40013290: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013294: 80 a0 60 06 cmp %g1, 6 40013298: 02 80 00 0f be 400132d4 4001329c: 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 )) 400132a0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 400132a4: 92 10 00 02 mov %g2, %o1 400132a8: 7f ff ff 73 call 40013074 400132ac: 94 10 00 03 mov %g3, %o2 400132b0: 80 a2 20 00 cmp %o0, 0 400132b4: 12 80 00 1b bne 40013320 400132b8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 400132bc: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 400132c0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 400132c4: d8 3e 20 08 std %o4, [ %i0 + 8 ] } return iop->offset; } 400132c8: b2 10 00 03 mov %g3, %i1 400132cc: 81 c7 e0 08 ret 400132d0: 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) 400132d4: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 400132d8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 400132dc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400132e0: 14 80 00 0c bg 40013310 <== NOT EXECUTED 400132e4: c8 06 20 14 ld [ %i0 + 0x14 ], %g4 <== NOT EXECUTED 400132e8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400132ec: 02 80 00 07 be 40013308 <== NOT EXECUTED 400132f0: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 400132f4: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 400132f8: 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; } 400132fc: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 40013300: 81 c7 e0 08 ret <== NOT EXECUTED 40013304: 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) 40013308: 28 bf ff fc bleu,a 400132f8 <== NOT EXECUTED 4001330c: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 40013310: 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; } 40013314: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 40013318: 81 c7 e0 08 ret <== NOT EXECUTED 4001331c: 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 ); 40013320: 40 00 07 a6 call 400151b8 <__errno> <== NOT EXECUTED 40013324: 01 00 00 00 nop <== NOT EXECUTED 40013328: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 4001332c: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 40013330: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013334: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 40013338: 10 bf ff e4 b 400132c8 <== NOT EXECUTED 4001333c: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 4001360c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4001360c: 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)) 40013610: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40013614: 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)) 40013618: 80 88 62 04 btst 0x204, %g1 4001361c: 02 80 00 06 be 40013634 40013620: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 && (the_jnode->type == IMFS_LINEAR_FILE)) { 40013624: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40013628: 80 a0 a0 06 cmp %g2, 6 4001362c: 22 80 00 0c be,a 4001365c 40013630: 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) 40013634: 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) 40013638: 80 88 62 00 btst 0x200, %g1 4001363c: 22 80 00 05 be,a 40013650 40013640: c4 3c 20 08 std %g2, [ %l0 + 8 ] iop->offset = the_jnode->info.file.size; 40013644: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] 40013648: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2 iop->size = the_jnode->info.file.size; 4001364c: c4 3c 20 08 std %g2, [ %l0 + 8 ] 40013650: b0 10 20 00 clr %i0 return 0; } 40013654: 81 c7 e0 08 ret 40013658: 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; 4001365c: d6 04 60 58 ld [ %l1 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 40013660: 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; 40013664: 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; 40013668: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED 4001366c: 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; 40013670: 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; 40013674: 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) 40013678: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 4001367c: 12 80 00 06 bne 40013694 <== NOT EXECUTED 40013680: c2 24 60 48 st %g1, [ %l1 + 0x48 ] <== NOT EXECUTED 40013684: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 40013688: 84 10 20 00 clr %g2 <== NOT EXECUTED 4001368c: 10 bf ff eb b 40013638 <== NOT EXECUTED 40013690: 86 10 20 00 clr %g3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 40013694: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40013698: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001369c: 94 10 20 00 clr %o2 <== NOT EXECUTED 400136a0: 7f ff ff 28 call 40013340 <== NOT EXECUTED 400136a4: 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) 400136a8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 400136ac: 02 bf ff ea be 40013654 <== NOT EXECUTED 400136b0: 01 00 00 00 nop <== NOT EXECUTED 400136b4: 10 bf ff e0 b 40013634 <== NOT EXECUTED 400136b8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 40012f4c : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40012f4c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40012f50: 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 ) { 40012f54: c2 04 20 08 ld [ %l0 + 8 ], %g1 40012f58: 80 a0 60 00 cmp %g1, 0 40012f5c: 22 80 00 06 be,a 40012f74 40012f60: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 40012f64: 7f ff d5 48 call 40008484 <_Chain_Extract> 40012f68: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40012f6c: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40012f70: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40012f74: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40012f78: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40012f7c: 90 07 bf f8 add %fp, -8, %o0 40012f80: 7f ff c2 d8 call 40003ae0 40012f84: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40012f88: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 40012f8c: 90 10 00 10 mov %l0, %o0 40012f90: 7f ff ff d6 call 40012ee8 40012f94: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } 40012f98: 81 c7 e0 08 ret 40012f9c: 91 e8 00 08 restore %g0, %o0, %o0 4000992c : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000992c: 13 10 00 70 sethi %hi(0x4001c000), %o1 40009930: 15 10 00 71 sethi %hi(0x4001c400), %o2 40009934: 92 12 62 5c or %o1, 0x25c, %o1 40009938: 94 12 a0 20 or %o2, 0x20, %o2 4000993c: 96 10 00 0a mov %o2, %o3 40009940: 82 13 c0 00 mov %o7, %g1 40009944: 40 00 03 73 call 4000a710 40009948: 9e 10 40 00 mov %g1, %o7 4000994c: 01 00 00 00 nop <== NOT EXECUTED 400024cc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400024cc: 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) ) ) 400024d0: 03 00 00 3c sethi %hi(0xf000), %g1 400024d4: b3 2e 60 10 sll %i1, 0x10, %i1 400024d8: b3 36 60 10 srl %i1, 0x10, %i1 400024dc: 80 8e 40 01 btst %i1, %g1 400024e0: 02 80 00 4f be 4000261c 400024e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400024e8: c2 4e 00 00 ldsb [ %i0 ], %g1 400024ec: 80 a0 60 5c cmp %g1, 0x5c 400024f0: 02 80 00 1c be 40002560 400024f4: 80 a0 60 2f cmp %g1, 0x2f 400024f8: 02 80 00 1a be 40002560 400024fc: 80 a0 60 00 cmp %g1, 0 40002500: 02 80 00 19 be 40002564 40002504: 03 10 00 74 sethi %hi(0x4001d000), %g1 40002508: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 4001d058 4000250c: c4 00 60 04 ld [ %g1 + 4 ], %g2 40002510: c4 27 bf e8 st %g2, [ %fp + -24 ] 40002514: c4 00 60 08 ld [ %g1 + 8 ], %g2 40002518: c4 27 bf ec st %g2, [ %fp + -20 ] 4000251c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 40002520: c4 27 bf f0 st %g2, [ %fp + -16 ] 40002524: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40002528: c4 27 bf f4 st %g2, [ %fp + -12 ] 4000252c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40002530: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !temp_loc.ops->evalformake_h ) { 40002534: c2 07 bf f4 ld [ %fp + -12 ], %g1 40002538: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000253c: 80 a0 60 00 cmp %g1, 0 40002540: 12 80 00 19 bne 400025a4 40002544: 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 ); 40002548: 40 00 34 3e call 4000f640 <__errno> <== NOT EXECUTED 4000254c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002550: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002554: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002558: 81 c7 e0 08 ret 4000255c: 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 ); 40002560: 03 10 00 74 sethi %hi(0x4001d000), %g1 40002564: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 4001d058 40002568: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000256c: c4 27 bf e8 st %g2, [ %fp + -24 ] 40002570: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40002574: c4 27 bf ec st %g2, [ %fp + -20 ] 40002578: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4000257c: c4 27 bf f0 st %g2, [ %fp + -16 ] 40002580: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 40002584: c4 27 bf f4 st %g2, [ %fp + -12 ] 40002588: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000258c: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !temp_loc.ops->evalformake_h ) { 40002590: c2 07 bf f4 ld [ %fp + -12 ], %g1 40002594: c2 00 60 04 ld [ %g1 + 4 ], %g1 40002598: 80 a0 60 00 cmp %g1, 0 4000259c: 02 bf ff eb be 40002548 400025a0: 90 10 20 01 mov 1, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 400025a4: 90 06 00 08 add %i0, %o0, %o0 400025a8: a0 07 bf e8 add %fp, -24, %l0 400025ac: 94 07 bf fc add %fp, -4, %o2 400025b0: 92 10 00 10 mov %l0, %o1 400025b4: 9f c0 40 00 call %g1 400025b8: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 400025bc: 80 a2 20 00 cmp %o0, 0 400025c0: 12 bf ff e6 bne 40002558 400025c4: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !temp_loc.ops->mknod_h ) { 400025c8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 400025cc: 80 a0 60 00 cmp %g1, 0 400025d0: 02 80 00 19 be 40002634 400025d4: 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 ); 400025d8: 92 10 00 19 mov %i1, %o1 400025dc: 94 10 00 1a mov %i2, %o2 400025e0: 96 10 00 1b mov %i3, %o3 400025e4: 9f c0 40 00 call %g1 400025e8: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400025ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 400025f0: 80 a0 60 00 cmp %g1, 0 400025f4: 02 bf ff d9 be 40002558 400025f8: b0 10 00 08 mov %o0, %i0 400025fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002600: 80 a0 60 00 cmp %g1, 0 40002604: 02 80 00 0a be 4000262c 40002608: 01 00 00 00 nop 4000260c: 9f c0 40 00 call %g1 40002610: 90 10 00 10 mov %l0, %o0 return result; } 40002614: 81 c7 e0 08 ret 40002618: 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 ); 4000261c: 40 00 34 09 call 4000f640 <__errno> <== NOT EXECUTED 40002620: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002624: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40002628: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000262c: 81 c7 e0 08 ret 40002630: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 40002634: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002638: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000263c: 02 bf ff c3 be 40002548 <== NOT EXECUTED 40002640: 01 00 00 00 nop <== NOT EXECUTED 40002644: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002648: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000264c: 30 bf ff bf b,a 40002548 <== NOT EXECUTED 40002670 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 40002670: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 40002674: 80 a6 60 00 cmp %i1, 0 40002678: 02 80 00 94 be 400028c8 4000267c: a0 10 00 18 mov %i0, %l0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 40002680: 80 a6 a0 01 cmp %i2, 1 40002684: 18 80 00 91 bgu 400028c8 40002688: 01 00 00 00 nop errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 4000268c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40002690: 80 a0 60 00 cmp %g1, 0 40002694: 02 80 00 98 be 400028f4 40002698: 80 a6 e0 00 cmp %i3, 0 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 4000269c: 02 80 00 05 be 400026b0 400026a0: 90 10 20 6c mov 0x6c, %o0 size += strlen( device ) + 1; 400026a4: 40 00 37 9e call 4001051c <== NOT EXECUTED 400026a8: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 400026ac: 90 02 20 6d add %o0, 0x6d, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 400026b0: 40 00 22 bc call 4000b1a0 400026b4: 01 00 00 00 nop if ( !temp_mt_entry ) { 400026b8: a2 92 20 00 orcc %o0, 0, %l1 400026bc: 02 80 00 97 be 40002918 400026c0: 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; 400026c4: f4 24 60 30 st %i2, [ %l1 + 0x30 ] if ( device ) { 400026c8: 80 a6 e0 00 cmp %i3, 0 400026cc: 02 80 00 7d be 400028c0 400026d0: e2 24 60 2c st %l1, [ %l1 + 0x2c ] temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 400026d4: 90 04 60 6c add %l1, 0x6c, %o0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 400026d8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 400026dc: 40 00 37 6d call 40010490 <== NOT EXECUTED 400026e0: 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 ) { 400026e4: 80 a7 20 00 cmp %i4, 0 400026e8: 22 80 00 6e be,a 400028a0 400026ec: c0 24 60 1c clr [ %l1 + 0x1c ] if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 400026f0: 40 00 37 8b call 4001051c 400026f4: 90 10 00 1c mov %i4, %o0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 400026f8: a4 07 bf ec add %fp, -20, %l2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 400026fc: 92 10 00 08 mov %o0, %o1 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 40002700: 94 10 20 07 mov 7, %o2 40002704: 90 10 00 1c mov %i4, %o0 40002708: 96 10 00 12 mov %l2, %o3 4000270c: 7f ff fe b7 call 400021e8 40002710: 98 10 20 01 mov 1, %o4 40002714: 80 a2 3f ff cmp %o0, -1 40002718: 02 80 00 7b be 40002904 4000271c: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 40002720: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40002724: 80 a0 60 00 cmp %g1, 0 40002728: 02 80 00 46 be 40002840 4000272c: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40002730: 9f c0 40 00 call %g1 40002734: 90 10 00 12 mov %l2, %o0 40002738: 80 a2 20 01 cmp %o0, 1 4000273c: 12 80 00 69 bne 400028e0 40002740: 09 10 00 75 sethi %hi(0x4001d400), %g4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40002744: c2 01 23 c0 ld [ %g4 + 0x3c0 ], %g1 ! 4001d7c0 40002748: 88 11 23 c0 or %g4, 0x3c0, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000274c: 88 01 20 04 add %g4, 4, %g4 40002750: 80 a0 40 04 cmp %g1, %g4 40002754: 02 80 00 0e be 4000278c 40002758: 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 ) 4000275c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40002760: 80 a0 80 03 cmp %g2, %g3 40002764: 32 80 00 07 bne,a 40002780 40002768: c2 00 40 00 ld [ %g1 ], %g1 4000276c: 30 80 00 48 b,a 4000288c <== NOT EXECUTED 40002770: 80 a0 80 03 cmp %g2, %g3 40002774: 02 80 00 46 be 4000288c 40002778: 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 ) { 4000277c: c2 00 40 00 ld [ %g1 ], %g1 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40002780: 80 a0 40 04 cmp %g1, %g4 40002784: 32 bf ff fb bne,a 40002770 40002788: 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; 4000278c: c6 24 60 08 st %g3, [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = loc.handlers; 40002790: c6 07 bf f4 ld [ %fp + -12 ], %g3 temp_mt_entry->mt_point_node.ops = loc.ops; 40002794: 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; 40002798: 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; 4000279c: 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 ){ 400027a0: 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; 400027a4: 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 ){ 400027a8: 80 a0 60 00 cmp %g1, 0 400027ac: 02 80 00 25 be 40002840 400027b0: c4 24 60 14 st %g2, [ %l1 + 0x14 ] errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 400027b4: 90 10 00 11 mov %l1, %o0 400027b8: 9f c0 40 00 call %g1 400027bc: a6 10 00 12 mov %l2, %l3 400027c0: 80 a2 20 00 cmp %o0, 0 400027c4: 12 80 00 24 bne 40002854 400027c8: 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 ) ) { 400027cc: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 400027d0: 9f c0 40 00 call %g1 400027d4: 90 10 00 11 mov %l1, %o0 400027d8: 80 a2 20 00 cmp %o0, 0 400027dc: 12 80 00 0b bne 40002808 400027e0: 11 10 00 75 sethi %hi(0x4001d400), %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 400027e4: 92 10 00 11 mov %l1, %o1 400027e8: 40 00 0f 36 call 400064c0 <_Chain_Append> 400027ec: 90 12 23 c0 or %o0, 0x3c0, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 400027f0: 80 a4 20 00 cmp %l0, 0 400027f4: 02 80 00 03 be 40002800 400027f8: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 400027fc: e2 24 00 00 st %l1, [ %l0 ] 40002800: 81 c7 e0 08 ret 40002804: 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 ) { 40002808: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000280c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 40002810: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002814: 02 80 00 04 be 40002824 <== NOT EXECUTED 40002818: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000281c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002820: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40002824: 40 00 20 df call 4000aba0 <== NOT EXECUTED 40002828: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( loc_to_free ) 4000282c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40002830: 32 80 00 0c bne,a 40002860 <== NOT EXECUTED 40002834: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); return -1; } 40002838: 81 c7 e0 08 ret <== NOT EXECUTED 4000283c: 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; 40002840: 40 00 33 80 call 4000f640 <__errno> <== NOT EXECUTED 40002844: 01 00 00 00 nop <== NOT EXECUTED 40002848: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000284c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40002850: 90 10 00 11 mov %l1, %o0 40002854: 40 00 20 d3 call 4000aba0 40002858: a6 10 00 12 mov %l2, %l3 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000285c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40002860: 80 a0 60 00 cmp %g1, 0 40002864: 02 bf ff e7 be 40002800 40002868: b0 10 3f ff mov -1, %i0 4000286c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002870: 80 a0 60 00 cmp %g1, 0 40002874: 02 bf ff e3 be 40002800 40002878: 90 10 00 13 mov %l3, %o0 4000287c: 9f c0 40 00 call %g1 40002880: 01 00 00 00 nop 40002884: 81 c7 e0 08 ret 40002888: 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; 4000288c: 40 00 33 6d call 4000f640 <__errno> 40002890: 01 00 00 00 nop 40002894: 82 10 20 10 mov 0x10, %g1 ! 10 goto cleanup_and_bail; 40002898: 10 bf ff ee b 40002850 4000289c: 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; 400028a0: c0 24 60 24 clr [ %l1 + 0x24 ] temp_mt_entry->mt_fs_root.ops = NULL; 400028a4: c0 24 60 28 clr [ %l1 + 0x28 ] temp_mt_entry->mt_point_node.node_access = NULL; 400028a8: c0 24 60 08 clr [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 400028ac: c0 24 60 10 clr [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = NULL; 400028b0: c0 24 60 14 clr [ %l1 + 0x14 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 400028b4: c0 24 60 18 clr [ %l1 + 0x18 ] 400028b8: 10 bf ff c5 b 400027cc 400028bc: 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; 400028c0: 10 bf ff 89 b 400026e4 400028c4: 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; 400028c8: 40 00 33 5e call 4000f640 <__errno> 400028cc: b0 10 3f ff mov -1, %i0 400028d0: 82 10 20 16 mov 0x16, %g1 400028d4: c2 22 00 00 st %g1, [ %o0 ] return -1; 400028d8: 81 c7 e0 08 ret 400028dc: 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; 400028e0: 40 00 33 58 call 4000f640 <__errno> 400028e4: 01 00 00 00 nop 400028e8: 82 10 20 14 mov 0x14, %g1 ! 14 goto cleanup_and_bail; 400028ec: 10 bf ff d9 b 40002850 400028f0: c2 22 00 00 st %g1, [ %o0 ] return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 400028f4: 40 00 33 53 call 4000f640 <__errno> <== NOT EXECUTED 400028f8: a6 10 20 00 clr %l3 <== NOT EXECUTED 400028fc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002900: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40002904: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40002908: 40 00 20 a6 call 4000aba0 <== NOT EXECUTED 4000290c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002910: 81 c7 e0 08 ret <== NOT EXECUTED 40002914: 81 e8 00 00 restore <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 40002918: 40 00 33 4a call 4000f640 <__errno> <== NOT EXECUTED 4000291c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002920: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40002924: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 40002928: 81 c7 e0 08 ret <== NOT EXECUTED 4000292c: 81 e8 00 00 restore <== NOT EXECUTED 400029a0 : */ int newlib_free_buffers( FILE *fp ) { 400029a0: 9d e3 bf a0 save %sp, -96, %sp switch ( fileno(fp) ) { 400029a4: 40 00 34 40 call 4000faa4 400029a8: 90 10 00 18 mov %i0, %o0 400029ac: 80 a2 20 02 cmp %o0, 2 400029b0: 28 80 00 06 bleu,a 400029c8 400029b4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 400029b8: 40 00 33 7a call 4000f7a0 <== NOT EXECUTED 400029bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 400029c0: 81 c7 e0 08 ret 400029c4: 91 e8 20 00 restore %g0, 0, %o0 { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 400029c8: 80 88 60 80 btst 0x80, %g1 400029cc: 02 bf ff fd be 400029c0 400029d0: 01 00 00 00 nop free( fp->_bf._base ); 400029d4: 40 00 20 73 call 4000aba0 <== NOT EXECUTED 400029d8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 400029dc: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 400029e0: 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; 400029e4: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 400029e8: 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; 400029ec: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED break; default: fclose(fp); } return 0; } 400029f0: 81 c7 e0 08 ret <== NOT EXECUTED 400029f4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40002a40 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 40002a40: 9d e3 bf a0 save %sp, -96, %sp rtems_device_driver status; if ( !initialized ) { 40002a44: 03 10 00 89 sethi %hi(0x40022400), %g1 40002a48: c4 48 62 68 ldsb [ %g1 + 0x268 ], %g2 ! 40022668 40002a4c: 80 a0 a0 00 cmp %g2, 0 40002a50: 02 80 00 04 be 40002a60 40002a54: 84 10 20 01 mov 1, %g2 NULL_major = major; } return RTEMS_SUCCESSFUL; } 40002a58: 81 c7 e0 08 ret 40002a5c: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 40002a60: 11 10 00 81 sethi %hi(0x40020400), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 40002a64: c4 28 62 68 stb %g2, [ %g1 + 0x268 ] status = rtems_io_register_name( 40002a68: 90 12 20 30 or %o0, 0x30, %o0 40002a6c: 92 10 00 18 mov %i0, %o1 40002a70: 40 00 00 51 call 40002bb4 40002a74: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40002a78: 80 a2 20 00 cmp %o0, 0 40002a7c: 12 80 00 05 bne 40002a90 40002a80: 03 10 00 8a sethi %hi(0x40022800), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 40002a84: f0 20 60 10 st %i0, [ %g1 + 0x10 ] ! 40022810 } return RTEMS_SUCCESSFUL; } 40002a88: 81 c7 e0 08 ret 40002a8c: 91 e8 20 00 restore %g0, 0, %o0 major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 40002a90: 40 00 11 aa call 40007138 <== NOT EXECUTED 40002a94: 01 00 00 00 nop 40002a98: 01 00 00 00 nop 40002a1c : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 40002a1c: 80 a2 a0 00 cmp %o2, 0 40002a20: 02 80 00 04 be 40002a30 40002a24: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 40002a28: c2 02 a0 14 ld [ %o2 + 0x14 ], %g1 <== NOT EXECUTED 40002a2c: c2 22 a0 1c st %g1, [ %o2 + 0x1c ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 40002a30: 81 c3 e0 08 retl 40002a34: 90 10 20 00 clr %o0 40002c40 : int open( const char *pathname, int flags, ... ) { 40002c40: 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); 40002c44: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40002c48: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40002c4c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40002c50: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40002c54: a2 06 60 01 add %i1, 1, %l1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002c58: 80 8c 60 02 btst 2, %l1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40002c5c: a2 0c 60 01 and %l1, 1, %l1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002c60: 02 80 00 03 be 40002c6c 40002c64: a3 2c 60 02 sll %l1, 2, %l1 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40002c68: a2 14 60 02 or %l1, 2, %l1 va_start(ap, flags); mode = va_arg( ap, int ); 40002c6c: 82 07 a0 50 add %fp, 0x50, %g1 40002c70: e4 07 a0 4c ld [ %fp + 0x4c ], %l2 40002c74: 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(); 40002c78: 40 00 20 d6 call 4000afd0 40002c7c: a6 10 20 17 mov 0x17, %l3 if ( iop == 0 ) { 40002c80: a0 92 20 00 orcc %o0, 0, %l0 40002c84: 02 80 00 6c be 40002e34 40002c88: 01 00 00 00 nop /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 40002c8c: 40 00 36 24 call 4001051c 40002c90: 90 10 00 18 mov %i0, %o0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40002c94: 94 10 00 11 mov %l1, %o2 pathname, strlen( pathname ), eval_flags, &loc, true ); 40002c98: 92 10 00 08 mov %o0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40002c9c: a2 07 bf e8 add %fp, -24, %l1 40002ca0: 90 10 00 18 mov %i0, %o0 40002ca4: 96 10 00 11 mov %l1, %o3 40002ca8: 7f ff fd 50 call 400021e8 40002cac: 98 10 20 01 mov 1, %o4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 40002cb0: 80 a2 3f ff cmp %o0, -1 40002cb4: 02 80 00 65 be 40002e48 40002cb8: 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)) { 40002cbc: a8 10 00 11 mov %l1, %l4 40002cc0: 80 a0 6a 00 cmp %g1, 0xa00 40002cc4: 02 80 00 4a be 40002dec 40002cc8: 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; 40002ccc: c2 07 bf f0 ld [ %fp + -16 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40002cd0: 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; 40002cd4: c2 24 20 40 st %g1, [ %l0 + 0x40 ] iop->file_info = loc.node_access; 40002cd8: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 40002cdc: 90 10 00 19 mov %i1, %o0 40002ce0: 40 00 20 fd call 4000b0d4 40002ce4: c2 24 20 3c st %g1, [ %l0 + 0x3c ] iop->pathinfo = loc; 40002ce8: c4 07 bf e8 ld [ %fp + -24 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40002cec: 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; 40002cf0: c4 24 20 1c st %g2, [ %l0 + 0x1c ] 40002cf4: 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 ); 40002cf8: 90 12 00 13 or %o0, %l3, %o0 iop->pathinfo = loc; 40002cfc: c4 24 20 20 st %g2, [ %l0 + 0x20 ] 40002d00: 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 ); 40002d04: d0 24 20 18 st %o0, [ %l0 + 0x18 ] iop->pathinfo = loc; 40002d08: c4 24 20 24 st %g2, [ %l0 + 0x24 ] 40002d0c: c4 07 bf f4 ld [ %fp + -12 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40002d10: 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; 40002d14: c4 24 20 28 st %g2, [ %l0 + 0x28 ] 40002d18: c4 07 bf f8 ld [ %fp + -8 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40002d1c: 02 80 00 32 be 40002de4 40002d20: c4 24 20 2c st %g2, [ %l0 + 0x2c ] 40002d24: c2 00 40 00 ld [ %g1 ], %g1 40002d28: 80 a0 60 00 cmp %g1, 0 40002d2c: 02 80 00 2e be 40002de4 40002d30: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40002d34: 96 10 00 12 mov %l2, %o3 40002d38: 90 10 00 10 mov %l0, %o0 40002d3c: 9f c0 40 00 call %g1 40002d40: 94 10 00 19 mov %i1, %o2 if ( rc ) { 40002d44: 80 a2 20 00 cmp %o0, 0 40002d48: 12 80 00 12 bne 40002d90 40002d4c: 80 8e 64 00 btst 0x400, %i1 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40002d50: 12 80 00 48 bne 40002e70 40002d54: 23 10 00 75 sethi %hi(0x4001d400), %l1 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40002d58: c2 04 63 84 ld [ %l1 + 0x384 ], %g1 ! 4001d784 40002d5c: a0 24 00 01 sub %l0, %g1, %l0 40002d60: a1 3c 20 03 sra %l0, 3, %l0 40002d64: 85 2c 20 06 sll %l0, 6, %g2 40002d68: 83 2c 20 03 sll %l0, 3, %g1 40002d6c: 82 20 80 01 sub %g2, %g1, %g1 40002d70: 85 28 60 06 sll %g1, 6, %g2 40002d74: 82 00 40 02 add %g1, %g2, %g1 40002d78: 82 00 40 10 add %g1, %l0, %g1 40002d7c: b1 28 60 0f sll %g1, 0xf, %i0 40002d80: b0 26 00 01 sub %i0, %g1, %i0 40002d84: b1 2e 20 03 sll %i0, 3, %i0 } 40002d88: 81 c7 e0 08 ret 40002d8c: 91 ee 00 10 restore %i0, %l0, %o0 goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 40002d90: a8 10 00 11 mov %l1, %l4 40002d94: 40 00 32 2b call 4000f640 <__errno> 40002d98: 01 00 00 00 nop 40002d9c: e6 02 00 00 ld [ %o0 ], %l3 */ done: va_end(ap); if ( rc ) { 40002da0: 80 a4 e0 00 cmp %l3, 0 40002da4: 12 80 00 12 bne 40002dec 40002da8: 23 10 00 75 sethi %hi(0x4001d400), %l1 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40002dac: c2 04 63 84 ld [ %l1 + 0x384 ], %g1 ! 4001d784 <== NOT EXECUTED 40002db0: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 40002db4: a1 3c 20 03 sra %l0, 3, %l0 <== NOT EXECUTED 40002db8: 85 2c 20 06 sll %l0, 6, %g2 <== NOT EXECUTED 40002dbc: 83 2c 20 03 sll %l0, 3, %g1 <== NOT EXECUTED 40002dc0: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED 40002dc4: 85 28 60 06 sll %g1, 6, %g2 <== NOT EXECUTED 40002dc8: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40002dcc: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 40002dd0: b1 28 60 0f sll %g1, 0xf, %i0 <== NOT EXECUTED 40002dd4: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED 40002dd8: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED } 40002ddc: 81 c7 e0 08 ret <== NOT EXECUTED 40002de0: 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; 40002de4: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 40002de8: a6 10 20 86 mov 0x86, %l3 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 40002dec: 80 a4 20 00 cmp %l0, 0 40002df0: 02 80 00 05 be 40002e04 40002df4: 80 a5 20 00 cmp %l4, 0 rtems_libio_free( iop ); 40002df8: 40 00 20 5f call 4000af74 40002dfc: 90 10 00 10 mov %l0, %o0 if ( loc_to_free ) 40002e00: 80 a5 20 00 cmp %l4, 0 40002e04: 02 80 00 0c be 40002e34 40002e08: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40002e0c: c2 05 20 0c ld [ %l4 + 0xc ], %g1 40002e10: 80 a0 60 00 cmp %g1, 0 40002e14: 02 80 00 08 be 40002e34 40002e18: 01 00 00 00 nop 40002e1c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002e20: 80 a0 60 00 cmp %g1, 0 40002e24: 02 80 00 04 be 40002e34 40002e28: 01 00 00 00 nop 40002e2c: 9f c0 40 00 call %g1 40002e30: 90 10 00 14 mov %l4, %o0 rtems_set_errno_and_return_minus_one( rc ); 40002e34: 40 00 32 03 call 4000f640 <__errno> 40002e38: b0 10 3f ff mov -1, %i0 40002e3c: e6 22 00 00 st %l3, [ %o0 ] 40002e40: 81 c7 e0 08 ret 40002e44: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 40002e48: 40 00 31 fe call 4000f640 <__errno> 40002e4c: 01 00 00 00 nop 40002e50: c2 02 00 00 ld [ %o0 ], %g1 40002e54: 80 a0 60 02 cmp %g1, 2 40002e58: 02 80 00 31 be 40002f1c 40002e5c: 80 8e 62 00 btst 0x200, %i1 rc = errno; 40002e60: 40 00 31 f8 call 4000f640 <__errno> 40002e64: a8 10 20 00 clr %l4 goto done; 40002e68: 10 bf ff ce b 40002da0 40002e6c: e6 02 00 00 ld [ %o0 ], %l3 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 40002e70: c2 04 63 84 ld [ %l1 + 0x384 ], %g1 40002e74: 92 10 20 00 clr %o1 40002e78: 82 24 00 01 sub %l0, %g1, %g1 40002e7c: 83 38 60 03 sra %g1, 3, %g1 40002e80: 87 28 60 06 sll %g1, 6, %g3 40002e84: 85 28 60 03 sll %g1, 3, %g2 40002e88: 84 20 c0 02 sub %g3, %g2, %g2 40002e8c: 87 28 a0 06 sll %g2, 6, %g3 40002e90: 84 00 80 03 add %g2, %g3, %g2 40002e94: 84 00 80 01 add %g2, %g1, %g2 40002e98: 91 28 a0 0f sll %g2, 0xf, %o0 40002e9c: 84 22 00 02 sub %o0, %g2, %g2 40002ea0: 94 10 20 00 clr %o2 40002ea4: 91 28 a0 03 sll %g2, 3, %o0 40002ea8: 40 00 1f 69 call 4000ac4c 40002eac: 90 02 00 01 add %o0, %g1, %o0 if ( rc ) { 40002eb0: a6 92 20 00 orcc %o0, 0, %l3 40002eb4: 02 bf ff aa be 40002d5c 40002eb8: c2 04 63 84 ld [ %l1 + 0x384 ], %g1 if(errno) rc = errno; 40002ebc: 40 00 31 e1 call 4000f640 <__errno> <== NOT EXECUTED 40002ec0: 01 00 00 00 nop <== NOT EXECUTED 40002ec4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40002ec8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002ecc: 12 80 00 30 bne 40002f8c <== NOT EXECUTED 40002ed0: 01 00 00 00 nop <== NOT EXECUTED close( iop - rtems_libio_iops ); 40002ed4: c2 04 63 84 ld [ %l1 + 0x384 ], %g1 <== NOT EXECUTED 40002ed8: a8 10 20 00 clr %l4 <== NOT EXECUTED 40002edc: 82 24 00 01 sub %l0, %g1, %g1 <== NOT EXECUTED 40002ee0: 83 38 60 03 sra %g1, 3, %g1 <== NOT EXECUTED 40002ee4: 87 28 60 06 sll %g1, 6, %g3 <== NOT EXECUTED 40002ee8: 85 28 60 03 sll %g1, 3, %g2 <== NOT EXECUTED 40002eec: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 40002ef0: 87 28 a0 06 sll %g2, 6, %g3 <== NOT EXECUTED 40002ef4: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED 40002ef8: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40002efc: 87 28 a0 0f sll %g2, 0xf, %g3 <== NOT EXECUTED 40002f00: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 40002f04: a0 10 20 00 clr %l0 <== NOT EXECUTED 40002f08: 91 28 a0 03 sll %g2, 3, %o0 <== NOT EXECUTED 40002f0c: 40 00 1e f5 call 4000aae0 <== NOT EXECUTED 40002f10: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40002f14: 10 bf ff a4 b 40002da4 <== NOT EXECUTED 40002f18: 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) ) { 40002f1c: a8 10 20 00 clr %l4 40002f20: 02 bf ff b3 be 40002dec 40002f24: 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 ); 40002f28: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40002f2c: 90 10 00 18 mov %i0, %o0 40002f30: 92 14 80 09 or %l2, %o1, %o1 40002f34: 94 10 20 00 clr %o2 40002f38: 93 2a 60 10 sll %o1, 0x10, %o1 40002f3c: 96 10 20 00 clr %o3 40002f40: 7f ff fd 63 call 400024cc 40002f44: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 40002f48: 80 a2 20 00 cmp %o0, 0 40002f4c: 12 bf ff 92 bne 40002d94 40002f50: 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 ); 40002f54: 40 00 35 72 call 4001051c 40002f58: 90 10 00 18 mov %i0, %o0 40002f5c: 94 10 20 00 clr %o2 40002f60: 92 10 00 08 mov %o0, %o1 40002f64: 96 10 00 11 mov %l1, %o3 40002f68: 90 10 00 18 mov %i0, %o0 40002f6c: 98 10 20 01 mov 1, %o4 40002f70: 7f ff fc 9e call 400021e8 40002f74: a8 10 20 00 clr %l4 if ( status != 0 ) { /* The file did not exist */ 40002f78: 80 a2 20 00 cmp %o0, 0 40002f7c: 12 bf ff 9c bne 40002dec 40002f80: 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; 40002f84: 10 bf ff 53 b 40002cd0 40002f88: 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; 40002f8c: 40 00 31 ad call 4000f640 <__errno> <== NOT EXECUTED 40002f90: 01 00 00 00 nop <== NOT EXECUTED 40002f94: 10 bf ff d0 b 40002ed4 <== NOT EXECUTED 40002f98: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED 40002bcc : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 40002bcc: 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) { 40002bd0: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40002bd4: 92 10 20 00 clr %o1 40002bd8: 90 14 21 38 or %l0, 0x138, %o0 40002bdc: 40 00 00 19 call 40002c40 40002be0: 94 10 20 00 clr %o2 40002be4: 80 a2 3f ff cmp %o0, -1 40002be8: 02 80 00 0e be 40002c20 40002bec: 90 14 21 38 or %l0, 0x138, %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) 40002bf0: 92 10 20 01 mov 1, %o1 40002bf4: 40 00 00 13 call 40002c40 40002bf8: 94 10 20 00 clr %o2 40002bfc: 80 a2 3f ff cmp %o0, -1 40002c00: 02 80 00 0c be 40002c30 40002c04: 92 10 20 01 mov 1, %o1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40002c08: 90 14 21 38 or %l0, 0x138, %o0 40002c0c: 40 00 00 0d call 40002c40 40002c10: 94 10 20 00 clr %o2 40002c14: 80 a2 3f ff cmp %o0, -1 40002c18: 02 80 00 04 be 40002c28 40002c1c: 11 15 55 11 sethi %hi(0x55544400), %o0 40002c20: 81 c7 e0 08 ret 40002c24: 81 e8 00 00 restore rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 40002c28: 40 00 0d 37 call 40006104 <== NOT EXECUTED 40002c2c: 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 */ 40002c30: 11 15 55 11 sethi %hi(0x55544400), %o0 <== NOT EXECUTED 40002c34: 40 00 0d 34 call 40006104 <== NOT EXECUTED 40002c38: 90 12 20 31 or %o0, 0x31, %o0 ! 55544431 <== NOT EXECUTED 40002c3c: 01 00 00 00 nop 40003778 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 40003778: 9d e3 bf a0 save %sp, -96, %sp int i; if (tty->termios.c_oflag & OPOST) { 4000377c: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 40003780: 80 88 60 01 btst 1, %g1 40003784: 02 80 00 19 be 400037e8 40003788: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 4000378c: b0 0e 20 ff and %i0, 0xff, %i0 40003790: 80 a6 20 09 cmp %i0, 9 40003794: 22 80 00 42 be,a 4000389c 40003798: c6 06 60 28 ld [ %i1 + 0x28 ], %g3 4000379c: 08 80 00 19 bleu 40003800 400037a0: 80 a6 20 08 cmp %i0, 8 400037a4: 80 a6 20 0a cmp %i0, 0xa 400037a8: 02 80 00 22 be 40003830 400037ac: 80 a6 20 0d cmp %i0, 0xd 400037b0: 02 80 00 2d be 40003864 400037b4: 80 88 60 10 btst 0x10, %g1 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 400037b8: 80 88 60 02 btst 2, %g1 400037bc: 12 80 00 46 bne 400038d4 400037c0: 03 10 00 74 sethi %hi(0x4001d000), %g1 400037c4: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 4001d0f8 <__ctype_ptr__> c = toupper(c); if (!iscntrl(c)) 400037c8: b0 00 40 18 add %g1, %i0, %i0 400037cc: c2 0e 20 01 ldub [ %i0 + 1 ], %g1 400037d0: 80 88 60 20 btst 0x20, %g1 400037d4: 12 80 00 06 bne 400037ec 400037d8: 94 10 00 19 mov %i1, %o2 tty->column++; 400037dc: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 400037e0: 82 00 60 01 inc %g1 400037e4: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 400037e8: 94 10 00 19 mov %i1, %o2 400037ec: 90 07 a0 44 add %fp, 0x44, %o0 400037f0: 7f ff ff 93 call 4000363c 400037f4: 92 10 20 01 mov 1, %o1 400037f8: 81 c7 e0 08 ret 400037fc: 81 e8 00 00 restore oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 40003800: 12 bf ff ef bne 400037bc <== NOT EXECUTED 40003804: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 40003808: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 4000380c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003810: 04 bf ff f6 ble 400037e8 <== NOT EXECUTED 40003814: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40003818: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += i; break; case '\b': if (tty->column > 0) tty->column--; 4000381c: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40003820: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40003824: 7f ff ff 86 call 4000363c <== NOT EXECUTED 40003828: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000382c: 30 80 00 3e b,a 40003924 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 40003830: 80 88 60 20 btst 0x20, %g1 40003834: 32 80 00 02 bne,a 4000383c 40003838: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 4000383c: 80 88 60 04 btst 4, %g1 40003840: 02 bf ff eb be 400037ec 40003844: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40003848: 11 10 00 70 sethi %hi(0x4001c000), %o0 4000384c: 92 10 20 01 mov 1, %o1 40003850: 90 12 20 78 or %o0, 0x78, %o0 40003854: 7f ff ff 7a call 4000363c 40003858: 94 10 00 19 mov %i1, %o2 tty->column = 0; 4000385c: 10 bf ff e3 b 400037e8 40003860: c0 26 60 28 clr [ %i1 + 0x28 ] } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40003864: 02 80 00 06 be 4000387c <== NOT EXECUTED 40003868: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 4000386c: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED 40003870: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003874: 02 bf ff e1 be 400037f8 <== NOT EXECUTED 40003878: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 4000387c: 22 bf ff db be,a 400037e8 <== NOT EXECUTED 40003880: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 40003884: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 40003888: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 4000388c: 02 bf ff d7 be 400037e8 <== NOT EXECUTED 40003890: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; break; 40003894: 10 bf ff d5 b 400037e8 <== NOT EXECUTED 40003898: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 4000389c: 05 00 00 06 sethi %hi(0x1800), %g2 400038a0: 82 08 40 02 and %g1, %g2, %g1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 400038a4: 92 10 20 08 mov 8, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 400038a8: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 400038ac: 82 08 e0 07 and %g3, 7, %g1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 400038b0: 02 80 00 17 be 4000390c 400038b4: 92 22 40 01 sub %o1, %g1, %o1 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 400038b8: 86 02 40 03 add %o1, %g3, %g3 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 400038bc: 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; 400038c0: c6 26 60 28 st %g3, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 400038c4: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 400038c8: 7f ff ff 5d call 4000363c <== NOT EXECUTED 400038cc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400038d0: 30 80 00 15 b,a 40003924 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 400038d4: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 <== NOT EXECUTED 400038d8: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 400038dc: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED 400038e0: c6 0e 20 01 ldub [ %i0 + 1 ], %g3 <== NOT EXECUTED 400038e4: 86 08 e0 03 and %g3, 3, %g3 <== NOT EXECUTED 400038e8: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 400038ec: 22 80 00 05 be,a 40003900 <== NOT EXECUTED 400038f0: 84 00 bf e0 add %g2, -32, %g2 <== NOT EXECUTED 400038f4: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED 400038f8: 10 bf ff b4 b 400037c8 <== NOT EXECUTED 400038fc: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED 40003900: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED 40003904: 10 bf ff b1 b 400037c8 <== NOT EXECUTED 40003908: 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; 4000390c: 86 02 40 03 add %o1, %g3, %g3 rtems_termios_puts ( " ", i, tty); 40003910: 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; 40003914: c6 26 60 28 st %g3, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 40003918: 11 10 00 70 sethi %hi(0x4001c000), %o0 4000391c: 7f ff ff 48 call 4000363c 40003920: 90 12 20 80 or %o0, 0x80, %o0 ! 4001c080 <__FUNCTION__.5671+0x2a0> return; 40003924: 81 c7 e0 08 ret 40003928: 81 e8 00 00 restore 4000e9f4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4000e9f4: 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) 4000e9f8: 23 10 00 71 sethi %hi(0x4001c400), %l1 4000e9fc: a0 07 bf dc add %fp, -36, %l0 4000ea00: 92 10 20 03 mov 3, %o1 4000ea04: 90 14 63 68 or %l1, 0x368, %o0 4000ea08: 94 10 20 07 mov 7, %o2 4000ea0c: 96 10 00 10 mov %l0, %o3 4000ea10: 7f ff cd f6 call 400021e8 4000ea14: 98 10 20 01 mov 1, %o4 4000ea18: 80 a2 20 00 cmp %o0, 0 4000ea1c: 12 80 00 43 bne 4000eb28 4000ea20: 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); 4000ea24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ea28: 22 80 00 09 be,a 4000ea4c <== NOT EXECUTED 4000ea2c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ea30: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001d41c <== NOT EXECUTED 4000ea34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ea38: 22 80 00 05 be,a 4000ea4c <== NOT EXECUTED 4000ea3c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ea40: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ea44: 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 ++); 4000ea48: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ea4c: c4 10 63 12 lduh [ %g1 + 0x312 ], %g2 ! 4001d712 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ea50: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ea54: 95 28 a0 10 sll %g2, 0x10, %o2 4000ea58: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ea5c: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ea60: c4 30 63 12 sth %g2, [ %g1 + 0x312 ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ea64: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 4000ea68: 03 00 00 19 sethi %hi(0x6400), %g1 4000ea6c: 84 10 a1 70 or %g2, 0x170, %g2 4000ea70: 82 10 62 6f or %g1, 0x26f, %g1 4000ea74: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ea78: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ea7c: c4 3f bf f0 std %g2, [ %fp + -16 ] 4000ea80: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ea84: 90 07 bf fa add %fp, -6, %o0 4000ea88: 13 10 00 71 sethi %hi(0x4001c400), %o1 4000ea8c: 40 00 05 d8 call 400101ec 4000ea90: 92 12 63 70 or %o1, 0x370, %o1 ! 4001c770 <__FUNCTION__.5943+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4000ea94: 90 10 00 10 mov %l0, %o0 4000ea98: 40 00 00 5a call 4000ec00 4000ea9c: 92 10 21 80 mov 0x180, %o1 4000eaa0: 80 a2 20 00 cmp %o0, 0 4000eaa4: 12 80 00 1d bne 4000eb18 4000eaa8: 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); 4000eaac: 7f ff d0 65 call 40002c40 4000eab0: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 4000eab4: 80 a2 20 00 cmp %o0, 0 4000eab8: 06 80 00 2f bl 4000eb74 4000eabc: 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]); 4000eac0: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 4000eac4: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 4001cf44 <== NOT EXECUTED 4000eac8: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000eacc: 0a 80 00 23 bcs 4000eb58 <== NOT EXECUTED 4000ead0: 82 10 20 00 clr %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000ead4: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000ead8: 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; 4000eadc: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000eae0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000eae4: 7f ff d0 57 call 40002c40 <== NOT EXECUTED 4000eae8: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 4000eaec: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 4000eaf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000eaf4: 06 80 00 26 bl 4000eb8c <== NOT EXECUTED 4000eaf8: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4000eafc: 40 00 00 4b call 4000ec28 <== NOT EXECUTED 4000eb00: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4000eb04: 40 00 02 cf call 4000f640 <__errno> 4000eb08: b0 10 3f ff mov -1, %i0 4000eb0c: e2 22 00 00 st %l1, [ %o0 ] } 4000eb10: 81 c7 e0 08 ret 4000eb14: 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){ 4000eb18: 40 00 02 ca call 4000f640 <__errno> <== NOT EXECUTED 4000eb1c: 01 00 00 00 nop <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4000eb20: 81 c7 e0 08 ret <== NOT EXECUTED 4000eb24: 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) 4000eb28: 40 00 02 c6 call 4000f640 <__errno> 4000eb2c: 01 00 00 00 nop 4000eb30: c2 02 00 00 ld [ %o0 ], %g1 4000eb34: 80 a0 60 02 cmp %g1, 2 4000eb38: 12 bf ff fa bne 4000eb20 4000eb3c: 90 14 63 68 or %l1, 0x368, %o0 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4000eb40: 7f ff ce 59 call 400024a4 4000eb44: 92 10 23 ff mov 0x3ff, %o1 4000eb48: 80 a2 20 00 cmp %o0, 0 4000eb4c: 02 bf ff c0 be 4000ea4c 4000eb50: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000eb54: 30 bf ff f3 b,a 4000eb20 <== 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]); 4000eb58: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000eb5c: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 4001d784 <== NOT EXECUTED 4000eb60: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4000eb64: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 4000eb68: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 4000eb6c: 10 bf ff da b 4000ead4 <== NOT EXECUTED 4000eb70: 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; 4000eb74: 40 00 02 b3 call 4000f640 <__errno> 4000eb78: 01 00 00 00 nop 4000eb7c: 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); 4000eb80: 40 00 00 2a call 4000ec28 4000eb84: 90 10 00 10 mov %l0, %o0 4000eb88: 30 bf ff df b,a 4000eb04 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4000eb8c: 40 00 02 ad call 4000f640 <__errno> <== NOT EXECUTED 4000eb90: 01 00 00 00 nop <== NOT EXECUTED 4000eb94: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 4000eb98: 7f ff ef d2 call 4000aae0 <== NOT EXECUTED 4000eb9c: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 4000eba0: 30 bf ff d7 b,a 4000eafc <== NOT EXECUTED 4000cfd0 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000cfd0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 4000cfd4: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000cfd8: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 4000cfdc: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000cfe0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000cfe4: 12 80 00 12 bne 4000d02c <== NOT EXECUTED 4000cfe8: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 4000cfec: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000cff0: 02 80 00 0f be 4000d02c <== NOT EXECUTED 4000cff4: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4000cff8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000cffc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d000: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d004: 7f ff e2 91 call 40005a48 <== NOT EXECUTED 4000d008: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d00c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d010: 12 80 00 07 bne 4000d02c <== NOT EXECUTED 4000d014: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000d018: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d01c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000d020: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d024: 7f ff e2 d0 call 40005b64 <== NOT EXECUTED 4000d028: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 4000d02c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d030: 81 e8 00 00 restore <== NOT EXECUTED 4000cf58 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4000cf58: 81 c3 e0 08 retl <== NOT EXECUTED 4000cf5c: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED 4000d034 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000d034: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000d038: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000d03c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000d040: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d044: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d048: 7f ff e2 80 call 40005a48 <== NOT EXECUTED 4000d04c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d050: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d054: 12 80 00 2f bne 4000d110 <== NOT EXECUTED 4000d058: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4000d05c: a4 10 20 00 clr %l2 <== NOT EXECUTED 4000d060: b0 10 20 00 clr %i0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4000d064: 02 80 00 26 be 4000d0fc <== NOT EXECUTED 4000d068: 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); 4000d06c: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4000d070: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000d074: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000d078: 12 80 00 2a bne 4000d120 <== NOT EXECUTED 4000d07c: 82 26 80 12 sub %i2, %l2, %g1 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4000d080: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000d084: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d088: 22 80 00 1d be,a 4000d0fc <== NOT EXECUTED 4000d08c: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4000d090: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000d094: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d098: 32 80 00 19 bne,a 4000d0fc <== NOT EXECUTED 4000d09c: 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 ++; 4000d0a0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d0a4: 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 ++; 4000d0a8: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d0ac: 7f ff e2 ae call 40005b64 <== NOT EXECUTED 4000d0b0: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000d0b4: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d0b8: 40 00 04 a9 call 4000e35c <== NOT EXECUTED 4000d0bc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d0c0: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d0c4: 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)) 4000d0c8: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d0cc: 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)) 4000d0d0: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d0d4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d0d8: 7f ff e2 5c call 40005a48 <== NOT EXECUTED 4000d0dc: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000d0e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d0e4: 12 80 00 32 bne 4000d1ac <== NOT EXECUTED 4000d0e8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4000d0ec: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000d0f0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000d0f4: 02 bf ff df be 4000d070 <== NOT EXECUTED 4000d0f8: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4000d0fc: 7f ff e2 9a call 40005b64 <== NOT EXECUTED 4000d100: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 4000d104: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d108: 04 80 00 04 ble 4000d118 <== NOT EXECUTED 4000d10c: 01 00 00 00 nop <== NOT EXECUTED return read; return ret; } 4000d110: 81 c7 e0 08 ret <== NOT EXECUTED 4000d114: 81 e8 00 00 restore <== NOT EXECUTED 4000d118: 81 c7 e0 08 ret <== NOT EXECUTED 4000d11c: 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); 4000d120: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000d124: 38 80 00 02 bgu,a 4000d12c <== NOT EXECUTED 4000d128: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4000d12c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000d130: e8 04 20 04 ld [ %l0 + 4 ], %l4 <== NOT EXECUTED 4000d134: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED if (chunk > chunk1) { 4000d138: 80 a4 40 14 cmp %l1, %l4 <== NOT EXECUTED 4000d13c: 14 80 00 1e bg 4000d1b4 <== NOT EXECUTED 4000d140: 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); 4000d144: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED 4000d148: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000d14c: 40 00 0b 78 call 4000ff2c <== NOT EXECUTED 4000d150: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED pipe->Start += chunk; 4000d154: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000d158: 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; 4000d15c: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000d160: 40 00 2f 75 call 40018f34 <.urem> <== NOT EXECUTED 4000d164: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000d168: 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; 4000d16c: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000d170: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4000d174: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d178: 12 80 00 03 bne 4000d184 <== NOT EXECUTED 4000d17c: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 4000d180: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 4000d184: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d188: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d18c: 32 80 00 15 bne,a 4000d1e0 <== NOT EXECUTED 4000d190: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 4000d194: 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) { 4000d198: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000d19c: 0a bf ff b5 bcs 4000d070 <== NOT EXECUTED 4000d1a0: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED 4000d1a4: 10 bf ff d6 b 4000d0fc <== NOT EXECUTED 4000d1a8: 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)) { 4000d1ac: 10 bf ff d6 b 4000d104 <== NOT EXECUTED 4000d1b0: 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); 4000d1b4: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 4000d1b8: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000d1bc: 40 00 0b 5c call 4000ff2c <== NOT EXECUTED 4000d1c0: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4000d1c4: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 4000d1c8: 90 04 80 14 add %l2, %l4, %o0 <== NOT EXECUTED 4000d1cc: 94 24 40 14 sub %l1, %l4, %o2 <== NOT EXECUTED 4000d1d0: 40 00 0b 57 call 4000ff2c <== NOT EXECUTED 4000d1d4: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; 4000d1d8: 10 bf ff e0 b 4000d158 <== NOT EXECUTED 4000d1dc: 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); 4000d1e0: 40 00 04 48 call 4000e300 <== NOT EXECUTED 4000d1e4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 4000d1e8: 10 bf ff ec b 4000d198 <== NOT EXECUTED 4000d1ec: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 4000d40c : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d40c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 4000d410: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4000d414: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d418: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d41c: 7f ff e1 8b call 40005a48 <== NOT EXECUTED 4000d420: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4000d424: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d428: 12 80 00 48 bne 4000d548 <== NOT EXECUTED 4000d42c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4000d430: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4000d434: 80 8c a0 02 btst 2, %l2 <== NOT EXECUTED 4000d438: 02 80 00 05 be 4000d44c <== NOT EXECUTED 4000d43c: a4 0c a0 06 and %l2, 6, %l2 <== NOT EXECUTED pipe->Readers --; 4000d440: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d444: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d448: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4000d44c: 80 8c a0 04 btst 4, %l2 <== NOT EXECUTED 4000d450: 32 80 00 1d bne,a 4000d4c4 <== NOT EXECUTED 4000d454: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d458: 23 10 00 75 sethi %hi(0x4001d400), %l1 <== NOT EXECUTED 4000d45c: d0 04 63 0c ld [ %l1 + 0x30c ], %o0 ! 4001d70c <== NOT EXECUTED 4000d460: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d464: 7f ff e1 79 call 40005a48 <== NOT EXECUTED 4000d468: 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) 4000d46c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d470: 12 80 00 36 bne 4000d548 <== NOT EXECUTED 4000d474: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4000d478: 7f ff e1 bb call 40005b64 <== NOT EXECUTED 4000d47c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4000d480: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d484: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d488: 12 80 00 12 bne 4000d4d0 <== NOT EXECUTED 4000d48c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000d490: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d494: 02 80 00 1d be 4000d508 <== NOT EXECUTED 4000d498: 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) 4000d49c: 02 80 00 06 be 4000d4b4 <== NOT EXECUTED 4000d4a0: d0 04 63 0c ld [ %l1 + 0x30c ], %o0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4000d4a4: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d4a8: 40 00 03 96 call 4000e300 <== NOT EXECUTED 4000d4ac: 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); 4000d4b0: d0 04 63 0c ld [ %l1 + 0x30c ], %o0 <== NOT EXECUTED 4000d4b4: 7f ff e1 ac call 40005b64 <== NOT EXECUTED 4000d4b8: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000d4bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000d4c0: 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 --; 4000d4c4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d4c8: 10 bf ff e4 b 4000d458 <== NOT EXECUTED 4000d4cc: 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) 4000d4d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d4d4: 12 bf ff f8 bne 4000d4b4 <== NOT EXECUTED 4000d4d8: d0 04 63 0c ld [ %l1 + 0x30c ], %o0 <== NOT EXECUTED 4000d4dc: 80 a4 a0 02 cmp %l2, 2 <== NOT EXECUTED 4000d4e0: 02 bf ff f5 be 4000d4b4 <== NOT EXECUTED 4000d4e4: 01 00 00 00 nop <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000d4e8: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d4ec: 40 00 03 85 call 4000e300 <== NOT EXECUTED 4000d4f0: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4000d4f4: d0 04 63 0c ld [ %l1 + 0x30c ], %o0 <== NOT EXECUTED 4000d4f8: 7f ff e1 9b call 40005b64 <== NOT EXECUTED 4000d4fc: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000d500: 81 c7 e0 08 ret <== NOT EXECUTED 4000d504: 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); 4000d508: 40 00 03 64 call 4000e298 <== NOT EXECUTED 4000d50c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000d510: 40 00 03 62 call 4000e298 <== NOT EXECUTED 4000d514: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000d518: 7f ff e1 1f call 40005994 <== NOT EXECUTED 4000d51c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000d520: 7f ff f5 a0 call 4000aba0 <== NOT EXECUTED 4000d524: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED free(pipe); 4000d528: 7f ff f5 9e call 4000aba0 <== NOT EXECUTED 4000d52c: 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); 4000d530: d0 04 63 0c ld [ %l1 + 0x30c ], %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; 4000d534: 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); 4000d538: 7f ff e1 8b call 40005b64 <== NOT EXECUTED 4000d53c: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000d540: 81 c7 e0 08 ret <== NOT EXECUTED 4000d544: 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); 4000d548: 7f ff e2 ef call 40006104 <== NOT EXECUTED 4000d54c: 01 00 00 00 nop 4000d550: 01 00 00 00 nop 4000d1f0 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4000d1f0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4000d1f4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4000d1f8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000d1fc: 12 80 00 04 bne 4000d20c <== NOT EXECUTED 4000d200: b0 10 20 00 clr %i0 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4000d204: 81 c7 e0 08 ret <== NOT EXECUTED 4000d208: 81 e8 00 00 restore <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4000d20c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d210: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d214: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d218: 7f ff e2 0c call 40005a48 <== NOT EXECUTED 4000d21c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d220: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d224: 12 bf ff f8 bne 4000d204 <== NOT EXECUTED 4000d228: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4000d22c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d230: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d234: 02 80 00 56 be 4000d38c <== NOT EXECUTED 4000d238: 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; 4000d23c: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED 4000d240: 80 a6 80 15 cmp %i2, %l5 <== NOT EXECUTED 4000d244: 18 80 00 03 bgu 4000d250 <== NOT EXECUTED 4000d248: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 4000d24c: a4 10 00 1a mov %i2, %l2 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4000d250: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000d254: 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); 4000d258: 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) { 4000d25c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000d260: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED 4000d264: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d268: 1a 80 00 28 bcc 4000d308 <== NOT EXECUTED 4000d26c: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 4000d270: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000d274: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d278: 32 80 00 46 bne,a 4000d390 <== NOT EXECUTED 4000d27c: 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 ++; 4000d280: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d284: 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 ++; 4000d288: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d28c: 7f ff e2 36 call 40005b64 <== NOT EXECUTED 4000d290: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000d294: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d298: 40 00 04 31 call 4000e35c <== NOT EXECUTED 4000d29c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d2a0: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d2a4: 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)) 4000d2a8: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d2ac: 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)) 4000d2b0: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d2b4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d2b8: 7f ff e1 e4 call 40005a48 <== NOT EXECUTED 4000d2bc: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000d2c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d2c4: 12 80 00 43 bne 4000d3d0 <== NOT EXECUTED 4000d2c8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4000d2cc: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d2d0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000d2d4: 12 80 00 2f bne 4000d390 <== NOT EXECUTED 4000d2d8: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4000d2dc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d2e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d2e4: 02 80 00 2b be 4000d390 <== NOT EXECUTED 4000d2e8: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED 4000d2ec: 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) { 4000d2f0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000d2f4: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED 4000d2f8: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d2fc: 2a bf ff de bcs,a 4000d274 <== NOT EXECUTED 4000d300: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4000d304: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED 4000d308: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000d30c: 38 80 00 02 bgu,a 4000d314 <== NOT EXECUTED 4000d310: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4000d314: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 4000d318: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 4000d31c: 40 00 2f 06 call 40018f34 <.urem> <== NOT EXECUTED 4000d320: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000d324: a4 25 40 08 sub %l5, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000d328: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d32c: 04 80 00 2b ble 4000d3d8 <== NOT EXECUTED 4000d330: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4000d334: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED 4000d338: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000d33c: 40 00 0a fc call 4000ff2c <== NOT EXECUTED 4000d340: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4000d344: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4000d348: 92 04 80 13 add %l2, %l3, %o1 <== NOT EXECUTED 4000d34c: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000d350: 40 00 0a f7 call 4000ff2c <== NOT EXECUTED 4000d354: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4000d358: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000d35c: 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; 4000d360: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000d364: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d368: 12 80 00 22 bne 4000d3f0 <== NOT EXECUTED 4000d36c: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4000d370: 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) { 4000d374: 80 a6 80 18 cmp %i2, %i0 <== NOT EXECUTED 4000d378: 08 80 00 23 bleu 4000d404 <== NOT EXECUTED 4000d37c: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED 4000d380: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED 4000d384: 10 bf ff b6 b 4000d25c <== NOT EXECUTED 4000d388: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 4000d38c: 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); 4000d390: 7f ff e1 f5 call 40005b64 <== NOT EXECUTED 4000d394: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4000d398: 80 a4 7f e0 cmp %l1, -32 <== NOT EXECUTED 4000d39c: 02 80 00 07 be 4000d3b8 <== NOT EXECUTED 4000d3a0: 01 00 00 00 nop <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) 4000d3a4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d3a8: 14 bf ff 97 bg 4000d204 <== NOT EXECUTED 4000d3ac: 01 00 00 00 nop <== NOT EXECUTED return written; return ret; } 4000d3b0: 81 c7 e0 08 ret <== NOT EXECUTED 4000d3b4: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 4000d3b8: 40 00 02 5b call 4000dd24 <== NOT EXECUTED 4000d3bc: 01 00 00 00 nop <== NOT EXECUTED 4000d3c0: 40 00 02 df call 4000df3c <== NOT EXECUTED 4000d3c4: 92 10 20 0d mov 0xd, %o1 ! d <== NOT EXECUTED #endif if (written > 0) 4000d3c8: 10 bf ff f8 b 4000d3a8 <== NOT EXECUTED 4000d3cc: 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)) { 4000d3d0: 10 bf ff f5 b 4000d3a4 <== NOT EXECUTED 4000d3d4: 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); 4000d3d8: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED 4000d3dc: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000d3e0: 40 00 0a d3 call 4000ff2c <== NOT EXECUTED 4000d3e4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED pipe->Length += chunk; 4000d3e8: 10 bf ff dd b 4000d35c <== NOT EXECUTED 4000d3ec: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4000d3f0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d3f4: 40 00 03 c3 call 4000e300 <== NOT EXECUTED 4000d3f8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 4000d3fc: 10 bf ff de b 4000d374 <== NOT EXECUTED 4000d400: 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) { 4000d404: 10 bf ff e3 b 4000d390 <== NOT EXECUTED 4000d408: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000634c : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 4000634c: 9d e3 bf 98 save %sp, -104, %sp if ( !once_control || !init_routine ) 40006350: 80 a6 60 00 cmp %i1, 0 40006354: 02 80 00 19 be 400063b8 40006358: a0 10 00 18 mov %i0, %l0 4000635c: 80 a6 20 00 cmp %i0, 0 40006360: 02 80 00 16 be 400063b8 40006364: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 40006368: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000636c: 80 a0 60 00 cmp %g1, 0 40006370: 12 80 00 10 bne 400063b0 40006374: b0 10 20 00 clr %i0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 40006378: a2 07 bf fc add %fp, -4, %l1 4000637c: 90 10 21 00 mov 0x100, %o0 40006380: 92 10 21 00 mov 0x100, %o1 40006384: 40 00 03 01 call 40006f88 40006388: 94 10 00 11 mov %l1, %o2 if ( !once_control->init_executed ) { 4000638c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006390: 80 a0 60 00 cmp %g1, 0 40006394: 02 80 00 0b be 400063c0 40006398: 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); 4000639c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED 400063a0: 94 10 00 11 mov %l1, %o2 400063a4: 92 10 21 00 mov 0x100, %o1 400063a8: 40 00 02 f8 call 40006f88 400063ac: b0 10 20 00 clr %i0 } return 0; } 400063b0: 81 c7 e0 08 ret 400063b4: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 400063b8: 81 c7 e0 08 ret 400063bc: 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; 400063c0: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 400063c4: 9f c6 40 00 call %i1 400063c8: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 400063cc: 10 bf ff f5 b 400063a0 400063d0: d0 07 bf fc ld [ %fp + -4 ], %o0 40005f48 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 40005f48: 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() ) 40005f4c: 03 10 00 7d sethi %hi(0x4001f400), %g1 40005f50: c2 00 63 48 ld [ %g1 + 0x348 ], %g1 ! 4001f748 <_ISR_Nest_level> 40005f54: 80 a0 60 00 cmp %g1, 0 40005f58: 12 80 00 15 bne 40005fac 40005f5c: 03 10 00 7d sethi %hi(0x4001f400), %g1 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40005f60: 21 10 00 7d sethi %hi(0x4001f400), %l0 40005f64: c6 00 62 b0 ld [ %g1 + 0x2b0 ], %g3 40005f68: c4 04 23 6c ld [ %l0 + 0x36c ], %g2 40005f6c: 86 00 e0 01 inc %g3 40005f70: c6 20 62 b0 st %g3, [ %g1 + 0x2b0 ] 40005f74: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005f78: c4 00 60 cc ld [ %g1 + 0xcc ], %g2 40005f7c: 80 a0 a0 00 cmp %g2, 0 40005f80: 12 80 00 0d bne 40005fb4 40005f84: 01 00 00 00 nop thread_support->cancelation_requested ) 40005f88: c2 00 60 d4 ld [ %g1 + 0xd4 ], %g1 40005f8c: 80 a0 60 00 cmp %g1, 0 40005f90: 02 80 00 09 be 40005fb4 40005f94: 01 00 00 00 nop cancel = true; _Thread_Enable_dispatch(); 40005f98: 40 00 0a 38 call 40008878 <_Thread_Enable_dispatch> 40005f9c: b2 10 3f ff mov -1, %i1 ! ffffffff if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40005fa0: f0 04 23 6c ld [ %l0 + 0x36c ], %i0 40005fa4: 40 00 19 8f call 4000c5e0 <_POSIX_Thread_Exit> 40005fa8: 81 e8 00 00 restore 40005fac: 81 c7 e0 08 ret <== NOT EXECUTED 40005fb0: 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(); 40005fb4: 40 00 0a 31 call 40008878 <_Thread_Enable_dispatch> 40005fb8: 81 e8 00 00 restore 40005fbc: 01 00 00 00 nop 4001b320 : ssize_t read( int fd, void *buffer, size_t count ) { 4001b320: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b324: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b328: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 4001cf44 4001b32c: 80 a6 00 01 cmp %i0, %g1 4001b330: 1a 80 00 23 bcc 4001b3bc 4001b334: 03 10 00 75 sethi %hi(0x4001d400), %g1 iop = rtems_libio_iop( fd ); 4001b338: e0 00 63 84 ld [ %g1 + 0x384 ], %l0 ! 4001d784 4001b33c: 83 2e 20 06 sll %i0, 6, %g1 4001b340: b1 2e 20 03 sll %i0, 3, %i0 4001b344: b0 06 00 01 add %i0, %g1, %i0 4001b348: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001b34c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b350: 80 88 61 00 btst 0x100, %g1 4001b354: 02 80 00 1a be 4001b3bc 4001b358: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001b35c: 02 80 00 1e be 4001b3d4 4001b360: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001b364: 02 80 00 14 be 4001b3b4 4001b368: b0 10 20 00 clr %i0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001b36c: 80 88 60 02 btst 2, %g1 4001b370: 02 80 00 19 be 4001b3d4 4001b374: 01 00 00 00 nop /* * Now process the read(). */ if ( !iop->handlers->read_h ) 4001b378: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b37c: c2 00 60 08 ld [ %g1 + 8 ], %g1 4001b380: 80 a0 60 00 cmp %g1, 0 4001b384: 02 80 00 1a be 4001b3ec 4001b388: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 4001b38c: 94 10 00 1a mov %i2, %o2 4001b390: 9f c0 40 00 call %g1 4001b394: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001b398: b0 92 20 00 orcc %o0, 0, %i0 4001b39c: 04 80 00 06 ble 4001b3b4 4001b3a0: 85 3e 20 1f sra %i0, 0x1f, %g2 iop->offset += rc; 4001b3a4: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001b3a8: 86 83 40 18 addcc %o5, %i0, %g3 4001b3ac: 84 43 00 02 addx %o4, %g2, %g2 4001b3b0: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001b3b4: 81 c7 e0 08 ret 4001b3b8: 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 ); 4001b3bc: 7f ff d0 a1 call 4000f640 <__errno> 4001b3c0: b0 10 3f ff mov -1, %i0 4001b3c4: 82 10 20 09 mov 9, %g1 4001b3c8: c2 22 00 00 st %g1, [ %o0 ] 4001b3cc: 81 c7 e0 08 ret 4001b3d0: 81 e8 00 00 restore rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001b3d4: 7f ff d0 9b call 4000f640 <__errno> <== NOT EXECUTED 4001b3d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b3dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001b3e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b3e4: 81 c7 e0 08 ret <== NOT EXECUTED 4001b3e8: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b3ec: 7f ff d0 95 call 4000f640 <__errno> <== NOT EXECUTED 4001b3f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b3f4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001b3f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b3fc: 81 c7 e0 08 ret <== NOT EXECUTED 4001b400: 81 e8 00 00 restore <== NOT EXECUTED 4002b42c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 4002b42c: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 4002b430: 80 a6 60 00 cmp %i1, 0 4002b434: 02 80 00 2b be 4002b4e0 4002b438: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 4002b43c: 40 00 82 88 call 4004be5c 4002b440: 90 10 00 18 mov %i0, %o0 4002b444: a0 07 bf ec add %fp, -20, %l0 4002b448: 92 10 00 08 mov %o0, %o1 4002b44c: 94 10 20 00 clr %o2 4002b450: 90 10 00 18 mov %i0, %o0 4002b454: 96 10 00 10 mov %l0, %o3 4002b458: 98 10 20 00 clr %o4 4002b45c: 7f ff 6f 24 call 400070ec 4002b460: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 4002b464: 80 a2 20 00 cmp %o0, 0 4002b468: 12 80 00 1c bne 4002b4d8 4002b46c: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 4002b470: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4002b474: 80 a0 60 00 cmp %g1, 0 4002b478: 22 80 00 31 be,a 4002b53c 4002b47c: 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 ){ 4002b480: 9f c0 40 00 call %g1 4002b484: 90 10 00 10 mov %l0, %o0 4002b488: 80 a2 20 04 cmp %o0, 4 4002b48c: 12 80 00 1b bne 4002b4f8 4002b490: 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 ){ 4002b494: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 4002b498: 80 a0 60 00 cmp %g1, 0 4002b49c: 02 80 00 27 be 4002b538 4002b4a0: 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 ); 4002b4a4: 94 10 00 1a mov %i2, %o2 4002b4a8: 9f c0 40 00 call %g1 4002b4ac: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002b4b0: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002b4b4: 80 a0 60 00 cmp %g1, 0 4002b4b8: 02 80 00 08 be 4002b4d8 4002b4bc: b0 10 00 08 mov %o0, %i0 4002b4c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002b4c4: 80 a0 60 00 cmp %g1, 0 4002b4c8: 02 80 00 26 be 4002b560 4002b4cc: 01 00 00 00 nop 4002b4d0: 9f c0 40 00 call %g1 4002b4d4: 90 10 00 10 mov %l0, %o0 return result; } 4002b4d8: 81 c7 e0 08 ret 4002b4dc: 81 e8 00 00 restore { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 4002b4e0: 40 00 67 20 call 40045160 <__errno> <== NOT EXECUTED 4002b4e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b4e8: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002b4ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b4f0: 81 c7 e0 08 ret <== NOT EXECUTED 4002b4f4: 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 ); 4002b4f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002b4fc: 80 a0 60 00 cmp %g1, 0 4002b500: 02 80 00 08 be 4002b520 4002b504: 01 00 00 00 nop 4002b508: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002b50c: 80 a0 60 00 cmp %g1, 0 4002b510: 02 80 00 04 be 4002b520 4002b514: 01 00 00 00 nop 4002b518: 9f c0 40 00 call %g1 4002b51c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 4002b520: 40 00 67 10 call 40045160 <__errno> 4002b524: b0 10 3f ff mov -1, %i0 4002b528: 82 10 20 16 mov 0x16, %g1 4002b52c: c2 22 00 00 st %g1, [ %o0 ] 4002b530: 81 c7 e0 08 ret 4002b534: 81 e8 00 00 restore } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 4002b538: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002b53c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b540: 02 80 00 04 be 4002b550 <== NOT EXECUTED 4002b544: 01 00 00 00 nop <== NOT EXECUTED 4002b548: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b54c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002b550: 40 00 67 04 call 40045160 <__errno> <== NOT EXECUTED 4002b554: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b558: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002b55c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b560: 81 c7 e0 08 ret <== NOT EXECUTED 4002b564: 81 e8 00 00 restore <== NOT EXECUTED 40004790 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 40004790: 9d e3 bf a0 save %sp, -96, %sp int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 40004794: 03 10 00 87 sethi %hi(0x40021c00), %g1 40004798: c2 00 61 84 ld [ %g1 + 0x184 ], %g1 ! 40021d84 4000479c: 80 a6 00 01 cmp %i0, %g1 400047a0: 1a 80 00 4a bcc 400048c8 400047a4: 03 10 00 8b sethi %hi(0x40022c00), %g1 iop = rtems_libio_iop( fd ); 400047a8: e4 00 61 9c ld [ %g1 + 0x19c ], %l2 ! 40022d9c 400047ac: 83 2e 20 06 sll %i0, 6, %g1 400047b0: b1 2e 20 03 sll %i0, 3, %i0 400047b4: b0 06 00 01 add %i0, %g1, %i0 400047b8: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 400047bc: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 400047c0: 80 88 61 00 btst 0x100, %g1 400047c4: 02 80 00 41 be 400048c8 400047c8: 80 88 60 02 btst 2, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 400047cc: 02 80 00 39 be 400048b0 400047d0: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 400047d4: 02 80 00 37 be 400048b0 400047d8: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 400047dc: 04 80 00 35 ble 400048b0 400047e0: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 400047e4: 14 80 00 33 bg 400048b0 400047e8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 400047ec: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 400047f0: c2 00 60 08 ld [ %g1 + 8 ], %g1 400047f4: 80 a0 60 00 cmp %g1, 0 400047f8: 02 80 00 3c be 400048e8 400047fc: 86 10 20 00 clr %g3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40004800: 84 10 00 19 mov %i1, %g2 40004804: 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 ) 40004808: da 00 80 00 ld [ %g2 ], %o5 4000480c: 80 a3 60 00 cmp %o5, 0 40004810: 02 80 00 28 be 400048b0 40004814: 86 00 e0 01 inc %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 40004818: da 00 a0 04 ld [ %g2 + 4 ], %o5 4000481c: 80 a3 60 00 cmp %o5, 0 40004820: 02 80 00 24 be 400048b0 40004824: 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; 40004828: 9a 01 00 0d add %g4, %o5, %o5 if ( total < old ) 4000482c: 80 a1 00 0d cmp %g4, %o5 40004830: 14 80 00 20 bg 400048b0 40004834: 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++ ) { 40004838: 14 bf ff f4 bg 40004808 4000483c: 88 10 00 0d mov %o5, %g4 40004840: a6 10 20 00 clr %l3 40004844: 10 80 00 04 b 40004854 40004848: b0 10 20 00 clr %i0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4000484c: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 <== NOT EXECUTED 40004850: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 40004854: d2 06 40 00 ld [ %i1 ], %o1 40004858: d4 06 60 04 ld [ %i1 + 4 ], %o2 4000485c: 9f c0 40 00 call %g1 40004860: 90 10 00 12 mov %l2, %o0 if ( bytes < 0 ) 40004864: 80 a2 20 00 cmp %o0, 0 40004868: 06 80 00 1e bl 400048e0 4000486c: 01 00 00 00 nop return -1; if ( bytes > 0 ) { 40004870: 02 80 00 07 be 4000488c 40004874: a1 3a 20 1f sra %o0, 0x1f, %l0 iop->offset += bytes; 40004878: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 <== NOT EXECUTED 4000487c: 86 80 c0 08 addcc %g3, %o0, %g3 <== NOT EXECUTED total += bytes; 40004880: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 40004884: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 40004888: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 4000488c: c2 06 60 04 ld [ %i1 + 4 ], %g1 40004890: 80 a2 00 01 cmp %o0, %g1 40004894: 12 80 00 05 bne 400048a8 40004898: a6 04 e0 01 inc %l3 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4000489c: 80 a6 80 13 cmp %i2, %l3 <== NOT EXECUTED 400048a0: 14 bf ff eb bg 4000484c <== NOT EXECUTED 400048a4: b2 06 60 08 add %i1, 8, %i1 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 400048a8: 81 c7 e0 08 ret 400048ac: 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 ); 400048b0: 40 00 35 e9 call 40012054 <__errno> 400048b4: b0 10 3f ff mov -1, %i0 400048b8: 82 10 20 16 mov 0x16, %g1 400048bc: c2 22 00 00 st %g1, [ %o0 ] 400048c0: 81 c7 e0 08 ret 400048c4: 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 ); 400048c8: 40 00 35 e3 call 40012054 <__errno> <== NOT EXECUTED 400048cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400048d0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400048d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400048d8: 81 c7 e0 08 ret <== NOT EXECUTED 400048dc: 81 e8 00 00 restore <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 400048e0: 81 c7 e0 08 ret <== NOT EXECUTED 400048e4: 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 ); 400048e8: 40 00 35 db call 40012054 <__errno> <== NOT EXECUTED 400048ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400048f0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400048f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400048f8: 81 c7 e0 08 ret <== NOT EXECUTED 400048fc: 81 e8 00 00 restore <== NOT EXECUTED 4001b488 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001b488: 9d e3 bf 98 save %sp, -104, %sp 4001b48c: 21 10 00 75 sethi %hi(0x4001d400), %l0 4001b490: a0 14 23 90 or %l0, 0x390, %l0 ! 4001d790 4001b494: 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())) { 4001b498: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b49c: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 4001daf0 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001b4a0: 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())) { 4001b4a4: 80 a0 60 03 cmp %g1, 3 4001b4a8: 02 80 00 36 be 4001b580 4001b4ac: c4 24 20 10 st %g2, [ %l0 + 0x10 ] } /* * Continue with realloc(). */ if ( !ptr ) 4001b4b0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4001b4b4: 02 80 00 3e be 4001b5ac 4001b4b8: 80 a6 60 00 cmp %i1, 0 return malloc( size ); if ( !size ) { 4001b4bc: 02 80 00 11 be 4001b500 4001b4c0: 23 10 00 73 sethi %hi(0x4001cc00), %l1 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 4001b4c4: d0 04 63 50 ld [ %l1 + 0x350 ], %o0 ! 4001cf50 4001b4c8: 92 10 00 18 mov %i0, %o1 4001b4cc: 40 00 00 75 call 4001b6a0 <_Protected_heap_Get_block_size> 4001b4d0: 94 07 bf fc add %fp, -4, %o2 4001b4d4: 80 8a 20 ff btst 0xff, %o0 4001b4d8: 02 80 00 0f be 4001b514 4001b4dc: d0 04 63 50 ld [ %l1 + 0x350 ], %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 ) ) { 4001b4e0: 92 10 00 18 mov %i0, %o1 4001b4e4: 40 00 00 7c call 4001b6d4 <_Protected_heap_Resize_block> 4001b4e8: 94 10 00 19 mov %i1, %o2 4001b4ec: 80 8a 20 ff btst 0xff, %o0 4001b4f0: 02 80 00 0f be 4001b52c 4001b4f4: 01 00 00 00 nop memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 4001b4f8: 81 c7 e0 08 ret 4001b4fc: 81 e8 00 00 restore */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 4001b500: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001b504: 7f ff bd a7 call 4000aba0 <== NOT EXECUTED 4001b508: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 4001b50c: 81 c7 e0 08 ret <== NOT EXECUTED 4001b510: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 4001b514: 7f ff d0 4b call 4000f640 <__errno> 4001b518: b0 10 20 00 clr %i0 4001b51c: 82 10 20 16 mov 0x16, %g1 4001b520: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4001b524: 81 c7 e0 08 ret 4001b528: 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 ); 4001b52c: 7f ff bf 1d call 4000b1a0 4001b530: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001b534: 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 ); 4001b538: a2 10 00 08 mov %o0, %l1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001b53c: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 4001b540: 80 a2 20 00 cmp %o0, 0 4001b544: 02 80 00 18 be 4001b5a4 4001b548: c2 24 20 04 st %g1, [ %l0 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4001b54c: c2 07 bf fc ld [ %fp + -4 ], %g1 4001b550: 80 a6 40 01 cmp %i1, %g1 4001b554: 08 80 00 03 bleu 4001b560 4001b558: 94 10 00 19 mov %i1, %o2 4001b55c: 94 10 00 01 mov %g1, %o2 4001b560: 92 10 00 18 mov %i0, %o1 4001b564: 7f ff d2 72 call 4000ff2c 4001b568: 90 10 00 11 mov %l1, %o0 free( ptr ); 4001b56c: 90 10 00 18 mov %i0, %o0 4001b570: 7f ff bd 8c call 4000aba0 4001b574: b0 10 00 11 mov %l1, %i0 return new_area; 4001b578: 81 c7 e0 08 ret 4001b57c: 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) 4001b580: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b584: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 4001d950 <_Thread_Dispatch_disable_level> 4001b588: 80 a0 60 00 cmp %g1, 0 4001b58c: 12 80 00 06 bne 4001b5a4 4001b590: 03 10 00 76 sethi %hi(0x4001d800), %g1 return (void *) 0; if (_ISR_Nest_level > 0) 4001b594: c2 00 61 e8 ld [ %g1 + 0x1e8 ], %g1 ! 4001d9e8 <_ISR_Nest_level> 4001b598: 80 a0 60 00 cmp %g1, 0 4001b59c: 02 bf ff c6 be 4001b4b4 4001b5a0: 80 a6 20 00 cmp %i0, 0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 4001b5a4: 81 c7 e0 08 ret 4001b5a8: 91 e8 20 00 restore %g0, 0, %o0 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 4001b5ac: 7f ff be fd call 4000b1a0 4001b5b0: 90 10 00 19 mov %i1, %o0 4001b5b4: 81 c7 e0 08 ret 4001b5b8: 91 e8 00 08 restore %g0, %o0, %o0 4000883c : #include int rmdir( const char *pathname ) { 4000883c: 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 ); 40008840: 7f ff f9 ca call 40006f68 40008844: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 40008848: a0 92 20 00 orcc %o0, 0, %l0 4000884c: 32 80 00 95 bne,a 40008aa0 40008850: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 40008854: c2 4e 00 00 ldsb [ %i0 ], %g1 40008858: 80 a0 60 5c cmp %g1, 0x5c 4000885c: 02 80 00 13 be 400088a8 40008860: 80 a0 60 2f cmp %g1, 0x2f 40008864: 02 80 00 11 be 400088a8 40008868: 80 a0 60 00 cmp %g1, 0 4000886c: 02 80 00 10 be 400088ac <== NOT EXECUTED 40008870: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 40008874: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED 40008878: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000887c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40008880: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 40008884: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 40008888: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 4000888c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 40008890: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED 40008894: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40008898: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED 4000889c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 400088a0: 10 80 00 0f b 400088dc <== NOT EXECUTED 400088a4: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED 400088a8: 03 10 01 ab sethi %hi(0x4006ac00), %g1 400088ac: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 400088b0: a2 10 20 00 clr %l1 400088b4: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 400088b8: c4 27 bf ec st %g2, [ %fp + -20 ] 400088bc: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 400088c0: c4 27 bf f0 st %g2, [ %fp + -16 ] 400088c4: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 400088c8: c4 27 bf f4 st %g2, [ %fp + -12 ] 400088cc: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 400088d0: c4 27 bf f8 st %g2, [ %fp + -8 ] 400088d4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 400088d8: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400088dc: c2 07 bf ec ld [ %fp + -20 ], %g1 name = pathname + parentpathlen; 400088e0: b0 06 00 10 add %i0, %l0, %i0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400088e4: c2 27 bf d8 st %g1, [ %fp + -40 ] 400088e8: c2 07 bf f0 ld [ %fp + -16 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 400088ec: 90 10 00 18 mov %i0, %o0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400088f0: c2 27 bf dc st %g1, [ %fp + -36 ] 400088f4: 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 ), 400088f8: a0 07 bf d8 add %fp, -40, %l0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400088fc: c2 27 bf e0 st %g1, [ %fp + -32 ] 40008900: c2 07 bf f8 ld [ %fp + -8 ], %g1 40008904: c2 27 bf e4 st %g1, [ %fp + -28 ] 40008908: c2 07 bf fc ld [ %fp + -4 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000890c: 40 01 0d 54 call 4004be5c 40008910: c2 27 bf e8 st %g1, [ %fp + -24 ] 40008914: 92 10 00 08 mov %o0, %o1 40008918: 7f ff f9 75 call 40006eec 4000891c: 90 10 00 18 mov %i0, %o0 40008920: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 40008924: 40 01 0d 4e call 4004be5c 40008928: 90 10 00 18 mov %i0, %o0 4000892c: 94 10 20 00 clr %o2 40008930: 92 10 00 08 mov %o0, %o1 40008934: 96 10 00 10 mov %l0, %o3 40008938: 90 10 00 18 mov %i0, %o0 4000893c: 7f ff f9 ab call 40006fe8 40008940: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 40008944: 80 a2 20 00 cmp %o0, 0 40008948: 12 80 00 2a bne 400089f0 4000894c: c4 07 bf e4 ld [ %fp + -28 ], %g2 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40008950: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40008954: 80 a0 60 00 cmp %g1, 0 40008958: 22 80 00 78 be,a 40008b38 4000895c: 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 ){ 40008960: 9f c0 40 00 call %g1 40008964: 90 10 00 10 mov %l0, %o0 40008968: 80 a2 20 01 cmp %o0, 1 4000896c: 12 80 00 26 bne 40008a04 40008970: c2 07 bf e0 ld [ %fp + -32 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40008974: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40008978: 80 a0 60 00 cmp %g1, 0 4000897c: 02 80 00 53 be 40008ac8 40008980: 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 ); 40008984: 92 10 00 10 mov %l0, %o1 40008988: 9f c0 40 00 call %g1 4000898c: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 40008990: c2 07 bf e4 ld [ %fp + -28 ], %g1 40008994: 80 a0 60 00 cmp %g1, 0 40008998: 02 80 00 08 be 400089b8 4000899c: b0 10 00 08 mov %o0, %i0 400089a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400089a4: 80 a0 60 00 cmp %g1, 0 400089a8: 02 80 00 05 be 400089bc 400089ac: 80 8c 60 ff btst 0xff, %l1 400089b0: 9f c0 40 00 call %g1 400089b4: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 400089b8: 80 8c 60 ff btst 0xff, %l1 400089bc: 02 80 00 0b be 400089e8 400089c0: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 400089c4: 80 a0 60 00 cmp %g1, 0 400089c8: 02 80 00 5a be 40008b30 400089cc: 01 00 00 00 nop 400089d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400089d4: 80 a0 60 00 cmp %g1, 0 400089d8: 02 80 00 56 be 40008b30 400089dc: 01 00 00 00 nop 400089e0: 9f c0 40 00 call %g1 400089e4: 90 10 00 12 mov %l2, %o0 400089e8: 81 c7 e0 08 ret 400089ec: 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 ) 400089f0: 80 8c 60 ff btst 0xff, %l1 400089f4: 12 80 00 20 bne 40008a74 400089f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 400089fc: 81 c7 e0 08 ret 40008a00: 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 ); 40008a04: c2 07 bf e4 ld [ %fp + -28 ], %g1 40008a08: 80 a0 60 00 cmp %g1, 0 40008a0c: 02 80 00 09 be 40008a30 40008a10: 80 8c 60 ff btst 0xff, %l1 40008a14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40008a18: 80 a0 60 00 cmp %g1, 0 40008a1c: 02 80 00 05 be 40008a30 40008a20: 80 8c 60 ff btst 0xff, %l1 40008a24: 9f c0 40 00 call %g1 40008a28: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40008a2c: 80 8c 60 ff btst 0xff, %l1 40008a30: 02 80 00 0b be 40008a5c 40008a34: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40008a38: 80 a0 60 00 cmp %g1, 0 40008a3c: 02 80 00 08 be 40008a5c 40008a40: 01 00 00 00 nop 40008a44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40008a48: 80 a0 60 00 cmp %g1, 0 40008a4c: 02 80 00 04 be 40008a5c 40008a50: 01 00 00 00 nop 40008a54: 9f c0 40 00 call %g1 40008a58: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40008a5c: 40 00 f1 c1 call 40045160 <__errno> 40008a60: b0 10 3f ff mov -1, %i0 40008a64: 82 10 20 14 mov 0x14, %g1 40008a68: c2 22 00 00 st %g1, [ %o0 ] 40008a6c: 81 c7 e0 08 ret 40008a70: 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 ); 40008a74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008a78: 02 bf ff dc be 400089e8 <== NOT EXECUTED 40008a7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008a80: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008a84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008a88: 02 bf ff d8 be 400089e8 <== NOT EXECUTED 40008a8c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 40008a90: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008a94: 01 00 00 00 nop <== NOT EXECUTED 40008a98: 81 c7 e0 08 ret <== NOT EXECUTED 40008a9c: 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, 40008aa0: 92 10 00 10 mov %l0, %o1 40008aa4: 94 10 20 02 mov 2, %o2 40008aa8: 96 07 bf ec add %fp, -20, %o3 40008aac: 7f ff f9 90 call 400070ec 40008ab0: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 40008ab4: 80 a2 20 00 cmp %o0, 0 40008ab8: 12 bf ff d1 bne 400089fc 40008abc: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40008ac0: 10 bf ff 88 b 400088e0 40008ac4: 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 ); 40008ac8: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 40008acc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008ad0: 02 80 00 09 be 40008af4 <== NOT EXECUTED 40008ad4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40008ad8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008adc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008ae0: 02 80 00 05 be 40008af4 <== NOT EXECUTED 40008ae4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40008ae8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008aec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 40008af0: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40008af4: 02 80 00 0b be 40008b20 <== NOT EXECUTED 40008af8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 40008afc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008b00: 02 80 00 08 be 40008b20 <== NOT EXECUTED 40008b04: 01 00 00 00 nop <== NOT EXECUTED 40008b08: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008b0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008b10: 02 80 00 04 be 40008b20 <== NOT EXECUTED 40008b14: 01 00 00 00 nop <== NOT EXECUTED 40008b18: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008b1c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40008b20: 40 00 f1 90 call 40045160 <__errno> <== NOT EXECUTED 40008b24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008b28: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40008b2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008b30: 81 c7 e0 08 ret <== NOT EXECUTED 40008b34: 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 ); 40008b38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008b3c: 12 bf ff eb bne 40008ae8 <== NOT EXECUTED 40008b40: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40008b44: 30 bf ff ec b,a 40008af4 <== NOT EXECUTED 40015ab8 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 40015ab8: 11 10 00 a3 sethi %hi(0x40028c00), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40015abc: 81 c3 e0 08 retl <== NOT EXECUTED 40015ac0: 90 12 20 60 or %o0, 0x60, %o0 ! 40028c60 <== NOT EXECUTED 40011dcc : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40011dcc: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40011dd0: 90 10 00 18 mov %i0, %o0 40011dd4: 40 00 00 0b call 40011e00 40011dd8: 92 10 00 19 mov %i1, %o1 if (nap) 40011ddc: 80 a2 20 00 cmp %o0, 0 40011de0: 02 80 00 05 be 40011df4 40011de4: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 40011de8: f0 02 00 00 ld [ %o0 ], %i0 40011dec: 81 c7 e0 08 ret 40011df0: 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); 40011df4: 40 00 0f 31 call 40015ab8 <== NOT EXECUTED 40011df8: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40011dfc: 01 00 00 00 nop 4000f590 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000f590: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000f594: d0 06 00 00 ld [ %i0 ], %o0 4000f598: 80 a2 20 00 cmp %o0, 0 4000f59c: 02 80 00 1d be 4000f610 4000f5a0: 13 10 00 71 sethi %hi(0x4001c400), %o1 4000f5a4: 40 00 03 8d call 400103d8 4000f5a8: 92 12 63 58 or %o1, 0x358, %o1 ! 4001c758 <__FUNCTION__.5943+0x18> 4000f5ac: 80 a2 20 00 cmp %o0, 0 4000f5b0: 02 80 00 11 be 4000f5f4 4000f5b4: 84 10 20 00 clr %g2 default_ap = ap++; for ( ; ap->name; ap++) if (ap->local_value == local_value) 4000f5b8: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000f5bc: 80 a0 40 19 cmp %g1, %i1 4000f5c0: 32 80 00 07 bne,a 4000f5dc 4000f5c4: b0 06 20 0c add %i0, 0xc, %i0 4000f5c8: 30 80 00 14 b,a 4000f618 4000f5cc: 80 a0 40 19 cmp %g1, %i1 4000f5d0: 02 80 00 12 be 4000f618 4000f5d4: 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++) 4000f5d8: b0 06 20 0c add %i0, 0xc, %i0 4000f5dc: c2 06 00 00 ld [ %i0 ], %g1 4000f5e0: 80 a0 60 00 cmp %g1, 0 4000f5e4: 32 bf ff fa bne,a 4000f5cc 4000f5e8: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (ap->local_value == local_value) return ap; return default_ap; } 4000f5ec: 81 c7 e0 08 ret 4000f5f0: 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++) 4000f5f4: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 4000f5f8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000f5fc: 02 80 00 07 be 4000f618 <== NOT EXECUTED 4000f600: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED 4000f604: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000f608: 10 bf ff ec b 4000f5b8 <== NOT EXECUTED 4000f60c: 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)) 4000f610: 81 c7 e0 08 ret <== NOT EXECUTED 4000f614: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000f618: 81 c7 e0 08 ret 4000f61c: 81 e8 00 00 restore 4000dc94 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000dc94: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000dc98: d0 06 00 00 ld [ %i0 ], %o0 4000dc9c: 80 a2 20 00 cmp %o0, 0 4000dca0: 02 80 00 1d be 4000dd14 4000dca4: 13 10 00 71 sethi %hi(0x4001c400), %o1 4000dca8: 40 00 09 cc call 400103d8 4000dcac: 92 12 63 58 or %o1, 0x358, %o1 ! 4001c758 <__FUNCTION__.5943+0x18> 4000dcb0: 80 a2 20 00 cmp %o0, 0 4000dcb4: 02 80 00 11 be 4000dcf8 4000dcb8: 84 10 20 00 clr %g2 default_ap = ap++; for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4000dcbc: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000dcc0: 80 a0 40 19 cmp %g1, %i1 4000dcc4: 32 80 00 07 bne,a 4000dce0 4000dcc8: b0 06 20 0c add %i0, 0xc, %i0 4000dccc: 30 80 00 14 b,a 4000dd1c 4000dcd0: 80 a0 40 19 cmp %g1, %i1 4000dcd4: 02 80 00 12 be 4000dd1c 4000dcd8: 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++) 4000dcdc: b0 06 20 0c add %i0, 0xc, %i0 4000dce0: c2 06 00 00 ld [ %i0 ], %g1 4000dce4: 80 a0 60 00 cmp %g1, 0 4000dce8: 32 bf ff fa bne,a 4000dcd0 4000dcec: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000dcf0: 81 c7 e0 08 ret 4000dcf4: 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++) 4000dcf8: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 4000dcfc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000dd00: 02 80 00 07 be 4000dd1c <== NOT EXECUTED 4000dd04: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED 4000dd08: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000dd0c: 10 bf ff ec b 4000dcbc <== NOT EXECUTED 4000dd10: 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)) 4000dd14: 81 c7 e0 08 ret <== NOT EXECUTED 4000dd18: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000dd1c: 81 c7 e0 08 ret 4000dd20: 81 e8 00 00 restore 4000ebd8 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000ebd8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000ebdc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ebe0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ebe4: 40 00 02 6b call 4000f590 <== NOT EXECUTED 4000ebe8: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000ebec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ebf0: 32 80 00 02 bne,a 4000ebf8 <== NOT EXECUTED 4000ebf4: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000ebf8: 81 c7 e0 08 ret <== NOT EXECUTED 4000ebfc: 81 e8 00 00 restore <== NOT EXECUTED 40002178 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 40002178: 9d e3 bf a0 save %sp, -96, %sp const char *p; if ( !name ) 4000217c: 80 a6 20 00 cmp %i0, 0 40002180: 12 80 00 05 bne 40002194 40002184: 80 a6 60 00 cmp %i1, 0 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 40002198: 80 a6 a0 00 cmp %i2, 0 return NULL; if ( !length ) 4000219c: 22 bf ff fc be,a 4000218c 400021a0: b2 10 20 00 clr %i1 return NULL; value[0] = '\0'; 400021a4: c0 2e 40 00 clrb [ %i1 ] p = rtems_bsp_cmdline_get_param_raw( name ); 400021a8: 40 00 00 25 call 4000223c 400021ac: 90 10 00 18 mov %i0, %o0 if ( !p ) 400021b0: 80 a2 20 00 cmp %o0, 0 400021b4: 22 bf ff f6 be,a 4000218c 400021b8: b2 10 20 00 clr %i1 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 400021cc: b4 86 bf ff addcc %i2, -1, %i2 400021d0: 02 bf ff ef be 4000218c 400021d4: 88 10 20 00 clr %g4 400021d8: 82 10 20 00 clr %g1 400021dc: 10 80 00 12 b 40002224 400021e0: 9a 10 20 00 clr %o5 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 400021e4: 32 80 00 06 bne,a 400021fc 400021e8: c6 2e 40 04 stb %g3, [ %i1 + %g4 ] <== NOT EXECUTED 400021ec: 80 a0 a0 20 cmp %g2, 0x20 400021f0: 02 bf ff e7 be 4000218c 400021f4: 01 00 00 00 nop break; value[i++] = *p++; 400021f8: c6 2e 40 04 stb %g3, [ %i1 + %g4 ] 400021fc: 82 00 60 01 inc %g1 value[i] = '\0'; 40002200: c0 2e 40 01 clrb [ %i1 + %g1 ] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 40002214: 88 10 00 01 mov %g1, %g4 40002218: 80 a0 40 1a cmp %g1, %i2 4000221c: 1a bf ff dc bcc 4000218c 40002220: 01 00 00 00 nop if ( *p == '\"' ) { 40002224: 85 38 a0 18 sra %g2, 0x18, %g2 40002228: 80 a0 a0 22 cmp %g2, 0x22 4000222c: 12 bf ff ee bne 400021e4 40002230: 80 8b 60 01 btst 1, %o5 quotes++; 40002234: 10 bf ff f1 b 400021f8 <== NOT EXECUTED 40002238: 9a 03 60 01 inc %o5 <== NOT EXECUTED 40002270 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 40002270: 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 ); 40002274: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40002278: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000227c: 7f ff ff bf call 40002178 <== NOT EXECUTED 40002280: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if ( !p ) 40002284: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40002288: 12 80 00 05 bne 4000229c <== NOT EXECUTED 4000228c: 01 00 00 00 nop <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 40002290: b2 10 20 00 clr %i1 ! 0 <== NOT EXECUTED } 40002294: 81 c7 e0 08 ret <== NOT EXECUTED 40002298: 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)]; 4000229c: 40 00 38 ee call 40010654 <== NOT EXECUTED 400022a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( *rhs != '=' ) 400022a4: c2 4c 40 08 ldsb [ %l1 + %o0 ], %g1 <== NOT EXECUTED 400022a8: 80 a0 60 3d cmp %g1, 0x3d <== NOT EXECUTED 400022ac: 12 bf ff f9 bne 40002290 <== NOT EXECUTED 400022b0: a2 04 40 08 add %l1, %o0, %l1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 400022b4: c6 0c 60 01 ldub [ %l1 + 1 ], %g3 <== NOT EXECUTED 400022b8: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED 400022bc: 89 38 a0 18 sra %g2, 0x18, %g4 <== NOT EXECUTED 400022c0: 80 a1 20 22 cmp %g4, 0x22 <== NOT EXECUTED 400022c4: 02 80 00 14 be 40002314 <== NOT EXECUTED 400022c8: 82 04 60 01 add %l1, 1, %g1 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) 400022cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400022d0: 02 80 00 09 be 400022f4 <== NOT EXECUTED 400022d4: 84 10 00 19 mov %i1, %g2 <== NOT EXECUTED *d++ = *rhs++; 400022d8: c6 28 80 00 stb %g3, [ %g2 ] <== NOT EXECUTED 400022dc: 82 00 60 01 inc %g1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 400022e0: c6 48 40 00 ldsb [ %g1 ], %g3 <== NOT EXECUTED *d++ = *rhs++; 400022e4: 84 00 a0 01 inc %g2 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 400022e8: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400022ec: 12 bf ff fb bne 400022d8 <== NOT EXECUTED 400022f0: c6 08 40 00 ldub [ %g1 ], %g3 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 400022f4: c6 48 bf ff ldsb [ %g2 + -1 ], %g3 <== NOT EXECUTED 400022f8: 80 a0 e0 22 cmp %g3, 0x22 <== NOT EXECUTED 400022fc: 02 80 00 03 be 40002308 <== NOT EXECUTED 40002300: 82 00 bf ff add %g2, -1, %g1 <== NOT EXECUTED 40002304: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED d--; *d = '\0'; 40002308: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED return value; } 4000230c: 81 c7 e0 08 ret <== NOT EXECUTED 40002310: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 40002314: c6 0c 60 02 ldub [ %l1 + 2 ], %g3 <== NOT EXECUTED 40002318: 82 04 60 02 add %l1, 2, %g1 <== NOT EXECUTED 4000231c: 10 bf ff ec b 400022cc <== NOT EXECUTED 40002320: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED 40002c30 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40002c30: 9d e3 bf 60 save %sp, -160, %sp Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40002c34: 80 a6 60 00 cmp %i1, 0 40002c38: 02 80 00 72 be 40002e00 40002c3c: 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 ); 40002c40: 40 00 15 f4 call 40008410 <_TOD_Get_uptime> 40002c44: 90 07 bf f0 add %fp, -16, %o0 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40002c48: 92 07 bf f0 add %fp, -16, %o1 40002c4c: a8 07 bf e8 add %fp, -24, %l4 40002c50: 11 10 00 b0 sethi %hi(0x4002c000), %o0 40002c54: 94 10 00 14 mov %l4, %o2 40002c58: 40 00 20 80 call 4000ae58 <_Timespec_Subtract> 40002c5c: 90 12 22 d8 or %o0, 0x2d8, %o0 } } } #endif (*print)( 40002c60: 90 10 00 18 mov %i0, %o0 40002c64: 13 10 00 85 sethi %hi(0x40021400), %o1 40002c68: 37 10 00 af sethi %hi(0x4002bc00), %i3 40002c6c: 92 12 62 80 or %o1, 0x280, %o1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40002c70: 3b 10 00 85 sethi %hi(0x40021400), %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 ) { 40002c74: 2f 10 00 af sethi %hi(0x4002bc00), %l7 } } } #endif (*print)( 40002c78: 9f c6 40 00 call %i1 40002c7c: 2d 10 00 86 sethi %hi(0x40021800), %l6 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002c80: a4 07 bf c8 add %fp, -56, %l2 } } } #endif (*print)( 40002c84: b6 16 e0 74 or %i3, 0x74, %i3 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40002c88: ba 17 63 f8 or %i5, 0x3f8, %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 ) { 40002c8c: ae 15 e1 cc or %l7, 0x1cc, %l7 /* * Print the information */ (*print)( context, 40002c90: ac 15 a0 10 or %l6, 0x10, %l6 40002c94: 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 ); 40002c98: aa 07 bf fc add %fp, -4, %l5 40002c9c: 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( 40002ca0: 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 ] ) 40002ca4: c2 06 c0 00 ld [ %i3 ], %g1 40002ca8: 80 a0 60 00 cmp %g1, 0 40002cac: 22 80 00 47 be,a 40002dc8 40002cb0: b6 06 e0 04 add %i3, 4, %i3 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40002cb4: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40002cb8: 80 a4 60 00 cmp %l1, 0 40002cbc: 22 80 00 43 be,a 40002dc8 40002cc0: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40002cc4: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40002cc8: 86 90 60 00 orcc %g1, 0, %g3 40002ccc: 02 80 00 3e be 40002dc4 40002cd0: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40002cd4: 10 80 00 17 b 40002d30 40002cd8: 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 ); 40002cdc: 96 10 00 1c mov %i4, %o3 40002ce0: 90 10 00 13 mov %l3, %o0 40002ce4: 40 00 1f cb call 4000ac10 <_Timespec_Divide> 40002ce8: 92 10 00 14 mov %l4, %o1 /* * Print the information */ (*print)( context, 40002cec: d0 07 bf e4 ld [ %fp + -28 ], %o0 40002cf0: 40 00 6d 0d call 4001e124 <.udiv> 40002cf4: 92 10 23 e8 mov 0x3e8, %o1 40002cf8: d4 07 bf e0 ld [ %fp + -32 ], %o2 40002cfc: d8 07 bf fc ld [ %fp + -4 ], %o4 40002d00: da 07 bf f8 ld [ %fp + -8 ], %o5 40002d04: 96 10 00 08 mov %o0, %o3 40002d08: 92 10 00 16 mov %l6, %o1 40002d0c: 9f c6 40 00 call %i1 40002d10: 90 10 00 18 mov %i0, %o0 40002d14: 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++ ) { 40002d18: 83 28 e0 10 sll %g3, 0x10, %g1 40002d1c: 83 30 60 10 srl %g1, 0x10, %g1 40002d20: 80 a0 40 10 cmp %g1, %l0 40002d24: 2a 80 00 29 bcs,a 40002dc8 40002d28: b6 06 e0 04 add %i3, 4, %i3 the_thread = (Thread_Control *)information->local_table[ i ]; 40002d2c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40002d30: 83 2c 20 02 sll %l0, 2, %g1 40002d34: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002d38: 94 10 00 12 mov %l2, %o2 40002d3c: 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 ) 40002d40: 80 a0 60 00 cmp %g1, 0 40002d44: 02 bf ff f5 be 40002d18 40002d48: a0 04 20 01 inc %l0 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002d4c: d0 00 60 08 ld [ %g1 + 8 ], %o0 40002d50: 40 00 10 83 call 40006f5c 40002d54: c2 27 bf c4 st %g1, [ %fp + -60 ] (*print)( 40002d58: c2 07 bf c4 ld [ %fp + -60 ], %g1 40002d5c: 90 10 00 18 mov %i0, %o0 40002d60: d4 00 60 08 ld [ %g1 + 8 ], %o2 40002d64: 92 10 00 1d mov %i5, %o1 40002d68: 9f c6 40 00 call %i1 40002d6c: 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; 40002d70: c2 07 bf c4 ld [ %fp + -60 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002d74: 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; 40002d78: c6 00 60 84 ld [ %g1 + 0x84 ], %g3 40002d7c: c6 27 bf e0 st %g3, [ %fp + -32 ] 40002d80: c6 00 60 88 ld [ %g1 + 0x88 ], %g3 40002d84: c6 27 bf e4 st %g3, [ %fp + -28 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002d88: c4 00 a0 08 ld [ %g2 + 8 ], %g2 40002d8c: c2 00 60 08 ld [ %g1 + 8 ], %g1 40002d90: 80 a0 80 01 cmp %g2, %g1 40002d94: 32 bf ff d2 bne,a 40002cdc 40002d98: 94 10 00 15 mov %l5, %o2 Timestamp_Control used; _Timestamp_Subtract( 40002d9c: 92 07 bf f0 add %fp, -16, %o1 40002da0: 94 10 00 1a mov %i2, %o2 40002da4: 11 10 00 af sethi %hi(0x4002bc00), %o0 40002da8: 40 00 20 2c call 4000ae58 <_Timespec_Subtract> 40002dac: 90 12 21 d4 or %o0, 0x1d4, %o0 ! 4002bdd4 <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 40002db0: 90 10 00 13 mov %l3, %o0 40002db4: 40 00 1f 7e call 4000abac <_Timespec_Add_to> 40002db8: 92 10 00 1a mov %i2, %o1 }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40002dbc: 10 bf ff c8 b 40002cdc 40002dc0: 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++ ) { 40002dc4: b6 06 e0 04 add %i3, 4, %i3 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 40002dc8: 03 10 00 af sethi %hi(0x4002bc00), %g1 40002dcc: 82 10 60 84 or %g1, 0x84, %g1 ! 4002bc84 <_Objects_Information_table+0x14> 40002dd0: 80 a6 c0 01 cmp %i3, %g1 40002dd4: 32 bf ff b5 bne,a 40002ca8 40002dd8: c2 06 c0 00 ld [ %i3 ], %g1 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 40002ddc: d0 07 bf ec ld [ %fp + -20 ], %o0 40002de0: 40 00 6c d1 call 4001e124 <.udiv> 40002de4: 92 10 23 e8 mov 0x3e8, %o1 40002de8: d4 07 bf e8 ld [ %fp + -24 ], %o2 40002dec: 96 10 00 08 mov %o0, %o3 40002df0: 13 10 00 86 sethi %hi(0x40021800), %o1 40002df4: 90 10 00 18 mov %i0, %o0 40002df8: 9f c6 40 00 call %i1 40002dfc: 92 12 60 28 or %o1, 0x28, %o1 40002e00: 81 c7 e0 08 ret 40002e04: 81 e8 00 00 restore 4000eba4 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4000eba4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000eba8: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000ebac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ebb0: 40 00 00 0a call 4000ebd8 <== NOT EXECUTED 4000ebb4: 90 12 20 04 or %o0, 4, %o0 <== NOT EXECUTED 4000ebb8: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000ebbc: 02 80 00 05 be 4000ebd0 <== NOT EXECUTED 4000ebc0: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000ebc4: 40 00 02 9f call 4000f640 <__errno> <== NOT EXECUTED 4000ebc8: 01 00 00 00 nop <== NOT EXECUTED 4000ebcc: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000ebd0: 81 c7 e0 08 ret <== NOT EXECUTED 4000ebd4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 400079b0 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 400079b0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 400079b4: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 400079b8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 400079bc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 400079c0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 400079c4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 400079c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400079cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400079d0: 7f ff ff 7e call 400077c8 <== NOT EXECUTED 400079d4: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 400079d8: 81 c7 e0 08 ret <== NOT EXECUTED 400079dc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40002064 : } int rtems_filesystem_dirname( const char *pathname ) { 40002064: 9d e3 bf a0 save %sp, -96, %sp int len = strlen( pathname ); 40002068: 40 00 39 2d call 4001051c 4000206c: 90 10 00 18 mov %i0, %o0 while ( len ) { 40002070: 80 a2 20 00 cmp %o0, 0 40002074: 02 80 00 19 be 400020d8 40002078: 84 10 00 08 mov %o0, %g2 len--; 4000207c: 90 02 3f ff add %o0, -1, %o0 if ( rtems_filesystem_is_separator( pathname[len] ) ) 40002080: c2 4e 00 08 ldsb [ %i0 + %o0 ], %g1 40002084: 80 a0 60 5c cmp %g1, 0x5c 40002088: 02 80 00 14 be 400020d8 4000208c: 80 a0 60 2f cmp %g1, 0x2f 40002090: 02 80 00 12 be 400020d8 40002094: 80 a0 60 00 cmp %g1, 0 40002098: 12 80 00 09 bne 400020bc 4000209c: a0 06 00 02 add %i0, %g2, %l0 break; } return len; } 400020a0: 81 c7 e0 08 ret <== NOT EXECUTED 400020a4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { int len = strlen( pathname ); while ( len ) { len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 400020a8: 80 a0 60 2f cmp %g1, 0x2f 400020ac: 02 80 00 0b be 400020d8 400020b0: 80 a0 60 00 cmp %g1, 0 400020b4: 02 80 00 09 be 400020d8 400020b8: a0 04 3f ff add %l0, -1, %l0 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 400020bc: 80 a2 20 00 cmp %o0, 0 400020c0: 02 80 00 07 be 400020dc 400020c4: b0 10 00 08 mov %o0, %i0 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 400020c8: c2 4c 3f fe ldsb [ %l0 + -2 ], %g1 400020cc: 80 a0 60 5c cmp %g1, 0x5c 400020d0: 12 bf ff f6 bne 400020a8 400020d4: 90 02 3f ff add %o0, -1, %o0 break; } return len; } 400020d8: b0 10 00 08 mov %o0, %i0 400020dc: 81 c7 e0 08 ret 400020e0: 81 e8 00 00 restore 400021e8 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 400021e8: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 400021ec: 80 a6 20 00 cmp %i0, 0 400021f0: 02 80 00 33 be 400022bc 400021f4: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 400021f8: 22 80 00 2b be,a 400022a4 400021fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40002200: c2 4e 00 00 ldsb [ %i0 ], %g1 40002204: 80 a0 60 5c cmp %g1, 0x5c 40002208: 02 80 00 06 be 40002220 4000220c: 80 a0 60 2f cmp %g1, 0x2f 40002210: 02 80 00 04 be 40002220 40002214: 80 a0 60 00 cmp %g1, 0 40002218: 12 80 00 13 bne 40002264 4000221c: 03 10 00 74 sethi %hi(0x4001d000), %g1 40002220: 03 10 00 74 sethi %hi(0x4001d000), %g1 40002224: c4 00 60 58 ld [ %g1 + 0x58 ], %g2 ! 4001d058 40002228: 86 10 20 01 mov 1, %g3 4000222c: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4 40002230: 82 10 20 01 mov 1, %g1 40002234: c8 26 c0 00 st %g4, [ %i3 ] 40002238: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4 4000223c: c8 26 e0 04 st %g4, [ %i3 + 4 ] 40002240: 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], 40002244: b2 26 40 01 sub %i1, %g1, %i1 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40002248: c8 26 e0 08 st %g4, [ %i3 + 8 ] 4000224c: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4 40002250: c8 26 e0 0c st %g4, [ %i3 + 0xc ] 40002254: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2 40002258: 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], 4000225c: 7f ff ff a2 call 400020e4 40002260: 91 ee 00 03 restore %i0, %g3, %o0 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40002264: c4 00 60 58 ld [ %g1 + 0x58 ], %g2 40002268: 86 10 20 00 clr %g3 4000226c: c8 00 a0 04 ld [ %g2 + 4 ], %g4 40002270: 82 10 20 00 clr %g1 40002274: c8 26 c0 00 st %g4, [ %i3 ] 40002278: c8 00 a0 08 ld [ %g2 + 8 ], %g4 4000227c: c8 26 e0 04 st %g4, [ %i3 + 4 ] 40002280: 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], 40002284: b2 26 40 01 sub %i1, %g1, %i1 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40002288: c8 26 e0 08 st %g4, [ %i3 + 8 ] 4000228c: c8 00 a0 10 ld [ %g2 + 0x10 ], %g4 40002290: c8 26 e0 0c st %g4, [ %i3 + 0xc ] 40002294: c4 00 a0 14 ld [ %g2 + 0x14 ], %g2 40002298: 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], 4000229c: 7f ff ff 92 call 400020e4 400022a0: 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 */ 400022a4: 40 00 34 e7 call 4000f640 <__errno> <== NOT EXECUTED 400022a8: 01 00 00 00 nop <== NOT EXECUTED 400022ac: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 400022b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 400022b4: 81 c7 e0 08 ret <== NOT EXECUTED 400022b8: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 400022bc: 40 00 34 e1 call 4000f640 <__errno> 400022c0: b0 10 3f ff mov -1, %i0 400022c4: 82 10 20 0e mov 0xe, %g1 400022c8: c2 22 00 00 st %g1, [ %o0 ] 400022cc: 81 c7 e0 08 ret 400022d0: 81 e8 00 00 restore 400020e4 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 400020e4: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 400020e8: 80 a6 20 00 cmp %i0, 0 400020ec: 02 80 00 33 be 400021b8 400020f0: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 400020f4: 02 80 00 37 be 400021d0 400020f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 400020fc: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 40002100: c2 00 40 00 ld [ %g1 ], %g1 40002104: 80 a0 60 00 cmp %g1, 0 40002108: 02 80 00 26 be 400021a0 4000210c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 40002110: 92 10 00 19 mov %i1, %o1 40002114: 94 10 00 1a mov %i2, %o2 40002118: 9f c0 40 00 call %g1 4000211c: 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 ) { 40002120: b0 92 20 00 orcc %o0, 0, %i0 40002124: 12 80 00 0f bne 40002160 40002128: 80 a7 20 00 cmp %i4, 0 4000212c: 02 80 00 2d be 400021e0 40002130: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40002134: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 40002138: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000213c: 80 a0 60 00 cmp %g1, 0 40002140: 22 80 00 13 be,a 4000218c 40002144: 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 ); 40002148: 9f c0 40 00 call %g1 4000214c: 90 10 00 1b mov %i3, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 40002150: 90 02 3f fd add %o0, -3, %o0 40002154: 80 a2 20 01 cmp %o0, 1 40002158: 28 80 00 04 bleu,a 40002168 4000215c: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 40002160: 81 c7 e0 08 ret 40002164: 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 ){ 40002168: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 4000216c: 80 a0 60 00 cmp %g1, 0 40002170: 02 80 00 06 be 40002188 40002174: 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 ); 40002178: 9f c0 40 00 call %g1 4000217c: 92 10 00 1a mov %i2, %o1 } } return result; } 40002180: 81 c7 e0 08 ret 40002184: 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 ); 40002188: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000218c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002190: 02 80 00 04 be 400021a0 <== NOT EXECUTED 40002194: 01 00 00 00 nop <== NOT EXECUTED 40002198: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000219c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400021a0: 40 00 35 28 call 4000f640 <__errno> <== NOT EXECUTED 400021a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400021a8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400021ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400021b0: 81 c7 e0 08 ret <== NOT EXECUTED 400021b4: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 400021b8: 40 00 35 22 call 4000f640 <__errno> <== NOT EXECUTED 400021bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400021c0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400021c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400021c8: 81 c7 e0 08 ret <== NOT EXECUTED 400021cc: 81 e8 00 00 restore <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400021d0: 40 00 35 1c call 4000f640 <__errno> <== NOT EXECUTED 400021d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400021d8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 400021dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400021e0: 81 c7 e0 08 ret 400021e4: 81 e8 00 00 restore 40001e8c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 40001e8c: 9d e3 bf 88 save %sp, -120, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 40001e90: 21 10 00 74 sethi %hi(0x4001d000), %l0 40001e94: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 ! 4001d058 40001e98: 84 10 20 12 mov 0x12, %g2 init_fs_mount_table(); 40001e9c: 40 00 01 ed call 40002650 40001ea0: c4 30 60 2c sth %g2, [ %g1 + 0x2c ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 40001ea4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40001ea8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001bc1c 40001eac: 80 a0 60 00 cmp %g1, 0 40001eb0: 02 80 00 45 be 40001fc4 40001eb4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 40001eb8: c2 00 63 4c ld [ %g1 + 0x34c ], %g1 ! 4001cf4c status = mount( 40001ebc: 90 07 bf fc add %fp, -4, %o0 40001ec0: d8 00 60 0c ld [ %g1 + 0xc ], %o4 40001ec4: d2 00 40 00 ld [ %g1 ], %o1 40001ec8: d4 00 60 04 ld [ %g1 + 4 ], %o2 40001ecc: 40 00 01 e9 call 40002670 40001ed0: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 40001ed4: 80 a2 3f ff cmp %o0, -1 40001ed8: 02 80 00 40 be 40001fd8 40001edc: c4 07 bf fc ld [ %fp + -4 ], %g2 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 40001ee0: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40001ee4: 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; 40001ee8: 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; 40001eec: c6 20 60 18 st %g3, [ %g1 + 0x18 ] 40001ef0: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001ef4: 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; 40001ef8: c6 20 60 1c st %g3, [ %g1 + 0x1c ] 40001efc: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f00: 23 10 00 70 sethi %hi(0x4001c000), %l1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40001f04: c6 20 60 20 st %g3, [ %g1 + 0x20 ] 40001f08: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f0c: 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; 40001f10: c6 20 60 24 st %g3, [ %g1 + 0x24 ] 40001f14: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f18: 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; 40001f1c: c4 20 60 28 st %g2, [ %g1 + 0x28 ] /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f20: 96 10 00 12 mov %l2, %o3 40001f24: 98 10 20 00 clr %o4 40001f28: 40 00 00 b0 call 400021e8 40001f2c: 90 14 60 60 or %l1, 0x60, %o0 rtems_filesystem_root = loc; 40001f30: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 40001f34: c4 07 bf e8 ld [ %fp + -24 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f38: 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; 40001f3c: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 40001f40: c4 07 bf ec ld [ %fp + -20 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f44: 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; 40001f48: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 40001f4c: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f50: 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; 40001f54: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 40001f58: c4 07 bf f4 ld [ %fp + -12 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f5c: 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; 40001f60: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 40001f64: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f68: 90 14 60 60 or %l1, 0x60, %o0 40001f6c: 40 00 00 9f call 400021e8 40001f70: c4 20 60 28 st %g2, [ %g1 + 0x28 ] rtems_filesystem_current = loc; 40001f74: c4 07 bf e8 ld [ %fp + -24 ], %g2 40001f78: c2 04 20 58 ld [ %l0 + 0x58 ], %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); 40001f7c: 11 10 00 70 sethi %hi(0x4001c000), %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; 40001f80: c4 20 60 04 st %g2, [ %g1 + 4 ] 40001f84: 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); 40001f88: 90 12 20 68 or %o0, 0x68, %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; 40001f8c: c4 20 60 08 st %g2, [ %g1 + 8 ] 40001f90: 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); 40001f94: 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; 40001f98: c4 20 60 0c st %g2, [ %g1 + 0xc ] 40001f9c: c4 07 bf f4 ld [ %fp + -12 ], %g2 40001fa0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 40001fa4: 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); 40001fa8: 40 00 01 3f call 400024a4 40001fac: c4 20 60 14 st %g2, [ %g1 + 0x14 ] if ( status != 0 ) 40001fb0: 80 a2 20 00 cmp %o0, 0 40001fb4: 12 80 00 07 bne 40001fd0 40001fb8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 40001fbc: 81 c7 e0 08 ret 40001fc0: 81 e8 00 00 restore /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 40001fc4: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40001fc8: 40 00 10 4f call 40006104 <== NOT EXECUTED 40001fcc: 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 ); 40001fd0: 40 00 10 4d call 40006104 <== NOT EXECUTED 40001fd4: 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 ); 40001fd8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40001fdc: 40 00 10 4a call 40006104 <== NOT EXECUTED 40001fe0: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 40001fe4: 01 00 00 00 nop 4000ae84 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4000ae84: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000ae88: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 4000ae8c: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 4000ae90: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4000ae94: 81 c3 e0 08 retl <== NOT EXECUTED 4000ae98: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40001fe8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 40001fe8: 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 ) ) 40001fec: 80 a2 60 00 cmp %o1, 0 40001ff0: 12 80 00 04 bne 40002000 40001ff4: c4 0a 00 00 ldub [ %o0 ], %g2 pathname++; pathnamelen--; stripped++; } return stripped; } 40001ff8: 81 c3 e0 08 retl <== NOT EXECUTED 40001ffc: 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 ) ) 40002000: 85 28 a0 18 sll %g2, 0x18, %g2 40002004: 85 38 a0 18 sra %g2, 0x18, %g2 40002008: 80 a0 a0 00 cmp %g2, 0 4000200c: 02 80 00 14 be 4000205c 40002010: 90 10 20 00 clr %o0 40002014: 80 a0 a0 5c cmp %g2, 0x5c 40002018: 02 80 00 04 be 40002028 4000201c: 80 a0 a0 2f cmp %g2, 0x2f 40002020: 12 80 00 0f bne 4000205c 40002024: 01 00 00 00 nop { pathname++; pathnamelen--; stripped++; 40002028: 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 ) ) 4000202c: 80 a2 40 08 cmp %o1, %o0 40002030: 02 80 00 0b be 4000205c 40002034: c4 08 40 08 ldub [ %g1 + %o0 ], %g2 40002038: 85 28 a0 18 sll %g2, 0x18, %g2 4000203c: 85 38 a0 18 sra %g2, 0x18, %g2 40002040: 80 a0 a0 00 cmp %g2, 0 40002044: 02 80 00 06 be 4000205c 40002048: 80 a0 a0 5c cmp %g2, 0x5c 4000204c: 02 bf ff f7 be 40002028 40002050: 80 a0 a0 2f cmp %g2, 0x2f 40002054: 22 bf ff f6 be,a 4000202c 40002058: 90 02 20 01 inc %o0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 4000205c: 81 c3 e0 08 retl 40002060: 01 00 00 00 nop 40001cfc : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40001cfc: 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 ); 40001d00: 40 00 3a 07 call 4001051c <== NOT EXECUTED 40001d04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001d08: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40001d0c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40001d10: 94 10 20 00 clr %o2 <== NOT EXECUTED 40001d14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001d18: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40001d1c: 40 00 01 33 call 400021e8 <== NOT EXECUTED 40001d20: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001d24: 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 ); 40001d28: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001d2c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40001d30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d34: 02 80 00 13 be 40001d80 <== NOT EXECUTED 40001d38: 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 ); 40001d3c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d40: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40001d44: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40001d48: 02 80 00 1a be 40001db0 <== NOT EXECUTED 40001d4c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001d50: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40001d54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d58: 02 80 00 2b be 40001e04 <== NOT EXECUTED 40001d5c: 01 00 00 00 nop <== NOT EXECUTED 40001d60: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001d64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d68: 02 80 00 27 be 40001e04 <== NOT EXECUTED 40001d6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40001d70: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d74: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED 40001d78: 81 c7 e0 08 ret <== NOT EXECUTED 40001d7c: 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 ); 40001d80: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40001d84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d88: 02 80 00 04 be 40001d98 <== NOT EXECUTED 40001d8c: 01 00 00 00 nop <== NOT EXECUTED 40001d90: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d94: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40001d98: 40 00 36 2a call 4000f640 <__errno> <== NOT EXECUTED 40001d9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001da0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001da4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001da8: 81 c7 e0 08 ret <== NOT EXECUTED 40001dac: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40001db0: 12 bf ff e9 bne 40001d54 <== NOT EXECUTED 40001db4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 40001db8: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 40001dbc: 40 00 39 d8 call 4001051c <== NOT EXECUTED 40001dc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001dc4: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40001dc8: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40001dcc: 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; 40001dd0: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40001dd4: c4 04 a0 54 ld [ %l2 + 0x54 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001dd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001ddc: 02 80 00 0c be 40001e0c <== NOT EXECUTED 40001de0: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40001de4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001de8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001dec: 02 80 00 08 be 40001e0c <== NOT EXECUTED 40001df0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40001df4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001df8: b0 10 20 00 clr %i0 <== NOT EXECUTED 40001dfc: 81 c7 e0 08 ret <== NOT EXECUTED 40001e00: 81 e8 00 00 restore <== NOT EXECUTED 40001e04: 81 c7 e0 08 ret <== NOT EXECUTED 40001e08: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40001e0c: 81 c7 e0 08 ret <== NOT EXECUTED 40001e10: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007fc8 : 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 ) { 40007fc8: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40007fcc: 03 10 00 8f sethi %hi(0x40023c00), %g1 40007fd0: c2 00 60 88 ld [ %g1 + 0x88 ], %g1 ! 40023c88 <_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; 40007fd4: 09 10 00 91 sethi %hi(0x40024400), %g4 if ( rtems_interrupt_is_in_progress() ) 40007fd8: 80 a0 60 00 cmp %g1, 0 40007fdc: 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 ) { 40007fe0: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40007fe4: 12 80 00 49 bne 40008108 40007fe8: c6 01 21 74 ld [ %g4 + 0x174 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 40007fec: 80 a6 a0 00 cmp %i2, 0 40007ff0: 02 80 00 4b be 4000811c 40007ff4: 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 ) 40007ff8: 02 80 00 49 be 4000811c 40007ffc: 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; 40008000: c4 06 40 00 ld [ %i1 ], %g2 40008004: 80 a0 a0 00 cmp %g2, 0 40008008: 22 80 00 42 be,a 40008110 4000800c: 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 ) 40008010: 80 a0 c0 18 cmp %g3, %i0 40008014: 08 80 00 3d bleu 40008108 40008018: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000801c: 05 10 00 8e sethi %hi(0x40023800), %g2 40008020: c6 00 a3 f0 ld [ %g2 + 0x3f0 ], %g3 ! 40023bf0 <_Thread_Dispatch_disable_level> 40008024: 86 00 e0 01 inc %g3 40008028: c6 20 a3 f0 st %g3, [ %g2 + 0x3f0 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 4000802c: 80 a6 20 00 cmp %i0, 0 40008030: 12 80 00 2b bne 400080dc 40008034: 05 10 00 91 sethi %hi(0x40024400), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 40008038: da 01 21 74 ld [ %g4 + 0x174 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 4000803c: 80 a3 60 00 cmp %o5, 0 40008040: 02 80 00 3a be 40008128 40008044: d8 00 a1 78 ld [ %g2 + 0x178 ], %o4 40008048: 10 80 00 05 b 4000805c 4000804c: 86 10 00 0c mov %o4, %g3 40008050: 80 a3 40 18 cmp %o5, %i0 40008054: 08 80 00 0b bleu 40008080 40008058: 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; 4000805c: c8 00 c0 00 ld [ %g3 ], %g4 40008060: 80 a1 20 00 cmp %g4, 0 40008064: 32 bf ff fb bne,a 40008050 40008068: b0 06 20 01 inc %i0 4000806c: c8 00 e0 04 ld [ %g3 + 4 ], %g4 40008070: 80 a1 20 00 cmp %g4, 0 40008074: 32 bf ff f7 bne,a 40008050 40008078: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 4000807c: 80 a3 40 18 cmp %o5, %i0 40008080: 02 80 00 2b be 4000812c 40008084: f0 26 80 00 st %i0, [ %i2 ] 40008088: 85 2e 20 03 sll %i0, 3, %g2 4000808c: 87 2e 20 05 sll %i0, 5, %g3 40008090: 84 20 c0 02 sub %g3, %g2, %g2 40008094: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40008098: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4000809c: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400080a0: c6 20 80 00 st %g3, [ %g2 ] 400080a4: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 400080a8: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400080ac: c6 20 a0 04 st %g3, [ %g2 + 4 ] 400080b0: c6 00 60 08 ld [ %g1 + 8 ], %g3 400080b4: c6 20 a0 08 st %g3, [ %g2 + 8 ] 400080b8: c6 00 60 0c ld [ %g1 + 0xc ], %g3 400080bc: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 400080c0: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 400080c4: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 400080c8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 400080cc: 40 00 07 35 call 40009da0 <_Thread_Enable_dispatch> 400080d0: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 400080d4: 40 00 26 73 call 40011aa0 400080d8: 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; 400080dc: c6 00 a1 78 ld [ %g2 + 0x178 ], %g3 400080e0: 89 2e 20 05 sll %i0, 5, %g4 400080e4: 85 2e 20 03 sll %i0, 3, %g2 400080e8: 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; 400080ec: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 400080f0: 80 a1 20 00 cmp %g4, 0 400080f4: 02 80 00 12 be 4000813c 400080f8: 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(); 400080fc: 40 00 07 29 call 40009da0 <_Thread_Enable_dispatch> 40008100: 01 00 00 00 nop 40008104: 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 ); } 40008108: 81 c7 e0 08 ret 4000810c: 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; 40008110: 80 a0 a0 00 cmp %g2, 0 40008114: 12 bf ff c0 bne 40008014 40008118: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4000811c: 84 10 20 09 mov 9, %g2 } 40008120: 81 c7 e0 08 ret 40008124: 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; 40008128: 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(); 4000812c: 40 00 07 1d call 40009da0 <_Thread_Enable_dispatch> 40008130: 01 00 00 00 nop return sc; 40008134: 10 bf ff f5 b 40008108 40008138: 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; 4000813c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 40008140: 80 a0 e0 00 cmp %g3, 0 40008144: 12 bf ff ee bne 400080fc 40008148: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 4000814c: 10 bf ff d3 b 40008098 40008150: f0 26 80 00 st %i0, [ %i2 ] 4000afd0 : * 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 ) { 4000afd0: 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 ); 4000afd4: 21 10 00 75 sethi %hi(0x4001d400), %l0 4000afd8: d0 04 23 8c ld [ %l0 + 0x38c ], %o0 ! 4001d78c 4000afdc: 92 10 20 00 clr %o1 4000afe0: 7f ff ea 9a call 40005a48 4000afe4: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000afe8: 23 10 00 75 sethi %hi(0x4001d400), %l1 4000afec: c2 04 63 88 ld [ %l1 + 0x388 ], %g1 ! 4001d788 4000aff0: 80 a0 60 00 cmp %g1, 0 4000aff4: 12 80 00 07 bne 4000b010 4000aff8: 05 10 00 75 sethi %hi(0x4001d400), %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; 4000affc: b0 10 20 00 clr %i0 failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000b000: 7f ff ea d9 call 40005b64 4000b004: d0 04 23 8c ld [ %l0 + 0x38c ], %o0 return iop; } 4000b008: 81 c7 e0 08 ret 4000b00c: 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( 4000b010: c4 00 a3 84 ld [ %g2 + 0x384 ], %g2 4000b014: 92 10 20 01 mov 1, %o1 4000b018: 82 20 40 02 sub %g1, %g2, %g1 4000b01c: 83 38 60 03 sra %g1, 3, %g1 4000b020: 87 28 60 06 sll %g1, 6, %g3 4000b024: 85 28 60 03 sll %g1, 3, %g2 4000b028: 84 20 c0 02 sub %g3, %g2, %g2 4000b02c: 87 28 a0 06 sll %g2, 6, %g3 4000b030: 84 00 80 03 add %g2, %g3, %g2 4000b034: 84 00 80 01 add %g2, %g1, %g2 4000b038: 87 28 a0 0f sll %g2, 0xf, %g3 4000b03c: 84 20 c0 02 sub %g3, %g2, %g2 4000b040: 07 13 10 92 sethi %hi(0x4c424800), %g3 4000b044: 85 28 a0 03 sll %g2, 3, %g2 4000b048: 86 10 e1 00 or %g3, 0x100, %g3 4000b04c: 82 00 80 01 add %g2, %g1, %g1 4000b050: 94 10 20 54 mov 0x54, %o2 4000b054: 96 10 20 00 clr %o3 4000b058: 90 10 40 03 or %g1, %g3, %o0 4000b05c: 7f ff e9 da call 400057c4 4000b060: 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) 4000b064: 80 a2 20 00 cmp %o0, 0 4000b068: 32 bf ff e6 bne,a 4000b000 4000b06c: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000b070: f0 04 63 88 ld [ %l1 + 0x388 ], %i0 next = iop->data1; 4000b074: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000b078: c0 26 20 30 clr [ %i0 + 0x30 ] 4000b07c: c0 26 20 1c clr [ %i0 + 0x1c ] 4000b080: c0 26 20 34 clr [ %i0 + 0x34 ] 4000b084: c0 26 00 00 clr [ %i0 ] 4000b088: c0 26 20 04 clr [ %i0 + 4 ] 4000b08c: c0 26 20 08 clr [ %i0 + 8 ] 4000b090: c0 26 20 0c clr [ %i0 + 0xc ] 4000b094: c0 26 20 10 clr [ %i0 + 0x10 ] 4000b098: c0 26 20 14 clr [ %i0 + 0x14 ] 4000b09c: c0 26 20 20 clr [ %i0 + 0x20 ] 4000b0a0: c0 26 20 24 clr [ %i0 + 0x24 ] 4000b0a4: c0 26 20 28 clr [ %i0 + 0x28 ] 4000b0a8: c0 26 20 2c clr [ %i0 + 0x2c ] 4000b0ac: c0 26 20 40 clr [ %i0 + 0x40 ] 4000b0b0: c0 26 20 44 clr [ %i0 + 0x44 ] 4000b0b4: c0 26 20 38 clr [ %i0 + 0x38 ] 4000b0b8: c0 26 20 3c clr [ %i0 + 0x3c ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4000b0bc: c2 24 63 88 st %g1, [ %l1 + 0x388 ] 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; 4000b0c0: 82 10 21 00 mov 0x100, %g1 4000b0c4: c2 26 20 18 st %g1, [ %i0 + 0x18 ] iop->sem = sema; 4000b0c8: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_libio_iop_freelist = next; goto done; 4000b0cc: 10 bf ff cd b 4000b000 4000b0d0: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 400022d4 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 400022d4: 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) 400022d8: 21 10 00 73 sethi %hi(0x4001cc00), %l0 400022dc: d0 04 23 44 ld [ %l0 + 0x344 ], %o0 ! 4001cf44 400022e0: 80 a2 20 00 cmp %o0, 0 400022e4: 22 80 00 1c be,a 40002354 400022e8: 11 13 10 92 sethi %hi(0x4c424800), %o0 <== NOT EXECUTED { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 400022ec: 40 00 21 e8 call 4000aa8c 400022f0: 92 10 20 48 mov 0x48, %o1 400022f4: 03 10 00 75 sethi %hi(0x4001d400), %g1 400022f8: d0 20 63 84 st %o0, [ %g1 + 0x384 ] ! 4001d784 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 400022fc: 80 a2 20 00 cmp %o0, 0 40002300: 02 80 00 29 be 400023a4 40002304: 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++) 40002308: c6 04 23 44 ld [ %l0 + 0x344 ], %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; 4000230c: 05 10 00 75 sethi %hi(0x4001d400), %g2 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40002310: 80 a0 e0 01 cmp %g3, 1 40002314: 08 80 00 0e bleu 4000234c 40002318: d0 20 a3 88 st %o0, [ %g2 + 0x388 ] 4000231c: 82 02 20 48 add %o0, 0x48, %g1 40002320: 84 10 20 01 mov 1, %g2 iop->data1 = iop + 1; 40002324: c2 20 7f f0 st %g1, [ %g1 + -16 ] 40002328: 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++) 4000232c: 80 a0 80 03 cmp %g2, %g3 40002330: 12 bf ff fd bne 40002324 40002334: 82 00 60 48 add %g1, 0x48, %g1 40002338: 84 00 bf ff add %g2, -1, %g2 4000233c: 83 28 a0 06 sll %g2, 6, %g1 40002340: 85 28 a0 03 sll %g2, 3, %g2 40002344: 82 00 80 01 add %g2, %g1, %g1 40002348: 82 02 00 01 add %o0, %g1, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 4000234c: c0 20 60 38 clr [ %g1 + 0x38 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 40002350: 11 13 10 92 sethi %hi(0x4c424800), %o0 40002354: 92 10 20 01 mov 1, %o1 40002358: 90 12 21 4f or %o0, 0x14f, %o0 4000235c: 94 10 20 54 mov 0x54, %o2 40002360: 96 10 20 00 clr %o3 40002364: 19 10 00 75 sethi %hi(0x4001d400), %o4 40002368: 40 00 0d 17 call 400057c4 4000236c: 98 13 23 8c or %o4, 0x38c, %o4 ! 4001d78c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 40002370: 80 a2 20 00 cmp %o0, 0 40002374: 12 80 00 0a bne 4000239c 40002378: 03 10 00 73 sethi %hi(0x4001cc00), %g1 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 4000237c: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 ! 4001cf40 40002380: 80 a0 60 00 cmp %g1, 0 40002384: 02 80 00 04 be 40002394 40002388: 01 00 00 00 nop (* rtems_fs_init_helper)(); 4000238c: 9f c0 40 00 call %g1 40002390: 01 00 00 00 nop 40002394: 81 c7 e0 08 ret 40002398: 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 ); 4000239c: 40 00 0f 5a call 40006104 <== NOT EXECUTED 400023a0: 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); 400023a4: 40 00 0f 58 call 40006104 <== NOT EXECUTED 400023a8: 90 10 20 1a mov 0x1a, %o0 ! 1a <== NOT EXECUTED 400023ac: 01 00 00 00 nop 4002b2c8 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 4002b2c8: 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); 4002b2cc: 90 10 20 00 clr %o0 4002b2d0: 92 10 20 00 clr %o1 4002b2d4: 40 00 06 d2 call 4002ce1c 4002b2d8: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 4002b2dc: b0 92 20 00 orcc %o0, 0, %i0 4002b2e0: 12 80 00 51 bne 4002b424 4002b2e4: 21 10 01 ab sethi %hi(0x4006ac00), %l0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 4002b2e8: e6 04 22 b8 ld [ %l0 + 0x2b8 ], %l3 ! 4006aeb8 4002b2ec: 23 10 01 bb sethi %hi(0x4006ec00), %l1 4002b2f0: a2 14 60 88 or %l1, 0x88, %l1 ! 4006ec88 4002b2f4: 80 a4 c0 11 cmp %l3, %l1 4002b2f8: 02 80 00 3a be 4002b3e0 4002b2fc: a4 14 22 b8 or %l0, 0x2b8, %l2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 4002b300: 92 10 00 11 mov %l1, %o1 4002b304: 94 10 20 48 mov 0x48, %o2 4002b308: 40 00 74 69 call 400484ac 4002b30c: 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; 4002b310: 03 10 01 bb sethi %hi(0x4006ec00), %g1 4002b314: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 4006ec70 } 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*/ 4002b318: c6 07 bf fc ld [ %fp + -4 ], %g3 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002b31c: 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*/ 4002b320: c6 24 c0 00 st %g3, [ %l3 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002b324: c4 24 e0 18 st %g2, [ %l3 + 0x18 ] 4002b328: 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); 4002b32c: 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; 4002b330: c4 24 e0 1c st %g2, [ %l3 + 0x1c ] 4002b334: 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); 4002b338: 25 10 01 84 sethi %hi(0x40061000), %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; 4002b33c: c4 24 e0 20 st %g2, [ %l3 + 0x20 ] 4002b340: 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); 4002b344: 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; 4002b348: c4 24 e0 24 st %g2, [ %l3 + 0x24 ] 4002b34c: 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); 4002b350: 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; 4002b354: 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); 4002b358: 96 10 00 11 mov %l1, %o3 4002b35c: 98 10 20 00 clr %o4 4002b360: 7f ff 6f 63 call 400070ec 4002b364: 90 14 a1 18 or %l2, 0x118, %o0 rtems_filesystem_root = loc; 4002b368: c2 04 22 b8 ld [ %l0 + 0x2b8 ], %g1 4002b36c: c4 07 bf e8 ld [ %fp + -24 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b370: 90 14 a1 18 or %l2, 0x118, %o0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4002b374: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 4002b378: c4 07 bf ec ld [ %fp + -20 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b37c: 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; 4002b380: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4002b384: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b388: 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; 4002b38c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4002b390: c4 07 bf f4 ld [ %fp + -12 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b394: 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; 4002b398: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 4002b39c: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b3a0: 98 10 20 00 clr %o4 4002b3a4: 7f ff 6f 52 call 400070ec 4002b3a8: c4 20 60 28 st %g2, [ %g1 + 0x28 ] rtems_filesystem_current = loc; 4002b3ac: c4 07 bf e8 ld [ %fp + -24 ], %g2 4002b3b0: c2 04 22 b8 ld [ %l0 + 0x2b8 ], %g1 4002b3b4: c4 20 60 04 st %g2, [ %g1 + 4 ] 4002b3b8: c4 07 bf ec ld [ %fp + -20 ], %g2 4002b3bc: c4 20 60 08 st %g2, [ %g1 + 8 ] 4002b3c0: c4 07 bf f0 ld [ %fp + -16 ], %g2 4002b3c4: c4 20 60 0c st %g2, [ %g1 + 0xc ] 4002b3c8: c4 07 bf f4 ld [ %fp + -12 ], %g2 4002b3cc: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 4002b3d0: c4 07 bf f8 ld [ %fp + -8 ], %g2 4002b3d4: c4 20 60 14 st %g2, [ %g1 + 0x14 ] return RTEMS_SUCCESSFUL; } 4002b3d8: 81 c7 e0 08 ret 4002b3dc: 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)); 4002b3e0: 90 10 20 48 mov 0x48, %o0 4002b3e4: 7f ff 71 33 call 400078b0 4002b3e8: b0 10 20 1a mov 0x1a, %i0 if (!tmp) 4002b3ec: a6 92 20 00 orcc %o0, 0, %l3 4002b3f0: 02 80 00 0d be 4002b424 4002b3f4: 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); 4002b3f8: 90 10 20 00 clr %o0 4002b3fc: 15 10 00 ac sethi %hi(0x4002b000), %o2 4002b400: 40 00 07 9d call 4002d274 4002b404: 94 12 a1 94 or %o2, 0x194, %o2 ! 4002b194 if (sc != RTEMS_SUCCESSFUL) { 4002b408: b0 92 20 00 orcc %o0, 0, %i0 4002b40c: 12 80 00 04 bne 4002b41c 4002b410: 01 00 00 00 nop * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 4002b414: 10 bf ff bb b 4002b300 4002b418: e6 24 22 b8 st %l3, [ %l0 + 0x2b8 ] 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); 4002b41c: 7f ff 6f 6f call 400071d8 <== NOT EXECUTED 4002b420: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return sc; 4002b424: 81 c7 e0 08 ret <== NOT EXECUTED 4002b428: 81 e8 00 00 restore <== NOT EXECUTED 4002b20c : * 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) { 4002b20c: 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); 4002b210: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002b214: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002b218: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 4002b21c: 40 00 07 00 call 4002ce1c <== NOT EXECUTED 4002b220: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002b224: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b228: 12 80 00 14 bne 4002b278 <== NOT EXECUTED 4002b22c: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 4002b230: 21 10 01 ab sethi %hi(0x4006ac00), %l0 <== NOT EXECUTED 4002b234: e6 04 22 b8 ld [ %l0 + 0x2b8 ], %l3 ! 4006aeb8 <== NOT EXECUTED 4002b238: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 4002b23c: c6 04 c0 00 ld [ %l3 ], %g3 <== NOT EXECUTED 4002b240: 82 14 22 b8 or %l0, 0x2b8, %g1 <== NOT EXECUTED 4002b244: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 4002b248: 02 80 00 0e be 4002b280 <== NOT EXECUTED 4002b24c: 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, 4002b250: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4002b254: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4002b258: 40 00 08 65 call 4002d3ec <== NOT EXECUTED 4002b25c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 4002b260: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002b264: 02 80 00 10 be 4002b2a4 <== NOT EXECUTED 4002b268: 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; 4002b26c: 05 10 01 bb sethi %hi(0x4006ec00), %g2 <== NOT EXECUTED 4002b270: 84 10 a0 88 or %g2, 0x88, %g2 ! 4006ec88 <== NOT EXECUTED 4002b274: c4 24 22 b8 st %g2, [ %l0 + 0x2b8 ] <== NOT EXECUTED return sc; } 4002b278: 81 c7 e0 08 ret <== NOT EXECUTED 4002b27c: 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); 4002b280: 40 00 08 2d call 4002d334 <== NOT EXECUTED 4002b284: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002b288: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002b28c: 12 bf ff fb bne 4002b278 <== NOT EXECUTED 4002b290: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 4002b294: 7f ff ff c0 call 4002b194 <== NOT EXECUTED 4002b298: 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, 4002b29c: 10 bf ff ee b 4002b254 <== NOT EXECUTED 4002b2a0: 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); 4002b2a4: 15 10 00 ac sethi %hi(0x4002b000), %o2 <== NOT EXECUTED 4002b2a8: 40 00 07 f3 call 4002d274 <== NOT EXECUTED 4002b2ac: 94 12 a1 94 or %o2, 0x194, %o2 ! 4002b194 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4002b2b0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002b2b4: 12 bf ff ef bne 4002b270 <== NOT EXECUTED 4002b2b8: 05 10 01 bb sethi %hi(0x4006ec00), %g2 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 4002b2bc: 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; 4002b2c0: 10 bf ff ee b 4002b278 <== NOT EXECUTED 4002b2c4: c4 24 22 b8 st %g2, [ %l0 + 0x2b8 ] <== NOT EXECUTED 400079b4 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 400079b4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 400079b8: 03 10 01 aa sethi %hi(0x4006a800), %g1 <== NOT EXECUTED 400079bc: d0 00 63 d0 ld [ %g1 + 0x3d0 ], %o0 ! 4006abd0 <== NOT EXECUTED 400079c0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400079c4: 40 00 19 18 call 4000de24 <_Protected_heap_Get_block_size> <== NOT EXECUTED 400079c8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 400079cc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 400079d0: 02 80 00 08 be 400079f0 <== NOT EXECUTED 400079d4: 03 10 01 bb sethi %hi(0x4006ec00), %g1 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 400079d8: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 400079dc: 82 10 60 40 or %g1, 0x40, %g1 <== NOT EXECUTED 400079e0: c4 18 60 28 ldd [ %g1 + 0x28 ], %g2 <== NOT EXECUTED 400079e4: 86 80 c0 04 addcc %g3, %g4, %g3 <== NOT EXECUTED 400079e8: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 400079ec: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 400079f0: 81 c7 e0 08 ret <== NOT EXECUTED 400079f4: 81 e8 00 00 restore <== NOT EXECUTED 400079f8 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 400079f8: 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 ) 400079fc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40007a00: 02 80 00 14 be 40007a50 <== NOT EXECUTED 40007a04: 03 10 01 aa sethi %hi(0x4006a800), %g1 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 40007a08: d0 00 63 d0 ld [ %g1 + 0x3d0 ], %o0 ! 4006abd0 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 40007a0c: 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); 40007a10: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40007a14: 40 00 19 04 call 4000de24 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40007a18: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 40007a1c: 03 10 01 bb sethi %hi(0x4006ec00), %g1 <== NOT EXECUTED 40007a20: d8 07 bf fc ld [ %fp + -4 ], %o4 <== NOT EXECUTED 40007a24: 82 10 60 40 or %g1, 0x40, %g1 <== NOT EXECUTED 40007a28: c4 18 60 20 ldd [ %g1 + 0x20 ], %g2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40007a2c: da 00 60 2c ld [ %g1 + 0x2c ], %o5 <== NOT EXECUTED if (current_depth > s->max_depth) 40007a30: 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); 40007a34: 86 80 c0 0c addcc %g3, %o4, %g3 <== NOT EXECUTED 40007a38: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 40007a3c: c4 38 60 20 std %g2, [ %g1 + 0x20 ] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40007a40: 84 20 c0 0d sub %g3, %o5, %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40007a44: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 40007a48: 38 80 00 02 bgu,a 40007a50 <== NOT EXECUTED 40007a4c: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 40007a50: 81 c7 e0 08 ret <== NOT EXECUTED 40007a54: 81 e8 00 00 restore <== NOT EXECUTED 40007a58 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40007a58: 03 10 01 bb sethi %hi(0x4006ec00), %g1 <== NOT EXECUTED 40007a5c: c0 20 60 40 clr [ %g1 + 0x40 ] ! 4006ec40 <== NOT EXECUTED 40007a60: c0 20 60 44 clr [ %g1 + 0x44 ] <== NOT EXECUTED 40007a64: 82 10 60 40 or %g1, 0x40, %g1 <== NOT EXECUTED 40007a68: c0 20 60 28 clr [ %g1 + 0x28 ] <== NOT EXECUTED 40007a6c: c0 20 60 2c clr [ %g1 + 0x2c ] <== NOT EXECUTED 40007a70: c0 20 60 08 clr [ %g1 + 8 ] <== NOT EXECUTED 40007a74: c0 20 60 0c clr [ %g1 + 0xc ] <== NOT EXECUTED 40007a78: c0 20 60 10 clr [ %g1 + 0x10 ] <== NOT EXECUTED 40007a7c: c0 20 60 14 clr [ %g1 + 0x14 ] <== NOT EXECUTED 40007a80: c0 20 60 18 clr [ %g1 + 0x18 ] <== NOT EXECUTED 40007a84: c0 20 60 1c clr [ %g1 + 0x1c ] <== NOT EXECUTED 40007a88: c0 20 60 20 clr [ %g1 + 0x20 ] <== NOT EXECUTED } 40007a8c: 81 c3 e0 08 retl <== NOT EXECUTED 40007a90: c0 20 60 24 clr [ %g1 + 0x24 ] <== NOT EXECUTED 40010840 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40010840: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40010844: a0 96 20 00 orcc %i0, 0, %l0 40010848: 02 80 00 20 be 400108c8 4001084c: 03 10 00 8f sethi %hi(0x40023c00), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40010850: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 40023d90 <_System_state_Current> 40010854: 80 a0 60 03 cmp %g1, 3 40010858: 02 80 00 17 be 400108b4 4001085c: c0 24 00 00 clr [ %l0 ] /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 40010860: 7f ff cd 13 call 40003cac 40010864: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 40010868: 03 10 00 8c sethi %hi(0x40023000), %g1 4001086c: d0 00 61 20 ld [ %g1 + 0x120 ], %o0 ! 40023120 40010870: 94 10 00 19 mov %i1, %o2 40010874: 92 10 00 1a mov %i2, %o1 40010878: 7f ff e3 79 call 4000965c <_Protected_heap_Allocate_aligned_with_boundary> 4001087c: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40010880: b2 92 20 00 orcc %o0, 0, %i1 40010884: 02 80 00 12 be 400108cc 40010888: 03 10 00 8d sethi %hi(0x40023400), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4001088c: c2 00 63 a8 ld [ %g1 + 0x3a8 ], %g1 ! 400237a8 40010890: 80 a0 60 00 cmp %g1, 0 40010894: 22 80 00 06 be,a 400108ac 40010898: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4001089c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400108a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400108a4: 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; 400108a8: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 400108ac: 81 c7 e0 08 ret 400108b0: 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()) && 400108b4: 7f ff cc e5 call 40003c48 400108b8: 01 00 00 00 nop 400108bc: 80 8a 20 ff btst 0xff, %o0 400108c0: 12 bf ff e8 bne 40010860 400108c4: 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; 400108c8: b0 10 20 16 mov 0x16, %i0 ! 16 } 400108cc: 81 c7 e0 08 ret 400108d0: 81 e8 00 00 restore 4000797c : void rtems_panic( const char *printf_format, ... ) { 4000797c: 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); 40007980: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40007984: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40007988: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 4000798c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40007990: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40007994: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40007998: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 4000799c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400079a0: 7f ff ff 8a call 400077c8 <== NOT EXECUTED 400079a4: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 400079a8: 81 c7 e0 08 ret <== NOT EXECUTED 400079ac: 81 e8 00 00 restore <== NOT EXECUTED 4000cf60 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4000cf60: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 4000cf64: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000cf68: c2 08 61 b4 ldub [ %g1 + 0x1b4 ], %g1 ! 4001d5b4 4000cf6c: 80 a0 60 00 cmp %g1, 0 4000cf70: 02 80 00 13 be 4000cfbc 4000cf74: 19 10 00 75 sethi %hi(0x4001d400), %o4 return; if (rtems_pipe_semaphore) 4000cf78: c2 03 23 0c ld [ %o4 + 0x30c ], %g1 ! 4001d70c <== NOT EXECUTED 4000cf7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cf80: 12 80 00 0f bne 4000cfbc <== NOT EXECUTED 4000cf84: 98 13 23 0c or %o4, 0x30c, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4000cf88: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 4000cf8c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000cf90: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 4000cf94: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 4000cf98: 7f ff e2 0b call 400057c4 <== NOT EXECUTED 4000cf9c: 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) 4000cfa0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cfa4: 12 80 00 08 bne 4000cfc4 <== NOT EXECUTED 4000cfa8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4000cfac: 7f ff e0 e2 call 40005334 <== NOT EXECUTED 4000cfb0: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 4000cfb4: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000cfb8: d0 30 63 12 sth %o0, [ %g1 + 0x312 ] ! 4001d712 <== NOT EXECUTED 4000cfbc: 81 c7 e0 08 ret 4000cfc0: 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); 4000cfc4: 7f ff e4 50 call 40006104 <== NOT EXECUTED 4000cfc8: 01 00 00 00 nop 4000cfcc: 01 00 00 00 nop 400054d0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 400054d0: 9d e3 bf a0 save %sp, -96, %sp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 400054d4: 21 10 01 bb sethi %hi(0x4006ec00), %l0 400054d8: c2 04 22 bc ld [ %l0 + 0x2bc ], %g1 ! 4006eebc <_Thread_Executing> ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 400054dc: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 400054e0: 80 a7 80 08 cmp %fp, %o0 400054e4: 0a 80 00 06 bcs 400054fc 400054e8: a2 10 20 00 clr %l1 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 400054ec: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 400054f0: 82 02 00 01 add %o0, %g1, %g1 400054f4: 80 a0 40 1e cmp %g1, %fp 400054f8: 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 ) { 400054fc: 03 10 01 b0 sethi %hi(0x4006c000), %g1 40005500: c4 00 61 1c ld [ %g1 + 0x11c ], %g2 ! 4006c11c 40005504: 80 a0 a0 00 cmp %g2, 0 40005508: 02 80 00 09 be 4000552c 4000550c: 82 10 20 01 mov 1, %g1 pattern_ok = (!memcmp( 40005510: 90 02 20 08 add %o0, 8, %o0 40005514: 13 10 01 bb sethi %hi(0x4006ec00), %o1 40005518: 94 10 20 10 mov 0x10, %o2 4000551c: 40 01 0b b3 call 400483e8 40005520: 92 12 60 10 or %o1, 0x10, %o1 40005524: 80 a0 00 08 cmp %g0, %o0 40005528: 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 ) 4000552c: 80 8c 60 ff btst 0xff, %l1 40005530: 02 80 00 05 be 40005544 40005534: 92 08 60 ff and %g1, 0xff, %o1 40005538: 92 88 60 ff andcc %g1, 0xff, %o1 4000553c: 12 80 00 05 bne 40005550 40005540: 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 ); 40005544: d0 04 22 bc ld [ %l0 + 0x2bc ], %o0 <== NOT EXECUTED 40005548: 7f ff ff b8 call 40005428 <== NOT EXECUTED 4000554c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 40005550: 81 c7 e0 08 ret 40005554: 81 e8 00 00 restore 4000540c : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 4000540c: 13 10 00 21 sethi %hi(0x40008400), %o1 <== NOT EXECUTED 40005410: 90 10 20 00 clr %o0 <== NOT EXECUTED 40005414: 92 12 61 d8 or %o1, 0x1d8, %o1 <== NOT EXECUTED 40005418: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000541c: 7f ff ff e6 call 400053b4 <== NOT EXECUTED 40005420: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40005424: 01 00 00 00 nop 400053b4 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 400053b4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED print_context = context; 400053b8: 23 10 01 b0 sethi %hi(0x4006c000), %l1 <== NOT EXECUTED print_handler = print; 400053bc: 21 10 01 b0 sethi %hi(0x4006c000), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 400053c0: f0 24 61 20 st %i0, [ %l1 + 0x120 ] <== NOT EXECUTED print_handler = print; 400053c4: f2 24 21 24 st %i1, [ %l0 + 0x124 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 400053c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400053cc: 13 10 01 83 sethi %hi(0x40060c00), %o1 <== NOT EXECUTED 400053d0: 9f c6 40 00 call %i1 <== NOT EXECUTED 400053d4: 92 12 62 90 or %o1, 0x290, %o1 ! 40060e90 <== NOT EXECUTED (*print)( context, 400053d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400053dc: 13 10 01 83 sethi %hi(0x40060c00), %o1 <== NOT EXECUTED 400053e0: 9f c6 40 00 call %i1 <== NOT EXECUTED 400053e4: 92 12 62 a8 or %o1, 0x2a8, %o1 ! 40060ea8 <== 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 ); 400053e8: 11 10 00 14 sethi %hi(0x40005000), %o0 <== NOT EXECUTED 400053ec: 40 00 20 01 call 4000d3f0 <== NOT EXECUTED 400053f0: 90 12 22 28 or %o0, 0x228, %o0 ! 40005228 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 400053f4: 7f ff ff 8d call 40005228 <== NOT EXECUTED 400053f8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 400053fc: c0 24 61 20 clr [ %l1 + 0x120 ] <== NOT EXECUTED print_handler = NULL; 40005400: c0 24 21 24 clr [ %l0 + 0x124 ] <== NOT EXECUTED } 40005404: 81 c7 e0 08 ret <== NOT EXECUTED 40005408: 81 e8 00 00 restore <== NOT EXECUTED 40005558 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 40005558: 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; 4000555c: c2 06 20 c8 ld [ %i0 + 0xc8 ], %g1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 40005560: 80 a7 80 01 cmp %fp, %g1 40005564: 0a 80 00 07 bcs 40005580 40005568: 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; 4000556c: c4 06 20 c4 ld [ %i0 + 0xc4 ], %g2 40005570: 82 00 40 02 add %g1, %g2, %g1 40005574: 80 a7 80 01 cmp %fp, %g1 40005578: 28 80 00 0b bleu,a 400055a4 4000557c: 13 10 01 bb sethi %hi(0x4006ec00), %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, 40005580: 13 10 01 bb sethi %hi(0x4006ec00), %o1 <== NOT EXECUTED 40005584: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40005588: 40 01 0b 98 call 400483e8 <== NOT EXECUTED 4000558c: 92 12 60 10 or %o1, 0x10, %o1 <== NOT EXECUTED 40005590: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40005594: 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 ); 40005598: b2 0e 60 01 and %i1, 1, %i1 <== NOT EXECUTED 4000559c: 7f ff ff a3 call 40005428 <== NOT EXECUTED 400055a0: 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, 400055a4: 94 10 20 10 mov 0x10, %o2 400055a8: 92 12 60 10 or %o1, 0x10, %o1 400055ac: 40 01 0b 8f call 400483e8 400055b0: b2 10 20 00 clr %i1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 400055b4: 80 a2 20 00 cmp %o0, 0 400055b8: 12 bf ff f9 bne 4000559c 400055bc: b2 0e 60 01 and %i1, 1, %i1 400055c0: 81 c7 e0 08 ret 400055c4: 81 e8 00 00 restore 4000ca98 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000ca98: 9d e3 bf 98 save %sp, -104, %sp 4000ca9c: a4 10 00 18 mov %i0, %l2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000caa0: 80 a6 60 00 cmp %i1, 0 4000caa4: 02 80 00 1c be 4000cb14 4000caa8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000caac: 40 00 0e 6e call 40010464 <__errno> 4000cab0: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000cab4: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000cab8: c0 22 00 00 clr [ %o0 ] *n = 0; 4000cabc: c0 26 40 00 clr [ %i1 ] 4000cac0: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000cac4: 40 00 19 e0 call 40013244 4000cac8: 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 ) 4000cacc: 80 a6 a0 00 cmp %i2, 0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000cad0: 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 ) 4000cad4: 02 80 00 1b be 4000cb40 4000cad8: a2 10 00 09 mov %o1, %l1 *endptr = end; 4000cadc: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cae0: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000cae4: 80 a0 40 12 cmp %g1, %l2 4000cae8: 02 80 00 0b be 4000cb14 4000caec: 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)) 4000caf0: 03 10 00 81 sethi %hi(0x40020400), %g1 4000caf4: d4 18 63 f8 ldd [ %g1 + 0x3f8 ], %o2 ! 400207f8 <_CPU_Trap_slot_template+0x14> 4000caf8: 90 10 00 10 mov %l0, %o0 4000cafc: 40 00 41 f8 call 4001d2dc <__gtdf2> 4000cb00: 92 10 00 11 mov %l1, %o1 4000cb04: 80 a2 20 00 cmp %o0, 0 4000cb08: 14 80 00 05 bg 4000cb1c 4000cb0c: 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; 4000cb10: e0 3e 40 00 std %l0, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000cb14: 81 c7 e0 08 ret 4000cb18: 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)) 4000cb1c: 40 00 0e 52 call 40010464 <__errno> 4000cb20: b0 10 20 0a mov 0xa, %i0 4000cb24: c2 02 00 00 ld [ %o0 ], %g1 4000cb28: 80 a0 60 22 cmp %g1, 0x22 4000cb2c: 02 bf ff fa be 4000cb14 4000cb30: 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; 4000cb34: e0 3e 40 00 std %l0, [ %i1 ] <== NOT EXECUTED 4000cb38: 81 c7 e0 08 ret <== NOT EXECUTED 4000cb3c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000cb40: 10 bf ff e9 b 4000cae4 4000cb44: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cb48 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000cb48: 9d e3 bf 98 save %sp, -104, %sp 4000cb4c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000cb50: 80 a6 60 00 cmp %i1, 0 4000cb54: 02 80 00 19 be 4000cbb8 4000cb58: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000cb5c: 40 00 0e 42 call 40010464 <__errno> 4000cb60: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000cb64: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000cb68: c0 22 00 00 clr [ %o0 ] *n = 0; 4000cb6c: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000cb70: 40 00 19 a2 call 400131f8 4000cb74: 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 ) 4000cb78: 80 a6 a0 00 cmp %i2, 0 4000cb7c: 02 80 00 1a be 4000cbe4 4000cb80: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000cb84: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cb88: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000cb8c: 80 a0 40 10 cmp %g1, %l0 4000cb90: 02 80 00 0a be 4000cbb8 4000cb94: 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)) 4000cb98: 90 10 00 11 mov %l1, %o0 4000cb9c: 13 1f df ff sethi %hi(0x7f7ffc00), %o1 4000cba0: 40 00 3f 17 call 4001c7fc <__gtsf2> 4000cba4: 92 12 63 ff or %o1, 0x3ff, %o1 ! 7f7fffff 4000cba8: 80 a2 20 00 cmp %o0, 0 4000cbac: 14 80 00 05 bg 4000cbc0 4000cbb0: 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; 4000cbb4: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000cbb8: 81 c7 e0 08 ret 4000cbbc: 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)) 4000cbc0: 40 00 0e 29 call 40010464 <__errno> 4000cbc4: b0 10 20 0a mov 0xa, %i0 4000cbc8: c2 02 00 00 ld [ %o0 ], %g1 4000cbcc: 80 a0 60 22 cmp %g1, 0x22 4000cbd0: 02 bf ff fa be 4000cbb8 4000cbd4: 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; 4000cbd8: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000cbdc: 81 c7 e0 08 ret <== NOT EXECUTED 4000cbe0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000cbe4: 10 bf ff ea b 4000cb8c 4000cbe8: c2 07 bf fc ld [ %fp + -4 ], %g1 40020138 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 40020138: 9d e3 bf 98 save %sp, -104, %sp 4002013c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 40020140: 80 a6 60 00 cmp %i1, 0 40020144: 02 80 00 18 be 400201a4 40020148: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4002014c: 40 00 94 05 call 40045160 <__errno> 40020150: 01 00 00 00 nop 40020154: c0 22 00 00 clr [ %o0 ] *n = 0; 40020158: 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 ); 4002015c: 94 10 00 1b mov %i3, %o2 40020160: 90 10 00 10 mov %l0, %o0 40020164: 40 00 b3 b5 call 4004d038 40020168: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4002016c: 80 a6 a0 00 cmp %i2, 0 40020170: 02 80 00 18 be 400201d0 40020174: a2 10 00 08 mov %o0, %l1 *endptr = end; 40020178: c2 07 bf fc ld [ %fp + -4 ], %g1 4002017c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 40020180: 80 a0 40 10 cmp %g1, %l0 40020184: 02 80 00 08 be 400201a4 40020188: 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)) 4002018c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40020190: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40020194: 80 a4 40 01 cmp %l1, %g1 40020198: 02 80 00 05 be 400201ac 4002019c: 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; 400201a0: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 400201a4: 81 c7 e0 08 ret 400201a8: 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)) 400201ac: 40 00 93 ed call 40045160 <__errno> 400201b0: b0 10 20 0a mov 0xa, %i0 400201b4: c2 02 00 00 ld [ %o0 ], %g1 400201b8: 80 a0 60 22 cmp %g1, 0x22 400201bc: 02 bf ff fa be 400201a4 400201c0: 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; 400201c4: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 400201c8: 81 c7 e0 08 ret <== NOT EXECUTED 400201cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400201d0: 10 bf ff ec b 40020180 400201d4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cd58 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000cd58: 9d e3 bf 98 save %sp, -104, %sp 4000cd5c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000cd60: 80 a6 60 00 cmp %i1, 0 4000cd64: 02 80 00 24 be 4000cdf4 4000cd68: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000cd6c: 40 00 0d be call 40010464 <__errno> 4000cd70: 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 ); 4000cd74: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000cd78: c0 22 00 00 clr [ %o0 ] *n = 0; 4000cd7c: 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 ); 4000cd80: 90 10 00 10 mov %l0, %o0 4000cd84: 40 00 19 b9 call 40013468 4000cd88: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000cd8c: 80 a6 a0 00 cmp %i2, 0 4000cd90: 02 80 00 1b be 4000cdfc 4000cd94: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000cd98: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cd9c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000cda0: 80 a0 40 10 cmp %g1, %l0 4000cda4: 02 80 00 14 be 4000cdf4 4000cda8: 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)) 4000cdac: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000cdb0: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000cdb4: 80 a4 40 01 cmp %l1, %g1 4000cdb8: 02 80 00 08 be 4000cdd8 4000cdbc: 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)) 4000cdc0: 80 a4 40 01 cmp %l1, %g1 4000cdc4: 02 80 00 05 be 4000cdd8 4000cdc8: 01 00 00 00 nop return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000cdcc: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; 4000cdd0: 81 c7 e0 08 ret 4000cdd4: 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)) 4000cdd8: 40 00 0d a3 call 40010464 <__errno> 4000cddc: 01 00 00 00 nop 4000cde0: c2 02 00 00 ld [ %o0 ], %g1 4000cde4: 80 a0 60 22 cmp %g1, 0x22 4000cde8: 32 bf ff fa bne,a 4000cdd0 4000cdec: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4000cdf0: b0 10 20 0a mov 0xa, %i0 } 4000cdf4: 81 c7 e0 08 ret 4000cdf8: 81 e8 00 00 restore 4000cdfc: 10 bf ff e9 b 4000cda0 4000ce00: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cc8c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000cc8c: 9d e3 bf 90 save %sp, -112, %sp 4000cc90: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000cc94: 80 a6 60 00 cmp %i1, 0 4000cc98: 02 80 00 29 be 4000cd3c 4000cc9c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000cca0: 40 00 0d f1 call 40010464 <__errno> 4000cca4: 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 ); 4000cca8: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000ccac: c0 22 00 00 clr [ %o0 ] *n = 0; 4000ccb0: c0 26 40 00 clr [ %i1 ] 4000ccb4: 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 ); 4000ccb8: 90 10 00 10 mov %l0, %o0 4000ccbc: 40 00 19 f5 call 40013490 4000ccc0: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000ccc4: 80 a6 a0 00 cmp %i2, 0 4000ccc8: 02 80 00 22 be 4000cd50 4000cccc: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000ccd0: c2 07 bf fc ld [ %fp + -4 ], %g1 4000ccd4: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000ccd8: 80 a0 40 10 cmp %g1, %l0 4000ccdc: 02 80 00 18 be 4000cd3c 4000cce0: 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)) 4000cce4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000cce8: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000ccec: 80 a4 40 01 cmp %l1, %g1 4000ccf0: 02 80 00 15 be 4000cd44 4000ccf4: 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)) 4000ccf8: 03 20 00 00 sethi %hi(0x80000000), %g1 4000ccfc: 80 a4 40 01 cmp %l1, %g1 4000cd00: 02 80 00 06 be 4000cd18 4000cd04: 80 a2 60 00 cmp %o1, 0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000cd08: d2 26 60 04 st %o1, [ %i1 + 4 ] 4000cd0c: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; 4000cd10: 81 c7 e0 08 ret 4000cd14: 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)) 4000cd18: 32 bf ff fd bne,a 4000cd0c 4000cd1c: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED 4000cd20: 40 00 0d d1 call 40010464 <__errno> 4000cd24: d2 27 bf f4 st %o1, [ %fp + -12 ] 4000cd28: c2 02 00 00 ld [ %o0 ], %g1 4000cd2c: 80 a0 60 22 cmp %g1, 0x22 4000cd30: 12 bf ff f6 bne 4000cd08 4000cd34: d2 07 bf f4 ld [ %fp + -12 ], %o1 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4000cd38: b0 10 20 0a mov 0xa, %i0 } 4000cd3c: 81 c7 e0 08 ret 4000cd40: 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)) 4000cd44: 12 bf ff ee bne 4000ccfc 4000cd48: 03 20 00 00 sethi %hi(0x80000000), %g1 4000cd4c: 30 bf ff f5 b,a 4000cd20 4000cd50: 10 bf ff e2 b 4000ccd8 4000cd54: c2 07 bf fc ld [ %fp + -4 ], %g1 400201d8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 400201d8: 9d e3 bf 98 save %sp, -104, %sp 400201dc: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 400201e0: 80 a6 60 00 cmp %i1, 0 400201e4: 02 80 00 16 be 4002023c 400201e8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 400201ec: 40 00 93 dd call 40045160 <__errno> 400201f0: 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 ); 400201f4: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 400201f8: c0 22 00 00 clr [ %o0 ] *n = 0; 400201fc: 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 ); 40020200: 90 10 00 10 mov %l0, %o0 40020204: 40 00 b4 c3 call 4004d510 40020208: 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 ) 4002020c: 80 a6 a0 00 cmp %i2, 0 40020210: 02 80 00 16 be 40020268 40020214: a2 10 00 08 mov %o0, %l1 *endptr = end; 40020218: c2 07 bf fc ld [ %fp + -4 ], %g1 4002021c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 40020220: 80 a0 40 10 cmp %g1, %l0 40020224: 02 80 00 06 be 4002023c 40020228: 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)) 4002022c: 80 a4 7f ff cmp %l1, -1 40020230: 02 80 00 05 be 40020244 40020234: 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; 40020238: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4002023c: 81 c7 e0 08 ret 40020240: 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)) 40020244: 40 00 93 c7 call 40045160 <__errno> <== NOT EXECUTED 40020248: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 4002024c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40020250: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 40020254: 02 bf ff fa be 4002023c <== NOT EXECUTED 40020258: 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; 4002025c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40020260: 81 c7 e0 08 ret <== NOT EXECUTED 40020264: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40020268: 10 bf ff ee b 40020220 4002026c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cefc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000cefc: 9d e3 bf 98 save %sp, -104, %sp 4000cf00: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000cf04: 80 a6 60 00 cmp %i1, 0 4000cf08: 02 80 00 16 be 4000cf60 4000cf0c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000cf10: 40 00 0d 55 call 40010464 <__errno> 4000cf14: 01 00 00 00 nop 4000cf18: c0 22 00 00 clr [ %o0 ] *n = 0; 4000cf1c: 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 ); 4000cf20: 94 10 00 1b mov %i3, %o2 4000cf24: 90 10 00 10 mov %l0, %o0 4000cf28: 40 00 1a 86 call 40013940 4000cf2c: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000cf30: 80 a6 a0 00 cmp %i2, 0 4000cf34: 02 80 00 16 be 4000cf8c 4000cf38: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000cf3c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cf40: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000cf44: 80 a0 40 10 cmp %g1, %l0 4000cf48: 02 80 00 06 be 4000cf60 4000cf4c: 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)) 4000cf50: 80 a4 7f ff cmp %l1, -1 4000cf54: 02 80 00 05 be 4000cf68 4000cf58: 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; 4000cf5c: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000cf60: 81 c7 e0 08 ret 4000cf64: 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)) 4000cf68: 40 00 0d 3f call 40010464 <__errno> 4000cf6c: b0 10 20 0a mov 0xa, %i0 4000cf70: c2 02 00 00 ld [ %o0 ], %g1 4000cf74: 80 a0 60 22 cmp %g1, 0x22 4000cf78: 02 bf ff fa be 4000cf60 4000cf7c: 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; 4000cf80: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000cf84: 81 c7 e0 08 ret <== NOT EXECUTED 4000cf88: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000cf8c: 10 bf ff ee b 4000cf44 4000cf90: c2 07 bf fc ld [ %fp + -4 ], %g1 400202d0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 400202d0: 9d e3 bf 98 save %sp, -104, %sp 400202d4: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 400202d8: 80 a6 60 00 cmp %i1, 0 400202dc: 02 80 00 16 be 40020334 400202e0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 400202e4: 40 00 93 9f call 40045160 <__errno> 400202e8: 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 ); 400202ec: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 400202f0: c0 22 00 00 clr [ %o0 ] *n = 0; 400202f4: 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 ); 400202f8: 90 10 00 10 mov %l0, %o0 400202fc: 40 00 b4 85 call 4004d510 40020300: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 40020304: 80 a6 a0 00 cmp %i2, 0 40020308: 02 80 00 16 be 40020360 4002030c: a2 10 00 08 mov %o0, %l1 *endptr = end; 40020310: c2 07 bf fc ld [ %fp + -4 ], %g1 40020314: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 40020318: 80 a0 40 10 cmp %g1, %l0 4002031c: 02 80 00 06 be 40020334 40020320: 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)) 40020324: 80 a4 7f ff cmp %l1, -1 40020328: 02 80 00 05 be 4002033c 4002032c: 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; 40020330: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 40020334: 81 c7 e0 08 ret 40020338: 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)) 4002033c: 40 00 93 89 call 40045160 <__errno> 40020340: b0 10 20 0a mov 0xa, %i0 40020344: c2 02 00 00 ld [ %o0 ], %g1 40020348: 80 a0 60 22 cmp %g1, 0x22 4002034c: 02 bf ff fa be 40020334 40020350: 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; 40020354: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40020358: 81 c7 e0 08 ret <== NOT EXECUTED 4002035c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40020360: 10 bf ff ee b 40020318 40020364: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cf94 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000cf94: 9d e3 bf 90 save %sp, -112, %sp 4000cf98: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000cf9c: 80 a6 60 00 cmp %i1, 0 4000cfa0: 02 80 00 23 be 4000d02c 4000cfa4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000cfa8: 40 00 0d 2f call 40010464 <__errno> 4000cfac: 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 ); 4000cfb0: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000cfb4: c0 22 00 00 clr [ %o0 ] *n = 0; 4000cfb8: c0 26 40 00 clr [ %i1 ] 4000cfbc: 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 ); 4000cfc0: 90 10 00 10 mov %l0, %o0 4000cfc4: 40 00 1a 69 call 40013968 4000cfc8: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000cfcc: 80 a6 a0 00 cmp %i2, 0 4000cfd0: 02 80 00 19 be 4000d034 4000cfd4: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000cfd8: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cfdc: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000cfe0: 80 a0 40 10 cmp %g1, %l0 4000cfe4: 02 80 00 12 be 4000d02c 4000cfe8: 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)) 4000cfec: 80 a4 7f ff cmp %l1, -1 4000cff0: 02 80 00 06 be 4000d008 4000cff4: 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; 4000cff8: d2 26 60 04 st %o1, [ %i1 + 4 ] 4000cffc: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000d000: 81 c7 e0 08 ret 4000d004: 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)) 4000d008: 32 bf ff fd bne,a 4000cffc 4000d00c: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED 4000d010: 40 00 0d 15 call 40010464 <__errno> 4000d014: d2 27 bf f4 st %o1, [ %fp + -12 ] 4000d018: c2 02 00 00 ld [ %o0 ], %g1 4000d01c: b0 10 20 0a mov 0xa, %i0 4000d020: 80 a0 60 22 cmp %g1, 0x22 4000d024: 12 bf ff f5 bne 4000cff8 4000d028: d2 07 bf f4 ld [ %fp + -12 ], %o1 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4000d02c: 81 c7 e0 08 ret 4000d030: 81 e8 00 00 restore 4000d034: 10 bf ff eb b 4000cfe0 4000d038: c2 07 bf fc ld [ %fp + -4 ], %g1 400045bc : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 400045bc: 82 10 00 08 mov %o0, %g1 int baud_index; switch (termios_baud) { 400045c0: 80 a2 20 09 cmp %o0, 9 400045c4: 02 80 00 2d be 40004678 400045c8: 90 10 20 09 mov 9, %o0 400045cc: 80 a0 60 09 cmp %g1, 9 400045d0: 04 80 00 1a ble 40004638 400045d4: 80 a0 60 04 cmp %g1, 4 400045d8: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 400045dc: 02 80 00 27 be 40004678 <== NOT EXECUTED 400045e0: 90 10 20 0e mov 0xe, %o0 <== NOT EXECUTED 400045e4: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 400045e8: 04 80 00 26 ble 40004680 <== NOT EXECUTED 400045ec: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 400045f0: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 400045f4: 86 10 a0 02 or %g2, 2, %g3 ! 1002 <== NOT EXECUTED 400045f8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400045fc: 02 80 00 1f be 40004678 <== NOT EXECUTED 40004600: 90 10 20 11 mov 0x11, %o0 <== NOT EXECUTED 40004604: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40004608: 04 80 00 38 ble 400046e8 <== NOT EXECUTED 4000460c: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED 40004610: 86 10 a0 03 or %g2, 3, %g3 <== NOT EXECUTED 40004614: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40004618: 02 80 00 18 be 40004678 <== NOT EXECUTED 4000461c: 90 10 20 12 mov 0x12, %o0 <== NOT EXECUTED 40004620: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 40004624: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004628: 02 80 00 14 be 40004678 <== NOT EXECUTED 4000462c: 90 10 20 13 mov 0x13, %o0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 40004630: 81 c3 e0 08 retl 40004634: 90 10 3f ff mov -1, %o0 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 40004638: 02 80 00 10 be 40004678 4000463c: 90 10 20 04 mov 4, %o0 40004640: 80 a0 60 04 cmp %g1, 4 40004644: 14 80 00 1c bg 400046b4 40004648: 80 a0 60 06 cmp %g1, 6 4000464c: 80 a0 60 01 cmp %g1, 1 40004650: 02 80 00 0a be 40004678 40004654: 90 10 20 01 mov 1, %o0 40004658: 80 a0 60 01 cmp %g1, 1 4000465c: 04 80 00 2b ble 40004708 40004660: 80 a0 60 02 cmp %g1, 2 40004664: 02 80 00 05 be 40004678 <== NOT EXECUTED 40004668: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 4000466c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40004670: 12 bf ff f0 bne 40004630 <== NOT EXECUTED 40004674: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED 40004678: 81 c3 e0 08 retl <== NOT EXECUTED 4000467c: 01 00 00 00 nop <== NOT EXECUTED 40004680: 02 bf ff fe be 40004678 <== NOT EXECUTED 40004684: 90 10 20 0b mov 0xb, %o0 ! b <== NOT EXECUTED 40004688: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 4000468c: 06 bf ff fb bl 40004678 <== NOT EXECUTED 40004690: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 40004694: 80 a0 60 0c cmp %g1, 0xc <== NOT EXECUTED 40004698: 02 bf ff f8 be 40004678 <== NOT EXECUTED 4000469c: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED 400046a0: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 400046a4: 12 bf ff e3 bne 40004630 <== NOT EXECUTED 400046a8: 90 10 20 0d mov 0xd, %o0 <== NOT EXECUTED 400046ac: 81 c3 e0 08 retl <== NOT EXECUTED 400046b0: 01 00 00 00 nop <== NOT EXECUTED 400046b4: 02 bf ff f1 be 40004678 <== NOT EXECUTED 400046b8: 90 10 20 06 mov 6, %o0 ! 6 <== NOT EXECUTED 400046bc: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 400046c0: 06 bf ff ee bl 40004678 <== NOT EXECUTED 400046c4: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED 400046c8: 80 a0 60 07 cmp %g1, 7 <== NOT EXECUTED 400046cc: 02 bf ff eb be 40004678 <== NOT EXECUTED 400046d0: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED 400046d4: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 400046d8: 12 bf ff d6 bne 40004630 <== NOT EXECUTED 400046dc: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED 400046e0: 81 c3 e0 08 retl <== NOT EXECUTED 400046e4: 01 00 00 00 nop <== NOT EXECUTED 400046e8: 02 bf ff e4 be 40004678 <== NOT EXECUTED 400046ec: 90 10 20 0f mov 0xf, %o0 ! f <== NOT EXECUTED 400046f0: 84 10 a0 01 or %g2, 1, %g2 <== NOT EXECUTED 400046f4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400046f8: 12 bf ff ce bne 40004630 <== NOT EXECUTED 400046fc: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED 40004700: 81 c3 e0 08 retl <== NOT EXECUTED 40004704: 01 00 00 00 nop <== NOT EXECUTED 40004708: 80 a0 60 00 cmp %g1, 0 4000470c: 12 bf ff c9 bne 40004630 40004710: 90 10 20 00 clr %o0 case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 40004714: 81 c3 e0 08 retl <== NOT EXECUTED 40004718: 01 00 00 00 nop 40003038 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40003038: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 4000303c: d0 20 60 48 st %o0, [ %g1 + 0x48 ] ! 4001d048 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40003040: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 40003044: 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; 40003048: d2 20 60 4c st %o1, [ %g1 + 0x4c ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 4000304c: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40003050: 81 c3 e0 08 retl <== NOT EXECUTED 40003054: d4 20 60 50 st %o2, [ %g1 + 0x50 ] ! 4001d050 <== NOT EXECUTED 4000476c : } } rtems_status_code rtems_termios_close (void *arg) { 4000476c: 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); 40004770: 23 10 00 75 sethi %hi(0x4001d400), %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; 40004774: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004778: d0 04 63 cc ld [ %l1 + 0x3cc ], %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; 4000477c: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004780: 92 10 20 00 clr %o1 40004784: 40 00 04 b1 call 40005a48 40004788: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 4000478c: 80 a2 20 00 cmp %o0, 0 40004790: 12 80 00 6e bne 40004948 40004794: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 40004798: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000479c: 82 00 7f ff add %g1, -1, %g1 400047a0: 80 a0 60 00 cmp %g1, 0 400047a4: 12 80 00 3a bne 4000488c 400047a8: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400047ac: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 400047b0: 03 10 00 75 sethi %hi(0x4001d400), %g1 400047b4: 85 28 a0 05 sll %g2, 5, %g2 400047b8: 82 10 62 00 or %g1, 0x200, %g1 400047bc: 82 00 40 02 add %g1, %g2, %g1 400047c0: c2 00 60 04 ld [ %g1 + 4 ], %g1 400047c4: 80 a0 60 00 cmp %g1, 0 400047c8: 22 80 00 48 be,a 400048e8 400047cc: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400047d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400047d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 400047d8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 400047dc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400047e0: 22 80 00 4f be,a 4000491c <== NOT EXECUTED 400047e4: 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) 400047e8: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 400047ec: 80 a0 60 00 cmp %g1, 0 400047f0: 22 80 00 07 be,a 4000480c 400047f4: c2 04 00 00 ld [ %l0 ], %g1 (*tty->device.lastClose)(tty->major, tty->minor, arg); 400047f8: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 400047fc: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40004800: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004804: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40004808: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000480c: 80 a0 60 00 cmp %g1, 0 40004810: 22 80 00 27 be,a 400048ac 40004814: c2 04 20 04 ld [ %l0 + 4 ], %g1 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 40004818: c4 04 20 04 ld [ %l0 + 4 ], %g2 4000481c: c4 20 60 04 st %g2, [ %g1 + 4 ] } if (tty->back == NULL) { 40004820: c4 04 20 04 ld [ %l0 + 4 ], %g2 40004824: 80 a0 a0 00 cmp %g2, 0 40004828: 22 80 00 2b be,a 400048d4 4000482c: 05 10 00 75 sethi %hi(0x4001d400), %g2 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 40004830: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40004834: 40 00 04 58 call 40005994 40004838: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 4000483c: 40 00 04 56 call 40005994 40004840: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40004844: 40 00 04 54 call 40005994 40004848: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 4000484c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40004850: 80 a0 60 00 cmp %g1, 0 40004854: 02 80 00 13 be 400048a0 40004858: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 4000485c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004860: 80 a0 60 02 cmp %g1, 2 40004864: 02 80 00 0f be 400048a0 40004868: 01 00 00 00 nop rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 4000486c: 40 00 18 cd call 4000aba0 40004870: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40004874: 40 00 18 cb call 4000aba0 40004878: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 4000487c: 40 00 18 c9 call 4000aba0 40004880: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40004884: 40 00 18 c7 call 4000aba0 40004888: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 4000488c: d0 04 63 cc ld [ %l1 + 0x3cc ], %o0 40004890: 40 00 04 b5 call 40005b64 40004894: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40004898: 81 c7 e0 08 ret 4000489c: 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); 400048a0: 40 00 04 3d call 40005994 <== NOT EXECUTED 400048a4: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 400048a8: 30 bf ff f1 b,a 4000486c <== 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; 400048ac: 05 10 00 75 sethi %hi(0x4001d400), %g2 if ( rtems_termios_ttyTail != NULL ) { 400048b0: 80 a0 60 00 cmp %g1, 0 400048b4: 02 80 00 27 be 40004950 400048b8: c2 20 a3 d0 st %g1, [ %g2 + 0x3d0 ] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 400048bc: 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; 400048c0: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 400048c4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400048c8: 12 bf ff da bne 40004830 <== NOT EXECUTED 400048cc: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 400048d0: 05 10 00 75 sethi %hi(0x4001d400), %g2 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { 400048d4: 80 a0 60 00 cmp %g1, 0 400048d8: 02 bf ff d7 be 40004834 400048dc: c2 20 a3 d4 st %g1, [ %g2 + 0x3d4 ] rtems_termios_ttyHead->back = NULL; 400048e0: 10 bf ff d5 b 40004834 400048e4: c0 20 60 04 clr [ %g1 + 4 ] } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400048e8: 92 10 20 00 clr %o1 400048ec: 40 00 04 57 call 40005a48 400048f0: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 400048f4: 80 a2 20 00 cmp %o0, 0 400048f8: 12 80 00 14 bne 40004948 400048fc: 01 00 00 00 nop rtems_fatal_error_occurred (sc); } drainOutput (tty); 40004900: 7f ff fd 80 call 40003f00 40004904: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40004908: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 4000490c: 80 a0 60 02 cmp %g1, 2 40004910: 32 bf ff b7 bne,a 400047ec 40004914: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 40004918: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 4000491c: 40 00 03 0a call 40005544 <== NOT EXECUTED 40004920: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40004924: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004928: 12 80 00 08 bne 40004948 <== NOT EXECUTED 4000492c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 40004930: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40004934: 40 00 03 04 call 40005544 <== NOT EXECUTED 40004938: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 4000493c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004940: 22 bf ff ab be,a 400047ec <== NOT EXECUTED 40004944: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004948: 40 00 05 ef call 40006104 <== NOT EXECUTED 4000494c: 01 00 00 00 nop <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 40004950: 03 10 00 75 sethi %hi(0x4001d400), %g1 40004954: 10 bf ff b8 b 40004834 40004958: c0 20 63 d4 clr [ %g1 + 0x3d4 ] ! 4001d7d4 40003270 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40003270: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40003274: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003278: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4000327c: 84 00 80 19 add %g2, %i1, %g2 <== NOT EXECUTED 40003280: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003284: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003288: 02 80 00 10 be 400032c8 <== NOT EXECUTED 4000328c: 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 ) { 40003290: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003294: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40003298: 02 80 00 04 be 400032a8 <== NOT EXECUTED 4000329c: 03 10 00 75 sethi %hi(0x4001d400), %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); 400032a0: 7f ff ff 74 call 40003070 <== NOT EXECUTED 400032a4: 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) { 400032a8: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 <== NOT EXECUTED 400032ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400032b0: 02 80 00 04 be 400032c0 <== NOT EXECUTED 400032b4: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 400032b8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400032bc: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 400032c0: 81 c7 e0 08 ret <== NOT EXECUTED 400032c4: 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, 400032c8: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400032cc: 40 00 08 9e call 40005544 <== NOT EXECUTED 400032d0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 400032d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400032d8: 02 bf ff fa be 400032c0 <== NOT EXECUTED 400032dc: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400032e0: 40 00 0b 89 call 40006104 <== NOT EXECUTED 400032e4: 01 00 00 00 nop 400032e8: 01 00 00 00 nop 400032ec : * 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) { 400032ec: 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) { 400032f0: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400032f4: 23 10 00 75 sethi %hi(0x4001d400), %l1 <== NOT EXECUTED 400032f8: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400032fc: a2 14 62 00 or %l1, 0x200, %l1 <== NOT EXECUTED 40003300: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40003304: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED 40003308: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000330c: 02 80 00 22 be 40003394 <== NOT EXECUTED 40003310: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED while (len--) { 40003314: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 40003318: 22 80 00 0f be,a 40003354 <== NOT EXECUTED 4000331c: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 40003320: 10 80 00 05 b 40003334 <== NOT EXECUTED 40003324: a4 10 20 00 clr %l2 <== NOT EXECUTED 40003328: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 4000332c: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40003330: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40003334: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED 40003338: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000333c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40003340: 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--) { 40003344: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED 40003348: 32 bf ff f8 bne,a 40003328 <== NOT EXECUTED 4000334c: 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 )) { 40003350: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 40003354: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003358: 12 80 00 0d bne 4000338c <== NOT EXECUTED 4000335c: 01 00 00 00 nop <== NOT EXECUTED 40003360: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 40003364: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003368: 02 80 00 09 be 4000338c <== NOT EXECUTED 4000336c: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40003370: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 40003374: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003378: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4000337c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40003380: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED 40003384: 81 c7 e0 08 ret <== NOT EXECUTED 40003388: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 4000338c: 81 c7 e0 08 ret <== NOT EXECUTED 40003390: 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); 40003394: 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, 40003398: 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); 4000339c: ac 06 20 30 add %i0, 0x30, %l6 <== NOT EXECUTED 400033a0: a8 10 20 00 clr %l4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400033a4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400033a8: 02 80 00 1c be 40003418 <== NOT EXECUTED 400033ac: 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) { 400033b0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400033b4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400033b8: 02 80 00 0b be 400033e4 <== NOT EXECUTED 400033bc: 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]) { 400033c0: c4 0c 20 4a ldub [ %l0 + 0x4a ], %g2 <== NOT EXECUTED 400033c4: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED 400033c8: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 400033cc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400033d0: 02 80 00 63 be 4000355c <== NOT EXECUTED 400033d4: 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]) { 400033d8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400033dc: 02 80 00 68 be 4000357c <== NOT EXECUTED 400033e0: 01 00 00 00 nop <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 400033e4: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 400033e8: 02 80 00 22 be 40003470 <== NOT EXECUTED 400033ec: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 400033f0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400033f4: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 400033f8: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 400033fc: 02 80 00 0e be 40003434 <== NOT EXECUTED 40003400: 01 00 00 00 nop <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003404: b2 06 60 01 inc %i1 <== NOT EXECUTED 40003408: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 4000340c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40003410: 12 bf ff e8 bne 400033b0 <== NOT EXECUTED 40003414: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40003418: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 4000341c: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40003420: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40003424: 40 00 09 d0 call 40005b64 <== NOT EXECUTED 40003428: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED return dropped; 4000342c: 81 c7 e0 08 ret <== NOT EXECUTED 40003430: 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); 40003434: 7f ff fa 2a call 40001cdc <== NOT EXECUTED 40003438: 01 00 00 00 nop <== NOT EXECUTED 4000343c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40003440: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003444: 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; 40003448: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 4000344c: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003450: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003454: 12 80 00 57 bne 400035b0 <== NOT EXECUTED 40003458: 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); 4000345c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003460: 7f ff fa 23 call 40001cec <== NOT EXECUTED 40003464: b2 06 60 01 inc %i1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003468: 10 bf ff e9 b 4000340c <== NOT EXECUTED 4000346c: 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; 40003470: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 40003474: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40003478: 40 00 56 af call 40018f34 <.urem> <== NOT EXECUTED 4000347c: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40003480: 7f ff fa 17 call 40001cdc <== NOT EXECUTED 40003484: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED 40003488: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4000348c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 40003490: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 40003494: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40003498: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 4000349c: 40 00 56 a6 call 40018f34 <.urem> <== NOT EXECUTED 400034a0: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 400034a4: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 <== NOT EXECUTED 400034a8: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400034ac: 08 80 00 13 bleu 400034f8 <== NOT EXECUTED 400034b0: 01 00 00 00 nop <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 400034b4: 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) 400034b8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400034bc: 12 80 00 0f bne 400034f8 <== NOT EXECUTED 400034c0: 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; 400034c4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400034c8: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 400034cc: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400034d0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400034d4: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 400034d8: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 400034dc: 02 80 00 3d be 400035d0 <== NOT EXECUTED 400034e0: 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)) 400034e4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400034e8: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 400034ec: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 400034f0: 02 80 00 49 be 40003614 <== NOT EXECUTED 400034f4: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 400034f8: 7f ff f9 fd call 40001cec <== NOT EXECUTED 400034fc: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40003500: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 40003504: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 40003508: 22 80 00 22 be,a 40003590 <== NOT EXECUTED 4000350c: b0 06 20 01 inc %i0 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 40003510: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40003514: 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 )) { 40003518: 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; 4000351c: 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 )) { 40003520: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003524: 32 bf ff b9 bne,a 40003408 <== NOT EXECUTED 40003528: b2 06 60 01 inc %i1 <== NOT EXECUTED 4000352c: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 40003530: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003534: 22 bf ff b5 be,a 40003408 <== NOT EXECUTED 40003538: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4000353c: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 40003540: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003544: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003548: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4000354c: 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; 40003550: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003554: 10 bf ff ae b 4000340c <== NOT EXECUTED 40003558: 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]) { 4000355c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003560: 02 80 00 0f be 4000359c <== NOT EXECUTED 40003564: 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; 40003568: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 4000356c: 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; 40003570: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 40003574: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 40003578: 30 bf ff 9e b,a 400033f0 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4000357c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 40003580: 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; 40003584: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 40003588: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 4000358c: 30 bf ff 99 b,a 400033f0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003590: b2 06 60 01 inc %i1 <== NOT EXECUTED 40003594: 10 bf ff 9e b 4000340c <== NOT EXECUTED 40003598: 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; 4000359c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 400035a0: 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; 400035a4: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED 400035a8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 400035ac: 30 bf ff 91 b,a 400033f0 <== 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); 400035b0: 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, 400035b4: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 400035b8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400035bc: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400035c0: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 400035c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400035c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400035cc: 30 bf ff a4 b,a 4000345c <== 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) || 400035d0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400035d4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400035d8: 12 80 00 06 bne 400035f0 <== NOT EXECUTED 400035dc: 01 00 00 00 nop <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 400035e0: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 400035e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400035e8: 12 bf ff c4 bne 400034f8 <== NOT EXECUTED 400035ec: 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; 400035f0: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400035f4: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400035f8: 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; 400035fc: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003600: 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; 40003604: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003608: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000360c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40003610: 30 bf ff ba b,a 400034f8 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40003614: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40003618: 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; 4000361c: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 40003620: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40003624: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003628: 02 bf ff b4 be 400034f8 <== NOT EXECUTED 4000362c: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40003630: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003634: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40003638: 30 bf ff b0 b,a 400034f8 <== NOT EXECUTED 40002fe8 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 40002fe8: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40002fec: 19 10 00 75 sethi %hi(0x4001d400), %o4 40002ff0: c2 03 23 cc ld [ %o4 + 0x3cc ], %g1 ! 4001d7cc 40002ff4: 80 a0 60 00 cmp %g1, 0 40002ff8: 02 80 00 04 be 40003008 40002ffc: 98 13 23 cc or %o4, 0x3cc, %o4 40003000: 81 c7 e0 08 ret 40003004: 81 e8 00 00 restore sc = rtems_semaphore_create ( 40003008: 11 15 14 9b sethi %hi(0x54526c00), %o0 4000300c: 92 10 20 01 mov 1, %o1 40003010: 90 12 21 69 or %o0, 0x169, %o0 40003014: 94 10 20 54 mov 0x54, %o2 40003018: 40 00 09 eb call 400057c4 4000301c: 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) 40003020: 80 a2 20 00 cmp %o0, 0 40003024: 02 bf ff f7 be 40003000 40003028: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 4000302c: 40 00 0c 36 call 40006104 <== NOT EXECUTED 40003030: 01 00 00 00 nop 40003034: 01 00 00 00 nop 40004360 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004360: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004364: c2 06 00 00 ld [ %i0 ], %g1 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 40004368: 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; 4000436c: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40004370: 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); 40004374: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 40004378: 92 10 20 00 clr %o1 4000437c: 40 00 05 b3 call 40005a48 40004380: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40004384: a2 92 20 00 orcc %o0, 0, %l1 40004388: 32 80 00 16 bne,a 400043e0 4000438c: e2 26 20 0c st %l1, [ %i0 + 0xc ] <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 40004390: c2 06 20 04 ld [ %i0 + 4 ], %g1 40004394: 80 a0 60 04 cmp %g1, 4 40004398: 22 80 00 0c be,a 400043c8 4000439c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400043a0: 18 80 00 12 bgu 400043e8 400043a4: 05 10 01 19 sethi %hi(0x40046400), %g2 400043a8: 80 a0 60 02 cmp %g1, 2 400043ac: 22 80 00 26 be,a 40004444 400043b0: d2 06 20 08 ld [ %i0 + 8 ], %o1 400043b4: 08 80 00 81 bleu 400045b8 400043b8: 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); 400043bc: 7f ff fe d1 call 40003f00 400043c0: 90 10 00 10 mov %l0, %o0 break; 400043c4: 30 80 00 04 b,a 400043d4 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 400043c8: c2 24 20 dc st %g1, [ %l0 + 0xdc ] <== NOT EXECUTED 400043cc: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED 400043d0: 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); 400043d4: 40 00 05 e4 call 40005b64 400043d8: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 args->ioctl_return = sc; 400043dc: e2 26 20 0c st %l1, [ %i0 + 0xc ] return sc; } 400043e0: 81 c7 e0 08 ret 400043e4: 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) { 400043e8: 84 10 a2 7f or %g2, 0x27f, %g2 <== NOT EXECUTED 400043ec: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400043f0: 02 80 00 66 be 40004588 <== NOT EXECUTED 400043f4: 01 00 00 00 nop <== NOT EXECUTED 400043f8: 18 80 00 77 bgu 400045d4 <== NOT EXECUTED 400043fc: 05 10 01 1d sethi %hi(0x40047400), %g2 <== NOT EXECUTED 40004400: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40004404: 22 80 00 98 be,a 40004664 <== NOT EXECUTED 40004408: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 4000440c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40004410: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40004414: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40004418: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 4000441c: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40004420: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40004424: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004428: 02 bf ff eb be 400043d4 <== NOT EXECUTED 4000442c: a2 10 20 0a mov 0xa, %l1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40004430: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004434: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004438: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000443c: 10 bf ff e6 b 400043d4 <== NOT EXECUTED 40004440: 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; 40004444: a4 04 20 30 add %l0, 0x30, %l2 40004448: 94 10 20 24 mov 0x24, %o2 4000444c: 40 00 2e b8 call 4000ff2c 40004450: 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) && 40004454: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40004458: 80 88 62 00 btst 0x200, %g1 4000445c: 02 80 00 19 be 400044c0 40004460: 01 00 00 00 nop 40004464: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 40004468: 80 88 64 00 btst 0x400, %g1 4000446c: 12 80 00 15 bne 400044c0 40004470: 01 00 00 00 nop !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 40004474: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004478: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 4000447c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 40004480: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004484: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004488: 02 80 00 0e be 400044c0 <== NOT EXECUTED 4000448c: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40004490: 7f ff f6 13 call 40001cdc <== NOT EXECUTED 40004494: 01 00 00 00 nop <== NOT EXECUTED 40004498: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 4000449c: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400044a0: 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; 400044a4: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 400044a8: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400044ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044b0: 12 80 00 a7 bne 4000474c <== NOT EXECUTED 400044b4: 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); 400044b8: 7f ff f6 0d call 40001cec <== NOT EXECUTED 400044bc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 400044c0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 400044c4: 80 88 64 00 btst 0x400, %g1 400044c8: 02 80 00 0c be 400044f8 400044cc: 03 00 00 04 sethi %hi(0x1000), %g1 400044d0: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 400044d4: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400044d8: 12 80 00 08 bne 400044f8 <== NOT EXECUTED 400044dc: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 400044e0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400044e4: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 400044e8: 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); 400044ec: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400044f0: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 400044f4: 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) && 400044f8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 400044fc: 80 88 61 00 btst 0x100, %g1 40004500: 12 80 00 5d bne 40004674 40004504: 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) { 40004508: 80 a0 a0 00 cmp %g2, 0 4000450c: 06 80 00 84 bl 4000471c 40004510: 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) { 40004514: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 40004518: 05 00 00 04 sethi %hi(0x1000), %g2 4000451c: 80 88 40 02 btst %g1, %g2 40004520: 02 80 00 06 be 40004538 40004524: 80 88 64 00 btst 0x400, %g1 tty->flow_ctrl |= FL_MDXOF; 40004528: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED 4000452c: 84 10 a4 00 or %g2, 0x400, %g2 <== NOT EXECUTED 40004530: 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) { 40004534: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40004538: 22 80 00 06 be,a 40004550 4000453c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40004540: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40004544: 82 10 62 00 or %g1, 0x200, %g1 40004548: 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) { 4000454c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 40004550: 80 88 60 02 btst 2, %g1 40004554: 02 80 00 5e be 400046cc 40004558: 01 00 00 00 nop else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 4000455c: c0 24 20 6c clr [ %l0 + 0x6c ] tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40004560: c0 24 20 70 clr [ %l0 + 0x70 ] tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40004564: c0 24 20 74 clr [ %l0 + 0x74 ] else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 40004568: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 4000456c: 80 a0 60 00 cmp %g1, 0 40004570: 02 bf ff 99 be 400043d4 40004574: 01 00 00 00 nop (*tty->device.setAttributes)(tty->minor, &tty->termios); 40004578: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 4000457c: 9f c0 40 00 call %g1 40004580: 92 10 00 12 mov %l2, %o1 40004584: 30 bf ff 94 b,a 400043d4 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40004588: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 4000458c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40004590: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED 40004594: 0c 80 00 5f bneg 40004710 <== NOT EXECUTED 40004598: 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; 4000459c: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED 400045a0: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 400045a4: c6 06 20 08 ld [ %i0 + 8 ], %g3 <== NOT EXECUTED 400045a8: 84 21 00 02 sub %g4, %g2, %g2 <== NOT EXECUTED 400045ac: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 400045b0: 10 bf ff 89 b 400043d4 <== NOT EXECUTED 400045b4: 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) { 400045b8: 32 bf ff 96 bne,a 40004410 400045bc: 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; 400045c0: d0 06 20 08 ld [ %i0 + 8 ], %o0 400045c4: 92 04 20 30 add %l0, 0x30, %o1 400045c8: 40 00 2e 59 call 4000ff2c 400045cc: 94 10 20 24 mov 0x24, %o2 break; 400045d0: 30 bf ff 81 b,a 400043d4 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 400045d4: 84 10 a0 1a or %g2, 0x1a, %g2 <== NOT EXECUTED 400045d8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400045dc: 02 80 00 1e be 40004654 <== NOT EXECUTED 400045e0: 05 20 01 1d sethi %hi(0x80047400), %g2 <== NOT EXECUTED 400045e4: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <== NOT EXECUTED 400045e8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400045ec: 32 bf ff 89 bne,a 40004410 <== NOT EXECUTED 400045f0: 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) { 400045f4: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 400045f8: 25 10 00 75 sethi %hi(0x4001d400), %l2 <== NOT EXECUTED 400045fc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004600: a4 14 a2 00 or %l2, 0x200, %l2 <== NOT EXECUTED 40004604: 82 04 80 01 add %l2, %g1, %g1 <== NOT EXECUTED 40004608: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000460c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004610: 22 80 00 06 be,a 40004628 <== NOT EXECUTED 40004614: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40004618: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000461c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004620: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 40004624: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 40004628: 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); 4000462c: 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) { 40004630: 83 28 a0 05 sll %g2, 5, %g1 <== NOT EXECUTED 40004634: c2 04 80 01 ld [ %l2 + %g1 ], %g1 <== NOT EXECUTED 40004638: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000463c: 02 bf ff 66 be 400043d4 <== NOT EXECUTED 40004640: c4 24 20 cc st %g2, [ %l0 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 40004644: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004648: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000464c: 10 bf ff 62 b 400043d4 <== NOT EXECUTED 40004650: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 40004654: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40004658: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED break; 4000465c: 10 bf ff 5e b 400043d4 <== NOT EXECUTED 40004660: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 40004664: c2 24 20 d4 st %g1, [ %l0 + 0xd4 ] <== NOT EXECUTED 40004668: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 4000466c: 10 bf ff 5a b 400043d4 <== NOT EXECUTED 40004670: 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) && 40004674: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004678: 06 80 00 29 bl 4000471c <== NOT EXECUTED 4000467c: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 40004680: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004684: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 40004688: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 4000468c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004690: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40004694: 02 80 00 09 be 400046b8 <== NOT EXECUTED 40004698: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 4000469c: 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) && 400046a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400046a4: 02 80 00 05 be 400046b8 <== NOT EXECUTED 400046a8: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400046ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400046b0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400046b4: c4 04 20 38 ld [ %l0 + 0x38 ], %g2 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400046b8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400046bc: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400046c0: 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) { 400046c4: 10 bf ff 92 b 4000450c <== NOT EXECUTED 400046c8: 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; 400046cc: 40 00 03 12 call 40005314 <== NOT EXECUTED 400046d0: 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] * 400046d4: 40 00 51 32 call 40018b9c <.umul> <== NOT EXECUTED 400046d8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 400046dc: 40 00 51 6a call 40018c84 <.udiv> <== NOT EXECUTED 400046e0: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 400046e4: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400046e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400046ec: 02 80 00 11 be 40004730 <== NOT EXECUTED 400046f0: d0 24 20 54 st %o0, [ %l0 + 0x54 ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 400046f4: 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; 400046f8: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 400046fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004700: 12 bf ff 99 bne 40004564 <== NOT EXECUTED 40004704: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40004708: 10 bf ff 98 b 40004568 <== NOT EXECUTED 4000470c: 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; 40004710: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40004714: 10 bf ff a2 b 4000459c <== NOT EXECUTED 40004718: 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; 4000471c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004720: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40004724: 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) { 40004728: 10 bf ff 7c b 40004518 <== NOT EXECUTED 4000472c: 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]) { 40004730: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40004734: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004738: 32 bf ff 8a bne,a 40004560 <== NOT EXECUTED 4000473c: 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; 40004740: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004744: 10 bf ff 89 b 40004568 <== NOT EXECUTED 40004748: 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); 4000474c: 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, 40004750: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40004754: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004758: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 4000475c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40004760: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004764: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004768: 30 bf ff 54 b,a 400044b8 <== NOT EXECUTED 400048e4 : #include int rtems_termios_number_to_baud( int32_t baud ) { 400048e4: 82 10 00 08 mov %o0, %g1 int termios_baud; switch (baud) { 400048e8: 80 a2 24 b0 cmp %o0, 0x4b0 400048ec: 02 80 00 32 be 400049b4 400048f0: 90 10 20 09 mov 9, %o0 400048f4: 80 a0 64 b0 cmp %g1, 0x4b0 400048f8: 04 80 00 1e ble 40004970 400048fc: 80 a0 60 86 cmp %g1, 0x86 40004900: 05 00 00 12 sethi %hi(0x4800), %g2 40004904: 84 10 a3 00 or %g2, 0x300, %g2 ! 4b00 40004908: 80 a0 40 02 cmp %g1, %g2 4000490c: 02 80 00 2a be 400049b4 40004910: 90 10 20 0e mov 0xe, %o0 40004914: 80 a0 40 02 cmp %g1, %g2 40004918: 04 80 00 29 ble 400049bc 4000491c: 80 a0 69 60 cmp %g1, 0x960 40004920: 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; 40004924: 05 00 00 04 sethi %hi(0x1000), %g2 int32_t baud ) { int termios_baud; switch (baud) { 40004928: 86 10 e2 00 or %g3, 0x200, %g3 4000492c: 80 a0 40 03 cmp %g1, %g3 40004930: 02 80 00 21 be 400049b4 40004934: 90 10 a0 02 or %g2, 2, %o0 40004938: 80 a0 40 03 cmp %g1, %g3 4000493c: 04 80 00 46 ble 40004a54 40004940: 07 00 00 25 sethi %hi(0x9400), %g3 40004944: 07 00 00 e1 sethi %hi(0x38400), %g3 40004948: 80 a0 40 03 cmp %g1, %g3 4000494c: 02 80 00 1a be 400049b4 40004950: 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; 40004954: 90 10 a0 04 or %g2, 4, %o0 int32_t baud ) { int termios_baud; switch (baud) { 40004958: 05 00 01 c2 sethi %hi(0x70800), %g2 4000495c: 80 a0 40 02 cmp %g1, %g2 40004960: 02 80 00 4b be 40004a8c 40004964: 01 00 00 00 nop case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 40004968: 81 c3 e0 08 retl 4000496c: 90 10 3f ff mov -1, %o0 ! ffffffff int32_t baud ) { int termios_baud; switch (baud) { 40004970: 02 80 00 11 be 400049b4 40004974: 90 10 20 04 mov 4, %o0 40004978: 80 a0 60 86 cmp %g1, 0x86 4000497c: 04 80 00 21 ble 40004a00 40004980: 80 a0 60 32 cmp %g1, 0x32 40004984: 80 a0 60 c8 cmp %g1, 0xc8 40004988: 02 80 00 0b be 400049b4 4000498c: 90 10 20 06 mov 6, %o0 40004990: 80 a0 60 c8 cmp %g1, 0xc8 40004994: 04 80 00 28 ble 40004a34 40004998: 80 a0 60 96 cmp %g1, 0x96 4000499c: 80 a0 61 2c cmp %g1, 0x12c 400049a0: 02 80 00 05 be 400049b4 400049a4: 90 10 20 07 mov 7, %o0 400049a8: 80 a0 62 58 cmp %g1, 0x258 400049ac: 12 bf ff ef bne 40004968 400049b0: 90 10 20 08 mov 8, %o0 400049b4: 81 c3 e0 08 retl 400049b8: 01 00 00 00 nop 400049bc: 02 bf ff fe be 400049b4 400049c0: 90 10 20 0b mov 0xb, %o0 ! b 400049c4: 80 a0 69 60 cmp %g1, 0x960 400049c8: 04 80 00 2f ble 40004a84 400049cc: 80 a0 67 08 cmp %g1, 0x708 400049d0: 05 00 00 04 sethi %hi(0x1000), %g2 400049d4: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 12c0 400049d8: 80 a0 40 02 cmp %g1, %g2 400049dc: 02 bf ff f6 be 400049b4 400049e0: 90 10 20 0c mov 0xc, %o0 400049e4: 05 00 00 09 sethi %hi(0x2400), %g2 400049e8: 84 10 a1 80 or %g2, 0x180, %g2 ! 2580 400049ec: 80 a0 40 02 cmp %g1, %g2 400049f0: 12 bf ff de bne 40004968 400049f4: 90 10 20 0d mov 0xd, %o0 400049f8: 81 c3 e0 08 retl 400049fc: 01 00 00 00 nop 40004a00: 02 bf ff ed be 400049b4 40004a04: 90 10 20 01 mov 1, %o0 ! 1 40004a08: 80 a0 60 32 cmp %g1, 0x32 40004a0c: 04 80 00 0e ble 40004a44 40004a10: 80 a0 60 00 cmp %g1, 0 40004a14: 80 a0 60 4b cmp %g1, 0x4b 40004a18: 02 bf ff e7 be 400049b4 40004a1c: 90 10 20 02 mov 2, %o0 40004a20: 80 a0 60 6e cmp %g1, 0x6e 40004a24: 12 bf ff d1 bne 40004968 40004a28: 90 10 20 03 mov 3, %o0 40004a2c: 81 c3 e0 08 retl 40004a30: 01 00 00 00 nop 40004a34: 12 bf ff cd bne 40004968 40004a38: 90 10 20 05 mov 5, %o0 ! 5 40004a3c: 81 c3 e0 08 retl 40004a40: 01 00 00 00 nop 40004a44: 12 bf ff c9 bne 40004968 40004a48: 90 10 20 00 clr %o0 ! 0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 40004a4c: 81 c3 e0 08 retl 40004a50: 01 00 00 00 nop int32_t baud ) { int termios_baud; switch (baud) { 40004a54: 86 10 e2 00 or %g3, 0x200, %g3 40004a58: 80 a0 40 03 cmp %g1, %g3 40004a5c: 02 bf ff d6 be 400049b4 40004a60: 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; 40004a64: 90 10 a0 01 or %g2, 1, %o0 int32_t baud ) { int termios_baud; switch (baud) { 40004a68: 05 00 00 38 sethi %hi(0xe000), %g2 40004a6c: 84 10 a1 00 or %g2, 0x100, %g2 ! e100 40004a70: 80 a0 40 02 cmp %g1, %g2 40004a74: 32 bf ff d0 bne,a 400049b4 40004a78: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40004a7c: 81 c3 e0 08 retl 40004a80: 01 00 00 00 nop 40004a84: 12 bf ff b9 bne 40004968 40004a88: 90 10 20 0a mov 0xa, %o0 ! a 40004a8c: 81 c3 e0 08 retl 40004a90: 01 00 00 00 nop 4000495c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 4000495c: 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, 40004960: 23 10 00 75 sethi %hi(0x4001d400), %l1 40004964: d0 04 63 cc ld [ %l1 + 0x3cc ], %o0 ! 4001d7cc 40004968: 92 10 20 00 clr %o1 4000496c: 40 00 04 37 call 40005a48 40004970: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004974: a0 92 20 00 orcc %o0, 0, %l0 40004978: 32 80 00 29 bne,a 40004a1c 4000497c: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40004980: 29 10 00 75 sethi %hi(0x4001d400), %l4 40004984: e4 05 23 d4 ld [ %l4 + 0x3d4 ], %l2 ! 4001d7d4 40004988: 80 a4 a0 00 cmp %l2, 0 4000498c: 32 80 00 08 bne,a 400049ac 40004990: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004994: 10 80 00 33 b 40004a60 40004998: 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) { 4000499c: 80 a4 a0 00 cmp %l2, 0 400049a0: 02 80 00 30 be 40004a60 400049a4: 90 10 20 01 mov 1, %o0 if ((tty->major == major) && (tty->minor == minor)) 400049a8: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 <== NOT EXECUTED 400049ac: 80 a0 40 18 cmp %g1, %i0 400049b0: 32 bf ff fb bne,a 4000499c 400049b4: e4 04 80 00 ld [ %l2 ], %l2 400049b8: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 400049bc: 80 a0 40 19 cmp %g1, %i1 400049c0: 32 bf ff f7 bne,a 4000499c 400049c4: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 400049c8: c2 04 a0 08 ld [ %l2 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400049cc: c6 06 80 00 ld [ %i2 ], %g3 if (!tty->refcount++) { 400049d0: 84 00 60 01 add %g1, 1, %g2 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400049d4: e4 20 e0 38 st %l2, [ %g3 + 0x38 ] if (!tty->refcount++) { 400049d8: 80 a0 60 00 cmp %g1, 0 400049dc: 12 80 00 0d bne 40004a10 400049e0: c4 24 a0 08 st %g2, [ %l2 + 8 ] if (tty->device.firstOpen) 400049e4: c2 04 a0 98 ld [ %l2 + 0x98 ], %g1 400049e8: 80 a0 60 00 cmp %g1, 0 400049ec: 02 80 00 05 be 40004a00 400049f0: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 400049f4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400049f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400049fc: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004a00: c2 04 a0 b4 ld [ %l2 + 0xb4 ], %g1 40004a04: 80 a0 60 02 cmp %g1, 2 40004a08: 22 80 00 07 be,a 40004a24 40004a0c: 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); 40004a10: 40 00 04 55 call 40005b64 40004a14: d0 04 63 cc ld [ %l1 + 0x3cc ], %o0 return RTEMS_SUCCESSFUL; } 40004a18: b0 10 00 10 mov %l0, %i0 40004a1c: 81 c7 e0 08 ret 40004a20: 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, 40004a24: 13 10 00 13 sethi %hi(0x40004c00), %o1 <== NOT EXECUTED 40004a28: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40004a2c: 40 00 05 22 call 40005eb4 <== NOT EXECUTED 40004a30: 92 12 62 4c or %o1, 0x24c, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004a34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004a38: 12 80 00 bf bne 40004d34 <== NOT EXECUTED 40004a3c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 40004a40: d0 04 a0 c8 ld [ %l2 + 0xc8 ], %o0 <== NOT EXECUTED 40004a44: 13 10 00 13 sethi %hi(0x40004c00), %o1 <== NOT EXECUTED 40004a48: 40 00 05 1b call 40005eb4 <== NOT EXECUTED 40004a4c: 92 12 61 b4 or %o1, 0x1b4, %o1 ! 40004db4 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004a50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004a54: 02 bf ff ef be 40004a10 <== NOT EXECUTED 40004a58: 01 00 00 00 nop <== NOT EXECUTED 40004a5c: 30 80 00 b6 b,a 40004d34 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004a60: 40 00 18 0b call 4000aa8c 40004a64: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 40004a68: a6 92 20 00 orcc %o0, 0, %l3 40004a6c: 02 80 00 99 be 40004cd0 40004a70: a4 10 00 13 mov %l3, %l2 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40004a74: 03 10 00 74 sethi %hi(0x4001d000), %g1 40004a78: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 ! 4001d04c 40004a7c: c2 24 e0 64 st %g1, [ %l3 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40004a80: d0 04 e0 64 ld [ %l3 + 0x64 ], %o0 40004a84: 40 00 19 c7 call 4000b1a0 40004a88: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 40004a8c: 80 a2 20 00 cmp %o0, 0 40004a90: 02 80 00 8e be 40004cc8 40004a94: d0 24 e0 58 st %o0, [ %l3 + 0x58 ] return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40004a98: 03 10 00 74 sethi %hi(0x4001d000), %g1 40004a9c: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 ! 4001d050 40004aa0: c2 24 e0 88 st %g1, [ %l3 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40004aa4: d0 04 e0 88 ld [ %l3 + 0x88 ], %o0 40004aa8: 40 00 19 be call 4000b1a0 40004aac: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40004ab0: 80 a2 20 00 cmp %o0, 0 40004ab4: 02 80 00 8c be 40004ce4 40004ab8: d0 24 e0 7c st %o0, [ %l3 + 0x7c ] return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40004abc: 03 10 00 74 sethi %hi(0x4001d000), %g1 40004ac0: 40 00 19 b8 call 4000b1a0 40004ac4: d0 00 60 48 ld [ %g1 + 0x48 ], %o0 ! 4001d048 if (tty->cbuf == NULL) { 40004ac8: 80 a2 20 00 cmp %o0, 0 40004acc: 02 80 00 9c be 40004d3c 40004ad0: d0 24 e0 1c st %o0, [ %l3 + 0x1c ] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40004ad4: c2 05 23 d4 ld [ %l4 + 0x3d4 ], %g1 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 40004ad8: c0 24 e0 d4 clr [ %l3 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40004adc: c0 24 e0 d8 clr [ %l3 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40004ae0: c0 24 e0 dc clr [ %l3 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40004ae4: c0 24 e0 e0 clr [ %l3 + 0xe0 ] tty->tty_rcvwakeup = 0; 40004ae8: c0 24 e0 e4 clr [ %l3 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40004aec: c2 24 c0 00 st %g1, [ %l3 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40004af0: 80 a0 60 00 cmp %g1, 0 40004af4: 02 80 00 03 be 40004b00 40004af8: c0 24 e0 04 clr [ %l3 + 4 ] rtems_termios_ttyHead->back = tty; 40004afc: e6 20 60 04 st %l3, [ %g1 + 4 ] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40004b00: 03 10 00 75 sethi %hi(0x4001d400), %g1 40004b04: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 40004b08: 80 a0 a0 00 cmp %g2, 0 40004b0c: 02 80 00 a8 be 40004dac 40004b10: e6 25 23 d4 st %l3, [ %l4 + 0x3d4 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40004b14: 29 10 00 74 sethi %hi(0x4001d000), %l4 40004b18: d0 4d 20 54 ldsb [ %l4 + 0x54 ], %o0 ! 4001d054 40004b1c: 03 15 14 9a sethi %hi(0x54526800), %g1 40004b20: 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; 40004b24: f2 24 e0 10 st %i1, [ %l3 + 0x10 ] tty->major = major; 40004b28: f0 24 e0 0c st %i0, [ %l3 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40004b2c: 90 12 00 01 or %o0, %g1, %o0 40004b30: 92 10 20 01 mov 1, %o1 40004b34: 94 10 20 54 mov 0x54, %o2 40004b38: 96 10 20 00 clr %o3 40004b3c: 40 00 03 22 call 400057c4 40004b40: 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) 40004b44: 80 a2 20 00 cmp %o0, 0 40004b48: 12 80 00 7b bne 40004d34 40004b4c: 03 15 14 9b sethi %hi(0x54526c00), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40004b50: d0 4d 20 54 ldsb [ %l4 + 0x54 ], %o0 40004b54: 82 10 63 00 or %g1, 0x300, %g1 40004b58: 92 10 20 01 mov 1, %o1 40004b5c: 90 12 00 01 or %o0, %g1, %o0 40004b60: 94 10 20 54 mov 0x54, %o2 40004b64: 96 10 20 00 clr %o3 40004b68: 40 00 03 17 call 400057c4 40004b6c: 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) 40004b70: 80 a2 20 00 cmp %o0, 0 40004b74: 12 80 00 70 bne 40004d34 40004b78: 03 15 14 9e sethi %hi(0x54527800), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40004b7c: d0 4d 20 54 ldsb [ %l4 + 0x54 ], %o0 40004b80: 92 10 20 00 clr %o1 40004b84: 90 12 00 01 or %o0, %g1, %o0 40004b88: 94 10 20 20 mov 0x20, %o2 40004b8c: 96 10 20 00 clr %o3 40004b90: 40 00 03 0d call 400057c4 40004b94: 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) 40004b98: 80 a2 20 00 cmp %o0, 0 40004b9c: 12 80 00 66 bne 40004d34 40004ba0: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40004ba4: c0 24 e0 94 clr [ %l3 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 40004ba8: 90 04 e0 98 add %l3, 0x98, %o0 40004bac: 40 00 2c e0 call 4000ff2c 40004bb0: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004bb4: c2 04 e0 b4 ld [ %l3 + 0xb4 ], %g1 40004bb8: 80 a0 60 02 cmp %g1, 2 40004bbc: 02 80 00 65 be 40004d50 40004bc0: d0 4d 20 54 ldsb [ %l4 + 0x54 ], %o0 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 40004bc4: c2 04 e0 a0 ld [ %l3 + 0xa0 ], %g1 40004bc8: 80 a0 60 00 cmp %g1, 0 40004bcc: 02 80 00 4f be 40004d08 40004bd0: d0 4d 20 54 ldsb [ %l4 + 0x54 ], %o0 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 40004bd4: c2 04 e0 b4 ld [ %l3 + 0xb4 ], %g1 40004bd8: 80 a0 60 02 cmp %g1, 2 40004bdc: 02 80 00 4c be 40004d0c 40004be0: 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; 40004be4: c0 24 e0 b8 clr [ %l3 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40004be8: c6 04 e0 64 ld [ %l3 + 0x64 ], %g3 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40004bec: c2 0d 20 54 ldub [ %l4 + 0x54 ], %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; 40004bf0: 87 30 e0 01 srl %g3, 1, %g3 40004bf4: c6 24 e0 bc st %g3, [ %l3 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40004bf8: 07 00 00 09 sethi %hi(0x2400), %g3 40004bfc: 86 10 e1 02 or %g3, 0x102, %g3 ! 2502 40004c00: c6 24 e0 30 st %g3, [ %l3 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004c04: 07 00 00 06 sethi %hi(0x1800), %g3 40004c08: 86 10 e0 05 or %g3, 5, %g3 ! 1805 40004c0c: c6 24 e0 34 st %g3, [ %l3 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40004c10: 86 10 28 bd mov 0x8bd, %g3 40004c14: c6 24 e0 38 st %g3, [ %l3 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40004c18: 07 00 00 20 sethi %hi(0x8000), %g3 40004c1c: 86 10 e2 3b or %g3, 0x23b, %g3 ! 823b 40004c20: c6 24 e0 3c st %g3, [ %l3 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 40004c24: 86 10 20 03 mov 3, %g3 40004c28: c6 2c e0 41 stb %g3, [ %l3 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40004c2c: 86 10 20 1c mov 0x1c, %g3 40004c30: c6 2c e0 42 stb %g3, [ %l3 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40004c34: 86 10 20 7f mov 0x7f, %g3 40004c38: c6 2c e0 43 stb %g3, [ %l3 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40004c3c: 86 10 20 15 mov 0x15, %g3 40004c40: c6 2c e0 44 stb %g3, [ %l3 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40004c44: 86 10 20 04 mov 4, %g3 40004c48: 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'; 40004c4c: 86 10 20 11 mov 0x11, %g3 40004c50: c6 2c e0 49 stb %g3, [ %l3 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 40004c54: 86 10 20 13 mov 0x13, %g3 40004c58: c6 2c e0 4a stb %g3, [ %l3 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40004c5c: 86 10 20 1a mov 0x1a, %g3 40004c60: c6 2c e0 4b stb %g3, [ %l3 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 40004c64: 86 10 20 12 mov 0x12, %g3 40004c68: c6 2c e0 4d stb %g3, [ %l3 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40004c6c: 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; 40004c70: 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'; 40004c74: c6 2c e0 4e stb %g3, [ %l3 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40004c78: 86 10 20 17 mov 0x17, %g3 40004c7c: c6 2c e0 4f stb %g3, [ %l3 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40004c80: 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'; 40004c84: 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'; 40004c88: 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'; 40004c8c: 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; 40004c90: 87 28 a0 01 sll %g2, 1, %g3 40004c94: 84 00 c0 02 add %g3, %g2, %g2 40004c98: 85 30 a0 02 srl %g2, 2, %g2 40004c9c: c4 24 e0 c0 st %g2, [ %l3 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 40004ca0: 84 00 60 01 add %g1, 1, %g2 40004ca4: 83 28 60 18 sll %g1, 0x18, %g1 40004ca8: 83 38 60 18 sra %g1, 0x18, %g1 40004cac: 80 a0 60 7a cmp %g1, 0x7a 40004cb0: 12 bf ff 46 bne 400049c8 40004cb4: c4 2d 20 54 stb %g2, [ %l4 + 0x54 ] c = 'a'; 40004cb8: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 40004cbc: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 40004cc0: 10 bf ff 42 b 400049c8 <== NOT EXECUTED 40004cc4: c4 28 60 54 stb %g2, [ %g1 + 0x54 ] ! 4001d054 <== 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); 40004cc8: 40 00 17 b6 call 4000aba0 <== NOT EXECUTED 40004ccc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40004cd0: d0 04 63 cc ld [ %l1 + 0x3cc ], %o0 <== NOT EXECUTED 40004cd4: 40 00 03 a4 call 40005b64 <== NOT EXECUTED 40004cd8: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 40004cdc: 81 c7 e0 08 ret <== NOT EXECUTED 40004ce0: 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)); 40004ce4: d0 04 e0 58 ld [ %l3 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40004ce8: 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)); 40004cec: 40 00 17 ad call 4000aba0 <== NOT EXECUTED 40004cf0: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED free(tty); 40004cf4: 40 00 17 ab call 4000aba0 <== NOT EXECUTED 40004cf8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40004cfc: 40 00 03 9a call 40005b64 <== NOT EXECUTED 40004d00: d0 04 63 cc ld [ %l1 + 0x3cc ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 40004d04: 30 bf ff 46 b,a 40004a1c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 40004d08: 03 15 14 9c sethi %hi(0x54527000), %g1 <== NOT EXECUTED 40004d0c: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <== NOT EXECUTED 40004d10: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004d14: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40004d18: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40004d1c: 96 10 20 00 clr %o3 <== NOT EXECUTED 40004d20: 40 00 02 a9 call 400057c4 <== NOT EXECUTED 40004d24: 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) 40004d28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004d2c: 02 bf ff ae be 40004be4 <== NOT EXECUTED 40004d30: 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); 40004d34: 40 00 04 f4 call 40006104 <== NOT EXECUTED 40004d38: 01 00 00 00 nop <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 40004d3c: d0 04 e0 7c ld [ %l3 + 0x7c ], %o0 <== NOT EXECUTED 40004d40: 40 00 17 98 call 4000aba0 <== NOT EXECUTED 40004d44: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40004d48: 10 bf ff e9 b 40004cec <== NOT EXECUTED 40004d4c: 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 ( 40004d50: 03 15 1e 15 sethi %hi(0x54785400), %g1 <== NOT EXECUTED 40004d54: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40004d58: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40004d5c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40004d60: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40004d64: 98 10 20 00 clr %o4 <== NOT EXECUTED 40004d68: 40 00 03 ab call 40005c14 <== NOT EXECUTED 40004d6c: 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) 40004d70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004d74: 12 bf ff f0 bne 40004d34 <== NOT EXECUTED 40004d78: 03 14 9e 15 sethi %hi(0x52785400), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 40004d7c: d0 4d 20 54 ldsb [ %l4 + 0x54 ], %o0 <== NOT EXECUTED 40004d80: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40004d84: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40004d88: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40004d8c: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40004d90: 98 10 20 00 clr %o4 <== NOT EXECUTED 40004d94: 40 00 03 a0 call 40005c14 <== NOT EXECUTED 40004d98: 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) 40004d9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004da0: 22 bf ff 8a be,a 40004bc8 <== NOT EXECUTED 40004da4: c2 04 e0 a0 ld [ %l3 + 0xa0 ], %g1 <== NOT EXECUTED 40004da8: 30 bf ff e3 b,a 40004d34 <== 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; 40004dac: 10 bf ff 5a b 40004b14 40004db0: e6 20 63 d0 st %l3, [ %g1 + 0x3d0 ] 4000363c : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 4000363c: 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) { 40003640: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 40003644: 80 a0 60 00 cmp %g1, 0 40003648: 02 80 00 42 be 40003750 4000364c: a8 10 00 18 mov %i0, %l4 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 40003650: e6 06 a0 80 ld [ %i2 + 0x80 ], %l3 <== NOT EXECUTED while (len) { 40003654: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003658: 02 80 00 43 be 40003764 <== NOT EXECUTED 4000365c: 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; 40003660: 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; 40003664: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 40003668: 40 00 56 33 call 40018f34 <.urem> <== NOT EXECUTED 4000366c: 90 04 e0 01 add %l3, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40003670: 7f ff f9 9b call 40001cdc <== NOT EXECUTED 40003674: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED 40003678: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 4000367c: e2 06 a0 84 ld [ %i2 + 0x84 ], %l1 <== NOT EXECUTED 40003680: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 40003684: 12 80 00 13 bne 400036d0 <== NOT EXECUTED 40003688: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 4000368c: e4 26 a0 94 st %l2, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40003690: 7f ff f9 97 call 40001cec <== NOT EXECUTED 40003694: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40003698: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 4000369c: 92 10 20 00 clr %o1 <== NOT EXECUTED 400036a0: 40 00 08 ea call 40005a48 <== NOT EXECUTED 400036a4: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 400036a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400036ac: 12 80 00 30 bne 4000376c <== NOT EXECUTED 400036b0: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 400036b4: 7f ff f9 8a call 40001cdc <== NOT EXECUTED 400036b8: 01 00 00 00 nop <== NOT EXECUTED 400036bc: 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) { 400036c0: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 400036c4: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 400036c8: 22 bf ff f2 be,a 40003690 <== NOT EXECUTED 400036cc: 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++; 400036d0: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1 <== NOT EXECUTED 400036d4: c6 0d 00 00 ldub [ %l4 ], %g3 <== NOT EXECUTED 400036d8: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2 <== NOT EXECUTED 400036dc: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 400036e0: 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; 400036e4: e6 26 a0 80 st %l3, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 400036e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400036ec: 12 80 00 0a bne 40003714 <== NOT EXECUTED 400036f0: 01 00 00 00 nop <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 400036f4: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400036f8: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 400036fc: 02 80 00 0c be 4000372c <== NOT EXECUTED 40003700: 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; 40003704: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40003708: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 4000370c: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 40003710: ea 26 a0 94 st %l5, [ %i2 + 0x94 ] <== NOT EXECUTED } rtems_interrupt_enable (level); 40003714: 7f ff f9 76 call 40001cec <== NOT EXECUTED 40003718: 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) { 4000371c: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED 40003720: 02 80 00 11 be 40003764 <== NOT EXECUTED 40003724: a8 05 20 01 inc %l4 <== NOT EXECUTED 40003728: 30 bf ff cf b,a 40003664 <== 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); 4000372c: 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, 40003730: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1 <== NOT EXECUTED 40003734: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 <== NOT EXECUTED 40003738: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 4000373c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40003740: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003744: 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; 40003748: 10 bf ff f3 b 40003714 <== NOT EXECUTED 4000374c: 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); 40003750: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 40003754: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 40003758: 92 10 00 18 mov %i0, %o1 4000375c: 9f c0 40 00 call %g1 40003760: 94 10 00 19 mov %i1, %o2 return; 40003764: 81 c7 e0 08 ret 40003768: 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); 4000376c: 40 00 0a 66 call 40006104 <== NOT EXECUTED 40003770: 01 00 00 00 nop 40003774: 01 00 00 00 nop 40003f94 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003f94: 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; 40003f98: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40003f9c: 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; 40003fa0: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 40003fa4: 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); 40003fa8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003fac: 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); 40003fb0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003fb4: 40 00 06 a5 call 40005a48 <== NOT EXECUTED 40003fb8: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40003fbc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40003fc0: 12 80 00 10 bne 40004000 <== NOT EXECUTED 40003fc4: 05 10 00 75 sethi %hi(0x4001d400), %g2 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 40003fc8: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 40003fcc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003fd0: 84 10 a2 00 or %g2, 0x200, %g2 <== NOT EXECUTED 40003fd4: 82 00 60 08 add %g1, 8, %g1 <== NOT EXECUTED 40003fd8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40003fdc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003fe0: 02 80 00 0a be 40004008 <== NOT EXECUTED 40003fe4: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40003fe8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003fec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003ff0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40003ff4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 40003ff8: 40 00 06 db call 40005b64 <== NOT EXECUTED 40003ffc: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED return sc; 40004000: 81 c7 e0 08 ret <== NOT EXECUTED 40004004: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 40004008: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 4000400c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004010: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004014: 22 80 00 20 be,a 40004094 <== NOT EXECUTED 40004018: 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)) { 4000401c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40004020: 22 80 00 16 be,a 40004078 <== NOT EXECUTED 40004024: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED 40004028: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 4000402c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004030: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004034: 26 80 00 09 bl,a 40004058 <== NOT EXECUTED 40004038: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 4000403c: 10 80 00 0f b 40004078 <== NOT EXECUTED 40004040: 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)) { 40004044: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004048: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000404c: 24 80 00 0b ble,a 40004078 <== NOT EXECUTED 40004050: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40004054: 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)) { 40004058: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 4000405c: c4 08 80 01 ldub [ %g2 + %g1 ], %g2 <== NOT EXECUTED 40004060: 82 00 60 01 inc %g1 <== NOT EXECUTED 40004064: c4 2d 00 00 stb %g2, [ %l4 ] <== NOT EXECUTED 40004068: 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)) { 4000406c: 12 bf ff f6 bne 40004044 <== NOT EXECUTED 40004070: a8 05 20 01 inc %l4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40004074: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 40004078: 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; 4000407c: a6 20 40 13 sub %g1, %l3, %l3 <== NOT EXECUTED 40004080: e6 25 a0 1c st %l3, [ %l6 + 0x1c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40004084: 40 00 06 b8 call 40005b64 <== NOT EXECUTED 40004088: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 4000408c: 81 c7 e0 08 ret <== NOT EXECUTED 40004090: 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) 40004094: 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; 40004098: 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; 4000409c: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 400040a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400040a4: 02 80 00 06 be 400040bc <== NOT EXECUTED 400040a8: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 400040ac: c4 04 20 b4 ld [ %l0 + 0xb4 ], %g2 <== NOT EXECUTED 400040b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400040b4: 22 80 00 67 be,a 40004250 <== NOT EXECUTED 400040b8: 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; 400040bc: 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) && 400040c0: 25 10 00 74 sethi %hi(0x4001d000), %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, 400040c4: 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) && 400040c8: a4 14 a0 48 or %l2, 0x48, %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, 400040cc: aa 10 20 01 mov 1, %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400040d0: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400040d4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400040d8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400040dc: 02 80 00 3d be 400041d0 <== NOT EXECUTED 400040e0: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 400040e4: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400040e8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 400040ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400040f0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400040f4: 16 80 00 37 bge 400041d0 <== NOT EXECUTED 400040f8: 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; 400040fc: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40004100: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40004104: 40 00 53 8c call 40018f34 <.urem> <== NOT EXECUTED 40004108: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 4000410c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40004110: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40004114: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 40004118: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000411c: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40004120: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40004124: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 40004128: 40 00 53 83 call 40018f34 <.urem> <== NOT EXECUTED 4000412c: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 40004130: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40004134: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40004138: 3a 80 00 18 bcc,a 40004198 <== NOT EXECUTED 4000413c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40004140: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004144: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40004148: 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)) 4000414c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004150: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 40004154: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 40004158: 22 80 00 30 be,a 40004218 <== NOT EXECUTED 4000415c: 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) { 40004160: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004164: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004168: 22 80 00 0c be,a 40004198 <== NOT EXECUTED 4000416c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40004170: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004174: 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; 40004178: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED 4000417c: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004180: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004184: 22 80 00 05 be,a 40004198 <== NOT EXECUTED 40004188: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 4000418c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004190: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004194: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40004198: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 4000419c: 02 80 00 17 be 400041f8 <== NOT EXECUTED 400041a0: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 400041a4: 7f ff ff 0f call 40003de0 <== NOT EXECUTED 400041a8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400041ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400041b0: 32 80 00 02 bne,a 400041b8 <== NOT EXECUTED 400041b4: aa 10 20 00 clr %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400041b8: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400041bc: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400041c0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400041c4: 12 bf ff c8 bne 400040e4 <== NOT EXECUTED 400041c8: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 400041cc: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 400041d0: 02 bf ff 94 be 40004020 <== NOT EXECUTED 400041d4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 400041d8: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 400041dc: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 400041e0: 40 00 06 1a call 40005a48 <== NOT EXECUTED 400041e4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 400041e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400041ec: 02 bf ff b9 be 400040d0 <== NOT EXECUTED 400041f0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400041f4: 30 bf ff 8b b,a 40004020 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 400041f8: 7f ff fe fa call 40003de0 <== NOT EXECUTED 400041fc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40004200: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40004204: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004208: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000420c: 36 bf ff eb bge,a 400041b8 <== NOT EXECUTED 40004210: aa 10 20 00 clr %l5 <== NOT EXECUTED 40004214: 30 bf ff e9 b,a 400041b8 <== 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)) 40004218: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000421c: 22 80 00 07 be,a 40004238 <== NOT EXECUTED 40004220: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 40004224: 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)) 40004228: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 4000422c: 02 bf ff cd be 40004160 <== NOT EXECUTED 40004230: 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, 40004234: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004238: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 4000423c: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40004240: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004244: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004248: 10 bf ff d4 b 40004198 <== NOT EXECUTED 4000424c: 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) { 40004250: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40004254: 02 80 00 0e be 4000428c <== NOT EXECUTED 40004258: 01 00 00 00 nop <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 4000425c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004260: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40004264: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004268: 06 80 00 3a bl 40004350 <== NOT EXECUTED 4000426c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40004270: 7f ff fe dc call 40003de0 <== NOT EXECUTED 40004274: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004278: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000427c: 12 bf ff 69 bne 40004020 <== NOT EXECUTED 40004280: 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) { 40004284: 10 bf ff f6 b 4000425c <== NOT EXECUTED 40004288: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 4000428c: 40 00 04 2a call 40005334 <== NOT EXECUTED 40004290: 01 00 00 00 nop <== NOT EXECUTED 40004294: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40004298: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 4000429c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400042a0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 400042a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400042a8: 06 80 00 10 bl 400042e8 <== NOT EXECUTED 400042ac: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 400042b0: 7f ff fe cc call 40003de0 <== NOT EXECUTED 400042b4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400042b8: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 400042bc: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 400042c0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400042c4: 16 bf ff 56 bge 4000401c <== NOT EXECUTED 400042c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 400042cc: 22 bf ff f4 be,a 4000429c <== NOT EXECUTED 400042d0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400042d4: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400042d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400042dc: 22 bf ff f0 be,a 4000429c <== NOT EXECUTED 400042e0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400042e4: 30 bf ff ea b,a 4000428c <== 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]) { 400042e8: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 400042ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400042f0: 02 80 00 0d be 40004324 <== NOT EXECUTED 400042f4: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 400042f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400042fc: 02 80 00 06 be 40004314 <== NOT EXECUTED 40004300: 01 00 00 00 nop <== NOT EXECUTED 40004304: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004308: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000430c: 12 80 00 09 bne 40004330 <== NOT EXECUTED 40004310: 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); 40004314: 40 00 07 05 call 40005f28 <== NOT EXECUTED 40004318: 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); 4000431c: 10 bf ff e0 b 4000429c <== NOT EXECUTED 40004320: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40004324: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004328: 02 bf ff 3e be 40004020 <== NOT EXECUTED 4000432c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 40004330: 40 00 04 01 call 40005334 <== NOT EXECUTED 40004334: 01 00 00 00 nop <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40004338: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000433c: 90 22 00 11 sub %o0, %l1, %o0 <== NOT EXECUTED 40004340: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40004344: 08 bf ff f4 bleu 40004314 <== NOT EXECUTED 40004348: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 4000434c: 30 bf ff 35 b,a 40004020 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 40004350: 40 00 06 f6 call 40005f28 <== NOT EXECUTED 40004354: 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) { 40004358: 10 bf ff c1 b 4000425c <== NOT EXECUTED 4000435c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003070 : * 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) { 40003070: 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)) 40003074: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003078: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 4000307c: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40003080: 02 80 00 44 be 40003190 <== NOT EXECUTED 40003084: 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)) 40003088: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000308c: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40003090: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003094: 22 80 00 50 be,a 400031d4 <== NOT EXECUTED 40003098: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 4000309c: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 400030a0: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 400030a4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400030a8: 22 80 00 30 be,a 40003168 <== NOT EXECUTED 400030ac: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 400030b0: 7f ff fb 0b call 40001cdc <== NOT EXECUTED 400030b4: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 400030b8: e2 06 20 90 ld [ %i0 + 0x90 ], %l1 <== NOT EXECUTED tty->t_dqlen = 0; 400030bc: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400030c0: 7f ff fb 0b call 40001cec <== NOT EXECUTED 400030c4: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 400030c8: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 400030cc: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 400030d0: 40 00 57 99 call 40018f34 <.urem> <== NOT EXECUTED 400030d4: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 400030d8: 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; 400030dc: d0 24 20 84 st %o0, [ %l0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 400030e0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400030e4: 02 80 00 55 be 40003238 <== NOT EXECUTED 400030e8: 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) { 400030ec: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 400030f0: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 400030f4: 22 80 00 48 be,a 40003214 <== NOT EXECUTED 400030f8: 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)) 400030fc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003100: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40003104: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 40003108: 02 80 00 4f be 40003244 <== NOT EXECUTED 4000310c: 01 00 00 00 nop <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40003110: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40003114: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40003118: 18 80 00 1b bgu 40003184 <== NOT EXECUTED 4000311c: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 40003120: f0 04 20 80 ld [ %l0 + 0x80 ], %i0 <== NOT EXECUTED 40003124: 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)) { 40003128: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 4000312c: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40003130: 02 80 00 04 be 40003140 <== NOT EXECUTED 40003134: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40003138: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 4000313c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40003140: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40003144: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40003148: 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*/ 4000314c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003150: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED 40003154: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003158: c4 24 20 94 st %g2, [ %l0 + 0x94 ] <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4000315c: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40003160: 81 c7 e0 08 ret <== NOT EXECUTED 40003164: 81 e8 00 00 restore <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40003168: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000316c: 12 bf ff fd bne 40003160 <== NOT EXECUTED 40003170: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40003174: 40 00 0a 7c call 40005b64 <== NOT EXECUTED 40003178: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 4000317c: 81 c7 e0 08 ret <== NOT EXECUTED 40003180: 81 e8 00 00 restore <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 40003184: f0 04 20 88 ld [ %l0 + 0x88 ], %i0 <== NOT EXECUTED 40003188: 10 bf ff e8 b 40003128 <== NOT EXECUTED 4000318c: 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, 40003190: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40003194: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003198: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 4000319c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400031a0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 400031a4: 7f ff fa ce call 40001cdc <== NOT EXECUTED 400031a8: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400031ac: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400031b0: 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--; 400031b4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400031b8: 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--; 400031bc: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400031c0: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400031c4: 7f ff fa ca call 40001cec <== NOT EXECUTED 400031c8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 400031cc: 81 c7 e0 08 ret <== NOT EXECUTED 400031d0: 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, 400031d4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400031d8: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED 400031dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400031e0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 400031e4: 7f ff fa be call 40001cdc <== NOT EXECUTED 400031e8: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400031ec: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400031f0: 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--; 400031f4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400031f8: 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--; 400031fc: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003200: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003204: 7f ff fa ba call 40001cec <== NOT EXECUTED 40003208: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000320c: 81 c7 e0 08 ret <== NOT EXECUTED 40003210: 81 e8 00 00 restore <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40003214: 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) { 40003218: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000321c: 02 bf ff d0 be 4000315c <== NOT EXECUTED 40003220: b0 10 20 00 clr %i0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40003224: d2 04 20 d8 ld [ %l0 + 0xd8 ], %o1 <== NOT EXECUTED 40003228: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000322c: 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*/ 40003230: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED 40003234: 30 bf ff f6 b,a 4000320c <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40003238: 40 00 0a 4b call 40005b64 <== NOT EXECUTED 4000323c: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40003240: 30 bf ff ab b,a 400030ec <== 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); 40003244: 7f ff fa a6 call 40001cdc <== NOT EXECUTED 40003248: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4000324c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40003250: 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; 40003254: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40003258: 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; 4000325c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40003260: 7f ff fa a3 call 40001cec <== NOT EXECUTED 40003264: 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*/ 40003268: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED 4000326c: 30 bf ff e8 b,a 4000320c <== NOT EXECUTED 40004e4c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40004e4c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40004e50: a0 07 bf f8 add %fp, -8, %l0 <== NOT EXECUTED 40004e54: 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 | 40004e58: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004e5c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004e60: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004e64: 40 00 01 57 call 400053c0 <== NOT EXECUTED 40004e68: 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) { 40004e6c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40004e70: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004e74: 32 80 00 16 bne,a 40004ecc <== NOT EXECUTED 40004e78: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40004e7c: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED 40004e80: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004e84: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40004e88: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40004e8c: 02 bf ff f3 be 40004e58 <== NOT EXECUTED 40004e90: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40004e94: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40004e98: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004e9c: 7f ff f9 14 call 400032ec <== NOT EXECUTED 40004ea0: 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 | 40004ea4: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004ea8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004eac: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004eb0: 40 00 01 44 call 400053c0 <== NOT EXECUTED 40004eb4: 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) { 40004eb8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40004ebc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004ec0: 22 bf ff f0 be,a 40004e80 <== NOT EXECUTED 40004ec4: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40004ec8: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004ecc: 40 00 03 9d call 40005d40 <== NOT EXECUTED 40004ed0: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004ed4: 10 bf ff e2 b 40004e5c <== NOT EXECUTED 40004ed8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40003058 : 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); 40003058: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 4000305c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003060: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003064: 40 00 09 38 call 40005544 <== NOT EXECUTED 40003068: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000306c: 01 00 00 00 nop 40004db4 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40004db4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40004db8: 23 10 00 75 sethi %hi(0x4001d400), %l1 <== NOT EXECUTED 40004dbc: a0 07 bf fc add %fp, -4, %l0 <== NOT EXECUTED 40004dc0: a2 14 62 00 or %l1, 0x200, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004dc4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004dc8: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004dcc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004dd0: 40 00 01 7c call 400053c0 <== NOT EXECUTED 40004dd4: 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) { 40004dd8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40004ddc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004de0: 12 80 00 16 bne 40004e38 <== NOT EXECUTED 40004de4: 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) { 40004de8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40004dec: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004df0: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 40004df4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40004df8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004dfc: 02 80 00 04 be 40004e0c <== NOT EXECUTED 40004e00: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40004e04: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004e08: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40004e0c: 7f ff f8 99 call 40003070 <== NOT EXECUTED 40004e10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004e14: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004e18: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004e1c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004e20: 40 00 01 68 call 400053c0 <== NOT EXECUTED 40004e24: 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) { 40004e28: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40004e2c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004e30: 02 bf ff ee be 40004de8 <== NOT EXECUTED 40004e34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 40004e38: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004e3c: 40 00 03 c1 call 40005d40 <== NOT EXECUTED 40004e40: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004e44: 10 bf ff e1 b 40004dc8 <== NOT EXECUTED 40004e48: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003e2c : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40003e2c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003e30: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003e34: 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; 40003e38: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003e3c: 94 10 20 00 clr %o2 40003e40: 40 00 07 02 call 40005a48 40003e44: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 if (sc != RTEMS_SUCCESSFUL) 40003e48: a2 92 20 00 orcc %o0, 0, %l1 40003e4c: 12 80 00 0f bne 40003e88 40003e50: 03 10 00 75 sethi %hi(0x4001d400), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40003e54: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 40003e58: 85 28 a0 05 sll %g2, 5, %g2 40003e5c: 82 10 62 00 or %g1, 0x200, %g1 40003e60: 82 00 40 02 add %g1, %g2, %g1 40003e64: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40003e68: 80 a0 60 00 cmp %g1, 0 40003e6c: 02 80 00 09 be 40003e90 40003e70: 92 10 00 18 mov %i0, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40003e74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003e78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003e7c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40003e80: 40 00 07 39 call 40005b64 <== NOT EXECUTED 40003e84: 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; } 40003e88: 81 c7 e0 08 ret <== NOT EXECUTED 40003e8c: 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) { 40003e90: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 40003e94: 80 88 60 01 btst 1, %g1 40003e98: 22 80 00 16 be,a 40003ef0 40003e9c: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0 <== NOT EXECUTED uint32_t count = args->count; 40003ea0: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 char *buffer = args->buffer; 40003ea4: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 while (count--) 40003ea8: 80 a4 e0 00 cmp %l3, 0 40003eac: a4 10 20 00 clr %l2 40003eb0: 02 80 00 0a be 40003ed8 40003eb4: 82 10 20 00 clr %g1 oproc (*buffer++, tty); 40003eb8: d0 0d 00 12 ldub [ %l4 + %l2 ], %o0 40003ebc: 7f ff fe 2f call 40003778 40003ec0: 92 10 00 10 mov %l0, %o1 40003ec4: 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--) 40003ec8: 80 a4 80 13 cmp %l2, %l3 40003ecc: 32 bf ff fc bne,a 40003ebc 40003ed0: 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; 40003ed4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40003ed8: c2 26 20 1c st %g1, [ %i0 + 0x1c ] } rtems_semaphore_release (tty->osem); 40003edc: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 40003ee0: 40 00 07 21 call 40005b64 40003ee4: b0 10 00 11 mov %l1, %i0 return sc; } 40003ee8: 81 c7 e0 08 ret 40003eec: 81 e8 00 00 restore while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 40003ef0: 7f ff fd d3 call 4000363c <== NOT EXECUTED 40003ef4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40003ef8: 10 bf ff f8 b 40003ed8 <== NOT EXECUTED 40003efc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED 400077c8 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 400077c8: 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) 400077cc: 29 08 00 00 sethi %hi(0x20000000), %l4 <== NOT EXECUTED 400077d0: a8 8e 00 14 andcc %i0, %l4, %l4 <== NOT EXECUTED 400077d4: 02 80 00 0f be 40007810 <== NOT EXECUTED 400077d8: 05 10 00 a5 sethi %hi(0x40029400), %g2 <== NOT EXECUTED { if (rtems_panic_in_progress++) 400077dc: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 ! 40029420 <== NOT EXECUTED 400077e0: 82 00 e0 01 add %g3, 1, %g1 <== NOT EXECUTED 400077e4: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400077e8: 02 80 00 07 be 40007804 <== NOT EXECUTED 400077ec: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400077f0: 03 10 00 a5 sethi %hi(0x40029400), %g1 <== NOT EXECUTED 400077f4: c6 00 62 00 ld [ %g1 + 0x200 ], %g3 ! 40029600 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400077f8: 86 00 e0 01 inc %g3 <== NOT EXECUTED 400077fc: c6 20 62 00 st %g3, [ %g1 + 0x200 ] <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 40007800: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40007804: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007808: 14 80 00 3c bg 400078f8 <== NOT EXECUTED 4000780c: a4 10 20 00 clr %l2 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40007810: 21 10 00 a3 sethi %hi(0x40028c00), %l0 <== NOT EXECUTED 40007814: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 ! 40028ca0 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 40007818: 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 */ 4000781c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40007820: 40 00 3d 8f call 40016e5c <== NOT EXECUTED 40007824: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40007828: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 4000782c: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40007830: 12 80 00 45 bne 40007944 <== NOT EXECUTED 40007834: 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); 40007838: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 4000783c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40007840: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007844: 40 00 55 43 call 4001cd50 <== NOT EXECUTED 40007848: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 4000784c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40007850: 12 80 00 31 bne 40007914 <== NOT EXECUTED 40007854: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 40007858: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000785c: 02 80 00 12 be 400078a4 <== NOT EXECUTED 40007860: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40007864: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40007868: 04 80 00 09 ble 4000788c <== NOT EXECUTED 4000786c: 13 10 00 9b sethi %hi(0x40026c00), %o1 <== NOT EXECUTED 40007870: 40 00 41 a2 call 40017ef8 <== NOT EXECUTED 40007874: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007878: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 4000787c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007880: 12 80 00 35 bne 40007954 <== NOT EXECUTED 40007884: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40007888: 13 10 00 9b sethi %hi(0x40026c00), %o1 <== NOT EXECUTED 4000788c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007890: 92 12 62 30 or %o1, 0x230, %o1 <== NOT EXECUTED 40007894: 40 00 3e 46 call 400171ac <== NOT EXECUTED 40007898: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000789c: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 400078a0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400078a4: 13 10 00 9b sethi %hi(0x40026c00), %o1 <== NOT EXECUTED 400078a8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400078ac: 40 00 3e 40 call 400171ac <== NOT EXECUTED 400078b0: 92 12 62 48 or %o1, 0x248, %o1 <== NOT EXECUTED (void) fflush(stderr); 400078b4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %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"); 400078b8: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED (void) fflush(stderr); 400078bc: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400078c0: 40 00 3d 67 call 40016e5c <== NOT EXECUTED 400078c4: a4 04 c0 12 add %l3, %l2, %l2 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 400078c8: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 400078cc: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 400078d0: 02 80 00 0a be 400078f8 <== NOT EXECUTED 400078d4: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 400078d8: 22 80 00 0a be,a 40007900 <== NOT EXECUTED 400078dc: 13 10 00 9b sethi %hi(0x40026c00), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 400078e0: 13 10 00 9b sethi %hi(0x40026c00), %o1 <== NOT EXECUTED 400078e4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400078e8: 40 00 00 32 call 400079b0 <== NOT EXECUTED 400078ec: 92 12 62 50 or %o1, 0x250, %o1 <== NOT EXECUTED _exit(local_errno); 400078f0: 40 00 03 5e call 40008668 <_exit> <== NOT EXECUTED 400078f4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 400078f8: 81 c7 e0 08 ret <== NOT EXECUTED 400078fc: 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"); 40007900: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007904: 40 00 00 2b call 400079b0 <== NOT EXECUTED 40007908: 92 12 62 68 or %o1, 0x268, %o1 <== NOT EXECUTED abort(); 4000790c: 40 00 3c 3d call 40016a00 <== NOT EXECUTED 40007910: 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)); 40007914: 03 10 00 a3 sethi %hi(0x40028c00), %g1 <== NOT EXECUTED 40007918: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 40028ca0 <_impure_ptr> <== NOT EXECUTED 4000791c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40007920: 7f ff ff a3 call 400077ac <== NOT EXECUTED 40007924: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40007928: 13 10 00 9b sethi %hi(0x40026c00), %o1 <== NOT EXECUTED 4000792c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007930: 92 12 62 10 or %o1, 0x210, %o1 <== NOT EXECUTED 40007934: 40 00 3e 1e call 400171ac <== NOT EXECUTED 40007938: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4000793c: 10 bf ff c7 b 40007858 <== NOT EXECUTED 40007940: 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; 40007944: 40 00 3c 3d call 40016a38 <__errno> <== NOT EXECUTED 40007948: 01 00 00 00 nop <== NOT EXECUTED 4000794c: 10 bf ff bb b 40007838 <== NOT EXECUTED 40007950: 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)); 40007954: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007958: 40 00 41 68 call 40017ef8 <== NOT EXECUTED 4000795c: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40007960: 13 10 00 9b sethi %hi(0x40026c00), %o1 <== NOT EXECUTED 40007964: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007968: 92 12 62 20 or %o1, 0x220, %o1 <== NOT EXECUTED 4000796c: 40 00 3e 10 call 400171ac <== NOT EXECUTED 40007970: 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)) 40007974: 10 bf ff cb b 400078a0 <== NOT EXECUTED 40007978: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED 40029f10 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40029f10: 9d e3 bf a0 save %sp, -96, %sp 40029f14: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029f18: 2b 10 01 ad sethi %hi(0x4006b400), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 40029f1c: 29 10 01 ad sethi %hi(0x4006b400), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40029f20: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029f24: aa 15 62 e8 or %l5, 0x2e8, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 40029f28: a8 15 22 d8 or %l4, 0x2d8, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40029f2c: a4 10 20 00 clr %l2 40029f30: a2 10 20 00 clr %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029f34: c2 06 20 04 ld [ %i0 + 4 ], %g1 40029f38: 82 00 7f ff add %g1, -1, %g1 40029f3c: 80 a0 60 00 cmp %g1, 0 40029f40: 06 80 00 24 bl 40029fd0 40029f44: c2 26 20 04 st %g1, [ %i0 + 4 ] 40029f48: c2 06 00 00 ld [ %i0 ], %g1 40029f4c: e0 08 40 00 ldub [ %g1 ], %l0 40029f50: 84 00 60 01 add %g1, 1, %g2 if (c == ':') 40029f54: 80 a4 20 3a cmp %l0, 0x3a 40029f58: 02 80 00 25 be 40029fec 40029f5c: c4 26 00 00 st %g2, [ %i0 ] break; if (sign == 0) { 40029f60: 80 a4 a0 00 cmp %l2, 0 40029f64: 32 80 00 06 bne,a 40029f7c 40029f68: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 40029f6c: 80 a4 20 2d cmp %l0, 0x2d 40029f70: 02 80 00 30 be 4002a030 40029f74: a4 10 20 01 mov 1, %l2 limit++; continue; } sign = 1; } if (!isdigit(c)) 40029f78: c2 05 00 00 ld [ %l4 ], %g1 40029f7c: 82 00 40 10 add %g1, %l0, %g1 40029f80: c2 08 60 01 ldub [ %g1 + 1 ], %g1 40029f84: 80 88 60 04 btst 4, %g1 40029f88: 02 80 00 28 be 4002a028 40029f8c: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 40029f90: 40 00 cd d2 call 4005d6d8 <.udiv> 40029f94: 92 10 20 0a mov 0xa, %o1 40029f98: 80 a4 40 08 cmp %l1, %o0 40029f9c: 18 80 00 23 bgu 4002a028 40029fa0: 01 00 00 00 nop 40029fa4: 02 80 00 1b be 4002a010 40029fa8: a0 04 3f d0 add %l0, -48, %l0 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 40029fac: 83 2c 60 03 sll %l1, 3, %g1 40029fb0: a3 2c 60 01 sll %l1, 1, %l1 40029fb4: a2 04 40 01 add %l1, %g1, %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029fb8: 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; 40029fbc: a2 04 00 11 add %l0, %l1, %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029fc0: 82 00 7f ff add %g1, -1, %g1 40029fc4: 80 a0 60 00 cmp %g1, 0 40029fc8: 16 bf ff e0 bge 40029f48 40029fcc: c2 26 20 04 st %g1, [ %i0 + 4 ] 40029fd0: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 40029fd4: 40 00 82 33 call 4004a8a0 <__srget_r> <== NOT EXECUTED 40029fd8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40029fdc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 40029fe0: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40029fe4: 12 bf ff e0 bne 40029f64 <== NOT EXECUTED 40029fe8: 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) 40029fec: 80 a4 a0 00 cmp %l2, 0 40029ff0: 02 80 00 0e be 4002a028 40029ff4: 90 10 00 12 mov %l2, %o0 return 0; *val = i * sign; 40029ff8: 92 10 00 11 mov %l1, %o1 40029ffc: 7f ff 64 a5 call 40003290 <.umul> 4002a000: b0 10 20 01 mov 1, %i0 4002a004: d0 26 40 00 st %o0, [ %i1 ] return 1; 4002a008: 81 c7 e0 08 ret 4002a00c: 81 e8 00 00 restore sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 4002a010: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4002a014: 40 00 ce 5d call 4005d988 <.urem> <== NOT EXECUTED 4002a018: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4002a01c: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 4002a020: 08 bf ff e4 bleu 40029fb0 <== NOT EXECUTED 4002a024: 83 2c 60 03 sll %l1, 3, %g1 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 4002a028: 81 c7 e0 08 ret <== NOT EXECUTED 4002a02c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 4002a030: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 4002a034: 10 bf ff c0 b 40029f34 <== NOT EXECUTED 4002a038: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 4002a03c : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 4002a03c: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 4002a040: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 4002a044: 21 10 01 ad sethi %hi(0x4006b400), %l0 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 4002a048: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 4002a04c: 10 80 00 19 b 4002a0b0 4002a050: a0 14 22 e8 or %l0, 0x2e8, %l0 4002a054: c2 06 00 00 ld [ %i0 ], %g1 4002a058: d0 08 40 00 ldub [ %g1 ], %o0 4002a05c: 84 00 60 01 add %g1, 1, %g2 if (c == ':') { 4002a060: 80 a2 20 3a cmp %o0, 0x3a 4002a064: 02 80 00 1e be 4002a0dc 4002a068: c4 26 00 00 st %g2, [ %i0 ] if (nlFlag) return 0; break; } if (c == '\n') { 4002a06c: 80 a2 20 0a cmp %o0, 0xa 4002a070: 02 80 00 28 be 4002a110 4002a074: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) return 0; break; } if (c == EOF) 4002a078: 02 80 00 29 be 4002a11c 4002a07c: 01 00 00 00 nop return 0; if (*nleft < 2) 4002a080: c2 06 c0 00 ld [ %i3 ], %g1 4002a084: 80 a0 60 01 cmp %g1, 1 4002a088: 08 80 00 25 bleu 4002a11c 4002a08c: 01 00 00 00 nop return 0; **bufp = c; 4002a090: c2 06 80 00 ld [ %i2 ], %g1 4002a094: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 4002a098: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 4002a09c: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002a0a0: 84 00 a0 01 inc %g2 --(*nleft); 4002a0a4: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002a0a8: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 4002a0ac: c2 26 c0 00 st %g1, [ %i3 ] { int c; *name = *bufp; for (;;) { c = getc(fp); 4002a0b0: c2 06 20 04 ld [ %i0 + 4 ], %g1 4002a0b4: 82 00 7f ff add %g1, -1, %g1 4002a0b8: 80 a0 60 00 cmp %g1, 0 4002a0bc: 16 bf ff e6 bge 4002a054 4002a0c0: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002a0c4: d0 04 00 00 ld [ %l0 ], %o0 4002a0c8: 40 00 81 f6 call 4004a8a0 <__srget_r> 4002a0cc: 92 10 00 18 mov %i0, %o1 if (c == ':') { 4002a0d0: 80 a2 20 3a cmp %o0, 0x3a 4002a0d4: 12 bf ff e7 bne 4002a070 4002a0d8: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 4002a0dc: 80 a7 20 00 cmp %i4, 0 4002a0e0: 12 80 00 0f bne 4002a11c 4002a0e4: 01 00 00 00 nop return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 4002a0e8: c2 06 80 00 ld [ %i2 ], %g1 4002a0ec: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 4002a0f0: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 4002a0f4: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4002a0f8: 84 00 a0 01 inc %g2 --(*nleft); 4002a0fc: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4002a100: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 4002a104: c2 26 c0 00 st %g1, [ %i3 ] return 1; 4002a108: 81 c7 e0 08 ret 4002a10c: 91 e8 20 01 restore %g0, 1, %o0 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 4002a110: 80 a7 20 00 cmp %i4, 0 4002a114: 32 bf ff f6 bne,a 4002a0ec 4002a118: c2 06 80 00 ld [ %i2 ], %g1 } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 4002a11c: 81 c7 e0 08 ret <== NOT EXECUTED 4002a120: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4002a124 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4002a124: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002a128: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4002a12c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002a130: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002a134: a2 07 a0 4c add %fp, 0x4c, %l1 4002a138: a0 07 a0 50 add %fp, 0x50, %l0 4002a13c: 90 10 00 18 mov %i0, %o0 4002a140: 92 10 00 19 mov %i1, %o1 4002a144: 94 10 00 11 mov %l1, %o2 4002a148: 7f ff ff bd call 4002a03c 4002a14c: 96 10 00 10 mov %l0, %o3 4002a150: 80 a2 20 00 cmp %o0, 0 4002a154: 12 80 00 04 bne 4002a164 4002a158: 90 10 00 18 mov %i0, %o0 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 4002a15c: 81 c7 e0 08 ret <== NOT EXECUTED 4002a160: 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) 4002a164: 92 06 60 04 add %i1, 4, %o1 4002a168: 94 10 00 11 mov %l1, %o2 4002a16c: 96 10 00 10 mov %l0, %o3 4002a170: 7f ff ff b3 call 4002a03c 4002a174: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002a178: 80 a2 20 00 cmp %o0, 0 4002a17c: 02 bf ff f8 be 4002a15c 4002a180: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 4002a184: 7f ff ff 63 call 40029f10 4002a188: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002a18c: 80 a2 20 00 cmp %o0, 0 4002a190: 02 bf ff f3 be 4002a15c 4002a194: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 4002a198: 94 10 00 11 mov %l1, %o2 4002a19c: 96 10 00 10 mov %l0, %o3 4002a1a0: 92 07 bf f8 add %fp, -8, %o1 4002a1a4: 7f ff ff a6 call 4002a03c 4002a1a8: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002a1ac: 80 a2 20 00 cmp %o0, 0 4002a1b0: 02 bf ff eb be 4002a15c 4002a1b4: 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; 4002a1b8: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002a1bc: 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; 4002a1c0: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002a1c4: c6 0b 40 00 ldub [ %o5 ], %g3 4002a1c8: 88 10 20 01 mov 1, %g4 4002a1cc: 83 28 e0 18 sll %g3, 0x18, %g1 4002a1d0: 80 a0 60 00 cmp %g1, 0 4002a1d4: 02 80 00 0e be 4002a20c 4002a1d8: 86 10 20 17 mov 0x17, %g3 4002a1dc: 84 00 a0 01 inc %g2 4002a1e0: c6 08 80 00 ldub [ %g2 ], %g3 if(*cp == ',') 4002a1e4: 83 38 60 18 sra %g1, 0x18, %g1 memcount++; 4002a1e8: 82 18 60 2c xor %g1, 0x2c, %g1 4002a1ec: 80 a0 00 01 cmp %g0, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002a1f0: 83 28 e0 18 sll %g3, 0x18, %g1 if(*cp == ',') memcount++; 4002a1f4: 88 61 3f ff subx %g4, -1, %g4 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002a1f8: 80 a0 60 00 cmp %g1, 0 4002a1fc: 32 bf ff f9 bne,a 4002a1e0 4002a200: 84 00 a0 01 inc %g2 4002a204: 87 29 20 02 sll %g4, 2, %g3 4002a208: 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)) 4002a20c: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 4002a210: 80 a0 40 03 cmp %g1, %g3 4002a214: 0a bf ff d2 bcs 4002a15c 4002a218: 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++) { 4002a21c: 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); 4002a220: 84 00 a0 0f add %g2, 0xf, %g2 4002a224: 84 08 bf f0 and %g2, -16, %g2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4002a228: da 20 80 00 st %o5, [ %g2 ] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002a22c: 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); 4002a230: 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++) { 4002a234: c4 08 40 00 ldub [ %g1 ], %g2 4002a238: 88 10 20 04 mov 4, %g4 4002a23c: 85 28 a0 18 sll %g2, 0x18, %g2 4002a240: 80 a0 a0 00 cmp %g2, 0 4002a244: 12 80 00 09 bne 4002a268 4002a248: 82 00 60 01 inc %g1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4002a24c: 10 80 00 13 b 4002a298 <== NOT EXECUTED 4002a250: 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++) { 4002a254: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 4002a258: 85 28 a0 18 sll %g2, 0x18, %g2 4002a25c: 80 a0 a0 00 cmp %g2, 0 4002a260: 02 80 00 0c be 4002a290 4002a264: 82 00 60 01 inc %g1 if(*cp == ',') { 4002a268: 85 38 a0 18 sra %g2, 0x18, %g2 4002a26c: 80 a0 a0 2c cmp %g2, 0x2c 4002a270: 32 bf ff fa bne,a 4002a258 4002a274: c4 08 40 00 ldub [ %g1 ], %g2 *cp = '\0'; 4002a278: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 4002a27c: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 4002a280: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 4002a284: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4002a288: 10 bf ff f3 b 4002a254 <== NOT EXECUTED 4002a28c: 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++) { 4002a290: 89 28 e0 02 sll %g3, 2, %g4 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4002a294: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4002a298: c0 20 40 04 clr [ %g1 + %g4 ] return 1; 4002a29c: 81 c7 e0 08 ret 4002a2a0: 91 e8 20 01 restore %g0, 1, %o0 4002a2f0 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4002a2f0: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a2f4: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4002a2f8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002a2fc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a300: a2 07 a0 4c add %fp, 0x4c, %l1 4002a304: a0 07 a0 50 add %fp, 0x50, %l0 4002a308: 90 10 00 18 mov %i0, %o0 4002a30c: 92 10 00 19 mov %i1, %o1 4002a310: 94 10 00 11 mov %l1, %o2 4002a314: 7f ff ff 4a call 4002a03c 4002a318: 96 10 00 10 mov %l0, %o3 4002a31c: 80 a2 20 00 cmp %o0, 0 4002a320: 12 80 00 04 bne 4002a330 4002a324: 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; } 4002a328: 81 c7 e0 08 ret <== NOT EXECUTED 4002a32c: 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) 4002a330: 92 06 60 04 add %i1, 4, %o1 4002a334: 94 10 00 11 mov %l1, %o2 4002a338: 96 10 00 10 mov %l0, %o3 4002a33c: 7f ff ff 40 call 4002a03c 4002a340: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a344: 80 a2 20 00 cmp %o0, 0 4002a348: 02 bf ff f8 be 4002a328 4002a34c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 4002a350: 7f ff fe f0 call 40029f10 4002a354: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a358: 80 a2 20 00 cmp %o0, 0 4002a35c: 02 bf ff f3 be 4002a328 4002a360: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 4002a364: 7f ff fe eb call 40029f10 4002a368: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a36c: 80 a2 20 00 cmp %o0, 0 4002a370: 02 bf ff ee be 4002a328 4002a374: 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) 4002a378: 92 06 60 0c add %i1, 0xc, %o1 4002a37c: 94 10 00 11 mov %l1, %o2 4002a380: 96 10 00 10 mov %l0, %o3 4002a384: 7f ff ff 2e call 4002a03c 4002a388: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a38c: 80 a2 20 00 cmp %o0, 0 4002a390: 02 bf ff e6 be 4002a328 4002a394: 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) 4002a398: 92 06 60 10 add %i1, 0x10, %o1 4002a39c: 94 10 00 11 mov %l1, %o2 4002a3a0: 96 10 00 10 mov %l0, %o3 4002a3a4: 7f ff ff 26 call 4002a03c 4002a3a8: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a3ac: 80 a2 20 00 cmp %o0, 0 4002a3b0: 02 bf ff de be 4002a328 4002a3b4: 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) 4002a3b8: 92 06 60 14 add %i1, 0x14, %o1 4002a3bc: 94 10 00 11 mov %l1, %o2 4002a3c0: 96 10 00 10 mov %l0, %o3 4002a3c4: 7f ff ff 1e call 4002a03c 4002a3c8: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a3cc: 80 a2 20 00 cmp %o0, 0 4002a3d0: 02 bf ff d6 be 4002a328 4002a3d4: 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)) 4002a3d8: 94 10 00 11 mov %l1, %o2 4002a3dc: 96 10 00 10 mov %l0, %o3 4002a3e0: 92 06 60 18 add %i1, 0x18, %o1 4002a3e4: 7f ff ff 16 call 4002a03c 4002a3e8: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a3ec: 80 a2 20 00 cmp %o0, 0 4002a3f0: 02 bf ff ce be 4002a328 4002a3f4: 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; 4002a3f8: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 4002a3fc: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002a400: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 4002a404: 81 c7 e0 08 ret 4002a408: 91 e8 20 01 restore %g0, 1, %o0 40008ce0 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 40008ce0: 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 ); 40008ce4: 90 10 00 19 mov %i1, %o0 40008ce8: 40 00 18 62 call 4000ee70 <_POSIX_Absolute_timeout_to_ticks> 40008cec: 92 07 bf fc add %fp, -4, %o1 if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 40008cf0: 80 a2 20 03 cmp %o0, 3 40008cf4: 02 80 00 07 be 40008d10 40008cf8: d4 07 bf fc ld [ %fp + -4 ], %o2 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 40008cfc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008d00: 40 00 1b 3b call 4000f9ec <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 40008d04: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40008d08: 81 c7 e0 08 ret <== NOT EXECUTED 40008d0c: 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 ); 40008d10: 90 10 00 18 mov %i0, %o0 40008d14: 40 00 1b 36 call 4000f9ec <_POSIX_Semaphore_Wait_support> 40008d18: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40008d1c: 81 c7 e0 08 ret 40008d20: 91 e8 00 08 restore %g0, %o0, %o0 40029e9c : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40029e9c: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 40029ea0: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED 40029ea4: d0 30 60 32 sth %o0, [ %g1 + 0x32 ] <== NOT EXECUTED return 0; } 40029ea8: 81 c3 e0 08 retl <== NOT EXECUTED 40029eac: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002a544 : return NULL; return &grent; } void setgrent(void) { 4002a544: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 4002a548: 7f ff ff c4 call 4002a458 <== NOT EXECUTED 4002a54c: 21 10 01 ba sethi %hi(0x4006e800), %l0 <== NOT EXECUTED if (group_fp != NULL) 4002a550: d0 04 22 24 ld [ %l0 + 0x224 ], %o0 ! 4006ea24 <== NOT EXECUTED 4002a554: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a558: 22 80 00 05 be,a 4002a56c <== NOT EXECUTED 4002a55c: 11 10 01 81 sethi %hi(0x40060400), %o0 <== NOT EXECUTED fclose(group_fp); 4002a560: 40 00 6b 58 call 400452c0 <== NOT EXECUTED 4002a564: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 4002a568: 11 10 01 81 sethi %hi(0x40060400), %o0 <== NOT EXECUTED 4002a56c: 13 10 01 a9 sethi %hi(0x4006a400), %o1 <== NOT EXECUTED 4002a570: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED 4002a574: 40 00 6d a2 call 40045bfc <== NOT EXECUTED 4002a578: 92 12 62 a8 or %o1, 0x2a8, %o1 <== NOT EXECUTED 4002a57c: d0 24 22 24 st %o0, [ %l0 + 0x224 ] <== NOT EXECUTED } 4002a580: 81 c7 e0 08 ret <== NOT EXECUTED 4002a584: 81 e8 00 00 restore <== NOT EXECUTED 4002a744 : return NULL; return &pwent; } void setpwent(void) { 4002a744: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 4002a748: 7f ff ff 44 call 4002a458 <== NOT EXECUTED 4002a74c: 21 10 01 ba sethi %hi(0x4006e800), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 4002a750: d0 04 21 3c ld [ %l0 + 0x13c ], %o0 ! 4006e93c <== NOT EXECUTED 4002a754: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a758: 22 80 00 05 be,a 4002a76c <== NOT EXECUTED 4002a75c: 11 10 01 80 sethi %hi(0x40060000), %o0 <== NOT EXECUTED fclose(passwd_fp); 4002a760: 40 00 6a d8 call 400452c0 <== NOT EXECUTED 4002a764: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4002a768: 11 10 01 80 sethi %hi(0x40060000), %o0 <== NOT EXECUTED 4002a76c: 13 10 01 a9 sethi %hi(0x4006a400), %o1 <== NOT EXECUTED 4002a770: 90 12 23 c0 or %o0, 0x3c0, %o0 <== NOT EXECUTED 4002a774: 40 00 6d 22 call 40045bfc <== NOT EXECUTED 4002a778: 92 12 62 a8 or %o1, 0x2a8, %o1 <== NOT EXECUTED 4002a77c: d0 24 21 3c st %o0, [ %l0 + 0x13c ] <== NOT EXECUTED } 4002a780: 81 c7 e0 08 ret <== NOT EXECUTED 4002a784: 81 e8 00 00 restore <== NOT EXECUTED 40007320 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40007320: 03 10 01 ab sethi %hi(0x4006ac00), %g1 <== NOT EXECUTED 40007324: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 <== NOT EXECUTED 40007328: d0 30 60 30 sth %o0, [ %g1 + 0x30 ] <== NOT EXECUTED return 0; } 4000732c: 81 c3 e0 08 retl <== NOT EXECUTED 40007330: 90 10 20 00 clr %o0 <== NOT EXECUTED 400083f8 : #include int sigsuspend( const sigset_t *sigmask ) { 400083f8: 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 ); 400083fc: 90 10 20 01 mov 1, %o0 40008400: 92 10 00 18 mov %i0, %o1 40008404: a0 07 bf fc add %fp, -4, %l0 40008408: 7f ff ff f1 call 400083cc 4000840c: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 40008410: a2 07 bf f8 add %fp, -8, %l1 40008414: 7f ff ff b7 call 400082f0 40008418: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 4000841c: 90 10 00 11 mov %l1, %o0 40008420: 92 10 20 00 clr %o1 40008424: 40 00 00 2b call 400084d0 40008428: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 4000842c: 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 ); 40008430: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 40008434: 94 10 20 00 clr %o2 40008438: 7f ff ff e5 call 400083cc 4000843c: 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 ) 40008440: 80 a4 7f ff cmp %l1, -1 40008444: 12 80 00 05 bne 40008458 40008448: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 4000844c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40008450: 81 c7 e0 08 ret <== NOT EXECUTED 40008454: 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 ); 40008458: 40 00 28 86 call 40012670 <__errno> 4000845c: b0 10 3f ff mov -1, %i0 40008460: 82 10 20 04 mov 4, %g1 40008464: c2 22 00 00 st %g1, [ %o0 ] 40008468: 81 c7 e0 08 ret 4000846c: 81 e8 00 00 restore 40003de0 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40003de0: 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)) { 40003de4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003de8: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40003dec: 32 80 00 05 bne,a 40003e00 <== NOT EXECUTED 40003df0: 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); 40003df4: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 40003df8: 7f ff ff 7a call 40003be0 <== NOT EXECUTED 40003dfc: 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); 40003e00: 94 10 20 00 clr %o2 <== NOT EXECUTED 40003e04: 40 00 07 11 call 40005a48 <== NOT EXECUTED 40003e08: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40003e0c: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40003e10: 7f ff ff 74 call 40003be0 <== NOT EXECUTED 40003e14: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003e18: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40003e1c: 40 00 07 52 call 40005b64 <== NOT EXECUTED 40003e20: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40003e24: 81 c7 e0 08 ret <== NOT EXECUTED 40003e28: 81 e8 00 00 restore <== NOT EXECUTED 40008b48 : int _STAT_NAME( const char *path, struct stat *buf ) { 40008b48: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40008b4c: 80 a6 60 00 cmp %i1, 0 40008b50: 02 80 00 34 be 40008c20 40008b54: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 40008b58: 40 01 0c c1 call 4004be5c 40008b5c: 90 10 00 18 mov %i0, %o0 40008b60: a0 07 bf ec add %fp, -20, %l0 40008b64: 92 10 00 08 mov %o0, %o1 40008b68: 94 10 20 00 clr %o2 40008b6c: 90 10 00 18 mov %i0, %o0 40008b70: 96 10 00 10 mov %l0, %o3 40008b74: 98 10 20 01 mov 1, %o4 40008b78: 7f ff f9 5d call 400070ec 40008b7c: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 40008b80: 80 a2 20 00 cmp %o0, 0 40008b84: 12 80 00 25 bne 40008c18 40008b88: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 40008b8c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40008b90: 80 a0 a0 00 cmp %g2, 0 40008b94: 02 80 00 29 be 40008c38 40008b98: 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) ); 40008b9c: c0 26 40 00 clr [ %i1 ] 40008ba0: c0 26 60 04 clr [ %i1 + 4 ] 40008ba4: c0 26 60 08 clr [ %i1 + 8 ] 40008ba8: c0 26 60 0c clr [ %i1 + 0xc ] 40008bac: c0 26 60 10 clr [ %i1 + 0x10 ] 40008bb0: c0 26 60 14 clr [ %i1 + 0x14 ] 40008bb4: c0 26 60 18 clr [ %i1 + 0x18 ] 40008bb8: c0 26 60 1c clr [ %i1 + 0x1c ] 40008bbc: c0 26 60 20 clr [ %i1 + 0x20 ] 40008bc0: c0 26 60 24 clr [ %i1 + 0x24 ] 40008bc4: c0 26 60 28 clr [ %i1 + 0x28 ] 40008bc8: c0 26 60 2c clr [ %i1 + 0x2c ] 40008bcc: c0 26 60 30 clr [ %i1 + 0x30 ] 40008bd0: c0 26 60 34 clr [ %i1 + 0x34 ] 40008bd4: c0 26 60 38 clr [ %i1 + 0x38 ] 40008bd8: c0 26 60 3c clr [ %i1 + 0x3c ] 40008bdc: c0 26 60 40 clr [ %i1 + 0x40 ] 40008be0: c0 26 60 44 clr [ %i1 + 0x44 ] status = (*loc.handlers->fstat_h)( &loc, buf ); 40008be4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40008be8: 9f c0 40 00 call %g1 40008bec: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40008bf0: c2 07 bf f8 ld [ %fp + -8 ], %g1 40008bf4: 80 a0 60 00 cmp %g1, 0 40008bf8: 02 80 00 08 be 40008c18 40008bfc: b0 10 00 08 mov %o0, %i0 40008c00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40008c04: 80 a0 60 00 cmp %g1, 0 40008c08: 02 80 00 1a be 40008c70 40008c0c: 01 00 00 00 nop 40008c10: 9f c0 40 00 call %g1 40008c14: 90 10 00 10 mov %l0, %o0 return status; } 40008c18: 81 c7 e0 08 ret 40008c1c: 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 ); 40008c20: 40 00 f1 50 call 40045160 <__errno> 40008c24: b0 10 3f ff mov -1, %i0 40008c28: 82 10 20 0e mov 0xe, %g1 40008c2c: c2 22 00 00 st %g1, [ %o0 ] 40008c30: 81 c7 e0 08 ret 40008c34: 81 e8 00 00 restore 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 40008c38: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40008c3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008c40: 02 80 00 08 be 40008c60 <== NOT EXECUTED 40008c44: 01 00 00 00 nop <== NOT EXECUTED 40008c48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008c4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008c50: 02 80 00 04 be 40008c60 <== NOT EXECUTED 40008c54: 01 00 00 00 nop <== NOT EXECUTED 40008c58: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008c5c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40008c60: 40 00 f1 40 call 40045160 <__errno> <== NOT EXECUTED 40008c64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008c68: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40008c6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008c70: 81 c7 e0 08 ret <== NOT EXECUTED 40008c74: 81 e8 00 00 restore <== NOT EXECUTED 4002b5fc : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 4002b5fc: 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 ) ) 4002b600: 40 00 82 17 call 4004be5c <== NOT EXECUTED 4002b604: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002b608: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4002b60c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002b610: 94 10 20 00 clr %o2 <== NOT EXECUTED 4002b614: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002b618: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4002b61c: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4002b620: 7f ff 6e b3 call 400070ec <== NOT EXECUTED 4002b624: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b628: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b62c: 12 80 00 23 bne 4002b6b8 <== NOT EXECUTED 4002b630: 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; 4002b634: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002b638: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 4002b63c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b640: 02 80 00 20 be 4002b6c0 <== NOT EXECUTED 4002b644: 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)); 4002b648: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 4002b64c: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 4002b650: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4002b654: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 4002b658: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 4002b65c: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 4002b660: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4002b664: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 4002b668: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4002b66c: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 4002b670: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4002b674: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 4002b678: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 4002b67c: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 4002b680: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002b684: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 4002b688: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b68c: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002b690: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002b694: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b698: 02 80 00 08 be 4002b6b8 <== NOT EXECUTED 4002b69c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002b6a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002b6a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b6a8: 02 80 00 0a be 4002b6d0 <== NOT EXECUTED 4002b6ac: 01 00 00 00 nop <== NOT EXECUTED 4002b6b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b6b4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 4002b6b8: 81 c7 e0 08 ret <== NOT EXECUTED 4002b6bc: 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 ); 4002b6c0: 40 00 66 a8 call 40045160 <__errno> <== NOT EXECUTED 4002b6c4: 01 00 00 00 nop <== NOT EXECUTED 4002b6c8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4002b6cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b6d0: 81 c7 e0 08 ret <== NOT EXECUTED 4002b6d4: 81 e8 00 00 restore <== NOT EXECUTED 4002b6d8 : int symlink( const char *actualpath, const char *sympath ) { 4002b6d8: 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 ); 4002b6dc: c2 4e 40 00 ldsb [ %i1 ], %g1 4002b6e0: 80 a0 60 5c cmp %g1, 0x5c 4002b6e4: 02 80 00 07 be 4002b700 4002b6e8: a2 10 00 18 mov %i0, %l1 4002b6ec: 80 a0 60 2f cmp %g1, 0x2f 4002b6f0: 02 80 00 04 be 4002b700 4002b6f4: 80 a0 60 00 cmp %g1, 0 4002b6f8: 12 80 00 2f bne 4002b7b4 4002b6fc: 03 10 01 ab sethi %hi(0x4006ac00), %g1 4002b700: 03 10 01 ab sethi %hi(0x4006ac00), %g1 4002b704: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 4002b708: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4002b70c: c4 27 bf e8 st %g2, [ %fp + -24 ] 4002b710: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4002b714: c4 27 bf ec st %g2, [ %fp + -20 ] 4002b718: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4002b71c: c4 27 bf f0 st %g2, [ %fp + -16 ] 4002b720: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4002b724: c4 27 bf f4 st %g2, [ %fp + -12 ] 4002b728: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002b72c: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !loc.ops->evalformake_h ) { 4002b730: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002b734: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002b738: 80 a0 60 00 cmp %g1, 0 4002b73c: 02 80 00 2e be 4002b7f4 4002b740: 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 ); 4002b744: 90 06 40 08 add %i1, %o0, %o0 4002b748: a0 07 bf e8 add %fp, -24, %l0 4002b74c: 94 07 bf fc add %fp, -4, %o2 4002b750: 92 10 00 10 mov %l0, %o1 4002b754: 9f c0 40 00 call %g1 4002b758: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 4002b75c: 80 a2 20 00 cmp %o0, 0 4002b760: 12 80 00 13 bne 4002b7ac 4002b764: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 4002b768: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 4002b76c: 80 a0 60 00 cmp %g1, 0 4002b770: 02 80 00 27 be 4002b80c 4002b774: 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); 4002b778: 92 10 00 11 mov %l1, %o1 4002b77c: 9f c0 40 00 call %g1 4002b780: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002b784: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002b788: 80 a0 60 00 cmp %g1, 0 4002b78c: 02 80 00 08 be 4002b7ac 4002b790: b0 10 00 08 mov %o0, %i0 4002b794: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002b798: 80 a0 60 00 cmp %g1, 0 4002b79c: 02 80 00 1a be 4002b804 4002b7a0: 01 00 00 00 nop 4002b7a4: 9f c0 40 00 call %g1 4002b7a8: 90 10 00 10 mov %l0, %o0 return result; } 4002b7ac: 81 c7 e0 08 ret 4002b7b0: 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 ); 4002b7b4: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 4002b7b8: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002b7bc: c4 27 bf e8 st %g2, [ %fp + -24 ] 4002b7c0: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002b7c4: c4 27 bf ec st %g2, [ %fp + -20 ] 4002b7c8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4002b7cc: c4 27 bf f0 st %g2, [ %fp + -16 ] 4002b7d0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4002b7d4: c4 27 bf f4 st %g2, [ %fp + -12 ] 4002b7d8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4002b7dc: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !loc.ops->evalformake_h ) { 4002b7e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002b7e4: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002b7e8: 80 a0 60 00 cmp %g1, 0 4002b7ec: 12 bf ff d6 bne 4002b744 4002b7f0: 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 ); 4002b7f4: 40 00 66 5b call 40045160 <__errno> <== NOT EXECUTED 4002b7f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b7fc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002b800: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b804: 81 c7 e0 08 ret <== NOT EXECUTED 4002b808: 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 ); 4002b80c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002b810: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b814: 02 bf ff f8 be 4002b7f4 <== NOT EXECUTED 4002b818: 01 00 00 00 nop <== NOT EXECUTED 4002b81c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b820: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002b824: 30 bf ff f4 b,a 4002b7f4 <== NOT EXECUTED 4001451c : int tcsetattr( int fd, int opt, struct termios *tp ) { 4001451c: 9d e3 bf a0 save %sp, -96, %sp switch (opt) { 40014520: 80 a6 60 00 cmp %i1, 0 40014524: 02 80 00 10 be 40014564 40014528: 80 a6 60 01 cmp %i1, 1 4001452c: 02 80 00 08 be 4001454c <== NOT EXECUTED 40014530: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40014534: 40 00 16 14 call 40019d84 <__errno> <== NOT EXECUTED 40014538: 01 00 00 00 nop <== NOT EXECUTED 4001453c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40014540: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 40014544: 81 c7 e0 08 ret <== NOT EXECUTED 40014548: 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) 4001454c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40014550: 40 00 0f 64 call 400182e0 <== NOT EXECUTED 40014554: 94 10 20 00 clr %o2 <== NOT EXECUTED 40014558: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001455c: 06 bf ff fa bl 40014544 <== NOT EXECUTED 40014560: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40014564: 40 00 0f 5f call 400182e0 40014568: 93 e8 20 02 restore %g0, 2, %o1 4001456c: 01 00 00 00 nop 4000ec28 : #include int unlink( const char *path ) { 4000ec28: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4000ec2c: 7f ff cd 0e call 40002064 4000ec30: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 4000ec34: a0 92 20 00 orcc %o0, 0, %l0 4000ec38: 32 80 00 91 bne,a 4000ee7c 4000ec3c: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4000ec40: c2 4e 00 00 ldsb [ %i0 ], %g1 4000ec44: 80 a0 60 5c cmp %g1, 0x5c 4000ec48: 02 80 00 13 be 4000ec94 4000ec4c: 80 a0 60 2f cmp %g1, 0x2f 4000ec50: 02 80 00 11 be 4000ec94 4000ec54: 80 a0 60 00 cmp %g1, 0 4000ec58: 02 80 00 10 be 4000ec98 <== NOT EXECUTED 4000ec5c: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 4000ec60: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 4001d058 <== NOT EXECUTED 4000ec64: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000ec68: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4000ec6c: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 4000ec70: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4000ec74: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 4000ec78: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4000ec7c: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED 4000ec80: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4000ec84: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED 4000ec88: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4000ec8c: 10 80 00 0f b 4000ecc8 <== NOT EXECUTED 4000ec90: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED 4000ec94: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000ec98: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 4001d058 4000ec9c: a2 10 20 00 clr %l1 4000eca0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000eca4: c4 27 bf ec st %g2, [ %fp + -20 ] 4000eca8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000ecac: c4 27 bf f0 st %g2, [ %fp + -16 ] 4000ecb0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4000ecb4: c4 27 bf f4 st %g2, [ %fp + -12 ] 4000ecb8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4000ecbc: c4 27 bf f8 st %g2, [ %fp + -8 ] 4000ecc0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000ecc4: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ecc8: c2 07 bf ec ld [ %fp + -20 ], %g1 name = path + parentpathlen; 4000eccc: b0 06 00 10 add %i0, %l0, %i0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ecd0: c2 27 bf d8 st %g1, [ %fp + -40 ] 4000ecd4: c2 07 bf f0 ld [ %fp + -16 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000ecd8: 90 10 00 18 mov %i0, %o0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ecdc: c2 27 bf dc st %g1, [ %fp + -36 ] 4000ece0: 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 ), 4000ece4: a0 07 bf d8 add %fp, -40, %l0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ece8: c2 27 bf e0 st %g1, [ %fp + -32 ] 4000ecec: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000ecf0: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000ecf4: c2 07 bf fc ld [ %fp + -4 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000ecf8: 40 00 06 09 call 4001051c 4000ecfc: c2 27 bf e8 st %g1, [ %fp + -24 ] 4000ed00: 92 10 00 08 mov %o0, %o1 4000ed04: 7f ff cc b9 call 40001fe8 4000ed08: 90 10 00 18 mov %i0, %o0 4000ed0c: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000ed10: 40 00 06 03 call 4001051c 4000ed14: 90 10 00 18 mov %i0, %o0 4000ed18: 94 10 20 00 clr %o2 4000ed1c: 92 10 00 08 mov %o0, %o1 4000ed20: 96 10 00 10 mov %l0, %o3 4000ed24: 90 10 00 18 mov %i0, %o0 4000ed28: 7f ff cc ef call 400020e4 4000ed2c: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000ed30: 80 a2 20 00 cmp %o0, 0 4000ed34: 12 80 00 2a bne 4000eddc 4000ed38: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4000ed3c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000ed40: 80 a0 60 00 cmp %g1, 0 4000ed44: 22 80 00 37 be,a 4000ee20 4000ed48: 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 ) { 4000ed4c: 9f c0 40 00 call %g1 4000ed50: 90 10 00 10 mov %l0, %o0 4000ed54: 80 a2 20 01 cmp %o0, 1 4000ed58: 02 80 00 53 be 4000eea4 4000ed5c: 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 ) { 4000ed60: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000ed64: 80 a0 60 00 cmp %g1, 0 4000ed68: 02 80 00 2d be 4000ee1c 4000ed6c: 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 ); 4000ed70: 92 10 00 10 mov %l0, %o1 4000ed74: 9f c0 40 00 call %g1 4000ed78: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 4000ed7c: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000ed80: 80 a0 60 00 cmp %g1, 0 4000ed84: 02 80 00 08 be 4000eda4 4000ed88: b0 10 00 08 mov %o0, %i0 4000ed8c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000ed90: 80 a0 60 00 cmp %g1, 0 4000ed94: 02 80 00 05 be 4000eda8 4000ed98: 80 8c 60 ff btst 0xff, %l1 4000ed9c: 9f c0 40 00 call %g1 4000eda0: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000eda4: 80 8c 60 ff btst 0xff, %l1 4000eda8: 02 80 00 0b be 4000edd4 4000edac: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000edb0: 80 a0 60 00 cmp %g1, 0 4000edb4: 02 80 00 56 be 4000ef0c 4000edb8: 01 00 00 00 nop 4000edbc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000edc0: 80 a0 60 00 cmp %g1, 0 4000edc4: 02 80 00 52 be 4000ef0c 4000edc8: 01 00 00 00 nop 4000edcc: 9f c0 40 00 call %g1 4000edd0: 90 10 00 12 mov %l2, %o0 4000edd4: 81 c7 e0 08 ret 4000edd8: 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 ) 4000eddc: 80 8c 60 ff btst 0xff, %l1 4000ede0: 12 80 00 04 bne 4000edf0 4000ede4: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4000ede8: 81 c7 e0 08 ret <== NOT EXECUTED 4000edec: 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 ); 4000edf0: 80 a0 60 00 cmp %g1, 0 4000edf4: 02 bf ff f8 be 4000edd4 4000edf8: b0 10 3f ff mov -1, %i0 4000edfc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000ee00: 80 a0 60 00 cmp %g1, 0 4000ee04: 02 bf ff f4 be 4000edd4 4000ee08: 90 07 bf ec add %fp, -20, %o0 4000ee0c: 9f c0 40 00 call %g1 4000ee10: 01 00 00 00 nop 4000ee14: 81 c7 e0 08 ret 4000ee18: 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 ); 4000ee1c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000ee20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ee24: 02 80 00 05 be 4000ee38 <== NOT EXECUTED 4000ee28: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000ee2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ee30: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 4000ee34: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000ee38: 02 80 00 0b be 4000ee64 <== NOT EXECUTED 4000ee3c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4000ee40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ee44: 02 80 00 08 be 4000ee64 <== NOT EXECUTED 4000ee48: 01 00 00 00 nop <== NOT EXECUTED 4000ee4c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000ee50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ee54: 02 80 00 04 be 4000ee64 <== NOT EXECUTED 4000ee58: 01 00 00 00 nop <== NOT EXECUTED 4000ee5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ee60: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000ee64: 40 00 01 f7 call 4000f640 <__errno> <== NOT EXECUTED 4000ee68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ee6c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000ee70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ee74: 81 c7 e0 08 ret <== NOT EXECUTED 4000ee78: 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, 4000ee7c: 92 10 00 10 mov %l0, %o1 4000ee80: 94 10 20 02 mov 2, %o2 4000ee84: 96 07 bf ec add %fp, -20, %o3 4000ee88: 7f ff cc d8 call 400021e8 4000ee8c: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4000ee90: 80 a2 20 00 cmp %o0, 0 4000ee94: 12 bf ff d5 bne 4000ede8 4000ee98: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ee9c: 10 bf ff 8c b 4000eccc 4000eea0: 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 ); 4000eea4: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000eea8: 80 a0 60 00 cmp %g1, 0 4000eeac: 02 80 00 09 be 4000eed0 4000eeb0: 80 8c 60 ff btst 0xff, %l1 4000eeb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000eeb8: 80 a0 60 00 cmp %g1, 0 4000eebc: 02 80 00 05 be 4000eed0 4000eec0: 80 8c 60 ff btst 0xff, %l1 4000eec4: 9f c0 40 00 call %g1 4000eec8: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000eecc: 80 8c 60 ff btst 0xff, %l1 4000eed0: 02 80 00 0b be 4000eefc 4000eed4: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000eed8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000eedc: 02 80 00 08 be 4000eefc <== NOT EXECUTED 4000eee0: 01 00 00 00 nop <== NOT EXECUTED 4000eee4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000eee8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000eeec: 02 80 00 04 be 4000eefc <== NOT EXECUTED 4000eef0: 01 00 00 00 nop <== NOT EXECUTED 4000eef4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000eef8: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4000eefc: 40 00 01 d1 call 4000f640 <__errno> 4000ef00: b0 10 3f ff mov -1, %i0 4000ef04: 82 10 20 15 mov 0x15, %g1 4000ef08: c2 22 00 00 st %g1, [ %o0 ] 4000ef0c: 81 c7 e0 08 ret 4000ef10: 81 e8 00 00 restore 4000af00 : */ int unmount( const char *path ) { 4000af00: 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 ) ) 4000af04: 40 01 03 d6 call 4004be5c 4000af08: 90 10 00 18 mov %i0, %o0 4000af0c: a0 07 bf ec add %fp, -20, %l0 4000af10: 92 10 00 08 mov %o0, %o1 4000af14: 94 10 20 00 clr %o2 4000af18: 90 10 00 18 mov %i0, %o0 4000af1c: 96 10 00 10 mov %l0, %o3 4000af20: 7f ff f0 73 call 400070ec 4000af24: 98 10 20 01 mov 1, %o4 4000af28: 80 a2 20 00 cmp %o0, 0 4000af2c: 12 80 00 3e bne 4000b024 4000af30: 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; 4000af34: c2 07 bf ec ld [ %fp + -20 ], %g1 4000af38: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 4000af3c: 80 a0 80 01 cmp %g2, %g1 4000af40: 12 80 00 41 bne 4000b044 4000af44: 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 ); 4000af48: 80 a0 60 00 cmp %g1, 0 4000af4c: 22 80 00 09 be,a 4000af70 4000af50: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000af54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000af58: 80 a0 60 00 cmp %g1, 0 4000af5c: 22 80 00 05 be,a 4000af70 4000af60: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000af64: 9f c0 40 00 call %g1 4000af68: 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; 4000af6c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000af70: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000af74: 80 a0 60 00 cmp %g1, 0 4000af78: 02 80 00 61 be 4000b0fc 4000af7c: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 4000af80: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000af84: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000af88: 80 a0 60 00 cmp %g1, 0 4000af8c: 02 80 00 5c be 4000b0fc 4000af90: 03 10 01 ab sethi %hi(0x4006ac00), %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 ) 4000af94: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 4006aeb8 4000af98: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000af9c: 80 a0 40 11 cmp %g1, %l1 4000afa0: 02 80 00 23 be 4000b02c 4000afa4: 07 10 01 bb sethi %hi(0x4006ec00), %g3 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000afa8: c2 00 e0 70 ld [ %g3 + 0x70 ], %g1 ! 4006ec70 4000afac: 86 10 e0 70 or %g3, 0x70, %g3 4000afb0: 86 00 e0 04 add %g3, 4, %g3 4000afb4: 80 a0 40 03 cmp %g1, %g3 4000afb8: 02 80 00 0f be 4000aff4 4000afbc: 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 ) { 4000afc0: c8 04 60 2c ld [ %l1 + 0x2c ], %g4 4000afc4: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000afc8: 80 a0 80 04 cmp %g2, %g4 4000afcc: 32 80 00 07 bne,a 4000afe8 4000afd0: c2 00 40 00 ld [ %g1 ], %g1 4000afd4: 30 80 00 16 b,a 4000b02c <== NOT EXECUTED 4000afd8: 80 a1 00 02 cmp %g4, %g2 4000afdc: 02 80 00 14 be 4000b02c 4000afe0: 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 ) { 4000afe4: 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; 4000afe8: 80 a0 40 03 cmp %g1, %g3 4000afec: 32 bf ff fb bne,a 4000afd8 4000aff0: 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 ) 4000aff4: 7f ff f1 3e call 400074ec 4000aff8: 90 10 00 11 mov %l1, %o0 4000affc: 80 a2 20 01 cmp %o0, 1 4000b000: 02 80 00 0b be 4000b02c 4000b004: 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 ) 4000b008: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b00c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b010: 9f c0 40 00 call %g1 4000b014: 90 10 00 11 mov %l1, %o0 4000b018: 80 a2 20 00 cmp %o0, 0 4000b01c: 22 80 00 19 be,a 4000b080 4000b020: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4000b024: 81 c7 e0 08 ret 4000b028: 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 ); 4000b02c: 40 00 e8 4d call 40045160 <__errno> 4000b030: b0 10 3f ff mov -1, %i0 4000b034: 82 10 20 10 mov 0x10, %g1 4000b038: c2 22 00 00 st %g1, [ %o0 ] 4000b03c: 81 c7 e0 08 ret 4000b040: 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 ); 4000b044: 80 a0 60 00 cmp %g1, 0 4000b048: 02 80 00 08 be 4000b068 4000b04c: 01 00 00 00 nop 4000b050: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b054: 80 a0 60 00 cmp %g1, 0 4000b058: 02 80 00 04 be 4000b068 4000b05c: 01 00 00 00 nop 4000b060: 9f c0 40 00 call %g1 4000b064: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4000b068: 40 00 e8 3e call 40045160 <__errno> 4000b06c: b0 10 3f ff mov -1, %i0 4000b070: 82 10 20 0d mov 0xd, %g1 4000b074: c2 22 00 00 st %g1, [ %o0 ] 4000b078: 81 c7 e0 08 ret 4000b07c: 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){ 4000b080: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000b084: 9f c0 40 00 call %g1 4000b088: 90 10 00 11 mov %l1, %o0 4000b08c: 80 a2 20 00 cmp %o0, 0 4000b090: 32 80 00 13 bne,a 4000b0dc 4000b094: 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 ); 4000b098: 40 00 06 40 call 4000c998 <_Chain_Extract> 4000b09c: 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 ); 4000b0a0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b0a4: 80 a0 60 00 cmp %g1, 0 4000b0a8: 02 80 00 09 be 4000b0cc 4000b0ac: 90 10 00 11 mov %l1, %o0 4000b0b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b0b4: 80 a0 60 00 cmp %g1, 0 4000b0b8: 02 80 00 05 be 4000b0cc 4000b0bc: 01 00 00 00 nop 4000b0c0: 9f c0 40 00 call %g1 4000b0c4: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 4000b0c8: 90 10 00 11 mov %l1, %o0 4000b0cc: 7f ff f0 43 call 400071d8 4000b0d0: b0 10 20 00 clr %i0 return 0; 4000b0d4: 81 c7 e0 08 ret 4000b0d8: 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 ) 4000b0dc: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 4000b0e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b0e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b0e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b0ec: 02 bf ff ce be 4000b024 <== NOT EXECUTED 4000b0f0: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4000b0f4: 40 00 05 2e call 4000c5ac <== NOT EXECUTED 4000b0f8: 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 ); 4000b0fc: 40 00 e8 19 call 40045160 <__errno> <== NOT EXECUTED 4000b100: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b104: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000b108: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b10c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b110: 81 e8 00 00 restore <== NOT EXECUTED 4002b8c4 : int utime( const char *path, const struct utimbuf *times ) { 4002b8c4: 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 ) ) 4002b8c8: 40 00 81 65 call 4004be5c 4002b8cc: 90 10 00 18 mov %i0, %o0 4002b8d0: a0 07 bf ec add %fp, -20, %l0 4002b8d4: 92 10 00 08 mov %o0, %o1 4002b8d8: 94 10 20 00 clr %o2 4002b8dc: 90 10 00 18 mov %i0, %o0 4002b8e0: 96 10 00 10 mov %l0, %o3 4002b8e4: 98 10 20 01 mov 1, %o4 4002b8e8: 7f ff 6e 01 call 400070ec 4002b8ec: b0 10 3f ff mov -1, %i0 4002b8f0: 80 a2 20 00 cmp %o0, 0 4002b8f4: 12 80 00 14 bne 4002b944 4002b8f8: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 4002b8fc: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 4002b900: 80 a0 60 00 cmp %g1, 0 4002b904: 22 80 00 12 be,a 4002b94c 4002b908: 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 ); 4002b90c: d4 06 60 04 ld [ %i1 + 4 ], %o2 4002b910: d2 06 40 00 ld [ %i1 ], %o1 4002b914: 9f c0 40 00 call %g1 4002b918: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 4002b91c: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002b920: 80 a0 60 00 cmp %g1, 0 4002b924: 02 80 00 08 be 4002b944 4002b928: b0 10 00 08 mov %o0, %i0 4002b92c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002b930: 80 a0 60 00 cmp %g1, 0 4002b934: 02 80 00 0f be 4002b970 4002b938: 01 00 00 00 nop 4002b93c: 9f c0 40 00 call %g1 4002b940: 90 10 00 10 mov %l0, %o0 return result; } 4002b944: 81 c7 e0 08 ret 4002b948: 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 ); 4002b94c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b950: 02 80 00 04 be 4002b960 <== NOT EXECUTED 4002b954: 01 00 00 00 nop <== NOT EXECUTED 4002b958: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b95c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002b960: 40 00 66 00 call 40045160 <__errno> <== NOT EXECUTED 4002b964: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b968: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002b96c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b970: 81 c7 e0 08 ret <== NOT EXECUTED 4002b974: 81 e8 00 00 restore <== NOT EXECUTED 40004edc : */ void vprintk( const char *fmt, va_list ap ) { 40004edc: 9d e3 bf 88 save %sp, -120, %sp for (; *fmt != '\0'; fmt++) { 40004ee0: c2 0e 00 00 ldub [ %i0 ], %g1 40004ee4: 83 28 60 18 sll %g1, 0x18, %g1 40004ee8: 80 a0 60 00 cmp %g1, 0 40004eec: 02 80 00 53 be 40005038 40004ef0: 29 10 00 74 sethi %hi(0x4001d000), %l4 40004ef4: 3b 10 00 70 sethi %hi(0x4001c000), %i5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40004ef8: 37 10 00 6f sethi %hi(0x4001bc00), %i3 bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 40004efc: a8 15 20 3c or %l4, 0x3c, %l4 40004f00: ba 17 60 a0 or %i5, 0xa0, %i5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40004f04: b6 16 e3 28 or %i3, 0x328, %i3 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 40004f08: ac 07 bf e8 add %fp, -24, %l6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 40004f0c: 91 38 60 18 sra %g1, 0x18, %o0 40004f10: 80 a2 20 25 cmp %o0, 0x25 40004f14: 32 80 00 41 bne,a 40005018 40004f18: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(*fmt); continue; } fmt++; 40004f1c: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40004f20: c2 0e 00 00 ldub [ %i0 ], %g1 40004f24: 85 28 60 18 sll %g1, 0x18, %g2 40004f28: 87 38 a0 18 sra %g2, 0x18, %g3 40004f2c: 80 a0 e0 30 cmp %g3, 0x30 40004f30: 02 80 00 8d be 40005164 40004f34: b8 10 20 20 mov 0x20, %i4 lead = '0'; fmt++; } if (*fmt == '-' ) { 40004f38: 87 38 a0 18 sra %g2, 0x18, %g3 40004f3c: 80 a0 e0 2d cmp %g3, 0x2d 40004f40: 02 80 00 84 be 40005150 40004f44: aa 10 20 00 clr %l5 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40004f48: 82 00 7f d0 add %g1, -48, %g1 40004f4c: 82 08 60 ff and %g1, 0xff, %g1 40004f50: 80 a0 60 09 cmp %g1, 9 40004f54: 18 80 00 0f bgu 40004f90 40004f58: a0 10 20 00 clr %l0 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; 40004f5c: b0 06 20 01 inc %i0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40004f60: c2 0e 00 00 ldub [ %i0 ], %g1 width *= 10; width += ((unsigned) *fmt - '0'); 40004f64: 87 38 a0 18 sra %g2, 0x18, %g3 40004f68: 89 2c 20 03 sll %l0, 3, %g4 40004f6c: 85 28 60 18 sll %g1, 0x18, %g2 40004f70: a1 2c 20 01 sll %l0, 1, %l0 40004f74: a0 04 00 04 add %l0, %g4, %l0 40004f78: a0 04 00 03 add %l0, %g3, %l0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40004f7c: 86 00 7f d0 add %g1, -48, %g3 40004f80: 86 08 e0 ff and %g3, 0xff, %g3 40004f84: 80 a0 e0 09 cmp %g3, 9 40004f88: 08 bf ff f5 bleu 40004f5c 40004f8c: a0 04 3f d0 add %l0, -48, %l0 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40004f90: 83 38 a0 18 sra %g2, 0x18, %g1 40004f94: 80 a0 60 6c cmp %g1, 0x6c 40004f98: 02 80 00 78 be 40005178 40004f9c: 80 a0 60 63 cmp %g1, 0x63 lflag = true; c = *++fmt; } if ( c == 'c' ) { 40004fa0: 22 80 00 7e be,a 40005198 40004fa4: 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' ) { 40004fa8: 80 a0 60 73 cmp %g1, 0x73 40004fac: 02 80 00 86 be 400051c4 40004fb0: 80 a0 60 4f cmp %g1, 0x4f continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 40004fb4: 02 80 00 64 be 40005144 40004fb8: 80 a0 60 6f cmp %g1, 0x6f 40004fbc: 02 80 00 62 be 40005144 40004fc0: 80 a0 60 49 cmp %g1, 0x49 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 40004fc4: 02 80 00 1f be 40005040 40004fc8: 80 a0 60 69 cmp %g1, 0x69 40004fcc: 02 80 00 1d be 40005040 40004fd0: 80 a0 60 44 cmp %g1, 0x44 40004fd4: 02 80 00 1b be 40005040 40004fd8: 80 a0 60 64 cmp %g1, 0x64 40004fdc: 02 80 00 19 be 40005040 40004fe0: 80 a0 60 55 cmp %g1, 0x55 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 40004fe4: 02 80 00 c7 be 40005300 40004fe8: 80 a0 60 75 cmp %g1, 0x75 40004fec: 02 80 00 c5 be 40005300 40004ff0: 91 38 a0 18 sra %g2, 0x18, %o0 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 40004ff4: 80 a2 20 58 cmp %o0, 0x58 40004ff8: 02 80 00 bf be 400052f4 40004ffc: 80 a2 20 78 cmp %o0, 0x78 40005000: 02 80 00 bd be 400052f4 40005004: 80 a2 20 70 cmp %o0, 0x70 base = 16; sign = false; } else if ( c == 'p' ) { 40005008: 82 10 20 00 clr %g1 4000500c: 02 80 00 0f be 40005048 40005010: aa 10 20 10 mov 0x10, %l5 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 40005014: c2 05 00 00 ld [ %l4 ], %g1 40005018: 9f c0 40 00 call %g1 4000501c: 01 00 00 00 nop void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40005020: b0 06 20 01 inc %i0 40005024: c2 0e 00 00 ldub [ %i0 ], %g1 40005028: 83 28 60 18 sll %g1, 0x18, %g1 4000502c: 80 a0 60 00 cmp %g1, 0 40005030: 12 bf ff b8 bne 40004f10 40005034: 91 38 60 18 sra %g1, 0x18, %o0 40005038: 81 c7 e0 08 ret 4000503c: 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; 40005040: 82 10 20 01 mov 1, %g1 40005044: aa 10 20 0a mov 0xa, %l5 } printNum( 40005048: e6 06 40 00 ld [ %i1 ], %l3 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 4000504c: 80 88 60 ff btst 0xff, %g1 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 40005050: b2 06 60 04 add %i1, 4, %i1 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 40005054: 02 80 00 05 be 40005068 40005058: b8 0f 20 30 and %i4, 0x30, %i4 4000505c: 80 a4 e0 00 cmp %l3, 0 40005060: 26 80 00 9f bl,a 400052dc 40005064: c2 05 00 00 ld [ %l4 ], %g1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 40005068: 90 10 00 13 mov %l3, %o0 4000506c: 92 10 00 15 mov %l5, %o1 40005070: 40 00 4f 05 call 40018c84 <.udiv> 40005074: ae 10 20 01 mov 1, %l7 40005078: a2 92 20 00 orcc %o0, 0, %l1 4000507c: 02 80 00 12 be 400050c4 40005080: a4 10 20 00 clr %l2 40005084: 10 80 00 03 b 40005090 40005088: ae 10 00 15 mov %l5, %l7 4000508c: a2 10 00 08 mov %o0, %l1 toPrint[count++] = (char) (unsigned_num - (n * base)); 40005090: 92 10 00 11 mov %l1, %o1 40005094: 40 00 4e c2 call 40018b9c <.umul> 40005098: 90 10 00 17 mov %l7, %o0 4000509c: 90 24 c0 08 sub %l3, %o0, %o0 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 400050a0: 92 10 00 15 mov %l5, %o1 toPrint[count++] = (char) (unsigned_num - (n * base)); 400050a4: d0 2d 80 12 stb %o0, [ %l6 + %l2 ] } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 400050a8: 90 10 00 11 mov %l1, %o0 400050ac: 40 00 4e f6 call 40018c84 <.udiv> 400050b0: a4 04 a0 01 inc %l2 400050b4: 80 a2 20 00 cmp %o0, 0 400050b8: 12 bf ff f5 bne 4000508c 400050bc: a6 10 00 11 mov %l1, %l3 400050c0: ae 04 a0 01 add %l2, 1, %l7 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 400050c4: a4 07 80 12 add %fp, %l2, %l2 for (n=maxwidth ; n > count; n-- ) 400050c8: 80 a4 00 17 cmp %l0, %l7 400050cc: 08 80 00 09 bleu 400050f0 400050d0: e6 2c bf e8 stb %l3, [ %l2 + -24 ] BSP_output_char(lead); 400050d4: c2 05 00 00 ld [ %l4 ], %g1 400050d8: 9f c0 40 00 call %g1 400050dc: 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-- ) 400050e0: a0 04 3f ff add %l0, -1, %l0 400050e4: 80 a4 00 17 cmp %l0, %l7 400050e8: 38 bf ff fc bgu,a 400050d8 400050ec: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(lead); for (n = 0; n < count; n++) { 400050f0: 80 a5 e0 00 cmp %l7, 0 400050f4: 02 bf ff cb be 40005020 400050f8: a2 05 ff ff add %l7, -1, %l1 400050fc: a0 10 20 00 clr %l0 40005100: a2 05 80 11 add %l6, %l1, %l1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40005104: c4 4c 40 00 ldsb [ %l1 ], %g2 40005108: c2 05 00 00 ld [ %l4 ], %g1 4000510c: d0 4f 40 02 ldsb [ %i5 + %g2 ], %o0 40005110: 9f c0 40 00 call %g1 40005114: 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++) { 40005118: 80 a4 00 17 cmp %l0, %l7 4000511c: 0a bf ff fa bcs 40005104 40005120: a2 04 7f ff add %l1, -1, %l1 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40005124: b0 06 20 01 inc %i0 40005128: c2 0e 00 00 ldub [ %i0 ], %g1 4000512c: 83 28 60 18 sll %g1, 0x18, %g1 40005130: 80 a0 60 00 cmp %g1, 0 40005134: 12 bf ff 77 bne 40004f10 40005138: 91 38 60 18 sra %g1, 0x18, %o0 4000513c: 81 c7 e0 08 ret <== NOT EXECUTED 40005140: 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; 40005144: 82 10 20 00 clr %g1 40005148: 10 bf ff c0 b 40005048 4000514c: aa 10 20 08 mov 8, %l5 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; 40005150: b0 06 20 01 inc %i0 40005154: c2 0e 00 00 ldub [ %i0 ], %g1 40005158: aa 10 20 01 mov 1, %l5 4000515c: 10 bf ff 7b b 40004f48 40005160: 85 28 60 18 sll %g1, 0x18, %g2 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 40005164: b0 06 20 01 inc %i0 40005168: c2 0e 00 00 ldub [ %i0 ], %g1 4000516c: b8 10 20 30 mov 0x30, %i4 40005170: 10 bf ff 72 b 40004f38 40005174: 85 28 60 18 sll %g1, 0x18, %g2 fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; 40005178: b0 06 20 01 inc %i0 4000517c: c2 0e 00 00 ldub [ %i0 ], %g1 40005180: 85 28 60 18 sll %g1, 0x18, %g2 } if ( c == 'c' ) { 40005184: 83 38 a0 18 sra %g2, 0x18, %g1 40005188: 80 a0 60 63 cmp %g1, 0x63 4000518c: 12 bf ff 88 bne 40004fac 40005190: 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); 40005194: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED BSP_output_char(chr); 40005198: c2 05 00 00 ld [ %l4 ], %g1 4000519c: 91 2a 20 18 sll %o0, 0x18, %o0 400051a0: 9f c0 40 00 call %g1 400051a4: 91 3a 20 18 sra %o0, 0x18, %o0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 400051a8: b0 06 20 01 inc %i0 400051ac: c2 0e 00 00 ldub [ %i0 ], %g1 400051b0: 83 28 60 18 sll %g1, 0x18, %g1 400051b4: 80 a0 60 00 cmp %g1, 0 400051b8: 12 bf ff 55 bne 40004f0c 400051bc: b2 06 60 04 add %i1, 4, %i1 400051c0: 30 bf ff df b,a 4000513c <== NOT EXECUTED } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 400051c4: e4 06 40 00 ld [ %i1 ], %l2 if ( str == NULL ) { 400051c8: 80 a4 a0 00 cmp %l2, 0 400051cc: 02 80 00 50 be 4000530c 400051d0: b2 06 60 04 add %i1, 4, %i1 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 400051d4: c2 4c 80 00 ldsb [ %l2 ], %g1 400051d8: 80 a0 60 00 cmp %g1, 0 400051dc: 02 80 00 07 be 400051f8 400051e0: a2 10 20 00 clr %l1 400051e4: a2 04 60 01 inc %l1 400051e8: c2 4c 80 11 ldsb [ %l2 + %l1 ], %g1 400051ec: 80 a0 60 00 cmp %g1, 0 400051f0: 32 bf ff fe bne,a 400051e8 400051f4: a2 04 60 01 inc %l1 ; /* leading spaces */ if ( !minus ) 400051f8: aa 8d 60 ff andcc %l5, 0xff, %l5 400051fc: 12 80 00 0e bne 40005234 40005200: 80 a4 20 00 cmp %l0, 0 for ( i=len ; i 4000520c: 80 a4 20 00 cmp %l0, 0 40005210: a6 10 00 11 mov %l1, %l3 BSP_output_char(' '); 40005214: c2 05 00 00 ld [ %l4 ], %g1 40005218: 9f c0 40 00 call %g1 4000521c: 90 10 20 20 mov 0x20, %o0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 4000522c: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(' '); /* no width option */ if (width == 0) { 40005230: 80 a4 20 00 cmp %l0, 0 40005234: 32 80 00 07 bne,a 40005250 40005238: d0 4c 80 00 ldsb [ %l2 ], %o0 width = len; } /* output the string */ for ( i=0 ; i 40005244: 80 a5 60 00 cmp %l5, 0 40005248: a0 10 00 11 mov %l1, %l0 4000524c: d0 4c 80 00 ldsb [ %l2 ], %o0 40005250: 80 a2 20 00 cmp %o0, 0 40005254: 02 80 00 0f be 40005290 40005258: 80 a5 60 00 cmp %l5, 0 BSP_output_char(*str); 4000525c: c2 05 00 00 ld [ %l4 ], %g1 40005260: 9f c0 40 00 call %g1 40005264: a4 04 a0 01 inc %l2 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 4000526c: d0 4c 80 00 ldsb [ %l2 ], %o0 BSP_output_char(*str); 40005270: c2 05 00 00 ld [ %l4 ], %g1 40005274: 9f c0 40 00 call %g1 40005278: 01 00 00 00 nop if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 40005288: a4 04 a0 01 inc %l2 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 4000528c: 80 a5 60 00 cmp %l5, 0 40005290: 22 bf ff 65 be,a 40005024 40005294: b0 06 20 01 inc %i0 for ( i=len ; i 400052a0: b0 06 20 01 inc %i0 BSP_output_char(' '); 400052a4: c2 05 00 00 ld [ %l4 ], %g1 400052a8: 9f c0 40 00 call %g1 400052ac: 90 10 20 20 mov 0x20, %o0 for ( i=0 ; i 400052bc: c2 05 00 00 ld [ %l4 ], %g1 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 400052c0: b0 06 20 01 inc %i0 400052c4: c2 0e 00 00 ldub [ %i0 ], %g1 400052c8: 83 28 60 18 sll %g1, 0x18, %g1 400052cc: 80 a0 60 00 cmp %g1, 0 400052d0: 32 bf ff 10 bne,a 40004f10 400052d4: 91 38 60 18 sra %g1, 0x18, %o0 400052d8: 30 bf ff 99 b,a 4000513c <== NOT EXECUTED unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 400052dc: 9f c0 40 00 call %g1 400052e0: 90 10 20 2d mov 0x2d, %o0 unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 400052e4: 80 a0 00 10 cmp %g0, %l0 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 400052e8: a6 20 00 13 neg %l3 if (maxwidth) maxwidth--; 400052ec: 10 bf ff 5f b 40005068 400052f0: 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' ) { 400052f4: 82 10 20 00 clr %g1 400052f8: 10 bf ff 54 b 40005048 400052fc: 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' ) { 40005300: 82 10 20 00 clr %g1 40005304: 10 bf ff 51 b 40005048 40005308: aa 10 20 0a mov 0xa, %l5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 4000530c: 10 bf ff b2 b 400051d4 40005310: a4 10 00 1b mov %i3, %l2 4001b5bc : ssize_t write( int fd, const void *buffer, size_t count ) { 4001b5bc: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b5c0: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b5c4: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 4001cf44 4001b5c8: 80 a6 00 01 cmp %i0, %g1 4001b5cc: 1a 80 00 23 bcc 4001b658 4001b5d0: 03 10 00 75 sethi %hi(0x4001d400), %g1 iop = rtems_libio_iop( fd ); 4001b5d4: e0 00 63 84 ld [ %g1 + 0x384 ], %l0 ! 4001d784 4001b5d8: 83 2e 20 06 sll %i0, 6, %g1 4001b5dc: b1 2e 20 03 sll %i0, 3, %i0 4001b5e0: b0 06 00 01 add %i0, %g1, %i0 4001b5e4: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001b5e8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b5ec: 80 88 61 00 btst 0x100, %g1 4001b5f0: 02 80 00 1a be 4001b658 4001b5f4: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001b5f8: 02 80 00 1e be 4001b670 4001b5fc: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001b600: 02 80 00 14 be 4001b650 4001b604: b0 10 20 00 clr %i0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001b608: 80 88 60 04 btst 4, %g1 4001b60c: 02 80 00 19 be 4001b670 4001b610: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 4001b614: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b618: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4001b61c: 80 a0 60 00 cmp %g1, 0 4001b620: 02 80 00 1a be 4001b688 4001b624: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 4001b628: 94 10 00 1a mov %i2, %o2 4001b62c: 9f c0 40 00 call %g1 4001b630: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001b634: b0 92 20 00 orcc %o0, 0, %i0 4001b638: 04 80 00 06 ble 4001b650 4001b63c: 85 3e 20 1f sra %i0, 0x1f, %g2 iop->offset += rc; 4001b640: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001b644: 86 83 40 18 addcc %o5, %i0, %g3 4001b648: 84 43 00 02 addx %o4, %g2, %g2 4001b64c: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001b650: 81 c7 e0 08 ret 4001b654: 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 ); 4001b658: 7f ff cf fa call 4000f640 <__errno> <== NOT EXECUTED 4001b65c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b660: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4001b664: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b668: 81 c7 e0 08 ret <== NOT EXECUTED 4001b66c: 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 ); 4001b670: 7f ff cf f4 call 4000f640 <__errno> <== NOT EXECUTED 4001b674: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b678: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001b67c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b680: 81 c7 e0 08 ret <== NOT EXECUTED 4001b684: 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 ); 4001b688: 7f ff cf ee call 4000f640 <__errno> <== NOT EXECUTED 4001b68c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b690: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001b694: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b698: 81 c7 e0 08 ret <== NOT EXECUTED 4001b69c: 81 e8 00 00 restore <== NOT EXECUTED 40006f2c : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 40006f2c: 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 ); 40006f30: 03 10 00 87 sethi %hi(0x40021c00), %g1 40006f34: c2 00 61 84 ld [ %g1 + 0x184 ], %g1 ! 40021d84 40006f38: 80 a6 00 01 cmp %i0, %g1 40006f3c: 1a 80 00 58 bcc 4000709c 40006f40: 03 10 00 8b sethi %hi(0x40022c00), %g1 iop = rtems_libio_iop( fd ); 40006f44: e6 00 61 9c ld [ %g1 + 0x19c ], %l3 ! 40022d9c 40006f48: 83 2e 20 06 sll %i0, 6, %g1 40006f4c: b1 2e 20 03 sll %i0, 3, %i0 40006f50: b0 06 00 01 add %i0, %g1, %i0 40006f54: a6 04 c0 18 add %l3, %i0, %l3 rtems_libio_check_is_open( iop ); 40006f58: c2 04 e0 18 ld [ %l3 + 0x18 ], %g1 40006f5c: 80 88 61 00 btst 0x100, %g1 40006f60: 02 80 00 4f be 4000709c 40006f64: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40006f68: 02 80 00 1d be 40006fdc 40006f6c: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 40006f70: 02 80 00 1b be 40006fdc 40006f74: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 40006f78: 04 80 00 19 ble 40006fdc 40006f7c: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 40006f80: 14 80 00 17 bg 40006fdc 40006f84: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 40006f88: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40006f8c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40006f90: 80 a0 60 00 cmp %g1, 0 40006f94: 02 80 00 48 be 400070b4 40006f98: 17 00 00 1f sethi %hi(0x7c00), %o3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006f9c: 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 ) 40006fa0: 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 ); 40006fa4: 9a 10 20 01 mov 1, %o5 40006fa8: 86 10 20 00 clr %g3 40006fac: 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 ) 40006fb0: c4 00 40 00 ld [ %g1 ], %g2 40006fb4: 80 a0 a0 00 cmp %g2, 0 40006fb8: 02 80 00 09 be 40006fdc 40006fbc: 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 ) 40006fc0: c4 00 60 04 ld [ %g1 + 4 ], %g2 40006fc4: 80 a0 00 02 cmp %g0, %g2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 40006fc8: 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 ) 40006fcc: 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 ) 40006fd0: 80 a0 80 0b cmp %g2, %o3 40006fd4: 04 80 00 08 ble 40006ff4 40006fd8: 9a 0b 40 0c and %o5, %o4, %o5 rtems_set_errno_and_return_minus_one( EINVAL ); 40006fdc: 40 00 2c 1e call 40012054 <__errno> 40006fe0: b0 10 3f ff mov -1, %i0 40006fe4: 82 10 20 16 mov 0x16, %g1 40006fe8: c2 22 00 00 st %g1, [ %o0 ] 40006fec: 81 c7 e0 08 ret 40006ff0: 81 e8 00 00 restore all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 40006ff4: 80 a1 00 02 cmp %g4, %g2 40006ff8: 14 bf ff f9 bg 40006fdc 40006ffc: 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++ ) { 40007000: 80 a6 80 03 cmp %i2, %g3 40007004: 04 80 00 04 ble 40007014 40007008: 82 00 60 08 add %g1, 8, %g1 4000700c: 10 bf ff e9 b 40006fb0 40007010: 88 10 00 02 mov %g2, %g4 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 40007014: 80 8b 60 ff btst 0xff, %o5 <== NOT EXECUTED 40007018: a4 10 20 00 clr %l2 <== NOT EXECUTED 4000701c: 12 bf ff f4 bne 40006fec <== NOT EXECUTED 40007020: 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 ) 40007024: d4 06 60 04 ld [ %i1 + 4 ], %o2 <== NOT EXECUTED 40007028: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 4000702c: 12 80 00 07 bne 40007048 <== NOT EXECUTED 40007030: a4 04 a0 01 inc %l2 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40007034: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED 40007038: 14 bf ff fb bg 40007024 <== NOT EXECUTED 4000703c: b2 06 60 08 add %i1, 8, %i1 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40007040: 81 c7 e0 08 ret <== NOT EXECUTED 40007044: 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 ); 40007048: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED 4000704c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 40007050: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 40007054: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007058: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if ( bytes < 0 ) 4000705c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007060: 06 80 00 1b bl 400070cc <== NOT EXECUTED 40007064: 01 00 00 00 nop <== NOT EXECUTED return -1; if ( bytes > 0 ) { 40007068: 02 80 00 07 be 40007084 <== NOT EXECUTED 4000706c: a1 3a 20 1f sra %o0, 0x1f, %l0 <== NOT EXECUTED iop->offset += bytes; 40007070: c4 1c e0 10 ldd [ %l3 + 0x10 ], %g2 <== NOT EXECUTED 40007074: 86 80 c0 08 addcc %g3, %o0, %g3 <== NOT EXECUTED total += bytes; 40007078: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 4000707c: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 40007080: c4 3c e0 10 std %g2, [ %l3 + 0x10 ] <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 40007084: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED 40007088: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000708c: 02 bf ff eb be 40007038 <== NOT EXECUTED 40007090: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED break; } return total; } 40007094: 81 c7 e0 08 ret <== NOT EXECUTED 40007098: 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 ); 4000709c: 40 00 2b ee call 40012054 <__errno> 400070a0: b0 10 3f ff mov -1, %i0 400070a4: 82 10 20 09 mov 9, %g1 400070a8: c2 22 00 00 st %g1, [ %o0 ] 400070ac: 81 c7 e0 08 ret 400070b0: 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 ); 400070b4: 40 00 2b e8 call 40012054 <__errno> <== NOT EXECUTED 400070b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400070bc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400070c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400070c4: 81 c7 e0 08 ret <== NOT EXECUTED 400070c8: 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 ) 400070cc: 81 c7 e0 08 ret <== NOT EXECUTED 400070d0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED