4000ceb8 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000ceb8: 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 ) 4000cebc: 80 a6 20 00 cmp %i0, 0 4000cec0: 12 80 00 04 bne 4000ced0 4000cec4: a0 10 20 00 clr %l0 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000cec8: 81 c7 e0 08 ret <== NOT EXECUTED 4000cecc: 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 ); 4000ced0: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000ced4: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 4001b778 4000ced8: 92 10 00 1a mov %i2, %o1 4000cedc: d4 10 60 2c lduh [ %g1 + 0x2c ], %o2 4000cee0: 90 10 00 19 mov %i1, %o0 4000cee4: b6 2e c0 0a andn %i3, %o2, %i3 4000cee8: 95 2e e0 10 sll %i3, 0x10, %o2 4000ceec: 7f ff ff ca call 4000ce14 4000cef0: 95 32 a0 10 srl %o2, 0x10, %o2 if ( !node ) 4000cef4: a0 92 20 00 orcc %o0, 0, %l0 4000cef8: 02 bf ff f4 be 4000cec8 4000cefc: 80 a6 60 07 cmp %i1, 7 return NULL; /* * Set the type specific information */ switch (type) { 4000cf00: 28 80 00 0a bleu,a 4000cf28 4000cf04: b3 2e 60 02 sll %i1, 2, %i1 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4000cf08: 11 10 00 6b sethi %hi(0x4001ac00), %o0 <== NOT EXECUTED 4000cf0c: 15 10 00 6b sethi %hi(0x4001ac00), %o2 <== NOT EXECUTED 4000cf10: 17 10 00 69 sethi %hi(0x4001a400), %o3 <== NOT EXECUTED 4000cf14: 90 12 22 18 or %o0, 0x218, %o0 <== NOT EXECUTED 4000cf18: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 4000cf1c: 96 12 e2 b8 or %o3, 0x2b8, %o3 <== NOT EXECUTED 4000cf20: 7f ff d3 c9 call 40001e44 <__assert_func> <== NOT EXECUTED 4000cf24: 92 10 20 5c mov 0x5c, %o1 <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4000cf28: 03 10 00 33 sethi %hi(0x4000cc00), %g1 4000cf2c: 82 10 61 f4 or %g1, 0x1f4, %g1 ! 4000cdf4 4000cf30: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000cf34: 81 c0 40 00 jmp %g1 4000cf38: 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; 4000cf3c: c2 07 00 00 ld [ %i4 ], %g1 4000cf40: 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; 4000cf44: 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; 4000cf48: d0 06 00 00 ld [ %i0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 4000cf4c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 4000cf50: d0 24 20 08 st %o0, [ %l0 + 8 ] node->st_ino = ++fs_info->ino_count; 4000cf54: 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 ); 4000cf58: 90 02 20 50 add %o0, 0x50, %o0 4000cf5c: 82 00 60 01 inc %g1 4000cf60: c2 20 80 00 st %g1, [ %g2 ] 4000cf64: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 4000cf68: 92 10 00 10 mov %l0, %o1 4000cf6c: 7f ff e5 38 call 4000644c <_Chain_Append> 4000cf70: b0 10 00 10 mov %l0, %i0 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000cf74: 81 c7 e0 08 ret 4000cf78: 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; 4000cf7c: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 4000cf80: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000cf84: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000cf88: c0 24 20 50 clr [ %l0 + 0x50 ] 4000cf8c: c0 24 20 54 clr [ %l0 + 0x54 ] node->info.file.indirect = 0; 4000cf90: c0 24 20 58 clr [ %l0 + 0x58 ] node->info.file.doubly_indirect = 0; 4000cf94: c0 24 20 5c clr [ %l0 + 0x5c ] node->info.file.triply_indirect = 0; break; 4000cf98: 10 bf ff eb b 4000cf44 4000cf9c: c0 24 20 60 clr [ %l0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 4000cfa0: 10 bf ff e9 b 4000cf44 4000cfa4: 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; 4000cfa8: 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; 4000cfac: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 4000cfb0: c4 24 20 54 st %g2, [ %l0 + 0x54 ] break; 4000cfb4: 10 bf ff e4 b 4000cf44 4000cfb8: 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); 4000cfbc: 82 04 20 54 add %l0, 0x54, %g1 the_chain->permanent_null = NULL; 4000cfc0: 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); 4000cfc4: c2 24 20 50 st %g1, [ %l0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000cfc8: 82 04 20 50 add %l0, 0x50, %g1 4000cfcc: 10 bf ff de b 4000cf44 4000cfd0: 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 90 sethi %hi(0x40024000), %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 97 sethi %hi(0x40025c00), %l2 40003c3c: 23 10 00 90 sethi %hi(0x40024000), %l1 40003c40: a4 14 a0 58 or %l2, 0x58, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40003c44: a2 14 62 40 or %l1, 0x240, %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 40 5c call 40013dd0 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 90 sethi %hi(0x40024000), %o0 <== NOT EXECUTED 40003cbc: 15 10 00 90 sethi %hi(0x40024000), %o2 <== NOT EXECUTED 40003cc0: 17 10 00 90 sethi %hi(0x40024000), %o3 <== NOT EXECUTED 40003cc4: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 40003cc8: 94 12 a2 f0 or %o2, 0x2f0, %o2 <== NOT EXECUTED 40003ccc: 96 12 e1 f8 or %o3, 0x1f8, %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 90 sethi %hi(0x40024000), %o2 <== NOT EXECUTED 40003cdc: 17 10 00 90 sethi %hi(0x40024000), %o3 <== NOT EXECUTED 40003ce0: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 40003ce4: 94 12 a2 f0 or %o2, 0x2f0, %o2 <== NOT EXECUTED 40003ce8: 96 12 e2 18 or %o3, 0x218, %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 90 sethi %hi(0x40024000), %o2 <== NOT EXECUTED 40003cf8: 17 10 00 90 sethi %hi(0x40024000), %o3 <== NOT EXECUTED 40003cfc: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 40003d00: 94 12 a2 f0 or %o2, 0x2f0, %o2 <== NOT EXECUTED 40003d04: 96 12 e2 08 or %o3, 0x208, %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 40009a64 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009a64: 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; 40009a68: 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 ) 40009a6c: 2b 10 00 6d sethi %hi(0x4001b400), %l5 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009a70: 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 ) 40009a74: aa 15 63 78 or %l5, 0x378, %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 40009a78: a4 10 20 00 clr %l2 40009a7c: a6 07 bf d8 add %fp, -40, %l3 40009a80: 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 ); 40009a84: 90 04 40 12 add %l1, %l2, %o0 40009a88: 92 10 00 19 mov %i1, %o1 40009a8c: 94 10 00 13 mov %l3, %o2 40009a90: 40 00 02 75 call 4000a464 40009a94: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 40009a98: 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 ); 40009a9c: ac 10 00 08 mov %o0, %l6 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 40009aa0: 80 a0 60 00 cmp %g1, 0 40009aa4: 02 80 00 5b be 40009c10 40009aa8: c6 07 bf fc ld [ %fp + -4 ], %g3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 40009aac: b2 26 40 03 sub %i1, %g3, %i1 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 40009ab0: 80 a2 20 00 cmp %o0, 0 40009ab4: 12 80 00 11 bne 40009af8 40009ab8: a4 04 80 03 add %l2, %g3, %l2 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 40009abc: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40009ac0: 80 a0 a0 01 cmp %g2, 1 40009ac4: 22 80 00 62 be,a 40009c4c 40009ac8: c8 00 60 5c ld [ %g1 + 0x5c ], %g4 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 40009acc: 7f ff ff 61 call 40009850 40009ad0: 90 10 00 1b mov %i3, %o0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 40009ad4: c2 06 c0 00 ld [ %i3 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 40009ad8: b5 2e a0 06 sll %i2, 6, %i2 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 40009adc: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 40009ae0: 82 0e 80 01 and %i2, %g1, %g1 40009ae4: 80 a6 80 01 cmp %i2, %g1 40009ae8: 12 80 00 44 bne 40009bf8 40009aec: b0 10 00 08 mov %o0, %i0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009af0: 81 c7 e0 08 ret 40009af4: 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 ) 40009af8: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 40009afc: 80 a0 a0 01 cmp %g2, 1 40009b00: 02 80 00 3a be 40009be8 40009b04: a0 10 00 01 mov %g1, %l0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 40009b08: 80 a5 a0 03 cmp %l6, 3 40009b0c: 02 80 00 0a be 40009b34 40009b10: 80 a5 a0 04 cmp %l6, 4 40009b14: 02 80 00 2f be 40009bd0 40009b18: 80 a5 a0 02 cmp %l6, 2 40009b1c: 02 80 00 1a be 40009b84 40009b20: 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) ) { 40009b24: 12 bf ff d9 bne 40009a88 40009b28: 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 ) { 40009b2c: 10 bf ff e5 b 40009ac0 <== NOT EXECUTED 40009b30: 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 ) { 40009b34: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 40009b38: 80 a0 60 03 cmp %g1, 3 40009b3c: 02 80 00 3b be 40009c28 40009b40: 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 ) { 40009b44: 02 80 00 66 be 40009cdc 40009b48: 90 10 00 1b mov %i3, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 40009b4c: 80 a0 60 01 cmp %g1, 1 40009b50: 12 80 00 55 bne 40009ca4 40009b54: 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 ) { 40009b58: c8 04 20 5c ld [ %l0 + 0x5c ], %g4 40009b5c: 80 a1 20 00 cmp %g4, 0 40009b60: 12 80 00 57 bne 40009cbc 40009b64: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 40009b68: 40 00 02 0e call 4000a3a0 40009b6c: 92 10 00 13 mov %l3, %o1 if ( !node ) 40009b70: a0 92 20 00 orcc %o0, 0, %l0 40009b74: 02 80 00 27 be 40009c10 40009b78: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 40009b7c: 10 bf ff c2 b 40009a84 40009b80: 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 ) 40009b84: c4 05 40 00 ld [ %l5 ], %g2 40009b88: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 40009b8c: 80 a0 40 02 cmp %g1, %g2 40009b90: 02 bf ff be be 40009a88 40009b94: 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) { 40009b98: c8 06 e0 10 ld [ %i3 + 0x10 ], %g4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 40009b9c: c4 01 20 1c ld [ %g4 + 0x1c ], %g2 40009ba0: 80 a0 40 02 cmp %g1, %g2 40009ba4: 22 80 00 56 be,a 40009cfc 40009ba8: c4 01 20 14 ld [ %g4 + 0x14 ], %g2 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 40009bac: e0 00 60 08 ld [ %g1 + 8 ], %l0 40009bb0: 80 a4 20 00 cmp %l0, 0 40009bb4: 32 bf ff b5 bne,a 40009a88 40009bb8: e0 26 c0 00 st %l0, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 40009bbc: 40 00 10 d8 call 4000df1c <__errno> 40009bc0: b0 10 3f ff mov -1, %i0 40009bc4: ec 22 00 00 st %l6, [ %o0 ] 40009bc8: 81 c7 e0 08 ret 40009bcc: 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 ); 40009bd0: 40 00 10 d3 call 4000df1c <__errno> 40009bd4: b0 10 3f ff mov -1, %i0 40009bd8: 82 10 20 5b mov 0x5b, %g1 40009bdc: c2 22 00 00 st %g1, [ %o0 ] 40009be0: 81 c7 e0 08 ret 40009be4: 81 e8 00 00 restore /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 40009be8: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 40009bec: 80 88 a0 40 btst 0x40, %g2 40009bf0: 12 bf ff c7 bne 40009b0c 40009bf4: 80 a5 a0 03 cmp %l6, 3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 40009bf8: 40 00 10 c9 call 4000df1c <__errno> 40009bfc: b0 10 3f ff mov -1, %i0 40009c00: 82 10 20 0d mov 0xd, %g1 40009c04: c2 22 00 00 st %g1, [ %o0 ] 40009c08: 81 c7 e0 08 ret 40009c0c: 81 e8 00 00 restore * 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 ); 40009c10: 40 00 10 c3 call 4000df1c <__errno> 40009c14: b0 10 3f ff mov -1, %i0 40009c18: 82 10 20 02 mov 2, %g1 40009c1c: c2 22 00 00 st %g1, [ %o0 ] 40009c20: 81 c7 e0 08 ret 40009c24: 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 ); 40009c28: 90 10 00 1b mov %i3, %o0 40009c2c: 7f ff ff 33 call 400098f8 40009c30: 92 10 20 00 clr %o1 node = pathloc->node_access; 40009c34: e0 06 c0 00 ld [ %i3 ], %l0 if ( !node ) 40009c38: 80 a4 20 00 cmp %l0, 0 40009c3c: 02 80 00 1a be 40009ca4 40009c40: 01 00 00 00 nop } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 40009c44: 10 bf ff c2 b 40009b4c 40009c48: 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 ) { 40009c4c: 80 a1 20 00 cmp %g4, 0 40009c50: 02 bf ff 9f be 40009acc 40009c54: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 40009c58: c4 01 20 28 ld [ %g4 + 0x28 ], %g2 *pathloc = newloc; 40009c5c: 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; 40009c60: d8 01 20 24 ld [ %g4 + 0x24 ], %o4 40009c64: da 01 20 20 ld [ %g4 + 0x20 ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009c68: c2 00 80 00 ld [ %g2 ], %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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 40009c6c: c8 01 20 1c ld [ %g4 + 0x1c ], %g4 */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009c70: 92 06 40 03 add %i1, %g3, %o1 40009c74: 86 24 80 03 sub %l2, %g3, %g3 * 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; 40009c78: d6 26 e0 10 st %o3, [ %i3 + 0x10 ] 40009c7c: d8 26 e0 08 st %o4, [ %i3 + 8 ] 40009c80: da 26 e0 04 st %o5, [ %i3 + 4 ] 40009c84: c8 26 c0 00 st %g4, [ %i3 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009c88: 90 04 40 03 add %l1, %g3, %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; 40009c8c: c4 26 e0 0c st %g2, [ %i3 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009c90: 94 10 00 1a mov %i2, %o2 40009c94: 9f c0 40 00 call %g1 40009c98: 96 10 00 1b mov %i3, %o3 40009c9c: 81 c7 e0 08 ret 40009ca0: 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 ); 40009ca4: 40 00 10 9e call 4000df1c <__errno> 40009ca8: b0 10 3f ff mov -1, %i0 40009cac: 82 10 20 14 mov 0x14, %g1 40009cb0: c2 22 00 00 st %g1, [ %o0 ] 40009cb4: 81 c7 e0 08 ret 40009cb8: 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; 40009cbc: c4 01 20 28 ld [ %g4 + 0x28 ], %g2 *pathloc = newloc; 40009cc0: d6 01 20 2c ld [ %g4 + 0x2c ], %o3 * 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; 40009cc4: d8 01 20 24 ld [ %g4 + 0x24 ], %o4 40009cc8: da 01 20 20 ld [ %g4 + 0x20 ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009ccc: c2 00 80 00 ld [ %g2 ], %g1 40009cd0: c6 07 bf fc ld [ %fp + -4 ], %g3 * 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; 40009cd4: 10 bf ff e7 b 40009c70 40009cd8: c8 01 20 1c ld [ %g4 + 0x1c ], %g4 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 40009cdc: 7f ff ff 22 call 40009964 40009ce0: 92 10 20 00 clr %o1 node = pathloc->node_access; 40009ce4: e0 06 c0 00 ld [ %i3 ], %l0 if ( result == -1 ) 40009ce8: 80 a2 3f ff cmp %o0, -1 40009cec: 02 bf ff 81 be 40009af0 40009cf0: 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; 40009cf4: 10 bf ff 96 b 40009b4c 40009cf8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 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; 40009cfc: 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; 40009d00: d8 01 20 10 ld [ %g4 + 0x10 ], %o4 40009d04: da 01 20 0c ld [ %g4 + 0xc ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 40009d08: c2 00 80 00 ld [ %g2 ], %g1 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 40009d0c: 10 bf ff d9 b 40009c70 40009d10: c8 01 20 08 ld [ %g4 + 8 ], %g4 40009dec : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 40009dec: 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; 40009df0: e0 06 40 00 ld [ %i1 ], %l0 /* * Get the path length. */ pathlen = strlen( path ); 40009df4: 90 10 00 18 mov %i0, %o0 40009df8: 40 00 14 00 call 4000edf8 40009dfc: 2d 10 00 6d sethi %hi(0x4001b400), %l6 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 40009e00: a2 10 00 18 mov %i0, %l1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 40009e04: a6 10 20 00 clr %l3 40009e08: a8 07 bf d8 add %fp, -40, %l4 40009e0c: aa 07 bf fc add %fp, -4, %l5 40009e10: 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 ) 40009e14: ac 15 a3 78 or %l6, 0x378, %l6 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 40009e18: 92 10 00 12 mov %l2, %o1 40009e1c: 90 04 40 13 add %l1, %l3, %o0 40009e20: 94 10 00 14 mov %l4, %o2 40009e24: 40 00 01 90 call 4000a464 40009e28: 96 10 00 15 mov %l5, %o3 pathlen -= len; 40009e2c: c6 07 bf fc ld [ %fp + -4 ], %g3 i += len; if ( !pathloc->node_access ) 40009e30: c2 06 40 00 ld [ %i1 ], %g1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 40009e34: ae 10 00 08 mov %o0, %l7 pathlen -= len; i += len; if ( !pathloc->node_access ) 40009e38: 80 a0 60 00 cmp %g1, 0 40009e3c: 02 80 00 67 be 40009fd8 40009e40: a4 24 80 03 sub %l2, %g3, %l2 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 40009e44: 80 a2 20 00 cmp %o0, 0 40009e48: 32 80 00 08 bne,a 40009e68 40009e4c: 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 ); 40009e50: 40 00 10 33 call 4000df1c <__errno> 40009e54: b0 10 3f ff mov -1, %i0 40009e58: 82 10 20 11 mov 0x11, %g1 40009e5c: c2 22 00 00 st %g1, [ %o0 ] 40009e60: 81 c7 e0 08 ret 40009e64: 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 ) 40009e68: 80 a0 a0 01 cmp %g2, 1 40009e6c: 02 80 00 46 be 40009f84 40009e70: a0 10 00 01 mov %g1, %l0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 40009e74: 80 a5 e0 02 cmp %l7, 2 40009e78: 02 80 00 30 be 40009f38 40009e7c: a6 04 c0 03 add %l3, %g3, %l3 40009e80: 80 a5 e0 02 cmp %l7, 2 40009e84: 08 80 00 0d bleu 40009eb8 40009e88: 80 a5 e0 00 cmp %l7, 0 40009e8c: 80 a5 e0 03 cmp %l7, 3 40009e90: 02 80 00 12 be 40009ed8 40009e94: 80 a5 e0 04 cmp %l7, 4 40009e98: 12 bf ff e1 bne 40009e1c 40009e9c: 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 ); 40009ea0: 40 00 10 1f call 4000df1c <__errno> 40009ea4: b0 10 3f ff mov -1, %i0 40009ea8: 82 10 20 5b mov 0x5b, %g1 40009eac: c2 22 00 00 st %g1, [ %o0 ] 40009eb0: 81 c7 e0 08 ret 40009eb4: 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 ) { 40009eb8: 12 bf ff d9 bne 40009e1c 40009ebc: 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 ); 40009ec0: 40 00 10 17 call 4000df1c <__errno> <== NOT EXECUTED 40009ec4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009ec8: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 40009ecc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009ed0: 81 c7 e0 08 ret <== NOT EXECUTED 40009ed4: 81 e8 00 00 restore <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 40009ed8: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 40009edc: 80 a0 60 03 cmp %g1, 3 40009ee0: 02 80 00 7b be 4000a0cc 40009ee4: 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 ) { 40009ee8: 02 80 00 7a be 4000a0d0 40009eec: 90 10 00 19 mov %i1, %o0 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 40009ef0: 80 a4 20 00 cmp %l0, 0 40009ef4: 02 80 00 5d be 4000a068 40009ef8: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 40009efc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40009f00: 80 a0 60 01 cmp %g1, 1 40009f04: 12 80 00 59 bne 4000a068 40009f08: 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 ) { 40009f0c: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 40009f10: 80 a0 e0 00 cmp %g3, 0 40009f14: 12 80 00 5b bne 4000a080 40009f18: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 40009f1c: 40 00 01 21 call 4000a3a0 40009f20: 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 ) 40009f24: a0 92 20 00 orcc %o0, 0, %l0 40009f28: 02 80 00 21 be 40009fac 40009f2c: c2 07 bf fc ld [ %fp + -4 ], %g1 done = true; else pathloc->node_access = node; 40009f30: 10 bf ff ba b 40009e18 40009f34: 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 ) 40009f38: c4 05 80 00 ld [ %l6 ], %g2 40009f3c: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 40009f40: 80 a0 40 02 cmp %g1, %g2 40009f44: 02 bf ff b6 be 40009e1c 40009f48: 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){ 40009f4c: c8 06 60 10 ld [ %i1 + 0x10 ], %g4 40009f50: c4 01 20 1c ld [ %g4 + 0x1c ], %g2 40009f54: 80 a0 40 02 cmp %g1, %g2 40009f58: 22 80 00 65 be,a 4000a0ec 40009f5c: c4 01 20 14 ld [ %g4 + 0x14 ], %g2 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 40009f60: e0 00 60 08 ld [ %g1 + 8 ], %l0 40009f64: 80 a4 20 00 cmp %l0, 0 40009f68: 32 bf ff ad bne,a 40009e1c 40009f6c: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 40009f70: 40 00 0f eb call 4000df1c <__errno> 40009f74: b0 10 3f ff mov -1, %i0 40009f78: ee 22 00 00 st %l7, [ %o0 ] 40009f7c: 81 c7 e0 08 ret 40009f80: 81 e8 00 00 restore /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 40009f84: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 40009f88: 80 88 a0 40 btst 0x40, %g2 40009f8c: 12 bf ff bb bne 40009e78 40009f90: 80 a5 e0 02 cmp %l7, 2 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 40009f94: 40 00 0f e2 call 4000df1c <__errno> 40009f98: b0 10 3f ff mov -1, %i0 40009f9c: 82 10 20 0d mov 0xd, %g1 40009fa0: c2 22 00 00 st %g1, [ %o0 ] 40009fa4: 81 c7 e0 08 ret 40009fa8: 81 e8 00 00 restore case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 40009fac: 82 24 c0 01 sub %l3, %g1, %g1 40009fb0: 82 04 40 01 add %l1, %g1, %g1 40009fb4: 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++) { 40009fb8: c2 4c 40 13 ldsb [ %l1 + %l3 ], %g1 40009fbc: 80 a0 60 00 cmp %g1, 0 40009fc0: 02 80 00 1c be 4000a030 40009fc4: 80 a0 60 2f cmp %g1, 0x2f if ( !IMFS_is_separator( path[ i ] ) ) 40009fc8: 02 80 00 0a be 40009ff0 40009fcc: 80 a0 60 5c cmp %g1, 0x5c 40009fd0: 22 80 00 09 be,a 40009ff4 40009fd4: a2 04 40 13 add %l1, %l3, %l1 rtems_set_errno_and_return_minus_one( ENOENT ); 40009fd8: 40 00 0f d1 call 4000df1c <__errno> <== NOT EXECUTED 40009fdc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009fe0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40009fe4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009fe8: 81 c7 e0 08 ret <== NOT EXECUTED 40009fec: 81 e8 00 00 restore <== NOT EXECUTED 40009ff0: 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++) { 40009ff4: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 40009ff8: 80 a0 60 00 cmp %g1, 0 40009ffc: 02 80 00 0d be 4000a030 4000a000: a2 04 60 01 inc %l1 if ( !IMFS_is_separator( path[ i ] ) ) 4000a004: 80 a0 60 5c cmp %g1, 0x5c 4000a008: 02 bf ff fb be 40009ff4 4000a00c: 80 a0 60 2f cmp %g1, 0x2f 4000a010: 22 bf ff fa be,a 40009ff8 4000a014: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000a018: 40 00 0f c1 call 4000df1c <__errno> 4000a01c: b0 10 3f ff mov -1, %i0 4000a020: 82 10 20 02 mov 2, %g1 4000a024: c2 22 00 00 st %g1, [ %o0 ] 4000a028: 81 c7 e0 08 ret 4000a02c: 81 e8 00 00 restore /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4000a030: 7f ff fe 08 call 40009850 4000a034: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 4000a038: c2 06 40 00 ld [ %i1 ], %g1 if ( node->type != IMFS_DIRECTORY ) 4000a03c: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000a040: 80 a0 a0 01 cmp %g2, 1 4000a044: 12 80 00 09 bne 4000a068 4000a048: b0 10 00 08 mov %o0, %i0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4000a04c: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 4000a050: 82 08 60 c0 and %g1, 0xc0, %g1 4000a054: 80 a0 60 c0 cmp %g1, 0xc0 4000a058: 12 bf ff cf bne 40009f94 4000a05c: 01 00 00 00 nop if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000a060: 81 c7 e0 08 ret 4000a064: 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 ); 4000a068: 40 00 0f ad call 4000df1c <__errno> 4000a06c: b0 10 3f ff mov -1, %i0 4000a070: 82 10 20 14 mov 0x14, %g1 4000a074: c2 22 00 00 st %g1, [ %o0 ] 4000a078: 81 c7 e0 08 ret 4000a07c: 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; 4000a080: c4 00 e0 28 ld [ %g3 + 0x28 ], %g2 *pathloc = newloc; 4000a084: 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; 4000a088: da 00 e0 24 ld [ %g3 + 0x24 ], %o5 4000a08c: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a090: d0 07 bf fc ld [ %fp + -4 ], %o0 * 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; 4000a094: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a098: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000a09c: 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; 4000a0a0: d8 26 60 10 st %o4, [ %i1 + 0x10 ] 4000a0a4: da 26 60 08 st %o5, [ %i1 + 8 ] 4000a0a8: c8 26 60 04 st %g4, [ %i1 + 4 ] 4000a0ac: c6 26 40 00 st %g3, [ %i1 ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a0b0: 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; 4000a0b4: c4 26 60 0c st %g2, [ %i1 + 0xc ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a0b8: 92 10 00 19 mov %i1, %o1 4000a0bc: 9f c0 40 00 call %g1 4000a0c0: 94 10 00 1a mov %i2, %o2 4000a0c4: 81 c7 e0 08 ret 4000a0c8: 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 ); 4000a0cc: 90 10 00 19 mov %i1, %o0 4000a0d0: 7f ff ff 11 call 40009d14 4000a0d4: 92 10 20 00 clr %o1 if ( result == -1 ) 4000a0d8: 80 a2 3f ff cmp %o0, -1 4000a0dc: 02 bf ff 61 be 40009e60 4000a0e0: b0 10 00 08 mov %o0, %i0 4000a0e4: 10 bf ff 83 b 40009ef0 4000a0e8: e0 06 40 00 ld [ %i1 ], %l0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4000a0ec: d6 01 20 18 ld [ %g4 + 0x18 ], %o3 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4000a0f0: d8 01 20 10 ld [ %g4 + 0x10 ], %o4 4000a0f4: da 01 20 0c ld [ %g4 + 0xc ], %o5 4000a0f8: c8 01 20 08 ld [ %g4 + 8 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a0fc: 86 24 c0 03 sub %l3, %g3, %g3 4000a100: 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; *pathloc = newloc; 4000a104: d6 26 60 10 st %o3, [ %i1 + 0x10 ] 4000a108: d8 26 60 08 st %o4, [ %i1 + 8 ] 4000a10c: da 26 60 04 st %o5, [ %i1 + 4 ] 4000a110: c8 26 40 00 st %g4, [ %i1 ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a114: 10 bf ff e8 b 4000a0b4 4000a118: 90 04 40 03 add %l1, %g3, %o0 400098f8 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 400098f8: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 400098fc: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 40009900: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40009904: 80 a0 a0 03 cmp %g2, 3 40009908: 12 80 00 14 bne 40009958 4000990c: 90 10 00 18 mov %i0, %o0 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 40009910: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 IMFS_Set_handlers( node ); 40009914: 7f ff ff cf call 40009850 40009918: c2 26 00 00 st %g1, [ %i0 ] if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 4000991c: c2 06 00 00 ld [ %i0 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 40009920: b3 2e 60 06 sll %i1, 6, %i1 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 40009924: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 40009928: 82 0e 40 01 and %i1, %g1, %g1 4000992c: 80 a6 40 01 cmp %i1, %g1 40009930: 02 80 00 08 be 40009950 40009934: 01 00 00 00 nop /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 40009938: 40 00 11 79 call 4000df1c <__errno> <== NOT EXECUTED 4000993c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009940: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40009944: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009948: 81 c7 e0 08 ret <== NOT EXECUTED 4000994c: 81 e8 00 00 restore <== NOT EXECUTED return result; } 40009950: 81 c7 e0 08 ret 40009954: 91 e8 20 00 restore %g0, 0, %o0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 40009958: 7f ff f1 e9 call 400060fc <== NOT EXECUTED 4000995c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40009960: 01 00 00 00 nop 40009d14 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009d14: 9d e3 bf a0 save %sp, -96, %sp 40009d18: 21 10 00 6d sethi %hi(0x4001b400), %l0 40009d1c: a2 10 00 18 mov %i0, %l1 40009d20: c2 04 23 78 ld [ %l0 + 0x378 ], %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 ) ) ); 40009d24: 10 80 00 07 b 40009d40 40009d28: a6 14 23 78 or %l0, 0x378, %l3 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 40009d2c: 02 80 00 21 be 40009db0 40009d30: 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 ) ) ); 40009d34: 80 a0 a0 01 cmp %g2, 1 40009d38: 18 80 00 1b bgu 40009da4 40009d3c: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 40009d40: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 40009d44: e4 04 40 00 ld [ %l1 ], %l2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 40009d48: 84 00 a0 01 inc %g2 40009d4c: c4 30 60 2e sth %g2, [ %g1 + 0x2e ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 40009d50: 85 28 a0 10 sll %g2, 0x10, %g2 40009d54: 85 30 a0 10 srl %g2, 0x10, %g2 40009d58: 80 a0 a0 05 cmp %g2, 5 40009d5c: 18 80 00 1d bgu 40009dd0 40009d60: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 40009d64: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 40009d68: 80 a0 a0 03 cmp %g2, 3 40009d6c: 12 bf ff f0 bne 40009d2c 40009d70: 80 a0 a0 04 cmp %g2, 4 result = IMFS_evaluate_hard_link( node, flags ); 40009d74: 90 10 00 11 mov %l1, %o0 40009d78: 7f ff fe e0 call 400098f8 40009d7c: 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 ) ) ); 40009d80: 80 a2 20 00 cmp %o0, 0 40009d84: 12 80 00 08 bne 40009da4 40009d88: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 40009d8c: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 40009d90: 84 00 bf fd add %g2, -3, %g2 40009d94: 80 a0 a0 01 cmp %g2, 1 40009d98: 08 bf ff ea bleu 40009d40 40009d9c: c2 04 c0 00 ld [ %l3 ], %g1 40009da0: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 40009da4: c0 30 60 2e clrh [ %g1 + 0x2e ] return result; } 40009da8: 81 c7 e0 08 ret 40009dac: 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 ); 40009db0: 90 10 00 11 mov %l1, %o0 40009db4: 7f ff fe ec call 40009964 40009db8: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 40009dbc: 80 a2 20 00 cmp %o0, 0 40009dc0: 22 bf ff f4 be,a 40009d90 40009dc4: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 40009dc8: 10 bf ff f7 b 40009da4 40009dcc: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 40009dd0: 40 00 10 53 call 4000df1c <__errno> 40009dd4: c0 30 60 2e clrh [ %g1 + 0x2e ] 40009dd8: 82 10 20 5c mov 0x5c, %g1 40009ddc: c2 22 00 00 st %g1, [ %o0 ] 40009de0: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 40009de4: 81 c7 e0 08 ret 40009de8: 91 e8 00 08 restore %g0, %o0, %o0 400098dc : */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 400098dc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400098e0: 93 2a 60 06 sll %o1, 6, %o1 <== NOT EXECUTED 400098e4: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 <== NOT EXECUTED 400098e8: 82 2a 40 01 andn %o1, %g1, %g1 <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 400098ec: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 400098f0: 81 c3 e0 08 retl <== NOT EXECUTED 400098f4: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40009964 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009964: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 40009968: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000996c: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40009970: 80 a0 a0 04 cmp %g2, 4 40009974: 12 80 00 37 bne 40009a50 40009978: 01 00 00 00 nop rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4000997c: c4 00 60 08 ld [ %g1 + 8 ], %g2 40009980: 80 a0 a0 00 cmp %g2, 0 40009984: 02 80 00 35 be 40009a58 40009988: 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; 4000998c: c4 26 00 00 st %g2, [ %i0 ] rtems_filesystem_get_sym_start_loc( 40009990: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40009994: c6 48 80 00 ldsb [ %g2 ], %g3 40009998: 80 a0 e0 5c cmp %g3, 0x5c 4000999c: 02 80 00 1e be 40009a14 400099a0: 80 a0 e0 2f cmp %g3, 0x2f 400099a4: 02 80 00 1c be 40009a14 400099a8: 80 a0 e0 00 cmp %g3, 0 400099ac: 02 80 00 1a be 40009a14 400099b0: 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] ), 400099b4: a0 00 80 10 add %g2, %l0, %l0 400099b8: 40 00 15 10 call 4000edf8 400099bc: 90 10 00 10 mov %l0, %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 400099c0: 94 10 00 19 mov %i1, %o2 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 400099c4: 92 10 00 08 mov %o0, %o1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 400099c8: 96 10 00 18 mov %i0, %o3 400099cc: 40 00 00 26 call 40009a64 400099d0: 90 10 00 10 mov %l0, %o0 400099d4: a0 10 00 08 mov %o0, %l0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 400099d8: 7f ff ff 9e call 40009850 400099dc: 90 10 00 18 mov %i0, %o0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 400099e0: c2 06 00 00 ld [ %i0 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 400099e4: b3 2e 60 06 sll %i1, 6, %i1 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 400099e8: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 400099ec: 82 0e 40 01 and %i1, %g1, %g1 400099f0: 80 a6 40 01 cmp %i1, %g1 400099f4: 02 80 00 06 be 40009a0c 400099f8: 01 00 00 00 nop /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 400099fc: 40 00 11 48 call 4000df1c <__errno> <== NOT EXECUTED 40009a00: a0 10 3f ff mov -1, %l0 ! ffffffff <== NOT EXECUTED 40009a04: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40009a08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 40009a0c: 81 c7 e0 08 ret 40009a10: 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( 40009a14: 05 10 00 6d sethi %hi(0x4001b400), %g2 40009a18: c4 00 a3 78 ld [ %g2 + 0x378 ], %g2 ! 4001b778 40009a1c: a0 10 20 01 mov 1, %l0 40009a20: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3 40009a24: c6 26 00 00 st %g3, [ %i0 ] 40009a28: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 40009a2c: c6 26 20 04 st %g3, [ %i0 + 4 ] 40009a30: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 40009a34: c6 26 20 08 st %g3, [ %i0 + 8 ] 40009a38: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 40009a3c: c6 26 20 0c st %g3, [ %i0 + 0xc ] 40009a40: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2 40009a44: c4 26 20 10 st %g2, [ %i0 + 0x10 ] 40009a48: 10 bf ff db b 400099b4 40009a4c: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 40009a50: 7f ff f1 ab call 400060fc <== NOT EXECUTED 40009a54: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 40009a58: 7f ff f1 a9 call 400060fc <== NOT EXECUTED 40009a5c: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 40009a60: 01 00 00 00 nop 4000a2dc : } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000a2dc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a2e0: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000a2e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000a2e8: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000a2ec: 40 00 09 6c call 4000c89c <== NOT EXECUTED 4000a2f0: 90 04 60 50 add %l1, 0x50, %o0 <== NOT EXECUTED if (! err) { 4000a2f4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a2f8: 02 80 00 06 be 4000a310 <== NOT EXECUTED 4000a2fc: 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); 4000a300: 06 80 00 14 bl 4000a350 <== NOT EXECUTED 4000a304: 01 00 00 00 nop <== NOT EXECUTED } 4000a308: 81 c7 e0 08 ret <== NOT EXECUTED 4000a30c: 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; 4000a310: 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) 4000a314: 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; 4000a318: 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) 4000a31c: 40 00 02 6a call 4000acc4 <== NOT EXECUTED 4000a320: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED 4000a324: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a328: 12 80 00 08 bne 4000a348 <== NOT EXECUTED 4000a32c: 01 00 00 00 nop <== NOT EXECUTED 4000a330: c2 14 60 30 lduh [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 4000a334: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a338: 12 80 00 04 bne 4000a348 <== NOT EXECUTED 4000a33c: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 4000a340: 40 00 01 b6 call 4000aa18 <== NOT EXECUTED 4000a344: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000a348: 81 c7 e0 08 ret <== NOT EXECUTED 4000a34c: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000a350: 40 00 0e f3 call 4000df1c <__errno> <== NOT EXECUTED 4000a354: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a358: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000a35c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a360: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000a178 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000a178: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 4000a17c: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED 4000a180: 82 10 62 7e or %g1, 0x27e, %g1 ! 8004667e <== NOT EXECUTED 4000a184: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000a188: 02 80 00 0c be 4000a1b8 <== NOT EXECUTED 4000a18c: 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); 4000a190: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 4000a194: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a198: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000a19c: 40 00 08 ba call 4000c484 <== NOT EXECUTED 4000a1a0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a1a4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a1a8: 06 80 00 13 bl 4000a1f4 <== NOT EXECUTED 4000a1ac: b2 20 00 18 neg %i0, %i1 <== NOT EXECUTED } 4000a1b0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a1b4: 81 e8 00 00 restore <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 4000a1b8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000a1bc: 02 80 00 0e be 4000a1f4 <== NOT EXECUTED 4000a1c0: b2 10 20 0e mov 0xe, %i1 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 4000a1c4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000a1c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a1cc: 02 80 00 06 be 4000a1e4 <== NOT EXECUTED 4000a1d0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 4000a1d4: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 4000a1d8: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000a1dc: 81 c7 e0 08 ret <== NOT EXECUTED 4000a1e0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000a1e4: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000a1e8: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000a1ec: 81 c7 e0 08 ret <== NOT EXECUTED 4000a1f0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4000a1f4: 40 00 0f 4a call 4000df1c <__errno> <== NOT EXECUTED 4000a1f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a1fc: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED } 4000a200: 81 c7 e0 08 ret <== NOT EXECUTED 4000a204: 81 e8 00 00 restore <== NOT EXECUTED 4000a11c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4000a11c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000a120: 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 ) { 4000a124: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000a128: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000a12c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 4000a130: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a134: 40 00 08 b6 call 4000c40c <== NOT EXECUTED 4000a138: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000a13c: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 4000a140: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a144: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000a148: 06 80 00 05 bl 4000a15c <== NOT EXECUTED 4000a14c: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED } 4000a150: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 4000a154: 81 c7 e0 08 ret <== NOT EXECUTED 4000a158: 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); 4000a15c: 40 00 0f 70 call 4000df1c <__errno> <== NOT EXECUTED 4000a160: a0 20 00 10 neg %l0 <== NOT EXECUTED 4000a164: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 4000a168: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 4000a16c: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 4000a170: 10 bf ff f8 b 4000a150 <== NOT EXECUTED 4000a174: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 4000a364 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000a364: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4000a368: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000a36c: 92 10 00 18 mov %i0, %o1 IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4000a370: 40 00 09 9d call 4000c9e4 4000a374: 90 02 20 50 add %o0, 0x50, %o0 IMFS_FIFO_RETURN(err); 4000a378: b0 92 20 00 orcc %o0, 0, %i0 4000a37c: 06 80 00 04 bl 4000a38c 4000a380: 01 00 00 00 nop } 4000a384: 81 c7 e0 08 ret <== NOT EXECUTED 4000a388: 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); 4000a38c: 40 00 0e e4 call 4000df1c <__errno> 4000a390: b0 20 00 18 neg %i0 4000a394: f0 22 00 00 st %i0, [ %o0 ] } 4000a398: 81 c7 e0 08 ret 4000a39c: 91 e8 3f ff restore %g0, -1, %o0 4000a274 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000a274: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a278: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000a27c: 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); 4000a280: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000a284: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a288: 40 00 09 16 call 4000c6e0 <== NOT EXECUTED 4000a28c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 4000a290: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a294: 04 80 00 08 ble 4000a2b4 <== NOT EXECUTED 4000a298: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 4000a29c: 40 00 02 51 call 4000abe0 <== NOT EXECUTED 4000a2a0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a2a4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000a2a8: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED 4000a2ac: 81 c7 e0 08 ret <== NOT EXECUTED 4000a2b0: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a2b4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000a2b8: 12 80 00 04 bne 4000a2c8 <== NOT EXECUTED 4000a2bc: 01 00 00 00 nop <== NOT EXECUTED } 4000a2c0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a2c4: 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); 4000a2c8: 40 00 0f 15 call 4000df1c <__errno> <== NOT EXECUTED 4000a2cc: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a2d0: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000a2d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a2d8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000a208 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000a208: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a20c: 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 ) { 4000a210: 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); 4000a214: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000a218: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a21c: 40 00 08 b3 call 4000c4e8 <== NOT EXECUTED 4000a220: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 4000a224: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a228: 04 80 00 09 ble 4000a24c <== NOT EXECUTED 4000a22c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 4000a230: 40 00 02 6c call 4000abe0 <== NOT EXECUTED 4000a234: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a238: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000a23c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4000a240: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 4000a244: 81 c7 e0 08 ret <== NOT EXECUTED 4000a248: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000a24c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000a250: 12 80 00 04 bne 4000a260 <== NOT EXECUTED 4000a254: 01 00 00 00 nop <== NOT EXECUTED } 4000a258: 81 c7 e0 08 ret <== NOT EXECUTED 4000a25c: 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); 4000a260: 40 00 0f 2f call 4000df1c <__errno> <== NOT EXECUTED 4000a264: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a268: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000a26c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a270: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000a3a0 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000a3a0: 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 ); 4000a3a4: 80 a6 20 00 cmp %i0, 0 4000a3a8: 02 80 00 26 be 4000a440 4000a3ac: 80 a6 60 00 cmp %i1, 0 if ( !name ) 4000a3b0: 02 80 00 11 be 4000a3f4 4000a3b4: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000a3b8: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000a3bc: 40 00 12 3e call 4000ecb4 4000a3c0: 92 12 60 20 or %o1, 0x20, %o1 ! 4001ac20 4000a3c4: 80 a2 20 00 cmp %o0, 0 4000a3c8: 02 80 00 09 be 4000a3ec 4000a3cc: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000a3d0: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000a3d4: 40 00 12 38 call 4000ecb4 4000a3d8: 92 12 60 28 or %o1, 0x28, %o1 ! 4001ac28 4000a3dc: 80 a2 20 00 cmp %o0, 0 4000a3e0: 32 80 00 07 bne,a 4000a3fc 4000a3e4: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 return directory->Parent; 4000a3e8: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000a3ec: 81 c7 e0 08 ret <== NOT EXECUTED 4000a3f0: 81 e8 00 00 restore <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000a3f4: 81 c7 e0 08 ret 4000a3f8: 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; 4000a3fc: 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; 4000a400: 80 a4 00 18 cmp %l0, %i0 4000a404: 12 80 00 07 bne 4000a420 4000a408: 90 10 00 19 mov %i1, %o0 4000a40c: 81 c7 e0 08 ret 4000a410: 91 e8 20 00 restore %g0, 0, %o0 4000a414: 80 a4 00 18 cmp %l0, %i0 4000a418: 02 bf ff f7 be 4000a3f4 4000a41c: 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 ) ) 4000a420: 40 00 12 25 call 4000ecb4 4000a424: 92 04 20 0c add %l0, 0xc, %o1 4000a428: 80 a2 20 00 cmp %o0, 0 4000a42c: 32 bf ff fa bne,a 4000a414 4000a430: e0 04 00 00 ld [ %l0 ], %l0 4000a434: b0 10 00 10 mov %l0, %i0 4000a438: 81 c7 e0 08 ret 4000a43c: 81 e8 00 00 restore /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000a440: 11 10 00 6a sethi %hi(0x4001a800), %o0 <== NOT EXECUTED 4000a444: 15 10 00 6b sethi %hi(0x4001ac00), %o2 <== NOT EXECUTED 4000a448: 17 10 00 6b sethi %hi(0x4001ac00), %o3 <== NOT EXECUTED 4000a44c: 90 12 23 c0 or %o0, 0x3c0, %o0 <== NOT EXECUTED 4000a450: 94 12 a0 30 or %o2, 0x30, %o2 <== NOT EXECUTED 4000a454: 96 12 e0 10 or %o3, 0x10, %o3 <== NOT EXECUTED 4000a458: 7f ff de 7b call 40001e44 <__assert_func> <== NOT EXECUTED 4000a45c: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED 4000a460: 01 00 00 00 nop 4000fc94 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4000fc94: 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; 4000fc98: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 4000fc9c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4000fca0: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 4000fca4: 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; 4000fca8: e4 06 20 1c ld [ %i0 + 0x1c ], %l2 loc = temp_mt_entry->mt_fs_root; 4000fcac: c8 27 bf f0 st %g4, [ %fp + -16 ] 4000fcb0: c6 27 bf f4 st %g3, [ %fp + -12 ] 4000fcb4: c4 27 bf f8 st %g2, [ %fp + -8 ] 4000fcb8: 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; 4000fcbc: c0 26 20 1c clr [ %i0 + 0x1c ] 4000fcc0: a0 07 bf ec add %fp, -20, %l0 do { next = jnode->Parent; loc.node_access = (void *)jnode; 4000fcc4: e4 27 bf ec st %l2, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4000fcc8: e2 04 a0 08 ld [ %l2 + 8 ], %l1 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4000fccc: 7f ff fd 1c call 4000f13c 4000fcd0: 90 10 00 10 mov %l0, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 4000fcd4: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 4000fcd8: 80 a0 60 01 cmp %g1, 1 4000fcdc: 12 80 00 17 bne 4000fd38 4000fce0: 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; 4000fce4: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 4000fce8: 80 a0 40 02 cmp %g1, %g2 4000fcec: 22 80 00 14 be,a 4000fd3c 4000fcf0: 90 10 20 00 clr %o0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4000fcf4: 80 a4 a0 00 cmp %l2, 0 4000fcf8: 02 80 00 0e be 4000fd30 4000fcfc: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 4000fd00: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 4000fd04: 80 a0 60 01 cmp %g1, 1 4000fd08: 32 bf ff f0 bne,a 4000fcc8 4000fd0c: e4 27 bf ec st %l2, [ %fp + -20 ] <== NOT EXECUTED 4000fd10: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 4000fd14: 84 04 a0 54 add %l2, 0x54, %g2 4000fd18: 80 a0 40 02 cmp %g1, %g2 4000fd1c: 22 bf ff eb be,a 4000fcc8 4000fd20: e4 27 bf ec st %l2, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4000fd24: a4 90 60 00 orcc %g1, 0, %l2 4000fd28: 32 bf ff e8 bne,a 4000fcc8 4000fd2c: e4 27 bf ec st %l2, [ %fp + -20 ] return 0; } 4000fd30: 81 c7 e0 08 ret 4000fd34: 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 ); 4000fd38: 90 10 20 00 clr %o0 4000fd3c: 7f ff cd 59 call 400032a0 4000fd40: 92 10 00 10 mov %l0, %o1 if (result != 0) 4000fd44: 80 a2 20 00 cmp %o0, 0 4000fd48: 02 bf ff eb be 4000fcf4 4000fd4c: 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); 4000fd50: 81 c7 e0 08 ret <== NOT EXECUTED 4000fd54: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000a464 : const char *path, int pathlen, char *token, int *token_len ) { 4000a464: 9d e3 bf a0 save %sp, -96, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4000a468: c2 0e 00 00 ldub [ %i0 ], %g1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4000a46c: 87 28 60 18 sll %g1, 0x18, %g3 4000a470: 85 38 e0 18 sra %g3, 0x18, %g2 4000a474: 80 a0 a0 2f cmp %g2, 0x2f 4000a478: 02 80 00 34 be 4000a548 4000a47c: 80 a0 a0 5c cmp %g2, 0x5c 4000a480: 02 80 00 32 be 4000a548 4000a484: 80 a0 00 02 cmp %g0, %g2 4000a488: 84 40 20 00 addx %g0, 0, %g2 4000a48c: 80 a6 60 00 cmp %i1, 0 4000a490: 04 80 00 30 ble 4000a550 4000a494: 86 08 a0 ff and %g2, 0xff, %g3 4000a498: 86 88 a0 ff andcc %g2, 0xff, %g3 4000a49c: 02 80 00 2e be 4000a554 4000a4a0: 80 a0 e0 00 cmp %g3, 0 token[i] = c; 4000a4a4: c2 2e 80 00 stb %g1, [ %i2 ] 4000a4a8: 82 10 20 00 clr %g1 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4000a4ac: 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) ) { 4000a4b0: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 4000a4b4: 80 a0 a0 5c cmp %g2, 0x5c 4000a4b8: 02 80 00 07 be 4000a4d4 4000a4bc: c6 0e 00 01 ldub [ %i0 + %g1 ], %g3 4000a4c0: 80 a0 a0 2f cmp %g2, 0x2f 4000a4c4: 02 80 00 04 be 4000a4d4 4000a4c8: 80 a6 40 01 cmp %i1, %g1 4000a4cc: 14 80 00 18 bg 4000a52c 4000a4d0: 80 a0 a0 00 cmp %g2, 0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4000a4d4: 84 06 80 01 add %i2, %g1, %g2 4000a4d8: c4 48 bf ff ldsb [ %g2 + -1 ], %g2 4000a4dc: 80 a0 a0 00 cmp %g2, 0 4000a4e0: 32 80 00 02 bne,a 4000a4e8 4000a4e4: c0 2e 80 01 clrb [ %i2 + %g1 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 4000a4e8: 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 ) 4000a4ec: 90 10 00 1a mov %i2, %o0 4000a4f0: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000a4f4: b0 10 20 02 mov 2, %i0 4000a4f8: 40 00 11 ef call 4000ecb4 4000a4fc: 92 12 60 50 or %o1, 0x50, %o1 4000a500: 80 a2 20 00 cmp %o0, 0 4000a504: 02 80 00 19 be 4000a568 4000a508: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4000a50c: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000a510: 40 00 11 e9 call 4000ecb4 4000a514: 92 12 60 48 or %o1, 0x48, %o1 ! 4001ac48 <__FUNCTION__.5415+0x18> 4000a518: 80 a0 00 08 cmp %g0, %o0 4000a51c: b0 60 20 00 subx %g0, 0, %i0 4000a520: b0 0e 20 02 and %i0, 2, %i0 type = IMFS_CURRENT_DIR; } return type; } 4000a524: 81 c7 e0 08 ret 4000a528: 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) ) { 4000a52c: 22 bf ff eb be,a 4000a4d8 4000a530: 84 06 80 01 add %i2, %g1, %g2 <== NOT EXECUTED token[i] = c; if ( i == IMFS_NAME_MAX ) 4000a534: 80 a0 60 20 cmp %g1, 0x20 4000a538: 12 bf ff dd bne 4000a4ac 4000a53c: c6 2e 80 01 stb %g3, [ %i2 + %g1 ] 4000a540: 81 c7 e0 08 ret 4000a544: 91 e8 20 04 restore %g0, 4, %o0 4000a548: 80 a0 00 03 cmp %g0, %g3 4000a54c: 86 40 20 00 addx %g0, 0, %g3 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4000a550: 80 a0 e0 00 cmp %g3, 0 4000a554: 12 80 00 07 bne 4000a570 4000a558: 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'; 4000a55c: b0 10 20 00 clr %i0 4000a560: 82 10 20 00 clr %g1 /* * Set token_len to the number of characters copied. */ *token_len = i; 4000a564: c2 26 c0 00 st %g1, [ %i3 ] 4000a568: 81 c7 e0 08 ret 4000a56c: 81 e8 00 00 restore */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4000a570: 80 a6 60 00 cmp %i1, 0 4000a574: b0 10 20 01 mov 1, %i0 4000a578: 12 bf ff fb bne 4000a564 4000a57c: 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'; 4000a580: 10 bf ff f8 b 4000a560 4000a584: b0 10 20 00 clr %i0 4000a588 : 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 ) { 4000a588: 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, 4000a58c: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000a590: c2 00 62 68 ld [ %g1 + 0x268 ], %g1 ! 4001b668 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4000a594: 80 a0 60 10 cmp %g1, 0x10 4000a598: 02 80 00 0a be 4000a5c0 4000a59c: 86 10 20 00 clr %g3 4000a5a0: 84 10 20 20 mov 0x20, %g2 4000a5a4: 80 a0 40 02 cmp %g1, %g2 4000a5a8: 02 80 00 06 be 4000a5c0 4000a5ac: 86 00 e0 01 inc %g3 4000a5b0: 80 a0 e0 05 cmp %g3, 5 4000a5b4: 12 bf ff fc bne 4000a5a4 4000a5b8: 85 28 a0 01 sll %g2, 1, %g2 4000a5bc: 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) 4000a5c0: 05 10 00 6f sethi %hi(0x4001bc00), %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(); 4000a5c4: 40 00 0a 2d call 4000ce78 4000a5c8: c2 20 a1 ac st %g1, [ %g2 + 0x1ac ] ! 4001bdac 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; 4000a5cc: 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(); 4000a5d0: 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; 4000a5d4: 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; 4000a5d8: 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; 4000a5dc: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000a5e0: 90 06 20 38 add %i0, 0x38, %o0 4000a5e4: 40 00 10 89 call 4000e808 4000a5e8: 92 12 61 e8 or %o1, 0x1e8, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000a5ec: 90 10 20 01 mov 1, %o0 4000a5f0: 40 00 00 c5 call 4000a904 4000a5f4: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ) { 4000a5f8: 80 a2 20 00 cmp %o0, 0 4000a5fc: 02 80 00 0c be 4000a62c 4000a600: 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; 4000a604: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000a608: 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; 4000a60c: 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; 4000a610: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000a614: 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; 4000a618: 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(); 4000a61c: 40 00 07 7e call 4000c414 4000a620: b0 10 20 00 clr %i0 return 0; } 4000a624: 81 c7 e0 08 ret 4000a628: 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); 4000a62c: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 <== NOT EXECUTED 4000a630: 40 00 00 fa call 4000aa18 <== NOT EXECUTED 4000a634: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000a638: 40 00 0e 39 call 4000df1c <__errno> <== NOT EXECUTED 4000a63c: 01 00 00 00 nop <== NOT EXECUTED 4000a640: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000a644: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a648: 81 c7 e0 08 ret <== NOT EXECUTED 4000a64c: 81 e8 00 00 restore <== NOT EXECUTED 40002eec : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40002eec: 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; 40002ef0: c2 06 00 00 ld [ %i0 ], %g1 40002ef4: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40002ef8: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 40002efc: 80 a0 60 07 cmp %g1, 7 40002f00: 18 80 00 1f bgu 40002f7c 40002f04: 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 ); 40002f08: 40 00 46 62 call 40014890 40002f0c: 90 10 00 1a mov %i2, %o0 40002f10: a0 07 bf b0 add %fp, -80, %l0 40002f14: 92 10 00 08 mov %o0, %o1 40002f18: 96 07 bf fc add %fp, -4, %o3 40002f1c: 94 10 00 10 mov %l0, %o2 40002f20: 40 00 33 bf call 4000fe1c 40002f24: 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( 40002f28: 90 10 00 19 mov %i1, %o0 40002f2c: 94 10 00 10 mov %l0, %o2 40002f30: 92 10 20 03 mov 3, %o1 40002f34: 17 00 00 28 sethi %hi(0xa000), %o3 40002f38: 98 07 bf d8 add %fp, -40, %o4 40002f3c: 40 00 30 31 call 4000f000 40002f40: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40002f44: 80 a2 20 00 cmp %o0, 0 40002f48: 02 80 00 13 be 40002f94 40002f4c: 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 ); 40002f50: 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++; 40002f54: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 40002f58: 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++; 40002f5c: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 40002f60: 40 00 02 de call 40003ad8 40002f64: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] 40002f68: c4 07 bf f4 ld [ %fp + -12 ], %g2 40002f6c: c2 07 bf d8 ld [ %fp + -40 ], %g1 40002f70: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40002f74: 81 c7 e0 08 ret 40002f78: 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 ); 40002f7c: 40 00 42 a7 call 40013a18 <__errno> 40002f80: b0 10 3f ff mov -1, %i0 40002f84: 82 10 20 1f mov 0x1f, %g1 40002f88: c2 22 00 00 st %g1, [ %o0 ] 40002f8c: 81 c7 e0 08 ret 40002f90: 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 ); 40002f94: 40 00 42 a1 call 40013a18 <__errno> <== NOT EXECUTED 40002f98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002f9c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40002fa0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002fa4: 81 c7 e0 08 ret <== NOT EXECUTED 40002fa8: 81 e8 00 00 restore <== NOT EXECUTED 40012368 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40012368: 9d e3 bf a0 save %sp, -96, %sp block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4001236c: 80 a6 20 00 cmp %i0, 0 40012370: 02 80 00 18 be 400123d0 40012374: 11 10 00 83 sethi %hi(0x40020c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012378: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001237c: 80 a0 60 05 cmp %g1, 5 40012380: 12 80 00 1b bne 400123ec 40012384: 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 ); 40012388: 92 10 00 19 mov %i1, %o1 4001238c: 7f ff fe 64 call 40011d1c 40012390: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 40012394: 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 ); 40012398: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 4001239c: 80 a0 60 00 cmp %g1, 0 400123a0: 02 80 00 04 be 400123b0 400123a4: b0 10 20 00 clr %i0 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 400123a8: 81 c7 e0 08 ret 400123ac: 81 e8 00 00 restore #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 400123b0: 7f ff fe 4e call 40011ce8 400123b4: b0 10 20 01 mov 1, %i0 if ( !memory ) 400123b8: 80 a2 20 00 cmp %o0, 0 400123bc: 02 bf ff fb be 400123a8 400123c0: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 400123c4: d0 24 00 00 st %o0, [ %l0 ] return 0; } 400123c8: 81 c7 e0 08 ret 400123cc: 91 e8 20 00 restore %g0, 0, %o0 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 400123d0: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 400123d4: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 400123d8: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 400123dc: 94 12 a3 b0 or %o2, 0x3b0, %o2 <== NOT EXECUTED 400123e0: 96 12 e2 50 or %o3, 0x250, %o3 <== NOT EXECUTED 400123e4: 7f ff c4 59 call 40003548 <__assert_func> <== NOT EXECUTED 400123e8: 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 ); 400123ec: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 400123f0: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 400123f4: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 400123f8: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 400123fc: 94 12 a3 b0 or %o2, 0x3b0, %o2 <== NOT EXECUTED 40012400: 96 12 e2 60 or %o3, 0x260, %o3 <== NOT EXECUTED 40012404: 7f ff c4 51 call 40003548 <__assert_func> <== NOT EXECUTED 40012408: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 4001240c: 01 00 00 00 nop 40012410 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40012410: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012414: 80 a6 20 00 cmp %i0, 0 40012418: 02 80 00 5e be 40012590 4001241c: 11 10 00 83 sethi %hi(0x40020c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012420: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012424: 80 a0 60 05 cmp %g1, 5 40012428: 12 80 00 53 bne 40012574 4001242c: 03 10 00 87 sethi %hi(0x40021c00), %g1 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 40012430: e2 00 62 34 ld [ %g1 + 0x234 ], %l1 ! 40021e34 40012434: a1 34 60 02 srl %l1, 2, %l0 40012438: 92 10 00 10 mov %l0, %o1 4001243c: 40 00 2a 72 call 4001ce04 <.umul> 40012440: 90 04 20 01 add %l0, 1, %o0 40012444: 92 10 00 10 mov %l0, %o1 40012448: 40 00 2a 6f call 4001ce04 <.umul> 4001244c: 90 02 20 01 inc %o0 40012450: 92 10 00 11 mov %l1, %o1 40012454: 40 00 2a 6c call 4001ce04 <.umul> 40012458: 90 02 3f ff add %o0, -1, %o0 4001245c: 82 10 20 00 clr %g1 40012460: 80 a0 40 19 cmp %g1, %i1 40012464: 34 80 00 0e bg,a 4001249c 40012468: e4 06 20 50 ld [ %i0 + 0x50 ], %l2 <== NOT EXECUTED 4001246c: 80 a0 40 19 cmp %g1, %i1 40012470: 02 80 00 08 be 40012490 40012474: 80 a2 00 1a cmp %o0, %i2 rtems_set_errno_and_return_minus_one( EINVAL ); 40012478: 40 00 05 68 call 40013a18 <__errno> <== NOT EXECUTED 4001247c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012480: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40012484: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012488: 81 c7 e0 08 ret <== NOT EXECUTED 4001248c: 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 ) 40012490: 08 bf ff fa bleu 40012478 40012494: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 40012498: e4 06 20 50 ld [ %i0 + 0x50 ], %l2 4001249c: 80 a6 40 12 cmp %i1, %l2 400124a0: 04 80 00 2a ble 40012548 400124a4: 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; 400124a8: a7 3c 60 1f sra %l1, 0x1f, %l3 <== NOT EXECUTED 400124ac: 96 10 00 11 mov %l1, %o3 400124b0: 94 10 00 13 mov %l3, %o2 400124b4: 90 10 00 19 mov %i1, %o0 400124b8: 40 00 2c 18 call 4001d518 <__divdi3> 400124bc: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 400124c0: 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; 400124c4: a0 10 00 09 mov %o1, %l0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 400124c8: 94 10 00 13 mov %l3, %o2 400124cc: 92 10 00 14 mov %l4, %o1 400124d0: 40 00 2c 12 call 4001d518 <__divdi3> 400124d4: 96 10 00 11 mov %l1, %o3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 400124d8: 80 a4 00 09 cmp %l0, %o1 400124dc: 0a 80 00 1f bcs 40012558 400124e0: a4 10 00 09 mov %o1, %l2 400124e4: 10 80 00 05 b 400124f8 400124e8: a2 10 00 09 mov %o1, %l1 400124ec: 80 a4 00 11 cmp %l0, %l1 400124f0: 2a 80 00 1b bcs,a 4001255c 400124f4: f4 26 20 54 st %i2, [ %i0 + 0x54 ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 400124f8: 90 10 00 18 mov %i0, %o0 400124fc: 7f ff ff 9b call 40012368 40012500: 92 10 00 11 mov %l1, %o1 40012504: 80 a2 20 00 cmp %o0, 0 40012508: 22 bf ff f9 be,a 400124ec 4001250c: a2 04 60 01 inc %l1 for ( ; block>=old_blocks ; block-- ) { 40012510: 10 80 00 06 b 40012528 <== NOT EXECUTED 40012514: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 40012518: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001251c: 7f ff fe d0 call 4001205c <== NOT EXECUTED 40012520: 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-- ) { 40012524: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 40012528: 08 bf ff fc bleu 40012518 <== NOT EXECUTED 4001252c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 40012530: 40 00 05 3a call 40013a18 <__errno> <== NOT EXECUTED 40012534: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012538: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4001253c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012540: 81 c7 e0 08 ret <== NOT EXECUTED 40012544: 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 ) 40012548: 02 80 00 08 be 40012568 4001254c: 80 a6 80 14 cmp %i2, %l4 40012550: 81 c7 e0 08 ret 40012554: 91 e8 20 00 restore %g0, 0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 40012558: f4 26 20 54 st %i2, [ %i0 + 0x54 ] <== NOT EXECUTED 4001255c: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 40012560: 81 c7 e0 08 ret 40012564: 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 ) 40012568: 18 bf ff d1 bgu 400124ac 4001256c: a7 3c 60 1f sra %l1, 0x1f, %l3 40012570: 30 bf ff f8 b,a 40012550 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012574: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012578: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 4001257c: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012580: 94 12 a3 c8 or %o2, 0x3c8, %o2 <== NOT EXECUTED 40012584: 96 12 e2 60 or %o3, 0x260, %o3 <== NOT EXECUTED 40012588: 7f ff c3 f0 call 40003548 <__assert_func> <== NOT EXECUTED 4001258c: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40012590: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012594: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012598: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 4001259c: 94 12 a3 c8 or %o2, 0x3c8, %o2 <== NOT EXECUTED 400125a0: 96 12 e2 50 or %o3, 0x250, %o3 <== NOT EXECUTED 400125a4: 7f ff c3 e9 call 40003548 <__assert_func> <== NOT EXECUTED 400125a8: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED 400125ac: 01 00 00 00 nop 40011d1c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40011d1c: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40011d20: 80 a6 20 00 cmp %i0, 0 40011d24: 02 80 00 91 be 40011f68 40011d28: 11 10 00 83 sethi %hi(0x40020c00), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40011d2c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40011d30: 80 a0 60 05 cmp %g1, 5 40011d34: 12 80 00 94 bne 40011f84 40011d38: 03 10 00 87 sethi %hi(0x40021c00), %g1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40011d3c: e0 00 62 34 ld [ %g1 + 0x234 ], %l0 ! 40021e34 40011d40: a1 34 20 02 srl %l0, 2, %l0 40011d44: 82 04 3f ff add %l0, -1, %g1 40011d48: 80 a6 40 01 cmp %i1, %g1 40011d4c: 08 80 00 20 bleu 40011dcc 40011d50: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40011d54: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED 40011d58: 40 00 2c 2b call 4001ce04 <.umul> <== NOT EXECUTED 40011d5c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40011d60: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 40011d64: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40011d68: 18 80 00 21 bgu 40011dec <== NOT EXECUTED 40011d6c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40011d70: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40011d74: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40011d78: 40 00 2d 09 call 4001d19c <.urem> <== NOT EXECUTED 40011d7c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40011d80: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40011d84: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40011d88: 40 00 2c 59 call 4001ceec <.udiv> <== NOT EXECUTED 40011d8c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40011d90: 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; 40011d94: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40011d98: 02 80 00 42 be 40011ea0 <== NOT EXECUTED 40011d9c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 40011da0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011da4: 02 80 00 5e be 40011f1c <== NOT EXECUTED 40011da8: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 40011dac: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40011db0: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 40011db4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011db8: 02 80 00 52 be 40011f00 <== NOT EXECUTED 40011dbc: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 40011dc0: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40011dc4: 81 c7 e0 08 ret <== NOT EXECUTED 40011dc8: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40011dcc: 02 80 00 40 be 40011ecc 40011dd0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 if ( !p ) { 40011dd4: 80 a2 20 00 cmp %o0, 0 40011dd8: 02 80 00 43 be 40011ee4 40011ddc: 01 00 00 00 nop p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 40011de0: b3 2e 60 02 sll %i1, 2, %i1 40011de4: 81 c7 e0 08 ret 40011de8: 91 ea 00 19 restore %o0, %i1, %o0 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 40011dec: 90 02 20 01 inc %o0 <== NOT EXECUTED 40011df0: 40 00 2c 05 call 4001ce04 <.umul> <== NOT EXECUTED 40011df4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40011df8: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40011dfc: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40011e00: 18 80 00 31 bgu 40011ec4 <== NOT EXECUTED 40011e04: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 40011e08: a2 26 40 11 sub %i1, %l1, %l1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40011e0c: 40 00 2c e4 call 4001d19c <.urem> <== NOT EXECUTED 40011e10: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40011e14: 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; 40011e18: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40011e1c: 40 00 2c 34 call 4001ceec <.udiv> <== NOT EXECUTED 40011e20: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40011e24: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40011e28: 40 00 2c 31 call 4001ceec <.udiv> <== NOT EXECUTED 40011e2c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40011e30: 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; 40011e34: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40011e38: 40 00 2c d9 call 4001d19c <.urem> <== NOT EXECUTED 40011e3c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40011e40: 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; 40011e44: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40011e48: 02 80 00 3c be 40011f38 <== NOT EXECUTED 40011e4c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 40011e50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011e54: 02 80 00 53 be 40011fa0 <== NOT EXECUTED 40011e58: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 40011e5c: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40011e60: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 40011e64: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011e68: 02 80 00 55 be 40011fbc <== NOT EXECUTED 40011e6c: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 40011e70: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40011e74: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 40011e78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011e7c: 12 bf ff d9 bne 40011de0 <== NOT EXECUTED 40011e80: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40011e84: 7f ff ff 99 call 40011ce8 <== NOT EXECUTED 40011e88: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40011e8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011e90: 22 80 00 13 be,a 40011edc <== NOT EXECUTED 40011e94: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40011e98: 10 bf ff d2 b 40011de0 <== NOT EXECUTED 40011e9c: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 40011ea0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011ea4: 02 80 00 0e be 40011edc <== NOT EXECUTED 40011ea8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40011eac: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 40011eb0: 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 ]; 40011eb4: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40011eb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011ebc: 12 80 00 08 bne 40011edc <== NOT EXECUTED 40011ec0: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40011ec4: 81 c7 e0 08 ret <== NOT EXECUTED 40011ec8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 40011ecc: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40011ed0: 80 a2 20 00 cmp %o0, 0 40011ed4: 02 bf ff fc be 40011ec4 40011ed8: b0 02 00 19 add %o0, %i1, %i0 /* * This means the requested block number is out of range. */ return 0; } 40011edc: 81 c7 e0 08 ret 40011ee0: 81 e8 00 00 restore p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40011ee4: 7f ff ff 81 call 40011ce8 40011ee8: 01 00 00 00 nop if ( !p ) 40011eec: 80 a2 20 00 cmp %o0, 0 40011ef0: 22 bf ff fb be,a 40011edc 40011ef4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 40011ef8: 10 bf ff ba b 40011de0 40011efc: d0 26 20 58 st %o0, [ %i0 + 0x58 ] info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 40011f00: 7f ff ff 7a call 40011ce8 <== NOT EXECUTED 40011f04: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40011f08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011f0c: 22 bf ff f4 be,a 40011edc <== NOT EXECUTED 40011f10: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40011f14: 10 bf ff ab b 40011dc0 <== NOT EXECUTED 40011f18: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40011f1c: 7f ff ff 73 call 40011ce8 <== NOT EXECUTED 40011f20: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40011f24: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40011f28: 22 bf ff ed be,a 40011edc <== NOT EXECUTED 40011f2c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40011f30: 10 bf ff 9f b 40011dac <== NOT EXECUTED 40011f34: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 40011f38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011f3c: 02 bf ff e8 be 40011edc <== NOT EXECUTED 40011f40: 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 ]; 40011f44: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40011f48: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 40011f4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011f50: 02 bf ff e3 be 40011edc <== NOT EXECUTED 40011f54: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40011f58: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 40011f5c: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 40011f60: 81 c7 e0 08 ret <== NOT EXECUTED 40011f64: 91 ee 00 19 restore %i0, %i1, %o0 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40011f68: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40011f6c: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40011f70: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40011f74: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 40011f78: 96 12 e2 50 or %o3, 0x250, %o3 <== NOT EXECUTED 40011f7c: 7f ff c5 73 call 40003548 <__assert_func> <== NOT EXECUTED 40011f80: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40011f84: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40011f88: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40011f8c: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40011f90: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 40011f94: 96 12 e2 60 or %o3, 0x260, %o3 <== NOT EXECUTED 40011f98: 7f ff c5 6c call 40003548 <__assert_func> <== NOT EXECUTED 40011f9c: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40011fa0: 7f ff ff 52 call 40011ce8 <== NOT EXECUTED 40011fa4: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40011fa8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40011fac: 22 bf ff cc be,a 40011edc <== NOT EXECUTED 40011fb0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 40011fb4: 10 bf ff aa b 40011e5c <== NOT EXECUTED 40011fb8: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 40011fbc: 7f ff ff 4b call 40011ce8 <== NOT EXECUTED 40011fc0: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40011fc4: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40011fc8: 22 bf ff c5 be,a 40011edc <== NOT EXECUTED 40011fcc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40011fd0: 10 bf ff a8 b 40011e70 <== NOT EXECUTED 40011fd4: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED 40012a58 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40012a58: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012a5c: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40012a60: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 40012a64: 02 80 00 ae be 40012d1c 40012a68: 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 || 40012a6c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40012a70: 84 00 7f fb add %g1, -5, %g2 40012a74: 80 a0 a0 01 cmp %g2, 1 40012a78: 18 80 00 a1 bgu 40012cfc 40012a7c: 80 a6 e0 00 cmp %i3, 0 /* * Error checks on arguments */ assert( dest ); 40012a80: 02 80 00 b7 be 40012d5c 40012a84: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 40012a88: 02 80 00 87 be 40012ca4 40012a8c: 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) { 40012a90: 02 80 00 5e be 40012c08 40012a94: 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 ) 40012a98: 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; 40012a9c: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 40012aa0: 80 a0 c0 02 cmp %g3, %g2 40012aa4: c8 04 20 54 ld [ %l0 + 0x54 ], %g4 40012aa8: 14 80 00 56 bg 40012c00 40012aac: 9a 07 00 1a add %i4, %i2, %o5 40012ab0: 80 a0 c0 02 cmp %g3, %g2 40012ab4: 02 80 00 51 be 40012bf8 40012ab8: 80 a3 40 04 cmp %o5, %g4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40012abc: 29 10 00 87 sethi %hi(0x40021c00), %l4 40012ac0: e2 05 22 34 ld [ %l4 + 0x234 ], %l1 ! 40021e34 40012ac4: 90 10 00 12 mov %l2, %o0 40012ac8: ab 3c 60 1f sra %l1, 0x1f, %l5 40012acc: 96 10 00 11 mov %l1, %o3 40012ad0: 94 10 00 15 mov %l5, %o2 40012ad4: 40 00 2b 78 call 4001d8b4 <__moddi3> 40012ad8: 92 10 00 13 mov %l3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012adc: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40012ae0: ac 10 00 09 mov %o1, %l6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012ae4: 94 10 00 15 mov %l5, %o2 40012ae8: 92 10 00 13 mov %l3, %o1 40012aec: 40 00 2a 8b call 4001d518 <__divdi3> 40012af0: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40012af4: 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; 40012af8: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 40012afc: aa 10 00 1b mov %i3, %l5 40012b00: 02 80 00 14 be 40012b50 40012b04: 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 ); 40012b08: 90 10 00 10 mov %l0, %o0 40012b0c: 7f ff fc 84 call 40011d1c 40012b10: 94 10 20 00 clr %o2 assert( block_ptr ); 40012b14: 80 a2 20 00 cmp %o0, 0 40012b18: 02 80 00 89 be 40012d3c 40012b1c: 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; 40012b20: 80 a7 00 11 cmp %i4, %l1 40012b24: 18 80 00 4c bgu 40012c54 40012b28: 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 ); 40012b2c: d2 02 00 00 ld [ %o0 ], %o1 40012b30: 94 10 00 18 mov %i0, %o2 40012b34: 90 10 00 1b mov %i3, %o0 40012b38: 40 00 05 f3 call 40014304 40012b3c: 92 02 40 16 add %o1, %l6, %o1 dest += to_copy; block++; my_length -= to_copy; 40012b40: e2 05 22 34 ld [ %l4 + 0x234 ], %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; 40012b44: aa 06 c0 18 add %i3, %i0, %l5 block++; 40012b48: a4 04 a0 01 inc %l2 my_length -= to_copy; 40012b4c: 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 ) { 40012b50: 80 a7 00 11 cmp %i4, %l1 40012b54: 0a 80 00 15 bcs 40012ba8 40012b58: 80 a7 20 00 cmp %i4, 0 40012b5c: a8 15 22 34 or %l4, 0x234, %l4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40012b60: 90 10 00 10 mov %l0, %o0 40012b64: 92 10 00 12 mov %l2, %o1 40012b68: 7f ff fc 6d call 40011d1c 40012b6c: 94 10 20 00 clr %o2 assert( block_ptr ); 40012b70: 80 a2 20 00 cmp %o0, 0 40012b74: 02 80 00 52 be 40012cbc 40012b78: 94 10 00 11 mov %l1, %o2 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 40012b7c: d2 02 00 00 ld [ %o0 ], %o1 40012b80: 40 00 05 e1 call 40014304 40012b84: 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 ) { 40012b88: 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; 40012b8c: 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; 40012b90: 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 ) { 40012b94: 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++; 40012b98: 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 ) { 40012b9c: 08 bf ff f1 bleu 40012b60 40012ba0: 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 ) { 40012ba4: 80 a7 20 00 cmp %i4, 0 40012ba8: 02 80 00 0e be 40012be0 40012bac: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40012bb0: 92 10 00 12 mov %l2, %o1 40012bb4: 90 10 00 10 mov %l0, %o0 40012bb8: 7f ff fc 59 call 40011d1c 40012bbc: 94 10 20 00 clr %o2 assert( block_ptr ); 40012bc0: 80 a2 20 00 cmp %o0, 0 40012bc4: 02 80 00 46 be 40012cdc 40012bc8: b0 06 00 1c add %i0, %i4, %i0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 40012bcc: d2 02 00 00 ld [ %o0 ], %o1 40012bd0: 90 10 00 15 mov %l5, %o0 40012bd4: 40 00 05 cc call 40014304 40012bd8: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 40012bdc: 90 07 bf f8 add %fp, -8, %o0 40012be0: 7f ff c3 be call 40003ad8 40012be4: 92 10 20 00 clr %o1 40012be8: c2 07 bf f8 ld [ %fp + -8 ], %g1 40012bec: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return copied; } 40012bf0: 81 c7 e0 08 ret 40012bf4: 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 ) 40012bf8: 08 bf ff b2 bleu 40012ac0 40012bfc: 29 10 00 87 sethi %hi(0x40021c00), %l4 my_length = the_jnode->info.file.size - start; 40012c00: 10 bf ff af b 40012abc 40012c04: 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)) 40012c08: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 40012c0c: 82 10 20 00 clr %g1 <== NOT EXECUTED 40012c10: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 40012c14: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 40012c18: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40012c1c: 04 80 00 10 ble 40012c5c <== NOT EXECUTED 40012c20: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 40012c24: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 40012c28: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40012c2c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40012c30: 40 00 05 b5 call 40014304 <== NOT EXECUTED 40012c34: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40012c38: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40012c3c: 7f ff c3 a7 call 40003ad8 <== NOT EXECUTED 40012c40: 92 10 20 00 clr %o1 <== NOT EXECUTED 40012c44: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40012c48: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 40012c4c: 81 c7 e0 08 ret <== NOT EXECUTED 40012c50: 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; 40012c54: 10 bf ff b6 b 40012b2c 40012c58: 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)) 40012c5c: 02 80 00 0d be 40012c90 <== NOT EXECUTED 40012c60: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 40012c64: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40012c68: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40012c6c: 40 00 05 a6 call 40014304 <== NOT EXECUTED 40012c70: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40012c74: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40012c78: 7f ff c3 98 call 40003ad8 <== NOT EXECUTED 40012c7c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40012c80: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40012c84: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 40012c88: 81 c7 e0 08 ret <== NOT EXECUTED 40012c8c: 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)) 40012c90: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 40012c94: 38 bf ff e5 bgu,a 40012c28 <== NOT EXECUTED 40012c98: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED 40012c9c: 10 bf ff f2 b 40012c64 <== NOT EXECUTED 40012ca0: 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 ); 40012ca4: 40 00 03 5d call 40013a18 <__errno> <== NOT EXECUTED 40012ca8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012cac: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40012cb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012cb4: 81 c7 e0 08 ret <== NOT EXECUTED 40012cb8: 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 ); 40012cbc: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40012cc0: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012cc4: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012cc8: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012ccc: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40012cd0: 96 12 e2 98 or %o3, 0x298, %o3 <== NOT EXECUTED 40012cd4: 7f ff c2 1d call 40003548 <__assert_func> <== NOT EXECUTED 40012cd8: 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 ); 40012cdc: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40012ce0: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012ce4: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012ce8: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012cec: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40012cf0: 96 12 e2 98 or %o3, 0x298, %o3 <== NOT EXECUTED 40012cf4: 7f ff c2 15 call 40003548 <__assert_func> <== NOT EXECUTED 40012cf8: 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 || 40012cfc: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40012d00: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012d04: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012d08: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012d0c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40012d10: 96 12 e2 b0 or %o3, 0x2b0, %o3 <== NOT EXECUTED 40012d14: 7f ff c2 0d call 40003548 <__assert_func> <== NOT EXECUTED 40012d18: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40012d1c: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40012d20: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012d24: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012d28: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012d2c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40012d30: 96 12 e2 50 or %o3, 0x250, %o3 <== NOT EXECUTED 40012d34: 7f ff c2 05 call 40003548 <__assert_func> <== NOT EXECUTED 40012d38: 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 ); 40012d3c: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40012d40: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012d44: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012d48: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012d4c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40012d50: 96 12 e2 98 or %o3, 0x298, %o3 <== NOT EXECUTED 40012d54: 7f ff c1 fd call 40003548 <__assert_func> <== NOT EXECUTED 40012d58: 92 10 22 96 mov 0x296, %o1 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 40012d5c: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40012d60: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012d64: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012d68: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012d6c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40012d70: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 40012d74: 7f ff c1 f5 call 40003548 <__assert_func> <== NOT EXECUTED 40012d78: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED 40012d7c: 01 00 00 00 nop 400120b8 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 400120b8: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400120bc: 80 a6 20 00 cmp %i0, 0 400120c0: 02 80 00 62 be 40012248 400120c4: 11 10 00 83 sethi %hi(0x40020c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400120c8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400120cc: 80 a0 60 05 cmp %g1, 5 400120d0: 12 80 00 65 bne 40012264 400120d4: 23 10 00 87 sethi %hi(0x40021c00), %l1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400120d8: 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; 400120dc: e6 04 62 34 ld [ %l1 + 0x234 ], %l3 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400120e0: 80 a0 60 00 cmp %g1, 0 400120e4: 02 80 00 05 be 400120f8 400120e8: a7 34 e0 02 srl %l3, 2, %l3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 400120ec: 90 06 20 58 add %i0, 0x58, %o0 400120f0: 7f ff ff ba call 40011fd8 400120f4: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 400120f8: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 400120fc: 80 a0 60 00 cmp %g1, 0 40012100: 02 80 00 1b be 4001216c 40012104: c4 04 62 34 ld [ %l1 + 0x234 ], %g2 for ( i=0 ; i <== NOT EXECUTED 40012114: 90 10 20 00 clr %o0 <== NOT EXECUTED 40012118: 25 10 00 87 sethi %hi(0x40021c00), %l2 <== NOT EXECUTED 4001211c: a4 14 a2 34 or %l2, 0x234, %l2 ! 40021e34 <== NOT EXECUTED 40012120: 10 80 00 03 b 4001212c <== NOT EXECUTED 40012124: a0 10 20 00 clr %l0 <== NOT EXECUTED 40012128: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 4001212c: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40012130: c4 00 40 08 ld [ %g1 + %o0 ], %g2 <== NOT EXECUTED 40012134: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40012138: 02 80 00 04 be 40012148 <== NOT EXECUTED 4001213c: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40012140: 7f ff ff a6 call 40011fd8 <== NOT EXECUTED 40012144: 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 4001215c: 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 ); 40012160: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 40012164: 7f ff ff 9d call 40011fd8 <== NOT EXECUTED 40012168: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 4001216c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 40012170: 80 a2 20 00 cmp %o0, 0 40012174: 02 80 00 33 be 40012240 40012178: c2 04 62 34 ld [ %l1 + 0x234 ], %g1 for ( i=0 ; i <== NOT EXECUTED 40012188: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 4001218c: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40012190: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40012194: 22 80 00 29 be,a 40012238 <== NOT EXECUTED 40012198: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 4001219c: 25 10 00 87 sethi %hi(0x40021c00), %l2 <== NOT EXECUTED 400121a0: aa 10 20 00 clr %l5 <== NOT EXECUTED 400121a4: a4 14 a2 34 or %l2, 0x234, %l2 <== NOT EXECUTED 400121a8: a8 10 20 00 clr %l4 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 400121b4: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 400121b8: 90 10 20 00 clr %o0 <== NOT EXECUTED 400121bc: a0 10 20 00 clr %l0 <== NOT EXECUTED if ( p[j] ) { 400121c0: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 400121c4: c2 04 40 08 ld [ %l1 + %o0 ], %g1 <== NOT EXECUTED 400121c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400121cc: 02 80 00 04 be 400121dc <== NOT EXECUTED 400121d0: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 400121d4: 7f ff ff 81 call 40011fd8 <== NOT EXECUTED 400121d8: 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 400121f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400121f4: 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( 400121f8: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 400121fc: 7f ff ff 77 call 40011fd8 <== NOT EXECUTED 40012200: 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 40012218: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 4001221c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40012220: ab 2d 20 02 sll %l4, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 40012224: e2 02 00 15 ld [ %o0 + %l5 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40012228: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4001222c: 12 bf ff e1 bne 400121b0 <== NOT EXECUTED 40012230: 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( 40012234: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 40012238: 7f ff ff 68 call 40011fd8 <== NOT EXECUTED 4001223c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 40012240: 81 c7 e0 08 ret 40012244: 91 e8 20 00 restore %g0, 0, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 40012248: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 4001224c: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012250: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012254: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 40012258: 96 12 e2 50 or %o3, 0x250, %o3 <== NOT EXECUTED 4001225c: 7f ff c4 bb call 40003548 <__assert_func> <== NOT EXECUTED 40012260: 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 ); 40012264: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012268: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 4001226c: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012270: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 40012274: 96 12 e2 60 or %o3, 0x260, %o3 <== NOT EXECUTED 40012278: 7f ff c4 b4 call 40003548 <__assert_func> <== NOT EXECUTED 4001227c: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 40012280: 01 00 00 00 nop 4001205c : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4001205c: 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 ); 40012060: 94 10 20 00 clr %o2 <== NOT EXECUTED 40012064: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40012068: 7f ff ff 2d call 40011d1c <== NOT EXECUTED 4001206c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 40012070: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012074: 02 80 00 08 be 40012094 <== NOT EXECUTED 40012078: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 4001207c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_ptr = 0; 40012080: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 40012084: 7f ff ff 10 call 40011cc4 <== NOT EXECUTED 40012088: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED } return 1; } 4001208c: 81 c7 e0 08 ret <== NOT EXECUTED 40012090: 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 ); 40012094: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40012098: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 4001209c: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 400120a0: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 400120a4: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED 400120a8: 96 12 e2 98 or %o3, 0x298, %o3 <== NOT EXECUTED 400120ac: 7f ff c5 27 call 40003548 <__assert_func> <== NOT EXECUTED 400120b0: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED 400120b4: 01 00 00 00 nop 400126dc : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 400126dc: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400126e0: a0 96 20 00 orcc %i0, 0, %l0 400126e4: 02 80 00 85 be 400128f8 400126e8: 11 10 00 83 sethi %hi(0x40020c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400126ec: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400126f0: 80 a0 60 05 cmp %g1, 5 400126f4: 12 80 00 8f bne 40012930 400126f8: 80 a6 e0 00 cmp %i3, 0 /* * Error check arguments */ assert( source ); 400126fc: 02 80 00 86 be 40012914 40012700: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 40012704: 02 80 00 67 be 400128a0 40012708: 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 ) { 4001270c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40012710: 80 a0 60 00 cmp %g1, 0 40012714: 06 80 00 57 bl 40012870 40012718: 94 07 00 1a add %i4, %i2, %o2 4001271c: 80 a0 60 00 cmp %g1, 0 40012720: 22 80 00 51 be,a 40012864 40012724: 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; 40012728: 25 10 00 87 sethi %hi(0x40021c00), %l2 <== NOT EXECUTED 4001272c: e2 04 a2 34 ld [ %l2 + 0x234 ], %l1 ! 40021e34 40012730: 90 10 00 19 mov %i1, %o0 40012734: a7 3c 60 1f sra %l1, 0x1f, %l3 40012738: 96 10 00 11 mov %l1, %o3 4001273c: 94 10 00 13 mov %l3, %o2 40012740: 40 00 2c 5d call 4001d8b4 <__moddi3> 40012744: 92 10 00 1a mov %i2, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012748: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001274c: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012750: 90 10 00 19 mov %i1, %o0 40012754: 92 10 00 1a mov %i2, %o1 40012758: 40 00 2b 70 call 4001d518 <__divdi3> 4001275c: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40012760: b0 10 20 00 clr %i0 40012764: 80 a5 20 00 cmp %l4, 0 40012768: 02 80 00 14 be 400127b8 4001276c: 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 ); 40012770: 90 10 00 10 mov %l0, %o0 40012774: 7f ff fd 6a call 40011d1c 40012778: 94 10 20 00 clr %o2 assert( block_ptr ); 4001277c: 80 a2 20 00 cmp %o0, 0 40012780: 02 80 00 73 be 4001294c 40012784: 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; 40012788: 80 a6 00 1c cmp %i0, %i4 4001278c: 38 80 00 02 bgu,a 40012794 40012790: 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 ); 40012794: d0 02 00 00 ld [ %o0 ], %o0 40012798: 92 10 00 1b mov %i3, %o1 4001279c: 90 02 00 14 add %o0, %l4, %o0 400127a0: 40 00 06 d9 call 40014304 400127a4: 94 10 00 18 mov %i0, %o2 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 400127a8: e2 04 a2 34 ld [ %l2 + 0x234 ], %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; 400127ac: b6 06 c0 18 add %i3, %i0, %i3 block++; 400127b0: a6 04 e0 01 inc %l3 my_length -= to_copy; 400127b4: 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 ) { 400127b8: 80 a7 00 11 cmp %i4, %l1 400127bc: 0a 80 00 15 bcs 40012810 400127c0: 80 a7 20 00 cmp %i4, 0 400127c4: a4 14 a2 34 or %l2, 0x234, %l2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400127c8: 90 10 00 10 mov %l0, %o0 400127cc: 92 10 00 13 mov %l3, %o1 400127d0: 7f ff fd 53 call 40011d1c 400127d4: 94 10 20 00 clr %o2 assert( block_ptr ); 400127d8: 80 a2 20 00 cmp %o0, 0 400127dc: 02 80 00 37 be 400128b8 400127e0: 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 ); 400127e4: d0 02 00 00 ld [ %o0 ], %o0 400127e8: 40 00 06 c7 call 40014304 400127ec: 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 ) { 400127f0: 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; 400127f4: 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; 400127f8: 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 ) { 400127fc: 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++; 40012800: 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 ) { 40012804: 08 bf ff f1 bleu 400127c8 40012808: b0 06 00 11 add %i0, %l1, %i0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4001280c: 80 a7 20 00 cmp %i4, 0 40012810: 02 80 00 0e be 40012848 40012814: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40012818: 92 10 00 13 mov %l3, %o1 4001281c: 90 10 00 10 mov %l0, %o0 40012820: 7f ff fd 3f call 40011d1c 40012824: 94 10 20 00 clr %o2 assert( block_ptr ); 40012828: 80 a2 20 00 cmp %o0, 0 4001282c: 02 80 00 2b be 400128d8 40012830: 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 ); 40012834: d0 02 00 00 ld [ %o0 ], %o0 40012838: 92 10 00 1b mov %i3, %o1 4001283c: 40 00 06 b2 call 40014304 40012840: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 40012844: 90 07 bf f8 add %fp, -8, %o0 40012848: 7f ff c4 a4 call 40003ad8 4001284c: 92 10 20 00 clr %o1 40012850: c2 07 bf f8 ld [ %fp + -8 ], %g1 40012854: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40012858: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 4001285c: 81 c7 e0 08 ret 40012860: 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 ) { 40012864: 80 a0 40 0a cmp %g1, %o2 40012868: 1a bf ff b1 bcc 4001272c 4001286c: 25 10 00 87 sethi %hi(0x40021c00), %l2 status = IMFS_memfile_extend( the_jnode, last_byte ); 40012870: 90 10 00 10 mov %l0, %o0 40012874: 7f ff fe e7 call 40012410 40012878: 92 10 20 00 clr %o1 if ( status ) 4001287c: 80 a2 20 00 cmp %o0, 0 40012880: 02 bf ff ab be 4001272c 40012884: 25 10 00 87 sethi %hi(0x40021c00), %l2 rtems_set_errno_and_return_minus_one( ENOSPC ); 40012888: 40 00 04 64 call 40013a18 <__errno> <== NOT EXECUTED 4001288c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012890: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40012894: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012898: 81 c7 e0 08 ret <== NOT EXECUTED 4001289c: 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 ); 400128a0: 40 00 04 5e call 40013a18 <__errno> <== NOT EXECUTED 400128a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400128a8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400128ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400128b0: 81 c7 e0 08 ret <== NOT EXECUTED 400128b4: 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 ); 400128b8: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 400128bc: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 400128c0: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 400128c4: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 400128c8: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 400128cc: 96 12 e2 98 or %o3, 0x298, %o3 <== NOT EXECUTED 400128d0: 7f ff c3 1e call 40003548 <__assert_func> <== NOT EXECUTED 400128d4: 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 ); 400128d8: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 400128dc: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 400128e0: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 400128e4: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 400128e8: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 400128ec: 96 12 e2 98 or %o3, 0x298, %o3 <== NOT EXECUTED 400128f0: 7f ff c3 16 call 40003548 <__assert_func> <== NOT EXECUTED 400128f4: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 400128f8: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 400128fc: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012900: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012904: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 40012908: 96 12 e2 50 or %o3, 0x250, %o3 <== NOT EXECUTED 4001290c: 7f ff c3 0f call 40003548 <__assert_func> <== NOT EXECUTED 40012910: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 40012914: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012918: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 4001291c: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012920: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 40012924: 96 12 e2 a8 or %o3, 0x2a8, %o3 <== NOT EXECUTED 40012928: 7f ff c3 08 call 40003548 <__assert_func> <== NOT EXECUTED 4001292c: 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 ); 40012930: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012934: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012938: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 4001293c: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 40012940: 96 12 e2 60 or %o3, 0x260, %o3 <== NOT EXECUTED 40012944: 7f ff c3 01 call 40003548 <__assert_func> <== NOT EXECUTED 40012948: 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 ); 4001294c: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40012950: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012954: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012958: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 4001295c: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 40012960: 96 12 e2 98 or %o3, 0x298, %o3 <== NOT EXECUTED 40012964: 7f ff c2 f9 call 40003548 <__assert_func> <== NOT EXECUTED 40012968: 92 10 23 1c mov 0x31c, %o1 <== NOT EXECUTED 4001296c: 01 00 00 00 nop 4000a650 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a650: 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 ); 4000a654: 40 00 11 e9 call 4000edf8 4000a658: 90 10 00 18 mov %i0, %o0 4000a65c: 96 07 bf fc add %fp, -4, %o3 4000a660: 92 10 00 08 mov %o0, %o1 4000a664: a0 07 bf b8 add %fp, -72, %l0 4000a668: 90 10 00 18 mov %i0, %o0 4000a66c: 7f ff ff 7e call 4000a464 4000a670: 94 10 00 10 mov %l0, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000a674: 97 2e 60 10 sll %i1, 0x10, %o3 4000a678: 03 00 00 3c sethi %hi(0xf000), %g1 4000a67c: 97 32 e0 10 srl %o3, 0x10, %o3 4000a680: 05 00 00 10 sethi %hi(0x4000), %g2 4000a684: 82 0a c0 01 and %o3, %g1, %g1 4000a688: 80 a0 40 02 cmp %g1, %g2 4000a68c: 02 80 00 24 be 4000a71c 4000a690: 05 00 00 20 sethi %hi(0x8000), %g2 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000a694: 80 a0 40 02 cmp %g1, %g2 4000a698: 02 80 00 0c be 4000a6c8 4000a69c: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000a6a0: 05 00 00 08 sethi %hi(0x2000), %g2 4000a6a4: 80 a0 40 02 cmp %g1, %g2 4000a6a8: 02 80 00 12 be 4000a6f0 4000a6ac: 05 00 00 18 sethi %hi(0x6000), %g2 4000a6b0: 80 a0 40 02 cmp %g1, %g2 4000a6b4: 02 80 00 0f be 4000a6f0 4000a6b8: 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)) 4000a6bc: 80 a0 40 02 cmp %g1, %g2 4000a6c0: 12 80 00 21 bne 4000a744 4000a6c4: 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( 4000a6c8: 90 10 00 1c mov %i4, %o0 4000a6cc: 94 10 00 10 mov %l0, %o2 4000a6d0: 98 07 bf e0 add %fp, -32, %o4 4000a6d4: 40 00 09 f9 call 4000ceb8 4000a6d8: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000a6dc: 80 a2 20 00 cmp %o0, 0 4000a6e0: 02 80 00 1f be 4000a75c 4000a6e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4000a6e8: 81 c7 e0 08 ret 4000a6ec: 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 ); 4000a6f0: f4 3f bf e0 std %i2, [ %fp + -32 ] 4000a6f4: 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( 4000a6f8: 90 10 00 1c mov %i4, %o0 4000a6fc: 94 10 00 10 mov %l0, %o2 4000a700: 98 07 bf e0 add %fp, -32, %o4 4000a704: 40 00 09 ed call 4000ceb8 4000a708: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000a70c: 80 a2 20 00 cmp %o0, 0 4000a710: 12 80 00 17 bne 4000a76c 4000a714: 01 00 00 00 nop 4000a718: 30 80 00 11 b,a 4000a75c <== 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 ); 4000a71c: 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( 4000a720: 90 10 00 1c mov %i4, %o0 4000a724: 94 10 00 10 mov %l0, %o2 4000a728: 98 07 bf e0 add %fp, -32, %o4 4000a72c: 40 00 09 e3 call 4000ceb8 4000a730: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000a734: 80 a2 20 00 cmp %o0, 0 4000a738: 12 80 00 0d bne 4000a76c 4000a73c: 01 00 00 00 nop 4000a740: 30 80 00 07 b,a 4000a75c <== 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 ); 4000a744: 40 00 0d f6 call 4000df1c <__errno> <== NOT EXECUTED 4000a748: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a74c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000a750: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a754: 81 c7 e0 08 ret <== NOT EXECUTED 4000a758: 81 e8 00 00 restore <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000a75c: 40 00 0d f0 call 4000df1c <__errno> <== NOT EXECUTED 4000a760: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a764: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000a768: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000a76c: 81 c7 e0 08 ret 4000a770: 81 e8 00 00 restore 400030d0 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 400030d0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 400030d4: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 400030d8: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400030dc: 80 a0 a0 01 cmp %g2, 1 400030e0: 12 80 00 05 bne 400030f4 400030e4: 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; 400030e8: f0 20 60 5c st %i0, [ %g1 + 0x5c ] return 0; } 400030ec: 81 c7 e0 08 ret 400030f0: 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 ); 400030f4: 40 00 42 49 call 40013a18 <__errno> <== NOT EXECUTED 400030f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400030fc: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40003100: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003104: 81 c7 e0 08 ret <== NOT EXECUTED 40003108: 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 97 sethi %hi(0x40025c00), %l0 fprintf(stdout, "%s", the_jnode->name ); 40003a7c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 ! 40025c58 <_impure_ptr> 40003a80: 90 06 20 0c add %i0, 0xc, %o0 40003a84: 40 00 3d b3 call 40013150 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 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40003aa0: 13 10 00 90 sethi %hi(0x40024000), %o1 <== NOT EXECUTED 40003aa4: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40003aa8: 40 00 3d 4c call 40012fd8 <== NOT EXECUTED 40003aac: 92 12 61 e8 or %o1, 0x1e8, %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 90 sethi %hi(0x40024000), %o0 <== NOT EXECUTED 40003ab8: 15 10 00 90 sethi %hi(0x40024000), %o2 <== NOT EXECUTED 40003abc: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40003ac0: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 40003ac4: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 40003ac8: 40 00 02 83 call 400044d4 <__assert_func> <== NOT EXECUTED 40003acc: 96 12 e2 d8 or %o3, 0x2d8, %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 20 58 ld [ %l0 + 0x58 ], %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 90 sethi %hi(0x40024000), %o0 <== NOT EXECUTED 40003af8: 40 00 40 b6 call 40013dd0 <== NOT EXECUTED 40003afc: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 400241d0 <__FUNCTION__.5604+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 20 58 ld [ %l0 + 0x58 ], %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 90 sethi %hi(0x40024000), %o1 <== NOT EXECUTED 40003b1c: 40 00 3d 2f call 40012fd8 <== NOT EXECUTED 40003b20: 92 12 61 98 or %o1, 0x198, %o1 ! 40024198 <__FUNCTION__.5604+0x2b8> <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003b24: 31 10 00 90 sethi %hi(0x40024000), %i0 <== NOT EXECUTED 40003b28: 40 00 44 b4 call 40014df8 <== NOT EXECUTED 40003b2c: 91 ee 20 28 restore %i0, 0x28, %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 20 58 ld [ %l0 + 0x58 ], %g1 40003b34: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 40003b38: d0 00 60 08 ld [ %g1 + 8 ], %o0 40003b3c: 13 10 00 90 sethi %hi(0x40024000), %o1 40003b40: 40 00 3d 26 call 40012fd8 40003b44: 92 12 61 a8 or %o1, 0x1a8, %o1 ! 400241a8 <__FUNCTION__.5604+0x2c8> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003b48: 31 10 00 90 sethi %hi(0x40024000), %i0 40003b4c: 40 00 44 ab call 40014df8 40003b50: 91 ee 20 28 restore %i0, 0x28, %o0 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40003b54: c2 04 20 58 ld [ %l0 + 0x58 ], %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 90 sethi %hi(0x40024000), %o0 <== NOT EXECUTED 40003b68: 40 00 40 9a call 40013dd0 <== NOT EXECUTED 40003b6c: 90 12 21 b8 or %o0, 0x1b8, %o0 ! 400241b8 <__FUNCTION__.5604+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 20 58 ld [ %l0 + 0x58 ], %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 90 sethi %hi(0x40024000), %o0 <== NOT EXECUTED 40003b8c: 40 00 40 91 call 40013dd0 <== NOT EXECUTED 40003b90: 90 12 21 b8 or %o0, 0x1b8, %o0 ! 400241b8 <__FUNCTION__.5604+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 20 58 ld [ %l0 + 0x58 ], %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 90 sethi %hi(0x40024000), %o1 40003bb0: 40 00 3d 0a call 40012fd8 40003bb4: 92 12 61 80 or %o1, 0x180, %o1 ! 40024180 <__FUNCTION__.5604+0x2a0> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003bb8: 31 10 00 90 sethi %hi(0x40024000), %i0 40003bbc: 40 00 44 8f call 40014df8 40003bc0: 91 ee 20 28 restore %i0, 0x28, %o0 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 40003bc4: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 40003bc8: 90 10 20 2f mov 0x2f, %o0 40003bcc: d2 00 60 08 ld [ %g1 + 8 ], %o1 40003bd0: 40 00 3d 1c call 40013040 40003bd4: 31 10 00 90 sethi %hi(0x40024000), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003bd8: 40 00 44 88 call 40014df8 40003bdc: 91 ee 20 28 restore %i0, 0x28, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 40003be0: 11 10 00 90 sethi %hi(0x40024000), %o0 <== NOT EXECUTED 40003be4: 15 10 00 90 sethi %hi(0x40024000), %o2 <== NOT EXECUTED 40003be8: 17 10 00 90 sethi %hi(0x40024000), %o3 <== NOT EXECUTED 40003bec: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 40003bf0: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 40003bf4: 96 12 e1 70 or %o3, 0x170, %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 40003118 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 40003118: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 4000311c: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 40003120: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40003124: 80 a0 a0 04 cmp %g2, 4 40003128: 12 80 00 19 bne 4000318c 4000312c: 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++ ) 40003130: 02 80 00 15 be 40003184 40003134: 86 10 20 00 clr %g3 40003138: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 4000313c: 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 ); 40003140: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40003144: 80 a1 20 00 cmp %g4, 0 40003148: 12 80 00 08 bne 40003168 4000314c: c4 08 80 00 ldub [ %g2 ], %g2 40003150: 30 80 00 13 b,a 4000319c <== NOT EXECUTED 40003154: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40003158: c8 48 80 18 ldsb [ %g2 + %i0 ], %g4 4000315c: 80 a1 20 00 cmp %g4, 0 40003160: 02 80 00 07 be 4000317c 40003164: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; 40003168: 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++ ) 4000316c: b0 06 20 01 inc %i0 40003170: 80 a6 80 18 cmp %i2, %i0 40003174: 18 bf ff f8 bgu 40003154 40003178: 86 10 00 18 mov %i0, %g3 buf[i] = node->info.sym_link.name[i]; return i; } 4000317c: 81 c7 e0 08 ret 40003180: 81 e8 00 00 restore 40003184: 81 c7 e0 08 ret <== NOT EXECUTED 40003188: 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 ); 4000318c: 40 00 42 23 call 40013a18 <__errno> <== NOT EXECUTED 40003190: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003194: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40003198: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000319c: 81 c7 e0 08 ret <== NOT EXECUTED 400031a0: 81 e8 00 00 restore <== NOT EXECUTED 400031a4 : 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 */ ) { 400031a4: 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; 400031a8: e0 06 40 00 ld [ %i1 ], %l0 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 400031ac: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 400031b0: 90 04 20 0c add %l0, 0xc, %o0 <== NOT EXECUTED 400031b4: 40 00 45 ec call 40014964 <== NOT EXECUTED 400031b8: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 400031bc: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400031c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400031c4: 22 80 00 05 be,a 400031d8 <== NOT EXECUTED 400031c8: 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 ); 400031cc: 40 00 14 8f call 40008408 <_Chain_Extract> <== NOT EXECUTED 400031d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 400031d4: 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 ); 400031d8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400031dc: 90 00 60 50 add %g1, 0x50, %o0 <== NOT EXECUTED 400031e0: 40 00 14 7e call 400083d8 <_Chain_Append> <== NOT EXECUTED 400031e4: 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 ); 400031e8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 400031ec: 40 00 02 3b call 40003ad8 <== NOT EXECUTED 400031f0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400031f4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400031f8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED return 0; } 400031fc: 81 c7 e0 08 ret <== NOT EXECUTED 40003200: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000a780 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000a780: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000a784: 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 ) { 4000a788: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000a78c: 80 a0 60 00 cmp %g1, 0 4000a790: 22 80 00 06 be,a 4000a7a8 4000a794: 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 ); 4000a798: 40 00 03 9f call 4000b614 <_Chain_Extract> 4000a79c: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000a7a0: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000a7a4: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000a7a8: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000a7ac: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000a7b0: 90 07 bf f8 add %fp, -8, %o0 4000a7b4: 40 00 01 0b call 4000abe0 4000a7b8: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000a7bc: 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) ) { 4000a7c0: 90 10 00 10 mov %l0, %o0 4000a7c4: 40 00 01 40 call 4000acc4 4000a7c8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000a7cc: 80 a2 20 00 cmp %o0, 0 4000a7d0: 12 80 00 12 bne 4000a818 4000a7d4: 01 00 00 00 nop 4000a7d8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000a7dc: 80 a0 60 00 cmp %g1, 0 4000a7e0: 12 80 00 0e bne 4000a818 4000a7e4: 03 10 00 6d sethi %hi(0x4001b400), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000a7e8: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 4001b778 4000a7ec: c4 06 40 00 ld [ %i1 ], %g2 4000a7f0: c6 00 60 04 ld [ %g1 + 4 ], %g3 4000a7f4: 80 a0 c0 02 cmp %g3, %g2 4000a7f8: 22 80 00 02 be,a 4000a800 4000a7fc: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000a800: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a804: 80 a0 60 04 cmp %g1, 4 4000a808: 22 80 00 06 be,a 4000a820 4000a80c: 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 ); 4000a810: 40 00 00 82 call 4000aa18 4000a814: 90 10 00 10 mov %l0, %o0 } return 0; } 4000a818: 81 c7 e0 08 ret 4000a81c: 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 ) 4000a820: 80 a2 20 00 cmp %o0, 0 4000a824: 02 bf ff fb be 4000a810 4000a828: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 4000a82c: 40 00 00 7b call 4000aa18 4000a830: 01 00 00 00 nop 4000a834: 30 bf ff f7 b,a 4000a810 4000a858 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000a858: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000a85c: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 4000a860: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000a864: 80 a0 a0 07 cmp %g2, 7 4000a868: 08 80 00 08 bleu 4000a888 4000a86c: 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 ); 4000a870: 40 00 0d ab call 4000df1c <__errno> <== NOT EXECUTED 4000a874: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a878: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000a87c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a880: 81 c7 e0 08 ret <== NOT EXECUTED 4000a884: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000a888: 07 10 00 2a sethi %hi(0x4000a800), %g3 4000a88c: 86 10 e0 38 or %g3, 0x38, %g3 ! 4000a838 4000a890: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 4000a894: 81 c0 80 00 jmp %g2 4000a898: 01 00 00 00 nop case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4000a89c: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000a8a0: 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; 4000a8a4: c6 10 60 2e lduh [ %g1 + 0x2e ], %g3 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000a8a8: 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; 4000a8ac: c6 36 60 0c sth %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000a8b0: 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; 4000a8b4: 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; 4000a8b8: 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; 4000a8bc: 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; 4000a8c0: 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; 4000a8c4: 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; 4000a8c8: 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; 4000a8cc: 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; 4000a8d0: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 4000a8d4: 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; 4000a8d8: 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; 4000a8dc: 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; 4000a8e0: 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; } 4000a8e4: 81 c7 e0 08 ret 4000a8e8: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000a8ec: 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; 4000a8f0: 10 bf ff ed b 4000a8a4 4000a8f4: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000a8f8: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 4000a8fc: 10 bf ff ea b 4000a8a4 4000a900: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] 40003204 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40003204: 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 ); 40003208: 40 00 45 a2 call 40014890 4000320c: 90 10 00 1a mov %i2, %o0 40003210: 96 07 bf fc add %fp, -4, %o3 40003214: 92 10 00 08 mov %o0, %o1 40003218: a0 07 bf b8 add %fp, -72, %l0 4000321c: 90 10 00 1a mov %i2, %o0 40003220: 40 00 32 ff call 4000fe1c 40003224: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 40003228: 40 00 45 85 call 4001483c 4000322c: 90 10 00 19 mov %i1, %o0 if (info.sym_link.name == NULL) { 40003230: 80 a2 20 00 cmp %o0, 0 40003234: 02 80 00 15 be 40003288 40003238: 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( 4000323c: 90 10 00 18 mov %i0, %o0 40003240: 94 10 00 10 mov %l0, %o2 40003244: 92 10 20 04 mov 4, %o1 40003248: 17 00 00 28 sethi %hi(0xa000), %o3 4000324c: 98 07 bf e0 add %fp, -32, %o4 40003250: 96 12 e1 ff or %o3, 0x1ff, %o3 40003254: 40 00 2f 6b call 4000f000 40003258: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 4000325c: 80 a2 20 00 cmp %o0, 0 40003260: 12 80 00 08 bne 40003280 40003264: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 40003268: 40 00 01 f1 call 40003a2c <== NOT EXECUTED 4000326c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 40003270: 40 00 41 ea call 40013a18 <__errno> <== NOT EXECUTED 40003274: 01 00 00 00 nop <== NOT EXECUTED 40003278: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000327c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40003280: 81 c7 e0 08 ret 40003284: 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); 40003288: 40 00 41 e4 call 40013a18 <__errno> <== NOT EXECUTED 4000328c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003290: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40003294: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003298: 81 c7 e0 08 ret <== NOT EXECUTED 4000329c: 81 e8 00 00 restore <== NOT EXECUTED 400032a0 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 400032a0: 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; 400032a4: 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 ) { 400032a8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400032ac: 80 a0 60 03 cmp %g1, 3 400032b0: 02 80 00 09 be 400032d4 400032b4: a2 10 00 18 mov %i0, %l1 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 400032b8: c2 06 60 08 ld [ %i1 + 8 ], %g1 400032bc: 90 10 00 11 mov %l1, %o0 400032c0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400032c4: 9f c0 40 00 call %g1 400032c8: 92 10 00 19 mov %i1, %o1 return result; } 400032cc: 81 c7 e0 08 ret 400032d0: 91 e8 00 08 restore %g0, %o0, %o0 * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 400032d4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400032d8: 80 a0 60 00 cmp %g1, 0 400032dc: 02 80 00 25 be 40003370 400032e0: a4 07 bf e4 add %fp, -28, %l2 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 400032e4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 400032e8: da 06 60 04 ld [ %i1 + 4 ], %o5 400032ec: c8 06 60 08 ld [ %i1 + 8 ], %g4 400032f0: c6 06 60 0c ld [ %i1 + 0xc ], %g3 400032f4: c4 27 bf f4 st %g2, [ %fp + -12 ] the_link.node_access = node->info.hard_link.link_node; 400032f8: 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; 400032fc: da 27 bf e8 st %o5, [ %fp + -24 ] 40003300: c8 27 bf ec st %g4, [ %fp + -20 ] 40003304: c6 27 bf f0 st %g3, [ %fp + -16 ] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 40003308: 40 00 2f 8d call 4000f13c 4000330c: 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) 40003310: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40003314: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 40003318: 80 a0 a0 01 cmp %g2, 1 4000331c: 02 80 00 0a be 40003344 40003320: 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 ); 40003324: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40003328: c6 30 60 30 sth %g3, [ %g1 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 4000332c: 40 00 01 eb call 40003ad8 40003330: 92 10 20 00 clr %o1 40003334: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40003338: c4 07 bf f8 ld [ %fp + -8 ], %g2 4000333c: 10 bf ff df b 400032b8 40003340: 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 ); 40003344: c2 07 bf ec ld [ %fp + -20 ], %g1 40003348: 90 10 00 18 mov %i0, %o0 4000334c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40003350: 92 10 00 12 mov %l2, %o1 40003354: 9f c0 40 00 call %g1 40003358: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 4000335c: 80 a2 20 00 cmp %o0, 0 40003360: 22 bf ff d7 be,a 400032bc 40003364: c2 06 60 08 ld [ %i1 + 8 ], %g1 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 40003368: 81 c7 e0 08 ret 4000336c: 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 ); 40003370: 40 00 41 aa call 40013a18 <__errno> <== NOT EXECUTED 40003374: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003378: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000337c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003380: 81 c7 e0 08 ret <== NOT EXECUTED 40003384: 81 e8 00 00 restore <== NOT EXECUTED 40003388 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40003388: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4000338c: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40003390: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40003394: 80 a0 a0 01 cmp %g2, 1 40003398: 12 80 00 09 bne 400033bc 4000339c: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 400033a0: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 400033a4: 80 a0 a0 00 cmp %g2, 0 400033a8: 02 80 00 0b be 400033d4 400033ac: 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; 400033b0: c0 20 60 5c clr [ %g1 + 0x5c ] return 0; } 400033b4: 81 c7 e0 08 ret 400033b8: 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 ); 400033bc: 40 00 41 97 call 40013a18 <__errno> <== NOT EXECUTED 400033c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033c4: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400033c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033cc: 81 c7 e0 08 ret <== NOT EXECUTED 400033d0: 81 e8 00 00 restore <== NOT EXECUTED /* * 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 */ 400033d4: 40 00 41 91 call 40013a18 <__errno> <== NOT EXECUTED 400033d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400033e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033e4: 81 c7 e0 08 ret <== NOT EXECUTED 400033e8: 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 6f sethi %hi(0x4001bc00), %g1 400023b8: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 ! 4001bc98 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 22 ee call 4000af8c 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 6f sethi %hi(0x4001bc00), %g1 400023e0: c2 00 60 9c ld [ %g1 + 0x9c ], %g1 ! 4001bc9c 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 6f sethi %hi(0x4001bc00), %l1 4000240c: c2 0c 60 95 ldub [ %l1 + 0x95 ], %g1 ! 4001bc95 40002410: 80 a0 60 00 cmp %g1, 0 40002414: 12 80 00 10 bne 40002454 40002418: 21 10 00 6d sethi %hi(0x4001b400), %l0 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 4000241c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40002420: c2 08 63 40 ldub [ %g1 + 0x340 ], %g1 ! 4001b740 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 6d sethi %hi(0x4001b400), %l0 40002434: d0 04 22 70 ld [ %l0 + 0x270 ], %o0 ! 4001b670 40002438: 92 10 00 18 mov %i0, %o1 4000243c: 94 10 00 19 mov %i1, %o2 40002440: 40 00 11 4c call 40006970 <_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 22 70 ld [ %l0 + 0x270 ], %o0 40002458: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000245c: 40 00 14 84 call 4000766c <_Protected_heap_Get_size> 40002460: e2 04 22 38 ld [ %l0 + 0x238 ], %l1 ! 4001be38 40002464: 90 02 00 11 add %o0, %l1, %o0 40002468: d0 24 22 38 st %o0, [ %l0 + 0x238 ] 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 31 23 call 4000e904 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 60 95 ldub [ %l1 + 0x95 ], %g1 40002484: 80 a0 60 00 cmp %g1, 0 40002488: 22 bf ff eb be,a 40002434 4000248c: 21 10 00 6d sethi %hi(0x4001b400), %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 22 70 ld [ %l0 + 0x270 ], %o0 ! 4001b670 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 40002498: 40 00 0f 19 call 400060fc <== 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 a9 sethi %hi(0x4006a400), %l3 <== NOT EXECUTED return; if ( !print_handler ) 40005238: e8 04 e2 f8 ld [ %l3 + 0x2f8 ], %l4 ! 4006a6f8 <== 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 c0 add %i0, 0xc0, %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 a9 sethi %hi(0x4006a400), %l5 <== NOT EXECUTED 40005294: fa 05 62 f4 ld [ %l5 + 0x2f4 ], %i5 ! 4006a6f4 <== 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 85 call 4000bcb4 <== NOT EXECUTED 400052a4: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 400052a8: 13 10 01 7d sethi %hi(0x4005f400), %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 c8 or %o1, 0x2c8, %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 e2 f8 ld [ %l3 + 0x2f8 ], %g1 <== NOT EXECUTED 400052c8: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 400052cc: d0 05 62 f4 ld [ %l5 + 0x2f4 ], %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 7d sethi %hi(0x4005f400), %o1 <== NOT EXECUTED 400052e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400052e8: 92 12 62 e8 or %o1, 0x2e8, %o1 ! 4005f6e8 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 400052ec: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 400052f0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 4006a6f0 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 400052f4: 03 10 01 a9 sethi %hi(0x4006a400), %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 a9 sethi %hi(0x4006a400), %g2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40005304: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 <== NOT EXECUTED 40005308: d0 00 a2 f4 ld [ %g2 + 0x2f4 ], %o0 <== NOT EXECUTED 4000530c: 13 10 01 7d sethi %hi(0x4005f400), %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 63 18 or %o1, 0x318, %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 62 f8 ld [ %g1 + 0x2f8 ], %g1 <== NOT EXECUTED 40005328: d0 00 a2 f4 ld [ %g2 + 0x2f4 ], %o0 <== NOT EXECUTED 4000532c: 13 10 01 7d sethi %hi(0x4005f400), %o1 <== NOT EXECUTED 40005330: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005334: 92 12 63 08 or %o1, 0x308, %o1 ! 4005f708 <== 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 b4 sethi %hi(0x4006d000), %l2 <== NOT EXECUTED 40005344: a4 14 a1 f0 or %l2, 0x1f0, %l2 ! 4006d1f0 <== 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 a9 sethi %hi(0x4006a400), %l5 <== NOT EXECUTED 40005398: d0 05 62 f4 ld [ %l5 + 0x2f4 ], %o0 ! 4006a6f4 <== NOT EXECUTED 4000539c: 13 10 01 7d sethi %hi(0x4005f400), %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 d8 or %o1, 0x2d8, %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 7d sethi %hi(0x4005f400), %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 c4 ld [ %i0 + 0xc4 ], %l0 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 40005434: 40 00 0c 5b call 400085a0 <== NOT EXECUTED 40005438: 90 12 23 88 or %o0, 0x388, %o0 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 4000543c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40005440: 11 10 01 7d sethi %hi(0x4005f400), %o0 <== NOT EXECUTED 40005444: 40 00 0c 57 call 400085a0 <== NOT EXECUTED 40005448: 90 12 23 98 or %o0, 0x398, %o0 ! 4005f798 <== 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 7d sethi %hi(0x4005f400), %o0 <== NOT EXECUTED 40005454: 40 00 0c 53 call 400085a0 <== NOT EXECUTED 40005458: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 4005f7b8 <== NOT EXECUTED printk( 4000545c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 40005460: 11 10 01 7d sethi %hi(0x4005f400), %o0 <== NOT EXECUTED 40005464: 40 00 0c 4f call 400085a0 <== NOT EXECUTED 40005468: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 4005f7d0 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", 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 10 call 4000bcb4 <== 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 7d sethi %hi(0x4005f400), %o0 <== NOT EXECUTED 40005484: 40 00 0c 47 call 400085a0 <== NOT EXECUTED 40005488: 90 12 23 e8 or %o0, 0x3e8, %o0 ! 4005f7e8 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 4000548c: d2 06 20 c0 ld [ %i0 + 0xc0 ], %o1 <== NOT EXECUTED 40005490: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 40005494: 11 10 01 7e sethi %hi(0x4005f800), %o0 <== NOT EXECUTED 40005498: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED 4000549c: 40 00 0c 41 call 400085a0 <== NOT EXECUTED 400054a0: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 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 3b call 4000c59c <== NOT EXECUTED 400054b4: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 400054b8: 11 10 01 7e sethi %hi(0x4005f800), %o0 <== NOT EXECUTED 400054bc: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 400054c0: 90 12 20 38 or %o0, 0x38, %o0 <== NOT EXECUTED 400054c4: 40 00 0c 37 call 400085a0 <== NOT EXECUTED 400054c8: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED 400054cc: 30 bf ff f9 b,a 400054b0 <== NOT EXECUTED 400062bc <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 400062bc: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400062c0: 23 10 00 70 sethi %hi(0x4001c000), %l1 400062c4: e0 04 62 44 ld [ %l1 + 0x244 ], %l0 ! 4001c244 <_API_extensions_List> 400062c8: a2 14 62 44 or %l1, 0x244, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400062cc: a2 04 60 04 add %l1, 4, %l1 400062d0: 80 a4 00 11 cmp %l0, %l1 400062d4: 02 80 00 09 be 400062f8 <_API_extensions_Run_postdriver+0x3c> 400062d8: 01 00 00 00 nop * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 400062dc: c2 04 20 08 ld [ %l0 + 8 ], %g1 400062e0: 9f c0 40 00 call %g1 400062e4: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 400062e8: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400062ec: 80 a4 00 11 cmp %l0, %l1 400062f0: 32 bf ff fc bne,a 400062e0 <_API_extensions_Run_postdriver+0x24> 400062f4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400062f8: 81 c7 e0 08 ret 400062fc: 81 e8 00 00 restore 40006300 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40006300: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006304: 23 10 00 70 sethi %hi(0x4001c000), %l1 40006308: e0 04 62 44 ld [ %l1 + 0x244 ], %l0 ! 4001c244 <_API_extensions_List> 4000630c: a2 14 62 44 or %l1, 0x244, %l1 40006310: a2 04 60 04 add %l1, 4, %l1 40006314: 80 a4 00 11 cmp %l0, %l1 40006318: 02 80 00 0a be 40006340 <_API_extensions_Run_postswitch+0x40> 4000631c: 25 10 00 70 sethi %hi(0x4001c000), %l2 40006320: a4 14 a0 bc or %l2, 0xbc, %l2 ! 4001c0bc <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 40006324: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40006328: 9f c0 40 00 call %g1 4000632c: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 40006330: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006334: 80 a4 00 11 cmp %l0, %l1 40006338: 32 bf ff fc bne,a 40006328 <_API_extensions_Run_postswitch+0x28> 4000633c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40006340: 81 c7 e0 08 ret 40006344: 81 e8 00 00 restore 4000b6c0 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4000b6c0: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4000b6c4: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b6c8: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 4001c0bc <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000b6cc: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000b6d0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 4000b6d4: 80 a0 a0 00 cmp %g2, 0 4000b6d8: 22 80 00 13 be,a 4000b724 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000b6dc: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 4000b6e0: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000b6e4: c6 00 60 08 ld [ %g1 + 8 ], %g3 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000b6e8: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000b6ec: c6 26 20 60 st %g3, [ %i0 + 0x60 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4000b6f0: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000b6f4: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000b6f8: 80 a0 a0 02 cmp %g2, 2 4000b6fc: 02 80 00 0f be 4000b738 <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000b700: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 4000b704: 80 a0 a0 03 cmp %g2, 3 4000b708: 22 80 00 1f be,a 4000b784 <_CORE_mutex_Seize_interrupt_trylock+0xc4> 4000b70c: da 00 60 1c ld [ %g1 + 0x1c ], %o5 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000b710: d0 06 40 00 ld [ %i1 ], %o0 4000b714: 7f ff d9 76 call 40001cec 4000b718: b0 10 20 00 clr %i0 4000b71c: 81 c7 e0 08 ret 4000b720: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4000b724: 80 a0 40 02 cmp %g1, %g2 4000b728: 22 80 00 0c be,a 4000b758 <_CORE_mutex_Seize_interrupt_trylock+0x98> 4000b72c: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000b730: 81 c7 e0 08 ret 4000b734: 91 e8 20 01 restore %g0, 1, %o0 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b738: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000b73c: 84 00 a0 01 inc %g2 4000b740: c4 20 60 1c st %g2, [ %g1 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000b744: d0 06 40 00 ld [ %i1 ], %o0 4000b748: 7f ff d9 69 call 40001cec 4000b74c: b0 10 20 00 clr %i0 4000b750: 81 c7 e0 08 ret 4000b754: 81 e8 00 00 restore * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000b758: 80 a0 a0 00 cmp %g2, 0 4000b75c: 12 80 00 2b bne 4000b808 <_CORE_mutex_Seize_interrupt_trylock+0x148> 4000b760: 80 a0 a0 01 cmp %g2, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000b764: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000b768: 82 00 60 01 inc %g1 4000b76c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 4000b770: d0 06 40 00 ld [ %i1 ], %o0 4000b774: 7f ff d9 5e call 40001cec 4000b778: b0 10 20 00 clr %i0 4000b77c: 81 c7 e0 08 ret 4000b780: 81 e8 00 00 restore { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000b784: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b788: 88 03 60 01 add %o5, 1, %g4 4000b78c: c8 20 60 1c st %g4, [ %g1 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000b790: c8 06 20 4c ld [ %i0 + 0x4c ], %g4 current = executing->current_priority; if ( current == ceiling ) { 4000b794: 80 a1 00 02 cmp %g4, %g2 4000b798: 02 80 00 24 be 4000b828 <_CORE_mutex_Seize_interrupt_trylock+0x168> 4000b79c: 01 00 00 00 nop _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4000b7a0: 1a 80 00 11 bcc 4000b7e4 <_CORE_mutex_Seize_interrupt_trylock+0x124> 4000b7a4: 84 10 20 06 mov 6, %g2 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b7a8: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b7ac: c4 00 60 00 ld [ %g1 ], %g2 4000b7b0: 84 00 a0 01 inc %g2 4000b7b4: c4 20 60 00 st %g2, [ %g1 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4000b7b8: 7f ff d9 4d call 40001cec 4000b7bc: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 4000b7c0: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000b7c4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000b7c8: 94 10 20 00 clr %o2 4000b7cc: 7f ff ef c1 call 400076d0 <_Thread_Change_priority> 4000b7d0: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4000b7d4: 7f ff f1 3f call 40007cd0 <_Thread_Enable_dispatch> 4000b7d8: 01 00 00 00 nop 4000b7dc: 81 c7 e0 08 ret 4000b7e0: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000b7e4: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000b7e8: c6 26 20 50 st %g3, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ 4000b7ec: c0 26 20 54 clr [ %i0 + 0x54 ] executing->resource_count--; /* undo locking above */ 4000b7f0: da 20 60 1c st %o5, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000b7f4: d0 06 40 00 ld [ %i1 ], %o0 4000b7f8: 7f ff d9 3d call 40001cec 4000b7fc: b0 10 20 00 clr %i0 4000b800: 81 c7 e0 08 ret 4000b804: 81 e8 00 00 restore * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000b808: 12 bf ff ca bne 4000b730 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000b80c: 84 10 20 02 mov 2, %g2 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000b810: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED _ISR_Enable( *level_p ); 4000b814: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 4000b818: 7f ff d9 35 call 40001cec <== NOT EXECUTED 4000b81c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b820: 81 c7 e0 08 ret <== NOT EXECUTED 4000b824: 81 e8 00 00 restore <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4000b828: d0 06 40 00 ld [ %i1 ], %o0 4000b82c: 7f ff d9 30 call 40001cec 4000b830: b0 10 20 00 clr %i0 4000b834: 81 c7 e0 08 ret 4000b838: 81 e8 00 00 restore 4000b934 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000b934: 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; 4000b938: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000b93c: 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 ) { 4000b940: 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; 4000b944: e4 06 20 08 ld [ %i0 + 8 ], %l2 4000b948: 18 80 00 75 bgu 4000bb1c <_Heap_Allocate_aligned_with_boundary+0x1e8> 4000b94c: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4000b950: 80 a6 e0 00 cmp %i3, 0 4000b954: 12 80 00 70 bne 4000bb14 <_Heap_Allocate_aligned_with_boundary+0x1e0> 4000b958: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000b95c: 80 a4 00 12 cmp %l0, %l2 4000b960: 02 80 00 72 be 4000bb28 <_Heap_Allocate_aligned_with_boundary+0x1f4> 4000b964: 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; 4000b968: 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; 4000b96c: 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; 4000b970: 82 20 40 19 sub %g1, %i1, %g1 4000b974: 10 80 00 09 b 4000b998 <_Heap_Allocate_aligned_with_boundary+0x64> 4000b978: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 4000b97c: 80 a6 20 00 cmp %i0, 0 4000b980: 32 80 00 57 bne,a 4000badc <_Heap_Allocate_aligned_with_boundary+0x1a8> 4000b984: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 4000b988: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000b98c: 80 a4 00 12 cmp %l0, %l2 4000b990: 22 80 00 5a be,a 4000baf8 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000b994: 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 ) { 4000b998: e6 04 a0 04 ld [ %l2 + 4 ], %l3 4000b99c: 80 a5 00 13 cmp %l4, %l3 4000b9a0: 1a bf ff fa bcc 4000b988 <_Heap_Allocate_aligned_with_boundary+0x54> 4000b9a4: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 4000b9a8: 80 a6 a0 00 cmp %i2, 0 4000b9ac: 02 bf ff f4 be 4000b97c <_Heap_Allocate_aligned_with_boundary+0x48> 4000b9b0: 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; 4000b9b4: 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; 4000b9b8: 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; 4000b9bc: a6 0c ff fe and %l3, -2, %l3 4000b9c0: 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; 4000b9c4: 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; 4000b9c8: 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); 4000b9cc: 90 10 00 18 mov %i0, %o0 4000b9d0: a6 00 40 13 add %g1, %l3, %l3 4000b9d4: 40 00 2f 8f call 40017810 <.urem> 4000b9d8: 92 10 00 1a mov %i2, %o1 4000b9dc: 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 ) { 4000b9e0: 80 a4 c0 18 cmp %l3, %i0 4000b9e4: 1a 80 00 06 bcc 4000b9fc <_Heap_Allocate_aligned_with_boundary+0xc8> 4000b9e8: ac 04 a0 08 add %l2, 8, %l6 4000b9ec: 90 10 00 13 mov %l3, %o0 4000b9f0: 40 00 2f 88 call 40017810 <.urem> 4000b9f4: 92 10 00 1a mov %i2, %o1 4000b9f8: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4000b9fc: 80 a6 e0 00 cmp %i3, 0 4000ba00: 02 80 00 26 be 4000ba98 <_Heap_Allocate_aligned_with_boundary+0x164> 4000ba04: 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; 4000ba08: a6 06 00 19 add %i0, %i1, %l3 4000ba0c: 92 10 00 1b mov %i3, %o1 4000ba10: 40 00 2f 80 call 40017810 <.urem> 4000ba14: 90 10 00 13 mov %l3, %o0 4000ba18: 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 ) { 4000ba1c: 80 a4 c0 08 cmp %l3, %o0 4000ba20: 08 80 00 1e bleu 4000ba98 <_Heap_Allocate_aligned_with_boundary+0x164> 4000ba24: 80 a5 80 18 cmp %l6, %i0 4000ba28: 80 a6 00 08 cmp %i0, %o0 4000ba2c: 1a 80 00 1b bcc 4000ba98 <_Heap_Allocate_aligned_with_boundary+0x164> 4000ba30: 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; 4000ba34: 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 ) { 4000ba38: 80 a5 40 08 cmp %l5, %o0 4000ba3c: 28 80 00 0a bleu,a 4000ba64 <_Heap_Allocate_aligned_with_boundary+0x130> 4000ba40: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 4000ba44: 10 bf ff d2 b 4000b98c <_Heap_Allocate_aligned_with_boundary+0x58> 4000ba48: 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 ) { 4000ba4c: 1a 80 00 13 bcc 4000ba98 <_Heap_Allocate_aligned_with_boundary+0x164> 4000ba50: 80 a5 80 18 cmp %l6, %i0 if ( boundary_line < boundary_floor ) { 4000ba54: 80 a5 40 08 cmp %l5, %o0 4000ba58: 38 bf ff cd bgu,a 4000b98c <_Heap_Allocate_aligned_with_boundary+0x58> 4000ba5c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 4000ba60: b0 22 00 19 sub %o0, %i1, %i0 4000ba64: 92 10 00 1a mov %i2, %o1 4000ba68: 40 00 2f 6a call 40017810 <.urem> 4000ba6c: 90 10 00 18 mov %i0, %o0 4000ba70: 92 10 00 1b mov %i3, %o1 4000ba74: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4000ba78: a6 06 00 19 add %i0, %i1, %l3 4000ba7c: 40 00 2f 65 call 40017810 <.urem> 4000ba80: 90 10 00 13 mov %l3, %o0 4000ba84: 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 ) { 4000ba88: 80 a4 c0 08 cmp %l3, %o0 4000ba8c: 18 bf ff f0 bgu 4000ba4c <_Heap_Allocate_aligned_with_boundary+0x118> 4000ba90: 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 ) { 4000ba94: 80 a5 80 18 cmp %l6, %i0 4000ba98: 18 bf ff bc bgu 4000b988 <_Heap_Allocate_aligned_with_boundary+0x54> 4000ba9c: 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; 4000baa0: 90 10 00 18 mov %i0, %o0 4000baa4: a6 20 40 12 sub %g1, %l2, %l3 4000baa8: 92 10 00 1d mov %i5, %o1 4000baac: 40 00 2f 59 call 40017810 <.urem> 4000bab0: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 4000bab4: 90 a4 c0 08 subcc %l3, %o0, %o0 4000bab8: 02 bf ff b2 be 4000b980 <_Heap_Allocate_aligned_with_boundary+0x4c> 4000babc: 80 a6 20 00 cmp %i0, 0 4000bac0: 80 a5 c0 08 cmp %l7, %o0 4000bac4: 38 bf ff b2 bgu,a 4000b98c <_Heap_Allocate_aligned_with_boundary+0x58> 4000bac8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 4000bacc: 80 a6 20 00 cmp %i0, 0 4000bad0: 22 bf ff af be,a 4000b98c <_Heap_Allocate_aligned_with_boundary+0x58> 4000bad4: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000bad8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000badc: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000bae0: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000bae4: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000bae8: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000baec: 90 10 00 10 mov %l0, %o0 4000baf0: 7f ff ec 3d call 40006be4 <_Heap_Block_allocate> 4000baf4: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4000baf8: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 4000bafc: 80 a0 40 11 cmp %g1, %l1 4000bb00: 1a 80 00 08 bcc 4000bb20 <_Heap_Allocate_aligned_with_boundary+0x1ec> 4000bb04: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000bb08: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 4000bb0c: 81 c7 e0 08 ret 4000bb10: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4000bb14: 08 80 00 07 bleu 4000bb30 <_Heap_Allocate_aligned_with_boundary+0x1fc> 4000bb18: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000bb1c: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 4000bb20: 81 c7 e0 08 ret 4000bb24: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000bb28: 10 bf ff f4 b 4000baf8 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000bb2c: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4000bb30: 22 bf ff 8b be,a 4000b95c <_Heap_Allocate_aligned_with_boundary+0x28> 4000bb34: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 4000bb38: 10 bf ff 8a b 4000b960 <_Heap_Allocate_aligned_with_boundary+0x2c> 4000bb3c: 80 a4 00 12 cmp %l0, %l2 40007b68 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 40007b68: 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; 40007b6c: 25 10 00 20 sethi %hi(0x40008000), %l2 40007b70: 80 8e a0 ff btst 0xff, %i2 40007b74: a4 14 a1 68 or %l2, 0x168, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 40007b78: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 40007b7c: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 40007b80: 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; 40007b84: 12 80 00 04 bne 40007b94 <_Heap_Walk+0x2c> 40007b88: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40007b8c: 25 10 00 1e sethi %hi(0x40007800), %l2 40007b90: a4 14 a3 60 or %l2, 0x360, %l2 ! 40007b60 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 40007b94: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007b98: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 4001e990 <_System_state_Current> 40007b9c: 80 a0 60 03 cmp %g1, 3 40007ba0: 22 80 00 04 be,a 40007bb0 <_Heap_Walk+0x48> 40007ba4: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 40007ba8: 81 c7 e0 08 ret 40007bac: 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)( 40007bb0: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40007bb4: c4 06 20 08 ld [ %i0 + 8 ], %g2 40007bb8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40007bbc: 90 10 00 19 mov %i1, %o0 40007bc0: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 40007bc4: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 40007bc8: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40007bcc: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40007bd0: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40007bd4: 92 10 20 00 clr %o1 40007bd8: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007bdc: 96 10 00 15 mov %l5, %o3 40007be0: 94 12 a2 18 or %o2, 0x218, %o2 40007be4: 9f c4 80 00 call %l2 40007be8: 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 ) { 40007bec: 80 a5 60 00 cmp %l5, 0 40007bf0: 02 80 00 36 be 40007cc8 <_Heap_Walk+0x160> 40007bf4: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 40007bf8: 12 80 00 3c bne 40007ce8 <_Heap_Walk+0x180> 40007bfc: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 40007c00: 7f ff e7 b1 call 40001ac4 <.urem> 40007c04: 92 10 00 15 mov %l5, %o1 40007c08: 80 a2 20 00 cmp %o0, 0 40007c0c: 12 80 00 40 bne 40007d0c <_Heap_Walk+0x1a4> 40007c10: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 40007c14: 7f ff e7 ac call 40001ac4 <.urem> 40007c18: 92 10 00 15 mov %l5, %o1 40007c1c: 80 a2 20 00 cmp %o0, 0 40007c20: 32 80 00 44 bne,a 40007d30 <_Heap_Walk+0x1c8> 40007c24: 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; 40007c28: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 40007c2c: ae 8d a0 01 andcc %l6, 1, %l7 40007c30: 22 80 00 48 be,a 40007d50 <_Heap_Walk+0x1e8> 40007c34: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 40007c38: d6 04 00 00 ld [ %l0 ], %o3 40007c3c: 80 a5 40 0b cmp %l5, %o3 40007c40: 32 80 00 1a bne,a 40007ca8 <_Heap_Walk+0x140> 40007c44: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 40007c48: c2 05 20 04 ld [ %l4 + 4 ], %g1 40007c4c: 82 08 7f fe and %g1, -2, %g1 40007c50: 82 05 00 01 add %l4, %g1, %g1 40007c54: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007c58: 80 88 60 01 btst 1, %g1 40007c5c: 22 80 01 23 be,a 400080e8 <_Heap_Walk+0x580> 40007c60: 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; 40007c64: 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 ) { 40007c68: 80 a6 00 11 cmp %i0, %l1 40007c6c: 02 80 00 6f be 40007e28 <_Heap_Walk+0x2c0> 40007c70: 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; 40007c74: 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 40007c78: 80 a7 00 11 cmp %i4, %l1 40007c7c: 28 80 00 3c bleu,a 40007d6c <_Heap_Walk+0x204> 40007c80: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 40007c84: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007c88: 96 10 00 11 mov %l1, %o3 40007c8c: 92 10 20 01 mov 1, %o1 40007c90: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007c94: b0 10 20 00 clr %i0 40007c98: 9f c4 80 00 call %l2 40007c9c: 94 12 a3 c0 or %o2, 0x3c0, %o2 40007ca0: 81 c7 e0 08 ret 40007ca4: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 40007ca8: 98 10 00 15 mov %l5, %o4 40007cac: 92 10 20 01 mov 1, %o1 40007cb0: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007cb4: b0 10 20 00 clr %i0 40007cb8: 9f c4 80 00 call %l2 40007cbc: 94 12 a3 78 or %o2, 0x378, %o2 40007cc0: 81 c7 e0 08 ret 40007cc4: 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" ); 40007cc8: 90 10 00 19 mov %i1, %o0 40007ccc: 92 10 20 01 mov 1, %o1 40007cd0: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007cd4: b0 10 20 00 clr %i0 40007cd8: 9f c4 80 00 call %l2 40007cdc: 94 12 a2 b0 or %o2, 0x2b0, %o2 40007ce0: 81 c7 e0 08 ret 40007ce4: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 40007ce8: 90 10 00 19 mov %i1, %o0 40007cec: 96 10 00 15 mov %l5, %o3 40007cf0: 92 10 20 01 mov 1, %o1 40007cf4: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007cf8: b0 10 20 00 clr %i0 40007cfc: 9f c4 80 00 call %l2 40007d00: 94 12 a2 c8 or %o2, 0x2c8, %o2 40007d04: 81 c7 e0 08 ret 40007d08: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 40007d0c: 90 10 00 19 mov %i1, %o0 40007d10: 96 10 00 13 mov %l3, %o3 40007d14: 92 10 20 01 mov 1, %o1 40007d18: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007d1c: b0 10 20 00 clr %i0 40007d20: 9f c4 80 00 call %l2 40007d24: 94 12 a2 e8 or %o2, 0x2e8, %o2 40007d28: 81 c7 e0 08 ret 40007d2c: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 40007d30: 96 10 00 10 mov %l0, %o3 40007d34: 92 10 20 01 mov 1, %o1 40007d38: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007d3c: b0 10 20 00 clr %i0 40007d40: 9f c4 80 00 call %l2 40007d44: 94 12 a3 10 or %o2, 0x310, %o2 40007d48: 81 c7 e0 08 ret 40007d4c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 40007d50: 92 10 20 01 mov 1, %o1 40007d54: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007d58: b0 10 20 00 clr %i0 40007d5c: 9f c4 80 00 call %l2 40007d60: 94 12 a3 48 or %o2, 0x348, %o2 40007d64: 81 c7 e0 08 ret 40007d68: 81 e8 00 00 restore 40007d6c: 80 a6 c0 11 cmp %i3, %l1 40007d70: 0a bf ff c6 bcs 40007c88 <_Heap_Walk+0x120> 40007d74: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 40007d78: 90 04 60 08 add %l1, 8, %o0 40007d7c: 7f ff e7 52 call 40001ac4 <.urem> 40007d80: 92 10 00 1a mov %i2, %o1 40007d84: 80 a2 20 00 cmp %o0, 0 40007d88: 12 80 00 df bne 40008104 <_Heap_Walk+0x59c> 40007d8c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40007d90: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007d94: 82 08 7f fe and %g1, -2, %g1 40007d98: 82 04 40 01 add %l1, %g1, %g1 40007d9c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007da0: 80 88 60 01 btst 1, %g1 40007da4: 12 80 00 ea bne 4000814c <_Heap_Walk+0x5e4> 40007da8: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 40007dac: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40007db0: 80 a6 00 0c cmp %i0, %o4 40007db4: 02 80 00 19 be 40007e18 <_Heap_Walk+0x2b0> 40007db8: ba 10 00 11 mov %l1, %i5 40007dbc: 30 80 00 dc b,a 4000812c <_Heap_Walk+0x5c4> <== NOT EXECUTED 40007dc0: 0a bf ff b2 bcs 40007c88 <_Heap_Walk+0x120> 40007dc4: 90 10 00 19 mov %i1, %o0 40007dc8: 80 a6 c0 11 cmp %i3, %l1 40007dcc: 0a bf ff b0 bcs 40007c8c <_Heap_Walk+0x124> 40007dd0: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 40007dd4: 90 04 60 08 add %l1, 8, %o0 40007dd8: 7f ff e7 3b call 40001ac4 <.urem> 40007ddc: 92 10 00 1a mov %i2, %o1 40007de0: 80 a2 20 00 cmp %o0, 0 40007de4: 32 80 00 c8 bne,a 40008104 <_Heap_Walk+0x59c> 40007de8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40007dec: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007df0: 82 08 7f fe and %g1, -2, %g1 40007df4: 82 00 40 11 add %g1, %l1, %g1 40007df8: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007dfc: 80 88 60 01 btst 1, %g1 40007e00: 32 80 00 d2 bne,a 40008148 <_Heap_Walk+0x5e0> 40007e04: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 40007e08: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40007e0c: 80 a3 00 1d cmp %o4, %i5 40007e10: 12 80 00 c5 bne 40008124 <_Heap_Walk+0x5bc> 40007e14: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 40007e18: 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 ) { 40007e1c: 80 a6 00 11 cmp %i0, %l1 40007e20: 12 bf ff e8 bne 40007dc0 <_Heap_Walk+0x258> 40007e24: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40007e28: 80 a5 00 10 cmp %l4, %l0 40007e2c: 02 bf ff 5f be 40007ba8 <_Heap_Walk+0x40> 40007e30: 37 10 00 70 sethi %hi(0x4001c000), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007e34: 35 10 00 70 sethi %hi(0x4001c000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007e38: 39 10 00 70 sethi %hi(0x4001c000), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007e3c: 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)( 40007e40: b6 16 e0 68 or %i3, 0x68, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007e44: b4 16 a0 80 or %i2, 0x80, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007e48: b8 17 22 18 or %i4, 0x218, %i4 40007e4c: 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; 40007e50: 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 ) { 40007e54: 80 a5 e0 00 cmp %l7, 0 40007e58: 02 80 00 16 be 40007eb0 <_Heap_Walk+0x348> 40007e5c: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 40007e60: 90 10 00 19 mov %i1, %o0 40007e64: 92 10 20 00 clr %o1 40007e68: 94 10 00 1b mov %i3, %o2 40007e6c: 96 10 00 10 mov %l0, %o3 40007e70: 9f c4 80 00 call %l2 40007e74: 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 40007e78: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40007e7c: 80 a0 40 11 cmp %g1, %l1 40007e80: 28 80 00 18 bleu,a 40007ee0 <_Heap_Walk+0x378> 40007e84: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 40007e88: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007e8c: 96 10 00 10 mov %l0, %o3 40007e90: 98 10 00 11 mov %l1, %o4 40007e94: 92 10 20 01 mov 1, %o1 40007e98: 15 10 00 70 sethi %hi(0x4001c000), %o2 40007e9c: b0 10 20 00 clr %i0 40007ea0: 9f c4 80 00 call %l2 40007ea4: 94 12 a0 a8 or %o2, 0xa8, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 40007ea8: 81 c7 e0 08 ret 40007eac: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007eb0: da 04 00 00 ld [ %l0 ], %o5 40007eb4: 90 10 00 19 mov %i1, %o0 40007eb8: 92 10 20 00 clr %o1 40007ebc: 94 10 00 1a mov %i2, %o2 40007ec0: 96 10 00 10 mov %l0, %o3 40007ec4: 9f c4 80 00 call %l2 40007ec8: 98 10 00 16 mov %l6, %o4 40007ecc: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40007ed0: 80 a0 40 11 cmp %g1, %l1 40007ed4: 18 bf ff ee bgu 40007e8c <_Heap_Walk+0x324> 40007ed8: 90 10 00 19 mov %i1, %o0 40007edc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40007ee0: 80 a0 40 11 cmp %g1, %l1 40007ee4: 0a bf ff ea bcs 40007e8c <_Heap_Walk+0x324> 40007ee8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 40007eec: 90 10 00 16 mov %l6, %o0 40007ef0: 7f ff e6 f5 call 40001ac4 <.urem> 40007ef4: 92 10 00 1d mov %i5, %o1 40007ef8: 80 a2 20 00 cmp %o0, 0 40007efc: 12 80 00 5d bne 40008070 <_Heap_Walk+0x508> 40007f00: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 40007f04: 18 80 00 65 bgu 40008098 <_Heap_Walk+0x530> 40007f08: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 40007f0c: 3a 80 00 6e bcc,a 400080c4 <_Heap_Walk+0x55c> 40007f10: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 40007f14: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007f18: 80 88 60 01 btst 1, %g1 40007f1c: 12 80 00 40 bne 4000801c <_Heap_Walk+0x4b4> 40007f20: 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; 40007f24: 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)( 40007f28: 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; 40007f2c: 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; 40007f30: 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; 40007f34: 1b 10 00 70 sethi %hi(0x4001c000), %o5 40007f38: 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; 40007f3c: 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); 40007f40: 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; 40007f44: 02 80 00 07 be 40007f60 <_Heap_Walk+0x3f8> 40007f48: 9a 13 61 70 or %o5, 0x170, %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)" : ""), 40007f4c: 1b 10 00 70 sethi %hi(0x4001c000), %o5 40007f50: 80 a3 00 18 cmp %o4, %i0 40007f54: 02 80 00 03 be 40007f60 <_Heap_Walk+0x3f8> 40007f58: 9a 13 61 80 or %o5, 0x180, %o5 40007f5c: 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)( 40007f60: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007f64: 05 10 00 70 sethi %hi(0x4001c000), %g2 40007f68: 80 a0 c0 01 cmp %g3, %g1 40007f6c: 02 80 00 07 be 40007f88 <_Heap_Walk+0x420> 40007f70: 84 10 a1 90 or %g2, 0x190, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007f74: 05 10 00 70 sethi %hi(0x4001c000), %g2 40007f78: 80 a0 40 18 cmp %g1, %i0 40007f7c: 02 80 00 03 be 40007f88 <_Heap_Walk+0x420> 40007f80: 84 10 a1 a0 or %g2, 0x1a0, %g2 40007f84: 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)( 40007f88: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40007f8c: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 40007f90: 90 10 00 19 mov %i1, %o0 40007f94: 92 10 20 00 clr %o1 40007f98: 15 10 00 70 sethi %hi(0x4001c000), %o2 40007f9c: 96 10 00 10 mov %l0, %o3 40007fa0: 9f c4 80 00 call %l2 40007fa4: 94 12 a1 b0 or %o2, 0x1b0, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 40007fa8: da 05 c0 00 ld [ %l7 ], %o5 40007fac: 80 a5 80 0d cmp %l6, %o5 40007fb0: 02 80 00 0c be 40007fe0 <_Heap_Walk+0x478> 40007fb4: 90 10 00 19 mov %i1, %o0 (*printer)( 40007fb8: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 40007fbc: 96 10 00 10 mov %l0, %o3 40007fc0: 98 10 00 16 mov %l6, %o4 40007fc4: 92 10 20 01 mov 1, %o1 40007fc8: 15 10 00 70 sethi %hi(0x4001c000), %o2 40007fcc: b0 10 20 00 clr %i0 40007fd0: 9f c4 80 00 call %l2 40007fd4: 94 12 a1 e0 or %o2, 0x1e0, %o2 40007fd8: 81 c7 e0 08 ret 40007fdc: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 40007fe0: 80 8d 20 01 btst 1, %l4 40007fe4: 02 80 00 1c be 40008054 <_Heap_Walk+0x4ec> 40007fe8: 96 10 00 10 mov %l0, %o3 40007fec: 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 ) { 40007ff0: 80 a0 40 18 cmp %g1, %i0 40007ff4: 12 80 00 07 bne 40008010 <_Heap_Walk+0x4a8> 40007ff8: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40007ffc: 10 80 00 0f b 40008038 <_Heap_Walk+0x4d0> <== NOT EXECUTED 40008000: 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 ) { 40008004: 80 a0 40 18 cmp %g1, %i0 40008008: 02 80 00 0a be 40008030 <_Heap_Walk+0x4c8> 4000800c: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 40008010: 32 bf ff fd bne,a 40008004 <_Heap_Walk+0x49c> 40008014: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40008018: 80 a5 40 11 cmp %l5, %l1 4000801c: 02 bf fe e3 be 40007ba8 <_Heap_Walk+0x40> 40008020: 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 ) { 40008024: ec 04 60 04 ld [ %l1 + 4 ], %l6 40008028: 10 bf ff 8a b 40007e50 <_Heap_Walk+0x2e8> 4000802c: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40008030: 90 10 00 19 mov %i1, %o0 40008034: 96 10 00 10 mov %l0, %o3 40008038: 92 10 20 01 mov 1, %o1 4000803c: 15 10 00 70 sethi %hi(0x4001c000), %o2 40008040: b0 10 20 00 clr %i0 40008044: 9f c4 80 00 call %l2 40008048: 94 12 a2 50 or %o2, 0x250, %o2 4000804c: 81 c7 e0 08 ret 40008050: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 40008054: 92 10 20 01 mov 1, %o1 40008058: 15 10 00 70 sethi %hi(0x4001c000), %o2 4000805c: b0 10 20 00 clr %i0 40008060: 9f c4 80 00 call %l2 40008064: 94 12 a2 20 or %o2, 0x220, %o2 40008068: 81 c7 e0 08 ret 4000806c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 40008070: 90 10 00 19 mov %i1, %o0 40008074: 96 10 00 10 mov %l0, %o3 40008078: 98 10 00 16 mov %l6, %o4 4000807c: 92 10 20 01 mov 1, %o1 40008080: 15 10 00 70 sethi %hi(0x4001c000), %o2 40008084: b0 10 20 00 clr %i0 40008088: 9f c4 80 00 call %l2 4000808c: 94 12 a0 d8 or %o2, 0xd8, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 40008090: 81 c7 e0 08 ret 40008094: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 40008098: 90 10 00 19 mov %i1, %o0 4000809c: 96 10 00 10 mov %l0, %o3 400080a0: 98 10 00 16 mov %l6, %o4 400080a4: 9a 10 00 13 mov %l3, %o5 400080a8: 92 10 20 01 mov 1, %o1 400080ac: 15 10 00 70 sethi %hi(0x4001c000), %o2 400080b0: b0 10 20 00 clr %i0 400080b4: 9f c4 80 00 call %l2 400080b8: 94 12 a1 08 or %o2, 0x108, %o2 block, block_size, min_block_size ); return false; 400080bc: 81 c7 e0 08 ret 400080c0: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 400080c4: 96 10 00 10 mov %l0, %o3 400080c8: 98 10 00 11 mov %l1, %o4 400080cc: 92 10 20 01 mov 1, %o1 400080d0: 15 10 00 70 sethi %hi(0x4001c000), %o2 400080d4: b0 10 20 00 clr %i0 400080d8: 9f c4 80 00 call %l2 400080dc: 94 12 a1 38 or %o2, 0x138, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 400080e0: 81 c7 e0 08 ret 400080e4: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 400080e8: 92 10 20 01 mov 1, %o1 400080ec: 15 10 00 6f sethi %hi(0x4001bc00), %o2 400080f0: b0 10 20 00 clr %i0 400080f4: 9f c4 80 00 call %l2 400080f8: 94 12 a3 a8 or %o2, 0x3a8, %o2 400080fc: 81 c7 e0 08 ret 40008100: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 40008104: 96 10 00 11 mov %l1, %o3 40008108: 92 10 20 01 mov 1, %o1 4000810c: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40008110: b0 10 20 00 clr %i0 40008114: 9f c4 80 00 call %l2 40008118: 94 12 a3 e0 or %o2, 0x3e0, %o2 4000811c: 81 c7 e0 08 ret 40008120: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 40008124: 90 10 00 19 mov %i1, %o0 40008128: 96 10 00 11 mov %l1, %o3 4000812c: 92 10 20 01 mov 1, %o1 40008130: 15 10 00 70 sethi %hi(0x4001c000), %o2 40008134: b0 10 20 00 clr %i0 40008138: 9f c4 80 00 call %l2 4000813c: 94 12 a0 30 or %o2, 0x30, %o2 40008140: 81 c7 e0 08 ret 40008144: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 40008148: 96 10 00 11 mov %l1, %o3 4000814c: 92 10 20 01 mov 1, %o1 40008150: 15 10 00 70 sethi %hi(0x4001c000), %o2 40008154: b0 10 20 00 clr %i0 40008158: 9f c4 80 00 call %l2 4000815c: 94 12 a0 10 or %o2, 0x10, %o2 40008160: 81 c7 e0 08 ret 40008164: 81 e8 00 00 restore 40006ea4 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40006ea4: 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 ) 40006ea8: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 40006eac: 80 a5 20 00 cmp %l4, 0 40006eb0: 02 80 00 ab be 4000715c <_Objects_Extend_information+0x2b8> 40006eb4: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 40006eb8: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40006ebc: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 40006ec0: ab 2d 60 10 sll %l5, 0x10, %l5 40006ec4: 92 10 00 12 mov %l2, %o1 40006ec8: 40 00 41 a6 call 40017560 <.udiv> 40006ecc: 91 35 60 10 srl %l5, 0x10, %o0 40006ed0: 91 2a 20 10 sll %o0, 0x10, %o0 40006ed4: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 40006ed8: 80 a7 20 00 cmp %i4, 0 40006edc: 02 80 00 a7 be 40007178 <_Objects_Extend_information+0x2d4> 40006ee0: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 40006ee4: c2 05 00 00 ld [ %l4 ], %g1 40006ee8: 80 a0 60 00 cmp %g1, 0 40006eec: 02 80 00 a4 be 4000717c <_Objects_Extend_information+0x2d8> 40006ef0: a2 10 00 13 mov %l3, %l1 40006ef4: 10 80 00 06 b 40006f0c <_Objects_Extend_information+0x68> 40006ef8: a0 10 20 00 clr %l0 40006efc: c2 05 00 01 ld [ %l4 + %g1 ], %g1 40006f00: 80 a0 60 00 cmp %g1, 0 40006f04: 22 80 00 08 be,a 40006f24 <_Objects_Extend_information+0x80> 40006f08: 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++ ) { 40006f0c: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40006f10: 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++ ) { 40006f14: 80 a7 00 10 cmp %i4, %l0 40006f18: 18 bf ff f9 bgu 40006efc <_Objects_Extend_information+0x58> 40006f1c: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40006f20: 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 ) { 40006f24: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40006f28: 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 ) { 40006f2c: 82 10 63 ff or %g1, 0x3ff, %g1 40006f30: 80 a5 40 01 cmp %l5, %g1 40006f34: 18 80 00 96 bgu 4000718c <_Objects_Extend_information+0x2e8> 40006f38: 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; 40006f3c: 40 00 41 4f call 40017478 <.umul> 40006f40: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 40006f44: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006f48: 80 a0 60 00 cmp %g1, 0 40006f4c: 12 80 00 6d bne 40007100 <_Objects_Extend_information+0x25c> 40006f50: 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 ); 40006f54: 40 00 08 92 call 4000919c <_Workspace_Allocate_or_fatal_error> 40006f58: 01 00 00 00 nop 40006f5c: 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 ) { 40006f60: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006f64: 80 a4 40 01 cmp %l1, %g1 40006f68: 2a 80 00 43 bcs,a 40007074 <_Objects_Extend_information+0x1d0> 40006f6c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 40006f70: 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 ); 40006f74: 91 2d 20 01 sll %l4, 1, %o0 40006f78: 90 02 00 14 add %o0, %l4, %o0 40006f7c: 90 05 40 08 add %l5, %o0, %o0 40006f80: 90 02 00 13 add %o0, %l3, %o0 40006f84: 40 00 08 95 call 400091d8 <_Workspace_Allocate> 40006f88: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 40006f8c: ac 92 20 00 orcc %o0, 0, %l6 40006f90: 02 80 00 7d be 40007184 <_Objects_Extend_information+0x2e0> 40006f94: 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 ) { 40006f98: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006f9c: 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); 40006fa0: ae 05 80 14 add %l6, %l4, %l7 40006fa4: 0a 80 00 5e bcs 4000711c <_Objects_Extend_information+0x278> 40006fa8: 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++ ) { 40006fac: 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, 40006fb0: 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++ ) { 40006fb4: 02 80 00 08 be 40006fd4 <_Objects_Extend_information+0x130> 40006fb8: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 40006fbc: 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++ ) { 40006fc0: 82 00 60 01 inc %g1 40006fc4: 80 a4 c0 01 cmp %l3, %g1 40006fc8: 18 bf ff fd bgu 40006fbc <_Objects_Extend_information+0x118> 40006fcc: c0 20 80 14 clr [ %g2 + %l4 ] 40006fd0: 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 ); 40006fd4: 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; 40006fd8: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006fdc: 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 ; 40006fe0: 80 a4 40 03 cmp %l1, %g3 40006fe4: 1a 80 00 0a bcc 4000700c <_Objects_Extend_information+0x168> 40006fe8: c0 25 80 1d clr [ %l6 + %i5 ] 40006fec: 85 2c 60 02 sll %l1, 2, %g2 40006ff0: 82 10 00 11 mov %l1, %g1 40006ff4: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 40006ff8: 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++ ) { 40006ffc: 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 ; 40007000: 80 a0 c0 01 cmp %g3, %g1 40007004: 18 bf ff fd bgu 40006ff8 <_Objects_Extend_information+0x154> 40007008: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 4000700c: 7f ff eb 34 call 40001cdc 40007010: 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( 40007014: c6 06 00 00 ld [ %i0 ], %g3 40007018: 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; 4000701c: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40007020: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40007024: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 40007028: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4000702c: 87 28 e0 18 sll %g3, 0x18, %g3 40007030: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40007034: 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( 40007038: ab 2d 60 10 sll %l5, 0x10, %l5 4000703c: 03 00 00 40 sethi %hi(0x10000), %g1 40007040: ab 35 60 10 srl %l5, 0x10, %l5 40007044: 82 10 c0 01 or %g3, %g1, %g1 40007048: 82 10 40 02 or %g1, %g2, %g1 4000704c: 82 10 40 15 or %g1, %l5, %g1 40007050: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40007054: 7f ff eb 26 call 40001cec 40007058: 01 00 00 00 nop if ( old_tables ) 4000705c: 80 a4 e0 00 cmp %l3, 0 40007060: 22 80 00 05 be,a 40007074 <_Objects_Extend_information+0x1d0> 40007064: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 40007068: 40 00 08 65 call 400091fc <_Workspace_Free> 4000706c: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40007070: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007074: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 40007078: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 4000707c: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40007080: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007084: 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; 40007088: 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( 4000708c: 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( 40007090: a4 07 bf f4 add %fp, -12, %l2 40007094: 40 00 11 7d call 4000b688 <_Chain_Initialize> 40007098: 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 ) { 4000709c: 30 80 00 0c b,a 400070cc <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 400070a0: c4 16 20 04 lduh [ %i0 + 4 ], %g2 400070a4: 83 28 60 18 sll %g1, 0x18, %g1 400070a8: 85 28 a0 1b sll %g2, 0x1b, %g2 400070ac: 82 10 40 14 or %g1, %l4, %g1 400070b0: 82 10 40 02 or %g1, %g2, %g1 400070b4: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400070b8: 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( 400070bc: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 400070c0: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400070c4: 7f ff fc e2 call 4000644c <_Chain_Append> 400070c8: 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 ) { 400070cc: 40 00 11 5c call 4000b63c <_Chain_Get> 400070d0: 90 10 00 12 mov %l2, %o0 400070d4: 80 a2 20 00 cmp %o0, 0 400070d8: 32 bf ff f2 bne,a 400070a0 <_Objects_Extend_information+0x1fc> 400070dc: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 400070e0: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400070e4: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 400070e8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 400070ec: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400070f0: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 400070f4: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400070f8: 81 c7 e0 08 ret 400070fc: 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 ); 40007100: 40 00 08 36 call 400091d8 <_Workspace_Allocate> 40007104: 01 00 00 00 nop if ( !new_object_block ) 40007108: a4 92 20 00 orcc %o0, 0, %l2 4000710c: 32 bf ff 96 bne,a 40006f64 <_Objects_Extend_information+0xc0> 40007110: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007114: 81 c7 e0 08 ret 40007118: 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, 4000711c: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 40007120: 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, 40007124: 40 00 1d b9 call 4000e808 40007128: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 4000712c: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40007130: 94 10 00 1d mov %i5, %o2 40007134: 40 00 1d b5 call 4000e808 40007138: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 4000713c: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40007140: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40007144: 94 04 c0 0a add %l3, %o2, %o2 40007148: 90 10 00 14 mov %l4, %o0 4000714c: 40 00 1d af call 4000e808 40007150: 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 ); 40007154: 10 bf ff a1 b 40006fd8 <_Objects_Extend_information+0x134> 40007158: 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 ) 4000715c: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40007160: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 40007164: ab 2d 60 10 sll %l5, 0x10, %l5 40007168: a2 10 00 13 mov %l3, %l1 4000716c: a0 10 20 00 clr %l0 40007170: 10 bf ff 6c b 40006f20 <_Objects_Extend_information+0x7c> 40007174: 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 ) 40007178: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 4000717c: 10 bf ff 69 b 40006f20 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 40007180: 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 ); 40007184: 40 00 08 1e call 400091fc <_Workspace_Free> 40007188: 90 10 00 12 mov %l2, %o0 return; 4000718c: 81 c7 e0 08 ret 40007190: 81 e8 00 00 restore 400073a8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 400073a8: 9d e3 bf a0 save %sp, -96, %sp information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400073ac: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400073b0: 83 2e 60 02 sll %i1, 2, %g1 400073b4: 84 10 a3 60 or %g2, 0x360, %g2 400073b8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 400073bc: 85 2f 20 10 sll %i4, 0x10, %g2 400073c0: 85 30 a0 10 srl %g2, 0x10, %g2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400073c4: 87 2e a0 02 sll %i2, 2, %g3 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 400073c8: c4 26 20 18 st %g2, [ %i0 + 0x18 ] information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400073cc: f0 20 40 03 st %i0, [ %g1 + %g3 ] /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 400073d0: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400073d4: 03 20 00 00 sethi %hi(0x80000000), %g1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 400073d8: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 400073dc: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 400073e0: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 400073e4: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 400073e8: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 400073ec: c0 36 20 2c clrh [ %i0 + 0x2c ] /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 400073f0: c0 36 20 10 clrh [ %i0 + 0x10 ] _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 400073f4: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400073f8: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 400073fc: 80 a0 a0 00 cmp %g2, 0 40007400: 02 80 00 05 be 40007414 <_Objects_Initialize_information+0x6c> 40007404: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 40007408: 80 a6 e0 00 cmp %i3, 0 4000740c: 02 80 00 28 be 400074ac <_Objects_Initialize_information+0x104> 40007410: 90 10 20 00 clr %o0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 40007414: 07 10 00 6f sethi %hi(0x4001bc00), %g3 40007418: 86 10 e1 a8 or %g3, 0x1a8, %g3 ! 4001bda8 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 4000741c: 80 a0 00 1b cmp %g0, %i3 40007420: b3 2e 60 18 sll %i1, 0x18, %i1 40007424: 84 40 20 00 addx %g0, 0, %g2 40007428: b5 2e a0 1b sll %i2, 0x1b, %i2 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 4000742c: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 40007430: f6 36 20 14 sth %i3, [ %i0 + 0x14 ] /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 40007434: 07 00 00 40 sethi %hi(0x10000), %g3 40007438: b2 16 40 03 or %i1, %g3, %i1 4000743c: b4 16 40 1a or %i1, %i2, %i2 40007440: b4 16 80 02 or %i2, %g2, %i2 40007444: f4 26 20 08 st %i2, [ %i0 + 8 ] * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 40007448: 84 00 60 04 add %g1, 4, %g2 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 4000744c: 80 88 60 03 btst 3, %g1 40007450: 02 80 00 0c be 40007480 <_Objects_Initialize_information+0xd8> 40007454: 84 08 bf fc and %g2, -4, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007458: 82 06 20 24 add %i0, 0x24, %g1 <== NOT EXECUTED name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 4000745c: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED 40007460: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED the_chain->permanent_null = NULL; 40007464: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 40007468: 82 06 20 20 add %i0, 0x20, %g1 <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 4000746c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40007470: 12 80 00 0d bne 400074a4 <_Objects_Initialize_information+0xfc> <== NOT EXECUTED 40007474: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED 40007478: 81 c7 e0 08 ret 4000747c: 81 e8 00 00 restore /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 40007480: 84 10 00 01 mov %g1, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007484: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 40007488: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 4000748c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 40007490: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 40007494: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 40007498: 80 a6 e0 00 cmp %i3, 0 4000749c: 02 bf ff f7 be 40007478 <_Objects_Initialize_information+0xd0> 400074a0: c2 26 20 28 st %g1, [ %i0 + 0x28 ] /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 400074a4: 7f ff fe 80 call 40006ea4 <_Objects_Extend_information> 400074a8: 81 e8 00 00 restore /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 400074ac: 92 10 20 01 mov 1, %o1 400074b0: 7f ff fe 1e call 40006d28 <_Internal_error_Occurred> 400074b4: 94 10 20 14 mov 0x14, %o2 400074b8: 01 00 00 00 nop 40007578 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40007578: 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 ); 4000757c: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 40007580: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 40007584: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40007588: 92 10 00 11 mov %l1, %o1 4000758c: 40 00 3f f5 call 40017560 <.udiv> 40007590: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40007594: 80 a2 20 00 cmp %o0, 0 40007598: 02 80 00 12 be 400075e0 <_Objects_Shrink_information+0x68> 4000759c: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 400075a0: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 400075a4: c4 00 c0 00 ld [ %g3 ], %g2 400075a8: 80 a4 40 02 cmp %l1, %g2 400075ac: 12 80 00 09 bne 400075d0 <_Objects_Shrink_information+0x58> 400075b0: 82 10 20 00 clr %g1 400075b4: 10 80 00 0d b 400075e8 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 400075b8: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400075bc: 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 ] == 400075c0: 80 a4 40 02 cmp %l1, %g2 400075c4: 02 80 00 09 be 400075e8 <_Objects_Shrink_information+0x70> 400075c8: 84 04 a0 04 add %l2, 4, %g2 400075cc: 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++ ) { 400075d0: 82 00 60 01 inc %g1 400075d4: 80 a2 00 01 cmp %o0, %g1 400075d8: 38 bf ff f9 bgu,a 400075bc <_Objects_Shrink_information+0x44> 400075dc: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 400075e0: 81 c7 e0 08 ret 400075e4: 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; 400075e8: 10 80 00 06 b 40007600 <_Objects_Shrink_information+0x88> 400075ec: 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 ); 400075f0: 80 a4 60 00 cmp %l1, 0 400075f4: 22 80 00 12 be,a 4000763c <_Objects_Shrink_information+0xc4> 400075f8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400075fc: 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 ); 40007600: 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) && 40007604: 80 a0 40 10 cmp %g1, %l0 40007608: 0a bf ff fa bcs 400075f0 <_Objects_Shrink_information+0x78> 4000760c: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 40007610: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 40007614: 84 04 00 02 add %l0, %g2, %g2 40007618: 80 a0 40 02 cmp %g1, %g2 4000761c: 1a bf ff f6 bcc 400075f4 <_Objects_Shrink_information+0x7c> 40007620: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 40007624: 40 00 0f fc call 4000b614 <_Chain_Extract> 40007628: 01 00 00 00 nop } } while ( the_object ); 4000762c: 80 a4 60 00 cmp %l1, 0 40007630: 12 bf ff f4 bne 40007600 <_Objects_Shrink_information+0x88> 40007634: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40007638: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 4000763c: 40 00 06 f0 call 400091fc <_Workspace_Free> 40007640: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007644: 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; 40007648: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 4000764c: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 40007650: 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; 40007654: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 40007658: 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; 4000765c: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007660: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 40007664: 81 c7 e0 08 ret 40007668: 81 e8 00 00 restore 4000b3c4 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000b3c4: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4000b3c8: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 if ( !api ) 4000b3cc: 80 a4 20 00 cmp %l0, 0 4000b3d0: 02 80 00 1f be 4000b44c <_RTEMS_tasks_Post_switch_extension+0x88> 4000b3d4: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000b3d8: 7f ff da 41 call 40001cdc 4000b3dc: 01 00 00 00 nop signal_set = asr->signals_posted; 4000b3e0: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 4000b3e4: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 4000b3e8: 7f ff da 41 call 40001cec 4000b3ec: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000b3f0: 80 a4 60 00 cmp %l1, 0 4000b3f4: 32 80 00 04 bne,a 4000b404 <_RTEMS_tasks_Post_switch_extension+0x40> 4000b3f8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4000b3fc: 81 c7 e0 08 ret <== NOT EXECUTED 4000b400: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b404: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000b408: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b40c: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000b410: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b414: 94 10 00 12 mov %l2, %o2 4000b418: 27 00 00 3f sethi %hi(0xfc00), %l3 4000b41c: 40 00 07 c5 call 4000d330 4000b420: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000b424: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000b428: 9f c0 40 00 call %g1 4000b42c: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 4000b430: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b434: d0 07 bf fc ld [ %fp + -4 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000b438: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b43c: 92 14 e3 ff or %l3, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000b440: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b444: 40 00 07 bb call 4000d330 4000b448: 94 10 00 12 mov %l2, %o2 4000b44c: 81 c7 e0 08 ret 4000b450: 81 e8 00 00 restore 400076d0 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 400076d0: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 400076d4: 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 ); 400076d8: 40 00 04 41 call 400087dc <_Thread_Set_transient> 400076dc: 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 ) 400076e0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400076e4: 80 a0 40 19 cmp %g1, %i1 400076e8: 02 80 00 05 be 400076fc <_Thread_Change_priority+0x2c> 400076ec: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 400076f0: 92 10 00 19 mov %i1, %o1 400076f4: 40 00 03 be call 400085ec <_Thread_Set_priority> 400076f8: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 400076fc: 7f ff e9 78 call 40001cdc 40007700: 01 00 00 00 nop 40007704: 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; 40007708: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 4000770c: 80 a4 a0 04 cmp %l2, 4 40007710: 02 80 00 18 be 40007770 <_Thread_Change_priority+0xa0> 40007714: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 40007718: 02 80 00 0b be 40007744 <_Thread_Change_priority+0x74> 4000771c: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 40007720: 7f ff e9 73 call 40001cec <== NOT EXECUTED 40007724: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 40007728: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 4000772c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 40007730: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 40007734: 32 80 00 0d bne,a 40007768 <_Thread_Change_priority+0x98> <== NOT EXECUTED 40007738: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 4000773c: 81 c7 e0 08 ret 40007740: 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 ); 40007744: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 40007748: 7f ff e9 69 call 40001cec 4000774c: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 40007750: 03 00 00 ef sethi %hi(0x3bc00), %g1 40007754: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40007758: 80 8c 80 01 btst %l2, %g1 4000775c: 02 bf ff f8 be 4000773c <_Thread_Change_priority+0x6c> 40007760: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 40007764: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 40007768: 40 00 03 71 call 4000852c <_Thread_queue_Requeue> 4000776c: 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 ) ) { 40007770: 12 80 00 14 bne 400077c0 <_Thread_Change_priority+0xf0> 40007774: 23 10 00 70 sethi %hi(0x4001c000), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40007778: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 4000777c: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 40007780: 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 ); 40007784: c0 24 20 10 clr [ %l0 + 0x10 ] 40007788: 84 10 c0 02 or %g3, %g2, %g2 4000778c: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 40007790: c4 14 60 b0 lduh [ %l1 + 0xb0 ], %g2 40007794: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 40007798: 80 8e a0 ff btst 0xff, %i2 4000779c: 82 10 80 01 or %g2, %g1, %g1 400077a0: c2 34 60 b0 sth %g1, [ %l1 + 0xb0 ] 400077a4: 02 80 00 48 be 400078c4 <_Thread_Change_priority+0x1f4> 400077a8: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400077ac: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400077b0: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 400077b4: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 400077b8: 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; 400077bc: 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 ); 400077c0: 7f ff e9 4b call 40001cec 400077c4: 90 10 00 18 mov %i0, %o0 400077c8: 7f ff e9 45 call 40001cdc 400077cc: 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 ); 400077d0: c2 14 60 b0 lduh [ %l1 + 0xb0 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 400077d4: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400077d8: 83 28 60 10 sll %g1, 0x10, %g1 400077dc: da 00 a3 54 ld [ %g2 + 0x354 ], %o5 400077e0: 85 30 60 10 srl %g1, 0x10, %g2 400077e4: 80 a0 a0 ff cmp %g2, 0xff 400077e8: 08 80 00 27 bleu 40007884 <_Thread_Change_priority+0x1b4> 400077ec: 07 10 00 6a sethi %hi(0x4001a800), %g3 400077f0: 83 30 60 18 srl %g1, 0x18, %g1 400077f4: 86 10 e1 c8 or %g3, 0x1c8, %g3 400077f8: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 400077fc: 09 10 00 70 sethi %hi(0x4001c000), %g4 40007800: 85 28 a0 10 sll %g2, 0x10, %g2 40007804: 88 11 21 30 or %g4, 0x130, %g4 40007808: 83 30 a0 0f srl %g2, 0xf, %g1 4000780c: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40007810: 83 28 60 10 sll %g1, 0x10, %g1 40007814: 89 30 60 10 srl %g1, 0x10, %g4 40007818: 80 a1 20 ff cmp %g4, 0xff 4000781c: 18 80 00 28 bgu 400078bc <_Thread_Change_priority+0x1ec> 40007820: 83 30 60 18 srl %g1, 0x18, %g1 40007824: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40007828: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4000782c: 85 30 a0 0c srl %g2, 0xc, %g2 40007830: 83 28 60 10 sll %g1, 0x10, %g1 40007834: 83 30 60 10 srl %g1, 0x10, %g1 40007838: 82 00 40 02 add %g1, %g2, %g1 4000783c: 85 28 60 04 sll %g1, 4, %g2 40007840: 83 28 60 02 sll %g1, 2, %g1 40007844: 82 20 80 01 sub %g2, %g1, %g1 40007848: 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 ); 4000784c: 05 10 00 70 sethi %hi(0x4001c000), %g2 40007850: c4 00 a0 bc ld [ %g2 + 0xbc ], %g2 ! 4001c0bc <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40007854: 07 10 00 70 sethi %hi(0x4001c000), %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() && 40007858: 80 a0 40 02 cmp %g1, %g2 4000785c: 02 80 00 08 be 4000787c <_Thread_Change_priority+0x1ac> 40007860: c2 20 e0 8c st %g1, [ %g3 + 0x8c ] _Thread_Executing->is_preemptible ) 40007864: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 40007868: 80 a0 60 00 cmp %g1, 0 4000786c: 02 80 00 04 be 4000787c <_Thread_Change_priority+0x1ac> 40007870: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 40007874: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007878: c4 28 60 cc stb %g2, [ %g1 + 0xcc ] ! 4001c0cc <_Context_Switch_necessary> _ISR_Enable( level ); 4000787c: 7f ff e9 1c call 40001cec 40007880: 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 ); 40007884: 86 10 e1 c8 or %g3, 0x1c8, %g3 40007888: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4000788c: 09 10 00 70 sethi %hi(0x4001c000), %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 ); 40007890: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40007894: 88 11 21 30 or %g4, 0x130, %g4 40007898: 85 28 a0 10 sll %g2, 0x10, %g2 4000789c: 83 30 a0 0f srl %g2, 0xf, %g1 400078a0: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 400078a4: 83 28 60 10 sll %g1, 0x10, %g1 400078a8: 89 30 60 10 srl %g1, 0x10, %g4 400078ac: 80 a1 20 ff cmp %g4, 0xff 400078b0: 28 bf ff de bleu,a 40007828 <_Thread_Change_priority+0x158> 400078b4: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 400078b8: 83 30 60 18 srl %g1, 0x18, %g1 400078bc: 10 bf ff dc b 4000782c <_Thread_Change_priority+0x15c> 400078c0: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400078c4: 84 00 60 04 add %g1, 4, %g2 400078c8: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 400078cc: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 400078d0: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 400078d4: 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; 400078d8: 10 bf ff ba b 400077c0 <_Thread_Change_priority+0xf0> 400078dc: e0 20 80 00 st %l0, [ %g2 ] 4000c17c <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000c17c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000c180: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000c184: e0 00 60 bc ld [ %g1 + 0xbc ], %l0 ! 4001c0bc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000c188: 7f ff d6 d5 call 40001cdc 4000c18c: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000c190: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000c194: c4 04 40 00 ld [ %l1 ], %g2 4000c198: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000c19c: 80 a0 80 01 cmp %g2, %g1 4000c1a0: 02 80 00 1f be 4000c21c <_Thread_Reset_timeslice+0xa0> 4000c1a4: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000c1a8: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 4000c1ac: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000c1b0: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000c1b4: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000c1b8: 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; 4000c1bc: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000c1c0: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000c1c4: 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; 4000c1c8: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000c1cc: 7f ff d6 c8 call 40001cec 4000c1d0: 01 00 00 00 nop 4000c1d4: 7f ff d6 c2 call 40001cdc 4000c1d8: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000c1dc: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000c1e0: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 ! 4001c08c <_Thread_Heir> 4000c1e4: 80 a4 00 02 cmp %l0, %g2 4000c1e8: 02 80 00 06 be 4000c200 <_Thread_Reset_timeslice+0x84> 4000c1ec: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4000c1f0: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 4000c1f4: c4 28 60 cc stb %g2, [ %g1 + 0xcc ] ! 4001c0cc <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000c1f8: 7f ff d6 bd call 40001cec <== NOT EXECUTED 4000c1fc: 81 e8 00 00 restore <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4000c200: c4 04 40 00 ld [ %l1 ], %g2 4000c204: c4 20 60 8c st %g2, [ %g1 + 0x8c ] _Context_Switch_necessary = true; 4000c208: 84 10 20 01 mov 1, %g2 4000c20c: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000c210: c4 28 60 cc stb %g2, [ %g1 + 0xcc ] ! 4001c0cc <_Context_Switch_necessary> _ISR_Enable( level ); 4000c214: 7f ff d6 b6 call 40001cec 4000c218: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000c21c: 7f ff d6 b4 call 40001cec 4000c220: 81 e8 00 00 restore 4000c224: 01 00 00 00 nop 40008a08 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 40008a08: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 40008a0c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008a10: e0 00 60 bc ld [ %g1 + 0xbc ], %l0 ! 4001c0bc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 40008a14: 7f ff e4 b2 call 40001cdc 40008a18: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 40008a1c: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 40008a20: c4 04 40 00 ld [ %l1 ], %g2 40008a24: c2 04 60 08 ld [ %l1 + 8 ], %g1 40008a28: 80 a0 80 01 cmp %g2, %g1 40008a2c: 02 80 00 19 be 40008a90 <_Thread_Yield_processor+0x88> 40008a30: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40008a34: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 40008a38: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 40008a3c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008a40: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40008a44: 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; 40008a48: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 40008a4c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008a50: 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; 40008a54: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 40008a58: 7f ff e4 a5 call 40001cec 40008a5c: 01 00 00 00 nop 40008a60: 7f ff e4 9f call 40001cdc 40008a64: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 40008a68: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008a6c: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 ! 4001c08c <_Thread_Heir> 40008a70: 80 a4 00 02 cmp %l0, %g2 40008a74: 22 80 00 0e be,a 40008aac <_Thread_Yield_processor+0xa4> 40008a78: 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; 40008a7c: 84 10 20 01 mov 1, %g2 40008a80: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008a84: c4 28 60 cc stb %g2, [ %g1 + 0xcc ] ! 4001c0cc <_Context_Switch_necessary> _ISR_Enable( level ); 40008a88: 7f ff e4 99 call 40001cec 40008a8c: 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 ) ) 40008a90: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008a94: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 4001c08c <_Thread_Heir> 40008a98: 80 a4 00 01 cmp %l0, %g1 40008a9c: 32 bf ff f9 bne,a 40008a80 <_Thread_Yield_processor+0x78> 40008aa0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 40008aa4: 7f ff e4 92 call 40001cec 40008aa8: 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; 40008aac: 10 bf ff f4 b 40008a7c <_Thread_Yield_processor+0x74> 40008ab0: c4 20 60 8c st %g2, [ %g1 + 0x8c ] 40008270 <_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 ) { 40008270: 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; 40008274: 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); 40008278: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 4000827c: 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); 40008280: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40008284: 82 06 60 38 add %i1, 0x38, %g1 40008288: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 4000828c: 2d 10 00 6d sethi %hi(0x4001b400), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40008290: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008294: 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 ]; 40008298: ab 28 60 04 sll %g1, 4, %l5 4000829c: ac 15 a3 14 or %l6, 0x314, %l6 400082a0: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 400082a4: 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 ]; 400082a8: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 400082ac: 12 80 00 24 bne 4000833c <_Thread_queue_Enqueue_priority+0xcc> 400082b0: 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; 400082b4: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 400082b8: 7f ff e6 89 call 40001cdc 400082bc: 01 00 00 00 nop 400082c0: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 400082c4: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400082c8: 80 a0 40 16 cmp %g1, %l6 400082cc: 02 80 00 3a be 400083b4 <_Thread_queue_Enqueue_priority+0x144> 400082d0: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 400082d4: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 400082d8: 80 a4 00 13 cmp %l0, %l3 400082dc: 18 80 00 0b bgu 40008308 <_Thread_queue_Enqueue_priority+0x98> 400082e0: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400082e4: 10 80 00 36 b 400083bc <_Thread_queue_Enqueue_priority+0x14c> 400082e8: 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 ) ) { 400082ec: 80 a4 40 16 cmp %l1, %l6 400082f0: 02 80 00 32 be 400083b8 <_Thread_queue_Enqueue_priority+0x148> 400082f4: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 400082f8: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 400082fc: 80 a4 00 13 cmp %l0, %l3 40008300: 28 80 00 2f bleu,a 400083bc <_Thread_queue_Enqueue_priority+0x14c> 40008304: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 40008308: 7f ff e6 79 call 40001cec 4000830c: 90 10 00 12 mov %l2, %o0 40008310: 7f ff e6 73 call 40001cdc 40008314: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008318: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 4000831c: 80 8d 00 01 btst %l4, %g1 40008320: 32 bf ff f3 bne,a 400082ec <_Thread_queue_Enqueue_priority+0x7c> 40008324: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40008328: 7f ff e6 71 call 40001cec <== NOT EXECUTED 4000832c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40008330: 30 bf ff e2 b,a 400082b8 <_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 ); 40008334: 7f ff e6 6e call 40001cec 40008338: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4000833c: 7f ff e6 68 call 40001cdc 40008340: 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; 40008344: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 40008348: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 4000834c: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40008350: 80 a0 40 15 cmp %g1, %l5 40008354: 02 80 00 20 be 400083d4 <_Thread_queue_Enqueue_priority+0x164> 40008358: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 4000835c: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 40008360: 80 a4 00 13 cmp %l0, %l3 40008364: 0a 80 00 0b bcs 40008390 <_Thread_queue_Enqueue_priority+0x120> 40008368: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4000836c: 10 80 00 1b b 400083d8 <_Thread_queue_Enqueue_priority+0x168> 40008370: 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 ) ) { 40008374: 80 a4 40 15 cmp %l1, %l5 40008378: 02 80 00 17 be 400083d4 <_Thread_queue_Enqueue_priority+0x164> 4000837c: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 40008380: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 40008384: 80 a4 00 13 cmp %l0, %l3 40008388: 3a 80 00 14 bcc,a 400083d8 <_Thread_queue_Enqueue_priority+0x168> 4000838c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40008390: 7f ff e6 57 call 40001cec 40008394: 90 10 00 12 mov %l2, %o0 40008398: 7f ff e6 51 call 40001cdc 4000839c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400083a0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400083a4: 80 8d 00 01 btst %l4, %g1 400083a8: 32 bf ff f3 bne,a 40008374 <_Thread_queue_Enqueue_priority+0x104> 400083ac: e2 04 60 04 ld [ %l1 + 4 ], %l1 400083b0: 30 bf ff e1 b,a 40008334 <_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 ) ) { 400083b4: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400083b8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400083bc: 80 a0 a0 01 cmp %g2, 1 400083c0: 02 80 00 17 be 4000841c <_Thread_queue_Enqueue_priority+0x1ac> 400083c4: 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; 400083c8: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 400083cc: 81 c7 e0 08 ret 400083d0: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400083d4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400083d8: 80 a0 a0 01 cmp %g2, 1 400083dc: 32 bf ff fc bne,a 400083cc <_Thread_queue_Enqueue_priority+0x15c> 400083e0: 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 ) 400083e4: 80 a4 00 13 cmp %l0, %l3 400083e8: 02 80 00 1a be 40008450 <_Thread_queue_Enqueue_priority+0x1e0> 400083ec: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400083f0: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400083f4: 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; 400083f8: 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; 400083fc: 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; 40008400: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 40008404: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008408: b0 10 20 01 mov 1, %i0 4000840c: 7f ff e6 38 call 40001cec 40008410: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008414: 81 c7 e0 08 ret 40008418: 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 ) 4000841c: 02 80 00 0d be 40008450 <_Thread_queue_Enqueue_priority+0x1e0> 40008420: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40008424: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008428: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 4000842c: 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; 40008430: 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; 40008434: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40008438: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000843c: b0 10 20 01 mov 1, %i0 40008440: 7f ff e6 2b call 40001cec 40008444: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008448: 81 c7 e0 08 ret 4000844c: 81 e8 00 00 restore 40008450: 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; 40008454: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008458: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 4000845c: 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; 40008460: 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; 40008464: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008468: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000846c: b0 10 20 01 mov 1, %i0 40008470: 7f ff e6 1f call 40001cec 40008474: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008478: 81 c7 e0 08 ret 4000847c: 81 e8 00 00 restore 4000852c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000852c: 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 ) 40008530: 80 a6 20 00 cmp %i0, 0 40008534: 02 80 00 13 be 40008580 <_Thread_queue_Requeue+0x54> 40008538: 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 ) { 4000853c: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 40008540: 80 a4 60 01 cmp %l1, 1 40008544: 02 80 00 04 be 40008554 <_Thread_queue_Requeue+0x28> 40008548: 01 00 00 00 nop 4000854c: 81 c7 e0 08 ret <== NOT EXECUTED 40008550: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40008554: 7f ff e5 e2 call 40001cdc 40008558: 01 00 00 00 nop 4000855c: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40008560: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40008564: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008568: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000856c: 80 88 80 01 btst %g2, %g1 40008570: 12 80 00 06 bne 40008588 <_Thread_queue_Requeue+0x5c> 40008574: 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 ); 40008578: 7f ff e5 dd call 40001cec 4000857c: 90 10 00 10 mov %l0, %o0 40008580: 81 c7 e0 08 ret 40008584: 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 ); 40008588: 92 10 00 19 mov %i1, %o1 4000858c: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 40008590: 40 00 0e 59 call 4000bef4 <_Thread_queue_Extract_priority_helper> 40008594: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 40008598: 90 10 00 18 mov %i0, %o0 4000859c: 92 10 00 19 mov %i1, %o1 400085a0: 7f ff ff 34 call 40008270 <_Thread_queue_Enqueue_priority> 400085a4: 94 07 bf fc add %fp, -4, %o2 400085a8: 30 bf ff f4 b,a 40008578 <_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 f1 sethi %hi(0x4003c400), %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 f1 sethi %hi(0x4003c400), %l5 40015ae8: 39 10 00 f1 sethi %hi(0x4003c400), %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 a1 c4 or %l6, 0x1c4, %l6 40015b08: aa 15 61 00 or %l5, 0x100, %l5 40015b0c: b8 17 20 70 or %i4, 0x70, %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 11 c0 call 4001a23c <_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 98 call 400165cc <_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 11 df call 4001a314 <_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 8a call 400165cc <_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 11 94 call 4001a23c <_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 11 8b call 4001a23c <_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 57 call 4001a17c <_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 11 b9 call 4001a314 <_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 90 call 400196f8 <_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 0b c1 call 40018bd4 <_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 11 fa call 4001a4c8 <_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 11 f8 call 4001a4c8 <_Watchdog_Remove> 40015cec: 90 10 00 1a mov %i2, %o0 40015cf0: 30 bf ff 8d b,a 40015b24 <_Timer_server_Body+0x58> 4000b0a4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000b0a4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 4000b0a8: 7f ff de da call 40002c10 4000b0ac: 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)); 4000b0b0: 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; 4000b0b4: 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 ) ) { 4000b0b8: 80 a0 40 11 cmp %g1, %l1 4000b0bc: 02 80 00 1f be 4000b138 <_Watchdog_Adjust+0x94> 4000b0c0: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000b0c4: 12 80 00 1f bne 4000b140 <_Watchdog_Adjust+0x9c> 4000b0c8: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000b0cc: 80 a6 a0 00 cmp %i2, 0 4000b0d0: 02 80 00 1a be 4000b138 <_Watchdog_Adjust+0x94> 4000b0d4: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000b0d8: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000b0dc: 80 a6 80 19 cmp %i2, %i1 4000b0e0: 1a 80 00 0b bcc 4000b10c <_Watchdog_Adjust+0x68> 4000b0e4: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 4000b0e8: 10 80 00 1d b 4000b15c <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000b0ec: 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 ) { 4000b0f0: b4 a6 80 19 subcc %i2, %i1, %i2 4000b0f4: 02 80 00 11 be 4000b138 <_Watchdog_Adjust+0x94> 4000b0f8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000b0fc: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000b100: 80 a6 40 1a cmp %i1, %i2 4000b104: 38 80 00 16 bgu,a 4000b15c <_Watchdog_Adjust+0xb8> 4000b108: 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; 4000b10c: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 4000b110: 7f ff de c4 call 40002c20 4000b114: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000b118: 40 00 00 b6 call 4000b3f0 <_Watchdog_Tickle> 4000b11c: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 4000b120: 7f ff de bc call 40002c10 4000b124: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000b128: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 4000b12c: 80 a4 40 02 cmp %l1, %g2 4000b130: 12 bf ff f0 bne 4000b0f0 <_Watchdog_Adjust+0x4c> 4000b134: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 4000b138: 7f ff de ba call 40002c20 4000b13c: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000b140: 12 bf ff fe bne 4000b138 <_Watchdog_Adjust+0x94> 4000b144: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000b148: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000b14c: b4 00 80 1a add %g2, %i2, %i2 4000b150: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 4000b154: 7f ff de b3 call 40002c20 4000b158: 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; 4000b15c: 10 bf ff f7 b 4000b138 <_Watchdog_Adjust+0x94> 4000b160: f4 20 60 10 st %i2, [ %g1 + 0x10 ] 40024358 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 40024358: 81 c3 e0 08 retl <== NOT EXECUTED 4002435c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40019bdc <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 40019bdc: 9d e3 bf a0 save %sp, -96, %sp 40019be0: 40 00 06 97 call 4001b63c <_fini> 40019be4: 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(); 40019be8: 7f ff ff e2 call 40019b70 40019bec: 01 00 00 00 nop rtems_shutdown_executive(status); 40019bf0: 40 00 00 50 call 40019d30 40019bf4: 90 10 00 18 mov %i0, %o0 40019bf8: 30 80 00 00 b,a 40019bf8 <_exit+0x1c> <== NOT EXECUTED 4003df4c <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4003df4c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4003df50: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4003df54: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4003df58: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4003df5c: 7f ff ff 69 call 4003dd00 <== NOT EXECUTED 4003df60: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4003df64: 01 00 00 00 nop 4002432c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4002432c: 81 c3 e0 08 retl <== NOT EXECUTED 40024330: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000ac44 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000ac44: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000ac48: 7f ff ff e6 call 4000abe0 <== NOT EXECUTED 4000ac4c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000ac50: 01 00 00 00 nop 40024350 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 40024350: 81 c3 e0 08 retl <== NOT EXECUTED 40024354: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002aa28 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 4002aa28: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002aa2c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002aa30: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002aa34: 7f ff ff 52 call 4002a77c <== NOT EXECUTED 4002aa38: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002aa3c: 01 00 00 00 nop 4002ad00 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 4002ad00: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002ad04: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002ad08: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002ad0c: 7f ff ff b1 call 4002abd0 <== NOT EXECUTED 4002ad10: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002ad14: 01 00 00 00 nop 40019cfc <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 40019cfc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40019d00: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40019d04: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40019d08: 40 00 00 17 call 40019d64 <== NOT EXECUTED 40019d0c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40019d10: 01 00 00 00 nop 4005de6c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 4005de6c: 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 ); 4005de70: 7f fe a4 3c call 40006f60 <== NOT EXECUTED 4005de74: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 4005de78: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4005de7c: 32 80 01 1d bne,a 4005e2f0 <_rename_r+0x484> <== NOT EXECUTED 4005de80: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 4005de84: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 4005de88: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005de8c: 02 80 00 13 be 4005ded8 <_rename_r+0x6c> <== NOT EXECUTED 4005de90: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005de94: 02 80 00 11 be 4005ded8 <_rename_r+0x6c> <== NOT EXECUTED 4005de98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005de9c: 02 80 00 10 be 4005dedc <_rename_r+0x70> <== NOT EXECUTED 4005dea0: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 4005dea4: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED 4005dea8: a2 10 20 00 clr %l1 <== NOT EXECUTED 4005deac: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4005deb0: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED 4005deb4: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4005deb8: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4005debc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4005dec0: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4005dec4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4005dec8: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4005decc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4005ded0: 10 80 00 0f b 4005df0c <_rename_r+0xa0> <== NOT EXECUTED 4005ded4: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 4005ded8: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 4005dedc: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED 4005dee0: a2 10 20 00 clr %l1 <== NOT EXECUTED 4005dee4: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4005dee8: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED 4005deec: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 4005def0: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4005def4: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 4005def8: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4005defc: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 4005df00: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4005df04: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4005df08: 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; 4005df0c: c2 07 bf d4 ld [ %fp + -44 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; 4005df10: 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; 4005df14: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED 4005df18: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; 4005df1c: 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; 4005df20: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 4005df24: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4005df28: 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; 4005df2c: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED 4005df30: 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 ), 4005df34: 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; 4005df38: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED 4005df3c: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4005df40: 7f ff b1 e2 call 4004a6c8 <== NOT EXECUTED 4005df44: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED 4005df48: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005df4c: 7f fe a3 e6 call 40006ee4 <== NOT EXECUTED 4005df50: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005df54: b2 06 40 08 add %i1, %o0, %i1 <== NOT EXECUTED 4005df58: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4005df5c: 7f ff b1 db call 4004a6c8 <== NOT EXECUTED 4005df60: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005df64: 94 10 20 00 clr %o2 <== NOT EXECUTED 4005df68: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005df6c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4005df70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005df74: 7f fe a4 1b call 40006fe0 <== NOT EXECUTED 4005df78: 98 10 20 00 clr %o4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 4005df7c: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 4005df80: 12 80 00 87 bne 4005e19c <_rename_r+0x330> <== NOT EXECUTED 4005df84: 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 ); 4005df88: c2 4e 80 00 ldsb [ %i2 ], %g1 <== NOT EXECUTED 4005df8c: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005df90: 02 80 00 13 be 4005dfdc <_rename_r+0x170> <== NOT EXECUTED 4005df94: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005df98: 02 80 00 11 be 4005dfdc <_rename_r+0x170> <== NOT EXECUTED 4005df9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005dfa0: 02 80 00 10 be 4005dfe0 <_rename_r+0x174> <== NOT EXECUTED 4005dfa4: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 4005dfa8: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED 4005dfac: 90 10 20 00 clr %o0 <== NOT EXECUTED 4005dfb0: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4005dfb4: c4 27 bf c0 st %g2, [ %fp + -64 ] <== NOT EXECUTED 4005dfb8: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4005dfbc: c4 27 bf c4 st %g2, [ %fp + -60 ] <== NOT EXECUTED 4005dfc0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4005dfc4: c4 27 bf c8 st %g2, [ %fp + -56 ] <== NOT EXECUTED 4005dfc8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4005dfcc: c4 27 bf cc st %g2, [ %fp + -52 ] <== NOT EXECUTED 4005dfd0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4005dfd4: 10 80 00 0f b 4005e010 <_rename_r+0x1a4> <== NOT EXECUTED 4005dfd8: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED 4005dfdc: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 4005dfe0: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED 4005dfe4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4005dfe8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4005dfec: c4 27 bf c0 st %g2, [ %fp + -64 ] <== NOT EXECUTED 4005dff0: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 4005dff4: c4 27 bf c4 st %g2, [ %fp + -60 ] <== NOT EXECUTED 4005dff8: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 4005dffc: c4 27 bf c8 st %g2, [ %fp + -56 ] <== NOT EXECUTED 4005e000: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 4005e004: c4 27 bf cc st %g2, [ %fp + -52 ] <== NOT EXECUTED 4005e008: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4005e00c: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 4005e010: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005e014: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4005e018: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e01c: 02 80 00 98 be 4005e27c <_rename_r+0x410> <== NOT EXECUTED 4005e020: 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 ); 4005e024: 90 06 80 08 add %i2, %o0, %o0 <== NOT EXECUTED 4005e028: b4 07 bf c0 add %fp, -64, %i2 <== NOT EXECUTED 4005e02c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e030: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED if ( result != 0 ) { 4005e034: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 4005e038: 12 80 00 69 bne 4005e1dc <_rename_r+0x370> <== NOT EXECUTED 4005e03c: 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 ) { 4005e040: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 4005e044: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4005e048: 12 80 00 2e bne 4005e100 <_rename_r+0x294> <== NOT EXECUTED 4005e04c: 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 ) { 4005e050: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 <== NOT EXECUTED 4005e054: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e058: 02 80 00 83 be 4005e264 <_rename_r+0x3f8> <== NOT EXECUTED 4005e05c: 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 ); 4005e060: b2 07 bf d4 add %fp, -44, %i1 <== NOT EXECUTED 4005e064: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005e068: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005e06c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e070: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005e074: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005e078: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e07c: 02 80 00 08 be 4005e09c <_rename_r+0x230> <== NOT EXECUTED 4005e080: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4005e084: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e088: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e08c: 02 80 00 05 be 4005e0a0 <_rename_r+0x234> <== NOT EXECUTED 4005e090: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e094: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e098: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005e09c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e0a0: 02 80 00 0d be 4005e0d4 <_rename_r+0x268> <== NOT EXECUTED 4005e0a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005e0a8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005e0ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e0b0: 22 80 00 09 be,a 4005e0d4 <_rename_r+0x268> <== NOT EXECUTED 4005e0b4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e0b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e0bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e0c0: 22 80 00 05 be,a 4005e0d4 <_rename_r+0x268> <== NOT EXECUTED 4005e0c4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e0c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e0cc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005e0d0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e0d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e0d8: 02 80 00 8f be 4005e314 <_rename_r+0x4a8> <== NOT EXECUTED 4005e0dc: 01 00 00 00 nop <== NOT EXECUTED 4005e0e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e0e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e0e8: 02 80 00 8b be 4005e314 <_rename_r+0x4a8> <== NOT EXECUTED 4005e0ec: 01 00 00 00 nop <== NOT EXECUTED 4005e0f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e0f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 4005e0f8: 81 c7 e0 08 ret <== NOT EXECUTED 4005e0fc: 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 ); 4005e100: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005e104: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e108: 02 80 00 09 be 4005e12c <_rename_r+0x2c0> <== NOT EXECUTED 4005e10c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e110: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e114: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e118: 02 80 00 05 be 4005e12c <_rename_r+0x2c0> <== NOT EXECUTED 4005e11c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e120: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e124: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005e128: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e12c: 02 80 00 0d be 4005e160 <_rename_r+0x2f4> <== NOT EXECUTED 4005e130: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005e134: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005e138: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e13c: 22 80 00 09 be,a 4005e160 <_rename_r+0x2f4> <== NOT EXECUTED 4005e140: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e144: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e148: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e14c: 22 80 00 05 be,a 4005e160 <_rename_r+0x2f4> <== NOT EXECUTED 4005e150: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e154: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e158: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005e15c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e160: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e164: 02 80 00 08 be 4005e184 <_rename_r+0x318> <== NOT EXECUTED 4005e168: 01 00 00 00 nop <== NOT EXECUTED 4005e16c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e170: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e174: 02 80 00 04 be 4005e184 <_rename_r+0x318> <== NOT EXECUTED 4005e178: 01 00 00 00 nop <== NOT EXECUTED 4005e17c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e180: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 4005e184: 7f ff 96 26 call 40043a1c <__errno> <== NOT EXECUTED 4005e188: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005e18c: 82 10 20 12 mov 0x12, %g1 <== NOT EXECUTED 4005e190: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005e194: 81 c7 e0 08 ret <== NOT EXECUTED 4005e198: 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 ) 4005e19c: 02 80 00 0b be 4005e1c8 <_rename_r+0x35c> <== NOT EXECUTED 4005e1a0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005e1a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e1a8: 02 80 00 08 be 4005e1c8 <_rename_r+0x35c> <== NOT EXECUTED 4005e1ac: 01 00 00 00 nop <== NOT EXECUTED 4005e1b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e1b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e1b8: 02 80 00 04 be 4005e1c8 <_rename_r+0x35c> <== NOT EXECUTED 4005e1bc: 01 00 00 00 nop <== NOT EXECUTED 4005e1c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e1c4: 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 ); 4005e1c8: 7f ff 96 15 call 40043a1c <__errno> <== NOT EXECUTED 4005e1cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005e1d0: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED 4005e1d4: 81 c7 e0 08 ret <== NOT EXECUTED 4005e1d8: 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 ); 4005e1dc: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005e1e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e1e4: 02 80 00 09 be 4005e208 <_rename_r+0x39c> <== NOT EXECUTED 4005e1e8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e1ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e1f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e1f4: 02 80 00 05 be 4005e208 <_rename_r+0x39c> <== NOT EXECUTED 4005e1f8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e1fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e200: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005e204: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e208: 02 80 00 0d be 4005e23c <_rename_r+0x3d0> <== NOT EXECUTED 4005e20c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005e210: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005e214: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e218: 22 80 00 09 be,a 4005e23c <_rename_r+0x3d0> <== NOT EXECUTED 4005e21c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e220: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e224: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e228: 22 80 00 05 be,a 4005e23c <_rename_r+0x3d0> <== NOT EXECUTED 4005e22c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e230: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e234: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005e238: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e23c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e240: 02 bf ff e2 be 4005e1c8 <_rename_r+0x35c> <== NOT EXECUTED 4005e244: 01 00 00 00 nop <== NOT EXECUTED 4005e248: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e24c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e250: 02 bf ff de be 4005e1c8 <_rename_r+0x35c> <== NOT EXECUTED 4005e254: 01 00 00 00 nop <== NOT EXECUTED 4005e258: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e25c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4005e260: 30 bf ff da b,a 4005e1c8 <_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 ); 4005e264: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4005e268: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e26c: 02 80 00 05 be 4005e280 <_rename_r+0x414> <== NOT EXECUTED 4005e270: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e274: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e278: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005e27c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005e280: 02 80 00 0d be 4005e2b4 <_rename_r+0x448> <== NOT EXECUTED 4005e284: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005e288: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005e28c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e290: 22 80 00 09 be,a 4005e2b4 <_rename_r+0x448> <== NOT EXECUTED 4005e294: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e298: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e29c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e2a0: 22 80 00 05 be,a 4005e2b4 <_rename_r+0x448> <== NOT EXECUTED 4005e2a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e2a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e2ac: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005e2b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005e2b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e2b8: 02 80 00 08 be 4005e2d8 <_rename_r+0x46c> <== NOT EXECUTED 4005e2bc: 01 00 00 00 nop <== NOT EXECUTED 4005e2c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005e2c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005e2c8: 02 80 00 04 be 4005e2d8 <_rename_r+0x46c> <== NOT EXECUTED 4005e2cc: 01 00 00 00 nop <== NOT EXECUTED 4005e2d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005e2d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4005e2d8: 7f ff 95 d1 call 40043a1c <__errno> <== NOT EXECUTED 4005e2dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005e2e0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4005e2e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005e2e8: 81 c7 e0 08 ret <== NOT EXECUTED 4005e2ec: 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, 4005e2f0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005e2f4: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 4005e2f8: 96 07 bf d4 add %fp, -44, %o3 <== NOT EXECUTED 4005e2fc: 98 10 20 00 clr %o4 <== NOT EXECUTED 4005e300: 7f fe a3 79 call 400070e4 <== NOT EXECUTED 4005e304: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 4005e308: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4005e30c: 02 bf ff 00 be 4005df0c <_rename_r+0xa0> <== NOT EXECUTED 4005e310: 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; } 4005e314: 81 c7 e0 08 ret <== NOT EXECUTED 4005e318: 81 e8 00 00 restore <== NOT EXECUTED 40008c70 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40008c70: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40008c74: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40008c78: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40008c7c: 7f ff ff b1 call 40008b40 <== NOT EXECUTED 40008c80: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40008c84: 01 00 00 00 nop 4000de44 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4000de44: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000de48: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000de4c: 7f ff ff 43 call 4000db58 <== NOT EXECUTED 4000de50: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000de54: 01 00 00 00 nop 40029274 : #include int chdir( const char *pathname ) { 40029274: 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 ); 40029278: 40 00 85 14 call 4004a6c8 4002927c: 90 10 00 18 mov %i0, %o0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40029280: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 40029284: 92 10 00 08 mov %o0, %o1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40029288: 94 10 20 01 mov 1, %o2 4002928c: 90 10 00 18 mov %i0, %o0 40029290: 96 10 00 10 mov %l0, %o3 40029294: 98 10 20 01 mov 1, %o4 40029298: 7f ff 77 93 call 400070e4 4002929c: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 400292a0: 80 a2 20 00 cmp %o0, 0 400292a4: 12 80 00 31 bne 40029368 400292a8: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 400292ac: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 400292b0: 80 a0 60 00 cmp %g1, 0 400292b4: 22 80 00 2f be,a 40029370 400292b8: 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 ) { 400292bc: 9f c0 40 00 call %g1 400292c0: 90 10 00 10 mov %l0, %o0 400292c4: 80 a2 20 01 cmp %o0, 1 400292c8: 12 80 00 1b bne 40029334 400292cc: 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 ); 400292d0: 21 10 01 a5 sethi %hi(0x40069400), %l0 400292d4: d0 04 21 08 ld [ %l0 + 0x108 ], %o0 ! 40069508 400292d8: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 400292dc: 80 a0 60 00 cmp %g1, 0 400292e0: 22 80 00 0a be,a 40029308 400292e4: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400292e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400292ec: 80 a0 60 00 cmp %g1, 0 400292f0: 22 80 00 06 be,a 40029308 400292f4: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400292f8: 9f c0 40 00 call %g1 400292fc: 90 02 20 04 add %o0, 4, %o0 40029300: d0 04 21 08 ld [ %l0 + 0x108 ], %o0 rtems_filesystem_current = loc; 40029304: c2 07 bf ec ld [ %fp + -20 ], %g1 40029308: c2 22 20 04 st %g1, [ %o0 + 4 ] 4002930c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40029310: c2 22 20 08 st %g1, [ %o0 + 8 ] 40029314: c2 07 bf f4 ld [ %fp + -12 ], %g1 40029318: c2 22 20 0c st %g1, [ %o0 + 0xc ] 4002931c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40029320: c2 22 20 10 st %g1, [ %o0 + 0x10 ] 40029324: c2 07 bf fc ld [ %fp + -4 ], %g1 40029328: c2 22 20 14 st %g1, [ %o0 + 0x14 ] return 0; } 4002932c: 81 c7 e0 08 ret 40029330: 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 ); 40029334: 80 a0 60 00 cmp %g1, 0 40029338: 02 80 00 08 be 40029358 4002933c: 01 00 00 00 nop 40029340: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40029344: 80 a0 60 00 cmp %g1, 0 40029348: 02 80 00 04 be 40029358 4002934c: 01 00 00 00 nop 40029350: 9f c0 40 00 call %g1 40029354: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40029358: 40 00 69 b1 call 40043a1c <__errno> 4002935c: b0 10 3f ff mov -1, %i0 40029360: 82 10 20 14 mov 0x14, %g1 40029364: c2 22 00 00 st %g1, [ %o0 ] 40029368: 81 c7 e0 08 ret 4002936c: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 40029370: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40029374: 02 80 00 04 be 40029384 <== NOT EXECUTED 40029378: 01 00 00 00 nop <== NOT EXECUTED 4002937c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40029380: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40029384: 40 00 69 a6 call 40043a1c <__errno> <== NOT EXECUTED 40029388: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002938c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40029390: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029394: 81 c7 e0 08 ret <== NOT EXECUTED 40029398: 81 e8 00 00 restore <== NOT EXECUTED 40006d18 : int chmod( const char *path, mode_t mode ) { 40006d18: 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 ); 40006d1c: 40 01 0e 6b call 4004a6c8 40006d20: 90 10 00 18 mov %i0, %o0 40006d24: a0 07 bf ec add %fp, -20, %l0 40006d28: 92 10 00 08 mov %o0, %o1 40006d2c: 94 10 20 00 clr %o2 40006d30: 90 10 00 18 mov %i0, %o0 40006d34: 96 10 00 10 mov %l0, %o3 40006d38: 98 10 20 01 mov 1, %o4 40006d3c: 40 00 00 ea call 400070e4 40006d40: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40006d44: 80 a2 20 00 cmp %o0, 0 40006d48: 12 80 00 16 bne 40006da0 40006d4c: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 40006d50: 80 a0 60 00 cmp %g1, 0 40006d54: 22 80 00 25 be,a 40006de8 40006d58: 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 ){ 40006d5c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006d60: 80 a0 60 00 cmp %g1, 0 40006d64: 02 80 00 11 be 40006da8 40006d68: 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 ); 40006d6c: 90 10 00 10 mov %l0, %o0 40006d70: 9f c0 40 00 call %g1 40006d74: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40006d78: c2 07 bf f8 ld [ %fp + -8 ], %g1 40006d7c: 80 a0 60 00 cmp %g1, 0 40006d80: 02 80 00 08 be 40006da0 40006d84: b0 10 00 08 mov %o0, %i0 40006d88: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006d8c: 80 a0 60 00 cmp %g1, 0 40006d90: 02 80 00 23 be 40006e1c 40006d94: 01 00 00 00 nop 40006d98: 9f c0 40 00 call %g1 40006d9c: 90 10 00 10 mov %l0, %o0 return result; } 40006da0: 81 c7 e0 08 ret 40006da4: 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 ); 40006da8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40006dac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006db0: 02 80 00 08 be 40006dd0 <== NOT EXECUTED 40006db4: 01 00 00 00 nop <== NOT EXECUTED 40006db8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006dbc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006dc0: 02 80 00 04 be 40006dd0 <== NOT EXECUTED 40006dc4: 01 00 00 00 nop <== NOT EXECUTED 40006dc8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006dcc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006dd0: 40 00 f3 13 call 40043a1c <__errno> <== NOT EXECUTED 40006dd4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006dd8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006ddc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006de0: 81 c7 e0 08 ret <== NOT EXECUTED 40006de4: 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 ); 40006de8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006dec: 02 80 00 08 be 40006e0c <== NOT EXECUTED 40006df0: 01 00 00 00 nop <== NOT EXECUTED 40006df4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006df8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006dfc: 02 80 00 04 be 40006e0c <== NOT EXECUTED 40006e00: 01 00 00 00 nop <== NOT EXECUTED 40006e04: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006e08: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 40006e0c: 40 00 f3 04 call 40043a1c <__errno> <== NOT EXECUTED 40006e10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006e14: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40006e18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006e1c: 81 c7 e0 08 ret <== NOT EXECUTED 40006e20: 81 e8 00 00 restore <== NOT EXECUTED 4002939c : int chown( const char *path, uid_t owner, gid_t group ) { 4002939c: 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 ) ) 400293a0: 40 00 84 ca call 4004a6c8 400293a4: 90 10 00 18 mov %i0, %o0 400293a8: a0 07 bf ec add %fp, -20, %l0 400293ac: 92 10 00 08 mov %o0, %o1 400293b0: 94 10 20 00 clr %o2 400293b4: 90 10 00 18 mov %i0, %o0 400293b8: 96 10 00 10 mov %l0, %o3 400293bc: 98 10 20 01 mov 1, %o4 400293c0: 7f ff 77 49 call 400070e4 400293c4: b0 10 3f ff mov -1, %i0 400293c8: 80 a2 20 00 cmp %o0, 0 400293cc: 12 80 00 15 bne 40029420 400293d0: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 400293d4: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 400293d8: 80 a0 60 00 cmp %g1, 0 400293dc: 02 80 00 13 be 40029428 400293e0: 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 ); 400293e4: 95 2e a0 10 sll %i2, 0x10, %o2 400293e8: 93 32 60 10 srl %o1, 0x10, %o1 400293ec: 95 32 a0 10 srl %o2, 0x10, %o2 400293f0: 9f c0 40 00 call %g1 400293f4: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 400293f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 400293fc: 80 a0 60 00 cmp %g1, 0 40029400: 02 80 00 08 be 40029420 40029404: b0 10 00 08 mov %o0, %i0 40029408: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002940c: 80 a0 60 00 cmp %g1, 0 40029410: 02 80 00 10 be 40029450 40029414: 01 00 00 00 nop 40029418: 9f c0 40 00 call %g1 4002941c: 90 10 00 10 mov %l0, %o0 return result; } 40029420: 81 c7 e0 08 ret 40029424: 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 ); 40029428: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002942c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40029430: 02 80 00 04 be 40029440 <== NOT EXECUTED 40029434: 01 00 00 00 nop <== NOT EXECUTED 40029438: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002943c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40029440: 40 00 69 77 call 40043a1c <__errno> <== NOT EXECUTED 40029444: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029448: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002944c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029450: 81 c7 e0 08 ret <== NOT EXECUTED 40029454: 81 e8 00 00 restore <== NOT EXECUTED 40029458 : #include int chroot( const char *pathname ) { 40029458: 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) { 4002945c: 21 10 01 a5 sethi %hi(0x40069400), %l0 40029460: e2 04 21 08 ld [ %l0 + 0x108 ], %l1 ! 40069508 40029464: 03 10 01 b4 sethi %hi(0x4006d000), %g1 40029468: 82 10 62 58 or %g1, 0x258, %g1 ! 4006d258 4002946c: 80 a4 40 01 cmp %l1, %g1 40029470: 02 80 00 28 be 40029510 40029474: 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); 40029478: 7f ff ff 7f call 40029274 4002947c: 90 10 00 18 mov %i0, %o0 if (result) { 40029480: 80 a2 20 00 cmp %o0, 0 40029484: 12 80 00 2f bne 40029540 40029488: 11 10 01 82 sethi %hi(0x40060800), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4002948c: 92 10 20 01 mov 1, %o1 40029490: 90 12 23 c8 or %o0, 0x3c8, %o0 40029494: 94 10 20 00 clr %o2 40029498: 96 07 bf ec add %fp, -20, %o3 4002949c: 7f ff 77 12 call 400070e4 400294a0: 98 10 20 00 clr %o4 400294a4: 80 a2 20 00 cmp %o0, 0 400294a8: 12 80 00 26 bne 40029540 400294ac: d0 04 21 08 ld [ %l0 + 0x108 ], %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); 400294b0: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 400294b4: 80 a0 60 00 cmp %g1, 0 400294b8: 22 80 00 0b be,a 400294e4 400294bc: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400294c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400294c4: 80 a0 60 00 cmp %g1, 0 400294c8: 22 80 00 07 be,a 400294e4 400294cc: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400294d0: 9f c0 40 00 call %g1 400294d4: 90 02 20 18 add %o0, 0x18, %o0 400294d8: 03 10 01 a5 sethi %hi(0x40069400), %g1 400294dc: d0 00 61 08 ld [ %g1 + 0x108 ], %o0 ! 40069508 rtems_filesystem_root = loc; 400294e0: c2 07 bf ec ld [ %fp + -20 ], %g1 400294e4: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 400294e8: c2 07 bf f0 ld [ %fp + -16 ], %g1 400294ec: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 400294f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400294f4: c2 22 20 20 st %g1, [ %o0 + 0x20 ] 400294f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 400294fc: c2 22 20 24 st %g1, [ %o0 + 0x24 ] 40029500: c2 07 bf fc ld [ %fp + -4 ], %g1 40029504: c2 22 20 28 st %g1, [ %o0 + 0x28 ] return 0; } 40029508: 81 c7 e0 08 ret 4002950c: 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*/ 40029510: 40 00 06 d1 call 4002b054 40029514: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 40029518: c2 04 21 08 ld [ %l0 + 0x108 ], %g1 4002951c: 80 a0 40 11 cmp %g1, %l1 40029520: 12 bf ff d6 bne 40029478 40029524: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40029528: 40 00 69 3d call 40043a1c <__errno> <== NOT EXECUTED 4002952c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40029530: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40029534: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029538: 81 c7 e0 08 ret <== NOT EXECUTED 4002953c: 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 ); 40029540: 40 00 69 37 call 40043a1c <__errno> <== NOT EXECUTED 40029544: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029548: 40 00 69 35 call 40043a1c <__errno> <== NOT EXECUTED 4002954c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40029550: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40029554: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 40029558: 81 c7 e0 08 ret <== NOT EXECUTED 4002955c: 81 e8 00 00 restore <== NOT EXECUTED 400098cc : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 400098cc: 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; 400098d0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 400098d4: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 400098d8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 400098dc: d2 00 60 0c ld [ %g1 + 0xc ], %o1 400098e0: 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; 400098e4: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 400098e8: 94 07 bf f4 add %fp, -12, %o2 400098ec: 40 00 03 67 call 4000a688 400098f0: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 400098f4: 80 a2 20 00 cmp %o0, 0 400098f8: 12 80 00 04 bne 40009908 400098fc: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 40009900: 81 c7 e0 08 ret 40009904: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 40009908: 40 00 00 3f call 40009a04 <== NOT EXECUTED 4000990c: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 40009910: 81 c7 e0 08 ret <== NOT EXECUTED 40009914: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40009924 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 40009924: 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; 40009928: e0 06 c0 00 ld [ %i3 ], %l0 if (!device_name_table) 4000992c: 80 a4 20 00 cmp %l0, 0 40009930: 02 80 00 2f be 400099ec 40009934: 03 10 00 3c sethi %hi(0x4000f000), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 40009938: e6 00 60 b8 ld [ %g1 + 0xb8 ], %l3 ! 4000f0b8 } /* 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 ); 4000993c: a2 10 20 00 clr %l1 for (i = 0; i < rtems_device_table_size; i++) { 40009940: 80 a4 e0 00 cmp %l3, 0 40009944: 02 80 00 18 be 400099a4 40009948: 82 10 20 00 clr %g1 if (!device_name_table[i].device_name) 4000994c: 85 28 60 04 sll %g1, 4, %g2 40009950: a9 28 60 02 sll %g1, 2, %l4 40009954: a8 05 00 02 add %l4, %g2, %l4 40009958: 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++) { 4000995c: a2 04 60 01 inc %l1 if (!device_name_table[i].device_name) 40009960: 80 a4 a0 00 cmp %l2, 0 40009964: 02 80 00 0d be 40009998 40009968: a8 04 00 14 add %l0, %l4, %l4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4000996c: 90 10 00 18 mov %i0, %o0 40009970: 92 10 00 12 mov %l2, %o1 40009974: 40 00 0b 12 call 4000c5bc 40009978: 94 10 00 19 mov %i1, %o2 4000997c: 80 a2 20 00 cmp %o0, 0 40009980: 12 80 00 07 bne 4000999c 40009984: 80 a4 c0 11 cmp %l3, %l1 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 40009988: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1 4000998c: 80 a0 60 00 cmp %g1, 0 40009990: 02 80 00 0b be 400099bc 40009994: 03 10 00 3c sethi %hi(0x4000f000), %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++) { 40009998: 80 a4 c0 11 cmp %l3, %l1 4000999c: 18 bf ff ec bgu 4000994c 400099a0: 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 ); 400099a4: 40 00 07 66 call 4000b73c <__errno> 400099a8: b0 10 3f ff mov -1, %i0 400099ac: 82 10 20 02 mov 2, %g1 400099b0: c2 22 00 00 st %g1, [ %o0 ] } 400099b4: 81 c7 e0 08 ret 400099b8: 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; 400099bc: c2 00 62 34 ld [ %g1 + 0x234 ], %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]; 400099c0: e8 26 c0 00 st %l4, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 400099c4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 400099c8: 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; 400099cc: 03 10 00 3c sethi %hi(0x4000f000), %g1 400099d0: 82 10 61 e8 or %g1, 0x1e8, %g1 ! 4000f1e8 400099d4: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 400099d8: 03 10 00 3c sethi %hi(0x4000f000), %g1 400099dc: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 4000f1a0 400099e0: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 400099e4: 81 c7 e0 08 ret 400099e8: 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 ); 400099ec: 40 00 07 54 call 4000b73c <__errno> <== NOT EXECUTED 400099f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400099f4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400099f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400099fc: 81 c7 e0 08 ret <== NOT EXECUTED 40009a00: 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 3c sethi %hi(0x4000f000), %l1 40001ba4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 ! 4000f0b8 40001ba8: 85 28 60 04 sll %g1, 4, %g2 40001bac: 83 28 60 02 sll %g1, 2, %g1 40001bb0: 40 00 1d ba call 40009298 <_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 b8 ld [ %l1 + 0xb8 ], %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 29 3b call 4000c0bc 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 3c sethi %hi(0x4000f000), %g1 40001bdc: 82 10 61 e8 or %g1, 0x1e8, %g1 ! 4000f1e8 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 3c sethi %hi(0x4000f000), %g1 40001bec: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 4000f1a0 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 26 d0 call 4000b73c <__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 35 call 400062b4 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 01 call 40009a04 <== 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 26 bb call 4000b73c <__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 3c sethi %hi(0x4000f000), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40001c78: e6 00 60 b8 ld [ %g1 + 0xb8 ], %l3 ! 4000f0b8 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 29 c4 call 4000c3a4 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 29 f6 call 4000c4e8 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 26 80 call 4000b73c <__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 26 6c call 4000b73c <__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 26 66 call 4000b73c <__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 7d call 40006428 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 1e ed call 40009a04 <== 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 7e call 40006488 <== 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 1e d5 call 40009a04 <== 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 26 12 call 4000b73c <__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 6b call 400064e8 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 aa call 40009a04 <== 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 4000c378 : */ int device_close( rtems_libio_t *iop ) { 4000c378: 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; 4000c37c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000c380: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 4000c384: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000c388: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000c38c: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000c390: 94 07 bf f4 add %fp, -12, %o2 4000c394: 40 00 04 50 call 4000d4d4 4000c398: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000c39c: 80 a2 20 00 cmp %o0, 0 4000c3a0: 12 80 00 04 bne 4000c3b0 4000c3a4: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000c3a8: 81 c7 e0 08 ret 4000c3ac: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000c3b0: 40 00 05 c9 call 4000dad4 <== NOT EXECUTED 4000c3b4: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000c3b8: 81 c7 e0 08 ret <== NOT EXECUTED 4000c3bc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c278 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000c278: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000c27c: 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; 4000c280: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 4000c284: 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; 4000c288: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000c28c: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000c290: 40 00 04 a9 call 4000d534 4000c294: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c298: 80 a2 20 00 cmp %o0, 0 4000c29c: 12 80 00 05 bne 4000c2b0 4000c2a0: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 4000c2a4: f0 07 bf fc ld [ %fp + -4 ], %i0 } 4000c2a8: 81 c7 e0 08 ret 4000c2ac: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000c2b0: 40 00 06 09 call 4000dad4 <== NOT EXECUTED 4000c2b4: 01 00 00 00 nop <== NOT EXECUTED 4000c2b8: 81 c7 e0 08 ret <== NOT EXECUTED 4000c2bc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c3c0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000c3c0: 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; 4000c3c4: 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; 4000c3c8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000c3cc: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 4000c3d0: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 4000c3d4: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 4000c3d8: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000c3dc: 94 07 bf f4 add %fp, -12, %o2 4000c3e0: 40 00 04 6d call 4000d594 4000c3e4: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c3e8: 80 a2 20 00 cmp %o0, 0 4000c3ec: 12 80 00 04 bne 4000c3fc 4000c3f0: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000c3f4: 81 c7 e0 08 ret 4000c3f8: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000c3fc: 40 00 05 b6 call 4000dad4 <== NOT EXECUTED 4000c400: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000c404: 81 c7 e0 08 ret <== NOT EXECUTED 4000c408: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c31c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000c31c: 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; 4000c320: 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; 4000c324: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4000c328: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 4000c32c: 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; 4000c330: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000c334: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 4000c338: 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; 4000c33c: 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; 4000c340: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 4000c344: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000c348: 40 00 04 ab call 4000d5f4 <== NOT EXECUTED 4000c34c: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c350: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c354: 12 80 00 05 bne 4000c368 <== NOT EXECUTED 4000c358: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000c35c: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 4000c360: 81 c7 e0 08 ret <== NOT EXECUTED 4000c364: 81 e8 00 00 restore <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000c368: 40 00 05 db call 4000dad4 <== NOT EXECUTED 4000c36c: 01 00 00 00 nop <== NOT EXECUTED 4000c370: 81 c7 e0 08 ret <== NOT EXECUTED 4000c374: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c2c0 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000c2c0: 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; 4000c2c4: 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; 4000c2c8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 4000c2cc: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 4000c2d0: 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; 4000c2d4: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 4000c2d8: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 4000c2dc: 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; 4000c2e0: 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; 4000c2e4: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 4000c2e8: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000c2ec: 40 00 04 da call 4000d654 4000c2f0: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c2f4: 80 a2 20 00 cmp %o0, 0 4000c2f8: 12 80 00 05 bne 4000c30c 4000c2fc: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000c300: f0 07 bf fc ld [ %fp + -4 ], %i0 } 4000c304: 81 c7 e0 08 ret 4000c308: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000c30c: 40 00 05 f2 call 4000dad4 <== NOT EXECUTED 4000c310: 01 00 00 00 nop <== NOT EXECUTED 4000c314: 81 c7 e0 08 ret <== NOT EXECUTED 4000c318: 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 5d call 400060fc <== 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 6d sethi %hi(0x4001b400), %g2 <== NOT EXECUTED 40003944: c4 00 a3 d4 ld [ %g2 + 0x3d4 ], %g2 ! 4001b7d4 <__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 40029c4c : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40029c4c: 03 10 01 b3 sethi %hi(0x4006cc00), %g1 <== NOT EXECUTED 40029c50: d0 00 63 f4 ld [ %g1 + 0x3f4 ], %o0 ! 4006cff4 <== NOT EXECUTED 40029c54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029c58: 02 80 00 05 be 40029c6c <== NOT EXECUTED 40029c5c: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40029c60: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40029c64: 40 00 67 c6 call 40043b7c <== NOT EXECUTED 40029c68: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40029c6c: 81 c3 e0 08 retl <== NOT EXECUTED 40029c70: 01 00 00 00 nop 40029c74 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40029c74: 03 10 01 b3 sethi %hi(0x4006cc00), %g1 <== NOT EXECUTED 40029c78: d0 00 63 0c ld [ %g1 + 0x30c ], %o0 ! 4006cf0c <== NOT EXECUTED 40029c7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029c80: 02 80 00 05 be 40029c94 <== NOT EXECUTED 40029c84: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 40029c88: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40029c8c: 40 00 67 bc call 40043b7c <== NOT EXECUTED 40029c90: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40029c94: 81 c3 e0 08 retl <== NOT EXECUTED 40029c98: 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 6d sethi %hi(0x4001b400), %l3 <== NOT EXECUTED 400039d0: 29 10 00 6a sethi %hi(0x4001a800), %l4 <== NOT EXECUTED 400039d4: 25 10 00 6a sethi %hi(0x4001a800), %l2 <== NOT EXECUTED 400039d8: a6 14 e3 d4 or %l3, 0x3d4, %l3 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 400039dc: a8 15 21 78 or %l4, 0x178, %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 a1 70 or %l2, 0x170, %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 6a sethi %hi(0x4001a800), %o0 <== NOT EXECUTED 40003a64: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003a68: 90 12 21 78 or %o0, 0x178, %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 6d sethi %hi(0x4001b400), %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 6a sethi %hi(0x4001a800), %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 4003daf8 : #include int fchdir( int fd ) { 4003daf8: 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 ); 4003dafc: 03 10 01 a4 sethi %hi(0x40069000), %g1 <== NOT EXECUTED 4003db00: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40069214 <== NOT EXECUTED 4003db04: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4003db08: 1a 80 00 55 bcc 4003dc5c <== NOT EXECUTED 4003db0c: 03 10 01 b4 sethi %hi(0x4006d000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4003db10: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 ! 4006d1f8 <== NOT EXECUTED 4003db14: 85 2e 20 06 sll %i0, 6, %g2 <== NOT EXECUTED 4003db18: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4003db1c: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 4003db20: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4003db24: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4003db28: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4003db2c: 02 80 00 4c be 4003dc5c <== NOT EXECUTED 4003db30: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003db34: 02 80 00 5d be 4003dca8 <== NOT EXECUTED 4003db38: 01 00 00 00 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4003db3c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 4003db40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003db44: 02 80 00 5f be 4003dcc0 <== NOT EXECUTED 4003db48: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4003db4c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4003db50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003db54: 02 80 00 5b be 4003dcc0 <== NOT EXECUTED 4003db58: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4003db5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003db60: 90 06 20 1c add %i0, 0x1c, %o0 <== NOT EXECUTED 4003db64: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4003db68: 12 80 00 37 bne 4003dc44 <== NOT EXECUTED 4003db6c: 21 10 01 a5 sethi %hi(0x40069400), %l0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003db70: c2 04 21 08 ld [ %l0 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003db74: 11 10 01 82 sethi %hi(0x40060800), %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003db78: 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)) { 4003db7c: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003db80: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4003db84: 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)) { 4003db88: 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; 4003db8c: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4003db90: 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)) { 4003db94: 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; 4003db98: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4003db9c: 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)) { 4003dba0: 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; 4003dba4: c4 27 bf e4 st %g2, [ %fp + -28 ] <== NOT EXECUTED 4003dba8: 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)) { 4003dbac: 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; 4003dbb0: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4003dbb4: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED 4003dbb8: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003dbbc: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED 4003dbc0: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003dbc4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED 4003dbc8: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003dbcc: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 <== NOT EXECUTED 4003dbd0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003dbd4: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003dbd8: 7f ff 25 43 call 400070e4 <== NOT EXECUTED 4003dbdc: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED 4003dbe0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4003dbe4: 12 80 00 24 bne 4003dc74 <== NOT EXECUTED 4003dbe8: 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 ); 4003dbec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003dbf0: 02 80 00 09 be 4003dc14 <== NOT EXECUTED 4003dbf4: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4003dbf8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4003dbfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003dc00: 22 80 00 06 be,a 4003dc18 <== NOT EXECUTED 4003dc04: c2 04 21 08 ld [ %l0 + 0x108 ], %g1 <== NOT EXECUTED 4003dc08: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003dc0c: 90 07 bf d8 add %fp, -40, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4003dc10: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4003dc14: c2 04 21 08 ld [ %l0 + 0x108 ], %g1 <== NOT EXECUTED 4003dc18: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003dc1c: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED 4003dc20: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003dc24: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 4003dc28: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003dc2c: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 4003dc30: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003dc34: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 4003dc38: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return 0; } 4003dc3c: 81 c7 e0 08 ret <== NOT EXECUTED 4003dc40: 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 ); 4003dc44: 40 00 17 76 call 40043a1c <__errno> <== NOT EXECUTED 4003dc48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003dc4c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 4003dc50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003dc54: 81 c7 e0 08 ret <== NOT EXECUTED 4003dc58: 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); 4003dc5c: 40 00 17 70 call 40043a1c <__errno> <== NOT EXECUTED 4003dc60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003dc64: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4003dc68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003dc6c: 81 c7 e0 08 ret <== NOT EXECUTED 4003dc70: 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; 4003dc74: c4 07 bf d8 ld [ %fp + -40 ], %g2 <== NOT EXECUTED 4003dc78: c2 04 21 08 ld [ %l0 + 0x108 ], %g1 <== NOT EXECUTED 4003dc7c: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003dc80: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED 4003dc84: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003dc88: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED 4003dc8c: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003dc90: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 4003dc94: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003dc98: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 4003dc9c: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return -1; 4003dca0: 81 c7 e0 08 ret <== NOT EXECUTED 4003dca4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003dca8: 40 00 17 5d call 40043a1c <__errno> <== NOT EXECUTED 4003dcac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003dcb0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4003dcb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003dcb8: 81 c7 e0 08 ret <== NOT EXECUTED 4003dcbc: 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 ); 4003dcc0: 40 00 17 57 call 40043a1c <__errno> <== NOT EXECUTED 4003dcc4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003dcc8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4003dccc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003dcd0: 81 c7 e0 08 ret <== NOT EXECUTED 4003dcd4: 81 e8 00 00 restore <== NOT EXECUTED 40029794 : int fchmod( int fd, mode_t mode ) { 40029794: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40029798: 03 10 01 a4 sethi %hi(0x40069000), %g1 <== NOT EXECUTED 4002979c: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40069214 <== NOT EXECUTED 400297a0: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 400297a4: 1a 80 00 19 bcc 40029808 <== NOT EXECUTED 400297a8: 03 10 01 b4 sethi %hi(0x4006d000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 400297ac: d0 00 61 f8 ld [ %g1 + 0x1f8 ], %o0 ! 4006d1f8 <== NOT EXECUTED 400297b0: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 400297b4: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 400297b8: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 400297bc: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 400297c0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 400297c4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 400297c8: 02 80 00 10 be 40029808 <== NOT EXECUTED 400297cc: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400297d0: 02 80 00 14 be 40029820 <== NOT EXECUTED 400297d4: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 400297d8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 <== NOT EXECUTED 400297dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400297e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400297e4: 02 80 00 15 be 40029838 <== NOT EXECUTED 400297e8: 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 ); 400297ec: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED 400297f0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400297f4: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 400297f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400297fc: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 40029800: 81 c7 e0 08 ret <== NOT EXECUTED 40029804: 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); 40029808: 40 00 68 85 call 40043a1c <__errno> <== NOT EXECUTED 4002980c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029810: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40029814: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029818: 81 c7 e0 08 ret <== NOT EXECUTED 4002981c: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40029820: 40 00 68 7f call 40043a1c <__errno> <== NOT EXECUTED 40029824: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029828: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002982c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029830: 81 c7 e0 08 ret <== NOT EXECUTED 40029834: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40029838: 40 00 68 79 call 40043a1c <__errno> <== NOT EXECUTED 4002983c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029840: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40029844: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029848: 81 c7 e0 08 ret <== NOT EXECUTED 4002984c: 81 e8 00 00 restore <== NOT EXECUTED 40029850 : int fchown( int fd, uid_t owner, gid_t group ) { 40029850: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40029854: 03 10 01 a4 sethi %hi(0x40069000), %g1 <== NOT EXECUTED 40029858: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40069214 <== NOT EXECUTED 4002985c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40029860: 1a 80 00 19 bcc 400298c4 <== NOT EXECUTED 40029864: 03 10 01 b4 sethi %hi(0x4006d000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40029868: d0 00 61 f8 ld [ %g1 + 0x1f8 ], %o0 ! 4006d1f8 <== NOT EXECUTED 4002986c: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40029870: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 40029874: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 40029878: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002987c: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 40029880: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40029884: 02 80 00 10 be 400298c4 <== NOT EXECUTED 40029888: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002988c: 02 80 00 14 be 400298dc <== NOT EXECUTED 40029890: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 40029894: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 40029898: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002989c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400298a0: 02 80 00 15 be 400298f4 <== NOT EXECUTED 400298a4: 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 ); 400298a8: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 400298ac: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 400298b0: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED 400298b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400298b8: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 400298bc: 81 c7 e0 08 ret <== NOT EXECUTED 400298c0: 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); 400298c4: 40 00 68 56 call 40043a1c <__errno> <== NOT EXECUTED 400298c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400298cc: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400298d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400298d4: 81 c7 e0 08 ret <== NOT EXECUTED 400298d8: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400298dc: 40 00 68 50 call 40043a1c <__errno> <== NOT EXECUTED 400298e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400298e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400298e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400298ec: 81 c7 e0 08 ret <== NOT EXECUTED 400298f0: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400298f4: 40 00 68 4a call 40043a1c <__errno> <== NOT EXECUTED 400298f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400298fc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40029900: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029904: 81 c7 e0 08 ret <== NOT EXECUTED 40029908: 81 e8 00 00 restore <== NOT EXECUTED 4003dd00 : int fcntl( int fd, int cmd, ... ) { 4003dd00: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003dd04: 03 10 01 a4 sethi %hi(0x40069000), %g1 4003dd08: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40069214 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4003dd0c: 84 07 a0 4c add %fp, 0x4c, %g2 4003dd10: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4003dd14: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4003dd18: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4003dd1c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003dd20: 80 a6 00 01 cmp %i0, %g1 4003dd24: 1a 80 00 7a bcc 4003df0c 4003dd28: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 4003dd2c: 21 10 01 b4 sethi %hi(0x4006d000), %l0 4003dd30: c6 04 21 f8 ld [ %l0 + 0x1f8 ], %g3 ! 4006d1f8 4003dd34: 89 2e 20 06 sll %i0, 6, %g4 4003dd38: 93 2e 20 03 sll %i0, 3, %o1 4003dd3c: 92 02 40 04 add %o1, %g4, %o1 4003dd40: 92 00 c0 09 add %g3, %o1, %o1 rtems_libio_check_is_open(iop); 4003dd44: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 4003dd48: 80 8a 21 00 btst 0x100, %o0 4003dd4c: 02 80 00 70 be 4003df0c 4003dd50: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003dd54: 08 80 00 08 bleu 4003dd74 4003dd58: 89 2e 60 02 sll %i1, 2, %g4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 4003dd5c: 40 00 17 30 call 40043a1c <__errno> 4003dd60: b0 10 3f ff mov -1, %i0 4003dd64: 82 10 20 16 mov 0x16, %g1 4003dd68: c2 22 00 00 st %g1, [ %o0 ] 4003dd6c: 81 c7 e0 08 ret 4003dd70: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003dd74: 1b 10 00 f7 sethi %hi(0x4003dc00), %o5 4003dd78: 9a 13 60 d8 or %o5, 0xd8, %o5 ! 4003dcd8 4003dd7c: c8 03 40 04 ld [ %o5 + %g4 ], %g4 4003dd80: 81 c1 00 00 jmp %g4 4003dd84: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4003dd88: 40 00 17 25 call 40043a1c <__errno> 4003dd8c: b0 10 3f ff mov -1, %i0 ! ffffffff 4003dd90: 82 10 20 86 mov 0x86, %g1 4003dd94: c2 22 00 00 st %g1, [ %o0 ] 4003dd98: 81 c7 e0 08 ret 4003dd9c: 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 ) ); 4003dda0: d0 00 80 00 ld [ %g2 ], %o0 4003dda4: 7f ff 26 49 call 400076c8 4003dda8: 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); 4003ddac: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003ddb0: 90 0a 22 01 and %o0, 0x201, %o0 4003ddb4: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 4003ddb8: b0 10 20 00 clr %i0 4003ddbc: 82 08 7d fe and %g1, -514, %g1 4003ddc0: 82 12 00 01 or %o0, %g1, %g1 4003ddc4: 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) { 4003ddc8: c2 02 60 40 ld [ %o1 + 0x40 ], %g1 4003ddcc: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4003ddd0: 80 a0 60 00 cmp %g1, 0 4003ddd4: 02 80 00 52 be 4003df1c 4003ddd8: 01 00 00 00 nop int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4003dddc: 9f c0 40 00 call %g1 4003dde0: 90 10 00 19 mov %i1, %o0 if (err) { 4003dde4: b2 92 20 00 orcc %o0, 0, %i1 4003dde8: 12 80 00 04 bne 4003ddf8 4003ddec: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4003ddf0: 81 c7 e0 08 ret 4003ddf4: 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; 4003ddf8: 40 00 17 09 call 40043a1c <__errno> <== NOT EXECUTED 4003ddfc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003de00: 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; } 4003de04: 81 c7 e0 08 ret <== NOT EXECUTED 4003de08: 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 ); 4003de0c: 7f ff 25 7f call 40007408 4003de10: d2 27 bf f4 st %o1, [ %fp + -12 ] 4003de14: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003de18: 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) { 4003de1c: 80 a6 20 00 cmp %i0, 0 4003de20: 36 bf ff eb bge,a 4003ddcc 4003de24: 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; } 4003de28: 81 c7 e0 08 ret <== NOT EXECUTED 4003de2c: 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 ) ) 4003de30: c2 00 80 00 ld [ %g2 ], %g1 4003de34: 80 a0 60 00 cmp %g1, 0 4003de38: 22 80 00 2c be,a 4003dee8 4003de3c: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 4003de40: 90 12 28 00 or %o0, 0x800, %o0 4003de44: b0 10 20 00 clr %i0 4003de48: 10 bf ff e0 b 4003ddc8 4003de4c: 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); 4003de50: b1 32 20 0b srl %o0, 0xb, %i0 4003de54: 10 bf ff dd b 4003ddc8 4003de58: 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 ); 4003de5c: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 4003de60: 80 a0 a0 00 cmp %g2, 0 4003de64: 02 80 00 30 be 4003df24 4003de68: 80 a0 40 02 cmp %g1, %g2 diop = rtems_libio_iop( fd2 ); 4003de6c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4003de70: 18 80 00 21 bgu 4003def4 <== NOT EXECUTED 4003de74: 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; 4003de78: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 4003de7c: da 02 60 40 ld [ %o1 + 0x40 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003de80: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4003de84: c4 02 60 20 ld [ %o1 + 0x20 ], %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003de88: c8 02 60 3c ld [ %o1 + 0x3c ], %g4 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003de8c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4003de90: c4 02 60 24 ld [ %o1 + 0x24 ], %g2 ret = (int) (diop - rtems_libio_iops); 4003de94: 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; 4003de98: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 4003de9c: c4 02 60 28 ld [ %o1 + 0x28 ], %g2 ret = (int) (diop - rtems_libio_iops); 4003dea0: 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; 4003dea4: c4 20 60 28 st %g2, [ %g1 + 0x28 ] 4003dea8: c4 02 60 2c ld [ %o1 + 0x2c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 4003deac: da 20 60 40 st %o5, [ %g1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003deb0: c4 20 60 2c st %g2, [ %g1 + 0x2c ] ret = (int) (diop - rtems_libio_iops); 4003deb4: 85 28 e0 06 sll %g3, 6, %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003deb8: c8 20 60 3c st %g4, [ %g1 + 0x3c ] diop->flags = iop->flags; 4003debc: d0 20 60 18 st %o0, [ %g1 + 0x18 ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 4003dec0: 83 28 e0 03 sll %g3, 3, %g1 4003dec4: 82 20 80 01 sub %g2, %g1, %g1 4003dec8: 85 28 60 06 sll %g1, 6, %g2 4003decc: 82 00 40 02 add %g1, %g2, %g1 4003ded0: 82 00 40 03 add %g1, %g3, %g1 4003ded4: b1 28 60 0f sll %g1, 0xf, %i0 4003ded8: b0 26 00 01 sub %i0, %g1, %i0 4003dedc: b1 2e 20 03 sll %i0, 3, %i0 4003dee0: 10 bf ff cf b 4003de1c 4003dee4: 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; 4003dee8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4003deec: 10 bf ff b7 b 4003ddc8 <== NOT EXECUTED 4003def0: 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 ); 4003def4: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 4003def8: 85 28 a0 03 sll %g2, 3, %g2 <== NOT EXECUTED 4003defc: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 4003df00: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 4003df04: 10 bf ff dd b 4003de78 <== NOT EXECUTED 4003df08: 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); 4003df0c: 40 00 16 c4 call 40043a1c <__errno> <== NOT EXECUTED 4003df10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003df14: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4003df18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003df1c: 81 c7 e0 08 ret <== NOT EXECUTED 4003df20: 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(); 4003df24: 7f ff 25 a8 call 400075c4 4003df28: d2 27 bf f4 st %o1, [ %fp + -12 ] if ( diop == 0 ) { 4003df2c: b0 10 3f ff mov -1, %i0 4003df30: 82 92 20 00 orcc %o0, 0, %g1 4003df34: 02 bf ff 8e be 4003dd6c 4003df38: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003df3c: c6 04 21 f8 ld [ %l0 + 0x1f8 ], %g3 4003df40: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 4003df44: 10 bf ff cd b 4003de78 4003df48: b0 10 00 01 mov %g1, %i0 4000c9e4 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000c9e4: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000c9e8: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000c9ec: d0 04 21 b0 ld [ %l0 + 0x1b0 ], %o0 ! 4001bdb0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000c9f0: a2 10 00 18 mov %i0, %l1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000c9f4: 92 10 20 00 clr %o1 4000c9f8: 94 10 20 00 clr %o2 4000c9fc: 7f ff e4 13 call 40005a48 4000ca00: b0 10 3f fc mov -4, %i0 4000ca04: 80 a2 20 00 cmp %o0, 0 4000ca08: 12 80 00 f9 bne 4000cdec 4000ca0c: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4000ca10: e4 04 40 00 ld [ %l1 ], %l2 <== NOT EXECUTED if (pipe == NULL) { 4000ca14: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4000ca18: 02 80 00 8e be 4000cc50 <== NOT EXECUTED 4000ca1c: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000ca20: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED 4000ca24: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ca28: 7f ff e4 08 call 40005a48 <== NOT EXECUTED 4000ca2c: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000ca30: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000ca34: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000ca38: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000ca3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000ca40: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000ca44: 02 80 00 67 be 4000cbe0 <== NOT EXECUTED 4000ca48: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000ca4c: 7f ff e4 46 call 40005b64 <== NOT EXECUTED 4000ca50: d0 04 21 b0 ld [ %l0 + 0x1b0 ], %o0 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4000ca54: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000ca58: 12 80 00 e5 bne 4000cdec <== NOT EXECUTED 4000ca5c: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000ca60: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 4000ca64: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000ca68: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000ca6c: 02 80 00 35 be 4000cb40 <== NOT EXECUTED 4000ca70: e0 04 40 00 ld [ %l1 ], %l0 <== NOT EXECUTED 4000ca74: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000ca78: 02 80 00 61 be 4000cbfc <== NOT EXECUTED 4000ca7c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000ca80: 22 80 00 07 be,a 4000ca9c <== NOT EXECUTED 4000ca84: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4000ca88: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000ca8c: 7f ff e4 36 call 40005b64 <== NOT EXECUTED 4000ca90: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 4000ca94: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca98: 81 e8 00 00 restore <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000ca9c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000caa0: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000caa4: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000caa8: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 4000caac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cab0: 02 80 00 b9 be 4000cd94 <== NOT EXECUTED 4000cab4: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4000cab8: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000cabc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cac0: 32 bf ff f3 bne,a 4000ca8c <== NOT EXECUTED 4000cac4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4000cac8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 4000cacc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000cad0: 32 bf ff ef bne,a 4000ca8c <== NOT EXECUTED 4000cad4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4000cad8: 10 80 00 0c b 4000cb08 <== NOT EXECUTED 4000cadc: 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)) 4000cae0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cae4: 7f ff e3 d9 call 40005a48 <== NOT EXECUTED 4000cae8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000caec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000caf0: 12 80 00 0f bne 4000cb2c <== NOT EXECUTED 4000caf4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4000caf8: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 4000cafc: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 4000cb00: 32 bf ff e3 bne,a 4000ca8c <== NOT EXECUTED 4000cb04: 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); 4000cb08: 7f ff e4 17 call 40005b64 <== NOT EXECUTED 4000cb0c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000cb10: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000cb14: 40 00 01 ed call 4000d2c8 <== NOT EXECUTED 4000cb18: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cb1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cb20: 22 bf ff f0 be,a 4000cae0 <== NOT EXECUTED 4000cb24: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4000cb28: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4000cb2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000cb30: 7f ff ff 5b call 4000c89c <== NOT EXECUTED 4000cb34: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 4000cb38: 81 c7 e0 08 ret <== NOT EXECUTED 4000cb3c: 81 e8 00 00 restore <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4000cb40: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000cb44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cb48: 32 80 00 06 bne,a 4000cb60 <== NOT EXECUTED 4000cb4c: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 4000cb50: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000cb54: 12 bf ff f6 bne 4000cb2c <== NOT EXECUTED 4000cb58: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000cb5c: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000cb60: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000cb64: 88 00 a0 01 add %g2, 1, %g4 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000cb68: 86 00 e0 01 inc %g3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000cb6c: c8 24 20 14 st %g4, [ %l0 + 0x14 ] <== NOT EXECUTED 4000cb70: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000cb74: 02 80 00 8d be 4000cda8 <== NOT EXECUTED 4000cb78: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 4000cb7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cb80: 32 bf ff c3 bne,a 4000ca8c <== NOT EXECUTED 4000cb84: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED prevCounter = pipe->readerCounter; 4000cb88: 10 80 00 0c b 4000cbb8 <== NOT EXECUTED 4000cb8c: 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)) 4000cb90: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cb94: 7f ff e3 ad call 40005a48 <== NOT EXECUTED 4000cb98: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000cb9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cba0: 12 bf ff e3 bne 4000cb2c <== NOT EXECUTED 4000cba4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4000cba8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 4000cbac: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 4000cbb0: 32 bf ff b7 bne,a 4000ca8c <== NOT EXECUTED 4000cbb4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4000cbb8: 7f ff e3 eb call 40005b64 <== NOT EXECUTED 4000cbbc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000cbc0: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000cbc4: 40 00 01 c1 call 4000d2c8 <== NOT EXECUTED 4000cbc8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cbcc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cbd0: 22 bf ff f0 be,a 4000cb90 <== NOT EXECUTED 4000cbd4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4000cbd8: 10 bf ff d5 b 4000cb2c <== NOT EXECUTED 4000cbdc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4000cbe0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000cbe4: 12 80 00 76 bne 4000cdbc <== NOT EXECUTED 4000cbe8: d0 04 21 b0 ld [ %l0 + 0x1b0 ], %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000cbec: 7f ff e3 de call 40005b64 <== NOT EXECUTED 4000cbf0: e4 24 40 00 st %l2, [ %l1 ] <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000cbf4: 10 bf ff 9c b 4000ca64 <== NOT EXECUTED 4000cbf8: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000cbfc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000cc00: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000cc04: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000cc08: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000cc0c: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 4000cc10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cc14: 02 80 00 5b be 4000cd80 <== NOT EXECUTED 4000cc18: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000cc1c: 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 ++; 4000cc20: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000cc24: 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 ++; 4000cc28: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000cc2c: c6 24 20 14 st %g3, [ %l0 + 0x14 ] <== NOT EXECUTED 4000cc30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cc34: 12 bf ff 95 bne 4000ca88 <== NOT EXECUTED 4000cc38: c4 24 20 24 st %g2, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000cc3c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000cc40: 40 00 01 8b call 4000d26c <== NOT EXECUTED 4000cc44: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4000cc48: 10 bf ff 91 b 4000ca8c <== NOT EXECUTED 4000cc4c: 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)); 4000cc50: 7f ff f8 ea call 4000aff8 <== NOT EXECUTED 4000cc54: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 4000cc58: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 4000cc5c: 02 bf ff 7c be 4000ca4c <== NOT EXECUTED 4000cc60: a4 10 00 13 mov %l3, %l2 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4000cc64: 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)); 4000cc68: c0 24 c0 00 clr [ %l3 ] <== NOT EXECUTED 4000cc6c: c0 24 e0 08 clr [ %l3 + 8 ] <== NOT EXECUTED 4000cc70: c0 24 e0 0c clr [ %l3 + 0xc ] <== NOT EXECUTED 4000cc74: c0 24 e0 10 clr [ %l3 + 0x10 ] <== NOT EXECUTED 4000cc78: c0 24 e0 14 clr [ %l3 + 0x14 ] <== NOT EXECUTED 4000cc7c: c0 24 e0 18 clr [ %l3 + 0x18 ] <== NOT EXECUTED 4000cc80: c0 24 e0 1c clr [ %l3 + 0x1c ] <== NOT EXECUTED 4000cc84: c0 24 e0 20 clr [ %l3 + 0x20 ] <== NOT EXECUTED 4000cc88: c0 24 e0 24 clr [ %l3 + 0x24 ] <== NOT EXECUTED 4000cc8c: c0 24 e0 28 clr [ %l3 + 0x28 ] <== NOT EXECUTED 4000cc90: c0 24 e0 2c clr [ %l3 + 0x2c ] <== NOT EXECUTED 4000cc94: c0 24 e0 30 clr [ %l3 + 0x30 ] <== NOT EXECUTED pipe->Size = PIPE_BUF; 4000cc98: c2 24 e0 04 st %g1, [ %l3 + 4 ] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4000cc9c: 7f ff f8 d7 call 4000aff8 <== NOT EXECUTED 4000cca0: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED if (! pipe->Buffer) 4000cca4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cca8: 02 80 00 33 be 4000cd74 <== NOT EXECUTED 4000ccac: d0 24 c0 00 st %o0, [ %l3 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4000ccb0: 29 10 00 6d sethi %hi(0x4001b400), %l4 <== NOT EXECUTED 4000ccb4: d0 4d 23 c0 ldsb [ %l4 + 0x3c0 ], %o0 ! 4001b7c0 <== NOT EXECUTED 4000ccb8: 2b 14 12 5c sethi %hi(0x50497000), %l5 <== NOT EXECUTED 4000ccbc: 82 15 62 00 or %l5, 0x200, %g1 ! 50497200 <== NOT EXECUTED 4000ccc0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ccc4: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000ccc8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000cccc: 40 00 01 16 call 4000d124 <== NOT EXECUTED 4000ccd0: 96 04 e0 2c add %l3, 0x2c, %o3 <== NOT EXECUTED 4000ccd4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ccd8: 32 80 00 25 bne,a 4000cd6c <== NOT EXECUTED 4000ccdc: 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( 4000cce0: d0 4d 23 c0 ldsb [ %l4 + 0x3c0 ], %o0 <== NOT EXECUTED 4000cce4: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 4000cce8: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 4000ccec: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ccf0: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000ccf4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000ccf8: 40 00 01 0b call 4000d124 <== NOT EXECUTED 4000ccfc: 96 04 e0 30 add %l3, 0x30, %o3 <== NOT EXECUTED 4000cd00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cd04: 12 80 00 17 bne 4000cd60 <== NOT EXECUTED 4000cd08: 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( 4000cd0c: d0 4d 23 c0 ldsb [ %l4 + 0x3c0 ], %o0 <== NOT EXECUTED 4000cd10: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000cd14: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED 4000cd18: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000cd1c: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000cd20: 7f ff e2 a9 call 400057c4 <== NOT EXECUTED 4000cd24: 98 04 e0 28 add %l3, 0x28, %o4 <== NOT EXECUTED 4000cd28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cd2c: 12 80 00 0b bne 4000cd58 <== NOT EXECUTED 4000cd30: c2 0d 23 c0 ldub [ %l4 + 0x3c0 ], %g1 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4000cd34: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4000cd38: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4000cd3c: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000cd40: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 4000cd44: 12 bf ff 37 bne 4000ca20 <== NOT EXECUTED 4000cd48: c4 2d 23 c0 stb %g2, [ %l4 + 0x3c0 ] <== NOT EXECUTED c = 'a'; 4000cd4c: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 4000cd50: 10 bf ff 34 b 4000ca20 <== NOT EXECUTED 4000cd54: c2 2d 23 c0 stb %g1, [ %l4 + 0x3c0 ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4000cd58: 40 00 01 2b call 4000d204 <== NOT EXECUTED 4000cd5c: d0 04 e0 30 ld [ %l3 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4000cd60: 40 00 01 29 call 4000d204 <== NOT EXECUTED 4000cd64: d0 04 e0 2c ld [ %l3 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4000cd68: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED 4000cd6c: 7f ff f7 2b call 4000aa18 <== NOT EXECUTED 4000cd70: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 4000cd74: 7f ff f7 29 call 4000aa18 <== NOT EXECUTED 4000cd78: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4000cd7c: 30 bf ff 34 b,a 4000ca4c <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4000cd80: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000cd84: 40 00 01 3a call 4000d26c <== NOT EXECUTED 4000cd88: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000cd8c: 10 bf ff a5 b 4000cc20 <== NOT EXECUTED 4000cd90: 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); 4000cd94: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000cd98: 40 00 01 35 call 4000d26c <== NOT EXECUTED 4000cd9c: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 4000cda0: 10 bf ff 47 b 4000cabc <== NOT EXECUTED 4000cda4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4000cda8: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000cdac: 40 00 01 30 call 4000d26c <== NOT EXECUTED 4000cdb0: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 4000cdb4: 10 bf ff 72 b 4000cb7c <== NOT EXECUTED 4000cdb8: 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); 4000cdbc: 40 00 01 12 call 4000d204 <== NOT EXECUTED 4000cdc0: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000cdc4: 40 00 01 10 call 4000d204 <== NOT EXECUTED 4000cdc8: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000cdcc: 7f ff e2 f2 call 40005994 <== NOT EXECUTED 4000cdd0: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000cdd4: 7f ff f7 11 call 4000aa18 <== NOT EXECUTED 4000cdd8: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED free(pipe); 4000cddc: 7f ff f7 0f call 4000aa18 <== NOT EXECUTED 4000cde0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000cde4: 7f ff e3 60 call 40005b64 <== NOT EXECUTED 4000cde8: d0 04 21 b0 ld [ %l0 + 0x1b0 ], %o0 <== NOT EXECUTED 4000cdec: 81 c7 e0 08 ret 4000cdf0: 81 e8 00 00 restore 4000ae94 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000ae94: 05 10 01 b4 sethi %hi(0x4006d000), %g2 <== NOT EXECUTED 4000ae98: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4006d240 <== NOT EXECUTED 4000ae9c: 84 10 a2 40 or %g2, 0x240, %g2 <== NOT EXECUTED 4000aea0: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED 4000aea4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000aea8: 02 80 00 10 be 4000aee8 <== NOT EXECUTED 4000aeac: 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 ) { 4000aeb0: c8 02 60 10 ld [ %o1 + 0x10 ], %g4 <== NOT EXECUTED 4000aeb4: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED 4000aeb8: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 4000aebc: 32 80 00 08 bne,a 4000aedc <== NOT EXECUTED 4000aec0: 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; 4000aec4: 81 c3 e0 08 retl <== NOT EXECUTED 4000aec8: 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 ) { 4000aecc: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 4000aed0: 02 80 00 08 be 4000aef0 <== NOT EXECUTED 4000aed4: 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 ) { 4000aed8: 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; 4000aedc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000aee0: 32 bf ff fb bne,a 4000aecc <== NOT EXECUTED 4000aee4: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED return true; } } return false; } 4000aee8: 81 c3 e0 08 retl <== NOT EXECUTED 4000aeec: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000aef0: 81 c3 e0 08 retl <== NOT EXECUTED 4000aef4: 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 7e sethi %hi(0x4001f800), %g1 4000371c: c2 00 60 f4 ld [ %g1 + 0xf4 ], %g1 ! 4001f8f4 40003720: 80 a6 00 01 cmp %i0, %g1 40003724: 1a 80 00 3f bcc 40003820 40003728: 03 10 00 80 sethi %hi(0x40020000), %g1 iop = rtems_libio_iop(fd); 4000372c: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 400200c0 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 35 5e call 40010cd8 <__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 35 2e call 40010cd8 <__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 35 28 call 40010cd8 <__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 4000aa18 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000aa18: 9d e3 bf a0 save %sp, -96, %sp 4000aa1c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000aa20: 82 10 62 38 or %g1, 0x238, %g1 ! 4001be38 4000aa24: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4000aa28: b2 10 00 18 mov %i0, %i1 4000aa2c: 84 00 a0 01 inc %g2 if ( !ptr ) 4000aa30: 80 a6 20 00 cmp %i0, 0 4000aa34: 02 80 00 15 be 4000aa88 4000aa38: 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()) && 4000aa3c: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000aa40: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 4001c1a0 <_System_state_Current> 4000aa44: 80 a0 60 03 cmp %g1, 3 4000aa48: 02 80 00 17 be 4000aaa4 4000aa4c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000aa50: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 ! 4001bc98 4000aa54: 80 a0 60 00 cmp %g1, 0 4000aa58: 02 80 00 06 be 4000aa70 4000aa5c: 21 10 00 6d sethi %hi(0x4001b400), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000aa60: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000aa64: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000aa68: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4000aa6c: 21 10 00 6d sethi %hi(0x4001b400), %l0 <== NOT EXECUTED 4000aa70: d0 04 22 70 ld [ %l0 + 0x270 ], %o0 ! 4001b670 4000aa74: 40 00 04 bb call 4000bd60 <_Protected_heap_Free> 4000aa78: 92 10 00 19 mov %i1, %o1 4000aa7c: 80 8a 20 ff btst 0xff, %o0 4000aa80: 02 80 00 04 be 4000aa90 4000aa84: c2 04 22 70 ld [ %l0 + 0x270 ], %g1 4000aa88: 81 c7 e0 08 ret 4000aa8c: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000aa90: 31 10 00 6b sethi %hi(0x4001ac00), %i0 <== NOT EXECUTED 4000aa94: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000aa98: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000aa9c: 7f ff e1 47 call 40002fb8 <== NOT EXECUTED 4000aaa0: 91 ee 20 c8 restore %i0, 0xc8, %o0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000aaa4: 40 00 01 2f call 4000af60 4000aaa8: 01 00 00 00 nop 4000aaac: 80 8a 20 ff btst 0xff, %o0 4000aab0: 12 bf ff e8 bne 4000aa50 4000aab4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000aab8: 40 00 01 3c call 4000afa8 <== NOT EXECUTED 4000aabc: 81 e8 00 00 restore <== NOT EXECUTED 4000aac0: 01 00 00 00 nop 4002af20 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 4002af20: 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 4002af24: 03 10 01 b4 sethi %hi(0x4006d000), %g1 <== NOT EXECUTED 4002af28: 82 10 62 58 or %g1, 0x258, %g1 ! 4006d258 <== NOT EXECUTED 4002af2c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002af30: 02 80 00 18 be 4002af90 <== NOT EXECUTED 4002af34: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 4002af38: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 4002af3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002af40: 22 80 00 09 be,a 4002af64 <== NOT EXECUTED 4002af44: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002af48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002af4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002af50: 22 80 00 05 be,a 4002af64 <== NOT EXECUTED 4002af54: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002af58: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002af5c: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 4002af60: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002af64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002af68: 02 80 00 08 be 4002af88 <== NOT EXECUTED 4002af6c: 01 00 00 00 nop <== NOT EXECUTED 4002af70: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002af74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002af78: 02 80 00 04 be 4002af88 <== NOT EXECUTED 4002af7c: 01 00 00 00 nop <== NOT EXECUTED 4002af80: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002af84: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 4002af88: 7f ff 70 92 call 400071d0 <== NOT EXECUTED 4002af8c: 81 e8 00 00 restore <== NOT EXECUTED 4002af90: 81 c7 e0 08 ret <== NOT EXECUTED 4002af94: 81 e8 00 00 restore <== NOT EXECUTED 40019894 : int fstat( int fd, struct stat *sbuf ) { 40019894: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40019898: 80 a6 60 00 cmp %i1, 0 4001989c: 02 80 00 3b be 40019988 400198a0: 03 10 00 6d sethi %hi(0x4001b400), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 400198a4: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 4001b664 400198a8: 80 a6 00 01 cmp %i0, %g1 400198ac: 1a 80 00 2b bcc 40019958 400198b0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400198b4: d0 00 62 28 ld [ %g1 + 0x228 ], %o0 ! 4001be28 400198b8: 83 2e 20 06 sll %i0, 6, %g1 400198bc: b1 2e 20 03 sll %i0, 3, %i0 400198c0: b0 06 00 01 add %i0, %g1, %i0 400198c4: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 400198c8: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400198cc: 80 88 61 00 btst 0x100, %g1 400198d0: 02 80 00 22 be 40019958 400198d4: 01 00 00 00 nop if ( !iop->handlers ) 400198d8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 400198dc: 80 a0 60 00 cmp %g1, 0 400198e0: 02 80 00 1e be 40019958 400198e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 400198e8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 400198ec: 80 a0 60 00 cmp %g1, 0 400198f0: 02 80 00 20 be 40019970 400198f4: 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) ); 400198f8: c0 26 40 00 clr [ %i1 ] 400198fc: c0 26 60 04 clr [ %i1 + 4 ] 40019900: c0 26 60 08 clr [ %i1 + 8 ] 40019904: c0 26 60 0c clr [ %i1 + 0xc ] 40019908: c0 26 60 10 clr [ %i1 + 0x10 ] 4001990c: c0 26 60 14 clr [ %i1 + 0x14 ] 40019910: c0 26 60 18 clr [ %i1 + 0x18 ] 40019914: c0 26 60 1c clr [ %i1 + 0x1c ] 40019918: c0 26 60 20 clr [ %i1 + 0x20 ] 4001991c: c0 26 60 24 clr [ %i1 + 0x24 ] 40019920: c0 26 60 28 clr [ %i1 + 0x28 ] 40019924: c0 26 60 2c clr [ %i1 + 0x2c ] 40019928: c0 26 60 30 clr [ %i1 + 0x30 ] 4001992c: c0 26 60 34 clr [ %i1 + 0x34 ] 40019930: c0 26 60 38 clr [ %i1 + 0x38 ] 40019934: c0 26 60 3c clr [ %i1 + 0x3c ] 40019938: c0 26 60 40 clr [ %i1 + 0x40 ] 4001993c: c0 26 60 44 clr [ %i1 + 0x44 ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 40019940: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 40019944: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40019948: 9f c0 40 00 call %g1 4001994c: 90 02 20 1c add %o0, 0x1c, %o0 } 40019950: 81 c7 e0 08 ret 40019954: 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 ); 40019958: 7f ff d1 71 call 4000df1c <__errno> 4001995c: b0 10 3f ff mov -1, %i0 40019960: 82 10 20 09 mov 9, %g1 40019964: c2 22 00 00 st %g1, [ %o0 ] 40019968: 81 c7 e0 08 ret 4001996c: 81 e8 00 00 restore if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019970: 7f ff d1 6b call 4000df1c <__errno> <== NOT EXECUTED 40019974: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019978: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001997c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019980: 81 c7 e0 08 ret <== NOT EXECUTED 40019984: 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 ); 40019988: 7f ff d1 65 call 4000df1c <__errno> 4001998c: b0 10 3f ff mov -1, %i0 40019990: 82 10 20 0e mov 0xe, %g1 40019994: c2 22 00 00 st %g1, [ %o0 ] 40019998: 81 c7 e0 08 ret 4001999c: 81 e8 00 00 restore 40029a30 : #include int fsync( int fd ) { 40029a30: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40029a34: 03 10 01 a4 sethi %hi(0x40069000), %g1 40029a38: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40069214 40029a3c: 80 a6 00 01 cmp %i0, %g1 40029a40: 1a 80 00 19 bcc 40029aa4 40029a44: 03 10 01 b4 sethi %hi(0x4006d000), %g1 iop = rtems_libio_iop( fd ); 40029a48: d0 00 61 f8 ld [ %g1 + 0x1f8 ], %o0 ! 4006d1f8 40029a4c: 83 2e 20 06 sll %i0, 6, %g1 40029a50: b1 2e 20 03 sll %i0, 3, %i0 40029a54: b0 06 00 01 add %i0, %g1, %i0 40029a58: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 40029a5c: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 40029a60: 80 88 61 00 btst 0x100, %g1 40029a64: 02 80 00 10 be 40029aa4 40029a68: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40029a6c: 02 80 00 14 be 40029abc 40029a70: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 40029a74: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 40029a78: 80 a0 60 00 cmp %g1, 0 40029a7c: 02 80 00 0a be 40029aa4 40029a80: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 40029a84: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40029a88: 80 a0 60 00 cmp %g1, 0 40029a8c: 02 80 00 12 be 40029ad4 40029a90: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 40029a94: 9f c0 40 00 call %g1 40029a98: 01 00 00 00 nop } 40029a9c: 81 c7 e0 08 ret 40029aa0: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40029aa4: 40 00 67 de call 40043a1c <__errno> <== NOT EXECUTED 40029aa8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40029aac: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40029ab0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40029ab4: 81 c7 e0 08 ret <== NOT EXECUTED 40029ab8: 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 ); 40029abc: 40 00 67 d8 call 40043a1c <__errno> 40029ac0: b0 10 3f ff mov -1, %i0 40029ac4: 82 10 20 16 mov 0x16, %g1 40029ac8: c2 22 00 00 st %g1, [ %o0 ] 40029acc: 81 c7 e0 08 ret 40029ad0: 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 ); 40029ad4: 40 00 67 d2 call 40043a1c <__errno> 40029ad8: b0 10 3f ff mov -1, %i0 40029adc: 82 10 20 86 mov 0x86, %g1 40029ae0: c2 22 00 00 st %g1, [ %o0 ] 40029ae4: 81 c7 e0 08 ret 40029ae8: 81 e8 00 00 restore 4000aac4 : int ftruncate( int fd, off_t length ) { 4000aac4: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000aac8: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000aacc: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 4001b664 4000aad0: 80 a6 00 01 cmp %i0, %g1 4000aad4: 1a 80 00 2b bcc 4000ab80 4000aad8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 iop = rtems_libio_iop( fd ); 4000aadc: c2 00 62 28 ld [ %g1 + 0x228 ], %g1 ! 4001be28 4000aae0: 85 2e 20 06 sll %i0, 6, %g2 4000aae4: b1 2e 20 03 sll %i0, 3, %i0 4000aae8: b0 06 00 02 add %i0, %g2, %i0 4000aaec: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 4000aaf0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000aaf4: 80 88 61 00 btst 0x100, %g1 4000aaf8: 02 80 00 22 be 4000ab80 4000aafc: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000ab00: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000ab04: c2 27 bf ec st %g1, [ %fp + -20 ] 4000ab08: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000ab0c: c2 27 bf f0 st %g1, [ %fp + -16 ] 4000ab10: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000ab14: c2 27 bf f4 st %g1, [ %fp + -12 ] 4000ab18: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 4000ab1c: c2 27 bf f8 st %g1, [ %fp + -8 ] 4000ab20: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 4000ab24: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000ab28: 80 a0 60 00 cmp %g1, 0 4000ab2c: 02 80 00 21 be 4000abb0 4000ab30: 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 ) 4000ab34: 9f c0 40 00 call %g1 4000ab38: 90 07 bf ec add %fp, -20, %o0 4000ab3c: 80 a2 20 01 cmp %o0, 1 4000ab40: 02 80 00 22 be 4000abc8 4000ab44: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000ab48: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000ab4c: 80 88 60 04 btst 4, %g1 4000ab50: 02 80 00 12 be 4000ab98 4000ab54: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 4000ab58: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000ab5c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000ab60: 80 a0 60 00 cmp %g1, 0 4000ab64: 02 80 00 13 be 4000abb0 4000ab68: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4000ab6c: 92 10 00 19 mov %i1, %o1 4000ab70: 9f c0 40 00 call %g1 4000ab74: 94 10 00 1a mov %i2, %o2 } 4000ab78: 81 c7 e0 08 ret 4000ab7c: 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); 4000ab80: 40 00 0c e7 call 4000df1c <__errno> <== NOT EXECUTED 4000ab84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ab88: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4000ab8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ab90: 81 c7 e0 08 ret <== NOT EXECUTED 4000ab94: 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 ); 4000ab98: 40 00 0c e1 call 4000df1c <__errno> <== NOT EXECUTED 4000ab9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000aba0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000aba4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000aba8: 81 c7 e0 08 ret <== NOT EXECUTED 4000abac: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000abb0: 40 00 0c db call 4000df1c <__errno> <== NOT EXECUTED 4000abb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000abb8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000abbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000abc0: 81 c7 e0 08 ret <== NOT EXECUTED 4000abc4: 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 ); 4000abc8: 40 00 0c d5 call 4000df1c <__errno> 4000abcc: b0 10 3f ff mov -1, %i0 4000abd0: 82 10 20 15 mov 0x15, %g1 4000abd4: c2 22 00 00 st %g1, [ %o0 ] 4000abd8: 81 c7 e0 08 ret 4000abdc: 81 e8 00 00 restore 4005dd34 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4005dd34: 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 ); 4005dd38: 03 10 01 a4 sethi %hi(0x40069000), %g1 4005dd3c: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40069214 4005dd40: 80 a6 00 01 cmp %i0, %g1 4005dd44: 1a 80 00 08 bcc 4005dd64 4005dd48: a0 10 20 00 clr %l0 4005dd4c: 03 10 01 b4 sethi %hi(0x4006d000), %g1 4005dd50: e0 00 61 f8 ld [ %g1 + 0x1f8 ], %l0 ! 4006d1f8 4005dd54: 83 2e 20 06 sll %i0, 6, %g1 4005dd58: b1 2e 20 03 sll %i0, 3, %i0 4005dd5c: b0 06 00 01 add %i0, %g1, %i0 4005dd60: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4005dd64: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4005dd68: c2 27 bf ec st %g1, [ %fp + -20 ] 4005dd6c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 4005dd70: c2 27 bf f0 st %g1, [ %fp + -16 ] 4005dd74: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 4005dd78: c2 27 bf f4 st %g1, [ %fp + -12 ] 4005dd7c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 4005dd80: c2 27 bf f8 st %g1, [ %fp + -8 ] 4005dd84: c4 04 20 2c ld [ %l0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 4005dd88: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4005dd8c: 80 a0 60 00 cmp %g1, 0 4005dd90: 02 80 00 17 be 4005ddec 4005dd94: 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 ) 4005dd98: 9f c0 40 00 call %g1 4005dd9c: 90 07 bf ec add %fp, -20, %o0 4005dda0: 80 a2 20 01 cmp %o0, 1 4005dda4: 12 80 00 0c bne 4005ddd4 4005dda8: 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 ) 4005ddac: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4005ddb0: c2 00 60 08 ld [ %g1 + 8 ], %g1 4005ddb4: 80 a0 60 00 cmp %g1, 0 4005ddb8: 02 80 00 0d be 4005ddec 4005ddbc: 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 ); 4005ddc0: 92 10 00 19 mov %i1, %o1 4005ddc4: 9f c0 40 00 call %g1 4005ddc8: 94 10 00 1a mov %i2, %o2 } 4005ddcc: 81 c7 e0 08 ret 4005ddd0: 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 ); 4005ddd4: 7f ff 97 12 call 40043a1c <__errno> 4005ddd8: b0 10 3f ff mov -1, %i0 4005dddc: 82 10 20 14 mov 0x14, %g1 4005dde0: c2 22 00 00 st %g1, [ %o0 ] 4005dde4: 81 c7 e0 08 ret 4005dde8: 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 ); 4005ddec: 7f ff 97 0c call 40043a1c <__errno> <== NOT EXECUTED 4005ddf0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005ddf4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4005ddf8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005ddfc: 81 c7 e0 08 ret <== NOT EXECUTED 4005de00: 81 e8 00 00 restore <== NOT EXECUTED 40029c28 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40029c28: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 40029c2c: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED return _POSIX_types_Gid; } 40029c30: 81 c3 e0 08 retl <== NOT EXECUTED 40029c34: d0 10 60 32 lduh [ %g1 + 0x32 ], %o0 <== NOT EXECUTED 4002a314 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002a314: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4002a318: 7f ff ff b3 call 4002a1e4 4002a31c: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 4002a320: 11 10 01 7b sethi %hi(0x4005ec00), %o0 4002a324: 13 10 01 a3 sethi %hi(0x40068c00), %o1 4002a328: 90 12 21 08 or %o0, 0x108, %o0 4002a32c: 40 00 68 63 call 400444b8 4002a330: 92 12 60 f0 or %o1, 0xf0, %o1 4002a334: a0 92 20 00 orcc %o0, 0, %l0 4002a338: 12 80 00 0b bne 4002a364 4002a33c: 92 10 00 1a mov %i2, %o1 4002a340: 30 80 00 27 b,a 4002a3dc <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 4002a344: 40 00 7e e0 call 40049ec4 4002a348: 92 10 00 18 mov %i0, %o1 4002a34c: 80 a0 00 08 cmp %g0, %o0 4002a350: 82 60 3f ff subx %g0, -1, %g1 } else { match = (grp->gr_gid == gid); } if (match) { 4002a354: 80 a0 60 00 cmp %g1, 0 4002a358: 12 80 00 14 bne 4002a3a8 4002a35c: 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)) { 4002a360: 92 10 00 1a mov %i2, %o1 4002a364: 94 10 00 1b mov %i3, %o2 4002a368: 96 10 00 1c mov %i4, %o3 4002a36c: 7f ff fe d1 call 40029eb0 4002a370: 90 10 00 10 mov %l0, %o0 4002a374: 80 a2 20 00 cmp %o0, 0 4002a378: 02 80 00 11 be 4002a3bc 4002a37c: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 4002a380: 32 bf ff f1 bne,a 4002a344 4002a384: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 4002a388: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002a38c: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4002a390: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002a394: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002a398: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a39c: 02 bf ff f2 be 4002a364 <== NOT EXECUTED 4002a3a0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4002a3a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002a3a8: 40 00 65 f5 call 40043b7c 4002a3ac: b0 10 20 00 clr %i0 *result = grp; 4002a3b0: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002a3b4: 81 c7 e0 08 ret 4002a3b8: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 4002a3bc: 40 00 65 98 call 40043a1c <__errno> <== NOT EXECUTED 4002a3c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a3c4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a3c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4002a3cc: 40 00 65 ec call 40043b7c <== NOT EXECUTED 4002a3d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4002a3d4: 81 c7 e0 08 ret <== NOT EXECUTED 4002a3d8: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 4002a3dc: 40 00 65 90 call 40043a1c <__errno> <== NOT EXECUTED 4002a3e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a3e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a3e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4002a3ec: 81 c7 e0 08 ret <== NOT EXECUTED 4002a3f0: 81 e8 00 00 restore <== NOT EXECUTED 4002a030 : return NULL; return p; } struct group *getgrent(void) { 4002a030: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 4002a034: 03 10 01 b3 sethi %hi(0x4006cc00), %g1 <== NOT EXECUTED 4002a038: d0 00 63 f4 ld [ %g1 + 0x3f4 ], %o0 ! 4006cff4 <== NOT EXECUTED 4002a03c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a040: 32 80 00 04 bne,a 4002a050 <== NOT EXECUTED 4002a044: 31 10 01 b4 sethi %hi(0x4006d000), %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } 4002a048: 81 c7 e0 08 ret <== NOT EXECUTED 4002a04c: 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)) 4002a050: 15 10 01 b3 sethi %hi(0x4006cc00), %o2 <== NOT EXECUTED 4002a054: 92 16 20 c0 or %i0, 0xc0, %o1 <== NOT EXECUTED 4002a058: 94 12 a3 f8 or %o2, 0x3f8, %o2 <== NOT EXECUTED 4002a05c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002a060: 7f ff ff 94 call 40029eb0 <== NOT EXECUTED 4002a064: b0 16 20 c0 or %i0, 0xc0, %i0 <== NOT EXECUTED 4002a068: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a06c: 02 bf ff f7 be 4002a048 <== NOT EXECUTED 4002a070: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 4002a074: 81 c7 e0 08 ret <== NOT EXECUTED 4002a078: 81 e8 00 00 restore <== NOT EXECUTED 4002a428 : } struct group *getgrgid( gid_t gid ) { 4002a428: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4002a42c: 13 10 01 b4 sethi %hi(0x4006d000), %o1 <== NOT EXECUTED 4002a430: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002a434: 92 12 60 c0 or %o1, 0xc0, %o1 <== NOT EXECUTED 4002a438: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4002a43c: 15 10 01 b3 sethi %hi(0x4006cc00), %o2 <== NOT EXECUTED 4002a440: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002a444: 94 12 a3 f8 or %o2, 0x3f8, %o2 <== NOT EXECUTED 4002a448: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 4002a44c: 7f ff ff ea call 4002a3f4 <== NOT EXECUTED 4002a450: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002a454: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a458: 22 80 00 02 be,a 4002a460 <== NOT EXECUTED 4002a45c: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002a460: 81 c7 e0 08 ret <== NOT EXECUTED 4002a464: 81 e8 00 00 restore <== NOT EXECUTED 4002a3f4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002a3f4: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4002a3f8: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002a3fc: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002a400: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002a404: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002a408: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002a40c: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4002a410: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 4002a414: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002a418: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002a41c: 7f ff ff be call 4002a314 <== NOT EXECUTED 4002a420: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002a424: 01 00 00 00 nop 40024324 : */ pid_t getpid( void ) { return _Objects_Local_node; } 40024324: 81 c3 e0 08 retl <== NOT EXECUTED 40024328: 90 10 20 01 mov 1, %o0 ! 1 <== NOT EXECUTED 4002a514 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002a514: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4002a518: 7f ff ff 33 call 4002a1e4 4002a51c: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 4002a520: 11 10 01 7b sethi %hi(0x4005ec00), %o0 4002a524: 13 10 01 a3 sethi %hi(0x40068c00), %o1 4002a528: 90 12 20 50 or %o0, 0x50, %o0 4002a52c: 40 00 67 e3 call 400444b8 4002a530: 92 12 60 f0 or %o1, 0xf0, %o1 4002a534: a0 92 20 00 orcc %o0, 0, %l0 4002a538: 12 80 00 0b bne 4002a564 4002a53c: 92 10 00 1a mov %i2, %o1 4002a540: 30 80 00 27 b,a 4002a5dc <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 4002a544: 40 00 7e 60 call 40049ec4 4002a548: 92 10 00 18 mov %i0, %o1 4002a54c: 80 a0 00 08 cmp %g0, %o0 4002a550: 82 60 3f ff subx %g0, -1, %g1 } else { match = (pwd->pw_uid == uid); } if (match) { 4002a554: 80 a0 60 00 cmp %g1, 0 4002a558: 12 80 00 14 bne 4002a5a8 4002a55c: 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)) { 4002a560: 92 10 00 1a mov %i2, %o1 4002a564: 94 10 00 1b mov %i3, %o2 4002a568: 96 10 00 1c mov %i4, %o3 4002a56c: 7f ff fe c4 call 4002a07c 4002a570: 90 10 00 10 mov %l0, %o0 4002a574: 80 a2 20 00 cmp %o0, 0 4002a578: 02 80 00 11 be 4002a5bc 4002a57c: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 4002a580: 32 bf ff f1 bne,a 4002a544 4002a584: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 4002a588: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002a58c: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4002a590: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002a594: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002a598: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a59c: 02 bf ff f2 be 4002a564 <== NOT EXECUTED 4002a5a0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4002a5a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002a5a8: 40 00 65 75 call 40043b7c 4002a5ac: b0 10 20 00 clr %i0 *result = pwd; 4002a5b0: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002a5b4: 81 c7 e0 08 ret 4002a5b8: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 4002a5bc: 40 00 65 18 call 40043a1c <__errno> <== NOT EXECUTED 4002a5c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a5c4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a5c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4002a5cc: 40 00 65 6c call 40043b7c <== NOT EXECUTED 4002a5d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4002a5d4: 81 c7 e0 08 ret <== NOT EXECUTED 4002a5d8: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 4002a5dc: 40 00 65 10 call 40043a1c <__errno> <== NOT EXECUTED 4002a5e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a5e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a5e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4002a5ec: 81 c7 e0 08 ret <== NOT EXECUTED 4002a5f0: 81 e8 00 00 restore <== NOT EXECUTED 4002a198 : return NULL; return p; } struct passwd *getpwent(void) { 4002a198: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 4002a19c: 03 10 01 b3 sethi %hi(0x4006cc00), %g1 <== NOT EXECUTED 4002a1a0: d0 00 63 0c ld [ %g1 + 0x30c ], %o0 ! 4006cf0c <== NOT EXECUTED 4002a1a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a1a8: 32 80 00 04 bne,a 4002a1b8 <== NOT EXECUTED 4002a1ac: 31 10 01 b3 sethi %hi(0x4006cc00), %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } 4002a1b0: 81 c7 e0 08 ret <== NOT EXECUTED 4002a1b4: 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)) 4002a1b8: 15 10 01 b3 sethi %hi(0x4006cc00), %o2 <== NOT EXECUTED 4002a1bc: 92 16 23 d8 or %i0, 0x3d8, %o1 <== NOT EXECUTED 4002a1c0: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED 4002a1c4: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002a1c8: 7f ff ff ad call 4002a07c <== NOT EXECUTED 4002a1cc: b0 16 23 d8 or %i0, 0x3d8, %i0 <== NOT EXECUTED 4002a1d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a1d4: 02 bf ff f7 be 4002a1b0 <== NOT EXECUTED 4002a1d8: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 4002a1dc: 81 c7 e0 08 ret <== NOT EXECUTED 4002a1e0: 81 e8 00 00 restore <== NOT EXECUTED 4002a628 : } struct passwd *getpwuid( uid_t uid ) { 4002a628: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 4002a62c: 13 10 01 b3 sethi %hi(0x4006cc00), %o1 <== NOT EXECUTED 4002a630: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002a634: 92 12 63 d8 or %o1, 0x3d8, %o1 <== NOT EXECUTED 4002a638: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4002a63c: 15 10 01 b3 sethi %hi(0x4006cc00), %o2 <== NOT EXECUTED 4002a640: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002a644: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED 4002a648: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 4002a64c: 7f ff ff ea call 4002a5f4 <== NOT EXECUTED 4002a650: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002a654: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a658: 22 80 00 02 be,a 4002a660 <== NOT EXECUTED 4002a65c: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002a660: 81 c7 e0 08 ret <== NOT EXECUTED 4002a664: 81 e8 00 00 restore <== NOT EXECUTED 4002a5f4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002a5f4: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4002a5f8: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002a5fc: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002a600: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002a604: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002a608: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002a60c: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4002a610: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 4002a614: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002a618: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002a61c: 7f ff ff be call 4002a514 <== NOT EXECUTED 4002a620: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002a624: 01 00 00 00 nop 4000abe0 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4000abe0: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000abe4: 80 a6 20 00 cmp %i0, 0 4000abe8: 02 80 00 11 be 4000ac2c 4000abec: 01 00 00 00 nop { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4000abf0: 7f ff dc 3b call 40001cdc 4000abf4: 01 00 00 00 nop 4000abf8: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000abfc: 40 00 03 10 call 4000b83c <_TOD_Get> 4000ac00: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 4000ac04: 7f ff dc 3a call 40001cec 4000ac08: 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; 4000ac0c: 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; 4000ac10: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 4000ac14: 92 10 23 e8 mov 0x3e8, %o1 4000ac18: 40 00 32 54 call 40017568 <.div> 4000ac1c: c2 26 00 00 st %g1, [ %i0 ] 4000ac20: 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; } 4000ac24: 81 c7 e0 08 ret 4000ac28: 91 e8 20 00 restore %g0, 0, %o0 void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4000ac2c: 40 00 0c bc call 4000df1c <__errno> <== NOT EXECUTED 4000ac30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ac34: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000ac38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4000ac3c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ac40: 81 e8 00 00 restore <== NOT EXECUTED 40007308 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 40007308: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 4000730c: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED return _POSIX_types_Uid; } 40007310: 81 c3 e0 08 retl <== NOT EXECUTED 40007314: d0 10 60 30 lduh [ %g1 + 0x30 ], %o0 <== NOT EXECUTED 40013280 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40013280: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40013284: e0 06 40 00 ld [ %i1 ], %l0 40013288: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 4001328c: 82 04 20 54 add %l0, 0x54, %g1 40013290: 80 a0 80 01 cmp %g2, %g1 40013294: 12 80 00 30 bne 40013354 40013298: 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 ) 4001329c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 400132a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400132a4: 80 a4 00 01 cmp %l0, %g1 400132a8: 02 80 00 31 be 4001336c 400132ac: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 400132b0: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 400132b4: 80 a0 60 00 cmp %g1, 0 400132b8: 12 80 00 2d bne 4001336c 400132bc: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 400132c0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400132c4: 80 a0 60 00 cmp %g1, 0 400132c8: 22 80 00 06 be,a 400132e0 400132cc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 400132d0: 7f ff d4 4e call 40008408 <_Chain_Extract> 400132d4: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 400132d8: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400132dc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 400132e0: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400132e4: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 400132e8: 90 07 bf f8 add %fp, -8, %o0 400132ec: 7f ff c1 fb call 40003ad8 400132f0: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 400132f4: 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) ) { 400132f8: 90 10 00 10 mov %l0, %o0 400132fc: 7f ff f3 ff call 400102f8 40013300: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40013304: 80 a2 20 00 cmp %o0, 0 40013308: 12 80 00 11 bne 4001334c 4001330c: 01 00 00 00 nop 40013310: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40013314: 80 a0 60 00 cmp %g1, 0 40013318: 12 80 00 0d bne 4001334c 4001331c: 03 10 00 86 sethi %hi(0x40021800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40013320: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 400218c0 40013324: c4 06 40 00 ld [ %i1 ], %g2 40013328: c6 00 60 04 ld [ %g1 + 4 ], %g3 4001332c: 80 a0 c0 02 cmp %g3, %g2 40013330: 22 80 00 02 be,a 40013338 40013334: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 40013338: 90 10 00 10 mov %l0, %o0 4001333c: 7f ff c1 bc call 40003a2c 40013340: b0 10 20 00 clr %i0 40013344: 81 c7 e0 08 ret 40013348: 81 e8 00 00 restore } return 0; } 4001334c: 81 c7 e0 08 ret 40013350: 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 ); 40013354: 40 00 01 b1 call 40013a18 <__errno> 40013358: b0 10 3f ff mov -1, %i0 4001335c: 82 10 20 5a mov 0x5a, %g1 40013360: c2 22 00 00 st %g1, [ %o0 ] 40013364: 81 c7 e0 08 ret 40013368: 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 ); 4001336c: 40 00 01 ab call 40013a18 <__errno> 40013370: b0 10 3f ff mov -1, %i0 40013374: 82 10 20 10 mov 0x10, %g1 40013378: c2 22 00 00 st %g1, [ %o0 ] 4001337c: 81 c7 e0 08 ret 40013380: 81 e8 00 00 restore 4002a1e4 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 4002a1e4: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 4002a1e8: 03 10 01 b3 sethi %hi(0x4006cc00), %g1 4002a1ec: c4 48 63 08 ldsb [ %g1 + 0x308 ], %g2 ! 4006cf08 4002a1f0: 80 a0 a0 00 cmp %g2, 0 4002a1f4: 02 80 00 04 be 4002a204 4002a1f8: 84 10 20 01 mov 1, %g2 4002a1fc: 81 c7 e0 08 ret 4002a200: 81 e8 00 00 restore return; etc_passwd_initted = 1; mkdir("/etc", 0777); 4002a204: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 4002a208: c4 28 63 08 stb %g2, [ %g1 + 0x308 ] mkdir("/etc", 0777); 4002a20c: 11 10 01 7a sethi %hi(0x4005e800), %o0 4002a210: 7f ff 76 1f call 40007a8c 4002a214: 90 12 23 c8 or %o0, 0x3c8, %o0 ! 4005ebc8 <_rodata_start+0x7a8> /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4002a218: 31 10 01 7b sethi %hi(0x4005ec00), %i0 4002a21c: 21 10 01 a3 sethi %hi(0x40068c00), %l0 4002a220: 90 16 20 50 or %i0, 0x50, %o0 4002a224: 40 00 68 a5 call 400444b8 4002a228: 92 14 20 f0 or %l0, 0xf0, %o1 4002a22c: 80 a2 20 00 cmp %o0, 0 4002a230: 22 80 00 0d be,a 4002a264 4002a234: 90 16 20 50 or %i0, 0x50, %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); 4002a238: 40 00 66 51 call 40043b7c 4002a23c: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 4002a240: 92 14 20 f0 or %l0, 0xf0, %o1 4002a244: 21 10 01 7b sethi %hi(0x4005ec00), %l0 4002a248: 40 00 68 9c call 400444b8 4002a24c: 90 14 21 08 or %l0, 0x108, %o0 ! 4005ed08 <_rodata_start+0x8e8> 4002a250: 80 a2 20 00 cmp %o0, 0 4002a254: 22 80 00 11 be,a 4002a298 4002a258: 90 14 21 08 or %l0, 0x108, %o0 fclose(fp); 4002a25c: 40 00 66 48 call 40043b7c <== NOT EXECUTED 4002a260: 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) { 4002a264: 13 10 01 88 sethi %hi(0x40062000), %o1 4002a268: 40 00 68 94 call 400444b8 4002a26c: 92 12 62 a0 or %o1, 0x2a0, %o1 ! 400622a0 4002a270: b0 92 20 00 orcc %o0, 0, %i0 4002a274: 02 bf ff f3 be 4002a240 4002a278: 92 10 20 01 mov 1, %o1 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4002a27c: 94 10 20 66 mov 0x66, %o2 4002a280: 96 10 00 18 mov %i0, %o3 4002a284: 11 10 01 90 sethi %hi(0x40064000), %o0 4002a288: 40 00 6d 6c call 40045838 4002a28c: 90 12 20 08 or %o0, 8, %o0 ! 40064008 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4002a290: 10 bf ff ea b 4002a238 4002a294: 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) { 4002a298: 13 10 01 88 sethi %hi(0x40062000), %o1 4002a29c: 40 00 68 87 call 400444b8 4002a2a0: 92 12 62 a0 or %o1, 0x2a0, %o1 ! 400622a0 4002a2a4: b0 92 20 00 orcc %o0, 0, %i0 4002a2a8: 02 bf ff d5 be 4002a1fc 4002a2ac: 11 10 01 90 sethi %hi(0x40064000), %o0 fprintf( fp, "root:x:0:root\n" 4002a2b0: 92 10 20 01 mov 1, %o1 4002a2b4: 94 10 20 2a mov 0x2a, %o2 4002a2b8: 96 10 00 18 mov %i0, %o3 4002a2bc: 40 00 6d 5f call 40045838 4002a2c0: 90 12 20 70 or %o0, 0x70, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 4002a2c4: 40 00 66 2e call 40043b7c 4002a2c8: 81 e8 00 00 restore 4002a2cc: 01 00 00 00 nop 4000637c : int ioctl( int fd, ioctl_command_t command, ... ) { 4000637c: 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 ); 40006380: 03 10 00 87 sethi %hi(0x40021c00), %g1 40006384: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 40021c54 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40006388: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4000638c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40006390: 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 ); 40006394: 80 a6 00 01 cmp %i0, %g1 40006398: 1a 80 00 18 bcc 400063f8 4000639c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] iop = rtems_libio_iop( fd ); 400063a0: 03 10 00 89 sethi %hi(0x40022400), %g1 400063a4: d0 00 60 f4 ld [ %g1 + 0xf4 ], %o0 ! 400224f4 400063a8: 83 2e 20 06 sll %i0, 6, %g1 400063ac: b1 2e 20 03 sll %i0, 3, %i0 400063b0: b0 06 00 01 add %i0, %g1, %i0 400063b4: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 400063b8: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400063bc: 80 88 61 00 btst 0x100, %g1 400063c0: 02 80 00 0e be 400063f8 400063c4: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 400063c8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 400063cc: 80 a0 60 00 cmp %g1, 0 400063d0: 02 80 00 0a be 400063f8 400063d4: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 400063d8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400063dc: 80 a0 60 00 cmp %g1, 0 400063e0: 02 80 00 0c be 40006410 400063e4: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 400063e8: 9f c0 40 00 call %g1 400063ec: 94 10 00 1a mov %i2, %o2 return rc; } 400063f0: 81 c7 e0 08 ret 400063f4: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 400063f8: 40 00 36 96 call 40013e50 <__errno> 400063fc: b0 10 3f ff mov -1, %i0 40006400: 82 10 20 09 mov 9, %g1 40006404: c2 22 00 00 st %g1, [ %o0 ] 40006408: 81 c7 e0 08 ret 4000640c: 81 e8 00 00 restore if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006410: 40 00 36 90 call 40013e50 <__errno> <== NOT EXECUTED 40006414: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006418: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000641c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006420: 81 c7 e0 08 ret <== NOT EXECUTED 40006424: 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 6d sethi %hi(0x4001b400), %g2 <== NOT EXECUTED 40003c08: c4 00 a3 d4 ld [ %g2 + 0x3d4 ], %g2 ! 4001b7d4 <__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 6d sethi %hi(0x4001b400), %g2 <== NOT EXECUTED 40003c50: c4 00 a3 68 ld [ %g2 + 0x368 ], %g2 ! 4001b768 <== 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 40024348 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 40024348: 81 c3 e0 08 retl <== NOT EXECUTED 4002434c: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 40019b70 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 40019b70: 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())) 40019b74: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019b78: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 4001c1a0 <_System_state_Current> 40019b7c: 80 a0 60 03 cmp %g1, 3 40019b80: 02 80 00 04 be 40019b90 40019b84: 03 10 00 6c sethi %hi(0x4001b000), %g1 40019b88: 81 c7 e0 08 ret <== NOT EXECUTED 40019b8c: 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) { 40019b90: 21 10 00 6d sethi %hi(0x4001b400), %l0 40019b94: e2 00 62 38 ld [ %g1 + 0x238 ], %l1 40019b98: c2 04 23 d8 ld [ %l0 + 0x3d8 ], %g1 40019b9c: 80 a0 40 11 cmp %g1, %l1 40019ba0: 02 80 00 05 be 40019bb4 40019ba4: 01 00 00 00 nop _wrapup_reent(_global_impure_ptr); 40019ba8: 40 00 01 80 call 4001a1a8 <_wrapup_reent> 40019bac: 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; 40019bb0: e2 24 23 d8 st %l1, [ %l0 + 0x3d8 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 40019bb4: 7f ff d1 32 call 4000e07c 40019bb8: d0 04 60 04 ld [ %l1 + 4 ], %o0 fclose (stdout); 40019bbc: c2 04 23 d8 ld [ %l0 + 0x3d8 ], %g1 40019bc0: 7f ff d1 2f call 4000e07c 40019bc4: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40019bc8: c2 04 23 d8 ld [ %l0 + 0x3d8 ], %g1 40019bcc: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40019bd0: 7f ff d1 2b call 4000e07c 40019bd4: 81 e8 00 00 restore 40019bd8: 01 00 00 00 nop 4002a77c : int link( const char *existing, const char *new ) { 4002a77c: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 4002a780: 40 00 7f d2 call 4004a6c8 4002a784: 90 10 00 18 mov %i0, %o0 4002a788: a0 07 bf e8 add %fp, -24, %l0 4002a78c: 92 10 00 08 mov %o0, %o1 4002a790: 94 10 20 00 clr %o2 4002a794: 90 10 00 18 mov %i0, %o0 4002a798: 96 10 00 10 mov %l0, %o3 4002a79c: 98 10 20 01 mov 1, %o4 4002a7a0: 7f ff 72 51 call 400070e4 4002a7a4: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 4002a7a8: 80 a2 20 00 cmp %o0, 0 4002a7ac: 12 80 00 88 bne 4002a9cc 4002a7b0: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002a7b4: c2 4e 40 00 ldsb [ %i1 ], %g1 4002a7b8: 80 a0 60 5c cmp %g1, 0x5c 4002a7bc: 02 80 00 06 be 4002a7d4 4002a7c0: 80 a0 60 2f cmp %g1, 0x2f 4002a7c4: 02 80 00 04 be 4002a7d4 4002a7c8: 80 a0 60 00 cmp %g1, 0 4002a7cc: 12 80 00 3c bne 4002a8bc 4002a7d0: 03 10 01 a5 sethi %hi(0x40069400), %g1 4002a7d4: 03 10 01 a5 sethi %hi(0x40069400), %g1 4002a7d8: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 4002a7dc: 90 10 20 01 mov 1, %o0 4002a7e0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4002a7e4: c4 27 bf d4 st %g2, [ %fp + -44 ] 4002a7e8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4002a7ec: c4 27 bf d8 st %g2, [ %fp + -40 ] 4002a7f0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4002a7f4: c4 27 bf dc st %g2, [ %fp + -36 ] 4002a7f8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4002a7fc: c4 27 bf e0 st %g2, [ %fp + -32 ] 4002a800: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002a804: c2 27 bf e4 st %g1, [ %fp + -28 ] if ( !parent_loc.ops->evalformake_h ) { 4002a808: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002a80c: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002a810: 80 a0 60 00 cmp %g1, 0 4002a814: 02 80 00 60 be 4002a994 4002a818: 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 ); 4002a81c: 94 07 bf fc add %fp, -4, %o2 4002a820: b2 07 bf d4 add %fp, -44, %i1 4002a824: 9f c0 40 00 call %g1 4002a828: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 4002a82c: a2 92 20 00 orcc %o0, 0, %l1 4002a830: 12 80 00 4a bne 4002a958 4002a834: 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 ) { 4002a838: c4 07 bf e4 ld [ %fp + -28 ], %g2 4002a83c: 80 a0 80 01 cmp %g2, %g1 4002a840: 12 80 00 2c bne 4002a8f0 4002a844: 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 ) { 4002a848: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4002a84c: 80 a0 60 00 cmp %g1, 0 4002a850: 02 80 00 61 be 4002a9d4 4002a854: 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 ); 4002a858: 90 10 00 10 mov %l0, %o0 4002a85c: 9f c0 40 00 call %g1 4002a860: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &existing_loc ); 4002a864: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002a868: 80 a0 60 00 cmp %g1, 0 4002a86c: 02 80 00 08 be 4002a88c 4002a870: b0 10 00 08 mov %o0, %i0 4002a874: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a878: 80 a0 60 00 cmp %g1, 0 4002a87c: 22 80 00 05 be,a 4002a890 4002a880: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002a884: 9f c0 40 00 call %g1 4002a888: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 4002a88c: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002a890: 80 a0 60 00 cmp %g1, 0 4002a894: 02 80 00 4e be 4002a9cc 4002a898: 01 00 00 00 nop 4002a89c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a8a0: 80 a0 60 00 cmp %g1, 0 4002a8a4: 02 80 00 4a be 4002a9cc 4002a8a8: 01 00 00 00 nop 4002a8ac: 9f c0 40 00 call %g1 4002a8b0: 90 10 00 19 mov %i1, %o0 return result; } 4002a8b4: 81 c7 e0 08 ret 4002a8b8: 81 e8 00 00 restore /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002a8bc: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 4002a8c0: 90 10 20 00 clr %o0 4002a8c4: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002a8c8: c4 27 bf d4 st %g2, [ %fp + -44 ] 4002a8cc: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002a8d0: c4 27 bf d8 st %g2, [ %fp + -40 ] 4002a8d4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4002a8d8: c4 27 bf dc st %g2, [ %fp + -36 ] 4002a8dc: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4002a8e0: c4 27 bf e0 st %g2, [ %fp + -32 ] 4002a8e4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4002a8e8: 10 bf ff c8 b 4002a808 4002a8ec: 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 ); 4002a8f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002a8f4: 80 a0 60 00 cmp %g1, 0 4002a8f8: 22 80 00 09 be,a 4002a91c 4002a8fc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002a900: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a904: 80 a0 60 00 cmp %g1, 0 4002a908: 22 80 00 05 be,a 4002a91c 4002a90c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002a910: 9f c0 40 00 call %g1 4002a914: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 4002a918: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002a91c: 80 a0 60 00 cmp %g1, 0 4002a920: 02 80 00 08 be 4002a940 4002a924: 01 00 00 00 nop 4002a928: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a92c: 80 a0 60 00 cmp %g1, 0 4002a930: 02 80 00 04 be 4002a940 4002a934: 01 00 00 00 nop 4002a938: 9f c0 40 00 call %g1 4002a93c: 90 10 00 19 mov %i1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 4002a940: 40 00 64 37 call 40043a1c <__errno> 4002a944: b0 10 3f ff mov -1, %i0 4002a948: 82 10 20 12 mov 0x12, %g1 4002a94c: c2 22 00 00 st %g1, [ %o0 ] 4002a950: 81 c7 e0 08 ret 4002a954: 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 ); 4002a958: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002a95c: 80 a0 60 00 cmp %g1, 0 4002a960: 02 80 00 08 be 4002a980 4002a964: 01 00 00 00 nop 4002a968: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a96c: 80 a0 60 00 cmp %g1, 0 4002a970: 02 80 00 04 be 4002a980 4002a974: 01 00 00 00 nop 4002a978: 9f c0 40 00 call %g1 4002a97c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 4002a980: 40 00 64 27 call 40043a1c <__errno> 4002a984: b0 10 3f ff mov -1, %i0 4002a988: e2 22 00 00 st %l1, [ %o0 ] 4002a98c: 81 c7 e0 08 ret 4002a990: 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 ); 4002a994: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002a998: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a99c: 02 80 00 08 be 4002a9bc <== NOT EXECUTED 4002a9a0: 01 00 00 00 nop <== NOT EXECUTED 4002a9a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002a9a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a9ac: 02 80 00 04 be 4002a9bc <== NOT EXECUTED 4002a9b0: 01 00 00 00 nop <== NOT EXECUTED 4002a9b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002a9b8: 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 ); 4002a9bc: 40 00 64 18 call 40043a1c <__errno> <== NOT EXECUTED 4002a9c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a9c4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002a9c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a9cc: 81 c7 e0 08 ret 4002a9d0: 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 ); 4002a9d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002a9d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a9dc: 02 80 00 0a be 4002aa04 <== NOT EXECUTED 4002a9e0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002a9e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002a9e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a9ec: 02 80 00 06 be 4002aa04 <== NOT EXECUTED 4002a9f0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002a9f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002a9f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002a9fc: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 4002aa00: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002aa04: 02 bf ff ee be 4002a9bc <== NOT EXECUTED 4002aa08: 01 00 00 00 nop <== NOT EXECUTED 4002aa0c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002aa10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002aa14: 02 bf ff ea be 4002a9bc <== NOT EXECUTED 4002aa18: 01 00 00 00 nop <== NOT EXECUTED 4002aa1c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002aa20: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4002aa24: 30 bf ff e6 b,a 4002a9bc <== NOT EXECUTED 400199cc : off_t lseek( int fd, off_t offset, int whence ) { 400199cc: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 400199d0: 03 10 00 6d sethi %hi(0x4001b400), %g1 400199d4: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 4001b664 off_t lseek( int fd, off_t offset, int whence ) { 400199d8: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 400199dc: 80 a6 00 01 cmp %i0, %g1 400199e0: 1a 80 00 46 bcc 40019af8 400199e4: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 400199e8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400199ec: e0 00 62 28 ld [ %g1 + 0x228 ], %l0 ! 4001be28 400199f0: 83 2e 20 06 sll %i0, 6, %g1 400199f4: b1 2e 20 03 sll %i0, 3, %i0 400199f8: b0 06 00 01 add %i0, %g1, %i0 400199fc: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 40019a00: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40019a04: 80 88 61 00 btst 0x100, %g1 40019a08: 02 80 00 3c be 40019af8 40019a0c: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 40019a10: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40019a14: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 40019a18: 80 a1 20 00 cmp %g4, 0 40019a1c: 02 80 00 3f be 40019b18 40019a20: 80 a6 e0 01 cmp %i3, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40019a24: 02 80 00 27 be 40019ac0 40019a28: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 40019a2c: 80 a6 e0 02 cmp %i3, 2 40019a30: 02 80 00 11 be 40019a74 40019a34: 80 a6 e0 00 cmp %i3, 0 40019a38: 12 80 00 26 bne 40019ad0 40019a3c: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 40019a40: 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 ); 40019a44: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40019a48: 92 10 00 02 mov %g2, %o1 40019a4c: 94 10 00 03 mov %g3, %o2 40019a50: 96 10 00 1b mov %i3, %o3 40019a54: 9f c0 40 00 call %g1 40019a58: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 40019a5c: 80 a2 3f ff cmp %o0, -1 40019a60: 02 80 00 13 be 40019aac 40019a64: 80 a2 7f ff cmp %o1, -1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40019a68: b2 10 00 09 mov %o1, %i1 40019a6c: 81 c7 e0 08 ret 40019a70: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 40019a74: 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 ); 40019a78: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 40019a7c: 9a 86 80 0d addcc %i2, %o5, %o5 40019a80: 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 ); 40019a84: 92 10 00 02 mov %g2, %o1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 40019a88: 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 ); 40019a8c: 94 10 00 03 mov %g3, %o2 40019a90: 96 10 00 1b mov %i3, %o3 40019a94: 9f c0 40 00 call %g1 40019a98: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 40019a9c: 80 a2 3f ff cmp %o0, -1 40019aa0: 12 bf ff f3 bne 40019a6c 40019aa4: b2 10 00 09 mov %o1, %i1 40019aa8: 80 a2 7f ff cmp %o1, -1 40019aac: 12 bf ff f0 bne 40019a6c 40019ab0: b2 10 00 09 mov %o1, %i1 iop->offset = old_offset; 40019ab4: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40019ab8: 81 c7 e0 08 ret 40019abc: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 40019ac0: 9a 86 80 13 addcc %i2, %l3, %o5 40019ac4: 98 46 40 12 addx %i1, %l2, %o4 break; 40019ac8: 10 bf ff df b 40019a44 40019acc: 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 ); 40019ad0: 7f ff d1 13 call 4000df1c <__errno> 40019ad4: 01 00 00 00 nop 40019ad8: 82 10 20 16 mov 0x16, %g1 ! 16 40019adc: c2 22 00 00 st %g1, [ %o0 ] 40019ae0: 11 3f ff ff sethi %hi(0xfffffc00), %o0 40019ae4: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 40019ae8: 92 10 00 08 mov %o0, %o1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40019aec: b0 10 00 08 mov %o0, %i0 40019af0: 81 c7 e0 08 ret 40019af4: 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); 40019af8: 7f ff d1 09 call 4000df1c <__errno> <== NOT EXECUTED 40019afc: 01 00 00 00 nop <== NOT EXECUTED 40019b00: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40019b04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019b08: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 40019b0c: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 40019b10: 10 bf ff d6 b 40019a68 <== NOT EXECUTED 40019b14: 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 ); 40019b18: 7f ff d1 01 call 4000df1c <__errno> <== NOT EXECUTED 40019b1c: 01 00 00 00 nop <== NOT EXECUTED 40019b20: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40019b24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019b28: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 40019b2c: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 40019b30: 10 bf ff ce b 40019a68 <== NOT EXECUTED 40019b34: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002abd0 : int _STAT_NAME( const char *path, struct stat *buf ) { 4002abd0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 4002abd4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4002abd8: 02 80 00 34 be 4002aca8 <== NOT EXECUTED 4002abdc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 4002abe0: 40 00 7e ba call 4004a6c8 <== NOT EXECUTED 4002abe4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002abe8: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4002abec: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002abf0: 94 10 20 00 clr %o2 <== NOT EXECUTED 4002abf4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002abf8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4002abfc: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002ac00: 7f ff 71 39 call 400070e4 <== NOT EXECUTED 4002ac04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 4002ac08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002ac0c: 12 80 00 25 bne 4002aca0 <== NOT EXECUTED 4002ac10: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 4002ac14: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4002ac18: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002ac1c: 02 80 00 29 be 4002acc0 <== NOT EXECUTED 4002ac20: 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) ); 4002ac24: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 4002ac28: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 4002ac2c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4002ac30: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 4002ac34: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 4002ac38: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 4002ac3c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4002ac40: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 4002ac44: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4002ac48: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 4002ac4c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4002ac50: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 4002ac54: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 4002ac58: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 4002ac5c: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 4002ac60: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 4002ac64: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 4002ac68: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 4002ac6c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002ac70: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ac74: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002ac78: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002ac7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ac80: 02 80 00 08 be 4002aca0 <== NOT EXECUTED 4002ac84: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002ac88: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002ac8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002ac90: 02 80 00 1a be 4002acf8 <== NOT EXECUTED 4002ac94: 01 00 00 00 nop <== NOT EXECUTED 4002ac98: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ac9c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 4002aca0: 81 c7 e0 08 ret <== NOT EXECUTED 4002aca4: 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 ); 4002aca8: 40 00 63 5d call 40043a1c <__errno> <== NOT EXECUTED 4002acac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002acb0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002acb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002acb8: 81 c7 e0 08 ret <== NOT EXECUTED 4002acbc: 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 ); 4002acc0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002acc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002acc8: 02 80 00 08 be 4002ace8 <== NOT EXECUTED 4002accc: 01 00 00 00 nop <== NOT EXECUTED 4002acd0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002acd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002acd8: 02 80 00 04 be 4002ace8 <== NOT EXECUTED 4002acdc: 01 00 00 00 nop <== NOT EXECUTED 4002ace0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002ace4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002ace8: 40 00 63 4d call 40043a1c <__errno> <== NOT EXECUTED 4002acec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002acf0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002acf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002acf8: 81 c7 e0 08 ret <== NOT EXECUTED 4002acfc: 81 e8 00 00 restore <== NOT EXECUTED 4000aff8 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000aff8: 9d e3 bf a0 save %sp, -96, %sp 4000affc: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b000: 82 10 62 38 or %g1, 0x238, %g1 ! 4001be38 4000b004: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000b008: a0 10 00 18 mov %i0, %l0 4000b00c: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000b010: 7f ff ff ed call 4000afc4 4000b014: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 4000b018: 80 a6 20 00 cmp %i0, 0 4000b01c: 02 80 00 25 be 4000b0b0 4000b020: 03 10 00 70 sethi %hi(0x4001c000), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000b024: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 4001c1a0 <_System_state_Current> 4000b028: 80 a0 60 03 cmp %g1, 3 4000b02c: 02 80 00 1c be 4000b09c 4000b030: 03 10 00 6d sethi %hi(0x4001b400), %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 ); 4000b034: d0 00 62 70 ld [ %g1 + 0x270 ], %o0 ! 4001b670 4000b038: 92 10 00 10 mov %l0, %o1 4000b03c: 94 10 20 00 clr %o2 4000b040: 40 00 03 3a call 4000bd28 <_Protected_heap_Allocate_aligned_with_boundary> 4000b044: 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 ) { 4000b048: b0 92 20 00 orcc %o0, 0, %i0 4000b04c: 02 80 00 1b be 4000b0b8 4000b050: 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 ) 4000b054: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b058: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 4001bca0 4000b05c: 80 a0 60 00 cmp %g1, 0 4000b060: 02 80 00 05 be 4000b074 4000b064: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000b068: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000b06c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b070: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000b074: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b078: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 ! 4001bc98 4000b07c: 80 a0 60 00 cmp %g1, 0 4000b080: 02 80 00 05 be 4000b094 4000b084: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000b088: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b08c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b090: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b094: 81 c7 e0 08 ret 4000b098: 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()) && 4000b09c: 7f ff ff b1 call 4000af60 4000b0a0: 01 00 00 00 nop 4000b0a4: 80 8a 20 ff btst 0xff, %o0 4000b0a8: 12 bf ff e3 bne 4000b034 4000b0ac: 03 10 00 6d sethi %hi(0x4001b400), %g1 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000b0b0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b0b4: 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) 4000b0b8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b0bc: c2 00 60 9c ld [ %g1 + 0x9c ], %g1 ! 4001bc9c 4000b0c0: 80 a0 60 00 cmp %g1, 0 4000b0c4: 02 80 00 08 be 4000b0e4 4000b0c8: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000b0cc: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b0d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b0d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000b0d8: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000b0dc: 12 bf ff df bne 4000b058 <== NOT EXECUTED 4000b0e0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED errno = ENOMEM; 4000b0e4: 40 00 0b 8e call 4000df1c <__errno> 4000b0e8: 01 00 00 00 nop 4000b0ec: 82 10 20 0c mov 0xc, %g1 ! c 4000b0f0: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4000b0f4: 81 c7 e0 08 ret 4000b0f8: 81 e8 00 00 restore 4000afa8 : 4000afa8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4000afac: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000afb0: 90 12 22 7c or %o0, 0x27c, %o0 ! 4001c27c <== NOT EXECUTED 4000afb4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000afb8: 7f ff ed 25 call 4000644c <_Chain_Append> <== NOT EXECUTED 4000afbc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000afc0: 01 00 00 00 nop 4000afc4 : void malloc_deferred_frees_process(void) { 4000afc4: 9d e3 bf a0 save %sp, -96, %sp 4000afc8: 21 10 00 70 sethi %hi(0x4001c000), %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) 4000afcc: 10 80 00 04 b 4000afdc 4000afd0: a0 14 22 7c or %l0, 0x27c, %l0 ! 4001c27c free(to_be_freed); 4000afd4: 7f ff fe 91 call 4000aa18 <== NOT EXECUTED 4000afd8: 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 ); 4000afdc: 40 00 01 98 call 4000b63c <_Chain_Get> 4000afe0: 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) 4000afe4: 80 a2 20 00 cmp %o0, 0 4000afe8: 12 bf ff fb bne 4000afd4 4000afec: 01 00 00 00 nop free(to_be_freed); } 4000aff0: 81 c7 e0 08 ret 4000aff4: 81 e8 00 00 restore 40012284 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 40012284: 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) ) { 40012288: 7f ff f8 1c call 400102f8 4001228c: 90 10 00 18 mov %i0, %o0 40012290: 80 a2 20 00 cmp %o0, 0 40012294: 12 80 00 13 bne 400122e0 40012298: 01 00 00 00 nop 4001229c: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 400122a0: 80 a0 60 00 cmp %g1, 0 400122a4: 12 80 00 0f bne 400122e0 400122a8: 03 10 00 86 sethi %hi(0x40021800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 400122ac: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 400218c0 400122b0: c4 00 60 04 ld [ %g1 + 4 ], %g2 400122b4: 80 a0 80 18 cmp %g2, %i0 400122b8: 22 80 00 02 be,a 400122c0 400122bc: 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) 400122c0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400122c4: 80 a0 60 06 cmp %g1, 6 400122c8: 02 80 00 04 be 400122d8 400122cc: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 400122d0: 7f ff ff 7a call 400120b8 400122d4: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 400122d8: 7f ff c5 d5 call 40003a2c 400122dc: 90 10 00 18 mov %i0, %o0 } return 0; } 400122e0: 81 c7 e0 08 ret 400122e4: 91 e8 20 00 restore %g0, 0, %o0 40011fd8 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40011fd8: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 40011fdc: 80 a6 20 00 cmp %i0, 0 40011fe0: 02 80 00 16 be 40012038 40011fe4: 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 40011fec: d0 06 00 00 ld [ %i0 ], %o0 40011ff0: a0 10 00 08 mov %o0, %l0 40011ff4: a2 10 20 00 clr %l1 if ( b[i] ) { 40011ff8: d0 04 00 00 ld [ %l0 ], %o0 40011ffc: 80 a2 20 00 cmp %o0, 0 40012000: 02 80 00 05 be 40012014 40012004: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40012008: 7f ff ff 2f call 40011cc4 4001200c: 01 00 00 00 nop b[i] = 0; 40012010: 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 4001201c: a0 04 20 04 add %l0, 4, %l0 40012020: 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 ); 40012024: 7f ff ff 28 call 40011cc4 40012028: 01 00 00 00 nop *block_table = 0; 4001202c: c0 26 00 00 clr [ %i0 ] } 40012030: 81 c7 e0 08 ret 40012034: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 40012038: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 4001203c: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40012040: 17 10 00 83 sethi %hi(0x40020c00), %o3 <== NOT EXECUTED 40012044: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40012048: 94 12 a3 70 or %o2, 0x370, %o2 <== NOT EXECUTED 4001204c: 96 12 e2 88 or %o3, 0x288, %o3 <== NOT EXECUTED 40012050: 7f ff c5 3e call 40003548 <__assert_func> <== NOT EXECUTED 40012054: 92 10 21 b3 mov 0x1b3, %o1 <== NOT EXECUTED 40012058: 01 00 00 00 nop 400125b0 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 400125b0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 400125b4: 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 ) 400125b8: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400125bc: 80 a0 40 19 cmp %g1, %i1 400125c0: 16 80 00 07 bge 400125dc 400125c4: 90 10 00 10 mov %l0, %o0 return IMFS_memfile_extend( the_jnode, length ); 400125c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400125cc: 7f ff ff 91 call 40012410 <== NOT EXECUTED 400125d0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 400125d4: 81 c7 e0 08 ret <== NOT EXECUTED 400125d8: 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 ) 400125dc: 22 80 00 0d be,a 40012610 400125e0: 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; 400125e4: f2 24 20 50 st %i1, [ %l0 + 0x50 ] <== NOT EXECUTED 400125e8: f4 24 20 54 st %i2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 400125ec: f4 26 20 0c st %i2, [ %i0 + 0xc ] 400125f0: f2 26 20 08 st %i1, [ %i0 + 8 ] IMFS_update_atime( the_jnode ); 400125f4: 90 07 bf f8 add %fp, -8, %o0 400125f8: 7f ff c5 38 call 40003ad8 400125fc: 92 10 20 00 clr %o1 40012600: c2 07 bf f8 ld [ %fp + -8 ], %g1 40012604: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 40012608: 81 c7 e0 08 ret 4001260c: 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 ) 40012610: 80 a0 40 1a cmp %g1, %i2 40012614: 3a bf ff f5 bcc,a 400125e8 40012618: f2 24 20 50 st %i1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 4001261c: 10 bf ff eb b 400125c8 <== NOT EXECUTED 40012620: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40012624 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 40012624: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40012628: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 4001262c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40012630: 80 a0 60 06 cmp %g1, 6 40012634: 02 80 00 0f be 40012670 40012638: 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 )) 4001263c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 40012640: 92 10 00 02 mov %g2, %o1 40012644: 7f ff ff 73 call 40012410 40012648: 94 10 00 03 mov %g3, %o2 4001264c: 80 a2 20 00 cmp %o0, 0 40012650: 12 80 00 1b bne 400126bc 40012654: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 40012658: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 4001265c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 40012660: d8 3e 20 08 std %o4, [ %i0 + 8 ] } return iop->offset; } 40012664: b2 10 00 03 mov %g3, %i1 40012668: 81 c7 e0 08 ret 4001266c: 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) 40012670: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 40012674: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40012678: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4001267c: 14 80 00 0c bg 400126ac <== NOT EXECUTED 40012680: c8 06 20 14 ld [ %i0 + 0x14 ], %g4 <== NOT EXECUTED 40012684: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40012688: 02 80 00 07 be 400126a4 <== NOT EXECUTED 4001268c: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 40012690: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 40012694: 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; } 40012698: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 4001269c: 81 c7 e0 08 ret <== NOT EXECUTED 400126a0: 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) 400126a4: 28 bf ff fc bleu,a 40012694 <== NOT EXECUTED 400126a8: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 400126ac: 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; } 400126b0: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 400126b4: 81 c7 e0 08 ret <== NOT EXECUTED 400126b8: 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 ); 400126bc: 40 00 04 d7 call 40013a18 <__errno> <== NOT EXECUTED 400126c0: 01 00 00 00 nop <== NOT EXECUTED 400126c4: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 400126c8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 400126cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400126d0: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 400126d4: 10 bf ff e4 b 40012664 <== NOT EXECUTED 400126d8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 400129a8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400129a8: 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)) 400129ac: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400129b0: 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)) 400129b4: 80 88 62 04 btst 0x204, %g1 400129b8: 02 80 00 06 be 400129d0 400129bc: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 && (the_jnode->type == IMFS_LINEAR_FILE)) { 400129c0: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 400129c4: 80 a0 a0 06 cmp %g2, 6 400129c8: 22 80 00 0c be,a 400129f8 400129cc: 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) 400129d0: 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) 400129d4: 80 88 62 00 btst 0x200, %g1 400129d8: 22 80 00 05 be,a 400129ec 400129dc: c4 3c 20 08 std %g2, [ %l0 + 8 ] iop->offset = the_jnode->info.file.size; 400129e0: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] 400129e4: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2 iop->size = the_jnode->info.file.size; 400129e8: c4 3c 20 08 std %g2, [ %l0 + 8 ] 400129ec: b0 10 20 00 clr %i0 return 0; } 400129f0: 81 c7 e0 08 ret 400129f4: 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; 400129f8: d6 04 60 58 ld [ %l1 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 400129fc: 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; 40012a00: 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; 40012a04: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED 40012a08: 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; 40012a0c: 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; 40012a10: 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) 40012a14: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 40012a18: 12 80 00 06 bne 40012a30 <== NOT EXECUTED 40012a1c: c2 24 60 48 st %g1, [ %l1 + 0x48 ] <== NOT EXECUTED 40012a20: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 40012a24: 84 10 20 00 clr %g2 <== NOT EXECUTED 40012a28: 10 bf ff eb b 400129d4 <== NOT EXECUTED 40012a2c: 86 10 20 00 clr %g3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 40012a30: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40012a34: 92 10 20 00 clr %o1 <== NOT EXECUTED 40012a38: 94 10 20 00 clr %o2 <== NOT EXECUTED 40012a3c: 7f ff ff 28 call 400126dc <== NOT EXECUTED 40012a40: 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) 40012a44: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40012a48: 02 bf ff ea be 400129f0 <== NOT EXECUTED 40012a4c: 01 00 00 00 nop <== NOT EXECUTED 40012a50: 10 bf ff e0 b 400129d0 <== NOT EXECUTED 40012a54: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 400122e8 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 400122e8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 400122ec: 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 ) { 400122f0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400122f4: 80 a0 60 00 cmp %g1, 0 400122f8: 22 80 00 06 be,a 40012310 400122fc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 40012300: 7f ff d8 42 call 40008408 <_Chain_Extract> 40012304: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40012308: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4001230c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40012310: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40012314: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40012318: 90 07 bf f8 add %fp, -8, %o0 4001231c: 7f ff c5 ef call 40003ad8 40012320: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40012324: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 40012328: 90 10 00 10 mov %l0, %o0 4001232c: 7f ff ff d6 call 40012284 40012330: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } 40012334: 81 c7 e0 08 ret 40012338: 91 e8 00 08 restore %g0, %o0, %o0 4000980c : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000980c: 13 10 00 6a sethi %hi(0x4001a800), %o1 40009810: 15 10 00 6b sethi %hi(0x4001ac00), %o2 40009814: 92 12 63 3c or %o1, 0x33c, %o1 40009818: 94 12 a1 00 or %o2, 0x100, %o2 4000981c: 96 10 00 0a mov %o2, %o3 40009820: 82 13 c0 00 mov %o7, %g1 40009824: 40 00 03 59 call 4000a588 40009828: 9e 10 40 00 mov %g1, %o7 4000982c: 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 6d sethi %hi(0x4001b400), %g1 40002508: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 4001b778 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 2e 75 call 4000df1c <__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 6d sethi %hi(0x4001b400), %g1 40002564: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 4001b778 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 2e 40 call 4000df1c <__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 31 d5 call 4000edf8 <== 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 52 call 4000aff8 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 31 a4 call 4000ed6c <== 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 31 c2 call 4000edf8 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 6f sethi %hi(0x4001bc00), %g4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40002744: c2 01 22 68 ld [ %g4 + 0x268 ], %g1 ! 4001be68 40002748: 88 11 22 68 or %g4, 0x268, %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 6f sethi %hi(0x4001bc00), %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 19 call 4000644c <_Chain_Append> 400027ec: 90 12 22 68 or %o0, 0x268, %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 7d call 4000aa18 <== 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 2d b7 call 4000df1c <__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 71 call 4000aa18 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 2d a4 call 4000df1c <__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 2d 95 call 4000df1c <__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 2d 8f call 4000df1c <__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 2d 8a call 4000df1c <__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 44 call 4000aa18 <== 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 2d 81 call 4000df1c <__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 2e 77 call 4000e380 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 2d b1 call 4000e07c <== 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 11 call 4000aa18 <== 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 83 sethi %hi(0x40020c00), %g1 40002a48: c4 48 61 0c ldsb [ %g1 + 0x10c ], %g2 ! 40020d0c 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 7b sethi %hi(0x4001ec00), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 40002a64: c4 28 61 0c stb %g2, [ %g1 + 0x10c ] status = rtems_io_register_name( 40002a68: 90 12 21 10 or %o0, 0x110, %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 83 sethi %hi(0x40020c00), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 40002a84: f0 20 62 b4 st %i0, [ %g1 + 0x2b4 ] ! 40020eb4 } 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 a8 call 40007130 <== 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 6c call 4000ae28 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 30 5b call 4000edf8 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 93 call 4000af2c 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 6f sethi %hi(0x4001bc00), %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 62 28 ld [ %l1 + 0x228 ], %g1 ! 4001be28 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 2c 62 call 4000df1c <__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 6f sethi %hi(0x4001bc00), %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 62 28 ld [ %l1 + 0x228 ], %g1 ! 4001be28 <== 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 1f f5 call 4000adcc 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 2c 3a call 4000df1c <__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 2c 35 call 4000df1c <__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 2c 2f call 4000df1c <__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 62 28 ld [ %l1 + 0x228 ], %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 07 call 4000aac4 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 62 28 ld [ %l1 + 0x228 ], %g1 if(errno) rc = errno; 40002ebc: 40 00 2c 18 call 4000df1c <__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 62 28 ld [ %l1 + 0x228 ], %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 93 call 4000a958 <== 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 2f a9 call 4000edf8 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 2b e4 call 4000df1c <__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 69 sethi %hi(0x4001a400), %l0 40002bd4: 92 10 20 00 clr %o1 40002bd8: 90 14 22 18 or %l0, 0x218, %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 22 18 or %l0, 0x218, %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 22 18 or %l0, 0x218, %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 35 call 400060fc <== 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 32 call 400060fc <== 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 6d sethi %hi(0x4001b400), %g1 400037c4: c2 00 63 d4 ld [ %g1 + 0x3d4 ], %g1 ! 4001b7d4 <__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 6a sethi %hi(0x4001a800), %o0 4000384c: 92 10 20 01 mov 1, %o1 40003850: 90 12 21 58 or %o0, 0x158, %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 63 d4 ld [ %g1 + 0x3d4 ], %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 6a sethi %hi(0x4001a800), %o0 4000391c: 7f ff ff 48 call 4000363c 40003920: 90 12 21 60 or %o0, 0x160, %o0 ! 4001a960 <__FUNCTION__.5604+0x2a0> return; 40003924: 81 c7 e0 08 ret 40003928: 81 e8 00 00 restore 4000d924 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4000d924: 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) 4000d928: 23 10 00 6b sethi %hi(0x4001ac00), %l1 4000d92c: a0 07 bf dc add %fp, -36, %l0 4000d930: 92 10 20 03 mov 3, %o1 4000d934: 90 14 62 90 or %l1, 0x290, %o0 4000d938: 94 10 20 07 mov 7, %o2 4000d93c: 96 10 00 10 mov %l0, %o3 4000d940: 7f ff d2 2a call 400021e8 4000d944: 98 10 20 01 mov 1, %o4 4000d948: 80 a2 20 00 cmp %o0, 0 4000d94c: 12 80 00 43 bne 4000da58 4000d950: 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); 4000d954: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d958: 22 80 00 09 be,a 4000d97c <== NOT EXECUTED 4000d95c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000d960: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001bc1c <== NOT EXECUTED 4000d964: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d968: 22 80 00 05 be,a 4000d97c <== NOT EXECUTED 4000d96c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000d970: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d974: 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 ++); 4000d978: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000d97c: c4 10 61 b6 lduh [ %g1 + 0x1b6 ], %g2 ! 4001bdb6 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000d980: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000d984: 95 28 a0 10 sll %g2, 0x10, %o2 4000d988: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000d98c: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000d990: c4 30 61 b6 sth %g2, [ %g1 + 0x1b6 ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000d994: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 4000d998: 03 00 00 19 sethi %hi(0x6400), %g1 4000d99c: 84 10 a1 70 or %g2, 0x170, %g2 4000d9a0: 82 10 62 6f or %g1, 0x26f, %g1 4000d9a4: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000d9a8: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000d9ac: c4 3f bf f0 std %g2, [ %fp + -16 ] 4000d9b0: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000d9b4: 90 07 bf fa add %fp, -6, %o0 4000d9b8: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000d9bc: 40 00 04 43 call 4000eac8 4000d9c0: 92 12 62 98 or %o1, 0x298, %o1 ! 4001ae98 <__FUNCTION__.5876+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4000d9c4: 90 10 00 10 mov %l0, %o0 4000d9c8: 40 00 00 5a call 4000db30 4000d9cc: 92 10 21 80 mov 0x180, %o1 4000d9d0: 80 a2 20 00 cmp %o0, 0 4000d9d4: 12 80 00 1d bne 4000da48 4000d9d8: 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); 4000d9dc: 7f ff d4 99 call 40002c40 4000d9e0: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 4000d9e4: 80 a2 20 00 cmp %o0, 0 4000d9e8: 06 80 00 2f bl 4000daa4 4000d9ec: 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]); 4000d9f0: 03 10 00 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED 4000d9f4: c4 00 62 64 ld [ %g1 + 0x264 ], %g2 ! 4001b664 <== NOT EXECUTED 4000d9f8: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000d9fc: 0a 80 00 23 bcs 4000da88 <== NOT EXECUTED 4000da00: 82 10 20 00 clr %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000da04: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000da08: 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; 4000da0c: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000da10: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000da14: 7f ff d4 8b call 40002c40 <== NOT EXECUTED 4000da18: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 4000da1c: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 4000da20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000da24: 06 80 00 26 bl 4000dabc <== NOT EXECUTED 4000da28: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4000da2c: 40 00 00 4b call 4000db58 <== NOT EXECUTED 4000da30: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4000da34: 40 00 01 3a call 4000df1c <__errno> 4000da38: b0 10 3f ff mov -1, %i0 4000da3c: e2 22 00 00 st %l1, [ %o0 ] } 4000da40: 81 c7 e0 08 ret 4000da44: 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){ 4000da48: 40 00 01 35 call 4000df1c <__errno> <== NOT EXECUTED 4000da4c: 01 00 00 00 nop <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4000da50: 81 c7 e0 08 ret <== NOT EXECUTED 4000da54: 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) 4000da58: 40 00 01 31 call 4000df1c <__errno> 4000da5c: 01 00 00 00 nop 4000da60: c2 02 00 00 ld [ %o0 ], %g1 4000da64: 80 a0 60 02 cmp %g1, 2 4000da68: 12 bf ff fa bne 4000da50 4000da6c: 90 14 62 90 or %l1, 0x290, %o0 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4000da70: 7f ff d2 8d call 400024a4 4000da74: 92 10 23 ff mov 0x3ff, %o1 4000da78: 80 a2 20 00 cmp %o0, 0 4000da7c: 02 bf ff c0 be 4000d97c 4000da80: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000da84: 30 bf ff f3 b,a 4000da50 <== 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]); 4000da88: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000da8c: c2 00 62 28 ld [ %g1 + 0x228 ], %g1 ! 4001be28 <== NOT EXECUTED 4000da90: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4000da94: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 4000da98: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 4000da9c: 10 bf ff da b 4000da04 <== NOT EXECUTED 4000daa0: 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; 4000daa4: 40 00 01 1e call 4000df1c <__errno> 4000daa8: 01 00 00 00 nop 4000daac: 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); 4000dab0: 40 00 00 2a call 4000db58 4000dab4: 90 10 00 10 mov %l0, %o0 4000dab8: 30 bf ff df b,a 4000da34 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4000dabc: 40 00 01 18 call 4000df1c <__errno> <== NOT EXECUTED 4000dac0: 01 00 00 00 nop <== NOT EXECUTED 4000dac4: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 4000dac8: 7f ff f3 a4 call 4000a958 <== NOT EXECUTED 4000dacc: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 4000dad0: 30 bf ff d7 b,a 4000da2c <== NOT EXECUTED 4000c484 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000c484: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 4000c488: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000c48c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 4000c490: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000c494: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000c498: 12 80 00 12 bne 4000c4e0 <== NOT EXECUTED 4000c49c: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 4000c4a0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000c4a4: 02 80 00 0f be 4000c4e0 <== NOT EXECUTED 4000c4a8: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4000c4ac: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000c4b0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c4b4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c4b8: 7f ff e5 64 call 40005a48 <== NOT EXECUTED 4000c4bc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000c4c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c4c4: 12 80 00 07 bne 4000c4e0 <== NOT EXECUTED 4000c4c8: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000c4cc: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c4d0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000c4d4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c4d8: 7f ff e5 a3 call 40005b64 <== NOT EXECUTED 4000c4dc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 4000c4e0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c4e4: 81 e8 00 00 restore <== NOT EXECUTED 4000c40c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4000c40c: 81 c3 e0 08 retl <== NOT EXECUTED 4000c410: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED 4000c6e0 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000c6e0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000c6e4: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000c6e8: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000c6ec: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c6f0: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c6f4: 7f ff e4 d5 call 40005a48 <== NOT EXECUTED 4000c6f8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000c6fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c700: 12 80 00 2f bne 4000c7bc <== NOT EXECUTED 4000c704: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4000c708: a4 10 20 00 clr %l2 <== NOT EXECUTED 4000c70c: b0 10 20 00 clr %i0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4000c710: 02 80 00 26 be 4000c7a8 <== NOT EXECUTED 4000c714: 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); 4000c718: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4000c71c: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000c720: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000c724: 12 80 00 2a bne 4000c7cc <== NOT EXECUTED 4000c728: 82 26 80 12 sub %i2, %l2, %g1 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4000c72c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000c730: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c734: 22 80 00 1d be,a 4000c7a8 <== NOT EXECUTED 4000c738: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4000c73c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000c740: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000c744: 32 80 00 19 bne,a 4000c7a8 <== NOT EXECUTED 4000c748: 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 ++; 4000c74c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c750: 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 ++; 4000c754: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c758: 7f ff e5 03 call 40005b64 <== NOT EXECUTED 4000c75c: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000c760: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000c764: 40 00 02 d9 call 4000d2c8 <== NOT EXECUTED 4000c768: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c76c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000c770: 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)) 4000c774: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000c778: 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)) 4000c77c: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000c780: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c784: 7f ff e4 b1 call 40005a48 <== NOT EXECUTED 4000c788: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000c78c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c790: 12 80 00 32 bne 4000c858 <== NOT EXECUTED 4000c794: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4000c798: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000c79c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000c7a0: 02 bf ff df be 4000c71c <== NOT EXECUTED 4000c7a4: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4000c7a8: 7f ff e4 ef call 40005b64 <== NOT EXECUTED 4000c7ac: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 4000c7b0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000c7b4: 04 80 00 04 ble 4000c7c4 <== NOT EXECUTED 4000c7b8: 01 00 00 00 nop <== NOT EXECUTED return read; return ret; } 4000c7bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000c7c0: 81 e8 00 00 restore <== NOT EXECUTED 4000c7c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c7c8: 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); 4000c7cc: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000c7d0: 38 80 00 02 bgu,a 4000c7d8 <== NOT EXECUTED 4000c7d4: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4000c7d8: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000c7dc: e8 04 20 04 ld [ %l0 + 4 ], %l4 <== NOT EXECUTED 4000c7e0: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED if (chunk > chunk1) { 4000c7e4: 80 a4 40 14 cmp %l1, %l4 <== NOT EXECUTED 4000c7e8: 14 80 00 1e bg 4000c860 <== NOT EXECUTED 4000c7ec: 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); 4000c7f0: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED 4000c7f4: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000c7f8: 40 00 08 04 call 4000e808 <== NOT EXECUTED 4000c7fc: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED pipe->Start += chunk; 4000c800: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000c804: 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; 4000c808: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000c80c: 40 00 2c 01 call 40017810 <.urem> <== NOT EXECUTED 4000c810: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000c814: 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; 4000c818: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000c81c: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4000c820: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c824: 12 80 00 03 bne 4000c830 <== NOT EXECUTED 4000c828: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 4000c82c: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 4000c830: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000c834: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c838: 32 80 00 15 bne,a 4000c88c <== NOT EXECUTED 4000c83c: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 4000c840: 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) { 4000c844: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000c848: 0a bf ff b5 bcs 4000c71c <== NOT EXECUTED 4000c84c: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED 4000c850: 10 bf ff d6 b 4000c7a8 <== NOT EXECUTED 4000c854: 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)) { 4000c858: 10 bf ff d6 b 4000c7b0 <== NOT EXECUTED 4000c85c: 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); 4000c860: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 4000c864: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000c868: 40 00 07 e8 call 4000e808 <== NOT EXECUTED 4000c86c: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4000c870: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 4000c874: 90 04 80 14 add %l2, %l4, %o0 <== NOT EXECUTED 4000c878: 94 24 40 14 sub %l1, %l4, %o2 <== NOT EXECUTED 4000c87c: 40 00 07 e3 call 4000e808 <== NOT EXECUTED 4000c880: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; 4000c884: 10 bf ff e0 b 4000c804 <== NOT EXECUTED 4000c888: 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); 4000c88c: 40 00 02 78 call 4000d26c <== NOT EXECUTED 4000c890: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 4000c894: 10 bf ff ec b 4000c844 <== NOT EXECUTED 4000c898: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 4000c89c : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000c89c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 4000c8a0: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4000c8a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c8a8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000c8ac: 7f ff e4 67 call 40005a48 <== NOT EXECUTED 4000c8b0: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4000c8b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c8b8: 12 80 00 48 bne 4000c9d8 <== NOT EXECUTED 4000c8bc: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4000c8c0: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4000c8c4: 80 8c a0 02 btst 2, %l2 <== NOT EXECUTED 4000c8c8: 02 80 00 05 be 4000c8dc <== NOT EXECUTED 4000c8cc: a4 0c a0 06 and %l2, 6, %l2 <== NOT EXECUTED pipe->Readers --; 4000c8d0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000c8d4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000c8d8: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4000c8dc: 80 8c a0 04 btst 4, %l2 <== NOT EXECUTED 4000c8e0: 32 80 00 1d bne,a 4000c954 <== NOT EXECUTED 4000c8e4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4000c8e8: 23 10 00 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 4000c8ec: d0 04 61 b0 ld [ %l1 + 0x1b0 ], %o0 ! 4001bdb0 <== NOT EXECUTED 4000c8f0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c8f4: 7f ff e4 55 call 40005a48 <== NOT EXECUTED 4000c8f8: 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) 4000c8fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c900: 12 80 00 36 bne 4000c9d8 <== NOT EXECUTED 4000c904: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4000c908: 7f ff e4 97 call 40005b64 <== NOT EXECUTED 4000c90c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4000c910: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000c914: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c918: 12 80 00 12 bne 4000c960 <== NOT EXECUTED 4000c91c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000c920: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c924: 02 80 00 1d be 4000c998 <== NOT EXECUTED 4000c928: 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) 4000c92c: 02 80 00 06 be 4000c944 <== NOT EXECUTED 4000c930: d0 04 61 b0 ld [ %l1 + 0x1b0 ], %o0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4000c934: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000c938: 40 00 02 4d call 4000d26c <== NOT EXECUTED 4000c93c: 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); 4000c940: d0 04 61 b0 ld [ %l1 + 0x1b0 ], %o0 <== NOT EXECUTED 4000c944: 7f ff e4 88 call 40005b64 <== NOT EXECUTED 4000c948: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000c94c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c950: 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 --; 4000c954: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000c958: 10 bf ff e4 b 4000c8e8 <== NOT EXECUTED 4000c95c: 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) 4000c960: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c964: 12 bf ff f8 bne 4000c944 <== NOT EXECUTED 4000c968: d0 04 61 b0 ld [ %l1 + 0x1b0 ], %o0 <== NOT EXECUTED 4000c96c: 80 a4 a0 02 cmp %l2, 2 <== NOT EXECUTED 4000c970: 02 bf ff f5 be 4000c944 <== NOT EXECUTED 4000c974: 01 00 00 00 nop <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000c978: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000c97c: 40 00 02 3c call 4000d26c <== NOT EXECUTED 4000c980: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4000c984: d0 04 61 b0 ld [ %l1 + 0x1b0 ], %o0 <== NOT EXECUTED 4000c988: 7f ff e4 77 call 40005b64 <== NOT EXECUTED 4000c98c: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000c990: 81 c7 e0 08 ret <== NOT EXECUTED 4000c994: 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); 4000c998: 40 00 02 1b call 4000d204 <== NOT EXECUTED 4000c99c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000c9a0: 40 00 02 19 call 4000d204 <== NOT EXECUTED 4000c9a4: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000c9a8: 7f ff e3 fb call 40005994 <== NOT EXECUTED 4000c9ac: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000c9b0: 7f ff f8 1a call 4000aa18 <== NOT EXECUTED 4000c9b4: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED free(pipe); 4000c9b8: 7f ff f8 18 call 4000aa18 <== NOT EXECUTED 4000c9bc: 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); 4000c9c0: d0 04 61 b0 ld [ %l1 + 0x1b0 ], %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; 4000c9c4: 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); 4000c9c8: 7f ff e4 67 call 40005b64 <== NOT EXECUTED 4000c9cc: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000c9d0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c9d4: 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); 4000c9d8: 7f ff e5 c9 call 400060fc <== NOT EXECUTED 4000c9dc: 01 00 00 00 nop 4000c9e0: 01 00 00 00 nop 4000c4e8 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4000c4e8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4000c4ec: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4000c4f0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000c4f4: 12 80 00 04 bne 4000c504 <== NOT EXECUTED 4000c4f8: b0 10 20 00 clr %i0 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4000c4fc: 81 c7 e0 08 ret <== NOT EXECUTED 4000c500: 81 e8 00 00 restore <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4000c504: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000c508: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c50c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c510: 7f ff e5 4e call 40005a48 <== NOT EXECUTED 4000c514: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000c518: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c51c: 12 bf ff f8 bne 4000c4fc <== NOT EXECUTED 4000c520: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4000c524: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000c528: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c52c: 02 80 00 56 be 4000c684 <== NOT EXECUTED 4000c530: 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; 4000c534: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED 4000c538: 80 a6 80 15 cmp %i2, %l5 <== NOT EXECUTED 4000c53c: 18 80 00 03 bgu 4000c548 <== NOT EXECUTED 4000c540: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 4000c544: a4 10 00 1a mov %i2, %l2 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4000c548: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000c54c: 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); 4000c550: 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) { 4000c554: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000c558: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED 4000c55c: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000c560: 1a 80 00 28 bcc 4000c600 <== NOT EXECUTED 4000c564: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 4000c568: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000c56c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000c570: 32 80 00 46 bne,a 4000c688 <== NOT EXECUTED 4000c574: 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 ++; 4000c578: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c57c: 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 ++; 4000c580: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c584: 7f ff e5 78 call 40005b64 <== NOT EXECUTED 4000c588: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000c58c: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000c590: 40 00 03 4e call 4000d2c8 <== NOT EXECUTED 4000c594: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c598: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000c59c: 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)) 4000c5a0: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000c5a4: 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)) 4000c5a8: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000c5ac: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c5b0: 7f ff e5 26 call 40005a48 <== NOT EXECUTED 4000c5b4: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000c5b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c5bc: 12 80 00 3a bne 4000c6a4 <== NOT EXECUTED 4000c5c0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4000c5c4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000c5c8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000c5cc: 12 80 00 2f bne 4000c688 <== NOT EXECUTED 4000c5d0: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4000c5d4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000c5d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c5dc: 02 80 00 2b be 4000c688 <== NOT EXECUTED 4000c5e0: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED 4000c5e4: 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) { 4000c5e8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000c5ec: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED 4000c5f0: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000c5f4: 2a bf ff de bcs,a 4000c56c <== NOT EXECUTED 4000c5f8: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4000c5fc: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED 4000c600: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000c604: 38 80 00 02 bgu,a 4000c60c <== NOT EXECUTED 4000c608: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4000c60c: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 4000c610: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 4000c614: 40 00 2c 7f call 40017810 <.urem> <== NOT EXECUTED 4000c618: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000c61c: a4 25 40 08 sub %l5, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000c620: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000c624: 04 80 00 22 ble 4000c6ac <== NOT EXECUTED 4000c628: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4000c62c: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED 4000c630: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000c634: 40 00 08 75 call 4000e808 <== NOT EXECUTED 4000c638: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4000c63c: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4000c640: 92 04 80 13 add %l2, %l3, %o1 <== NOT EXECUTED 4000c644: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000c648: 40 00 08 70 call 4000e808 <== NOT EXECUTED 4000c64c: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4000c650: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000c654: 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; 4000c658: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000c65c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c660: 12 80 00 19 bne 4000c6c4 <== NOT EXECUTED 4000c664: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4000c668: 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) { 4000c66c: 80 a6 80 18 cmp %i2, %i0 <== NOT EXECUTED 4000c670: 08 80 00 1a bleu 4000c6d8 <== NOT EXECUTED 4000c674: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED 4000c678: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED 4000c67c: 10 bf ff b6 b 4000c554 <== NOT EXECUTED 4000c680: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 4000c684: 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); 4000c688: 7f ff e5 37 call 40005b64 <== NOT EXECUTED 4000c68c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4000c690: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000c694: 14 bf ff 9a bg 4000c4fc <== NOT EXECUTED 4000c698: 01 00 00 00 nop <== NOT EXECUTED return written; return ret; } 4000c69c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c6a0: 91 e8 00 11 restore %g0, %l1, %o0 <== 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)) { 4000c6a4: 10 bf ff fb b 4000c690 <== NOT EXECUTED 4000c6a8: 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); 4000c6ac: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED 4000c6b0: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000c6b4: 40 00 08 55 call 4000e808 <== NOT EXECUTED 4000c6b8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED pipe->Length += chunk; 4000c6bc: 10 bf ff e6 b 4000c654 <== NOT EXECUTED 4000c6c0: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4000c6c4: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000c6c8: 40 00 02 e9 call 4000d26c <== NOT EXECUTED 4000c6cc: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 4000c6d0: 10 bf ff e7 b 4000c66c <== NOT EXECUTED 4000c6d4: 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) { 4000c6d8: 10 bf ff ec b 4000c688 <== NOT EXECUTED 4000c6dc: a2 10 20 00 clr %l1 <== NOT EXECUTED 40019bfc : ssize_t read( int fd, void *buffer, size_t count ) { 40019bfc: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40019c00: 03 10 00 6d sethi %hi(0x4001b400), %g1 40019c04: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 4001b664 40019c08: 80 a6 00 01 cmp %i0, %g1 40019c0c: 1a 80 00 23 bcc 40019c98 40019c10: 03 10 00 6f sethi %hi(0x4001bc00), %g1 iop = rtems_libio_iop( fd ); 40019c14: e0 00 62 28 ld [ %g1 + 0x228 ], %l0 ! 4001be28 40019c18: 83 2e 20 06 sll %i0, 6, %g1 40019c1c: b1 2e 20 03 sll %i0, 3, %i0 40019c20: b0 06 00 01 add %i0, %g1, %i0 40019c24: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 40019c28: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40019c2c: 80 88 61 00 btst 0x100, %g1 40019c30: 02 80 00 1a be 40019c98 40019c34: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 40019c38: 02 80 00 1e be 40019cb0 40019c3c: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40019c40: 02 80 00 14 be 40019c90 40019c44: b0 10 20 00 clr %i0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40019c48: 80 88 60 02 btst 2, %g1 40019c4c: 02 80 00 19 be 40019cb0 40019c50: 01 00 00 00 nop /* * Now process the read(). */ if ( !iop->handlers->read_h ) 40019c54: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40019c58: c2 00 60 08 ld [ %g1 + 8 ], %g1 40019c5c: 80 a0 60 00 cmp %g1, 0 40019c60: 02 80 00 1a be 40019cc8 40019c64: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 40019c68: 94 10 00 1a mov %i2, %o2 40019c6c: 9f c0 40 00 call %g1 40019c70: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 40019c74: b0 92 20 00 orcc %o0, 0, %i0 40019c78: 04 80 00 06 ble 40019c90 40019c7c: 85 3e 20 1f sra %i0, 0x1f, %g2 iop->offset += rc; 40019c80: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 40019c84: 86 83 40 18 addcc %o5, %i0, %g3 40019c88: 84 43 00 02 addx %o4, %g2, %g2 40019c8c: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 40019c90: 81 c7 e0 08 ret 40019c94: 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 ); 40019c98: 7f ff d0 a1 call 4000df1c <__errno> 40019c9c: b0 10 3f ff mov -1, %i0 40019ca0: 82 10 20 09 mov 9, %g1 40019ca4: c2 22 00 00 st %g1, [ %o0 ] 40019ca8: 81 c7 e0 08 ret 40019cac: 81 e8 00 00 restore rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40019cb0: 7f ff d0 9b call 4000df1c <__errno> <== NOT EXECUTED 40019cb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019cb8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40019cbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019cc0: 81 c7 e0 08 ret <== NOT EXECUTED 40019cc4: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019cc8: 7f ff d0 95 call 4000df1c <__errno> <== NOT EXECUTED 40019ccc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019cd0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40019cd4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019cd8: 81 c7 e0 08 ret <== NOT EXECUTED 40019cdc: 81 e8 00 00 restore <== NOT EXECUTED 4002b1b8 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 4002b1b8: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 4002b1bc: 80 a6 60 00 cmp %i1, 0 4002b1c0: 02 80 00 2b be 4002b26c 4002b1c4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 4002b1c8: 40 00 7d 40 call 4004a6c8 4002b1cc: 90 10 00 18 mov %i0, %o0 4002b1d0: a0 07 bf ec add %fp, -20, %l0 4002b1d4: 92 10 00 08 mov %o0, %o1 4002b1d8: 94 10 20 00 clr %o2 4002b1dc: 90 10 00 18 mov %i0, %o0 4002b1e0: 96 10 00 10 mov %l0, %o3 4002b1e4: 98 10 20 00 clr %o4 4002b1e8: 7f ff 6f bf call 400070e4 4002b1ec: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 4002b1f0: 80 a2 20 00 cmp %o0, 0 4002b1f4: 12 80 00 1c bne 4002b264 4002b1f8: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 4002b1fc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4002b200: 80 a0 60 00 cmp %g1, 0 4002b204: 22 80 00 31 be,a 4002b2c8 4002b208: 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 ){ 4002b20c: 9f c0 40 00 call %g1 4002b210: 90 10 00 10 mov %l0, %o0 4002b214: 80 a2 20 04 cmp %o0, 4 4002b218: 12 80 00 1b bne 4002b284 4002b21c: 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 ){ 4002b220: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 4002b224: 80 a0 60 00 cmp %g1, 0 4002b228: 02 80 00 27 be 4002b2c4 4002b22c: 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 ); 4002b230: 94 10 00 1a mov %i2, %o2 4002b234: 9f c0 40 00 call %g1 4002b238: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002b23c: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002b240: 80 a0 60 00 cmp %g1, 0 4002b244: 02 80 00 08 be 4002b264 4002b248: b0 10 00 08 mov %o0, %i0 4002b24c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002b250: 80 a0 60 00 cmp %g1, 0 4002b254: 02 80 00 26 be 4002b2ec 4002b258: 01 00 00 00 nop 4002b25c: 9f c0 40 00 call %g1 4002b260: 90 10 00 10 mov %l0, %o0 return result; } 4002b264: 81 c7 e0 08 ret 4002b268: 81 e8 00 00 restore { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 4002b26c: 40 00 61 ec call 40043a1c <__errno> <== NOT EXECUTED 4002b270: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b274: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002b278: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b27c: 81 c7 e0 08 ret <== NOT EXECUTED 4002b280: 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 ); 4002b284: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002b288: 80 a0 60 00 cmp %g1, 0 4002b28c: 02 80 00 08 be 4002b2ac 4002b290: 01 00 00 00 nop 4002b294: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002b298: 80 a0 60 00 cmp %g1, 0 4002b29c: 02 80 00 04 be 4002b2ac 4002b2a0: 01 00 00 00 nop 4002b2a4: 9f c0 40 00 call %g1 4002b2a8: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 4002b2ac: 40 00 61 dc call 40043a1c <__errno> 4002b2b0: b0 10 3f ff mov -1, %i0 4002b2b4: 82 10 20 16 mov 0x16, %g1 4002b2b8: c2 22 00 00 st %g1, [ %o0 ] 4002b2bc: 81 c7 e0 08 ret 4002b2c0: 81 e8 00 00 restore } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 4002b2c4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002b2c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b2cc: 02 80 00 04 be 4002b2dc <== NOT EXECUTED 4002b2d0: 01 00 00 00 nop <== NOT EXECUTED 4002b2d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b2d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002b2dc: 40 00 61 d0 call 40043a1c <__errno> <== NOT EXECUTED 4002b2e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b2e4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002b2e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b2ec: 81 c7 e0 08 ret <== NOT EXECUTED 4002b2f0: 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 81 sethi %hi(0x40020400), %g1 40004798: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 40020464 4000479c: 80 a6 00 01 cmp %i0, %g1 400047a0: 1a 80 00 4a bcc 400048c8 400047a4: 03 10 00 84 sethi %hi(0x40021000), %g1 iop = rtems_libio_iop( fd ); 400047a8: e4 00 63 fc ld [ %g1 + 0x3fc ], %l2 ! 400213fc 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 30 11 call 400108f4 <__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 30 0b call 400108f4 <__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 30 03 call 400108f4 <__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 40019d64 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 40019d64: 9d e3 bf 98 save %sp, -104, %sp 40019d68: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40019d6c: a0 14 22 38 or %l0, 0x238, %l0 ! 4001be38 40019d70: 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())) { 40019d74: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019d78: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 4001c1a0 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 40019d7c: 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())) { 40019d80: 80 a0 60 03 cmp %g1, 3 40019d84: 02 80 00 36 be 40019e5c 40019d88: c4 24 20 10 st %g2, [ %l0 + 0x10 ] } /* * Continue with realloc(). */ if ( !ptr ) 40019d8c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40019d90: 02 80 00 3e be 40019e88 40019d94: 80 a6 60 00 cmp %i1, 0 return malloc( size ); if ( !size ) { 40019d98: 02 80 00 11 be 40019ddc 40019d9c: 23 10 00 6d sethi %hi(0x4001b400), %l1 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 40019da0: d0 04 62 70 ld [ %l1 + 0x270 ], %o0 ! 4001b670 40019da4: 92 10 00 18 mov %i0, %o1 40019da8: 40 00 00 75 call 40019f7c <_Protected_heap_Get_block_size> 40019dac: 94 07 bf fc add %fp, -4, %o2 40019db0: 80 8a 20 ff btst 0xff, %o0 40019db4: 02 80 00 0f be 40019df0 40019db8: d0 04 62 70 ld [ %l1 + 0x270 ], %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 ) ) { 40019dbc: 92 10 00 18 mov %i0, %o1 40019dc0: 40 00 00 7c call 40019fb0 <_Protected_heap_Resize_block> 40019dc4: 94 10 00 19 mov %i1, %o2 40019dc8: 80 8a 20 ff btst 0xff, %o0 40019dcc: 02 80 00 0f be 40019e08 40019dd0: 01 00 00 00 nop memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 40019dd4: 81 c7 e0 08 ret 40019dd8: 81 e8 00 00 restore */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 40019ddc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019de0: 7f ff c3 0e call 4000aa18 <== NOT EXECUTED 40019de4: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 40019de8: 81 c7 e0 08 ret <== NOT EXECUTED 40019dec: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 40019df0: 7f ff d0 4b call 4000df1c <__errno> 40019df4: b0 10 20 00 clr %i0 40019df8: 82 10 20 16 mov 0x16, %g1 40019dfc: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 40019e00: 81 c7 e0 08 ret 40019e04: 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 ); 40019e08: 7f ff c4 7c call 4000aff8 40019e0c: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 40019e10: 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 ); 40019e14: a2 10 00 08 mov %o0, %l1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 40019e18: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 40019e1c: 80 a2 20 00 cmp %o0, 0 40019e20: 02 80 00 18 be 40019e80 40019e24: c2 24 20 04 st %g1, [ %l0 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 40019e28: c2 07 bf fc ld [ %fp + -4 ], %g1 40019e2c: 80 a6 40 01 cmp %i1, %g1 40019e30: 08 80 00 03 bleu 40019e3c 40019e34: 94 10 00 19 mov %i1, %o2 40019e38: 94 10 00 01 mov %g1, %o2 40019e3c: 92 10 00 18 mov %i0, %o1 40019e40: 7f ff d2 72 call 4000e808 40019e44: 90 10 00 11 mov %l1, %o0 free( ptr ); 40019e48: 90 10 00 18 mov %i0, %o0 40019e4c: 7f ff c2 f3 call 4000aa18 40019e50: b0 10 00 11 mov %l1, %i0 return new_area; 40019e54: 81 c7 e0 08 ret 40019e58: 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) 40019e5c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019e60: c2 00 60 00 ld [ %g1 ], %g1 40019e64: 80 a0 60 00 cmp %g1, 0 40019e68: 12 80 00 06 bne 40019e80 40019e6c: 03 10 00 70 sethi %hi(0x4001c000), %g1 return (void *) 0; if (_ISR_Nest_level > 0) 40019e70: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 ! 4001c098 <_ISR_Nest_level> 40019e74: 80 a0 60 00 cmp %g1, 0 40019e78: 02 bf ff c6 be 40019d90 40019e7c: 80 a6 20 00 cmp %i0, 0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 40019e80: 81 c7 e0 08 ret 40019e84: 91 e8 20 00 restore %g0, 0, %o0 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 40019e88: 7f ff c4 5c call 4000aff8 40019e8c: 90 10 00 19 mov %i1, %o0 40019e90: 81 c7 e0 08 ret 40019e94: 91 e8 00 08 restore %g0, %o0, %o0 40008834 : #include int rmdir( const char *pathname ) { 40008834: 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 ); 40008838: 7f ff f9 ca call 40006f60 4000883c: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 40008840: a0 92 20 00 orcc %o0, 0, %l0 40008844: 32 80 00 95 bne,a 40008a98 40008848: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 4000884c: c2 4e 00 00 ldsb [ %i0 ], %g1 40008850: 80 a0 60 5c cmp %g1, 0x5c 40008854: 02 80 00 13 be 400088a0 40008858: 80 a0 60 2f cmp %g1, 0x2f 4000885c: 02 80 00 11 be 400088a0 40008860: 80 a0 60 00 cmp %g1, 0 40008864: 02 80 00 10 be 400088a4 <== NOT EXECUTED 40008868: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 4000886c: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED 40008870: a2 10 20 00 clr %l1 <== NOT EXECUTED 40008874: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40008878: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 4000887c: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 40008880: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 40008884: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 40008888: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED 4000888c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40008890: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED 40008894: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40008898: 10 80 00 0f b 400088d4 <== NOT EXECUTED 4000889c: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED 400088a0: 03 10 01 a5 sethi %hi(0x40069400), %g1 400088a4: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 400088a8: a2 10 20 00 clr %l1 400088ac: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 400088b0: c4 27 bf ec st %g2, [ %fp + -20 ] 400088b4: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 400088b8: c4 27 bf f0 st %g2, [ %fp + -16 ] 400088bc: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 400088c0: c4 27 bf f4 st %g2, [ %fp + -12 ] 400088c4: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 400088c8: c4 27 bf f8 st %g2, [ %fp + -8 ] 400088cc: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 400088d0: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400088d4: c2 07 bf ec ld [ %fp + -20 ], %g1 name = pathname + parentpathlen; 400088d8: b0 06 00 10 add %i0, %l0, %i0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400088dc: c2 27 bf d8 st %g1, [ %fp + -40 ] 400088e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 400088e4: 90 10 00 18 mov %i0, %o0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400088e8: c2 27 bf dc st %g1, [ %fp + -36 ] 400088ec: 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 ), 400088f0: a0 07 bf d8 add %fp, -40, %l0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 400088f4: c2 27 bf e0 st %g1, [ %fp + -32 ] 400088f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 400088fc: c2 27 bf e4 st %g1, [ %fp + -28 ] 40008900: c2 07 bf fc ld [ %fp + -4 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40008904: 40 01 07 71 call 4004a6c8 40008908: c2 27 bf e8 st %g1, [ %fp + -24 ] 4000890c: 92 10 00 08 mov %o0, %o1 40008910: 7f ff f9 75 call 40006ee4 40008914: 90 10 00 18 mov %i0, %o0 40008918: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000891c: 40 01 07 6b call 4004a6c8 40008920: 90 10 00 18 mov %i0, %o0 40008924: 94 10 20 00 clr %o2 40008928: 92 10 00 08 mov %o0, %o1 4000892c: 96 10 00 10 mov %l0, %o3 40008930: 90 10 00 18 mov %i0, %o0 40008934: 7f ff f9 ab call 40006fe0 40008938: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000893c: 80 a2 20 00 cmp %o0, 0 40008940: 12 80 00 2a bne 400089e8 40008944: c4 07 bf e4 ld [ %fp + -28 ], %g2 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40008948: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000894c: 80 a0 60 00 cmp %g1, 0 40008950: 22 80 00 78 be,a 40008b30 40008954: 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 ){ 40008958: 9f c0 40 00 call %g1 4000895c: 90 10 00 10 mov %l0, %o0 40008960: 80 a2 20 01 cmp %o0, 1 40008964: 12 80 00 26 bne 400089fc 40008968: c2 07 bf e0 ld [ %fp + -32 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 4000896c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40008970: 80 a0 60 00 cmp %g1, 0 40008974: 02 80 00 53 be 40008ac0 40008978: 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 ); 4000897c: 92 10 00 10 mov %l0, %o1 40008980: 9f c0 40 00 call %g1 40008984: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 40008988: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000898c: 80 a0 60 00 cmp %g1, 0 40008990: 02 80 00 08 be 400089b0 40008994: b0 10 00 08 mov %o0, %i0 40008998: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000899c: 80 a0 60 00 cmp %g1, 0 400089a0: 02 80 00 05 be 400089b4 400089a4: 80 8c 60 ff btst 0xff, %l1 400089a8: 9f c0 40 00 call %g1 400089ac: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 400089b0: 80 8c 60 ff btst 0xff, %l1 400089b4: 02 80 00 0b be 400089e0 400089b8: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 400089bc: 80 a0 60 00 cmp %g1, 0 400089c0: 02 80 00 5a be 40008b28 400089c4: 01 00 00 00 nop 400089c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400089cc: 80 a0 60 00 cmp %g1, 0 400089d0: 02 80 00 56 be 40008b28 400089d4: 01 00 00 00 nop 400089d8: 9f c0 40 00 call %g1 400089dc: 90 10 00 12 mov %l2, %o0 400089e0: 81 c7 e0 08 ret 400089e4: 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 ) 400089e8: 80 8c 60 ff btst 0xff, %l1 400089ec: 12 80 00 20 bne 40008a6c 400089f0: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 400089f4: 81 c7 e0 08 ret 400089f8: 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 ); 400089fc: c2 07 bf e4 ld [ %fp + -28 ], %g1 40008a00: 80 a0 60 00 cmp %g1, 0 40008a04: 02 80 00 09 be 40008a28 40008a08: 80 8c 60 ff btst 0xff, %l1 40008a0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40008a10: 80 a0 60 00 cmp %g1, 0 40008a14: 02 80 00 05 be 40008a28 40008a18: 80 8c 60 ff btst 0xff, %l1 40008a1c: 9f c0 40 00 call %g1 40008a20: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40008a24: 80 8c 60 ff btst 0xff, %l1 40008a28: 02 80 00 0b be 40008a54 40008a2c: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40008a30: 80 a0 60 00 cmp %g1, 0 40008a34: 02 80 00 08 be 40008a54 40008a38: 01 00 00 00 nop 40008a3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40008a40: 80 a0 60 00 cmp %g1, 0 40008a44: 02 80 00 04 be 40008a54 40008a48: 01 00 00 00 nop 40008a4c: 9f c0 40 00 call %g1 40008a50: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40008a54: 40 00 eb f2 call 40043a1c <__errno> 40008a58: b0 10 3f ff mov -1, %i0 40008a5c: 82 10 20 14 mov 0x14, %g1 40008a60: c2 22 00 00 st %g1, [ %o0 ] 40008a64: 81 c7 e0 08 ret 40008a68: 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 ); 40008a6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008a70: 02 bf ff dc be 400089e0 <== NOT EXECUTED 40008a74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008a78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008a7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008a80: 02 bf ff d8 be 400089e0 <== NOT EXECUTED 40008a84: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 40008a88: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008a8c: 01 00 00 00 nop <== NOT EXECUTED 40008a90: 81 c7 e0 08 ret <== NOT EXECUTED 40008a94: 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, 40008a98: 92 10 00 10 mov %l0, %o1 40008a9c: 94 10 20 02 mov 2, %o2 40008aa0: 96 07 bf ec add %fp, -20, %o3 40008aa4: 7f ff f9 90 call 400070e4 40008aa8: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 40008aac: 80 a2 20 00 cmp %o0, 0 40008ab0: 12 bf ff d1 bne 400089f4 40008ab4: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40008ab8: 10 bf ff 88 b 400088d8 40008abc: 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 ); 40008ac0: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 40008ac4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008ac8: 02 80 00 09 be 40008aec <== NOT EXECUTED 40008acc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40008ad0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008ad4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008ad8: 02 80 00 05 be 40008aec <== NOT EXECUTED 40008adc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40008ae0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008ae4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 40008ae8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40008aec: 02 80 00 0b be 40008b18 <== NOT EXECUTED 40008af0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 40008af4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008af8: 02 80 00 08 be 40008b18 <== NOT EXECUTED 40008afc: 01 00 00 00 nop <== NOT EXECUTED 40008b00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008b04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008b08: 02 80 00 04 be 40008b18 <== NOT EXECUTED 40008b0c: 01 00 00 00 nop <== NOT EXECUTED 40008b10: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008b14: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40008b18: 40 00 eb c1 call 40043a1c <__errno> <== NOT EXECUTED 40008b1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008b20: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40008b24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008b28: 81 c7 e0 08 ret <== NOT EXECUTED 40008b2c: 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 ); 40008b30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008b34: 12 bf ff eb bne 40008ae0 <== NOT EXECUTED 40008b38: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40008b3c: 30 bf ff ec b,a 40008aec <== NOT EXECUTED 40014ddc : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 40014ddc: 11 10 00 9c sethi %hi(0x40027000), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40014de0: 81 c3 e0 08 retl <== NOT EXECUTED 40014de4: 90 12 22 98 or %o0, 0x298, %o0 ! 40027298 <== NOT EXECUTED 40011b14 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40011b14: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40011b18: 90 10 00 18 mov %i0, %o0 40011b1c: 40 00 00 0b call 40011b48 40011b20: 92 10 00 19 mov %i1, %o1 if (nap) 40011b24: 80 a2 20 00 cmp %o0, 0 40011b28: 02 80 00 05 be 40011b3c 40011b2c: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 40011b30: f0 02 00 00 ld [ %o0 ], %i0 40011b34: 81 c7 e0 08 ret 40011b38: 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); 40011b3c: 40 00 0c a8 call 40014ddc <== NOT EXECUTED 40011b40: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40011b44: 01 00 00 00 nop 4000de6c : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000de6c: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000de70: d0 06 00 00 ld [ %i0 ], %o0 4000de74: 80 a2 20 00 cmp %o0, 0 4000de78: 02 80 00 1d be 4000deec 4000de7c: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000de80: 40 00 03 8d call 4000ecb4 4000de84: 92 12 62 80 or %o1, 0x280, %o1 ! 4001ae80 <__FUNCTION__.5876+0x18> 4000de88: 80 a2 20 00 cmp %o0, 0 4000de8c: 02 80 00 11 be 4000ded0 4000de90: 84 10 20 00 clr %g2 default_ap = ap++; for ( ; ap->name; ap++) if (ap->local_value == local_value) 4000de94: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000de98: 80 a0 40 19 cmp %g1, %i1 4000de9c: 32 80 00 07 bne,a 4000deb8 4000dea0: b0 06 20 0c add %i0, 0xc, %i0 4000dea4: 30 80 00 14 b,a 4000def4 4000dea8: 80 a0 40 19 cmp %g1, %i1 4000deac: 02 80 00 12 be 4000def4 4000deb0: 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++) 4000deb4: b0 06 20 0c add %i0, 0xc, %i0 4000deb8: c2 06 00 00 ld [ %i0 ], %g1 4000debc: 80 a0 60 00 cmp %g1, 0 4000dec0: 32 bf ff fa bne,a 4000dea8 4000dec4: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (ap->local_value == local_value) return ap; return default_ap; } 4000dec8: 81 c7 e0 08 ret 4000decc: 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++) 4000ded0: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 4000ded4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000ded8: 02 80 00 07 be 4000def4 <== NOT EXECUTED 4000dedc: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED 4000dee0: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000dee4: 10 bf ff ec b 4000de94 <== NOT EXECUTED 4000dee8: 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)) 4000deec: 81 c7 e0 08 ret <== NOT EXECUTED 4000def0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000def4: 81 c7 e0 08 ret 4000def8: 81 e8 00 00 restore 4000d094 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000d094: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000d098: d0 06 00 00 ld [ %i0 ], %o0 4000d09c: 80 a2 20 00 cmp %o0, 0 4000d0a0: 02 80 00 1d be 4000d114 4000d0a4: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000d0a8: 40 00 07 03 call 4000ecb4 4000d0ac: 92 12 62 80 or %o1, 0x280, %o1 ! 4001ae80 <__FUNCTION__.5876+0x18> 4000d0b0: 80 a2 20 00 cmp %o0, 0 4000d0b4: 02 80 00 11 be 4000d0f8 4000d0b8: 84 10 20 00 clr %g2 default_ap = ap++; for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4000d0bc: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000d0c0: 80 a0 40 19 cmp %g1, %i1 4000d0c4: 32 80 00 07 bne,a 4000d0e0 4000d0c8: b0 06 20 0c add %i0, 0xc, %i0 4000d0cc: 30 80 00 14 b,a 4000d11c 4000d0d0: 80 a0 40 19 cmp %g1, %i1 4000d0d4: 02 80 00 12 be 4000d11c 4000d0d8: 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++) 4000d0dc: b0 06 20 0c add %i0, 0xc, %i0 4000d0e0: c2 06 00 00 ld [ %i0 ], %g1 4000d0e4: 80 a0 60 00 cmp %g1, 0 4000d0e8: 32 bf ff fa bne,a 4000d0d0 4000d0ec: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000d0f0: 81 c7 e0 08 ret 4000d0f4: 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++) 4000d0f8: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 4000d0fc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d100: 02 80 00 07 be 4000d11c <== NOT EXECUTED 4000d104: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED 4000d108: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000d10c: 10 bf ff ec b 4000d0bc <== NOT EXECUTED 4000d110: 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)) 4000d114: 81 c7 e0 08 ret <== NOT EXECUTED 4000d118: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000d11c: 81 c7 e0 08 ret 4000d120: 81 e8 00 00 restore 4000db08 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000db08: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000db0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000db10: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000db14: 40 00 00 d6 call 4000de6c <== NOT EXECUTED 4000db18: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000db1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000db20: 32 80 00 02 bne,a 4000db28 <== NOT EXECUTED 4000db24: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000db28: 81 c7 e0 08 ret <== NOT EXECUTED 4000db2c: 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 33 34 call 4000ef6c <== 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 d7 call 4000839c <_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 a9 sethi %hi(0x4002a400), %o0 40002c54: 94 10 00 14 mov %l4, %o2 40002c58: 40 00 20 30 call 4000ad18 <_Timespec_Subtract> 40002c5c: 90 12 22 4c or %o0, 0x24c, %o0 } } } #endif (*print)( 40002c60: 90 10 00 18 mov %i0, %o0 40002c64: 13 10 00 7f sethi %hi(0x4001fc00), %o1 40002c68: 37 10 00 a8 sethi %hi(0x4002a000), %i3 40002c6c: 92 12 63 40 or %o1, 0x340, %o1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40002c70: 3b 10 00 80 sethi %hi(0x40020000), %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 a9 sethi %hi(0x4002a400), %l7 } } } #endif (*print)( 40002c78: 9f c6 40 00 call %i1 40002c7c: 2d 10 00 80 sethi %hi(0x40020000), %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 e2 f4 or %i3, 0x2f4, %i3 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40002c88: ba 17 60 b8 or %i5, 0xb8, %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 e0 4c or %l7, 0x4c, %l7 /* * Print the information */ (*print)( context, 40002c90: ac 15 a0 d0 or %l6, 0xd0, %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 7b call 4000aad0 <_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 67 3c call 4001c9e0 <.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 a9 sethi %hi(0x4002a400), %o0 40002da8: 40 00 1f dc call 4000ad18 <_Timespec_Subtract> 40002dac: 90 12 20 54 or %o0, 0x54, %o0 ! 4002a454 <_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 2e call 4000aa6c <_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 <== NOT EXECUTED " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 40002dc8: 03 10 00 a8 sethi %hi(0x4002a000), %g1 40002dcc: 82 10 63 04 or %g1, 0x304, %g1 ! 4002a304 <_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 67 00 call 4001c9e0 <.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 80 sethi %hi(0x40020000), %o1 40002df4: 90 10 00 18 mov %i0, %o0 40002df8: 9f c6 40 00 call %i1 40002dfc: 92 12 60 e8 or %o1, 0xe8, %o1 40002e00: 81 c7 e0 08 ret 40002e04: 81 e8 00 00 restore 4000dad4 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4000dad4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000dad8: 11 10 00 6b sethi %hi(0x4001ac00), %o0 <== NOT EXECUTED 4000dadc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000dae0: 40 00 00 0a call 4000db08 <== NOT EXECUTED 4000dae4: 90 12 23 2c or %o0, 0x32c, %o0 <== NOT EXECUTED 4000dae8: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000daec: 02 80 00 05 be 4000db00 <== NOT EXECUTED 4000daf0: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000daf4: 40 00 01 0a call 4000df1c <__errno> <== NOT EXECUTED 4000daf8: 01 00 00 00 nop <== NOT EXECUTED 4000dafc: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000db00: 81 c7 e0 08 ret <== NOT EXECUTED 4000db04: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40007934 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 40007934: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40007938: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 4000793c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40007940: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40007944: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40007948: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 4000794c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007950: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40007954: 7f ff ff 7e call 4000774c <== NOT EXECUTED 40007958: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 4000795c: 81 c7 e0 08 ret <== NOT EXECUTED 40007960: 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 33 64 call 4000edf8 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 6d sethi %hi(0x4001b400), %g1 40002220: 03 10 00 6d sethi %hi(0x4001b400), %g1 40002224: c4 00 63 78 ld [ %g1 + 0x378 ], %g2 ! 4001b778 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 63 78 ld [ %g1 + 0x378 ], %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 2f 1e call 4000df1c <__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 2f 18 call 4000df1c <__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 2f 5f call 4000df1c <__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 2f 59 call 4000df1c <__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 2f 53 call 4000df1c <__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 6d sethi %hi(0x4001b400), %l0 40001e94: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 ! 4001b778 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 69 sethi %hi(0x4001a400), %g1 40001ea8: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 4001a4fc 40001eac: 80 a0 60 00 cmp %g1, 0 40001eb0: 02 80 00 45 be 40001fc4 40001eb4: 03 10 00 6d sethi %hi(0x4001b400), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 40001eb8: c2 00 62 6c ld [ %g1 + 0x26c ], %g1 ! 4001b66c 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 23 78 ld [ %l0 + 0x378 ], %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 6a sethi %hi(0x4001a800), %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 61 40 or %l1, 0x140, %o0 rtems_filesystem_root = loc; 40001f30: c2 04 23 78 ld [ %l0 + 0x378 ], %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 61 40 or %l1, 0x140, %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 23 78 ld [ %l0 + 0x378 ], %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 6a sethi %hi(0x4001a800), %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 21 48 or %o0, 0x148, %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 4d call 400060fc <== 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 4b call 400060fc <== 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 48 call 400060fc <== NOT EXECUTED 40001fe0: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 40001fe4: 01 00 00 00 nop 4000ae7c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4000ae7c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000ae80: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 4000ae84: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 4000ae88: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4000ae8c: 81 c3 e0 08 retl <== NOT EXECUTED 4000ae90: 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 34 3e call 4000edf8 <== 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 30 61 call 4000df1c <__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 34 0f call 4000edf8 <== 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 40007fb8 : 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 ) { 40007fb8: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40007fbc: 03 10 00 88 sethi %hi(0x40022000), %g1 40007fc0: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 400222b8 <_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; 40007fc4: 09 10 00 89 sethi %hi(0x40022400), %g4 if ( rtems_interrupt_is_in_progress() ) 40007fc8: 80 a0 60 00 cmp %g1, 0 40007fcc: 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 ) { 40007fd0: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40007fd4: 12 80 00 49 bne 400080f8 40007fd8: c6 01 21 20 ld [ %g4 + 0x120 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 40007fdc: 80 a6 a0 00 cmp %i2, 0 40007fe0: 02 80 00 4b be 4000810c 40007fe4: 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 ) 40007fe8: 02 80 00 49 be 4000810c 40007fec: 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; 40007ff0: c4 06 40 00 ld [ %i1 ], %g2 40007ff4: 80 a0 a0 00 cmp %g2, 0 40007ff8: 22 80 00 42 be,a 40008100 40007ffc: 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 ) 40008000: 80 a0 c0 18 cmp %g3, %i0 40008004: 08 80 00 3d bleu 400080f8 40008008: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000800c: 05 10 00 88 sethi %hi(0x40022000), %g2 40008010: c6 00 a2 20 ld [ %g2 + 0x220 ], %g3 ! 40022220 <_Thread_Dispatch_disable_level> 40008014: 86 00 e0 01 inc %g3 40008018: c6 20 a2 20 st %g3, [ %g2 + 0x220 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 4000801c: 80 a6 20 00 cmp %i0, 0 40008020: 12 80 00 2b bne 400080cc 40008024: 05 10 00 89 sethi %hi(0x40022400), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 40008028: da 01 21 20 ld [ %g4 + 0x120 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 4000802c: 80 a3 60 00 cmp %o5, 0 40008030: 02 80 00 3a be 40008118 40008034: d8 00 a1 24 ld [ %g2 + 0x124 ], %o4 40008038: 10 80 00 05 b 4000804c 4000803c: 86 10 00 0c mov %o4, %g3 40008040: 80 a3 40 18 cmp %o5, %i0 40008044: 08 80 00 0b bleu 40008070 40008048: 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; 4000804c: c8 00 c0 00 ld [ %g3 ], %g4 40008050: 80 a1 20 00 cmp %g4, 0 40008054: 32 bf ff fb bne,a 40008040 40008058: b0 06 20 01 inc %i0 4000805c: c8 00 e0 04 ld [ %g3 + 4 ], %g4 40008060: 80 a1 20 00 cmp %g4, 0 40008064: 32 bf ff f7 bne,a 40008040 40008068: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 4000806c: 80 a3 40 18 cmp %o5, %i0 40008070: 02 80 00 2b be 4000811c 40008074: f0 26 80 00 st %i0, [ %i2 ] 40008078: 85 2e 20 03 sll %i0, 3, %g2 4000807c: 87 2e 20 05 sll %i0, 5, %g3 40008080: 84 20 c0 02 sub %g3, %g2, %g2 40008084: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40008088: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4000808c: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40008090: c6 20 80 00 st %g3, [ %g2 ] 40008094: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40008098: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 4000809c: c6 20 a0 04 st %g3, [ %g2 + 4 ] 400080a0: c6 00 60 08 ld [ %g1 + 8 ], %g3 400080a4: c6 20 a0 08 st %g3, [ %g2 + 8 ] 400080a8: c6 00 60 0c ld [ %g1 + 0xc ], %g3 400080ac: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 400080b0: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 400080b4: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 400080b8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 400080bc: 40 00 07 0d call 40009cf0 <_Thread_Enable_dispatch> 400080c0: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 400080c4: 40 00 23 91 call 40010f08 400080c8: 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; 400080cc: c6 00 a1 24 ld [ %g2 + 0x124 ], %g3 400080d0: 89 2e 20 05 sll %i0, 5, %g4 400080d4: 85 2e 20 03 sll %i0, 3, %g2 400080d8: 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; 400080dc: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 400080e0: 80 a1 20 00 cmp %g4, 0 400080e4: 02 80 00 12 be 4000812c 400080e8: 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(); 400080ec: 40 00 07 01 call 40009cf0 <_Thread_Enable_dispatch> 400080f0: 01 00 00 00 nop 400080f4: 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 ); } 400080f8: 81 c7 e0 08 ret 400080fc: 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; 40008100: 80 a0 a0 00 cmp %g2, 0 40008104: 12 bf ff c0 bne 40008004 40008108: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4000810c: 84 10 20 09 mov 9, %g2 } 40008110: 81 c7 e0 08 ret 40008114: 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; 40008118: 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(); 4000811c: 40 00 06 f5 call 40009cf0 <_Thread_Enable_dispatch> 40008120: 01 00 00 00 nop return sc; 40008124: 10 bf ff f5 b 400080f8 40008128: 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; 4000812c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 40008130: 80 a0 e0 00 cmp %g3, 0 40008134: 12 bf ff ee bne 400080ec 40008138: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 4000813c: 10 bf ff d3 b 40008088 40008140: f0 26 80 00 st %i0, [ %i2 ] 400089ec : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 400089ec: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 400089f0: 80 a6 20 00 cmp %i0, 0 400089f4: 02 80 00 23 be 40008a80 400089f8: 25 10 00 a8 sethi %hi(0x4002a000), %l2 400089fc: a4 14 a2 f4 or %l2, 0x2f4, %l2 ! 4002a2f4 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 40008a00: a6 04 a0 10 add %l2, 0x10, %l3 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40008a04: c2 04 80 00 ld [ %l2 ], %g1 40008a08: 80 a0 60 00 cmp %g1, 0 40008a0c: 22 80 00 1a be,a 40008a74 40008a10: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40008a14: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( !information ) 40008a18: 80 a4 60 00 cmp %l1, 0 40008a1c: 22 80 00 16 be,a 40008a74 40008a20: a4 04 a0 04 add %l2, 4, %l2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40008a24: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40008a28: 84 90 60 00 orcc %g1, 0, %g2 40008a2c: 22 80 00 12 be,a 40008a74 40008a30: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 40008a34: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40008a38: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40008a3c: 83 2c 20 02 sll %l0, 2, %g1 40008a40: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( !the_thread ) 40008a44: 90 90 60 00 orcc %g1, 0, %o0 40008a48: 02 80 00 05 be 40008a5c 40008a4c: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40008a50: 9f c6 00 00 call %i0 40008a54: 01 00 00 00 nop 40008a58: c4 14 60 10 lduh [ %l1 + 0x10 ], %g2 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40008a5c: 83 28 a0 10 sll %g2, 0x10, %g1 40008a60: 83 30 60 10 srl %g1, 0x10, %g1 40008a64: 80 a0 40 10 cmp %g1, %l0 40008a68: 3a bf ff f5 bcc,a 40008a3c 40008a6c: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40008a70: a4 04 a0 04 add %l2, 4, %l2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 40008a74: 80 a4 80 13 cmp %l2, %l3 40008a78: 32 bf ff e4 bne,a 40008a08 40008a7c: c2 04 80 00 ld [ %l2 ], %g1 40008a80: 81 c7 e0 08 ret 40008a84: 81 e8 00 00 restore 4000ae28 : * 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 ) { 4000ae28: 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 ); 4000ae2c: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000ae30: d0 04 22 30 ld [ %l0 + 0x230 ], %o0 ! 4001be30 4000ae34: 92 10 20 00 clr %o1 4000ae38: 7f ff eb 04 call 40005a48 4000ae3c: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000ae40: 23 10 00 6f sethi %hi(0x4001bc00), %l1 4000ae44: c2 04 62 2c ld [ %l1 + 0x22c ], %g1 ! 4001be2c 4000ae48: 80 a0 60 00 cmp %g1, 0 4000ae4c: 12 80 00 07 bne 4000ae68 4000ae50: 05 10 00 6f sethi %hi(0x4001bc00), %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; 4000ae54: b0 10 20 00 clr %i0 failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000ae58: 7f ff eb 43 call 40005b64 4000ae5c: d0 04 22 30 ld [ %l0 + 0x230 ], %o0 return iop; } 4000ae60: 81 c7 e0 08 ret 4000ae64: 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( 4000ae68: c4 00 a2 28 ld [ %g2 + 0x228 ], %g2 4000ae6c: 92 10 20 01 mov 1, %o1 4000ae70: 82 20 40 02 sub %g1, %g2, %g1 4000ae74: 83 38 60 03 sra %g1, 3, %g1 4000ae78: 87 28 60 06 sll %g1, 6, %g3 4000ae7c: 85 28 60 03 sll %g1, 3, %g2 4000ae80: 84 20 c0 02 sub %g3, %g2, %g2 4000ae84: 87 28 a0 06 sll %g2, 6, %g3 4000ae88: 84 00 80 03 add %g2, %g3, %g2 4000ae8c: 84 00 80 01 add %g2, %g1, %g2 4000ae90: 87 28 a0 0f sll %g2, 0xf, %g3 4000ae94: 84 20 c0 02 sub %g3, %g2, %g2 4000ae98: 07 13 10 92 sethi %hi(0x4c424800), %g3 4000ae9c: 85 28 a0 03 sll %g2, 3, %g2 4000aea0: 86 10 e1 00 or %g3, 0x100, %g3 4000aea4: 82 00 80 01 add %g2, %g1, %g1 4000aea8: 94 10 20 54 mov 0x54, %o2 4000aeac: 96 10 20 00 clr %o3 4000aeb0: 90 10 40 03 or %g1, %g3, %o0 4000aeb4: 7f ff ea 44 call 400057c4 4000aeb8: 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) 4000aebc: 80 a2 20 00 cmp %o0, 0 4000aec0: 32 bf ff e6 bne,a 4000ae58 4000aec4: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000aec8: f0 04 62 2c ld [ %l1 + 0x22c ], %i0 next = iop->data1; 4000aecc: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000aed0: c0 26 20 30 clr [ %i0 + 0x30 ] 4000aed4: c0 26 20 1c clr [ %i0 + 0x1c ] 4000aed8: c0 26 20 34 clr [ %i0 + 0x34 ] 4000aedc: c0 26 00 00 clr [ %i0 ] 4000aee0: c0 26 20 04 clr [ %i0 + 4 ] 4000aee4: c0 26 20 08 clr [ %i0 + 8 ] 4000aee8: c0 26 20 0c clr [ %i0 + 0xc ] 4000aeec: c0 26 20 10 clr [ %i0 + 0x10 ] 4000aef0: c0 26 20 14 clr [ %i0 + 0x14 ] 4000aef4: c0 26 20 20 clr [ %i0 + 0x20 ] 4000aef8: c0 26 20 24 clr [ %i0 + 0x24 ] 4000aefc: c0 26 20 28 clr [ %i0 + 0x28 ] 4000af00: c0 26 20 2c clr [ %i0 + 0x2c ] 4000af04: c0 26 20 40 clr [ %i0 + 0x40 ] 4000af08: c0 26 20 44 clr [ %i0 + 0x44 ] 4000af0c: c0 26 20 38 clr [ %i0 + 0x38 ] 4000af10: c0 26 20 3c clr [ %i0 + 0x3c ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4000af14: c2 24 62 2c st %g1, [ %l1 + 0x22c ] 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; 4000af18: 82 10 21 00 mov 0x100, %g1 4000af1c: c2 26 20 18 st %g1, [ %i0 + 0x18 ] iop->sem = sema; 4000af20: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_libio_iop_freelist = next; goto done; 4000af24: 10 bf ff cd b 4000ae58 4000af28: 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 6d sethi %hi(0x4001b400), %l0 400022dc: d0 04 22 64 ld [ %l0 + 0x264 ], %o0 ! 4001b664 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 86 call 4000a904 400022f0: 92 10 20 48 mov 0x48, %o1 400022f4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400022f8: d0 20 62 28 st %o0, [ %g1 + 0x228 ] ! 4001be28 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 22 64 ld [ %l0 + 0x264 ], %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 6f sethi %hi(0x4001bc00), %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 a2 2c st %o0, [ %g2 + 0x22c ] 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 6f sethi %hi(0x4001bc00), %o4 40002368: 40 00 0d 17 call 400057c4 4000236c: 98 13 22 30 or %o4, 0x230, %o4 ! 4001be30 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 6d sethi %hi(0x4001b400), %g1 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 4000237c: c2 00 62 60 ld [ %g1 + 0x260 ], %g1 ! 4001b660 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 58 call 400060fc <== 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 56 call 400060fc <== NOT EXECUTED 400023a8: 90 10 20 1a mov 0x1a, %o0 ! 1a <== NOT EXECUTED 400023ac: 01 00 00 00 nop 4002b054 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 4002b054: 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); 4002b058: 90 10 20 00 clr %o0 4002b05c: 92 10 20 00 clr %o1 4002b060: 40 00 04 90 call 4002c2a0 4002b064: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 4002b068: b0 92 20 00 orcc %o0, 0, %i0 4002b06c: 12 80 00 51 bne 4002b1b0 4002b070: 21 10 01 a5 sethi %hi(0x40069400), %l0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 4002b074: e6 04 21 08 ld [ %l0 + 0x108 ], %l3 ! 40069508 4002b078: 23 10 01 b4 sethi %hi(0x4006d000), %l1 4002b07c: a2 14 62 58 or %l1, 0x258, %l1 ! 4006d258 4002b080: 80 a4 c0 11 cmp %l3, %l1 4002b084: 02 80 00 3a be 4002b16c 4002b088: a4 14 21 08 or %l0, 0x108, %l2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 4002b08c: 92 10 00 11 mov %l1, %o1 4002b090: 94 10 20 48 mov 0x48, %o2 4002b094: 40 00 6f 35 call 40046d68 4002b098: 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; 4002b09c: 03 10 01 b4 sethi %hi(0x4006d000), %g1 4002b0a0: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 ! 4006d240 } 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*/ 4002b0a4: c6 07 bf fc ld [ %fp + -4 ], %g3 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002b0a8: 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*/ 4002b0ac: c6 24 c0 00 st %g3, [ %l3 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002b0b0: c4 24 e0 18 st %g2, [ %l3 + 0x18 ] 4002b0b4: 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); 4002b0b8: 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; 4002b0bc: c4 24 e0 1c st %g2, [ %l3 + 0x1c ] 4002b0c0: 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); 4002b0c4: 25 10 01 7e sethi %hi(0x4005f800), %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; 4002b0c8: c4 24 e0 20 st %g2, [ %l3 + 0x20 ] 4002b0cc: 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); 4002b0d0: 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; 4002b0d4: c4 24 e0 24 st %g2, [ %l3 + 0x24 ] 4002b0d8: 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); 4002b0dc: 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; 4002b0e0: 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); 4002b0e4: 96 10 00 11 mov %l1, %o3 4002b0e8: 98 10 20 00 clr %o4 4002b0ec: 7f ff 6f fe call 400070e4 4002b0f0: 90 14 a1 a8 or %l2, 0x1a8, %o0 rtems_filesystem_root = loc; 4002b0f4: c2 04 21 08 ld [ %l0 + 0x108 ], %g1 4002b0f8: c4 07 bf e8 ld [ %fp + -24 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b0fc: 90 14 a1 a8 or %l2, 0x1a8, %o0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4002b100: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 4002b104: c4 07 bf ec ld [ %fp + -20 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b108: 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; 4002b10c: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4002b110: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b114: 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; 4002b118: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4002b11c: c4 07 bf f4 ld [ %fp + -12 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b120: 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; 4002b124: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 4002b128: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002b12c: 98 10 20 00 clr %o4 4002b130: 7f ff 6f ed call 400070e4 4002b134: c4 20 60 28 st %g2, [ %g1 + 0x28 ] rtems_filesystem_current = loc; 4002b138: c4 07 bf e8 ld [ %fp + -24 ], %g2 4002b13c: c2 04 21 08 ld [ %l0 + 0x108 ], %g1 4002b140: c4 20 60 04 st %g2, [ %g1 + 4 ] 4002b144: c4 07 bf ec ld [ %fp + -20 ], %g2 4002b148: c4 20 60 08 st %g2, [ %g1 + 8 ] 4002b14c: c4 07 bf f0 ld [ %fp + -16 ], %g2 4002b150: c4 20 60 0c st %g2, [ %g1 + 0xc ] 4002b154: c4 07 bf f4 ld [ %fp + -12 ], %g2 4002b158: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 4002b15c: c4 07 bf f8 ld [ %fp + -8 ], %g2 4002b160: c4 20 60 14 st %g2, [ %g1 + 0x14 ] return RTEMS_SUCCESSFUL; } 4002b164: 81 c7 e0 08 ret 4002b168: 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)); 4002b16c: 90 10 20 48 mov 0x48, %o0 4002b170: 7f ff 71 ce call 400078a8 4002b174: b0 10 20 1a mov 0x1a, %i0 if (!tmp) 4002b178: a6 92 20 00 orcc %o0, 0, %l3 4002b17c: 02 80 00 0d be 4002b1b0 4002b180: 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); 4002b184: 90 10 20 00 clr %o0 4002b188: 15 10 00 ab sethi %hi(0x4002ac00), %o2 4002b18c: 40 00 05 5b call 4002c6f8 4002b190: 94 12 a3 20 or %o2, 0x320, %o2 ! 4002af20 if (sc != RTEMS_SUCCESSFUL) { 4002b194: b0 92 20 00 orcc %o0, 0, %i0 4002b198: 12 80 00 04 bne 4002b1a8 4002b19c: 01 00 00 00 nop * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 4002b1a0: 10 bf ff bb b 4002b08c 4002b1a4: e6 24 21 08 st %l3, [ %l0 + 0x108 ] 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); 4002b1a8: 7f ff 70 0a call 400071d0 <== NOT EXECUTED 4002b1ac: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return sc; 4002b1b0: 81 c7 e0 08 ret <== NOT EXECUTED 4002b1b4: 81 e8 00 00 restore <== NOT EXECUTED 4002af98 : * 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) { 4002af98: 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); 4002af9c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002afa0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002afa4: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 4002afa8: 40 00 04 be call 4002c2a0 <== NOT EXECUTED 4002afac: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002afb0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002afb4: 12 80 00 14 bne 4002b004 <== NOT EXECUTED 4002afb8: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 4002afbc: 21 10 01 a5 sethi %hi(0x40069400), %l0 <== NOT EXECUTED 4002afc0: e6 04 21 08 ld [ %l0 + 0x108 ], %l3 ! 40069508 <== NOT EXECUTED 4002afc4: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 4002afc8: c6 04 c0 00 ld [ %l3 ], %g3 <== NOT EXECUTED 4002afcc: 82 14 21 08 or %l0, 0x108, %g1 <== NOT EXECUTED 4002afd0: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 4002afd4: 02 80 00 0e be 4002b00c <== NOT EXECUTED 4002afd8: 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, 4002afdc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4002afe0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4002afe4: 40 00 06 23 call 4002c870 <== NOT EXECUTED 4002afe8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 4002afec: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002aff0: 02 80 00 10 be 4002b030 <== NOT EXECUTED 4002aff4: 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; 4002aff8: 05 10 01 b4 sethi %hi(0x4006d000), %g2 <== NOT EXECUTED 4002affc: 84 10 a2 58 or %g2, 0x258, %g2 ! 4006d258 <== NOT EXECUTED 4002b000: c4 24 21 08 st %g2, [ %l0 + 0x108 ] <== NOT EXECUTED return sc; } 4002b004: 81 c7 e0 08 ret <== NOT EXECUTED 4002b008: 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); 4002b00c: 40 00 05 eb call 4002c7b8 <== NOT EXECUTED 4002b010: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002b014: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002b018: 12 bf ff fb bne 4002b004 <== NOT EXECUTED 4002b01c: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 4002b020: 7f ff ff c0 call 4002af20 <== NOT EXECUTED 4002b024: 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, 4002b028: 10 bf ff ee b 4002afe0 <== NOT EXECUTED 4002b02c: 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); 4002b030: 15 10 00 ab sethi %hi(0x4002ac00), %o2 <== NOT EXECUTED 4002b034: 40 00 05 b1 call 4002c6f8 <== NOT EXECUTED 4002b038: 94 12 a3 20 or %o2, 0x320, %o2 ! 4002af20 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4002b03c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002b040: 12 bf ff ef bne 4002affc <== NOT EXECUTED 4002b044: 05 10 01 b4 sethi %hi(0x4006d000), %g2 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 4002b048: 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; 4002b04c: 10 bf ff ee b 4002b004 <== NOT EXECUTED 4002b050: c4 24 21 08 st %g2, [ %l0 + 0x108 ] <== NOT EXECUTED 400079ac : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 400079ac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 400079b0: 03 10 01 a4 sethi %hi(0x40069000), %g1 <== NOT EXECUTED 400079b4: d0 00 62 20 ld [ %g1 + 0x220 ], %o0 ! 40069220 <== NOT EXECUTED 400079b8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400079bc: 40 00 18 e6 call 4000dd54 <_Protected_heap_Get_block_size> <== NOT EXECUTED 400079c0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 400079c4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 400079c8: 02 80 00 08 be 400079e8 <== NOT EXECUTED 400079cc: 03 10 01 b4 sethi %hi(0x4006d000), %g1 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 400079d0: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 400079d4: 82 10 62 10 or %g1, 0x210, %g1 <== NOT EXECUTED 400079d8: c4 18 60 28 ldd [ %g1 + 0x28 ], %g2 <== NOT EXECUTED 400079dc: 86 80 c0 04 addcc %g3, %g4, %g3 <== NOT EXECUTED 400079e0: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 400079e4: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 400079e8: 81 c7 e0 08 ret <== NOT EXECUTED 400079ec: 81 e8 00 00 restore <== NOT EXECUTED 400079f0 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 400079f0: 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 ) 400079f4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400079f8: 02 80 00 14 be 40007a48 <== NOT EXECUTED 400079fc: 03 10 01 a4 sethi %hi(0x40069000), %g1 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 40007a00: d0 00 62 20 ld [ %g1 + 0x220 ], %o0 ! 40069220 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 40007a04: 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); 40007a08: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40007a0c: 40 00 18 d2 call 4000dd54 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40007a10: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 40007a14: 03 10 01 b4 sethi %hi(0x4006d000), %g1 <== NOT EXECUTED 40007a18: d8 07 bf fc ld [ %fp + -4 ], %o4 <== NOT EXECUTED 40007a1c: 82 10 62 10 or %g1, 0x210, %g1 <== NOT EXECUTED 40007a20: c4 18 60 20 ldd [ %g1 + 0x20 ], %g2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40007a24: da 00 60 2c ld [ %g1 + 0x2c ], %o5 <== NOT EXECUTED if (current_depth > s->max_depth) 40007a28: 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); 40007a2c: 86 80 c0 0c addcc %g3, %o4, %g3 <== NOT EXECUTED 40007a30: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 40007a34: c4 38 60 20 std %g2, [ %g1 + 0x20 ] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40007a38: 84 20 c0 0d sub %g3, %o5, %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40007a3c: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 40007a40: 38 80 00 02 bgu,a 40007a48 <== NOT EXECUTED 40007a44: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 40007a48: 81 c7 e0 08 ret <== NOT EXECUTED 40007a4c: 81 e8 00 00 restore <== NOT EXECUTED 40007a50 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40007a50: 03 10 01 b4 sethi %hi(0x4006d000), %g1 <== NOT EXECUTED 40007a54: c0 20 62 10 clr [ %g1 + 0x210 ] ! 4006d210 <== NOT EXECUTED 40007a58: c0 20 62 14 clr [ %g1 + 0x214 ] <== NOT EXECUTED 40007a5c: 82 10 62 10 or %g1, 0x210, %g1 <== NOT EXECUTED 40007a60: c0 20 60 28 clr [ %g1 + 0x28 ] <== NOT EXECUTED 40007a64: c0 20 60 2c clr [ %g1 + 0x2c ] <== NOT EXECUTED 40007a68: c0 20 60 08 clr [ %g1 + 8 ] <== NOT EXECUTED 40007a6c: c0 20 60 0c clr [ %g1 + 0xc ] <== NOT EXECUTED 40007a70: c0 20 60 10 clr [ %g1 + 0x10 ] <== NOT EXECUTED 40007a74: c0 20 60 14 clr [ %g1 + 0x14 ] <== NOT EXECUTED 40007a78: c0 20 60 18 clr [ %g1 + 0x18 ] <== NOT EXECUTED 40007a7c: c0 20 60 1c clr [ %g1 + 0x1c ] <== NOT EXECUTED 40007a80: c0 20 60 20 clr [ %g1 + 0x20 ] <== NOT EXECUTED } 40007a84: 81 c3 e0 08 retl <== NOT EXECUTED 40007a88: c0 20 60 24 clr [ %g1 + 0x24 ] <== NOT EXECUTED 40010594 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40010594: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40010598: a0 96 20 00 orcc %i0, 0, %l0 4001059c: 02 80 00 20 be 4001061c 400105a0: 03 10 00 88 sethi %hi(0x40022000), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 400105a4: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 400223c0 <_System_state_Current> 400105a8: 80 a0 60 03 cmp %g1, 3 400105ac: 02 80 00 17 be 40010608 400105b0: c0 24 00 00 clr [ %l0 ] /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 400105b4: 7f ff cd bc call 40003ca4 400105b8: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 400105bc: 03 10 00 85 sethi %hi(0x40021400), %g1 400105c0: d0 00 63 d0 ld [ %g1 + 0x3d0 ], %o0 ! 400217d0 400105c4: 94 10 00 19 mov %i1, %o2 400105c8: 92 10 00 1a mov %i2, %o1 400105cc: 7f ff e3 f8 call 400095ac <_Protected_heap_Allocate_aligned_with_boundary> 400105d0: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 400105d4: b2 92 20 00 orcc %o0, 0, %i1 400105d8: 02 80 00 12 be 40010620 400105dc: 03 10 00 87 sethi %hi(0x40021c00), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 400105e0: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 40021e18 400105e4: 80 a0 60 00 cmp %g1, 0 400105e8: 22 80 00 06 be,a 40010600 400105ec: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 400105f0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400105f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400105f8: 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; 400105fc: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 40010600: 81 c7 e0 08 ret 40010604: 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()) && 40010608: 7f ff cd 8e call 40003c40 4001060c: 01 00 00 00 nop 40010610: 80 8a 20 ff btst 0xff, %o0 40010614: 12 bf ff e8 bne 400105b4 40010618: 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; 4001061c: b0 10 20 16 mov 0x16, %i0 ! 16 } 40010620: 81 c7 e0 08 ret 40010624: 81 e8 00 00 restore 40007900 : void rtems_panic( const char *printf_format, ... ) { 40007900: 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); 40007904: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40007908: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 4000790c: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40007910: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40007914: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40007918: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 4000791c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40007920: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40007924: 7f ff ff 8a call 4000774c <== NOT EXECUTED 40007928: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 4000792c: 81 c7 e0 08 ret <== NOT EXECUTED 40007930: 81 e8 00 00 restore <== NOT EXECUTED 4000c414 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4000c414: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 4000c418: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000c41c: c2 08 60 94 ldub [ %g1 + 0x94 ], %g1 ! 4001bc94 4000c420: 80 a0 60 00 cmp %g1, 0 4000c424: 02 80 00 13 be 4000c470 4000c428: 19 10 00 6f sethi %hi(0x4001bc00), %o4 return; if (rtems_pipe_semaphore) 4000c42c: c2 03 21 b0 ld [ %o4 + 0x1b0 ], %g1 ! 4001bdb0 <== NOT EXECUTED 4000c430: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c434: 12 80 00 0f bne 4000c470 <== NOT EXECUTED 4000c438: 98 13 21 b0 or %o4, 0x1b0, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4000c43c: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 4000c440: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000c444: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 4000c448: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 4000c44c: 7f ff e4 de call 400057c4 <== NOT EXECUTED 4000c450: 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) 4000c454: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c458: 12 80 00 08 bne 4000c478 <== NOT EXECUTED 4000c45c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4000c460: 7f ff e3 b5 call 40005334 <== NOT EXECUTED 4000c464: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 4000c468: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000c46c: d0 30 61 b6 sth %o0, [ %g1 + 0x1b6 ] ! 4001bdb6 <== NOT EXECUTED 4000c470: 81 c7 e0 08 ret 4000c474: 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); 4000c478: 7f ff e7 21 call 400060fc <== NOT EXECUTED 4000c47c: 01 00 00 00 nop 4000c480: 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 b5 sethi %hi(0x4006d400), %l0 400054d8: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ! 4006d48c <_Thread_Executing> ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 400054dc: d0 00 60 c4 ld [ %g1 + 0xc4 ], %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 c0 ld [ %g1 + 0xc0 ], %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 a9 sethi %hi(0x4006a400), %g1 40005500: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 4006a6f0 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 b4 sethi %hi(0x4006d000), %o1 40005518: 94 10 20 10 mov 0x10, %o2 4000551c: 40 01 05 e2 call 40046ca4 40005520: 92 12 61 e0 or %o1, 0x1e0, %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 20 8c ld [ %l0 + 0x8c ], %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 d0 or %o1, 0x1d0, %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 a9 sethi %hi(0x4006a400), %l1 <== NOT EXECUTED print_handler = print; 400053bc: 21 10 01 a9 sethi %hi(0x4006a400), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 400053c0: f0 24 62 f4 st %i0, [ %l1 + 0x2f4 ] <== NOT EXECUTED print_handler = print; 400053c4: f2 24 22 f8 st %i1, [ %l0 + 0x2f8 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 400053c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400053cc: 13 10 01 7d sethi %hi(0x4005f400), %o1 <== NOT EXECUTED 400053d0: 9f c6 40 00 call %i1 <== NOT EXECUTED 400053d4: 92 12 63 20 or %o1, 0x320, %o1 ! 4005f720 <== NOT EXECUTED (*print)( context, 400053d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400053dc: 13 10 01 7d sethi %hi(0x4005f400), %o1 <== NOT EXECUTED 400053e0: 9f c6 40 00 call %i1 <== NOT EXECUTED 400053e4: 92 12 63 38 or %o1, 0x338, %o1 ! 4005f738 <== 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 1f e2 call 4000d374 <== 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 62 f4 clr [ %l1 + 0x2f4 ] <== NOT EXECUTED print_handler = NULL; 40005400: c0 24 22 f8 clr [ %l0 + 0x2f8 ] <== 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 c4 ld [ %i0 + 0xc4 ], %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 c0 ld [ %i0 + 0xc0 ], %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 b4 sethi %hi(0x4006d000), %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 b4 sethi %hi(0x4006d000), %o1 <== NOT EXECUTED 40005584: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40005588: 40 01 05 c7 call 40046ca4 <== NOT EXECUTED 4000558c: 92 12 61 e0 or %o1, 0x1e0, %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 61 e0 or %o1, 0x1e0, %o1 400055ac: 40 01 05 be call 40046ca4 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 4000c9b4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c9b4: 9d e3 bf 98 save %sp, -104, %sp 4000c9b8: a4 10 00 18 mov %i0, %l2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c9bc: 80 a6 60 00 cmp %i1, 0 4000c9c0: 02 80 00 1c be 4000ca30 4000c9c4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c9c8: 40 00 09 3c call 4000eeb8 <__errno> 4000c9cc: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000c9d0: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000c9d4: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c9d8: c0 26 40 00 clr [ %i1 ] 4000c9dc: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000c9e0: 40 00 14 ae call 40011c98 4000c9e4: 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 ) 4000c9e8: 80 a6 a0 00 cmp %i2, 0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000c9ec: 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 ) 4000c9f0: 02 80 00 1b be 4000ca5c 4000c9f4: a2 10 00 09 mov %o1, %l1 *endptr = end; 4000c9f8: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c9fc: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000ca00: 80 a0 40 12 cmp %g1, %l2 4000ca04: 02 80 00 0b be 4000ca30 4000ca08: 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)) 4000ca0c: 03 10 00 7c sethi %hi(0x4001f000), %g1 4000ca10: d4 18 62 58 ldd [ %g1 + 0x258 ], %o2 ! 4001f258 <_CPU_Trap_slot_template+0x14> 4000ca14: 90 10 00 10 mov %l0, %o0 4000ca18: 40 00 3c c6 call 4001bd30 <__gtdf2> 4000ca1c: 92 10 00 11 mov %l1, %o1 4000ca20: 80 a2 20 00 cmp %o0, 0 4000ca24: 14 80 00 05 bg 4000ca38 4000ca28: 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; 4000ca2c: e0 3e 40 00 std %l0, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000ca30: 81 c7 e0 08 ret 4000ca34: 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)) 4000ca38: 40 00 09 20 call 4000eeb8 <__errno> 4000ca3c: b0 10 20 0a mov 0xa, %i0 4000ca40: c2 02 00 00 ld [ %o0 ], %g1 4000ca44: 80 a0 60 22 cmp %g1, 0x22 4000ca48: 02 bf ff fa be 4000ca30 4000ca4c: 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; 4000ca50: e0 3e 40 00 std %l0, [ %i1 ] <== NOT EXECUTED 4000ca54: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca58: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ca5c: 10 bf ff e9 b 4000ca00 4000ca60: c2 07 bf fc ld [ %fp + -4 ], %g1 4000ca64 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000ca64: 9d e3 bf 98 save %sp, -104, %sp 4000ca68: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000ca6c: 80 a6 60 00 cmp %i1, 0 4000ca70: 02 80 00 19 be 4000cad4 4000ca74: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000ca78: 40 00 09 10 call 4000eeb8 <__errno> 4000ca7c: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000ca80: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000ca84: c0 22 00 00 clr [ %o0 ] *n = 0; 4000ca88: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000ca8c: 40 00 14 70 call 40011c4c 4000ca90: 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 ) 4000ca94: 80 a6 a0 00 cmp %i2, 0 4000ca98: 02 80 00 1a be 4000cb00 4000ca9c: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000caa0: c2 07 bf fc ld [ %fp + -4 ], %g1 4000caa4: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000caa8: 80 a0 40 10 cmp %g1, %l0 4000caac: 02 80 00 0a be 4000cad4 4000cab0: 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)) 4000cab4: 90 10 00 11 mov %l1, %o0 4000cab8: 13 1f df ff sethi %hi(0x7f7ffc00), %o1 4000cabc: 40 00 39 e5 call 4001b250 <__gtsf2> 4000cac0: 92 12 63 ff or %o1, 0x3ff, %o1 ! 7f7fffff 4000cac4: 80 a2 20 00 cmp %o0, 0 4000cac8: 14 80 00 05 bg 4000cadc 4000cacc: 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; 4000cad0: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000cad4: 81 c7 e0 08 ret 4000cad8: 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)) 4000cadc: 40 00 08 f7 call 4000eeb8 <__errno> 4000cae0: b0 10 20 0a mov 0xa, %i0 4000cae4: c2 02 00 00 ld [ %o0 ], %g1 4000cae8: 80 a0 60 22 cmp %g1, 0x22 4000caec: 02 bf ff fa be 4000cad4 4000caf0: 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; 4000caf4: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000caf8: 81 c7 e0 08 ret <== NOT EXECUTED 4000cafc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000cb00: 10 bf ff ea b 4000caa8 4000cb04: c2 07 bf fc ld [ %fp + -4 ], %g1 4001fff0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001fff0: 9d e3 bf 98 save %sp, -104, %sp 4001fff4: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001fff8: 80 a6 60 00 cmp %i1, 0 4001fffc: 02 80 00 18 be 4002005c 40020000: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 40020004: 40 00 8e 86 call 40043a1c <__errno> 40020008: 01 00 00 00 nop 4002000c: c0 22 00 00 clr [ %o0 ] *n = 0; 40020010: 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 ); 40020014: 94 10 00 1b mov %i3, %o2 40020018: 90 10 00 10 mov %l0, %o0 4002001c: 40 00 ae 22 call 4004b8a4 40020020: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 40020024: 80 a6 a0 00 cmp %i2, 0 40020028: 02 80 00 18 be 40020088 4002002c: a2 10 00 08 mov %o0, %l1 *endptr = end; 40020030: c2 07 bf fc ld [ %fp + -4 ], %g1 40020034: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 40020038: 80 a0 40 10 cmp %g1, %l0 4002003c: 02 80 00 08 be 4002005c 40020040: 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)) 40020044: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40020048: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4002004c: 80 a4 40 01 cmp %l1, %g1 40020050: 02 80 00 05 be 40020064 40020054: 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; 40020058: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4002005c: 81 c7 e0 08 ret 40020060: 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)) 40020064: 40 00 8e 6e call 40043a1c <__errno> 40020068: b0 10 20 0a mov 0xa, %i0 4002006c: c2 02 00 00 ld [ %o0 ], %g1 40020070: 80 a0 60 22 cmp %g1, 0x22 40020074: 02 bf ff fa be 4002005c 40020078: 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; 4002007c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40020080: 81 c7 e0 08 ret <== NOT EXECUTED 40020084: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40020088: 10 bf ff ec b 40020038 4002008c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cc74 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000cc74: 9d e3 bf 98 save %sp, -104, %sp 4000cc78: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000cc7c: 80 a6 60 00 cmp %i1, 0 4000cc80: 02 80 00 24 be 4000cd10 4000cc84: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000cc88: 40 00 08 8c call 4000eeb8 <__errno> 4000cc8c: 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 ); 4000cc90: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000cc94: c0 22 00 00 clr [ %o0 ] *n = 0; 4000cc98: 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 ); 4000cc9c: 90 10 00 10 mov %l0, %o0 4000cca0: 40 00 14 87 call 40011ebc 4000cca4: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000cca8: 80 a6 a0 00 cmp %i2, 0 4000ccac: 02 80 00 1b be 4000cd18 4000ccb0: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000ccb4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000ccb8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000ccbc: 80 a0 40 10 cmp %g1, %l0 4000ccc0: 02 80 00 14 be 4000cd10 4000ccc4: 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)) 4000ccc8: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000cccc: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000ccd0: 80 a4 40 01 cmp %l1, %g1 4000ccd4: 02 80 00 08 be 4000ccf4 4000ccd8: 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)) 4000ccdc: 80 a4 40 01 cmp %l1, %g1 4000cce0: 02 80 00 05 be 4000ccf4 4000cce4: 01 00 00 00 nop return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000cce8: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; 4000ccec: 81 c7 e0 08 ret 4000ccf0: 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)) 4000ccf4: 40 00 08 71 call 4000eeb8 <__errno> 4000ccf8: 01 00 00 00 nop 4000ccfc: c2 02 00 00 ld [ %o0 ], %g1 4000cd00: 80 a0 60 22 cmp %g1, 0x22 4000cd04: 32 bf ff fa bne,a 4000ccec 4000cd08: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4000cd0c: b0 10 20 0a mov 0xa, %i0 } 4000cd10: 81 c7 e0 08 ret 4000cd14: 81 e8 00 00 restore 4000cd18: 10 bf ff e9 b 4000ccbc 4000cd1c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cba8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000cba8: 9d e3 bf 90 save %sp, -112, %sp 4000cbac: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000cbb0: 80 a6 60 00 cmp %i1, 0 4000cbb4: 02 80 00 29 be 4000cc58 4000cbb8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000cbbc: 40 00 08 bf call 4000eeb8 <__errno> 4000cbc0: 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 ); 4000cbc4: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000cbc8: c0 22 00 00 clr [ %o0 ] *n = 0; 4000cbcc: c0 26 40 00 clr [ %i1 ] 4000cbd0: 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 ); 4000cbd4: 90 10 00 10 mov %l0, %o0 4000cbd8: 40 00 14 c3 call 40011ee4 4000cbdc: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000cbe0: 80 a6 a0 00 cmp %i2, 0 4000cbe4: 02 80 00 22 be 4000cc6c 4000cbe8: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000cbec: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cbf0: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000cbf4: 80 a0 40 10 cmp %g1, %l0 4000cbf8: 02 80 00 18 be 4000cc58 4000cbfc: 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)) 4000cc00: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000cc04: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000cc08: 80 a4 40 01 cmp %l1, %g1 4000cc0c: 02 80 00 15 be 4000cc60 4000cc10: 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)) 4000cc14: 03 20 00 00 sethi %hi(0x80000000), %g1 4000cc18: 80 a4 40 01 cmp %l1, %g1 4000cc1c: 02 80 00 06 be 4000cc34 4000cc20: 80 a2 60 00 cmp %o1, 0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000cc24: d2 26 60 04 st %o1, [ %i1 + 4 ] 4000cc28: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; 4000cc2c: 81 c7 e0 08 ret 4000cc30: 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)) 4000cc34: 32 bf ff fd bne,a 4000cc28 4000cc38: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED 4000cc3c: 40 00 08 9f call 4000eeb8 <__errno> 4000cc40: d2 27 bf f4 st %o1, [ %fp + -12 ] 4000cc44: c2 02 00 00 ld [ %o0 ], %g1 4000cc48: 80 a0 60 22 cmp %g1, 0x22 4000cc4c: 12 bf ff f6 bne 4000cc24 4000cc50: d2 07 bf f4 ld [ %fp + -12 ], %o1 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4000cc54: b0 10 20 0a mov 0xa, %i0 } 4000cc58: 81 c7 e0 08 ret 4000cc5c: 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)) 4000cc60: 12 bf ff ee bne 4000cc18 4000cc64: 03 20 00 00 sethi %hi(0x80000000), %g1 4000cc68: 30 bf ff f5 b,a 4000cc3c 4000cc6c: 10 bf ff e2 b 4000cbf4 4000cc70: c2 07 bf fc ld [ %fp + -4 ], %g1 40020090 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 40020090: 9d e3 bf 98 save %sp, -104, %sp 40020094: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 40020098: 80 a6 60 00 cmp %i1, 0 4002009c: 02 80 00 16 be 400200f4 400200a0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 400200a4: 40 00 8e 5e call 40043a1c <__errno> 400200a8: 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 ); 400200ac: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 400200b0: c0 22 00 00 clr [ %o0 ] *n = 0; 400200b4: 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 ); 400200b8: 90 10 00 10 mov %l0, %o0 400200bc: 40 00 af 30 call 4004bd7c 400200c0: 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 ) 400200c4: 80 a6 a0 00 cmp %i2, 0 400200c8: 02 80 00 16 be 40020120 400200cc: a2 10 00 08 mov %o0, %l1 *endptr = end; 400200d0: c2 07 bf fc ld [ %fp + -4 ], %g1 400200d4: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 400200d8: 80 a0 40 10 cmp %g1, %l0 400200dc: 02 80 00 06 be 400200f4 400200e0: 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)) 400200e4: 80 a4 7f ff cmp %l1, -1 400200e8: 02 80 00 05 be 400200fc 400200ec: 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; 400200f0: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 400200f4: 81 c7 e0 08 ret 400200f8: 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)) 400200fc: 40 00 8e 48 call 40043a1c <__errno> <== NOT EXECUTED 40020100: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 40020104: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40020108: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 4002010c: 02 bf ff fa be 400200f4 <== NOT EXECUTED 40020110: 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; 40020114: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40020118: 81 c7 e0 08 ret <== NOT EXECUTED 4002011c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40020120: 10 bf ff ee b 400200d8 40020124: c2 07 bf fc ld [ %fp + -4 ], %g1 4000ce18 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000ce18: 9d e3 bf 98 save %sp, -104, %sp 4000ce1c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000ce20: 80 a6 60 00 cmp %i1, 0 4000ce24: 02 80 00 16 be 4000ce7c 4000ce28: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000ce2c: 40 00 08 23 call 4000eeb8 <__errno> 4000ce30: 01 00 00 00 nop 4000ce34: c0 22 00 00 clr [ %o0 ] *n = 0; 4000ce38: 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 ); 4000ce3c: 94 10 00 1b mov %i3, %o2 4000ce40: 90 10 00 10 mov %l0, %o0 4000ce44: 40 00 15 54 call 40012394 4000ce48: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000ce4c: 80 a6 a0 00 cmp %i2, 0 4000ce50: 02 80 00 16 be 4000cea8 4000ce54: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000ce58: c2 07 bf fc ld [ %fp + -4 ], %g1 4000ce5c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000ce60: 80 a0 40 10 cmp %g1, %l0 4000ce64: 02 80 00 06 be 4000ce7c 4000ce68: 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)) 4000ce6c: 80 a4 7f ff cmp %l1, -1 4000ce70: 02 80 00 05 be 4000ce84 4000ce74: 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; 4000ce78: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000ce7c: 81 c7 e0 08 ret 4000ce80: 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)) 4000ce84: 40 00 08 0d call 4000eeb8 <__errno> 4000ce88: b0 10 20 0a mov 0xa, %i0 4000ce8c: c2 02 00 00 ld [ %o0 ], %g1 4000ce90: 80 a0 60 22 cmp %g1, 0x22 4000ce94: 02 bf ff fa be 4000ce7c 4000ce98: 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; 4000ce9c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000cea0: 81 c7 e0 08 ret <== NOT EXECUTED 4000cea4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000cea8: 10 bf ff ee b 4000ce60 4000ceac: c2 07 bf fc ld [ %fp + -4 ], %g1 40020188 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 40020188: 9d e3 bf 98 save %sp, -104, %sp 4002018c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 40020190: 80 a6 60 00 cmp %i1, 0 40020194: 02 80 00 16 be 400201ec 40020198: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4002019c: 40 00 8e 20 call 40043a1c <__errno> 400201a0: 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 ); 400201a4: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 400201a8: c0 22 00 00 clr [ %o0 ] *n = 0; 400201ac: 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 ); 400201b0: 90 10 00 10 mov %l0, %o0 400201b4: 40 00 ae f2 call 4004bd7c 400201b8: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 400201bc: 80 a6 a0 00 cmp %i2, 0 400201c0: 02 80 00 16 be 40020218 400201c4: a2 10 00 08 mov %o0, %l1 *endptr = end; 400201c8: c2 07 bf fc ld [ %fp + -4 ], %g1 400201cc: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 400201d0: 80 a0 40 10 cmp %g1, %l0 400201d4: 02 80 00 06 be 400201ec 400201d8: 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)) 400201dc: 80 a4 7f ff cmp %l1, -1 400201e0: 02 80 00 05 be 400201f4 400201e4: 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; 400201e8: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 400201ec: 81 c7 e0 08 ret 400201f0: 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)) 400201f4: 40 00 8e 0a call 40043a1c <__errno> 400201f8: b0 10 20 0a mov 0xa, %i0 400201fc: c2 02 00 00 ld [ %o0 ], %g1 40020200: 80 a0 60 22 cmp %g1, 0x22 40020204: 02 bf ff fa be 400201ec 40020208: 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; 4002020c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40020210: 81 c7 e0 08 ret <== NOT EXECUTED 40020214: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40020218: 10 bf ff ee b 400201d0 4002021c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000ceb0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000ceb0: 9d e3 bf 90 save %sp, -112, %sp 4000ceb4: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000ceb8: 80 a6 60 00 cmp %i1, 0 4000cebc: 02 80 00 23 be 4000cf48 4000cec0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000cec4: 40 00 07 fd call 4000eeb8 <__errno> 4000cec8: 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 ); 4000cecc: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000ced0: c0 22 00 00 clr [ %o0 ] *n = 0; 4000ced4: c0 26 40 00 clr [ %i1 ] 4000ced8: 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 ); 4000cedc: 90 10 00 10 mov %l0, %o0 4000cee0: 40 00 15 37 call 400123bc 4000cee4: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000cee8: 80 a6 a0 00 cmp %i2, 0 4000ceec: 02 80 00 19 be 4000cf50 4000cef0: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000cef4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000cef8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000cefc: 80 a0 40 10 cmp %g1, %l0 4000cf00: 02 80 00 12 be 4000cf48 4000cf04: 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)) 4000cf08: 80 a4 7f ff cmp %l1, -1 4000cf0c: 02 80 00 06 be 4000cf24 4000cf10: 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; 4000cf14: d2 26 60 04 st %o1, [ %i1 + 4 ] 4000cf18: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000cf1c: 81 c7 e0 08 ret 4000cf20: 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)) 4000cf24: 32 bf ff fd bne,a 4000cf18 4000cf28: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED 4000cf2c: 40 00 07 e3 call 4000eeb8 <__errno> 4000cf30: d2 27 bf f4 st %o1, [ %fp + -12 ] 4000cf34: c2 02 00 00 ld [ %o0 ], %g1 4000cf38: b0 10 20 0a mov 0xa, %i0 4000cf3c: 80 a0 60 22 cmp %g1, 0x22 4000cf40: 12 bf ff f5 bne 4000cf14 4000cf44: d2 07 bf f4 ld [ %fp + -12 ], %o1 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4000cf48: 81 c7 e0 08 ret 4000cf4c: 81 e8 00 00 restore 4000cf50: 10 bf ff eb b 4000cefc 4000cf54: 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 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED 4000303c: d0 20 63 68 st %o0, [ %g1 + 0x368 ] ! 4001b768 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40003040: 03 10 00 6d sethi %hi(0x4001b400), %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 63 6c st %o1, [ %g1 + 0x36c ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 4000304c: 03 10 00 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40003050: 81 c3 e0 08 retl <== NOT EXECUTED 40003054: d4 20 63 70 st %o2, [ %g1 + 0x370 ] ! 4001b770 <== 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 6f sethi %hi(0x4001bc00), %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 62 74 ld [ %l1 + 0x274 ], %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 6f sethi %hi(0x4001bc00), %g1 400047b4: 85 28 a0 05 sll %g2, 5, %g2 400047b8: 82 10 60 a4 or %g1, 0xa4, %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 6f sethi %hi(0x4001bc00), %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 6b call 4000aa18 40004870: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40004874: 40 00 18 69 call 4000aa18 40004878: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 4000487c: 40 00 18 67 call 4000aa18 40004880: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40004884: 40 00 18 65 call 4000aa18 40004888: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 4000488c: d0 04 62 74 ld [ %l1 + 0x274 ], %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 6f sethi %hi(0x4001bc00), %g2 if ( rtems_termios_ttyTail != NULL ) { 400048b0: 80 a0 60 00 cmp %g1, 0 400048b4: 02 80 00 27 be 40004950 400048b8: c2 20 a2 78 st %g1, [ %g2 + 0x278 ] } } 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 6f sethi %hi(0x4001bc00), %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 a2 7c st %g1, [ %g2 + 0x27c ] 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 ed call 400060fc <== 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 6f sethi %hi(0x4001bc00), %g1 40004954: 10 bf ff b8 b 40004834 40004958: c0 20 62 7c clr [ %g1 + 0x27c ] ! 4001be7c 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 6f sethi %hi(0x4001bc00), %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 61 58 ld [ %g1 + 0x158 ], %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 87 call 400060fc <== 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 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 400032f8: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400032fc: a2 14 60 a4 or %l1, 0xa4, %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 50 e6 call 40017810 <.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 50 dd call 40017810 <.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 6f sethi %hi(0x4001bc00), %o4 40002ff0: c2 03 22 74 ld [ %o4 + 0x274 ], %g1 ! 4001be74 40002ff4: 80 a0 60 00 cmp %g1, 0 40002ff8: 02 80 00 04 be 40003008 40002ffc: 98 13 22 74 or %o4, 0x274, %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 34 call 400060fc <== 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 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40004414: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40004418: 82 10 60 a4 or %g1, 0xa4, %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 28 ef call 4000e808 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 28 90 call 4000e808 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 6f sethi %hi(0x4001bc00), %l2 <== NOT EXECUTED 400045fc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004600: a4 14 a0 a4 or %l2, 0xa4, %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 4b 69 call 40017478 <.umul> <== NOT EXECUTED 400046d8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 400046dc: 40 00 4b a1 call 40017560 <.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 6f sethi %hi(0x4001bc00), %l1 40004964: d0 04 62 74 ld [ %l1 + 0x274 ], %o0 ! 4001be74 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 6f sethi %hi(0x4001bc00), %l4 40004984: e4 05 22 7c ld [ %l4 + 0x27c ], %l2 ! 4001be7c 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 62 74 ld [ %l1 + 0x274 ], %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 17 a9 call 4000a904 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 6d sethi %hi(0x4001b400), %g1 40004a78: c2 00 63 6c ld [ %g1 + 0x36c ], %g1 ! 4001b76c 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 5d call 4000aff8 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 6d sethi %hi(0x4001b400), %g1 40004a9c: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 ! 4001b770 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 54 call 4000aff8 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 6d sethi %hi(0x4001b400), %g1 40004ac0: 40 00 19 4e call 4000aff8 40004ac4: d0 00 63 68 ld [ %g1 + 0x368 ], %o0 ! 4001b768 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 22 7c ld [ %l4 + 0x27c ], %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 6f sethi %hi(0x4001bc00), %g1 40004b04: c4 00 62 78 ld [ %g1 + 0x278 ], %g2 ! 4001be78 40004b08: 80 a0 a0 00 cmp %g2, 0 40004b0c: 02 80 00 a8 be 40004dac 40004b10: e6 25 22 7c st %l3, [ %l4 + 0x27c ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40004b14: 29 10 00 6d sethi %hi(0x4001b400), %l4 40004b18: d0 4d 23 74 ldsb [ %l4 + 0x374 ], %o0 ! 4001b774 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 23 74 ldsb [ %l4 + 0x374 ], %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 23 74 ldsb [ %l4 + 0x374 ], %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 27 17 call 4000e808 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 23 74 ldsb [ %l4 + 0x374 ], %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 23 74 ldsb [ %l4 + 0x374 ], %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 23 74 ldub [ %l4 + 0x374 ], %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 23 74 stb %g2, [ %l4 + 0x374 ] c = 'a'; 40004cb8: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 40004cbc: 03 10 00 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED 40004cc0: 10 bf ff 42 b 400049c8 <== NOT EXECUTED 40004cc4: c4 28 63 74 stb %g2, [ %g1 + 0x374 ] ! 4001b774 <== 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 54 call 4000aa18 <== NOT EXECUTED 40004ccc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40004cd0: d0 04 62 74 ld [ %l1 + 0x274 ], %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 4b call 4000aa18 <== NOT EXECUTED 40004cf0: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED free(tty); 40004cf4: 40 00 17 49 call 4000aa18 <== 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 62 74 ld [ %l1 + 0x274 ], %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 f2 call 400060fc <== 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 36 call 4000aa18 <== 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 23 74 ldsb [ %l4 + 0x374 ], %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 62 78 st %l3, [ %g1 + 0x278 ] 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 50 6a call 40017810 <.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 64 call 400060fc <== 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 6f sethi %hi(0x4001bc00), %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 a0 a4 or %g2, 0xa4, %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 6d sethi %hi(0x4001b400), %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 a3 68 or %l2, 0x368, %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 4d c3 call 40017810 <.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 4d ba call 40017810 <.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 51 d0 call 40017810 <.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 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 40004dbc: a0 07 bf fc add %fp, -4, %l0 <== NOT EXECUTED 40004dc0: a2 14 60 a4 or %l1, 0xa4, %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 6f sethi %hi(0x4001bc00), %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 60 a4 or %g1, 0xa4, %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 4000774c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 4000774c: 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) 40007750: 29 08 00 00 sethi %hi(0x20000000), %l4 <== NOT EXECUTED 40007754: a8 8e 00 14 andcc %i0, %l4, %l4 <== NOT EXECUTED 40007758: 02 80 00 0f be 40007794 <== NOT EXECUTED 4000775c: 05 10 00 9e sethi %hi(0x40027800), %g2 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40007760: c6 00 a2 28 ld [ %g2 + 0x228 ], %g3 ! 40027a28 <== NOT EXECUTED 40007764: 82 00 e0 01 add %g3, 1, %g1 <== NOT EXECUTED 40007768: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000776c: 02 80 00 07 be 40007788 <== NOT EXECUTED 40007770: c2 20 a2 28 st %g1, [ %g2 + 0x228 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007774: 03 10 00 9f sethi %hi(0x40027c00), %g1 <== NOT EXECUTED 40007778: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 ! 40027c10 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000777c: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40007780: c6 20 60 10 st %g3, [ %g1 + 0x10 ] <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 40007784: c2 00 a2 28 ld [ %g2 + 0x228 ], %g1 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40007788: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000778c: 14 80 00 3c bg 4000787c <== NOT EXECUTED 40007790: a4 10 20 00 clr %l2 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40007794: 21 10 00 9c sethi %hi(0x40027000), %l0 <== NOT EXECUTED 40007798: c2 04 22 d8 ld [ %l0 + 0x2d8 ], %g1 ! 400272d8 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 4000779c: 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 */ 400077a0: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 400077a4: 40 00 37 b7 call 40015680 <== NOT EXECUTED 400077a8: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 400077ac: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 400077b0: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 400077b4: 12 80 00 45 bne 400078c8 <== NOT EXECUTED 400077b8: 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); 400077bc: c2 04 22 d8 ld [ %l0 + 0x2d8 ], %g1 <== NOT EXECUTED 400077c0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400077c4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400077c8: 40 00 4f 6b call 4001b574 <== NOT EXECUTED 400077cc: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 400077d0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400077d4: 12 80 00 31 bne 40007898 <== NOT EXECUTED 400077d8: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 400077dc: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400077e0: 02 80 00 12 be 40007828 <== NOT EXECUTED 400077e4: c2 04 22 d8 ld [ %l0 + 0x2d8 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 400077e8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400077ec: 04 80 00 09 ble 40007810 <== NOT EXECUTED 400077f0: 13 10 00 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED 400077f4: 40 00 3b ca call 4001671c <== NOT EXECUTED 400077f8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400077fc: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40007800: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007804: 12 80 00 35 bne 400078d8 <== NOT EXECUTED 40007808: c2 04 22 d8 ld [ %l0 + 0x2d8 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 4000780c: 13 10 00 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED 40007810: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007814: 92 12 62 60 or %o1, 0x260, %o1 <== NOT EXECUTED 40007818: 40 00 38 6e call 400159d0 <== NOT EXECUTED 4000781c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40007820: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40007824: c2 04 22 d8 ld [ %l0 + 0x2d8 ], %g1 <== NOT EXECUTED 40007828: 13 10 00 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED 4000782c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007830: 40 00 38 68 call 400159d0 <== NOT EXECUTED 40007834: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED (void) fflush(stderr); 40007838: c2 04 22 d8 ld [ %l0 + 0x2d8 ], %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"); 4000783c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED (void) fflush(stderr); 40007840: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007844: 40 00 37 8f call 40015680 <== NOT EXECUTED 40007848: a4 04 c0 12 add %l3, %l2, %l2 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 4000784c: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40007850: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40007854: 02 80 00 0a be 4000787c <== NOT EXECUTED 40007858: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 4000785c: 22 80 00 0a be,a 40007884 <== NOT EXECUTED 40007860: 13 10 00 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40007864: 13 10 00 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED 40007868: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000786c: 40 00 00 32 call 40007934 <== NOT EXECUTED 40007870: 92 12 62 80 or %o1, 0x280, %o1 <== NOT EXECUTED _exit(local_errno); 40007874: 40 00 03 5e call 400085ec <_exit> <== NOT EXECUTED 40007878: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 4000787c: 81 c7 e0 08 ret <== NOT EXECUTED 40007880: 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"); 40007884: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007888: 40 00 00 2b call 40007934 <== NOT EXECUTED 4000788c: 92 12 62 98 or %o1, 0x298, %o1 <== NOT EXECUTED abort(); 40007890: 40 00 36 65 call 40015224 <== NOT EXECUTED 40007894: 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)); 40007898: 03 10 00 9c sethi %hi(0x40027000), %g1 <== NOT EXECUTED 4000789c: c2 00 62 d8 ld [ %g1 + 0x2d8 ], %g1 ! 400272d8 <_impure_ptr> <== NOT EXECUTED 400078a0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400078a4: 7f ff ff a3 call 40007730 <== NOT EXECUTED 400078a8: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 400078ac: 13 10 00 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED 400078b0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400078b4: 92 12 62 40 or %o1, 0x240, %o1 <== NOT EXECUTED 400078b8: 40 00 38 46 call 400159d0 <== NOT EXECUTED 400078bc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400078c0: 10 bf ff c7 b 400077dc <== NOT EXECUTED 400078c4: 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; 400078c8: 40 00 36 65 call 4001525c <__errno> <== NOT EXECUTED 400078cc: 01 00 00 00 nop <== NOT EXECUTED 400078d0: 10 bf ff bb b 400077bc <== NOT EXECUTED 400078d4: 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)); 400078d8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400078dc: 40 00 3b 90 call 4001671c <== NOT EXECUTED 400078e0: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 400078e4: 13 10 00 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED 400078e8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400078ec: 92 12 62 50 or %o1, 0x250, %o1 <== NOT EXECUTED 400078f0: 40 00 38 38 call 400159d0 <== NOT EXECUTED 400078f4: 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)) 400078f8: 10 bf ff cb b 40007824 <== NOT EXECUTED 400078fc: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED 40029c9c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40029c9c: 9d e3 bf a0 save %sp, -96, %sp 40029ca0: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029ca4: 2b 10 01 a7 sethi %hi(0x40069c00), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 40029ca8: 29 10 01 a7 sethi %hi(0x40069c00), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40029cac: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029cb0: aa 15 60 f0 or %l5, 0xf0, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 40029cb4: a8 15 20 e0 or %l4, 0xe0, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40029cb8: a4 10 20 00 clr %l2 40029cbc: a2 10 20 00 clr %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029cc0: c2 06 20 04 ld [ %i0 + 4 ], %g1 40029cc4: 82 00 7f ff add %g1, -1, %g1 40029cc8: 80 a0 60 00 cmp %g1, 0 40029ccc: 06 80 00 24 bl 40029d5c 40029cd0: c2 26 20 04 st %g1, [ %i0 + 4 ] 40029cd4: c2 06 00 00 ld [ %i0 ], %g1 40029cd8: e0 08 40 00 ldub [ %g1 ], %l0 40029cdc: 84 00 60 01 add %g1, 1, %g2 if (c == ':') 40029ce0: 80 a4 20 3a cmp %l0, 0x3a 40029ce4: 02 80 00 25 be 40029d78 40029ce8: c4 26 00 00 st %g2, [ %i0 ] break; if (sign == 0) { 40029cec: 80 a4 a0 00 cmp %l2, 0 40029cf0: 32 80 00 06 bne,a 40029d08 40029cf4: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 40029cf8: 80 a4 20 2d cmp %l0, 0x2d 40029cfc: 02 80 00 30 be 40029dbc 40029d00: a4 10 20 01 mov 1, %l2 limit++; continue; } sign = 1; } if (!isdigit(c)) 40029d04: c2 05 00 00 ld [ %l4 ], %g1 40029d08: 82 00 40 10 add %g1, %l0, %g1 40029d0c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 40029d10: 80 88 60 04 btst 4, %g1 40029d14: 02 80 00 28 be 40029db4 40029d18: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 40029d1c: 40 00 c8 93 call 4005bf68 <.udiv> 40029d20: 92 10 20 0a mov 0xa, %o1 40029d24: 80 a4 40 08 cmp %l1, %o0 40029d28: 18 80 00 23 bgu 40029db4 40029d2c: 01 00 00 00 nop 40029d30: 02 80 00 1b be 40029d9c 40029d34: a0 04 3f d0 add %l0, -48, %l0 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 40029d38: 83 2c 60 03 sll %l1, 3, %g1 40029d3c: a3 2c 60 01 sll %l1, 1, %l1 40029d40: a2 04 40 01 add %l1, %g1, %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029d44: 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; 40029d48: a2 04 00 11 add %l0, %l1, %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40029d4c: 82 00 7f ff add %g1, -1, %g1 40029d50: 80 a0 60 00 cmp %g1, 0 40029d54: 16 bf ff e0 bge 40029cd4 40029d58: c2 26 20 04 st %g1, [ %i0 + 4 ] 40029d5c: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 40029d60: 40 00 7c ff call 4004915c <__srget_r> <== NOT EXECUTED 40029d64: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40029d68: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 40029d6c: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40029d70: 12 bf ff e0 bne 40029cf0 <== NOT EXECUTED 40029d74: 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) 40029d78: 80 a4 a0 00 cmp %l2, 0 40029d7c: 02 80 00 0e be 40029db4 40029d80: 90 10 00 12 mov %l2, %o0 return 0; *val = i * sign; 40029d84: 92 10 00 11 mov %l1, %o1 40029d88: 7f ff 65 42 call 40003290 <.umul> 40029d8c: b0 10 20 01 mov 1, %i0 40029d90: d0 26 40 00 st %o0, [ %i1 ] return 1; 40029d94: 81 c7 e0 08 ret 40029d98: 81 e8 00 00 restore sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 40029d9c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40029da0: 40 00 c9 1e call 4005c218 <.urem> <== NOT EXECUTED 40029da4: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40029da8: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 40029dac: 08 bf ff e4 bleu 40029d3c <== NOT EXECUTED 40029db0: 83 2c 60 03 sll %l1, 3, %g1 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 40029db4: 81 c7 e0 08 ret <== NOT EXECUTED 40029db8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 40029dbc: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 40029dc0: 10 bf ff c0 b 40029cc0 <== NOT EXECUTED 40029dc4: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 40029dc8 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 40029dc8: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 40029dcc: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 40029dd0: 21 10 01 a7 sethi %hi(0x40069c00), %l0 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 40029dd4: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 40029dd8: 10 80 00 19 b 40029e3c 40029ddc: a0 14 20 f0 or %l0, 0xf0, %l0 40029de0: c2 06 00 00 ld [ %i0 ], %g1 40029de4: d0 08 40 00 ldub [ %g1 ], %o0 40029de8: 84 00 60 01 add %g1, 1, %g2 if (c == ':') { 40029dec: 80 a2 20 3a cmp %o0, 0x3a 40029df0: 02 80 00 1e be 40029e68 40029df4: c4 26 00 00 st %g2, [ %i0 ] if (nlFlag) return 0; break; } if (c == '\n') { 40029df8: 80 a2 20 0a cmp %o0, 0xa 40029dfc: 02 80 00 28 be 40029e9c 40029e00: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) return 0; break; } if (c == EOF) 40029e04: 02 80 00 29 be 40029ea8 40029e08: 01 00 00 00 nop return 0; if (*nleft < 2) 40029e0c: c2 06 c0 00 ld [ %i3 ], %g1 40029e10: 80 a0 60 01 cmp %g1, 1 40029e14: 08 80 00 25 bleu 40029ea8 40029e18: 01 00 00 00 nop return 0; **bufp = c; 40029e1c: c2 06 80 00 ld [ %i2 ], %g1 40029e20: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 40029e24: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 40029e28: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40029e2c: 84 00 a0 01 inc %g2 --(*nleft); 40029e30: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40029e34: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 40029e38: c2 26 c0 00 st %g1, [ %i3 ] { int c; *name = *bufp; for (;;) { c = getc(fp); 40029e3c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40029e40: 82 00 7f ff add %g1, -1, %g1 40029e44: 80 a0 60 00 cmp %g1, 0 40029e48: 16 bf ff e6 bge 40029de0 40029e4c: c2 26 20 04 st %g1, [ %i0 + 4 ] 40029e50: d0 04 00 00 ld [ %l0 ], %o0 40029e54: 40 00 7c c2 call 4004915c <__srget_r> 40029e58: 92 10 00 18 mov %i0, %o1 if (c == ':') { 40029e5c: 80 a2 20 3a cmp %o0, 0x3a 40029e60: 12 bf ff e7 bne 40029dfc 40029e64: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 40029e68: 80 a7 20 00 cmp %i4, 0 40029e6c: 12 80 00 0f bne 40029ea8 40029e70: 01 00 00 00 nop return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 40029e74: c2 06 80 00 ld [ %i2 ], %g1 40029e78: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 40029e7c: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 40029e80: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40029e84: 84 00 a0 01 inc %g2 --(*nleft); 40029e88: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40029e8c: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 40029e90: c2 26 c0 00 st %g1, [ %i3 ] return 1; 40029e94: 81 c7 e0 08 ret 40029e98: 91 e8 20 01 restore %g0, 1, %o0 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 40029e9c: 80 a7 20 00 cmp %i4, 0 40029ea0: 32 bf ff f6 bne,a 40029e78 40029ea4: c2 06 80 00 ld [ %i2 ], %g1 } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 40029ea8: 81 c7 e0 08 ret <== NOT EXECUTED 40029eac: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40029eb0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40029eb0: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40029eb4: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40029eb8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40029ebc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40029ec0: a2 07 a0 4c add %fp, 0x4c, %l1 40029ec4: a0 07 a0 50 add %fp, 0x50, %l0 40029ec8: 90 10 00 18 mov %i0, %o0 40029ecc: 92 10 00 19 mov %i1, %o1 40029ed0: 94 10 00 11 mov %l1, %o2 40029ed4: 7f ff ff bd call 40029dc8 40029ed8: 96 10 00 10 mov %l0, %o3 40029edc: 80 a2 20 00 cmp %o0, 0 40029ee0: 12 80 00 04 bne 40029ef0 40029ee4: 90 10 00 18 mov %i0, %o0 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 40029ee8: 81 c7 e0 08 ret <== NOT EXECUTED 40029eec: 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) 40029ef0: 92 06 60 04 add %i1, 4, %o1 40029ef4: 94 10 00 11 mov %l1, %o2 40029ef8: 96 10 00 10 mov %l0, %o3 40029efc: 7f ff ff b3 call 40029dc8 40029f00: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40029f04: 80 a2 20 00 cmp %o0, 0 40029f08: 02 bf ff f8 be 40029ee8 40029f0c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 40029f10: 7f ff ff 63 call 40029c9c 40029f14: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40029f18: 80 a2 20 00 cmp %o0, 0 40029f1c: 02 bf ff f3 be 40029ee8 40029f20: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 40029f24: 94 10 00 11 mov %l1, %o2 40029f28: 96 10 00 10 mov %l0, %o3 40029f2c: 92 07 bf f8 add %fp, -8, %o1 40029f30: 7f ff ff a6 call 40029dc8 40029f34: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40029f38: 80 a2 20 00 cmp %o0, 0 40029f3c: 02 bf ff eb be 40029ee8 40029f40: 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; 40029f44: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40029f48: 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; 40029f4c: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40029f50: c6 0b 40 00 ldub [ %o5 ], %g3 40029f54: 88 10 20 01 mov 1, %g4 40029f58: 83 28 e0 18 sll %g3, 0x18, %g1 40029f5c: 80 a0 60 00 cmp %g1, 0 40029f60: 02 80 00 0e be 40029f98 40029f64: 86 10 20 17 mov 0x17, %g3 40029f68: 84 00 a0 01 inc %g2 40029f6c: c6 08 80 00 ldub [ %g2 ], %g3 if(*cp == ',') 40029f70: 83 38 60 18 sra %g1, 0x18, %g1 memcount++; 40029f74: 82 18 60 2c xor %g1, 0x2c, %g1 40029f78: 80 a0 00 01 cmp %g0, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40029f7c: 83 28 e0 18 sll %g3, 0x18, %g1 if(*cp == ',') memcount++; 40029f80: 88 61 3f ff subx %g4, -1, %g4 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40029f84: 80 a0 60 00 cmp %g1, 0 40029f88: 32 bf ff f9 bne,a 40029f6c 40029f8c: 84 00 a0 01 inc %g2 40029f90: 87 29 20 02 sll %g4, 2, %g3 40029f94: 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)) 40029f98: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 40029f9c: 80 a0 40 03 cmp %g1, %g3 40029fa0: 0a bf ff d2 bcs 40029ee8 40029fa4: 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++) { 40029fa8: 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); 40029fac: 84 00 a0 0f add %g2, 0xf, %g2 40029fb0: 84 08 bf f0 and %g2, -16, %g2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40029fb4: da 20 80 00 st %o5, [ %g2 ] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40029fb8: 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); 40029fbc: 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++) { 40029fc0: c4 08 40 00 ldub [ %g1 ], %g2 40029fc4: 88 10 20 04 mov 4, %g4 40029fc8: 85 28 a0 18 sll %g2, 0x18, %g2 40029fcc: 80 a0 a0 00 cmp %g2, 0 40029fd0: 12 80 00 09 bne 40029ff4 40029fd4: 82 00 60 01 inc %g1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40029fd8: 10 80 00 13 b 4002a024 <== NOT EXECUTED 40029fdc: 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++) { 40029fe0: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 40029fe4: 85 28 a0 18 sll %g2, 0x18, %g2 40029fe8: 80 a0 a0 00 cmp %g2, 0 40029fec: 02 80 00 0c be 4002a01c 40029ff0: 82 00 60 01 inc %g1 if(*cp == ',') { 40029ff4: 85 38 a0 18 sra %g2, 0x18, %g2 40029ff8: 80 a0 a0 2c cmp %g2, 0x2c 40029ffc: 32 bf ff fa bne,a 40029fe4 4002a000: c4 08 40 00 ldub [ %g1 ], %g2 *cp = '\0'; 4002a004: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 4002a008: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 4002a00c: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 4002a010: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4002a014: 10 bf ff f3 b 40029fe0 <== NOT EXECUTED 4002a018: 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++) { 4002a01c: 89 28 e0 02 sll %g3, 2, %g4 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4002a020: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4002a024: c0 20 40 04 clr [ %g1 + %g4 ] return 1; 4002a028: 81 c7 e0 08 ret 4002a02c: 91 e8 20 01 restore %g0, 1, %o0 4002a07c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4002a07c: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a080: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4002a084: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002a088: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a08c: a2 07 a0 4c add %fp, 0x4c, %l1 4002a090: a0 07 a0 50 add %fp, 0x50, %l0 4002a094: 90 10 00 18 mov %i0, %o0 4002a098: 92 10 00 19 mov %i1, %o1 4002a09c: 94 10 00 11 mov %l1, %o2 4002a0a0: 7f ff ff 4a call 40029dc8 4002a0a4: 96 10 00 10 mov %l0, %o3 4002a0a8: 80 a2 20 00 cmp %o0, 0 4002a0ac: 12 80 00 04 bne 4002a0bc 4002a0b0: 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; } 4002a0b4: 81 c7 e0 08 ret <== NOT EXECUTED 4002a0b8: 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) 4002a0bc: 92 06 60 04 add %i1, 4, %o1 4002a0c0: 94 10 00 11 mov %l1, %o2 4002a0c4: 96 10 00 10 mov %l0, %o3 4002a0c8: 7f ff ff 40 call 40029dc8 4002a0cc: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a0d0: 80 a2 20 00 cmp %o0, 0 4002a0d4: 02 bf ff f8 be 4002a0b4 4002a0d8: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 4002a0dc: 7f ff fe f0 call 40029c9c 4002a0e0: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a0e4: 80 a2 20 00 cmp %o0, 0 4002a0e8: 02 bf ff f3 be 4002a0b4 4002a0ec: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 4002a0f0: 7f ff fe eb call 40029c9c 4002a0f4: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a0f8: 80 a2 20 00 cmp %o0, 0 4002a0fc: 02 bf ff ee be 4002a0b4 4002a100: 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) 4002a104: 92 06 60 0c add %i1, 0xc, %o1 4002a108: 94 10 00 11 mov %l1, %o2 4002a10c: 96 10 00 10 mov %l0, %o3 4002a110: 7f ff ff 2e call 40029dc8 4002a114: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a118: 80 a2 20 00 cmp %o0, 0 4002a11c: 02 bf ff e6 be 4002a0b4 4002a120: 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) 4002a124: 92 06 60 10 add %i1, 0x10, %o1 4002a128: 94 10 00 11 mov %l1, %o2 4002a12c: 96 10 00 10 mov %l0, %o3 4002a130: 7f ff ff 26 call 40029dc8 4002a134: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a138: 80 a2 20 00 cmp %o0, 0 4002a13c: 02 bf ff de be 4002a0b4 4002a140: 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) 4002a144: 92 06 60 14 add %i1, 0x14, %o1 4002a148: 94 10 00 11 mov %l1, %o2 4002a14c: 96 10 00 10 mov %l0, %o3 4002a150: 7f ff ff 1e call 40029dc8 4002a154: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a158: 80 a2 20 00 cmp %o0, 0 4002a15c: 02 bf ff d6 be 4002a0b4 4002a160: 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)) 4002a164: 94 10 00 11 mov %l1, %o2 4002a168: 96 10 00 10 mov %l0, %o3 4002a16c: 92 06 60 18 add %i1, 0x18, %o1 4002a170: 7f ff ff 16 call 40029dc8 4002a174: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002a178: 80 a2 20 00 cmp %o0, 0 4002a17c: 02 bf ff ce be 4002a0b4 4002a180: 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; 4002a184: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 4002a188: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002a18c: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 4002a190: 81 c7 e0 08 ret 4002a194: 91 e8 20 01 restore %g0, 1, %o0 40029c38 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40029c38: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 40029c3c: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED 40029c40: d0 30 60 32 sth %o0, [ %g1 + 0x32 ] <== NOT EXECUTED return 0; } 40029c44: 81 c3 e0 08 retl <== NOT EXECUTED 40029c48: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002a2d0 : return NULL; return &grent; } void setgrent(void) { 4002a2d0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 4002a2d4: 7f ff ff c4 call 4002a1e4 <== NOT EXECUTED 4002a2d8: 21 10 01 b3 sethi %hi(0x4006cc00), %l0 <== NOT EXECUTED if (group_fp != NULL) 4002a2dc: d0 04 23 f4 ld [ %l0 + 0x3f4 ], %o0 ! 4006cff4 <== NOT EXECUTED 4002a2e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a2e4: 22 80 00 05 be,a 4002a2f8 <== NOT EXECUTED 4002a2e8: 11 10 01 7b sethi %hi(0x4005ec00), %o0 <== NOT EXECUTED fclose(group_fp); 4002a2ec: 40 00 66 24 call 40043b7c <== NOT EXECUTED 4002a2f0: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 4002a2f4: 11 10 01 7b sethi %hi(0x4005ec00), %o0 <== NOT EXECUTED 4002a2f8: 13 10 01 a3 sethi %hi(0x40068c00), %o1 <== NOT EXECUTED 4002a2fc: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED 4002a300: 40 00 68 6e call 400444b8 <== NOT EXECUTED 4002a304: 92 12 60 f0 or %o1, 0xf0, %o1 <== NOT EXECUTED 4002a308: d0 24 23 f4 st %o0, [ %l0 + 0x3f4 ] <== NOT EXECUTED } 4002a30c: 81 c7 e0 08 ret <== NOT EXECUTED 4002a310: 81 e8 00 00 restore <== NOT EXECUTED 4002a4d0 : return NULL; return &pwent; } void setpwent(void) { 4002a4d0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 4002a4d4: 7f ff ff 44 call 4002a1e4 <== NOT EXECUTED 4002a4d8: 21 10 01 b3 sethi %hi(0x4006cc00), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 4002a4dc: d0 04 23 0c ld [ %l0 + 0x30c ], %o0 ! 4006cf0c <== NOT EXECUTED 4002a4e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002a4e4: 22 80 00 05 be,a 4002a4f8 <== NOT EXECUTED 4002a4e8: 11 10 01 7b sethi %hi(0x4005ec00), %o0 <== NOT EXECUTED fclose(passwd_fp); 4002a4ec: 40 00 65 a4 call 40043b7c <== NOT EXECUTED 4002a4f0: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4002a4f4: 11 10 01 7b sethi %hi(0x4005ec00), %o0 <== NOT EXECUTED 4002a4f8: 13 10 01 a3 sethi %hi(0x40068c00), %o1 <== NOT EXECUTED 4002a4fc: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED 4002a500: 40 00 67 ee call 400444b8 <== NOT EXECUTED 4002a504: 92 12 60 f0 or %o1, 0xf0, %o1 <== NOT EXECUTED 4002a508: d0 24 23 0c st %o0, [ %l0 + 0x30c ] <== NOT EXECUTED } 4002a50c: 81 c7 e0 08 ret <== NOT EXECUTED 4002a510: 81 e8 00 00 restore <== NOT EXECUTED 40007318 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40007318: 03 10 01 a5 sethi %hi(0x40069400), %g1 <== NOT EXECUTED 4000731c: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 <== NOT EXECUTED 40007320: d0 30 60 30 sth %o0, [ %g1 + 0x30 ] <== NOT EXECUTED return 0; } 40007324: 81 c3 e0 08 retl <== NOT EXECUTED 40007328: 90 10 20 00 clr %o0 <== NOT EXECUTED 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 40008b40 : int _STAT_NAME( const char *path, struct stat *buf ) { 40008b40: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40008b44: 80 a6 60 00 cmp %i1, 0 40008b48: 02 80 00 34 be 40008c18 40008b4c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 40008b50: 40 01 06 de call 4004a6c8 40008b54: 90 10 00 18 mov %i0, %o0 40008b58: a0 07 bf ec add %fp, -20, %l0 40008b5c: 92 10 00 08 mov %o0, %o1 40008b60: 94 10 20 00 clr %o2 40008b64: 90 10 00 18 mov %i0, %o0 40008b68: 96 10 00 10 mov %l0, %o3 40008b6c: 98 10 20 01 mov 1, %o4 40008b70: 7f ff f9 5d call 400070e4 40008b74: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 40008b78: 80 a2 20 00 cmp %o0, 0 40008b7c: 12 80 00 25 bne 40008c10 40008b80: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 40008b84: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40008b88: 80 a0 a0 00 cmp %g2, 0 40008b8c: 02 80 00 29 be 40008c30 40008b90: 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) ); 40008b94: c0 26 40 00 clr [ %i1 ] 40008b98: c0 26 60 04 clr [ %i1 + 4 ] 40008b9c: c0 26 60 08 clr [ %i1 + 8 ] 40008ba0: c0 26 60 0c clr [ %i1 + 0xc ] 40008ba4: c0 26 60 10 clr [ %i1 + 0x10 ] 40008ba8: c0 26 60 14 clr [ %i1 + 0x14 ] 40008bac: c0 26 60 18 clr [ %i1 + 0x18 ] 40008bb0: c0 26 60 1c clr [ %i1 + 0x1c ] 40008bb4: c0 26 60 20 clr [ %i1 + 0x20 ] 40008bb8: c0 26 60 24 clr [ %i1 + 0x24 ] 40008bbc: c0 26 60 28 clr [ %i1 + 0x28 ] 40008bc0: c0 26 60 2c clr [ %i1 + 0x2c ] 40008bc4: c0 26 60 30 clr [ %i1 + 0x30 ] 40008bc8: c0 26 60 34 clr [ %i1 + 0x34 ] 40008bcc: c0 26 60 38 clr [ %i1 + 0x38 ] 40008bd0: c0 26 60 3c clr [ %i1 + 0x3c ] 40008bd4: c0 26 60 40 clr [ %i1 + 0x40 ] 40008bd8: c0 26 60 44 clr [ %i1 + 0x44 ] status = (*loc.handlers->fstat_h)( &loc, buf ); 40008bdc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40008be0: 9f c0 40 00 call %g1 40008be4: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40008be8: c2 07 bf f8 ld [ %fp + -8 ], %g1 40008bec: 80 a0 60 00 cmp %g1, 0 40008bf0: 02 80 00 08 be 40008c10 40008bf4: b0 10 00 08 mov %o0, %i0 40008bf8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40008bfc: 80 a0 60 00 cmp %g1, 0 40008c00: 02 80 00 1a be 40008c68 40008c04: 01 00 00 00 nop 40008c08: 9f c0 40 00 call %g1 40008c0c: 90 10 00 10 mov %l0, %o0 return status; } 40008c10: 81 c7 e0 08 ret 40008c14: 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 ); 40008c18: 40 00 eb 81 call 40043a1c <__errno> 40008c1c: b0 10 3f ff mov -1, %i0 40008c20: 82 10 20 0e mov 0xe, %g1 40008c24: c2 22 00 00 st %g1, [ %o0 ] 40008c28: 81 c7 e0 08 ret 40008c2c: 81 e8 00 00 restore 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 40008c30: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40008c34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008c38: 02 80 00 08 be 40008c58 <== NOT EXECUTED 40008c3c: 01 00 00 00 nop <== NOT EXECUTED 40008c40: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008c44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008c48: 02 80 00 04 be 40008c58 <== NOT EXECUTED 40008c4c: 01 00 00 00 nop <== NOT EXECUTED 40008c50: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008c54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40008c58: 40 00 eb 71 call 40043a1c <__errno> <== NOT EXECUTED 40008c5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008c60: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40008c64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008c68: 81 c7 e0 08 ret <== NOT EXECUTED 40008c6c: 81 e8 00 00 restore <== NOT EXECUTED 4002b388 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 4002b388: 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 ) ) 4002b38c: 40 00 7c cf call 4004a6c8 <== NOT EXECUTED 4002b390: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002b394: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4002b398: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002b39c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4002b3a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002b3a4: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4002b3a8: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4002b3ac: 7f ff 6f 4e call 400070e4 <== NOT EXECUTED 4002b3b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b3b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b3b8: 12 80 00 23 bne 4002b444 <== NOT EXECUTED 4002b3bc: 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; 4002b3c0: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002b3c4: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 4002b3c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b3cc: 02 80 00 20 be 4002b44c <== NOT EXECUTED 4002b3d0: 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)); 4002b3d4: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 4002b3d8: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 4002b3dc: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4002b3e0: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 4002b3e4: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 4002b3e8: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 4002b3ec: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4002b3f0: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 4002b3f4: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4002b3f8: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 4002b3fc: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4002b400: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 4002b404: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 4002b408: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 4002b40c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002b410: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 4002b414: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b418: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002b41c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002b420: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b424: 02 80 00 08 be 4002b444 <== NOT EXECUTED 4002b428: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002b42c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002b430: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b434: 02 80 00 0a be 4002b45c <== NOT EXECUTED 4002b438: 01 00 00 00 nop <== NOT EXECUTED 4002b43c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b440: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 4002b444: 81 c7 e0 08 ret <== NOT EXECUTED 4002b448: 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 ); 4002b44c: 40 00 61 74 call 40043a1c <__errno> <== NOT EXECUTED 4002b450: 01 00 00 00 nop <== NOT EXECUTED 4002b454: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4002b458: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b45c: 81 c7 e0 08 ret <== NOT EXECUTED 4002b460: 81 e8 00 00 restore <== NOT EXECUTED 4002b464 : int symlink( const char *actualpath, const char *sympath ) { 4002b464: 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 ); 4002b468: c2 4e 40 00 ldsb [ %i1 ], %g1 4002b46c: 80 a0 60 5c cmp %g1, 0x5c 4002b470: 02 80 00 07 be 4002b48c 4002b474: a2 10 00 18 mov %i0, %l1 4002b478: 80 a0 60 2f cmp %g1, 0x2f 4002b47c: 02 80 00 04 be 4002b48c 4002b480: 80 a0 60 00 cmp %g1, 0 4002b484: 12 80 00 2f bne 4002b540 4002b488: 03 10 01 a5 sethi %hi(0x40069400), %g1 4002b48c: 03 10 01 a5 sethi %hi(0x40069400), %g1 4002b490: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 4002b494: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4002b498: c4 27 bf e8 st %g2, [ %fp + -24 ] 4002b49c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4002b4a0: c4 27 bf ec st %g2, [ %fp + -20 ] 4002b4a4: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4002b4a8: c4 27 bf f0 st %g2, [ %fp + -16 ] 4002b4ac: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4002b4b0: c4 27 bf f4 st %g2, [ %fp + -12 ] 4002b4b4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002b4b8: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !loc.ops->evalformake_h ) { 4002b4bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002b4c0: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002b4c4: 80 a0 60 00 cmp %g1, 0 4002b4c8: 02 80 00 2e be 4002b580 4002b4cc: 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 ); 4002b4d0: 90 06 40 08 add %i1, %o0, %o0 4002b4d4: a0 07 bf e8 add %fp, -24, %l0 4002b4d8: 94 07 bf fc add %fp, -4, %o2 4002b4dc: 92 10 00 10 mov %l0, %o1 4002b4e0: 9f c0 40 00 call %g1 4002b4e4: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 4002b4e8: 80 a2 20 00 cmp %o0, 0 4002b4ec: 12 80 00 13 bne 4002b538 4002b4f0: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 4002b4f4: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 4002b4f8: 80 a0 60 00 cmp %g1, 0 4002b4fc: 02 80 00 27 be 4002b598 4002b500: 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); 4002b504: 92 10 00 11 mov %l1, %o1 4002b508: 9f c0 40 00 call %g1 4002b50c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002b510: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002b514: 80 a0 60 00 cmp %g1, 0 4002b518: 02 80 00 08 be 4002b538 4002b51c: b0 10 00 08 mov %o0, %i0 4002b520: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002b524: 80 a0 60 00 cmp %g1, 0 4002b528: 02 80 00 1a be 4002b590 4002b52c: 01 00 00 00 nop 4002b530: 9f c0 40 00 call %g1 4002b534: 90 10 00 10 mov %l0, %o0 return result; } 4002b538: 81 c7 e0 08 ret 4002b53c: 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 ); 4002b540: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 4002b544: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002b548: c4 27 bf e8 st %g2, [ %fp + -24 ] 4002b54c: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002b550: c4 27 bf ec st %g2, [ %fp + -20 ] 4002b554: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4002b558: c4 27 bf f0 st %g2, [ %fp + -16 ] 4002b55c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4002b560: c4 27 bf f4 st %g2, [ %fp + -12 ] 4002b564: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4002b568: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !loc.ops->evalformake_h ) { 4002b56c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002b570: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002b574: 80 a0 60 00 cmp %g1, 0 4002b578: 12 bf ff d6 bne 4002b4d0 4002b57c: 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 ); 4002b580: 40 00 61 27 call 40043a1c <__errno> <== NOT EXECUTED 4002b584: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b588: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002b58c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b590: 81 c7 e0 08 ret <== NOT EXECUTED 4002b594: 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 ); 4002b598: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002b59c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b5a0: 02 bf ff f8 be 4002b580 <== NOT EXECUTED 4002b5a4: 01 00 00 00 nop <== NOT EXECUTED 4002b5a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b5ac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002b5b0: 30 bf ff f4 b,a 4002b580 <== NOT EXECUTED 4001435c : int tcsetattr( int fd, int opt, struct termios *tp ) { 4001435c: 9d e3 bf a0 save %sp, -96, %sp switch (opt) { 40014360: 80 a6 60 00 cmp %i1, 0 40014364: 02 80 00 10 be 400143a4 40014368: 80 a6 60 01 cmp %i1, 1 4001436c: 02 80 00 08 be 4001438c <== NOT EXECUTED 40014370: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40014374: 40 00 10 51 call 400184b8 <__errno> <== NOT EXECUTED 40014378: 01 00 00 00 nop <== NOT EXECUTED 4001437c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40014380: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 40014384: 81 c7 e0 08 ret <== NOT EXECUTED 40014388: 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) 4001438c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40014390: 40 00 0c 95 call 400175e4 <== NOT EXECUTED 40014394: 94 10 20 00 clr %o2 <== NOT EXECUTED 40014398: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001439c: 06 bf ff fa bl 40014384 <== NOT EXECUTED 400143a0: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 400143a4: 40 00 0c 90 call 400175e4 400143a8: 93 e8 20 02 restore %g0, 2, %o1 400143ac: 01 00 00 00 nop 4000db58 : #include int unlink( const char *path ) { 4000db58: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4000db5c: 7f ff d1 42 call 40002064 4000db60: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 4000db64: a0 92 20 00 orcc %o0, 0, %l0 4000db68: 32 80 00 91 bne,a 4000ddac 4000db6c: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4000db70: c2 4e 00 00 ldsb [ %i0 ], %g1 4000db74: 80 a0 60 5c cmp %g1, 0x5c 4000db78: 02 80 00 13 be 4000dbc4 4000db7c: 80 a0 60 2f cmp %g1, 0x2f 4000db80: 02 80 00 11 be 4000dbc4 4000db84: 80 a0 60 00 cmp %g1, 0 4000db88: 02 80 00 10 be 4000dbc8 <== NOT EXECUTED 4000db8c: 03 10 00 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED 4000db90: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 4001b778 <== NOT EXECUTED 4000db94: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000db98: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4000db9c: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 4000dba0: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4000dba4: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 4000dba8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4000dbac: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED 4000dbb0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4000dbb4: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED 4000dbb8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4000dbbc: 10 80 00 0f b 4000dbf8 <== NOT EXECUTED 4000dbc0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED 4000dbc4: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000dbc8: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 4001b778 4000dbcc: a2 10 20 00 clr %l1 4000dbd0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000dbd4: c4 27 bf ec st %g2, [ %fp + -20 ] 4000dbd8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000dbdc: c4 27 bf f0 st %g2, [ %fp + -16 ] 4000dbe0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4000dbe4: c4 27 bf f4 st %g2, [ %fp + -12 ] 4000dbe8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4000dbec: c4 27 bf f8 st %g2, [ %fp + -8 ] 4000dbf0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000dbf4: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000dbf8: c2 07 bf ec ld [ %fp + -20 ], %g1 name = path + parentpathlen; 4000dbfc: b0 06 00 10 add %i0, %l0, %i0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000dc00: c2 27 bf d8 st %g1, [ %fp + -40 ] 4000dc04: c2 07 bf f0 ld [ %fp + -16 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000dc08: 90 10 00 18 mov %i0, %o0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000dc0c: c2 27 bf dc st %g1, [ %fp + -36 ] 4000dc10: 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 ), 4000dc14: a0 07 bf d8 add %fp, -40, %l0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000dc18: c2 27 bf e0 st %g1, [ %fp + -32 ] 4000dc1c: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000dc20: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000dc24: c2 07 bf fc ld [ %fp + -4 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000dc28: 40 00 04 74 call 4000edf8 4000dc2c: c2 27 bf e8 st %g1, [ %fp + -24 ] 4000dc30: 92 10 00 08 mov %o0, %o1 4000dc34: 7f ff d0 ed call 40001fe8 4000dc38: 90 10 00 18 mov %i0, %o0 4000dc3c: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000dc40: 40 00 04 6e call 4000edf8 4000dc44: 90 10 00 18 mov %i0, %o0 4000dc48: 94 10 20 00 clr %o2 4000dc4c: 92 10 00 08 mov %o0, %o1 4000dc50: 96 10 00 10 mov %l0, %o3 4000dc54: 90 10 00 18 mov %i0, %o0 4000dc58: 7f ff d1 23 call 400020e4 4000dc5c: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000dc60: 80 a2 20 00 cmp %o0, 0 4000dc64: 12 80 00 2a bne 4000dd0c 4000dc68: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4000dc6c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000dc70: 80 a0 60 00 cmp %g1, 0 4000dc74: 22 80 00 37 be,a 4000dd50 4000dc78: 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 ) { 4000dc7c: 9f c0 40 00 call %g1 4000dc80: 90 10 00 10 mov %l0, %o0 4000dc84: 80 a2 20 01 cmp %o0, 1 4000dc88: 02 80 00 53 be 4000ddd4 4000dc8c: 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 ) { 4000dc90: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000dc94: 80 a0 60 00 cmp %g1, 0 4000dc98: 02 80 00 2d be 4000dd4c 4000dc9c: 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 ); 4000dca0: 92 10 00 10 mov %l0, %o1 4000dca4: 9f c0 40 00 call %g1 4000dca8: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 4000dcac: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000dcb0: 80 a0 60 00 cmp %g1, 0 4000dcb4: 02 80 00 08 be 4000dcd4 4000dcb8: b0 10 00 08 mov %o0, %i0 4000dcbc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000dcc0: 80 a0 60 00 cmp %g1, 0 4000dcc4: 02 80 00 05 be 4000dcd8 4000dcc8: 80 8c 60 ff btst 0xff, %l1 4000dccc: 9f c0 40 00 call %g1 4000dcd0: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000dcd4: 80 8c 60 ff btst 0xff, %l1 4000dcd8: 02 80 00 0b be 4000dd04 4000dcdc: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000dce0: 80 a0 60 00 cmp %g1, 0 4000dce4: 02 80 00 56 be 4000de3c 4000dce8: 01 00 00 00 nop 4000dcec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000dcf0: 80 a0 60 00 cmp %g1, 0 4000dcf4: 02 80 00 52 be 4000de3c 4000dcf8: 01 00 00 00 nop 4000dcfc: 9f c0 40 00 call %g1 4000dd00: 90 10 00 12 mov %l2, %o0 4000dd04: 81 c7 e0 08 ret 4000dd08: 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 ) 4000dd0c: 80 8c 60 ff btst 0xff, %l1 4000dd10: 12 80 00 04 bne 4000dd20 4000dd14: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4000dd18: 81 c7 e0 08 ret <== NOT EXECUTED 4000dd1c: 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 ); 4000dd20: 80 a0 60 00 cmp %g1, 0 4000dd24: 02 bf ff f8 be 4000dd04 4000dd28: b0 10 3f ff mov -1, %i0 4000dd2c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000dd30: 80 a0 60 00 cmp %g1, 0 4000dd34: 02 bf ff f4 be 4000dd04 4000dd38: 90 07 bf ec add %fp, -20, %o0 4000dd3c: 9f c0 40 00 call %g1 4000dd40: 01 00 00 00 nop 4000dd44: 81 c7 e0 08 ret 4000dd48: 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 ); 4000dd4c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000dd50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dd54: 02 80 00 05 be 4000dd68 <== NOT EXECUTED 4000dd58: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000dd5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000dd60: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 4000dd64: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000dd68: 02 80 00 0b be 4000dd94 <== NOT EXECUTED 4000dd6c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4000dd70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dd74: 02 80 00 08 be 4000dd94 <== NOT EXECUTED 4000dd78: 01 00 00 00 nop <== NOT EXECUTED 4000dd7c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000dd80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dd84: 02 80 00 04 be 4000dd94 <== NOT EXECUTED 4000dd88: 01 00 00 00 nop <== NOT EXECUTED 4000dd8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000dd90: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000dd94: 40 00 00 62 call 4000df1c <__errno> <== NOT EXECUTED 4000dd98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000dd9c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000dda0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000dda4: 81 c7 e0 08 ret <== NOT EXECUTED 4000dda8: 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, 4000ddac: 92 10 00 10 mov %l0, %o1 4000ddb0: 94 10 20 02 mov 2, %o2 4000ddb4: 96 07 bf ec add %fp, -20, %o3 4000ddb8: 7f ff d1 0c call 400021e8 4000ddbc: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4000ddc0: 80 a2 20 00 cmp %o0, 0 4000ddc4: 12 bf ff d5 bne 4000dd18 4000ddc8: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ddcc: 10 bf ff 8c b 4000dbfc 4000ddd0: 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 ); 4000ddd4: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000ddd8: 80 a0 60 00 cmp %g1, 0 4000dddc: 02 80 00 09 be 4000de00 4000dde0: 80 8c 60 ff btst 0xff, %l1 4000dde4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000dde8: 80 a0 60 00 cmp %g1, 0 4000ddec: 02 80 00 05 be 4000de00 4000ddf0: 80 8c 60 ff btst 0xff, %l1 4000ddf4: 9f c0 40 00 call %g1 4000ddf8: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000ddfc: 80 8c 60 ff btst 0xff, %l1 4000de00: 02 80 00 0b be 4000de2c 4000de04: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000de08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000de0c: 02 80 00 08 be 4000de2c <== NOT EXECUTED 4000de10: 01 00 00 00 nop <== NOT EXECUTED 4000de14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000de18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000de1c: 02 80 00 04 be 4000de2c <== NOT EXECUTED 4000de20: 01 00 00 00 nop <== NOT EXECUTED 4000de24: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000de28: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4000de2c: 40 00 00 3c call 4000df1c <__errno> 4000de30: b0 10 3f ff mov -1, %i0 4000de34: 82 10 20 15 mov 0x15, %g1 4000de38: c2 22 00 00 st %g1, [ %o0 ] 4000de3c: 81 c7 e0 08 ret 4000de40: 81 e8 00 00 restore 4000aef8 : */ int unmount( const char *path ) { 4000aef8: 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 ) ) 4000aefc: 40 00 fd f3 call 4004a6c8 4000af00: 90 10 00 18 mov %i0, %o0 4000af04: a0 07 bf ec add %fp, -20, %l0 4000af08: 92 10 00 08 mov %o0, %o1 4000af0c: 94 10 20 00 clr %o2 4000af10: 90 10 00 18 mov %i0, %o0 4000af14: 96 10 00 10 mov %l0, %o3 4000af18: 7f ff f0 73 call 400070e4 4000af1c: 98 10 20 01 mov 1, %o4 4000af20: 80 a2 20 00 cmp %o0, 0 4000af24: 12 80 00 3e bne 4000b01c 4000af28: 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; 4000af2c: c2 07 bf ec ld [ %fp + -20 ], %g1 4000af30: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 4000af34: 80 a0 80 01 cmp %g2, %g1 4000af38: 12 80 00 41 bne 4000b03c 4000af3c: 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 ); 4000af40: 80 a0 60 00 cmp %g1, 0 4000af44: 22 80 00 09 be,a 4000af68 4000af48: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000af4c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000af50: 80 a0 60 00 cmp %g1, 0 4000af54: 22 80 00 05 be,a 4000af68 4000af58: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000af5c: 9f c0 40 00 call %g1 4000af60: 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; 4000af64: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000af68: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000af6c: 80 a0 60 00 cmp %g1, 0 4000af70: 02 80 00 61 be 4000b0f4 4000af74: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 4000af78: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000af7c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000af80: 80 a0 60 00 cmp %g1, 0 4000af84: 02 80 00 5c be 4000b0f4 4000af88: 03 10 01 a5 sethi %hi(0x40069400), %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 ) 4000af8c: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40069508 4000af90: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000af94: 80 a0 40 11 cmp %g1, %l1 4000af98: 02 80 00 23 be 4000b024 4000af9c: 07 10 01 b4 sethi %hi(0x4006d000), %g3 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000afa0: c2 00 e2 40 ld [ %g3 + 0x240 ], %g1 ! 4006d240 4000afa4: 86 10 e2 40 or %g3, 0x240, %g3 4000afa8: 86 00 e0 04 add %g3, 4, %g3 4000afac: 80 a0 40 03 cmp %g1, %g3 4000afb0: 02 80 00 0f be 4000afec 4000afb4: 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 ) { 4000afb8: c8 04 60 2c ld [ %l1 + 0x2c ], %g4 4000afbc: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000afc0: 80 a0 80 04 cmp %g2, %g4 4000afc4: 32 80 00 07 bne,a 4000afe0 4000afc8: c2 00 40 00 ld [ %g1 ], %g1 4000afcc: 30 80 00 16 b,a 4000b024 <== NOT EXECUTED 4000afd0: 80 a1 00 02 cmp %g4, %g2 4000afd4: 02 80 00 14 be 4000b024 4000afd8: 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 ) { 4000afdc: 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; 4000afe0: 80 a0 40 03 cmp %g1, %g3 4000afe4: 32 bf ff fb bne,a 4000afd0 4000afe8: 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 ) 4000afec: 7f ff f1 3e call 400074e4 4000aff0: 90 10 00 11 mov %l1, %o0 4000aff4: 80 a2 20 01 cmp %o0, 1 4000aff8: 02 80 00 0b be 4000b024 4000affc: 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 ) 4000b000: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b004: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b008: 9f c0 40 00 call %g1 4000b00c: 90 10 00 11 mov %l1, %o0 4000b010: 80 a2 20 00 cmp %o0, 0 4000b014: 22 80 00 19 be,a 4000b078 4000b018: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4000b01c: 81 c7 e0 08 ret 4000b020: 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 ); 4000b024: 40 00 e2 7e call 40043a1c <__errno> 4000b028: b0 10 3f ff mov -1, %i0 4000b02c: 82 10 20 10 mov 0x10, %g1 4000b030: c2 22 00 00 st %g1, [ %o0 ] 4000b034: 81 c7 e0 08 ret 4000b038: 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 ); 4000b03c: 80 a0 60 00 cmp %g1, 0 4000b040: 02 80 00 08 be 4000b060 4000b044: 01 00 00 00 nop 4000b048: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b04c: 80 a0 60 00 cmp %g1, 0 4000b050: 02 80 00 04 be 4000b060 4000b054: 01 00 00 00 nop 4000b058: 9f c0 40 00 call %g1 4000b05c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4000b060: 40 00 e2 6f call 40043a1c <__errno> 4000b064: b0 10 3f ff mov -1, %i0 4000b068: 82 10 20 0d mov 0xd, %g1 4000b06c: c2 22 00 00 st %g1, [ %o0 ] 4000b070: 81 c7 e0 08 ret 4000b074: 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){ 4000b078: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000b07c: 9f c0 40 00 call %g1 4000b080: 90 10 00 11 mov %l1, %o0 4000b084: 80 a2 20 00 cmp %o0, 0 4000b088: 32 80 00 13 bne,a 4000b0d4 4000b08c: 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 ); 4000b090: 40 00 06 23 call 4000c91c <_Chain_Extract> 4000b094: 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 ); 4000b098: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b09c: 80 a0 60 00 cmp %g1, 0 4000b0a0: 02 80 00 09 be 4000b0c4 4000b0a4: 90 10 00 11 mov %l1, %o0 4000b0a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b0ac: 80 a0 60 00 cmp %g1, 0 4000b0b0: 02 80 00 05 be 4000b0c4 4000b0b4: 01 00 00 00 nop 4000b0b8: 9f c0 40 00 call %g1 4000b0bc: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 4000b0c0: 90 10 00 11 mov %l1, %o0 4000b0c4: 7f ff f0 43 call 400071d0 4000b0c8: b0 10 20 00 clr %i0 return 0; 4000b0cc: 81 c7 e0 08 ret 4000b0d0: 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 ) 4000b0d4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 4000b0d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b0dc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b0e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b0e4: 02 bf ff ce be 4000b01c <== NOT EXECUTED 4000b0e8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4000b0ec: 40 00 05 2c call 4000c59c <== NOT EXECUTED 4000b0f0: 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 ); 4000b0f4: 40 00 e2 4a call 40043a1c <__errno> <== NOT EXECUTED 4000b0f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b0fc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000b100: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b104: 81 c7 e0 08 ret <== NOT EXECUTED 4000b108: 81 e8 00 00 restore <== NOT EXECUTED 4002b650 : int utime( const char *path, const struct utimbuf *times ) { 4002b650: 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 ) ) 4002b654: 40 00 7c 1d call 4004a6c8 4002b658: 90 10 00 18 mov %i0, %o0 4002b65c: a0 07 bf ec add %fp, -20, %l0 4002b660: 92 10 00 08 mov %o0, %o1 4002b664: 94 10 20 00 clr %o2 4002b668: 90 10 00 18 mov %i0, %o0 4002b66c: 96 10 00 10 mov %l0, %o3 4002b670: 98 10 20 01 mov 1, %o4 4002b674: 7f ff 6e 9c call 400070e4 4002b678: b0 10 3f ff mov -1, %i0 4002b67c: 80 a2 20 00 cmp %o0, 0 4002b680: 12 80 00 14 bne 4002b6d0 4002b684: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 4002b688: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 4002b68c: 80 a0 60 00 cmp %g1, 0 4002b690: 22 80 00 12 be,a 4002b6d8 4002b694: 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 ); 4002b698: d4 06 60 04 ld [ %i1 + 4 ], %o2 4002b69c: d2 06 40 00 ld [ %i1 ], %o1 4002b6a0: 9f c0 40 00 call %g1 4002b6a4: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 4002b6a8: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002b6ac: 80 a0 60 00 cmp %g1, 0 4002b6b0: 02 80 00 08 be 4002b6d0 4002b6b4: b0 10 00 08 mov %o0, %i0 4002b6b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002b6bc: 80 a0 60 00 cmp %g1, 0 4002b6c0: 02 80 00 0f be 4002b6fc 4002b6c4: 01 00 00 00 nop 4002b6c8: 9f c0 40 00 call %g1 4002b6cc: 90 10 00 10 mov %l0, %o0 return result; } 4002b6d0: 81 c7 e0 08 ret 4002b6d4: 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 ); 4002b6d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b6dc: 02 80 00 04 be 4002b6ec <== NOT EXECUTED 4002b6e0: 01 00 00 00 nop <== NOT EXECUTED 4002b6e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002b6e8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002b6ec: 40 00 60 cc call 40043a1c <__errno> <== NOT EXECUTED 4002b6f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b6f4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002b6f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002b6fc: 81 c7 e0 08 ret <== NOT EXECUTED 4002b700: 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 6d sethi %hi(0x4001b400), %l4 40004ef4: 3b 10 00 6a sethi %hi(0x4001a800), %i5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40004ef8: 37 10 00 6a sethi %hi(0x4001a800), %i3 bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 40004efc: a8 15 23 5c or %l4, 0x35c, %l4 40004f00: ba 17 61 80 or %i5, 0x180, %i5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40004f04: b6 16 e0 08 or %i3, 8, %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 49 3c call 40017560 <.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 48 f9 call 40017478 <.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 49 2d call 40017560 <.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 40019e98 : ssize_t write( int fd, const void *buffer, size_t count ) { 40019e98: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40019e9c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40019ea0: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 4001b664 40019ea4: 80 a6 00 01 cmp %i0, %g1 40019ea8: 1a 80 00 23 bcc 40019f34 40019eac: 03 10 00 6f sethi %hi(0x4001bc00), %g1 iop = rtems_libio_iop( fd ); 40019eb0: e0 00 62 28 ld [ %g1 + 0x228 ], %l0 ! 4001be28 40019eb4: 83 2e 20 06 sll %i0, 6, %g1 40019eb8: b1 2e 20 03 sll %i0, 3, %i0 40019ebc: b0 06 00 01 add %i0, %g1, %i0 40019ec0: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 40019ec4: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40019ec8: 80 88 61 00 btst 0x100, %g1 40019ecc: 02 80 00 1a be 40019f34 40019ed0: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 40019ed4: 02 80 00 1e be 40019f4c 40019ed8: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40019edc: 02 80 00 14 be 40019f2c 40019ee0: b0 10 20 00 clr %i0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40019ee4: 80 88 60 04 btst 4, %g1 40019ee8: 02 80 00 19 be 40019f4c 40019eec: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 40019ef0: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40019ef4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40019ef8: 80 a0 60 00 cmp %g1, 0 40019efc: 02 80 00 1a be 40019f64 40019f00: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 40019f04: 94 10 00 1a mov %i2, %o2 40019f08: 9f c0 40 00 call %g1 40019f0c: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 40019f10: b0 92 20 00 orcc %o0, 0, %i0 40019f14: 04 80 00 06 ble 40019f2c 40019f18: 85 3e 20 1f sra %i0, 0x1f, %g2 iop->offset += rc; 40019f1c: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 40019f20: 86 83 40 18 addcc %o5, %i0, %g3 40019f24: 84 43 00 02 addx %o4, %g2, %g2 40019f28: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 40019f2c: 81 c7 e0 08 ret 40019f30: 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 ); 40019f34: 7f ff cf fa call 4000df1c <__errno> <== NOT EXECUTED 40019f38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019f3c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40019f40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019f44: 81 c7 e0 08 ret <== NOT EXECUTED 40019f48: 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 ); 40019f4c: 7f ff cf f4 call 4000df1c <__errno> <== NOT EXECUTED 40019f50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019f54: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40019f58: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019f5c: 81 c7 e0 08 ret <== NOT EXECUTED 40019f60: 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 ); 40019f64: 7f ff cf ee call 4000df1c <__errno> <== NOT EXECUTED 40019f68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019f6c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40019f70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019f74: 81 c7 e0 08 ret <== NOT EXECUTED 40019f78: 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 81 sethi %hi(0x40020400), %g1 40006f34: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 40020464 40006f38: 80 a6 00 01 cmp %i0, %g1 40006f3c: 1a 80 00 58 bcc 4000709c 40006f40: 03 10 00 84 sethi %hi(0x40021000), %g1 iop = rtems_libio_iop( fd ); 40006f44: e6 00 63 fc ld [ %g1 + 0x3fc ], %l3 ! 400213fc 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 26 46 call 400108f4 <__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 26 16 call 400108f4 <__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 26 10 call 400108f4 <__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