4000e0bc : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000e0bc: 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 ) 4000e0c0: 80 a6 20 00 cmp %i0, 0 4000e0c4: 12 80 00 04 bne 4000e0d4 4000e0c8: a0 10 20 00 clr %l0 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000e0cc: 81 c7 e0 08 ret <== NOT EXECUTED 4000e0d0: 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 ); 4000e0d4: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000e0d8: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001c928 4000e0dc: 92 10 00 1a mov %i2, %o1 4000e0e0: d4 10 60 2c lduh [ %g1 + 0x2c ], %o2 4000e0e4: 90 10 00 19 mov %i1, %o0 4000e0e8: b6 2e c0 0a andn %i3, %o2, %i3 4000e0ec: 95 2e e0 10 sll %i3, 0x10, %o2 4000e0f0: 7f ff ff ca call 4000e018 4000e0f4: 95 32 a0 10 srl %o2, 0x10, %o2 if ( !node ) 4000e0f8: a0 92 20 00 orcc %o0, 0, %l0 4000e0fc: 02 bf ff f4 be 4000e0cc 4000e100: 80 a6 60 07 cmp %i1, 7 return NULL; /* * Set the type specific information */ switch (type) { 4000e104: 28 80 00 0a bleu,a 4000e12c 4000e108: b3 2e 60 02 sll %i1, 2, %i1 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4000e10c: 11 10 00 6f sethi %hi(0x4001bc00), %o0 <== NOT EXECUTED 4000e110: 15 10 00 70 sethi %hi(0x4001c000), %o2 <== NOT EXECUTED 4000e114: 17 10 00 6e sethi %hi(0x4001b800), %o3 <== NOT EXECUTED 4000e118: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 4000e11c: 94 12 a0 18 or %o2, 0x18, %o2 <== NOT EXECUTED 4000e120: 96 12 e0 b0 or %o3, 0xb0, %o3 <== NOT EXECUTED 4000e124: 7f ff d3 c9 call 40003048 <__assert_func> <== NOT EXECUTED 4000e128: 92 10 20 5c mov 0x5c, %o1 <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4000e12c: 03 10 00 37 sethi %hi(0x4000dc00), %g1 4000e130: 82 10 63 f8 or %g1, 0x3f8, %g1 ! 4000dff8 4000e134: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000e138: 81 c0 40 00 jmp %g1 4000e13c: 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; 4000e140: c2 07 00 00 ld [ %i4 ], %g1 4000e144: 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; 4000e148: 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; 4000e14c: d0 06 00 00 ld [ %i0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 4000e150: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 4000e154: d0 24 20 08 st %o0, [ %l0 + 8 ] node->st_ino = ++fs_info->ino_count; 4000e158: 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 ); 4000e15c: 90 02 20 50 add %o0, 0x50, %o0 4000e160: 82 00 60 01 inc %g1 4000e164: c2 20 80 00 st %g1, [ %g2 ] 4000e168: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 4000e16c: 92 10 00 10 mov %l0, %o1 4000e170: 7f ff e5 38 call 40007650 <_Chain_Append> 4000e174: b0 10 00 10 mov %l0, %i0 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000e178: 81 c7 e0 08 ret 4000e17c: 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; 4000e180: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 4000e184: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000e188: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000e18c: c0 24 20 50 clr [ %l0 + 0x50 ] 4000e190: c0 24 20 54 clr [ %l0 + 0x54 ] node->info.file.indirect = 0; 4000e194: c0 24 20 58 clr [ %l0 + 0x58 ] node->info.file.doubly_indirect = 0; 4000e198: c0 24 20 5c clr [ %l0 + 0x5c ] node->info.file.triply_indirect = 0; break; 4000e19c: 10 bf ff eb b 4000e148 4000e1a0: c0 24 20 60 clr [ %l0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 4000e1a4: 10 bf ff e9 b 4000e148 4000e1a8: 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; 4000e1ac: 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; 4000e1b0: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 4000e1b4: c4 24 20 54 st %g2, [ %l0 + 0x54 ] break; 4000e1b8: 10 bf ff e4 b 4000e148 4000e1bc: 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); 4000e1c0: 82 04 20 54 add %l0, 0x54, %g1 the_chain->permanent_null = NULL; 4000e1c4: 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); 4000e1c8: c2 24 20 50 st %g1, [ %l0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000e1cc: 82 04 20 50 add %l0, 0x50, %g1 4000e1d0: 10 bf ff de b 4000e148 4000e1d4: c2 24 20 58 st %g1, [ %l0 + 0x58 ] 40004e08 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40004e08: 9d e3 bf a0 save %sp, -96, %sp rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40004e0c: 80 a6 20 00 cmp %i0, 0 40004e10: 02 80 00 2b be 40004ebc 40004e14: 80 a6 60 00 cmp %i1, 0 assert( level >= 0 ); 40004e18: 06 80 00 38 bl 40004ef8 40004e1c: 11 10 00 94 sethi %hi(0x40025000), %o0 assert( the_directory->type == IMFS_DIRECTORY ); 40004e20: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40004e24: 80 a0 60 01 cmp %g1, 1 40004e28: 12 80 00 2d bne 40004edc 40004e2c: a8 06 20 54 add %i0, 0x54, %l4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004e30: e6 06 20 50 ld [ %i0 + 0x50 ], %l3 40004e34: 80 a4 c0 14 cmp %l3, %l4 40004e38: 02 80 00 1b be 40004ea4 40004e3c: 25 10 00 9b sethi %hi(0x40026c00), %l2 40004e40: 23 10 00 95 sethi %hi(0x40025400), %l1 40004e44: a4 14 a2 18 or %l2, 0x218, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40004e48: a2 14 60 00 mov %l1, %l1 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40004e4c: aa 06 60 01 add %i1, 1, %l5 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 40004e50: a0 10 20 00 clr %l0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40004e54: c2 04 80 00 ld [ %l2 ], %g1 40004e58: 90 10 00 11 mov %l1, %o0 40004e5c: d6 00 60 08 ld [ %g1 + 8 ], %o3 40004e60: 92 10 20 01 mov 1, %o1 40004e64: 40 00 40 5c call 40014fd4 40004e68: 94 10 20 04 mov 4, %o2 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 40004e6c: a0 04 20 01 inc %l0 40004e70: 80 a6 40 10 cmp %i1, %l0 40004e74: 36 bf ff f9 bge,a 40004e58 40004e78: c2 04 80 00 ld [ %l2 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40004e7c: 7f ff ff 7d call 40004c70 40004e80: 90 10 00 13 mov %l3, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40004e84: c2 04 e0 48 ld [ %l3 + 0x48 ], %g1 40004e88: 80 a0 60 01 cmp %g1, 1 40004e8c: 22 80 00 08 be,a 40004eac 40004e90: 90 10 00 13 mov %l3, %o0 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 40004e94: e6 04 c0 00 ld [ %l3 ], %l3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004e98: 80 a4 c0 14 cmp %l3, %l4 40004e9c: 12 bf ff ee bne 40004e54 40004ea0: a0 10 20 00 clr %l0 40004ea4: 81 c7 e0 08 ret 40004ea8: 81 e8 00 00 restore for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40004eac: 7f ff ff d7 call 40004e08 40004eb0: 92 10 00 15 mov %l5, %o1 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 40004eb4: 10 bf ff f9 b 40004e98 40004eb8: e6 04 c0 00 ld [ %l3 ], %l3 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40004ebc: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004ec0: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 40004ec4: 17 10 00 94 sethi %hi(0x40025000), %o3 <== NOT EXECUTED 40004ec8: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED 40004ecc: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED 40004ed0: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED 40004ed4: 40 00 02 01 call 400056d8 <__assert_func> <== NOT EXECUTED 40004ed8: 92 10 20 84 mov 0x84, %o1 <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 40004edc: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 40004ee0: 17 10 00 94 sethi %hi(0x40025000), %o3 <== NOT EXECUTED 40004ee4: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED 40004ee8: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED 40004eec: 96 12 e3 d8 or %o3, 0x3d8, %o3 <== NOT EXECUTED 40004ef0: 40 00 01 fa call 400056d8 <__assert_func> <== NOT EXECUTED 40004ef4: 92 10 20 88 mov 0x88, %o1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 40004ef8: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 40004efc: 17 10 00 94 sethi %hi(0x40025000), %o3 <== NOT EXECUTED 40004f00: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED 40004f04: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED 40004f08: 96 12 e3 c8 or %o3, 0x3c8, %o3 <== NOT EXECUTED 40004f0c: 40 00 01 f3 call 400056d8 <__assert_func> <== NOT EXECUTED 40004f10: 92 10 20 86 mov 0x86, %o1 <== NOT EXECUTED 40004f14: 01 00 00 00 nop 4000ac68 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000ac68: 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; 4000ac6c: 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 ) 4000ac70: 2b 10 00 72 sethi %hi(0x4001c800), %l5 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000ac74: 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 ) 4000ac78: aa 15 61 28 or %l5, 0x128, %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000ac7c: a4 10 20 00 clr %l2 4000ac80: a6 07 bf d8 add %fp, -40, %l3 4000ac84: 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 ); 4000ac88: 90 04 40 12 add %l1, %l2, %o0 4000ac8c: 92 10 00 19 mov %i1, %o1 4000ac90: 94 10 00 13 mov %l3, %o2 4000ac94: 40 00 02 75 call 4000b668 4000ac98: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000ac9c: 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 ); 4000aca0: ac 10 00 08 mov %o0, %l6 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000aca4: 80 a0 60 00 cmp %g1, 0 4000aca8: 02 80 00 5b be 4000ae14 4000acac: 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; 4000acb0: 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 ) 4000acb4: 80 a2 20 00 cmp %o0, 0 4000acb8: 12 80 00 11 bne 4000acfc 4000acbc: 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 ) { 4000acc0: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000acc4: 80 a0 a0 01 cmp %g2, 1 4000acc8: 22 80 00 62 be,a 4000ae50 4000accc: c8 00 60 5c ld [ %g1 + 0x5c ], %g4 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000acd0: 7f ff ff 61 call 4000aa54 4000acd4: 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; 4000acd8: c2 06 c0 00 ld [ %i3 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4000acdc: 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; 4000ace0: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 4000ace4: 82 0e 80 01 and %i2, %g1, %g1 4000ace8: 80 a6 80 01 cmp %i2, %g1 4000acec: 12 80 00 44 bne 4000adfc 4000acf0: b0 10 00 08 mov %o0, %i0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000acf4: 81 c7 e0 08 ret 4000acf8: 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 ) 4000acfc: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 4000ad00: 80 a0 a0 01 cmp %g2, 1 4000ad04: 02 80 00 3a be 4000adec 4000ad08: 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 ) { 4000ad0c: 80 a5 a0 03 cmp %l6, 3 4000ad10: 02 80 00 0a be 4000ad38 4000ad14: 80 a5 a0 04 cmp %l6, 4 4000ad18: 02 80 00 2f be 4000add4 4000ad1c: 80 a5 a0 02 cmp %l6, 2 4000ad20: 02 80 00 1a be 4000ad88 4000ad24: 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) ) { 4000ad28: 12 bf ff d9 bne 4000ac8c 4000ad2c: 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 ) { 4000ad30: 10 bf ff e5 b 4000acc4 <== NOT EXECUTED 4000ad34: 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 ) { 4000ad38: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000ad3c: 80 a0 60 03 cmp %g1, 3 4000ad40: 02 80 00 3b be 4000ae2c 4000ad44: 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 ) { 4000ad48: 02 80 00 66 be 4000aee0 4000ad4c: 90 10 00 1b mov %i3, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000ad50: 80 a0 60 01 cmp %g1, 1 4000ad54: 12 80 00 55 bne 4000aea8 4000ad58: 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 ) { 4000ad5c: c8 04 20 5c ld [ %l0 + 0x5c ], %g4 4000ad60: 80 a1 20 00 cmp %g4, 0 4000ad64: 12 80 00 57 bne 4000aec0 4000ad68: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000ad6c: 40 00 02 0e call 4000b5a4 4000ad70: 92 10 00 13 mov %l3, %o1 if ( !node ) 4000ad74: a0 92 20 00 orcc %o0, 0, %l0 4000ad78: 02 80 00 27 be 4000ae14 4000ad7c: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 4000ad80: 10 bf ff c2 b 4000ac88 4000ad84: 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 ) 4000ad88: c4 05 40 00 ld [ %l5 ], %g2 4000ad8c: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 4000ad90: 80 a0 40 02 cmp %g1, %g2 4000ad94: 02 bf ff be be 4000ac8c 4000ad98: 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) { 4000ad9c: c8 06 e0 10 ld [ %i3 + 0x10 ], %g4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000ada0: c4 01 20 1c ld [ %g4 + 0x1c ], %g2 4000ada4: 80 a0 40 02 cmp %g1, %g2 4000ada8: 22 80 00 56 be,a 4000af00 4000adac: c4 01 20 14 ld [ %g4 + 0x14 ], %g2 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4000adb0: e0 00 60 08 ld [ %g1 + 8 ], %l0 4000adb4: 80 a4 20 00 cmp %l0, 0 4000adb8: 32 bf ff b5 bne,a 4000ac8c 4000adbc: e0 26 c0 00 st %l0, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000adc0: 40 00 10 d8 call 4000f120 <__errno> 4000adc4: b0 10 3f ff mov -1, %i0 4000adc8: ec 22 00 00 st %l6, [ %o0 ] 4000adcc: 81 c7 e0 08 ret 4000add0: 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 ); 4000add4: 40 00 10 d3 call 4000f120 <__errno> 4000add8: b0 10 3f ff mov -1, %i0 4000addc: 82 10 20 5b mov 0x5b, %g1 4000ade0: c2 22 00 00 st %g1, [ %o0 ] 4000ade4: 81 c7 e0 08 ret 4000ade8: 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 ) 4000adec: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 4000adf0: 80 88 a0 40 btst 0x40, %g2 4000adf4: 12 bf ff c7 bne 4000ad10 4000adf8: 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 ); 4000adfc: 40 00 10 c9 call 4000f120 <__errno> 4000ae00: b0 10 3f ff mov -1, %i0 4000ae04: 82 10 20 0d mov 0xd, %g1 4000ae08: c2 22 00 00 st %g1, [ %o0 ] 4000ae0c: 81 c7 e0 08 ret 4000ae10: 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 ); 4000ae14: 40 00 10 c3 call 4000f120 <__errno> 4000ae18: b0 10 3f ff mov -1, %i0 4000ae1c: 82 10 20 02 mov 2, %g1 4000ae20: c2 22 00 00 st %g1, [ %o0 ] 4000ae24: 81 c7 e0 08 ret 4000ae28: 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 ); 4000ae2c: 90 10 00 1b mov %i3, %o0 4000ae30: 7f ff ff 33 call 4000aafc 4000ae34: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000ae38: e0 06 c0 00 ld [ %i3 ], %l0 if ( !node ) 4000ae3c: 80 a4 20 00 cmp %l0, 0 4000ae40: 02 80 00 1a be 4000aea8 4000ae44: 01 00 00 00 nop } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4000ae48: 10 bf ff c2 b 4000ad50 4000ae4c: 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 ) { 4000ae50: 80 a1 20 00 cmp %g4, 0 4000ae54: 02 bf ff 9f be 4000acd0 4000ae58: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 4000ae5c: c4 01 20 28 ld [ %g4 + 0x28 ], %g2 *pathloc = newloc; 4000ae60: 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; 4000ae64: d8 01 20 24 ld [ %g4 + 0x24 ], %o4 4000ae68: da 01 20 20 ld [ %g4 + 0x20 ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000ae6c: 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; 4000ae70: 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], 4000ae74: 92 06 40 03 add %i1, %g3, %o1 4000ae78: 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; 4000ae7c: d6 26 e0 10 st %o3, [ %i3 + 0x10 ] 4000ae80: d8 26 e0 08 st %o4, [ %i3 + 8 ] 4000ae84: da 26 e0 04 st %o5, [ %i3 + 4 ] 4000ae88: c8 26 c0 00 st %g4, [ %i3 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000ae8c: 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; 4000ae90: c4 26 e0 0c st %g2, [ %i3 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000ae94: 94 10 00 1a mov %i2, %o2 4000ae98: 9f c0 40 00 call %g1 4000ae9c: 96 10 00 1b mov %i3, %o3 4000aea0: 81 c7 e0 08 ret 4000aea4: 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 ); 4000aea8: 40 00 10 9e call 4000f120 <__errno> 4000aeac: b0 10 3f ff mov -1, %i0 4000aeb0: 82 10 20 14 mov 0x14, %g1 4000aeb4: c2 22 00 00 st %g1, [ %o0 ] 4000aeb8: 81 c7 e0 08 ret 4000aebc: 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; 4000aec0: c4 01 20 28 ld [ %g4 + 0x28 ], %g2 *pathloc = newloc; 4000aec4: 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; 4000aec8: d8 01 20 24 ld [ %g4 + 0x24 ], %o4 4000aecc: da 01 20 20 ld [ %g4 + 0x20 ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000aed0: c2 00 80 00 ld [ %g2 ], %g1 4000aed4: 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; 4000aed8: 10 bf ff e7 b 4000ae74 4000aedc: 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 ); 4000aee0: 7f ff ff 22 call 4000ab68 4000aee4: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000aee8: e0 06 c0 00 ld [ %i3 ], %l0 if ( result == -1 ) 4000aeec: 80 a2 3f ff cmp %o0, -1 4000aef0: 02 bf ff 81 be 4000acf4 4000aef4: 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; 4000aef8: 10 bf ff 96 b 4000ad50 4000aefc: 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; 4000af00: 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; 4000af04: d8 01 20 10 ld [ %g4 + 0x10 ], %o4 4000af08: da 01 20 0c ld [ %g4 + 0xc ], %o5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4000af0c: 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; 4000af10: 10 bf ff d9 b 4000ae74 4000af14: c8 01 20 08 ld [ %g4 + 8 ], %g4 4000aff0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000aff0: 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; 4000aff4: e0 06 40 00 ld [ %i1 ], %l0 /* * Get the path length. */ pathlen = strlen( path ); 4000aff8: 90 10 00 18 mov %i0, %o0 4000affc: 40 00 14 00 call 4000fffc 4000b000: 2d 10 00 72 sethi %hi(0x4001c800), %l6 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000b004: a2 10 00 18 mov %i0, %l1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4000b008: a6 10 20 00 clr %l3 4000b00c: a8 07 bf d8 add %fp, -40, %l4 4000b010: aa 07 bf fc add %fp, -4, %l5 4000b014: 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 ) 4000b018: ac 15 a1 28 or %l6, 0x128, %l6 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4000b01c: 92 10 00 12 mov %l2, %o1 4000b020: 90 04 40 13 add %l1, %l3, %o0 4000b024: 94 10 00 14 mov %l4, %o2 4000b028: 40 00 01 90 call 4000b668 4000b02c: 96 10 00 15 mov %l5, %o3 pathlen -= len; 4000b030: c6 07 bf fc ld [ %fp + -4 ], %g3 i += len; if ( !pathloc->node_access ) 4000b034: 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 ); 4000b038: ae 10 00 08 mov %o0, %l7 pathlen -= len; i += len; if ( !pathloc->node_access ) 4000b03c: 80 a0 60 00 cmp %g1, 0 4000b040: 02 80 00 67 be 4000b1dc 4000b044: a4 24 80 03 sub %l2, %g3, %l2 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000b048: 80 a2 20 00 cmp %o0, 0 4000b04c: 32 80 00 08 bne,a 4000b06c 4000b050: 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 ); 4000b054: 40 00 10 33 call 4000f120 <__errno> 4000b058: b0 10 3f ff mov -1, %i0 4000b05c: 82 10 20 11 mov 0x11, %g1 4000b060: c2 22 00 00 st %g1, [ %o0 ] 4000b064: 81 c7 e0 08 ret 4000b068: 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 ) 4000b06c: 80 a0 a0 01 cmp %g2, 1 4000b070: 02 80 00 46 be 4000b188 4000b074: 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 ) { 4000b078: 80 a5 e0 02 cmp %l7, 2 4000b07c: 02 80 00 30 be 4000b13c 4000b080: a6 04 c0 03 add %l3, %g3, %l3 4000b084: 80 a5 e0 02 cmp %l7, 2 4000b088: 08 80 00 0d bleu 4000b0bc 4000b08c: 80 a5 e0 00 cmp %l7, 0 4000b090: 80 a5 e0 03 cmp %l7, 3 4000b094: 02 80 00 12 be 4000b0dc 4000b098: 80 a5 e0 04 cmp %l7, 4 4000b09c: 12 bf ff e1 bne 4000b020 4000b0a0: 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 ); 4000b0a4: 40 00 10 1f call 4000f120 <__errno> 4000b0a8: b0 10 3f ff mov -1, %i0 4000b0ac: 82 10 20 5b mov 0x5b, %g1 4000b0b0: c2 22 00 00 st %g1, [ %o0 ] 4000b0b4: 81 c7 e0 08 ret 4000b0b8: 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 ) { 4000b0bc: 12 bf ff d9 bne 4000b020 4000b0c0: 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 ); 4000b0c4: 40 00 10 17 call 4000f120 <__errno> <== NOT EXECUTED 4000b0c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b0cc: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 4000b0d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b0d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b0d8: 81 e8 00 00 restore <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4000b0dc: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000b0e0: 80 a0 60 03 cmp %g1, 3 4000b0e4: 02 80 00 7b be 4000b2d0 4000b0e8: 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 ) { 4000b0ec: 02 80 00 7a be 4000b2d4 4000b0f0: 90 10 00 19 mov %i1, %o0 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 4000b0f4: 80 a4 20 00 cmp %l0, 0 4000b0f8: 02 80 00 5d be 4000b26c 4000b0fc: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000b100: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000b104: 80 a0 60 01 cmp %g1, 1 4000b108: 12 80 00 59 bne 4000b26c 4000b10c: 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 ) { 4000b110: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 4000b114: 80 a0 e0 00 cmp %g3, 0 4000b118: 12 80 00 5b bne 4000b284 4000b11c: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000b120: 40 00 01 21 call 4000b5a4 4000b124: 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 ) 4000b128: a0 92 20 00 orcc %o0, 0, %l0 4000b12c: 02 80 00 21 be 4000b1b0 4000b130: c2 07 bf fc ld [ %fp + -4 ], %g1 done = true; else pathloc->node_access = node; 4000b134: 10 bf ff ba b 4000b01c 4000b138: 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 ) 4000b13c: c4 05 80 00 ld [ %l6 ], %g2 4000b140: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 4000b144: 80 a0 40 02 cmp %g1, %g2 4000b148: 02 bf ff b6 be 4000b020 4000b14c: 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){ 4000b150: c8 06 60 10 ld [ %i1 + 0x10 ], %g4 4000b154: c4 01 20 1c ld [ %g4 + 0x1c ], %g2 4000b158: 80 a0 40 02 cmp %g1, %g2 4000b15c: 22 80 00 65 be,a 4000b2f0 4000b160: c4 01 20 14 ld [ %g4 + 0x14 ], %g2 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4000b164: e0 00 60 08 ld [ %g1 + 8 ], %l0 4000b168: 80 a4 20 00 cmp %l0, 0 4000b16c: 32 bf ff ad bne,a 4000b020 4000b170: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000b174: 40 00 0f eb call 4000f120 <__errno> 4000b178: b0 10 3f ff mov -1, %i0 4000b17c: ee 22 00 00 st %l7, [ %o0 ] 4000b180: 81 c7 e0 08 ret 4000b184: 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 ) 4000b188: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 4000b18c: 80 88 a0 40 btst 0x40, %g2 4000b190: 12 bf ff bb bne 4000b07c 4000b194: 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 ); 4000b198: 40 00 0f e2 call 4000f120 <__errno> 4000b19c: b0 10 3f ff mov -1, %i0 4000b1a0: 82 10 20 0d mov 0xd, %g1 4000b1a4: c2 22 00 00 st %g1, [ %o0 ] 4000b1a8: 81 c7 e0 08 ret 4000b1ac: 81 e8 00 00 restore case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4000b1b0: 82 24 c0 01 sub %l3, %g1, %g1 4000b1b4: 82 04 40 01 add %l1, %g1, %g1 4000b1b8: 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++) { 4000b1bc: c2 4c 40 13 ldsb [ %l1 + %l3 ], %g1 4000b1c0: 80 a0 60 00 cmp %g1, 0 4000b1c4: 02 80 00 1c be 4000b234 4000b1c8: 80 a0 60 2f cmp %g1, 0x2f if ( !IMFS_is_separator( path[ i ] ) ) 4000b1cc: 02 80 00 0a be 4000b1f4 4000b1d0: 80 a0 60 5c cmp %g1, 0x5c 4000b1d4: 22 80 00 09 be,a 4000b1f8 4000b1d8: a2 04 40 13 add %l1, %l3, %l1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000b1dc: 40 00 0f d1 call 4000f120 <__errno> <== NOT EXECUTED 4000b1e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b1e4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 4000b1e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b1ec: 81 c7 e0 08 ret <== NOT EXECUTED 4000b1f0: 81 e8 00 00 restore <== NOT EXECUTED 4000b1f4: 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++) { 4000b1f8: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 4000b1fc: 80 a0 60 00 cmp %g1, 0 4000b200: 02 80 00 0d be 4000b234 4000b204: a2 04 60 01 inc %l1 if ( !IMFS_is_separator( path[ i ] ) ) 4000b208: 80 a0 60 5c cmp %g1, 0x5c 4000b20c: 02 bf ff fb be 4000b1f8 4000b210: 80 a0 60 2f cmp %g1, 0x2f 4000b214: 22 bf ff fa be,a 4000b1fc 4000b218: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000b21c: 40 00 0f c1 call 4000f120 <__errno> 4000b220: b0 10 3f ff mov -1, %i0 4000b224: 82 10 20 02 mov 2, %g1 4000b228: c2 22 00 00 st %g1, [ %o0 ] 4000b22c: 81 c7 e0 08 ret 4000b230: 81 e8 00 00 restore /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4000b234: 7f ff fe 08 call 4000aa54 4000b238: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 4000b23c: c2 06 40 00 ld [ %i1 ], %g1 if ( node->type != IMFS_DIRECTORY ) 4000b240: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000b244: 80 a0 a0 01 cmp %g2, 1 4000b248: 12 80 00 09 bne 4000b26c 4000b24c: 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 ) 4000b250: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 4000b254: 82 08 60 c0 and %g1, 0xc0, %g1 4000b258: 80 a0 60 c0 cmp %g1, 0xc0 4000b25c: 12 bf ff cf bne 4000b198 4000b260: 01 00 00 00 nop if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000b264: 81 c7 e0 08 ret 4000b268: 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 ); 4000b26c: 40 00 0f ad call 4000f120 <__errno> 4000b270: b0 10 3f ff mov -1, %i0 4000b274: 82 10 20 14 mov 0x14, %g1 4000b278: c2 22 00 00 st %g1, [ %o0 ] 4000b27c: 81 c7 e0 08 ret 4000b280: 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; 4000b284: c4 00 e0 28 ld [ %g3 + 0x28 ], %g2 *pathloc = newloc; 4000b288: 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; 4000b28c: da 00 e0 24 ld [ %g3 + 0x24 ], %o5 4000b290: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b294: 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; 4000b298: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b29c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000b2a0: 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; 4000b2a4: d8 26 60 10 st %o4, [ %i1 + 0x10 ] 4000b2a8: da 26 60 08 st %o5, [ %i1 + 8 ] 4000b2ac: c8 26 60 04 st %g4, [ %i1 + 4 ] 4000b2b0: c6 26 40 00 st %g3, [ %i1 ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b2b4: 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; 4000b2b8: c4 26 60 0c st %g2, [ %i1 + 0xc ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b2bc: 92 10 00 19 mov %i1, %o1 4000b2c0: 9f c0 40 00 call %g1 4000b2c4: 94 10 00 1a mov %i2, %o2 4000b2c8: 81 c7 e0 08 ret 4000b2cc: 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 ); 4000b2d0: 90 10 00 19 mov %i1, %o0 4000b2d4: 7f ff ff 11 call 4000af18 4000b2d8: 92 10 20 00 clr %o1 if ( result == -1 ) 4000b2dc: 80 a2 3f ff cmp %o0, -1 4000b2e0: 02 bf ff 61 be 4000b064 4000b2e4: b0 10 00 08 mov %o0, %i0 4000b2e8: 10 bf ff 83 b 4000b0f4 4000b2ec: 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; 4000b2f0: 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; 4000b2f4: d8 01 20 10 ld [ %g4 + 0x10 ], %o4 4000b2f8: da 01 20 0c ld [ %g4 + 0xc ], %o5 4000b2fc: c8 01 20 08 ld [ %g4 + 8 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b300: 86 24 c0 03 sub %l3, %g3, %g3 4000b304: 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; 4000b308: d6 26 60 10 st %o3, [ %i1 + 0x10 ] 4000b30c: d8 26 60 08 st %o4, [ %i1 + 8 ] 4000b310: da 26 60 04 st %o5, [ %i1 + 4 ] 4000b314: c8 26 40 00 st %g4, [ %i1 ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000b318: 10 bf ff e8 b 4000b2b8 4000b31c: 90 04 40 03 add %l1, %g3, %o0 4000aafc : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000aafc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 4000ab00: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000ab04: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000ab08: 80 a0 a0 03 cmp %g2, 3 4000ab0c: 12 80 00 14 bne 4000ab5c 4000ab10: 90 10 00 18 mov %i0, %o0 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 4000ab14: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 IMFS_Set_handlers( node ); 4000ab18: 7f ff ff cf call 4000aa54 4000ab1c: 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; 4000ab20: c2 06 00 00 ld [ %i0 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4000ab24: 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; 4000ab28: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 4000ab2c: 82 0e 40 01 and %i1, %g1, %g1 4000ab30: 80 a6 40 01 cmp %i1, %g1 4000ab34: 02 80 00 08 be 4000ab54 4000ab38: 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 ); 4000ab3c: 40 00 11 79 call 4000f120 <__errno> <== NOT EXECUTED 4000ab40: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000ab44: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000ab48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ab4c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ab50: 81 e8 00 00 restore <== NOT EXECUTED return result; } 4000ab54: 81 c7 e0 08 ret 4000ab58: 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); 4000ab5c: 7f ff f1 e9 call 40007300 <== NOT EXECUTED 4000ab60: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000ab64: 01 00 00 00 nop 4000af18 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000af18: 9d e3 bf a0 save %sp, -96, %sp 4000af1c: 21 10 00 72 sethi %hi(0x4001c800), %l0 4000af20: a2 10 00 18 mov %i0, %l1 4000af24: c2 04 21 28 ld [ %l0 + 0x128 ], %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 ) ) ); 4000af28: 10 80 00 07 b 4000af44 4000af2c: a6 14 21 28 or %l0, 0x128, %l3 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4000af30: 02 80 00 21 be 4000afb4 4000af34: 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 ) ) ); 4000af38: 80 a0 a0 01 cmp %g2, 1 4000af3c: 18 80 00 1b bgu 4000afa8 4000af40: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000af44: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4000af48: e4 04 40 00 ld [ %l1 ], %l2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000af4c: 84 00 a0 01 inc %g2 4000af50: c4 30 60 2e sth %g2, [ %g1 + 0x2e ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4000af54: 85 28 a0 10 sll %g2, 0x10, %g2 4000af58: 85 30 a0 10 srl %g2, 0x10, %g2 4000af5c: 80 a0 a0 05 cmp %g2, 5 4000af60: 18 80 00 1d bgu 4000afd4 4000af64: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4000af68: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 4000af6c: 80 a0 a0 03 cmp %g2, 3 4000af70: 12 bf ff f0 bne 4000af30 4000af74: 80 a0 a0 04 cmp %g2, 4 result = IMFS_evaluate_hard_link( node, flags ); 4000af78: 90 10 00 11 mov %l1, %o0 4000af7c: 7f ff fe e0 call 4000aafc 4000af80: 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 ) ) ); 4000af84: 80 a2 20 00 cmp %o0, 0 4000af88: 12 80 00 08 bne 4000afa8 4000af8c: c2 04 21 28 ld [ %l0 + 0x128 ], %g1 4000af90: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 4000af94: 84 00 bf fd add %g2, -3, %g2 4000af98: 80 a0 a0 01 cmp %g2, 1 4000af9c: 08 bf ff ea bleu 4000af44 4000afa0: c2 04 c0 00 ld [ %l3 ], %g1 4000afa4: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4000afa8: c0 30 60 2e clrh [ %g1 + 0x2e ] return result; } 4000afac: 81 c7 e0 08 ret 4000afb0: 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 ); 4000afb4: 90 10 00 11 mov %l1, %o0 4000afb8: 7f ff fe ec call 4000ab68 4000afbc: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000afc0: 80 a2 20 00 cmp %o0, 0 4000afc4: 22 bf ff f4 be,a 4000af94 4000afc8: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 4000afcc: 10 bf ff f7 b 4000afa8 4000afd0: c2 04 21 28 ld [ %l0 + 0x128 ], %g1 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4000afd4: 40 00 10 53 call 4000f120 <__errno> 4000afd8: c0 30 60 2e clrh [ %g1 + 0x2e ] 4000afdc: 82 10 20 5c mov 0x5c, %g1 4000afe0: c2 22 00 00 st %g1, [ %o0 ] 4000afe4: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 4000afe8: 81 c7 e0 08 ret 4000afec: 91 e8 00 08 restore %g0, %o0, %o0 4000aae0 : */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4000aae0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000aae4: 93 2a 60 06 sll %o1, 6, %o1 <== NOT EXECUTED 4000aae8: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 <== NOT EXECUTED 4000aaec: 82 2a 40 01 andn %o1, %g1, %g1 <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4000aaf0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4000aaf4: 81 c3 e0 08 retl <== NOT EXECUTED 4000aaf8: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 4000ab68 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000ab68: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 4000ab6c: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000ab70: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000ab74: 80 a0 a0 04 cmp %g2, 4 4000ab78: 12 80 00 37 bne 4000ac54 4000ab7c: 01 00 00 00 nop rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4000ab80: c4 00 60 08 ld [ %g1 + 8 ], %g2 4000ab84: 80 a0 a0 00 cmp %g2, 0 4000ab88: 02 80 00 35 be 4000ac5c 4000ab8c: 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; 4000ab90: c4 26 00 00 st %g2, [ %i0 ] rtems_filesystem_get_sym_start_loc( 4000ab94: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 4000ab98: c6 48 80 00 ldsb [ %g2 ], %g3 4000ab9c: 80 a0 e0 5c cmp %g3, 0x5c 4000aba0: 02 80 00 1e be 4000ac18 4000aba4: 80 a0 e0 2f cmp %g3, 0x2f 4000aba8: 02 80 00 1c be 4000ac18 4000abac: 80 a0 e0 00 cmp %g3, 0 4000abb0: 02 80 00 1a be 4000ac18 4000abb4: 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] ), 4000abb8: a0 00 80 10 add %g2, %l0, %l0 4000abbc: 40 00 15 10 call 4000fffc 4000abc0: 90 10 00 10 mov %l0, %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000abc4: 94 10 00 19 mov %i1, %o2 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 4000abc8: 92 10 00 08 mov %o0, %o1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000abcc: 96 10 00 18 mov %i0, %o3 4000abd0: 40 00 00 26 call 4000ac68 4000abd4: 90 10 00 10 mov %l0, %o0 4000abd8: a0 10 00 08 mov %o0, %l0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 4000abdc: 7f ff ff 9e call 4000aa54 4000abe0: 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; 4000abe4: c2 06 00 00 ld [ %i0 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4000abe8: 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; 4000abec: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 4000abf0: 82 0e 40 01 and %i1, %g1, %g1 4000abf4: 80 a6 40 01 cmp %i1, %g1 4000abf8: 02 80 00 06 be 4000ac10 4000abfc: 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 ); 4000ac00: 40 00 11 48 call 4000f120 <__errno> <== NOT EXECUTED 4000ac04: a0 10 3f ff mov -1, %l0 ! ffffffff <== NOT EXECUTED 4000ac08: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000ac0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000ac10: 81 c7 e0 08 ret 4000ac14: 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( 4000ac18: 05 10 00 72 sethi %hi(0x4001c800), %g2 4000ac1c: c4 00 a1 28 ld [ %g2 + 0x128 ], %g2 ! 4001c928 4000ac20: a0 10 20 01 mov 1, %l0 4000ac24: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3 4000ac28: c6 26 00 00 st %g3, [ %i0 ] 4000ac2c: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 4000ac30: c6 26 20 04 st %g3, [ %i0 + 4 ] 4000ac34: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 4000ac38: c6 26 20 08 st %g3, [ %i0 + 8 ] 4000ac3c: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 4000ac40: c6 26 20 0c st %g3, [ %i0 + 0xc ] 4000ac44: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2 4000ac48: c4 26 20 10 st %g2, [ %i0 + 0x10 ] 4000ac4c: 10 bf ff db b 4000abb8 4000ac50: 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); 4000ac54: 7f ff f1 ab call 40007300 <== NOT EXECUTED 4000ac58: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 4000ac5c: 7f ff f1 a9 call 40007300 <== NOT EXECUTED 4000ac60: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 4000ac64: 01 00 00 00 nop 4000b4e0 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000b4e0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000b4e4: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000b4e8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000b4ec: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000b4f0: 40 00 09 6c call 4000daa0 <== NOT EXECUTED 4000b4f4: 90 04 60 50 add %l1, 0x50, %o0 <== NOT EXECUTED if (! err) { 4000b4f8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000b4fc: 02 80 00 06 be 4000b514 <== NOT EXECUTED 4000b500: 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); 4000b504: 06 80 00 14 bl 4000b554 <== NOT EXECUTED 4000b508: 01 00 00 00 nop <== NOT EXECUTED } 4000b50c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b510: 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; 4000b514: 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) 4000b518: 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; 4000b51c: 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) 4000b520: 40 00 02 6a call 4000bec8 <== NOT EXECUTED 4000b524: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED 4000b528: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b52c: 12 80 00 08 bne 4000b54c <== NOT EXECUTED 4000b530: 01 00 00 00 nop <== NOT EXECUTED 4000b534: c2 14 60 30 lduh [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 4000b538: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b53c: 12 80 00 04 bne 4000b54c <== NOT EXECUTED 4000b540: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 4000b544: 40 00 01 b6 call 4000bc1c <== NOT EXECUTED 4000b548: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b54c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b550: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000b554: 40 00 0e f3 call 4000f120 <__errno> <== NOT EXECUTED 4000b558: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000b55c: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000b560: 81 c7 e0 08 ret <== NOT EXECUTED 4000b564: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b37c : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000b37c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 4000b380: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED 4000b384: 82 10 62 7e or %g1, 0x27e, %g1 ! 8004667e <== NOT EXECUTED 4000b388: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000b38c: 02 80 00 0c be 4000b3bc <== NOT EXECUTED 4000b390: 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); 4000b394: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 4000b398: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b39c: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000b3a0: 40 00 08 ba call 4000d688 <== NOT EXECUTED 4000b3a4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000b3a8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000b3ac: 06 80 00 13 bl 4000b3f8 <== NOT EXECUTED 4000b3b0: b2 20 00 18 neg %i0, %i1 <== NOT EXECUTED } 4000b3b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b3b8: 81 e8 00 00 restore <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 4000b3bc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000b3c0: 02 80 00 0e be 4000b3f8 <== NOT EXECUTED 4000b3c4: b2 10 20 0e mov 0xe, %i1 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 4000b3c8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000b3cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b3d0: 02 80 00 06 be 4000b3e8 <== NOT EXECUTED 4000b3d4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 4000b3d8: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 4000b3dc: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000b3e0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b3e4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000b3e8: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000b3ec: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000b3f0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b3f4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4000b3f8: 40 00 0f 4a call 4000f120 <__errno> <== NOT EXECUTED 4000b3fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b400: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED } 4000b404: 81 c7 e0 08 ret <== NOT EXECUTED 4000b408: 81 e8 00 00 restore <== NOT EXECUTED 4000b320 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4000b320: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000b324: 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 ) { 4000b328: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000b32c: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000b330: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 4000b334: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b338: 40 00 08 b6 call 4000d610 <== NOT EXECUTED 4000b33c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000b340: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 4000b344: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000b348: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000b34c: 06 80 00 05 bl 4000b360 <== NOT EXECUTED 4000b350: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED } 4000b354: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 4000b358: 81 c7 e0 08 ret <== NOT EXECUTED 4000b35c: 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); 4000b360: 40 00 0f 70 call 4000f120 <__errno> <== NOT EXECUTED 4000b364: a0 20 00 10 neg %l0 <== NOT EXECUTED 4000b368: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 4000b36c: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 4000b370: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 4000b374: 10 bf ff f8 b 4000b354 <== NOT EXECUTED 4000b378: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 4000b568 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000b568: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4000b56c: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000b570: 92 10 00 18 mov %i0, %o1 IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4000b574: 40 00 09 9d call 4000dbe8 4000b578: 90 02 20 50 add %o0, 0x50, %o0 IMFS_FIFO_RETURN(err); 4000b57c: b0 92 20 00 orcc %o0, 0, %i0 4000b580: 06 80 00 04 bl 4000b590 4000b584: 01 00 00 00 nop } 4000b588: 81 c7 e0 08 ret <== NOT EXECUTED 4000b58c: 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); 4000b590: 40 00 0e e4 call 4000f120 <__errno> 4000b594: b0 20 00 18 neg %i0 4000b598: f0 22 00 00 st %i0, [ %o0 ] } 4000b59c: 81 c7 e0 08 ret 4000b5a0: 91 e8 3f ff restore %g0, -1, %o0 4000b478 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000b478: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000b47c: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000b480: 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); 4000b484: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000b488: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b48c: 40 00 09 16 call 4000d8e4 <== NOT EXECUTED 4000b490: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 4000b494: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000b498: 04 80 00 08 ble 4000b4b8 <== NOT EXECUTED 4000b49c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 4000b4a0: 40 00 02 51 call 4000bde4 <== NOT EXECUTED 4000b4a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000b4a8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000b4ac: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED 4000b4b0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b4b4: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000b4b8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000b4bc: 12 80 00 04 bne 4000b4cc <== NOT EXECUTED 4000b4c0: 01 00 00 00 nop <== NOT EXECUTED } 4000b4c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b4c8: 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); 4000b4cc: 40 00 0f 15 call 4000f120 <__errno> <== NOT EXECUTED 4000b4d0: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000b4d4: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000b4d8: 81 c7 e0 08 ret <== NOT EXECUTED 4000b4dc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b40c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000b40c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000b410: 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 ) { 4000b414: 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); 4000b418: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000b41c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b420: 40 00 08 b3 call 4000d6ec <== NOT EXECUTED 4000b424: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 4000b428: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000b42c: 04 80 00 09 ble 4000b450 <== NOT EXECUTED 4000b430: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 4000b434: 40 00 02 6c call 4000bde4 <== NOT EXECUTED 4000b438: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000b43c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000b440: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4000b444: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 4000b448: 81 c7 e0 08 ret <== NOT EXECUTED 4000b44c: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000b450: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000b454: 12 80 00 04 bne 4000b464 <== NOT EXECUTED 4000b458: 01 00 00 00 nop <== NOT EXECUTED } 4000b45c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b460: 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); 4000b464: 40 00 0f 2f call 4000f120 <__errno> <== NOT EXECUTED 4000b468: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000b46c: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 4000b470: 81 c7 e0 08 ret <== NOT EXECUTED 4000b474: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b5a4 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000b5a4: 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 ); 4000b5a8: 80 a6 20 00 cmp %i0, 0 4000b5ac: 02 80 00 26 be 4000b644 4000b5b0: 80 a6 60 00 cmp %i1, 0 if ( !name ) 4000b5b4: 02 80 00 11 be 4000b5f8 4000b5b8: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000b5bc: 13 10 00 6f sethi %hi(0x4001bc00), %o1 4000b5c0: 40 00 12 3e call 4000feb8 4000b5c4: 92 12 61 d0 or %o1, 0x1d0, %o1 ! 4001bdd0 4000b5c8: 80 a2 20 00 cmp %o0, 0 4000b5cc: 02 80 00 09 be 4000b5f0 4000b5d0: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000b5d4: 13 10 00 6f sethi %hi(0x4001bc00), %o1 4000b5d8: 40 00 12 38 call 4000feb8 4000b5dc: 92 12 61 d8 or %o1, 0x1d8, %o1 ! 4001bdd8 4000b5e0: 80 a2 20 00 cmp %o0, 0 4000b5e4: 32 80 00 07 bne,a 4000b600 4000b5e8: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 return directory->Parent; 4000b5ec: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b5f0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b5f4: 81 e8 00 00 restore <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000b5f8: 81 c7 e0 08 ret 4000b5fc: 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; 4000b600: 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; 4000b604: 80 a4 00 18 cmp %l0, %i0 4000b608: 12 80 00 07 bne 4000b624 4000b60c: 90 10 00 19 mov %i1, %o0 4000b610: 81 c7 e0 08 ret 4000b614: 91 e8 20 00 restore %g0, 0, %o0 4000b618: 80 a4 00 18 cmp %l0, %i0 4000b61c: 02 bf ff f7 be 4000b5f8 4000b620: 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 ) ) 4000b624: 40 00 12 25 call 4000feb8 4000b628: 92 04 20 0c add %l0, 0xc, %o1 4000b62c: 80 a2 20 00 cmp %o0, 0 4000b630: 32 bf ff fa bne,a 4000b618 4000b634: e0 04 00 00 ld [ %l0 ], %l0 4000b638: b0 10 00 10 mov %l0, %i0 4000b63c: 81 c7 e0 08 ret 4000b640: 81 e8 00 00 restore /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000b644: 11 10 00 6f sethi %hi(0x4001bc00), %o0 <== NOT EXECUTED 4000b648: 15 10 00 6f sethi %hi(0x4001bc00), %o2 <== NOT EXECUTED 4000b64c: 17 10 00 6f sethi %hi(0x4001bc00), %o3 <== NOT EXECUTED 4000b650: 90 12 21 70 or %o0, 0x170, %o0 <== NOT EXECUTED 4000b654: 94 12 a1 e0 or %o2, 0x1e0, %o2 <== NOT EXECUTED 4000b658: 96 12 e1 c0 or %o3, 0x1c0, %o3 <== NOT EXECUTED 4000b65c: 7f ff de 7b call 40003048 <__assert_func> <== NOT EXECUTED 4000b660: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED 4000b664: 01 00 00 00 nop 40011210 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40011210: 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; 40011214: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 40011218: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4001121c: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 40011220: 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; 40011224: e4 06 20 1c ld [ %i0 + 0x1c ], %l2 loc = temp_mt_entry->mt_fs_root; 40011228: c8 27 bf f0 st %g4, [ %fp + -16 ] 4001122c: c6 27 bf f4 st %g3, [ %fp + -12 ] 40011230: c4 27 bf f8 st %g2, [ %fp + -8 ] 40011234: 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; 40011238: c0 26 20 1c clr [ %i0 + 0x1c ] 4001123c: a0 07 bf ec add %fp, -20, %l0 do { next = jnode->Parent; loc.node_access = (void *)jnode; 40011240: e4 27 bf ec st %l2, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 40011244: e2 04 a0 08 ld [ %l2 + 8 ], %l1 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40011248: 7f ff fd 1c call 400106b8 4001124c: 90 10 00 10 mov %l0, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 40011250: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40011254: 80 a0 60 01 cmp %g1, 1 40011258: 12 80 00 17 bne 400112b4 4001125c: 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; 40011260: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 40011264: 80 a0 40 02 cmp %g1, %g2 40011268: 22 80 00 14 be,a 400112b8 4001126c: 90 10 20 00 clr %o0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 40011270: 80 a4 a0 00 cmp %l2, 0 40011274: 02 80 00 0e be 400112ac 40011278: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 4001127c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40011280: 80 a0 60 01 cmp %g1, 1 40011284: 32 bf ff f0 bne,a 40011244 40011288: e4 27 bf ec st %l2, [ %fp + -20 ] <== NOT EXECUTED 4001128c: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 40011290: 84 04 a0 54 add %l2, 0x54, %g2 40011294: 80 a0 40 02 cmp %g1, %g2 40011298: 22 bf ff eb be,a 40011244 4001129c: e4 27 bf ec st %l2, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 400112a0: a4 90 60 00 orcc %g1, 0, %l2 400112a4: 32 bf ff e8 bne,a 40011244 400112a8: e4 27 bf ec st %l2, [ %fp + -20 ] return 0; } 400112ac: 81 c7 e0 08 ret 400112b0: 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 ); 400112b4: 90 10 20 00 clr %o0 400112b8: 7f ff cc b5 call 4000458c 400112bc: 92 10 00 10 mov %l0, %o1 if (result != 0) 400112c0: 80 a2 20 00 cmp %o0, 0 400112c4: 02 bf ff eb be 40011270 400112c8: 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); 400112cc: 81 c7 e0 08 ret <== NOT EXECUTED 400112d0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b668 : const char *path, int pathlen, char *token, int *token_len ) { 4000b668: 9d e3 bf a0 save %sp, -96, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4000b66c: c2 0e 00 00 ldub [ %i0 ], %g1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4000b670: 87 28 60 18 sll %g1, 0x18, %g3 4000b674: 85 38 e0 18 sra %g3, 0x18, %g2 4000b678: 80 a0 a0 2f cmp %g2, 0x2f 4000b67c: 02 80 00 34 be 4000b74c 4000b680: 80 a0 a0 5c cmp %g2, 0x5c 4000b684: 02 80 00 32 be 4000b74c 4000b688: 80 a0 00 02 cmp %g0, %g2 4000b68c: 84 40 20 00 addx %g0, 0, %g2 4000b690: 80 a6 60 00 cmp %i1, 0 4000b694: 04 80 00 30 ble 4000b754 4000b698: 86 08 a0 ff and %g2, 0xff, %g3 4000b69c: 86 88 a0 ff andcc %g2, 0xff, %g3 4000b6a0: 02 80 00 2e be 4000b758 4000b6a4: 80 a0 e0 00 cmp %g3, 0 token[i] = c; 4000b6a8: c2 2e 80 00 stb %g1, [ %i2 ] 4000b6ac: 82 10 20 00 clr %g1 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4000b6b0: 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) ) { 4000b6b4: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 4000b6b8: 80 a0 a0 5c cmp %g2, 0x5c 4000b6bc: 02 80 00 07 be 4000b6d8 4000b6c0: c6 0e 00 01 ldub [ %i0 + %g1 ], %g3 4000b6c4: 80 a0 a0 2f cmp %g2, 0x2f 4000b6c8: 02 80 00 04 be 4000b6d8 4000b6cc: 80 a6 40 01 cmp %i1, %g1 4000b6d0: 14 80 00 18 bg 4000b730 4000b6d4: 80 a0 a0 00 cmp %g2, 0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4000b6d8: 84 06 80 01 add %i2, %g1, %g2 4000b6dc: c4 48 bf ff ldsb [ %g2 + -1 ], %g2 4000b6e0: 80 a0 a0 00 cmp %g2, 0 4000b6e4: 32 80 00 02 bne,a 4000b6ec 4000b6e8: c0 2e 80 01 clrb [ %i2 + %g1 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 4000b6ec: 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 ) 4000b6f0: 90 10 00 1a mov %i2, %o0 4000b6f4: 13 10 00 6f sethi %hi(0x4001bc00), %o1 4000b6f8: b0 10 20 02 mov 2, %i0 4000b6fc: 40 00 11 ef call 4000feb8 4000b700: 92 12 62 00 or %o1, 0x200, %o1 4000b704: 80 a2 20 00 cmp %o0, 0 4000b708: 02 80 00 19 be 4000b76c 4000b70c: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4000b710: 13 10 00 6f sethi %hi(0x4001bc00), %o1 4000b714: 40 00 11 e9 call 4000feb8 4000b718: 92 12 61 f8 or %o1, 0x1f8, %o1 ! 4001bdf8 <__FUNCTION__.5440+0x18> 4000b71c: 80 a0 00 08 cmp %g0, %o0 4000b720: b0 60 20 00 subx %g0, 0, %i0 4000b724: b0 0e 20 02 and %i0, 2, %i0 type = IMFS_CURRENT_DIR; } return type; } 4000b728: 81 c7 e0 08 ret 4000b72c: 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) ) { 4000b730: 22 bf ff eb be,a 4000b6dc 4000b734: 84 06 80 01 add %i2, %g1, %g2 <== NOT EXECUTED token[i] = c; if ( i == IMFS_NAME_MAX ) 4000b738: 80 a0 60 20 cmp %g1, 0x20 4000b73c: 12 bf ff dd bne 4000b6b0 4000b740: c6 2e 80 01 stb %g3, [ %i2 + %g1 ] 4000b744: 81 c7 e0 08 ret 4000b748: 91 e8 20 04 restore %g0, 4, %o0 4000b74c: 80 a0 00 03 cmp %g0, %g3 4000b750: 86 40 20 00 addx %g0, 0, %g3 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4000b754: 80 a0 e0 00 cmp %g3, 0 4000b758: 12 80 00 07 bne 4000b774 4000b75c: 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'; 4000b760: b0 10 20 00 clr %i0 4000b764: 82 10 20 00 clr %g1 /* * Set token_len to the number of characters copied. */ *token_len = i; 4000b768: c2 26 c0 00 st %g1, [ %i3 ] 4000b76c: 81 c7 e0 08 ret 4000b770: 81 e8 00 00 restore */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4000b774: 80 a6 60 00 cmp %i1, 0 4000b778: b0 10 20 01 mov 1, %i0 4000b77c: 12 bf ff fb bne 4000b768 4000b780: 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'; 4000b784: 10 bf ff f8 b 4000b764 4000b788: b0 10 20 00 clr %i0 4000b78c : 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 ) { 4000b78c: 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, 4000b790: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000b794: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 4001c818 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4000b798: 80 a0 60 10 cmp %g1, 0x10 4000b79c: 02 80 00 0a be 4000b7c4 4000b7a0: 86 10 20 00 clr %g3 4000b7a4: 84 10 20 20 mov 0x20, %g2 4000b7a8: 80 a0 40 02 cmp %g1, %g2 4000b7ac: 02 80 00 06 be 4000b7c4 4000b7b0: 86 00 e0 01 inc %g3 4000b7b4: 80 a0 e0 05 cmp %g3, 5 4000b7b8: 12 bf ff fc bne 4000b7a8 4000b7bc: 85 28 a0 01 sll %g2, 1, %g2 4000b7c0: 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) 4000b7c4: 05 10 00 73 sethi %hi(0x4001cc00), %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(); 4000b7c8: 40 00 0a 2d call 4000e07c 4000b7cc: c2 20 a3 70 st %g1, [ %g2 + 0x370 ] ! 4001cf70 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; 4000b7d0: 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(); 4000b7d4: 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; 4000b7d8: 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; 4000b7dc: 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; 4000b7e0: 13 10 00 6f sethi %hi(0x4001bc00), %o1 4000b7e4: 90 06 20 38 add %i0, 0x38, %o0 4000b7e8: 40 00 10 89 call 4000fa0c 4000b7ec: 92 12 63 98 or %o1, 0x398, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000b7f0: 90 10 20 01 mov 1, %o0 4000b7f4: 40 00 00 c5 call 4000bb08 4000b7f8: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ) { 4000b7fc: 80 a2 20 00 cmp %o0, 0 4000b800: 02 80 00 0c be 4000b830 4000b804: 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; 4000b808: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000b80c: 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; 4000b810: 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; 4000b814: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000b818: 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; 4000b81c: 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(); 4000b820: 40 00 07 7e call 4000d618 4000b824: b0 10 20 00 clr %i0 return 0; } 4000b828: 81 c7 e0 08 ret 4000b82c: 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); 4000b830: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 <== NOT EXECUTED 4000b834: 40 00 00 fa call 4000bc1c <== NOT EXECUTED 4000b838: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000b83c: 40 00 0e 39 call 4000f120 <__errno> <== NOT EXECUTED 4000b840: 01 00 00 00 nop <== NOT EXECUTED 4000b844: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000b848: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b84c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b850: 81 e8 00 00 restore <== NOT EXECUTED 400041d8 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 400041d8: 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; 400041dc: c2 06 00 00 ld [ %i0 ], %g1 400041e0: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 400041e4: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 400041e8: 80 a0 60 07 cmp %g1, 7 400041ec: 18 80 00 1f bgu 40004268 400041f0: 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 ); 400041f4: 40 00 47 39 call 40015ed8 400041f8: 90 10 00 1a mov %i2, %o0 400041fc: a0 07 bf b0 add %fp, -80, %l0 40004200: 92 10 00 08 mov %o0, %o1 40004204: 96 07 bf fc add %fp, -4, %o3 40004208: 94 10 00 10 mov %l0, %o2 4000420c: 40 00 34 63 call 40011398 40004210: 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( 40004214: 90 10 00 19 mov %i1, %o0 40004218: 94 10 00 10 mov %l0, %o2 4000421c: 92 10 20 03 mov 3, %o1 40004220: 17 00 00 28 sethi %hi(0xa000), %o3 40004224: 98 07 bf d8 add %fp, -40, %o4 40004228: 40 00 30 d5 call 4001057c 4000422c: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40004230: 80 a2 20 00 cmp %o0, 0 40004234: 02 80 00 13 be 40004280 40004238: 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 ); 4000423c: 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++; 40004240: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 40004244: 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++; 40004248: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 4000424c: 40 00 02 de call 40004dc4 40004250: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] 40004254: c4 07 bf f4 ld [ %fp + -12 ], %g2 40004258: c2 07 bf d8 ld [ %fp + -40 ], %g1 4000425c: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40004260: 81 c7 e0 08 ret 40004264: 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 ); 40004268: 40 00 43 7e call 40015060 <__errno> 4000426c: b0 10 3f ff mov -1, %i0 40004270: 82 10 20 1f mov 0x1f, %g1 40004274: c2 22 00 00 st %g1, [ %o0 ] 40004278: 81 c7 e0 08 ret 4000427c: 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 ); 40004280: 40 00 43 78 call 40015060 <__errno> <== NOT EXECUTED 40004284: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004288: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000428c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004290: 81 c7 e0 08 ret <== NOT EXECUTED 40004294: 81 e8 00 00 restore <== NOT EXECUTED 40013990 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40013990: 9d e3 bf a0 save %sp, -96, %sp block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 40013994: 80 a6 20 00 cmp %i0, 0 40013998: 02 80 00 18 be 400139f8 4001399c: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400139a0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400139a4: 80 a0 60 05 cmp %g1, 5 400139a8: 12 80 00 1b bne 40013a14 400139ac: 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 ); 400139b0: 92 10 00 19 mov %i1, %o1 400139b4: 7f ff fe 64 call 40013344 400139b8: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 400139bc: 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 ); 400139c0: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 400139c4: 80 a0 60 00 cmp %g1, 0 400139c8: 02 80 00 04 be 400139d8 400139cc: b0 10 20 00 clr %i0 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 400139d0: 81 c7 e0 08 ret 400139d4: 81 e8 00 00 restore #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 400139d8: 7f ff fe 4e call 40013310 400139dc: b0 10 20 01 mov 1, %i0 if ( !memory ) 400139e0: 80 a2 20 00 cmp %o0, 0 400139e4: 02 bf ff fb be 400139d0 400139e8: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 400139ec: d0 24 00 00 st %o0, [ %l0 ] return 0; } 400139f0: 81 c7 e0 08 ret 400139f4: 91 e8 20 00 restore %g0, 0, %o0 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 400139f8: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 400139fc: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013a00: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013a04: 94 12 a2 c0 or %o2, 0x2c0, %o2 <== NOT EXECUTED 40013a08: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 40013a0c: 7f ff c3 8a call 40004834 <__assert_func> <== NOT EXECUTED 40013a10: 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 ); 40013a14: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013a18: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013a1c: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013a20: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013a24: 94 12 a2 c0 or %o2, 0x2c0, %o2 <== NOT EXECUTED 40013a28: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 40013a2c: 7f ff c3 82 call 40004834 <__assert_func> <== NOT EXECUTED 40013a30: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 40013a34: 01 00 00 00 nop 40013a38 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40013a38: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013a3c: 80 a6 20 00 cmp %i0, 0 40013a40: 02 80 00 5e be 40013bb8 40013a44: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40013a48: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013a4c: 80 a0 60 05 cmp %g1, 5 40013a50: 12 80 00 53 bne 40013b9c 40013a54: 03 10 00 8d sethi %hi(0x40023400), %g1 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 40013a58: e2 00 61 58 ld [ %g1 + 0x158 ], %l1 ! 40023558 40013a5c: a1 34 60 02 srl %l1, 2, %l0 40013a60: 92 10 00 10 mov %l0, %o1 40013a64: 40 00 2a bd call 4001e558 <.umul> 40013a68: 90 04 20 01 add %l0, 1, %o0 40013a6c: 92 10 00 10 mov %l0, %o1 40013a70: 40 00 2a ba call 4001e558 <.umul> 40013a74: 90 02 20 01 inc %o0 40013a78: 92 10 00 11 mov %l1, %o1 40013a7c: 40 00 2a b7 call 4001e558 <.umul> 40013a80: 90 02 3f ff add %o0, -1, %o0 40013a84: 82 10 20 00 clr %g1 40013a88: 80 a0 40 19 cmp %g1, %i1 40013a8c: 34 80 00 0e bg,a 40013ac4 40013a90: e4 06 20 50 ld [ %i0 + 0x50 ], %l2 <== NOT EXECUTED 40013a94: 80 a0 40 19 cmp %g1, %i1 40013a98: 02 80 00 08 be 40013ab8 40013a9c: 80 a2 00 1a cmp %o0, %i2 rtems_set_errno_and_return_minus_one( EINVAL ); 40013aa0: 40 00 05 70 call 40015060 <__errno> <== NOT EXECUTED 40013aa4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013aa8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40013aac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013ab0: 81 c7 e0 08 ret <== NOT EXECUTED 40013ab4: 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 ) 40013ab8: 08 bf ff fa bleu 40013aa0 40013abc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 40013ac0: e4 06 20 50 ld [ %i0 + 0x50 ], %l2 40013ac4: 80 a6 40 12 cmp %i1, %l2 40013ac8: 04 80 00 2a ble 40013b70 40013acc: 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; 40013ad0: a7 3c 60 1f sra %l1, 0x1f, %l3 <== NOT EXECUTED 40013ad4: 96 10 00 11 mov %l1, %o3 40013ad8: 94 10 00 13 mov %l3, %o2 40013adc: 90 10 00 19 mov %i1, %o0 40013ae0: 40 00 2c 63 call 4001ec6c <__divdi3> 40013ae4: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013ae8: 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; 40013aec: a0 10 00 09 mov %o1, %l0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013af0: 94 10 00 13 mov %l3, %o2 40013af4: 92 10 00 14 mov %l4, %o1 40013af8: 40 00 2c 5d call 4001ec6c <__divdi3> 40013afc: 96 10 00 11 mov %l1, %o3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 40013b00: 80 a4 00 09 cmp %l0, %o1 40013b04: 0a 80 00 1f bcs 40013b80 40013b08: a4 10 00 09 mov %o1, %l2 40013b0c: 10 80 00 05 b 40013b20 40013b10: a2 10 00 09 mov %o1, %l1 40013b14: 80 a4 00 11 cmp %l0, %l1 40013b18: 2a 80 00 1b bcs,a 40013b84 40013b1c: f4 26 20 54 st %i2, [ %i0 + 0x54 ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 40013b20: 90 10 00 18 mov %i0, %o0 40013b24: 7f ff ff 9b call 40013990 40013b28: 92 10 00 11 mov %l1, %o1 40013b2c: 80 a2 20 00 cmp %o0, 0 40013b30: 22 bf ff f9 be,a 40013b14 40013b34: a2 04 60 01 inc %l1 for ( ; block>=old_blocks ; block-- ) { 40013b38: 10 80 00 06 b 40013b50 <== NOT EXECUTED 40013b3c: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 40013b40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40013b44: 7f ff fe d0 call 40013684 <== NOT EXECUTED 40013b48: 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-- ) { 40013b4c: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 40013b50: 08 bf ff fc bleu 40013b40 <== NOT EXECUTED 40013b54: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 40013b58: 40 00 05 42 call 40015060 <__errno> <== NOT EXECUTED 40013b5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013b60: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40013b64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013b68: 81 c7 e0 08 ret <== NOT EXECUTED 40013b6c: 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 ) 40013b70: 02 80 00 08 be 40013b90 40013b74: 80 a6 80 14 cmp %i2, %l4 40013b78: 81 c7 e0 08 ret 40013b7c: 91 e8 20 00 restore %g0, 0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 40013b80: f4 26 20 54 st %i2, [ %i0 + 0x54 ] <== NOT EXECUTED 40013b84: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 40013b88: 81 c7 e0 08 ret 40013b8c: 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 ) 40013b90: 18 bf ff d1 bgu 40013ad4 40013b94: a7 3c 60 1f sra %l1, 0x1f, %l3 40013b98: 30 bf ff f8 b,a 40013b78 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40013b9c: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013ba0: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013ba4: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013ba8: 94 12 a2 d8 or %o2, 0x2d8, %o2 <== NOT EXECUTED 40013bac: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 40013bb0: 7f ff c3 21 call 40004834 <__assert_func> <== NOT EXECUTED 40013bb4: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40013bb8: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013bbc: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013bc0: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013bc4: 94 12 a2 d8 or %o2, 0x2d8, %o2 <== NOT EXECUTED 40013bc8: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 40013bcc: 7f ff c3 1a call 40004834 <__assert_func> <== NOT EXECUTED 40013bd0: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED 40013bd4: 01 00 00 00 nop 40013344 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40013344: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013348: 80 a6 20 00 cmp %i0, 0 4001334c: 02 80 00 91 be 40013590 40013350: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40013354: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013358: 80 a0 60 05 cmp %g1, 5 4001335c: 12 80 00 94 bne 400135ac 40013360: 03 10 00 8d sethi %hi(0x40023400), %g1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40013364: e0 00 61 58 ld [ %g1 + 0x158 ], %l0 ! 40023558 40013368: a1 34 20 02 srl %l0, 2, %l0 4001336c: 82 04 3f ff add %l0, -1, %g1 40013370: 80 a6 40 01 cmp %i1, %g1 40013374: 08 80 00 20 bleu 400133f4 40013378: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4001337c: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED 40013380: 40 00 2c 76 call 4001e558 <.umul> <== NOT EXECUTED 40013384: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40013388: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 4001338c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40013390: 18 80 00 21 bgu 40013414 <== NOT EXECUTED 40013394: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40013398: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001339c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400133a0: 40 00 2d 54 call 4001e8f0 <.urem> <== NOT EXECUTED 400133a4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 400133a8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 400133ac: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 400133b0: 40 00 2c a4 call 4001e640 <.udiv> <== NOT EXECUTED 400133b4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 400133b8: 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; 400133bc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 400133c0: 02 80 00 42 be 400134c8 <== NOT EXECUTED 400133c4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 400133c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400133cc: 02 80 00 5e be 40013544 <== NOT EXECUTED 400133d0: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 400133d4: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 400133d8: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 400133dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400133e0: 02 80 00 52 be 40013528 <== NOT EXECUTED 400133e4: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 400133e8: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 400133ec: 81 c7 e0 08 ret <== NOT EXECUTED 400133f0: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 400133f4: 02 80 00 40 be 400134f4 400133f8: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 if ( !p ) { 400133fc: 80 a2 20 00 cmp %o0, 0 40013400: 02 80 00 43 be 4001350c 40013404: 01 00 00 00 nop p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 40013408: b3 2e 60 02 sll %i1, 2, %i1 4001340c: 81 c7 e0 08 ret 40013410: 91 ea 00 19 restore %o0, %i1, %o0 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 40013414: 90 02 20 01 inc %o0 <== NOT EXECUTED 40013418: 40 00 2c 50 call 4001e558 <.umul> <== NOT EXECUTED 4001341c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40013420: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40013424: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40013428: 18 80 00 31 bgu 400134ec <== NOT EXECUTED 4001342c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 40013430: a2 26 40 11 sub %i1, %l1, %l1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40013434: 40 00 2d 2f call 4001e8f0 <.urem> <== NOT EXECUTED 40013438: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001343c: 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; 40013440: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40013444: 40 00 2c 7f call 4001e640 <.udiv> <== NOT EXECUTED 40013448: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4001344c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40013450: 40 00 2c 7c call 4001e640 <.udiv> <== NOT EXECUTED 40013454: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40013458: 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; 4001345c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40013460: 40 00 2d 24 call 4001e8f0 <.urem> <== NOT EXECUTED 40013464: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40013468: 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; 4001346c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40013470: 02 80 00 3c be 40013560 <== NOT EXECUTED 40013474: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 40013478: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001347c: 02 80 00 53 be 400135c8 <== NOT EXECUTED 40013480: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 40013484: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40013488: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 4001348c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013490: 02 80 00 55 be 400135e4 <== NOT EXECUTED 40013494: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 40013498: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 4001349c: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 400134a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400134a4: 12 bf ff d9 bne 40013408 <== NOT EXECUTED 400134a8: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 400134ac: 7f ff ff 99 call 40013310 <== NOT EXECUTED 400134b0: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 400134b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400134b8: 22 80 00 13 be,a 40013504 <== NOT EXECUTED 400134bc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 400134c0: 10 bf ff d2 b 40013408 <== NOT EXECUTED 400134c4: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 400134c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400134cc: 02 80 00 0e be 40013504 <== NOT EXECUTED 400134d0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 400134d4: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 400134d8: 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 ]; 400134dc: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 400134e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400134e4: 12 80 00 08 bne 40013504 <== NOT EXECUTED 400134e8: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 400134ec: 81 c7 e0 08 ret <== NOT EXECUTED 400134f0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 400134f4: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 400134f8: 80 a2 20 00 cmp %o0, 0 400134fc: 02 bf ff fc be 400134ec 40013500: b0 02 00 19 add %o0, %i1, %i0 /* * This means the requested block number is out of range. */ return 0; } 40013504: 81 c7 e0 08 ret 40013508: 81 e8 00 00 restore p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4001350c: 7f ff ff 81 call 40013310 40013510: 01 00 00 00 nop if ( !p ) 40013514: 80 a2 20 00 cmp %o0, 0 40013518: 22 bf ff fb be,a 40013504 4001351c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 40013520: 10 bf ff ba b 40013408 40013524: d0 26 20 58 st %o0, [ %i0 + 0x58 ] info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 40013528: 7f ff ff 7a call 40013310 <== NOT EXECUTED 4001352c: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40013530: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40013534: 22 bf ff f4 be,a 40013504 <== NOT EXECUTED 40013538: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 4001353c: 10 bf ff ab b 400133e8 <== NOT EXECUTED 40013540: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40013544: 7f ff ff 73 call 40013310 <== NOT EXECUTED 40013548: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 4001354c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40013550: 22 bf ff ed be,a 40013504 <== NOT EXECUTED 40013554: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40013558: 10 bf ff 9f b 400133d4 <== NOT EXECUTED 4001355c: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 40013560: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40013564: 02 bf ff e8 be 40013504 <== NOT EXECUTED 40013568: 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 ]; 4001356c: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40013570: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 40013574: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40013578: 02 bf ff e3 be 40013504 <== NOT EXECUTED 4001357c: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40013580: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 40013584: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 40013588: 81 c7 e0 08 ret <== NOT EXECUTED 4001358c: 91 ee 00 19 restore %i0, %i1, %o0 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40013590: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013594: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013598: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 4001359c: 94 12 a2 18 or %o2, 0x218, %o2 <== NOT EXECUTED 400135a0: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 400135a4: 7f ff c4 a4 call 40004834 <__assert_func> <== NOT EXECUTED 400135a8: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 400135ac: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 400135b0: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 400135b4: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 400135b8: 94 12 a2 18 or %o2, 0x218, %o2 <== NOT EXECUTED 400135bc: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 400135c0: 7f ff c4 9d call 40004834 <__assert_func> <== NOT EXECUTED 400135c4: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 400135c8: 7f ff ff 52 call 40013310 <== NOT EXECUTED 400135cc: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 400135d0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400135d4: 22 bf ff cc be,a 40013504 <== NOT EXECUTED 400135d8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 400135dc: 10 bf ff aa b 40013484 <== NOT EXECUTED 400135e0: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 400135e4: 7f ff ff 4b call 40013310 <== NOT EXECUTED 400135e8: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 400135ec: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 400135f0: 22 bf ff c5 be,a 40013504 <== NOT EXECUTED 400135f4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 400135f8: 10 bf ff a8 b 40013498 <== NOT EXECUTED 400135fc: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED 40014080 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40014080: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40014084: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40014088: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 4001408c: 02 80 00 ae be 40014344 40014090: 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 || 40014094: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40014098: 84 00 7f fb add %g1, -5, %g2 4001409c: 80 a0 a0 01 cmp %g2, 1 400140a0: 18 80 00 a1 bgu 40014324 400140a4: 80 a6 e0 00 cmp %i3, 0 /* * Error checks on arguments */ assert( dest ); 400140a8: 02 80 00 b7 be 40014384 400140ac: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 400140b0: 02 80 00 87 be 400142cc 400140b4: 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) { 400140b8: 02 80 00 5e be 40014230 400140bc: 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 ) 400140c0: 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; 400140c4: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 400140c8: 80 a0 c0 02 cmp %g3, %g2 400140cc: c8 04 20 54 ld [ %l0 + 0x54 ], %g4 400140d0: 14 80 00 56 bg 40014228 400140d4: 9a 07 00 1a add %i4, %i2, %o5 400140d8: 80 a0 c0 02 cmp %g3, %g2 400140dc: 02 80 00 51 be 40014220 400140e0: 80 a3 40 04 cmp %o5, %g4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 400140e4: 29 10 00 8d sethi %hi(0x40023400), %l4 400140e8: e2 05 21 58 ld [ %l4 + 0x158 ], %l1 ! 40023558 400140ec: 90 10 00 12 mov %l2, %o0 400140f0: ab 3c 60 1f sra %l1, 0x1f, %l5 400140f4: 96 10 00 11 mov %l1, %o3 400140f8: 94 10 00 15 mov %l5, %o2 400140fc: 40 00 2b c3 call 4001f008 <__moddi3> 40014100: 92 10 00 13 mov %l3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40014104: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40014108: ac 10 00 09 mov %o1, %l6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001410c: 94 10 00 15 mov %l5, %o2 40014110: 92 10 00 13 mov %l3, %o1 40014114: 40 00 2a d6 call 4001ec6c <__divdi3> 40014118: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 4001411c: 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; 40014120: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 40014124: aa 10 00 1b mov %i3, %l5 40014128: 02 80 00 14 be 40014178 4001412c: 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 ); 40014130: 90 10 00 10 mov %l0, %o0 40014134: 7f ff fc 84 call 40013344 40014138: 94 10 20 00 clr %o2 assert( block_ptr ); 4001413c: 80 a2 20 00 cmp %o0, 0 40014140: 02 80 00 89 be 40014364 40014144: 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; 40014148: 80 a7 00 11 cmp %i4, %l1 4001414c: 18 80 00 4c bgu 4001427c 40014150: 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 ); 40014154: d2 02 00 00 ld [ %o0 ], %o1 40014158: 94 10 00 18 mov %i0, %o2 4001415c: 90 10 00 1b mov %i3, %o0 40014160: 40 00 05 fb call 4001594c 40014164: 92 02 40 16 add %o1, %l6, %o1 dest += to_copy; block++; my_length -= to_copy; 40014168: e2 05 21 58 ld [ %l4 + 0x158 ], %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; 4001416c: aa 06 c0 18 add %i3, %i0, %l5 block++; 40014170: a4 04 a0 01 inc %l2 my_length -= to_copy; 40014174: 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 ) { 40014178: 80 a7 00 11 cmp %i4, %l1 4001417c: 0a 80 00 15 bcs 400141d0 40014180: 80 a7 20 00 cmp %i4, 0 40014184: a8 15 21 58 or %l4, 0x158, %l4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40014188: 90 10 00 10 mov %l0, %o0 4001418c: 92 10 00 12 mov %l2, %o1 40014190: 7f ff fc 6d call 40013344 40014194: 94 10 20 00 clr %o2 assert( block_ptr ); 40014198: 80 a2 20 00 cmp %o0, 0 4001419c: 02 80 00 52 be 400142e4 400141a0: 94 10 00 11 mov %l1, %o2 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 400141a4: d2 02 00 00 ld [ %o0 ], %o1 400141a8: 40 00 05 e9 call 4001594c 400141ac: 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 ) { 400141b0: 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; 400141b4: 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; 400141b8: 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 ) { 400141bc: 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++; 400141c0: 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 ) { 400141c4: 08 bf ff f1 bleu 40014188 400141c8: 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 ) { 400141cc: 80 a7 20 00 cmp %i4, 0 400141d0: 02 80 00 0e be 40014208 400141d4: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400141d8: 92 10 00 12 mov %l2, %o1 400141dc: 90 10 00 10 mov %l0, %o0 400141e0: 7f ff fc 59 call 40013344 400141e4: 94 10 20 00 clr %o2 assert( block_ptr ); 400141e8: 80 a2 20 00 cmp %o0, 0 400141ec: 02 80 00 46 be 40014304 400141f0: b0 06 00 1c add %i0, %i4, %i0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 400141f4: d2 02 00 00 ld [ %o0 ], %o1 400141f8: 90 10 00 15 mov %l5, %o0 400141fc: 40 00 05 d4 call 4001594c 40014200: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 40014204: 90 07 bf f8 add %fp, -8, %o0 40014208: 7f ff c2 ef call 40004dc4 4001420c: 92 10 20 00 clr %o1 40014210: c2 07 bf f8 ld [ %fp + -8 ], %g1 40014214: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return copied; } 40014218: 81 c7 e0 08 ret 4001421c: 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 ) 40014220: 08 bf ff b2 bleu 400140e8 40014224: 29 10 00 8d sethi %hi(0x40023400), %l4 my_length = the_jnode->info.file.size - start; 40014228: 10 bf ff af b 400140e4 4001422c: 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)) 40014230: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 40014234: 82 10 20 00 clr %g1 <== NOT EXECUTED 40014238: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 4001423c: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 40014240: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40014244: 04 80 00 10 ble 40014284 <== NOT EXECUTED 40014248: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 4001424c: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 40014250: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40014254: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40014258: 40 00 05 bd call 4001594c <== NOT EXECUTED 4001425c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40014260: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40014264: 7f ff c2 d8 call 40004dc4 <== NOT EXECUTED 40014268: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001426c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40014270: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 40014274: 81 c7 e0 08 ret <== NOT EXECUTED 40014278: 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; 4001427c: 10 bf ff b6 b 40014154 40014280: 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)) 40014284: 02 80 00 0d be 400142b8 <== NOT EXECUTED 40014288: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 4001428c: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40014290: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40014294: 40 00 05 ae call 4001594c <== NOT EXECUTED 40014298: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4001429c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 400142a0: 7f ff c2 c9 call 40004dc4 <== NOT EXECUTED 400142a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400142a8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400142ac: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 400142b0: 81 c7 e0 08 ret <== NOT EXECUTED 400142b4: 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)) 400142b8: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 400142bc: 38 bf ff e5 bgu,a 40014250 <== NOT EXECUTED 400142c0: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED 400142c4: 10 bf ff f2 b 4001428c <== NOT EXECUTED 400142c8: 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 ); 400142cc: 40 00 03 65 call 40015060 <__errno> <== NOT EXECUTED 400142d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400142d4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400142d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400142dc: 81 c7 e0 08 ret <== NOT EXECUTED 400142e0: 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 ); 400142e4: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400142e8: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 400142ec: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 400142f0: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 400142f4: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 400142f8: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 400142fc: 7f ff c1 4e call 40004834 <__assert_func> <== NOT EXECUTED 40014300: 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 ); 40014304: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40014308: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 4001430c: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40014310: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40014314: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40014318: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 4001431c: 7f ff c1 46 call 40004834 <__assert_func> <== NOT EXECUTED 40014320: 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 || 40014324: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40014328: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 4001432c: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40014330: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40014334: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40014338: 96 12 e1 c0 or %o3, 0x1c0, %o3 <== NOT EXECUTED 4001433c: 7f ff c1 3e call 40004834 <__assert_func> <== NOT EXECUTED 40014340: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40014344: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40014348: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 4001434c: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40014350: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40014354: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40014358: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 4001435c: 7f ff c1 36 call 40004834 <__assert_func> <== NOT EXECUTED 40014360: 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 ); 40014364: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40014368: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 4001436c: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40014370: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40014374: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40014378: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 4001437c: 7f ff c1 2e call 40004834 <__assert_func> <== NOT EXECUTED 40014380: 92 10 22 96 mov 0x296, %o1 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 40014384: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40014388: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 4001438c: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40014390: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40014394: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40014398: 96 12 e2 10 or %o3, 0x210, %o3 <== NOT EXECUTED 4001439c: 7f ff c1 26 call 40004834 <__assert_func> <== NOT EXECUTED 400143a0: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED 400143a4: 01 00 00 00 nop 400136e0 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 400136e0: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400136e4: 80 a6 20 00 cmp %i0, 0 400136e8: 02 80 00 62 be 40013870 400136ec: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 400136f0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400136f4: 80 a0 60 05 cmp %g1, 5 400136f8: 12 80 00 65 bne 4001388c 400136fc: 23 10 00 8d sethi %hi(0x40023400), %l1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40013700: 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; 40013704: e6 04 61 58 ld [ %l1 + 0x158 ], %l3 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40013708: 80 a0 60 00 cmp %g1, 0 4001370c: 02 80 00 05 be 40013720 40013710: a7 34 e0 02 srl %l3, 2, %l3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 40013714: 90 06 20 58 add %i0, 0x58, %o0 40013718: 7f ff ff ba call 40013600 4001371c: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 40013720: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 40013724: 80 a0 60 00 cmp %g1, 0 40013728: 02 80 00 1b be 40013794 4001372c: c4 04 61 58 ld [ %l1 + 0x158 ], %g2 for ( i=0 ; i <== NOT EXECUTED 4001373c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40013740: 25 10 00 8d sethi %hi(0x40023400), %l2 <== NOT EXECUTED 40013744: a4 14 a1 58 or %l2, 0x158, %l2 ! 40023558 <== NOT EXECUTED 40013748: 10 80 00 03 b 40013754 <== NOT EXECUTED 4001374c: a0 10 20 00 clr %l0 <== NOT EXECUTED 40013750: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 40013754: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40013758: c4 00 40 08 ld [ %g1 + %o0 ], %g2 <== NOT EXECUTED 4001375c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013760: 02 80 00 04 be 40013770 <== NOT EXECUTED 40013764: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40013768: 7f ff ff a6 call 40013600 <== NOT EXECUTED 4001376c: 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 40013784: 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 ); 40013788: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 4001378c: 7f ff ff 9d call 40013600 <== NOT EXECUTED 40013790: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 40013794: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 40013798: 80 a2 20 00 cmp %o0, 0 4001379c: 02 80 00 33 be 40013868 400137a0: c2 04 61 58 ld [ %l1 + 0x158 ], %g1 for ( i=0 ; i <== NOT EXECUTED 400137b0: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 400137b4: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 400137b8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400137bc: 22 80 00 29 be,a 40013860 <== NOT EXECUTED 400137c0: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 400137c4: 25 10 00 8d sethi %hi(0x40023400), %l2 <== NOT EXECUTED 400137c8: aa 10 20 00 clr %l5 <== NOT EXECUTED 400137cc: a4 14 a1 58 or %l2, 0x158, %l2 <== NOT EXECUTED 400137d0: a8 10 20 00 clr %l4 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 400137dc: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 400137e0: 90 10 20 00 clr %o0 <== NOT EXECUTED 400137e4: a0 10 20 00 clr %l0 <== NOT EXECUTED if ( p[j] ) { 400137e8: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 400137ec: c2 04 40 08 ld [ %l1 + %o0 ], %g1 <== NOT EXECUTED 400137f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400137f4: 02 80 00 04 be 40013804 <== NOT EXECUTED 400137f8: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 400137fc: 7f ff ff 81 call 40013600 <== NOT EXECUTED 40013800: 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 40013818: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001381c: 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( 40013820: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 40013824: 7f ff ff 77 call 40013600 <== NOT EXECUTED 40013828: 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 40013840: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 40013844: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40013848: ab 2d 20 02 sll %l4, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4001384c: e2 02 00 15 ld [ %o0 + %l5 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40013850: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40013854: 12 bf ff e1 bne 400137d8 <== NOT EXECUTED 40013858: 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( 4001385c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 40013860: 7f ff ff 68 call 40013600 <== NOT EXECUTED 40013864: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 40013868: 81 c7 e0 08 ret 4001386c: 91 e8 20 00 restore %g0, 0, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 40013870: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013874: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013878: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 4001387c: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40013880: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 40013884: 7f ff c3 ec call 40004834 <__assert_func> <== NOT EXECUTED 40013888: 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 ); 4001388c: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013890: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013894: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013898: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 4001389c: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 400138a0: 7f ff c3 e5 call 40004834 <__assert_func> <== NOT EXECUTED 400138a4: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 400138a8: 01 00 00 00 nop 40013684 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40013684: 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 ); 40013688: 94 10 20 00 clr %o2 <== NOT EXECUTED 4001368c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40013690: 7f ff ff 2d call 40013344 <== NOT EXECUTED 40013694: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 40013698: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001369c: 02 80 00 08 be 400136bc <== NOT EXECUTED 400136a0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 400136a4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_ptr = 0; 400136a8: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 400136ac: 7f ff ff 10 call 400132ec <== NOT EXECUTED 400136b0: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED } return 1; } 400136b4: 81 c7 e0 08 ret <== NOT EXECUTED 400136b8: 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 ); 400136bc: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400136c0: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 400136c4: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 400136c8: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 400136cc: 94 12 a2 a0 or %o2, 0x2a0, %o2 <== NOT EXECUTED 400136d0: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 400136d4: 7f ff c4 58 call 40004834 <__assert_func> <== NOT EXECUTED 400136d8: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED 400136dc: 01 00 00 00 nop 40013d04 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 40013d04: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013d08: a0 96 20 00 orcc %i0, 0, %l0 40013d0c: 02 80 00 85 be 40013f20 40013d10: 11 10 00 89 sethi %hi(0x40022400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40013d14: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013d18: 80 a0 60 05 cmp %g1, 5 40013d1c: 12 80 00 8f bne 40013f58 40013d20: 80 a6 e0 00 cmp %i3, 0 /* * Error check arguments */ assert( source ); 40013d24: 02 80 00 86 be 40013f3c 40013d28: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 40013d2c: 02 80 00 67 be 40013ec8 40013d30: 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 ) { 40013d34: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40013d38: 80 a0 60 00 cmp %g1, 0 40013d3c: 06 80 00 57 bl 40013e98 40013d40: 94 07 00 1a add %i4, %i2, %o2 40013d44: 80 a0 60 00 cmp %g1, 0 40013d48: 22 80 00 51 be,a 40013e8c 40013d4c: 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; 40013d50: 25 10 00 8d sethi %hi(0x40023400), %l2 <== NOT EXECUTED 40013d54: e2 04 a1 58 ld [ %l2 + 0x158 ], %l1 ! 40023558 40013d58: 90 10 00 19 mov %i1, %o0 40013d5c: a7 3c 60 1f sra %l1, 0x1f, %l3 40013d60: 96 10 00 11 mov %l1, %o3 40013d64: 94 10 00 13 mov %l3, %o2 40013d68: 40 00 2c a8 call 4001f008 <__moddi3> 40013d6c: 92 10 00 1a mov %i2, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013d70: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40013d74: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013d78: 90 10 00 19 mov %i1, %o0 40013d7c: 92 10 00 1a mov %i2, %o1 40013d80: 40 00 2b bb call 4001ec6c <__divdi3> 40013d84: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40013d88: b0 10 20 00 clr %i0 40013d8c: 80 a5 20 00 cmp %l4, 0 40013d90: 02 80 00 14 be 40013de0 40013d94: 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 ); 40013d98: 90 10 00 10 mov %l0, %o0 40013d9c: 7f ff fd 6a call 40013344 40013da0: 94 10 20 00 clr %o2 assert( block_ptr ); 40013da4: 80 a2 20 00 cmp %o0, 0 40013da8: 02 80 00 73 be 40013f74 40013dac: 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; 40013db0: 80 a6 00 1c cmp %i0, %i4 40013db4: 38 80 00 02 bgu,a 40013dbc 40013db8: 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 ); 40013dbc: d0 02 00 00 ld [ %o0 ], %o0 40013dc0: 92 10 00 1b mov %i3, %o1 40013dc4: 90 02 00 14 add %o0, %l4, %o0 40013dc8: 40 00 06 e1 call 4001594c 40013dcc: 94 10 00 18 mov %i0, %o2 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 40013dd0: e2 04 a1 58 ld [ %l2 + 0x158 ], %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; 40013dd4: b6 06 c0 18 add %i3, %i0, %i3 block++; 40013dd8: a6 04 e0 01 inc %l3 my_length -= to_copy; 40013ddc: 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 ) { 40013de0: 80 a7 00 11 cmp %i4, %l1 40013de4: 0a 80 00 15 bcs 40013e38 40013de8: 80 a7 20 00 cmp %i4, 0 40013dec: a4 14 a1 58 or %l2, 0x158, %l2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013df0: 90 10 00 10 mov %l0, %o0 40013df4: 92 10 00 13 mov %l3, %o1 40013df8: 7f ff fd 53 call 40013344 40013dfc: 94 10 20 00 clr %o2 assert( block_ptr ); 40013e00: 80 a2 20 00 cmp %o0, 0 40013e04: 02 80 00 37 be 40013ee0 40013e08: 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 ); 40013e0c: d0 02 00 00 ld [ %o0 ], %o0 40013e10: 40 00 06 cf call 4001594c 40013e14: 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 ) { 40013e18: 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; 40013e1c: 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; 40013e20: 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 ) { 40013e24: 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++; 40013e28: 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 ) { 40013e2c: 08 bf ff f1 bleu 40013df0 40013e30: b0 06 00 11 add %i0, %l1, %i0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 40013e34: 80 a7 20 00 cmp %i4, 0 40013e38: 02 80 00 0e be 40013e70 40013e3c: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013e40: 92 10 00 13 mov %l3, %o1 40013e44: 90 10 00 10 mov %l0, %o0 40013e48: 7f ff fd 3f call 40013344 40013e4c: 94 10 20 00 clr %o2 assert( block_ptr ); 40013e50: 80 a2 20 00 cmp %o0, 0 40013e54: 02 80 00 2b be 40013f00 40013e58: 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 ); 40013e5c: d0 02 00 00 ld [ %o0 ], %o0 40013e60: 92 10 00 1b mov %i3, %o1 40013e64: 40 00 06 ba call 4001594c 40013e68: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 40013e6c: 90 07 bf f8 add %fp, -8, %o0 40013e70: 7f ff c3 d5 call 40004dc4 40013e74: 92 10 20 00 clr %o1 40013e78: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013e7c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40013e80: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 40013e84: 81 c7 e0 08 ret 40013e88: 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 ) { 40013e8c: 80 a0 40 0a cmp %g1, %o2 40013e90: 1a bf ff b1 bcc 40013d54 40013e94: 25 10 00 8d sethi %hi(0x40023400), %l2 status = IMFS_memfile_extend( the_jnode, last_byte ); 40013e98: 90 10 00 10 mov %l0, %o0 40013e9c: 7f ff fe e7 call 40013a38 40013ea0: 92 10 20 00 clr %o1 if ( status ) 40013ea4: 80 a2 20 00 cmp %o0, 0 40013ea8: 02 bf ff ab be 40013d54 40013eac: 25 10 00 8d sethi %hi(0x40023400), %l2 rtems_set_errno_and_return_minus_one( ENOSPC ); 40013eb0: 40 00 04 6c call 40015060 <__errno> <== NOT EXECUTED 40013eb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013eb8: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40013ebc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013ec0: 81 c7 e0 08 ret <== NOT EXECUTED 40013ec4: 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 ); 40013ec8: 40 00 04 66 call 40015060 <__errno> <== NOT EXECUTED 40013ecc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013ed0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40013ed4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013ed8: 81 c7 e0 08 ret <== NOT EXECUTED 40013edc: 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 ); 40013ee0: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013ee4: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013ee8: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013eec: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013ef0: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 40013ef4: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 40013ef8: 7f ff c2 4f call 40004834 <__assert_func> <== NOT EXECUTED 40013efc: 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 ); 40013f00: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013f04: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013f08: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013f0c: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013f10: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 40013f14: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 40013f18: 7f ff c2 47 call 40004834 <__assert_func> <== NOT EXECUTED 40013f1c: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 40013f20: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013f24: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013f28: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013f2c: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 40013f30: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 40013f34: 7f ff c2 40 call 40004834 <__assert_func> <== NOT EXECUTED 40013f38: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 40013f3c: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013f40: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013f44: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013f48: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 40013f4c: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 40013f50: 7f ff c2 39 call 40004834 <__assert_func> <== NOT EXECUTED 40013f54: 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 ); 40013f58: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013f5c: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013f60: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013f64: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 40013f68: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 40013f6c: 7f ff c2 32 call 40004834 <__assert_func> <== NOT EXECUTED 40013f70: 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 ); 40013f74: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013f78: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013f7c: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 40013f80: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013f84: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 40013f88: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 40013f8c: 7f ff c2 2a call 40004834 <__assert_func> <== NOT EXECUTED 40013f90: 92 10 23 1c mov 0x31c, %o1 <== NOT EXECUTED 40013f94: 01 00 00 00 nop 4000b854 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000b854: 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 ); 4000b858: 40 00 11 e9 call 4000fffc 4000b85c: 90 10 00 18 mov %i0, %o0 4000b860: 96 07 bf fc add %fp, -4, %o3 4000b864: 92 10 00 08 mov %o0, %o1 4000b868: a0 07 bf b8 add %fp, -72, %l0 4000b86c: 90 10 00 18 mov %i0, %o0 4000b870: 7f ff ff 7e call 4000b668 4000b874: 94 10 00 10 mov %l0, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000b878: 97 2e 60 10 sll %i1, 0x10, %o3 4000b87c: 03 00 00 3c sethi %hi(0xf000), %g1 4000b880: 97 32 e0 10 srl %o3, 0x10, %o3 4000b884: 05 00 00 10 sethi %hi(0x4000), %g2 4000b888: 82 0a c0 01 and %o3, %g1, %g1 4000b88c: 80 a0 40 02 cmp %g1, %g2 4000b890: 02 80 00 24 be 4000b920 4000b894: 05 00 00 20 sethi %hi(0x8000), %g2 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000b898: 80 a0 40 02 cmp %g1, %g2 4000b89c: 02 80 00 0c be 4000b8cc 4000b8a0: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000b8a4: 05 00 00 08 sethi %hi(0x2000), %g2 4000b8a8: 80 a0 40 02 cmp %g1, %g2 4000b8ac: 02 80 00 12 be 4000b8f4 4000b8b0: 05 00 00 18 sethi %hi(0x6000), %g2 4000b8b4: 80 a0 40 02 cmp %g1, %g2 4000b8b8: 02 80 00 0f be 4000b8f4 4000b8bc: 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)) 4000b8c0: 80 a0 40 02 cmp %g1, %g2 4000b8c4: 12 80 00 21 bne 4000b948 4000b8c8: 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( 4000b8cc: 90 10 00 1c mov %i4, %o0 4000b8d0: 94 10 00 10 mov %l0, %o2 4000b8d4: 98 07 bf e0 add %fp, -32, %o4 4000b8d8: 40 00 09 f9 call 4000e0bc 4000b8dc: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000b8e0: 80 a2 20 00 cmp %o0, 0 4000b8e4: 02 80 00 1f be 4000b960 4000b8e8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4000b8ec: 81 c7 e0 08 ret 4000b8f0: 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 ); 4000b8f4: f4 3f bf e0 std %i2, [ %fp + -32 ] 4000b8f8: 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( 4000b8fc: 90 10 00 1c mov %i4, %o0 4000b900: 94 10 00 10 mov %l0, %o2 4000b904: 98 07 bf e0 add %fp, -32, %o4 4000b908: 40 00 09 ed call 4000e0bc 4000b90c: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000b910: 80 a2 20 00 cmp %o0, 0 4000b914: 12 80 00 17 bne 4000b970 4000b918: 01 00 00 00 nop 4000b91c: 30 80 00 11 b,a 4000b960 <== 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 ); 4000b920: 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( 4000b924: 90 10 00 1c mov %i4, %o0 4000b928: 94 10 00 10 mov %l0, %o2 4000b92c: 98 07 bf e0 add %fp, -32, %o4 4000b930: 40 00 09 e3 call 4000e0bc 4000b934: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000b938: 80 a2 20 00 cmp %o0, 0 4000b93c: 12 80 00 0d bne 4000b970 4000b940: 01 00 00 00 nop 4000b944: 30 80 00 07 b,a 4000b960 <== 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 ); 4000b948: 40 00 0d f6 call 4000f120 <__errno> <== NOT EXECUTED 4000b94c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b950: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000b954: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b958: 81 c7 e0 08 ret <== NOT EXECUTED 4000b95c: 81 e8 00 00 restore <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000b960: 40 00 0d f0 call 4000f120 <__errno> <== NOT EXECUTED 4000b964: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b968: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000b96c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000b970: 81 c7 e0 08 ret 4000b974: 81 e8 00 00 restore 400043bc : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 400043bc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 400043c0: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 400043c4: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400043c8: 80 a0 a0 01 cmp %g2, 1 400043cc: 12 80 00 05 bne 400043e0 400043d0: 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; 400043d4: f0 20 60 5c st %i0, [ %g1 + 0x5c ] return 0; } 400043d8: 81 c7 e0 08 ret 400043dc: 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 ); 400043e0: 40 00 43 20 call 40015060 <__errno> <== NOT EXECUTED 400043e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400043e8: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400043ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400043f0: 81 c7 e0 08 ret <== NOT EXECUTED 400043f4: 81 e8 00 00 restore <== NOT EXECUTED 40004c70 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 40004c70: 9d e3 bf a0 save %sp, -96, %sp assert( the_jnode ); 40004c74: 80 a6 20 00 cmp %i0, 0 40004c78: 02 80 00 5b be 40004de4 40004c7c: 21 10 00 9b sethi %hi(0x40026c00), %l0 fprintf(stdout, "%s", the_jnode->name ); 40004c80: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 ! 40026e18 <_impure_ptr> 40004c84: 90 06 20 0c add %i0, 0xc, %o0 40004c88: 40 00 3d b3 call 40014354 40004c8c: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 40004c90: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 40004c94: 80 a2 a0 07 cmp %o2, 7 40004c98: 08 80 00 0f bleu 40004cd4 40004c9c: 83 2a a0 02 sll %o2, 2, %g1 fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40004ca0: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 <== NOT EXECUTED 40004ca4: 13 10 00 94 sethi %hi(0x40025000), %o1 <== NOT EXECUTED 40004ca8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004cac: 40 00 3d 4c call 400141dc <== NOT EXECUTED 40004cb0: 92 12 63 a8 or %o1, 0x3a8, %o1 <== NOT EXECUTED assert(0); 40004cb4: 92 10 20 6c mov 0x6c, %o1 <== NOT EXECUTED assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); assert(0); 40004cb8: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004cbc: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 40004cc0: 17 10 00 94 sethi %hi(0x40025000), %o3 <== NOT EXECUTED 40004cc4: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED 40004cc8: 94 12 a0 c8 or %o2, 0xc8, %o2 <== NOT EXECUTED 40004ccc: 40 00 02 83 call 400056d8 <__assert_func> <== NOT EXECUTED 40004cd0: 96 12 e0 e0 or %o3, 0xe0, %o3 <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 40004cd4: 05 10 00 13 sethi %hi(0x40004c00), %g2 40004cd8: 84 10 a0 14 or %g2, 0x14, %g2 ! 40004c14 40004cdc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40004ce0: 81 c0 40 00 jmp %g1 40004ce4: 01 00 00 00 nop fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 40004ce8: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 <== NOT EXECUTED 40004cec: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004cf0: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004cf4: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40004cf8: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004cfc: 40 00 40 b6 call 40014fd4 <== NOT EXECUTED 40004d00: 90 12 23 90 or %o0, 0x390, %o0 ! 40025390 <__FUNCTION__.5752+0x2a8> <== NOT EXECUTED assert(0); 40004d04: 10 bf ff ed b 40004cb8 <== NOT EXECUTED 40004d08: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 40004d0c: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 <== NOT EXECUTED 40004d10: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 <== NOT EXECUTED 40004d14: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 <== NOT EXECUTED 40004d18: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004d1c: 13 10 00 94 sethi %hi(0x40025000), %o1 <== NOT EXECUTED 40004d20: 40 00 3d 2f call 400141dc <== NOT EXECUTED 40004d24: 92 12 63 58 or %o1, 0x358, %o1 ! 40025358 <__FUNCTION__.5752+0x270> <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004d28: 31 10 00 94 sethi %hi(0x40025000), %i0 <== NOT EXECUTED 40004d2c: 40 00 44 b4 call 40015ffc <== NOT EXECUTED 40004d30: 91 ee 22 b0 restore %i0, 0x2b0, %o0 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40004d34: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 40004d38: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 40004d3c: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004d40: 13 10 00 94 sethi %hi(0x40025000), %o1 40004d44: 40 00 3d 26 call 400141dc 40004d48: 92 12 63 68 or %o1, 0x368, %o1 ! 40025368 <__FUNCTION__.5752+0x280> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004d4c: 31 10 00 94 sethi %hi(0x40025000), %i0 40004d50: 40 00 44 ab call 40015ffc 40004d54: 91 ee 22 b0 restore %i0, 0x2b0, %o0 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40004d58: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 <== NOT EXECUTED 40004d5c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004d60: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004d64: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40004d68: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004d6c: 40 00 40 9a call 40014fd4 <== NOT EXECUTED 40004d70: 90 12 23 78 or %o0, 0x378, %o0 ! 40025378 <__FUNCTION__.5752+0x290> <== NOT EXECUTED assert(0); 40004d74: 10 bf ff d1 b 40004cb8 <== NOT EXECUTED 40004d78: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 40004d7c: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 <== NOT EXECUTED 40004d80: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004d84: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004d88: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40004d8c: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004d90: 40 00 40 91 call 40014fd4 <== NOT EXECUTED 40004d94: 90 12 23 78 or %o0, 0x378, %o0 ! 40025378 <__FUNCTION__.5752+0x290> <== NOT EXECUTED assert(0); 40004d98: 10 bf ff c8 b 40004cb8 <== NOT EXECUTED 40004d9c: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40004da0: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 40004da4: d6 06 20 54 ld [ %i0 + 0x54 ], %o3 40004da8: d4 06 20 50 ld [ %i0 + 0x50 ], %o2 40004dac: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004db0: 13 10 00 94 sethi %hi(0x40025000), %o1 40004db4: 40 00 3d 0a call 400141dc 40004db8: 92 12 63 40 or %o1, 0x340, %o1 ! 40025340 <__FUNCTION__.5752+0x258> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004dbc: 31 10 00 94 sethi %hi(0x40025000), %i0 40004dc0: 40 00 44 8f call 40015ffc 40004dc4: 91 ee 22 b0 restore %i0, 0x2b0, %o0 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 40004dc8: c2 04 22 18 ld [ %l0 + 0x218 ], %g1 40004dcc: 90 10 20 2f mov 0x2f, %o0 40004dd0: d2 00 60 08 ld [ %g1 + 8 ], %o1 40004dd4: 40 00 3d 1c call 40014244 40004dd8: 31 10 00 94 sethi %hi(0x40025000), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004ddc: 40 00 44 88 call 40015ffc 40004de0: 91 ee 22 b0 restore %i0, 0x2b0, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 40004de4: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004de8: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 40004dec: 17 10 00 94 sethi %hi(0x40025000), %o3 <== NOT EXECUTED 40004df0: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED 40004df4: 94 12 a0 c8 or %o2, 0xc8, %o2 <== NOT EXECUTED 40004df8: 96 12 e3 30 or %o3, 0x330, %o3 <== NOT EXECUTED 40004dfc: 40 00 02 37 call 400056d8 <__assert_func> <== NOT EXECUTED 40004e00: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED 40004e04: 01 00 00 00 nop 40004404 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 40004404: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 40004408: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 4000440c: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40004410: 80 a0 a0 04 cmp %g2, 4 40004414: 12 80 00 19 bne 40004478 40004418: 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++ ) 4000441c: 02 80 00 15 be 40004470 40004420: 86 10 20 00 clr %g3 40004424: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40004428: 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 ); 4000442c: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40004430: 80 a1 20 00 cmp %g4, 0 40004434: 12 80 00 08 bne 40004454 40004438: c4 08 80 00 ldub [ %g2 ], %g2 4000443c: 30 80 00 13 b,a 40004488 <== NOT EXECUTED 40004440: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40004444: c8 48 80 18 ldsb [ %g2 + %i0 ], %g4 40004448: 80 a1 20 00 cmp %g4, 0 4000444c: 02 80 00 07 be 40004468 40004450: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; 40004454: 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++ ) 40004458: b0 06 20 01 inc %i0 4000445c: 80 a6 80 18 cmp %i2, %i0 40004460: 18 bf ff f8 bgu 40004440 40004464: 86 10 00 18 mov %i0, %g3 buf[i] = node->info.sym_link.name[i]; return i; } 40004468: 81 c7 e0 08 ret 4000446c: 81 e8 00 00 restore 40004470: 81 c7 e0 08 ret <== NOT EXECUTED 40004474: 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 ); 40004478: 40 00 42 fa call 40015060 <__errno> <== NOT EXECUTED 4000447c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004480: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004484: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004488: 81 c7 e0 08 ret <== NOT EXECUTED 4000448c: 81 e8 00 00 restore <== NOT EXECUTED 40004490 : 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 */ ) { 40004490: 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; 40004494: e0 06 40 00 ld [ %i1 ], %l0 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 40004498: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000449c: 90 04 20 0c add %l0, 0xc, %o0 <== NOT EXECUTED 400044a0: 40 00 46 c3 call 40015fac <== NOT EXECUTED 400044a4: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 400044a8: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400044ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044b0: 22 80 00 05 be,a 400044c4 <== NOT EXECUTED 400044b4: 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 ); 400044b8: 40 00 14 ae call 40009770 <_Chain_Extract> <== NOT EXECUTED 400044bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 400044c0: 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 ); 400044c4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400044c8: 90 00 60 50 add %g1, 0x50, %o0 <== NOT EXECUTED 400044cc: 40 00 14 9d call 40009740 <_Chain_Append> <== NOT EXECUTED 400044d0: 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 ); 400044d4: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 400044d8: 40 00 02 3b call 40004dc4 <== NOT EXECUTED 400044dc: 92 10 20 00 clr %o1 <== NOT EXECUTED 400044e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400044e4: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED return 0; } 400044e8: 81 c7 e0 08 ret <== NOT EXECUTED 400044ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000b984 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000b984: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000b988: 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 ) { 4000b98c: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000b990: 80 a0 60 00 cmp %g1, 0 4000b994: 22 80 00 06 be,a 4000b9ac 4000b998: 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 ); 4000b99c: 40 00 03 9f call 4000c818 <_Chain_Extract> 4000b9a0: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000b9a4: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000b9a8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000b9ac: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000b9b0: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000b9b4: 90 07 bf f8 add %fp, -8, %o0 4000b9b8: 40 00 01 0b call 4000bde4 4000b9bc: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000b9c0: 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) ) { 4000b9c4: 90 10 00 10 mov %l0, %o0 4000b9c8: 40 00 01 40 call 4000bec8 4000b9cc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000b9d0: 80 a2 20 00 cmp %o0, 0 4000b9d4: 12 80 00 12 bne 4000ba1c 4000b9d8: 01 00 00 00 nop 4000b9dc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000b9e0: 80 a0 60 00 cmp %g1, 0 4000b9e4: 12 80 00 0e bne 4000ba1c 4000b9e8: 03 10 00 72 sethi %hi(0x4001c800), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000b9ec: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001c928 4000b9f0: c4 06 40 00 ld [ %i1 ], %g2 4000b9f4: c6 00 60 04 ld [ %g1 + 4 ], %g3 4000b9f8: 80 a0 c0 02 cmp %g3, %g2 4000b9fc: 22 80 00 02 be,a 4000ba04 4000ba00: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000ba04: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000ba08: 80 a0 60 04 cmp %g1, 4 4000ba0c: 22 80 00 06 be,a 4000ba24 4000ba10: 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 ); 4000ba14: 40 00 00 82 call 4000bc1c 4000ba18: 90 10 00 10 mov %l0, %o0 } return 0; } 4000ba1c: 81 c7 e0 08 ret 4000ba20: 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 ) 4000ba24: 80 a2 20 00 cmp %o0, 0 4000ba28: 02 bf ff fb be 4000ba14 4000ba2c: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 4000ba30: 40 00 00 7b call 4000bc1c 4000ba34: 01 00 00 00 nop 4000ba38: 30 bf ff f7 b,a 4000ba14 4000ba5c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000ba5c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000ba60: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 4000ba64: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000ba68: 80 a0 a0 07 cmp %g2, 7 4000ba6c: 08 80 00 08 bleu 4000ba8c 4000ba70: 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 ); 4000ba74: 40 00 0d ab call 4000f120 <__errno> <== NOT EXECUTED 4000ba78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ba7c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000ba80: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ba84: 81 c7 e0 08 ret <== NOT EXECUTED 4000ba88: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000ba8c: 07 10 00 2e sethi %hi(0x4000b800), %g3 4000ba90: 86 10 e2 3c or %g3, 0x23c, %g3 ! 4000ba3c 4000ba94: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 4000ba98: 81 c0 80 00 jmp %g2 4000ba9c: 01 00 00 00 nop case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4000baa0: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000baa4: 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; 4000baa8: c6 10 60 2e lduh [ %g1 + 0x2e ], %g3 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000baac: 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; 4000bab0: c6 36 60 0c sth %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000bab4: 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; 4000bab8: 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; 4000babc: 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; 4000bac0: 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; 4000bac4: 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; 4000bac8: 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; 4000bacc: 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; 4000bad0: 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; 4000bad4: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 4000bad8: 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; 4000badc: 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; 4000bae0: 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; 4000bae4: 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; } 4000bae8: 81 c7 e0 08 ret 4000baec: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000baf0: 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; 4000baf4: 10 bf ff ed b 4000baa8 4000baf8: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000bafc: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 4000bb00: 10 bf ff ea b 4000baa8 4000bb04: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] 400044f0 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 400044f0: 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 ); 400044f4: 40 00 46 79 call 40015ed8 400044f8: 90 10 00 1a mov %i2, %o0 400044fc: 96 07 bf fc add %fp, -4, %o3 40004500: 92 10 00 08 mov %o0, %o1 40004504: a0 07 bf b8 add %fp, -72, %l0 40004508: 90 10 00 1a mov %i2, %o0 4000450c: 40 00 33 a3 call 40011398 40004510: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 40004514: 40 00 46 5c call 40015e84 40004518: 90 10 00 19 mov %i1, %o0 if (info.sym_link.name == NULL) { 4000451c: 80 a2 20 00 cmp %o0, 0 40004520: 02 80 00 15 be 40004574 40004524: 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( 40004528: 90 10 00 18 mov %i0, %o0 4000452c: 94 10 00 10 mov %l0, %o2 40004530: 92 10 20 04 mov 4, %o1 40004534: 17 00 00 28 sethi %hi(0xa000), %o3 40004538: 98 07 bf e0 add %fp, -32, %o4 4000453c: 96 12 e1 ff or %o3, 0x1ff, %o3 40004540: 40 00 30 0f call 4001057c 40004544: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 40004548: 80 a2 20 00 cmp %o0, 0 4000454c: 12 80 00 08 bne 4000456c 40004550: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 40004554: 40 00 01 f1 call 40004d18 <== NOT EXECUTED 40004558: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000455c: 40 00 42 c1 call 40015060 <__errno> <== NOT EXECUTED 40004560: 01 00 00 00 nop <== NOT EXECUTED 40004564: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40004568: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 4000456c: 81 c7 e0 08 ret 40004570: 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); 40004574: 40 00 42 bb call 40015060 <__errno> <== NOT EXECUTED 40004578: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000457c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004580: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004584: 81 c7 e0 08 ret <== NOT EXECUTED 40004588: 81 e8 00 00 restore <== NOT EXECUTED 4000458c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 4000458c: 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; 40004590: 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 ) { 40004594: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004598: 80 a0 60 03 cmp %g1, 3 4000459c: 02 80 00 09 be 400045c0 400045a0: a2 10 00 18 mov %i0, %l1 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 400045a4: c2 06 60 08 ld [ %i1 + 8 ], %g1 400045a8: 90 10 00 11 mov %l1, %o0 400045ac: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400045b0: 9f c0 40 00 call %g1 400045b4: 92 10 00 19 mov %i1, %o1 return result; } 400045b8: 81 c7 e0 08 ret 400045bc: 91 e8 00 08 restore %g0, %o0, %o0 * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 400045c0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400045c4: 80 a0 60 00 cmp %g1, 0 400045c8: 02 80 00 25 be 4000465c 400045cc: a4 07 bf e4 add %fp, -28, %l2 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 400045d0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 400045d4: da 06 60 04 ld [ %i1 + 4 ], %o5 400045d8: c8 06 60 08 ld [ %i1 + 8 ], %g4 400045dc: c6 06 60 0c ld [ %i1 + 0xc ], %g3 400045e0: c4 27 bf f4 st %g2, [ %fp + -12 ] the_link.node_access = node->info.hard_link.link_node; 400045e4: 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; 400045e8: da 27 bf e8 st %o5, [ %fp + -24 ] 400045ec: c8 27 bf ec st %g4, [ %fp + -20 ] 400045f0: c6 27 bf f0 st %g3, [ %fp + -16 ] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 400045f4: 40 00 30 31 call 400106b8 400045f8: 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) 400045fc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40004600: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 40004604: 80 a0 a0 01 cmp %g2, 1 40004608: 02 80 00 0a be 40004630 4000460c: 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 ); 40004610: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40004614: c6 30 60 30 sth %g3, [ %g1 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40004618: 40 00 01 eb call 40004dc4 4000461c: 92 10 20 00 clr %o1 40004620: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40004624: c4 07 bf f8 ld [ %fp + -8 ], %g2 40004628: 10 bf ff df b 400045a4 4000462c: 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 ); 40004630: c2 07 bf ec ld [ %fp + -20 ], %g1 40004634: 90 10 00 18 mov %i0, %o0 40004638: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 4000463c: 92 10 00 12 mov %l2, %o1 40004640: 9f c0 40 00 call %g1 40004644: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40004648: 80 a2 20 00 cmp %o0, 0 4000464c: 22 bf ff d7 be,a 400045a8 40004650: c2 06 60 08 ld [ %i1 + 8 ], %g1 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 40004654: 81 c7 e0 08 ret 40004658: 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 ); 4000465c: 40 00 42 81 call 40015060 <__errno> <== NOT EXECUTED 40004660: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004664: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004668: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000466c: 81 c7 e0 08 ret <== NOT EXECUTED 40004670: 81 e8 00 00 restore <== NOT EXECUTED 40004674 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004674: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004678: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4000467c: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40004680: 80 a0 a0 01 cmp %g2, 1 40004684: 12 80 00 09 bne 400046a8 40004688: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 4000468c: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 40004690: 80 a0 a0 00 cmp %g2, 0 40004694: 02 80 00 0b be 400046c0 40004698: 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; 4000469c: c0 20 60 5c clr [ %g1 + 0x5c ] return 0; } 400046a0: 81 c7 e0 08 ret 400046a4: 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 ); 400046a8: 40 00 42 6e call 40015060 <__errno> <== NOT EXECUTED 400046ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400046b0: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400046b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400046b8: 81 c7 e0 08 ret <== NOT EXECUTED 400046bc: 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 */ 400046c0: 40 00 42 68 call 40015060 <__errno> <== NOT EXECUTED 400046c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400046c8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400046cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400046d0: 81 c7 e0 08 ret <== NOT EXECUTED 400046d4: 81 e8 00 00 restore <== NOT EXECUTED 400035b4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 400035b4: 9d e3 bf a0 save %sp, -96, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 400035b8: 03 10 00 73 sethi %hi(0x4001cc00), %g1 400035bc: c2 00 62 48 ld [ %g1 + 0x248 ], %g1 ! 4001ce48 400035c0: 80 a0 60 00 cmp %g1, 0 400035c4: 02 80 00 05 be 400035d8 400035c8: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 400035cc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 400035d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400035d4: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 400035d8: 40 00 22 ee call 4000c190 400035dc: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 400035e0: 03 10 00 73 sethi %hi(0x4001cc00), %g1 400035e4: c2 00 62 4c ld [ %g1 + 0x24c ], %g1 ! 4001ce4c 400035e8: 80 a0 60 00 cmp %g1, 0 400035ec: 02 80 00 08 be 4000360c 400035f0: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 400035f4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 400035f8: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 400035fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003600: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 40003604: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40003608: b2 26 40 08 sub %i1, %o0, %i1 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 4000360c: 23 10 00 73 sethi %hi(0x4001cc00), %l1 40003610: c2 0c 62 45 ldub [ %l1 + 0x245 ], %g1 ! 4001ce45 40003614: 80 a0 60 00 cmp %g1, 0 40003618: 12 80 00 10 bne 40003658 4000361c: 21 10 00 72 sethi %hi(0x4001c800), %l0 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 40003620: 03 10 00 72 sethi %hi(0x4001c800), %g1 40003624: c2 08 60 f0 ldub [ %g1 + 0xf0 ], %g1 ! 4001c8f0 40003628: 80 a0 60 00 cmp %g1, 0 4000362c: 12 80 00 13 bne 40003678 40003630: 90 10 00 18 mov %i0, %o0 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 40003634: 21 10 00 72 sethi %hi(0x4001c800), %l0 40003638: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 ! 4001c820 4000363c: 92 10 00 18 mov %i0, %o1 40003640: 94 10 00 19 mov %i1, %o2 40003644: 40 00 11 4c call 40007b74 <_Heap_Initialize> 40003648: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 4000364c: 80 a2 20 00 cmp %o0, 0 40003650: 02 80 00 13 be 4000369c 40003654: 01 00 00 00 nop rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 40003658: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 4000365c: 21 10 00 74 sethi %hi(0x4001d000), %l0 40003660: 40 00 14 84 call 40008870 <_Protected_heap_Get_size> 40003664: e2 04 21 38 ld [ %l0 + 0x138 ], %l1 ! 4001d138 40003668: 90 02 00 11 add %o0, %l1, %o0 4000366c: d0 24 21 38 st %o0, [ %l0 + 0x138 ] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 40003670: 81 c7 e0 08 ret 40003674: 81 e8 00 00 restore if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 40003678: 92 10 20 00 clr %o1 4000367c: 40 00 31 23 call 4000fb08 40003680: 94 10 00 19 mov %i1, %o2 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 40003684: c2 0c 62 45 ldub [ %l1 + 0x245 ], %g1 40003688: 80 a0 60 00 cmp %g1, 0 4000368c: 22 bf ff eb be,a 40003638 40003690: 21 10 00 72 sethi %hi(0x4001c800), %l0 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 40003694: 10 bf ff f2 b 4000365c <== NOT EXECUTED 40003698: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 ! 4001c820 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 4000369c: 40 00 0f 19 call 40007300 <== NOT EXECUTED 400036a0: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED 400036a4: 01 00 00 00 nop 4000642c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 4000642c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 40006430: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006434: 02 80 00 3b be 40006520 <== NOT EXECUTED 40006438: 27 10 01 ad sethi %hi(0x4006b400), %l3 <== NOT EXECUTED return; if ( !print_handler ) 4000643c: e8 04 e3 bc ld [ %l3 + 0x3bc ], %l4 ! 4006b7bc <== NOT EXECUTED 40006440: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40006444: 02 80 00 37 be 40006520 <== NOT EXECUTED 40006448: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 4000644c: 02 80 00 3e be 40006544 <== NOT EXECUTED 40006450: a4 06 20 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); 40006454: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40006458: e2 04 80 00 ld [ %l2 ], %l1 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 4000645c: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40006460: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 40006464: ec 06 21 48 ld [ %i0 + 0x148 ], %l6 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 40006468: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000646c: 7f ff ff d8 call 400063cc <== NOT EXECUTED 40006470: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( high_water_mark ) 40006474: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40006478: a0 05 40 11 add %l5, %l1, %l0 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 4000647c: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40006480: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 40006484: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006488: 02 80 00 44 be 40006598 <== NOT EXECUTED 4000648c: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED (*print_handler)( 40006490: ee 06 20 08 ld [ %i0 + 8 ], %l7 <== NOT EXECUTED 40006494: 2b 10 01 ad sethi %hi(0x4006b400), %l5 <== NOT EXECUTED 40006498: fa 05 63 b8 ld [ %l5 + 0x3b8 ], %i5 ! 4006b7b8 <== NOT EXECUTED 4000649c: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 400064a0: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 400064a4: 40 00 1a 87 call 4000cec0 <== NOT EXECUTED 400064a8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 400064ac: 13 10 01 81 sethi %hi(0x40060400), %o1 <== NOT EXECUTED 400064b0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 400064b4: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED 400064b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 400064bc: 9f c5 00 00 call %l4 <== NOT EXECUTED 400064c0: 92 12 63 b8 or %o1, 0x3b8, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 400064c4: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 400064c8: c2 04 e3 bc ld [ %l3 + 0x3bc ], %g1 <== NOT EXECUTED 400064cc: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 400064d0: d0 05 63 b8 ld [ %l5 + 0x3b8 ], %o0 <== NOT EXECUTED 400064d4: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 400064d8: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 400064dc: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 400064e0: 9a 10 00 11 mov %l1, %o5 <== NOT EXECUTED 400064e4: 13 10 01 81 sethi %hi(0x40060400), %o1 <== NOT EXECUTED 400064e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400064ec: 92 12 63 d8 or %o1, 0x3d8, %o1 ! 400607d8 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 400064f0: 03 10 01 ad sethi %hi(0x4006b400), %g1 <== NOT EXECUTED 400064f4: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 4006b7b4 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 400064f8: 03 10 01 ad sethi %hi(0x4006b400), %g1 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 400064fc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40006500: 02 80 00 0a be 40006528 <== NOT EXECUTED 40006504: 05 10 01 ad sethi %hi(0x4006b400), %g2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40006508: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 <== NOT EXECUTED 4000650c: d0 00 a3 b8 ld [ %g2 + 0x3b8 ], %o0 <== NOT EXECUTED 40006510: 13 10 01 82 sethi %hi(0x40060800), %o1 <== NOT EXECUTED 40006514: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40006518: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000651c: 92 12 60 08 or %o1, 8, %o1 <== NOT EXECUTED 40006520: 81 c7 e0 08 ret <== NOT EXECUTED 40006524: 81 e8 00 00 restore <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 40006528: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 <== NOT EXECUTED 4000652c: d0 00 a3 b8 ld [ %g2 + 0x3b8 ], %o0 <== NOT EXECUTED 40006530: 13 10 01 81 sethi %hi(0x40060400), %o1 <== NOT EXECUTED 40006534: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006538: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 400607f8 <== NOT EXECUTED 4000653c: 81 c7 e0 08 ret <== NOT EXECUTED 40006540: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 40006544: 25 10 01 b8 sethi %hi(0x4006e000), %l2 <== NOT EXECUTED 40006548: a4 14 a3 f8 or %l2, 0x3f8, %l2 ! 4006e3f8 <== NOT EXECUTED 4000654c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED 40006550: ac 10 20 00 clr %l6 <== NOT EXECUTED 40006554: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006558: 02 bf ff f2 be 40006520 <== NOT EXECUTED 4000655c: b0 10 20 00 clr %i0 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 40006560: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40006564: e2 04 80 00 ld [ %l2 ], %l1 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 40006568: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 4000656c: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40006570: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40006574: 7f ff ff 96 call 400063cc <== NOT EXECUTED 40006578: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( high_water_mark ) 4000657c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40006580: a0 05 40 11 add %l5, %l1, %l0 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 40006584: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40006588: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 4000658c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006590: 12 bf ff c0 bne 40006490 <== NOT EXECUTED 40006594: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 40006598: 2b 10 01 ad sethi %hi(0x4006b400), %l5 <== NOT EXECUTED 4000659c: d0 05 63 b8 ld [ %l5 + 0x3b8 ], %o0 ! 4006b7b8 <== NOT EXECUTED 400065a0: 13 10 01 81 sethi %hi(0x40060400), %o1 <== NOT EXECUTED 400065a4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 400065a8: 9f c5 00 00 call %l4 <== NOT EXECUTED 400065ac: 92 12 63 c8 or %o1, 0x3c8, %o1 <== NOT EXECUTED } (*print_handler)( 400065b0: 10 bf ff c6 b 400064c8 <== NOT EXECUTED 400065b4: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 400063cc : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 400063cc: 82 02 20 10 add %o0, 0x10, %g1 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 400063d0: 86 0a 7f fc and %o1, -4, %g3 <== NOT EXECUTED 400063d4: 86 00 40 03 add %g1, %g3, %g3 <== NOT EXECUTED 400063d8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400063dc: 1a 80 00 10 bcc 4000641c <== NOT EXECUTED 400063e0: 05 29 69 69 sethi %hi(0xa5a5a400), %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 400063e4: c8 02 20 10 ld [ %o0 + 0x10 ], %g4 <== NOT EXECUTED 400063e8: 84 10 a1 a5 or %g2, 0x1a5, %g2 <== NOT EXECUTED 400063ec: 80 a1 00 02 cmp %g4, %g2 <== NOT EXECUTED 400063f0: 22 80 00 08 be,a 40006410 <== NOT EXECUTED 400063f4: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED return (void *) base; 400063f8: 81 c3 e0 08 retl <== NOT EXECUTED 400063fc: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 40006400: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 40006404: 12 80 00 08 bne 40006424 <== NOT EXECUTED 40006408: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 4000640c: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 40006410: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40006414: 38 bf ff fb bgu,a 40006400 <== NOT EXECUTED 40006418: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 4000641c: 81 c3 e0 08 retl <== NOT EXECUTED 40006420: 90 10 20 00 clr %o0 <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 40006424: 81 c3 e0 08 retl <== NOT EXECUTED 40006428: 01 00 00 00 nop 4000662c : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 4000662c: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 40006630: 11 10 01 82 sethi %hi(0x40060800), %o0 <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 40006634: e0 06 20 c4 ld [ %i0 + 0xc4 ], %l0 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 40006638: 40 00 0c 5d call 400097ac <== NOT EXECUTED 4000663c: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 40006640: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40006644: 11 10 01 82 sethi %hi(0x40060800), %o0 <== NOT EXECUTED 40006648: 40 00 0c 59 call 400097ac <== NOT EXECUTED 4000664c: 90 12 20 88 or %o0, 0x88, %o0 ! 40060888 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 40006650: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED 40006654: 11 10 01 82 sethi %hi(0x40060800), %o0 <== NOT EXECUTED 40006658: 40 00 0c 55 call 400097ac <== NOT EXECUTED 4000665c: 90 12 20 a8 or %o0, 0xa8, %o0 ! 400608a8 <== NOT EXECUTED printk( 40006660: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 40006664: 11 10 01 82 sethi %hi(0x40060800), %o0 <== NOT EXECUTED 40006668: 40 00 0c 51 call 400097ac <== NOT EXECUTED 4000666c: 90 12 20 c0 or %o0, 0xc0, %o0 ! 400608c0 <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 40006670: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 40006674: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED 40006678: 40 00 1a 12 call 4000cec0 <== NOT EXECUTED 4000667c: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED 40006680: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40006684: 11 10 01 82 sethi %hi(0x40060800), %o0 <== NOT EXECUTED 40006688: 40 00 0c 49 call 400097ac <== NOT EXECUTED 4000668c: 90 12 20 d8 or %o0, 0xd8, %o0 ! 400608d8 <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) 40006690: d2 06 20 c0 ld [ %i0 + 0xc0 ], %o1 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 40006694: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 40006698: 11 10 01 82 sethi %hi(0x40060800), %o0 <== NOT EXECUTED 4000669c: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED 400066a0: 40 00 0c 43 call 400097ac <== NOT EXECUTED 400066a4: 90 12 20 f0 or %o0, 0xf0, %o0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { 400066a8: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 400066ac: 02 80 00 04 be 400066bc <== NOT EXECUTED 400066b0: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 400066b4: 40 00 1c 3d call 4000d7a8 <== NOT EXECUTED 400066b8: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 400066bc: 11 10 01 82 sethi %hi(0x40060800), %o0 <== NOT EXECUTED 400066c0: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 400066c4: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED 400066c8: 40 00 0c 39 call 400097ac <== NOT EXECUTED 400066cc: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED 400066d0: 30 bf ff f9 b,a 400066b4 <== NOT EXECUTED 400074c0 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 400074c0: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400074c4: 23 10 00 75 sethi %hi(0x4001d400), %l1 400074c8: e0 04 61 44 ld [ %l1 + 0x144 ], %l0 ! 4001d544 <_API_extensions_List> 400074cc: a2 14 61 44 or %l1, 0x144, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400074d0: a2 04 60 04 add %l1, 4, %l1 400074d4: 80 a4 00 11 cmp %l0, %l1 400074d8: 02 80 00 09 be 400074fc <_API_extensions_Run_postdriver+0x3c> 400074dc: 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)(); 400074e0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400074e4: 9f c0 40 00 call %g1 400074e8: 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 ) { 400074ec: 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 ; 400074f0: 80 a4 00 11 cmp %l0, %l1 400074f4: 32 bf ff fc bne,a 400074e4 <_API_extensions_Run_postdriver+0x24> 400074f8: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400074fc: 81 c7 e0 08 ret 40007500: 81 e8 00 00 restore 40007504 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40007504: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007508: 23 10 00 75 sethi %hi(0x4001d400), %l1 4000750c: e0 04 61 44 ld [ %l1 + 0x144 ], %l0 ! 4001d544 <_API_extensions_List> 40007510: a2 14 61 44 or %l1, 0x144, %l1 40007514: a2 04 60 04 add %l1, 4, %l1 40007518: 80 a4 00 11 cmp %l0, %l1 4000751c: 02 80 00 0a be 40007544 <_API_extensions_Run_postswitch+0x40> 40007520: 25 10 00 74 sethi %hi(0x4001d000), %l2 40007524: a4 14 a3 bc or %l2, 0x3bc, %l2 ! 4001d3bc <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 40007528: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000752c: 9f c0 40 00 call %g1 40007530: 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 ) { 40007534: 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 ; 40007538: 80 a4 00 11 cmp %l0, %l1 4000753c: 32 bf ff fc bne,a 4000752c <_API_extensions_Run_postswitch+0x28> 40007540: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40007544: 81 c7 e0 08 ret 40007548: 81 e8 00 00 restore 4000c8c4 <_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 ) { 4000c8c4: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4000c8c8: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000c8cc: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 4001d3bc <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000c8d0: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000c8d4: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 4000c8d8: 80 a0 a0 00 cmp %g2, 0 4000c8dc: 22 80 00 13 be,a 4000c928 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000c8e0: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 4000c8e4: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000c8e8: 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; 4000c8ec: 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; 4000c8f0: 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; 4000c8f4: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000c8f8: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000c8fc: 80 a0 a0 02 cmp %g2, 2 4000c900: 02 80 00 0f be 4000c93c <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000c904: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 4000c908: 80 a0 a0 03 cmp %g2, 3 4000c90c: 22 80 00 1f be,a 4000c988 <_CORE_mutex_Seize_interrupt_trylock+0xc4> 4000c910: da 00 60 1c ld [ %g1 + 0x1c ], %o5 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000c914: d0 06 40 00 ld [ %i1 ], %o0 4000c918: 7f ff d5 43 call 40001e24 4000c91c: b0 10 20 00 clr %i0 4000c920: 81 c7 e0 08 ret 4000c924: 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 ) ) { 4000c928: 80 a0 40 02 cmp %g1, %g2 4000c92c: 22 80 00 0c be,a 4000c95c <_CORE_mutex_Seize_interrupt_trylock+0x98> 4000c930: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000c934: 81 c7 e0 08 ret 4000c938: 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++; 4000c93c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000c940: 84 00 a0 01 inc %g2 4000c944: c4 20 60 1c st %g2, [ %g1 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000c948: d0 06 40 00 ld [ %i1 ], %o0 4000c94c: 7f ff d5 36 call 40001e24 4000c950: b0 10 20 00 clr %i0 4000c954: 81 c7 e0 08 ret 4000c958: 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 ) { 4000c95c: 80 a0 a0 00 cmp %g2, 0 4000c960: 12 80 00 2b bne 4000ca0c <_CORE_mutex_Seize_interrupt_trylock+0x148> 4000c964: 80 a0 a0 01 cmp %g2, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000c968: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000c96c: 82 00 60 01 inc %g1 4000c970: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 4000c974: d0 06 40 00 ld [ %i1 ], %o0 4000c978: 7f ff d5 2b call 40001e24 4000c97c: b0 10 20 00 clr %i0 4000c980: 81 c7 e0 08 ret 4000c984: 81 e8 00 00 restore { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000c988: 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++; 4000c98c: 88 03 60 01 add %o5, 1, %g4 4000c990: c8 20 60 1c st %g4, [ %g1 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000c994: c8 06 20 4c ld [ %i0 + 0x4c ], %g4 current = executing->current_priority; if ( current == ceiling ) { 4000c998: 80 a1 00 02 cmp %g4, %g2 4000c99c: 02 80 00 24 be 4000ca2c <_CORE_mutex_Seize_interrupt_trylock+0x168> 4000c9a0: 01 00 00 00 nop _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4000c9a4: 1a 80 00 11 bcc 4000c9e8 <_CORE_mutex_Seize_interrupt_trylock+0x124> 4000c9a8: 84 10 20 06 mov 6, %g2 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000c9ac: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000c9b0: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001d300 <_Thread_Dispatch_disable_level> 4000c9b4: 84 00 a0 01 inc %g2 4000c9b8: c4 20 63 00 st %g2, [ %g1 + 0x300 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4000c9bc: 7f ff d5 1a call 40001e24 4000c9c0: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 4000c9c4: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000c9c8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000c9cc: 94 10 20 00 clr %o2 4000c9d0: 7f ff ef c1 call 400088d4 <_Thread_Change_priority> 4000c9d4: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4000c9d8: 7f ff f1 3f call 40008ed4 <_Thread_Enable_dispatch> 4000c9dc: 01 00 00 00 nop 4000c9e0: 81 c7 e0 08 ret 4000c9e4: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000c9e8: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000c9ec: c6 26 20 50 st %g3, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ 4000c9f0: c0 26 20 54 clr [ %i0 + 0x54 ] executing->resource_count--; /* undo locking above */ 4000c9f4: da 20 60 1c st %o5, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000c9f8: d0 06 40 00 ld [ %i1 ], %o0 4000c9fc: 7f ff d5 0a call 40001e24 4000ca00: b0 10 20 00 clr %i0 4000ca04: 81 c7 e0 08 ret 4000ca08: 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 ) { 4000ca0c: 12 bf ff ca bne 4000c934 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000ca10: 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; 4000ca14: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED _ISR_Enable( *level_p ); 4000ca18: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 4000ca1c: 7f ff d5 02 call 40001e24 <== NOT EXECUTED 4000ca20: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ca24: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca28: 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 ); 4000ca2c: d0 06 40 00 ld [ %i1 ], %o0 4000ca30: 7f ff d4 fd call 40001e24 4000ca34: b0 10 20 00 clr %i0 4000ca38: 81 c7 e0 08 ret 4000ca3c: 81 e8 00 00 restore 400078bc <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 400078bc: 9d e3 bf a0 save %sp, -96, %sp * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 400078c0: c2 0e 20 44 ldub [ %i0 + 0x44 ], %g1 #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 400078c4: a0 10 00 18 mov %i0, %l0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 400078c8: 80 a0 60 00 cmp %g1, 0 400078cc: 02 80 00 07 be 400078e8 <_CORE_mutex_Surrender+0x2c> 400078d0: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 400078d4: 03 10 00 74 sethi %hi(0x4001d000), %g1 400078d8: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 4001d3bc <_Thread_Executing> 400078dc: 80 a2 00 01 cmp %o0, %g1 400078e0: 12 80 00 31 bne 400079a4 <_CORE_mutex_Surrender+0xe8> 400078e4: b0 10 20 03 mov 3, %i0 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 400078e8: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400078ec: 80 a0 60 00 cmp %g1, 0 400078f0: 02 80 00 22 be 40007978 <_CORE_mutex_Surrender+0xbc> 400078f4: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 400078f8: 80 a0 60 00 cmp %g1, 0 400078fc: 12 80 00 1f bne 40007978 <_CORE_mutex_Surrender+0xbc> 40007900: c2 24 20 54 st %g1, [ %l0 + 0x54 ] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40007904: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40007908: 80 a0 60 02 cmp %g1, 2 4000790c: 02 80 00 34 be 400079dc <_CORE_mutex_Surrender+0x120> 40007910: 80 a0 60 03 cmp %g1, 3 40007914: 22 80 00 33 be,a 400079e0 <_CORE_mutex_Surrender+0x124> 40007918: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 4000791c: c0 24 20 5c clr [ %l0 + 0x5c ] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40007920: 80 a0 60 02 cmp %g1, 2 40007924: 02 80 00 22 be 400079ac <_CORE_mutex_Surrender+0xf0> 40007928: c0 24 20 60 clr [ %l0 + 0x60 ] 4000792c: 80 a0 60 03 cmp %g1, 3 40007930: 22 80 00 20 be,a 400079b0 <_CORE_mutex_Surrender+0xf4> 40007934: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 40007938: 40 00 06 47 call 40009254 <_Thread_queue_Dequeue> 4000793c: 90 10 00 10 mov %l0, %o0 40007940: 82 92 20 00 orcc %o0, 0, %g1 40007944: 22 80 00 2f be,a 40007a00 <_CORE_mutex_Surrender+0x144> 40007948: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 4000794c: c6 00 60 08 ld [ %g1 + 8 ], %g3 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 40007950: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40007954: c6 24 20 60 st %g3, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 40007958: c2 24 20 5c st %g1, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 4000795c: 86 10 20 01 mov 1, %g3 switch ( the_mutex->Attributes.discipline ) { 40007960: 80 a0 a0 02 cmp %g2, 2 40007964: 02 80 00 22 be 400079ec <_CORE_mutex_Surrender+0x130> 40007968: c6 24 20 54 st %g3, [ %l0 + 0x54 ] 4000796c: 80 a0 a0 03 cmp %g2, 3 40007970: 22 80 00 04 be,a 40007980 <_CORE_mutex_Surrender+0xc4> 40007974: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 40007978: 81 c7 e0 08 ret 4000797c: 91 e8 20 00 restore %g0, 0, %o0 _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ 40007980: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 40007984: 86 00 e0 01 inc %g3 40007988: c6 20 60 1c st %g3, [ %g1 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 4000798c: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 the_thread->current_priority){ 40007990: 80 a2 40 02 cmp %o1, %g2 40007994: 1a bf ff f9 bcc 40007978 <_CORE_mutex_Surrender+0xbc> 40007998: 94 10 20 00 clr %o2 _Thread_Change_priority( 4000799c: 40 00 03 ce call 400088d4 <_Thread_Change_priority> <== NOT EXECUTED 400079a0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400079a4: 81 c7 e0 08 ret 400079a8: 81 e8 00 00 restore _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 400079ac: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400079b0: 80 a0 60 00 cmp %g1, 0 400079b4: 12 bf ff e1 bne 40007938 <_CORE_mutex_Surrender+0x7c> 400079b8: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { 400079bc: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 400079c0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 400079c4: 80 a2 40 01 cmp %o1, %g1 400079c8: 02 bf ff dc be 40007938 <_CORE_mutex_Surrender+0x7c> 400079cc: 01 00 00 00 nop _Thread_Change_priority( holder, holder->real_priority, true ); 400079d0: 40 00 03 c1 call 400088d4 <_Thread_Change_priority> 400079d4: 94 10 20 01 mov 1, %o2 ! 1 400079d8: 30 bf ff d8 b,a 40007938 <_CORE_mutex_Surrender+0x7c> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 400079dc: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 400079e0: 84 00 bf ff add %g2, -1, %g2 400079e4: 10 bf ff ce b 4000791c <_CORE_mutex_Surrender+0x60> 400079e8: c4 22 20 1c st %g2, [ %o0 + 0x1c ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 400079ec: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 400079f0: 84 00 a0 01 inc %g2 400079f4: c4 20 60 1c st %g2, [ %g1 + 0x1c ] break; 400079f8: 81 c7 e0 08 ret 400079fc: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007a00: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40007a04: 81 c7 e0 08 ret 40007a08: 91 e8 20 00 restore %g0, 0, %o0 4000cb38 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000cb38: 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; 4000cb3c: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000cb40: 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 ) { 4000cb44: 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; 4000cb48: e4 06 20 08 ld [ %i0 + 8 ], %l2 4000cb4c: 18 80 00 75 bgu 4000cd20 <_Heap_Allocate_aligned_with_boundary+0x1e8> 4000cb50: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4000cb54: 80 a6 e0 00 cmp %i3, 0 4000cb58: 12 80 00 70 bne 4000cd18 <_Heap_Allocate_aligned_with_boundary+0x1e0> 4000cb5c: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cb60: 80 a4 00 12 cmp %l0, %l2 4000cb64: 02 80 00 72 be 4000cd2c <_Heap_Allocate_aligned_with_boundary+0x1f4> 4000cb68: 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; 4000cb6c: 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; 4000cb70: 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; 4000cb74: 82 20 40 19 sub %g1, %i1, %g1 4000cb78: 10 80 00 09 b 4000cb9c <_Heap_Allocate_aligned_with_boundary+0x64> 4000cb7c: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 4000cb80: 80 a6 20 00 cmp %i0, 0 4000cb84: 32 80 00 57 bne,a 4000cce0 <_Heap_Allocate_aligned_with_boundary+0x1a8> 4000cb88: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 4000cb8c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cb90: 80 a4 00 12 cmp %l0, %l2 4000cb94: 22 80 00 5a be,a 4000ccfc <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000cb98: 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 ) { 4000cb9c: e6 04 a0 04 ld [ %l2 + 4 ], %l3 4000cba0: 80 a5 00 13 cmp %l4, %l3 4000cba4: 1a bf ff fa bcc 4000cb8c <_Heap_Allocate_aligned_with_boundary+0x54> 4000cba8: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 4000cbac: 80 a6 a0 00 cmp %i2, 0 4000cbb0: 02 bf ff f4 be 4000cb80 <_Heap_Allocate_aligned_with_boundary+0x48> 4000cbb4: 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; 4000cbb8: 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; 4000cbbc: 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; 4000cbc0: a6 0c ff fe and %l3, -2, %l3 4000cbc4: 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; 4000cbc8: 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; 4000cbcc: 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); 4000cbd0: 90 10 00 18 mov %i0, %o0 4000cbd4: a6 00 40 13 add %g1, %l3, %l3 4000cbd8: 40 00 2f 8f call 40018a14 <.urem> 4000cbdc: 92 10 00 1a mov %i2, %o1 4000cbe0: 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 ) { 4000cbe4: 80 a4 c0 18 cmp %l3, %i0 4000cbe8: 1a 80 00 06 bcc 4000cc00 <_Heap_Allocate_aligned_with_boundary+0xc8> 4000cbec: ac 04 a0 08 add %l2, 8, %l6 4000cbf0: 90 10 00 13 mov %l3, %o0 4000cbf4: 40 00 2f 88 call 40018a14 <.urem> 4000cbf8: 92 10 00 1a mov %i2, %o1 4000cbfc: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4000cc00: 80 a6 e0 00 cmp %i3, 0 4000cc04: 02 80 00 26 be 4000cc9c <_Heap_Allocate_aligned_with_boundary+0x164> 4000cc08: 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; 4000cc0c: a6 06 00 19 add %i0, %i1, %l3 4000cc10: 92 10 00 1b mov %i3, %o1 4000cc14: 40 00 2f 80 call 40018a14 <.urem> 4000cc18: 90 10 00 13 mov %l3, %o0 4000cc1c: 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 ) { 4000cc20: 80 a4 c0 08 cmp %l3, %o0 4000cc24: 08 80 00 1e bleu 4000cc9c <_Heap_Allocate_aligned_with_boundary+0x164> 4000cc28: 80 a5 80 18 cmp %l6, %i0 4000cc2c: 80 a6 00 08 cmp %i0, %o0 4000cc30: 1a 80 00 1b bcc 4000cc9c <_Heap_Allocate_aligned_with_boundary+0x164> 4000cc34: 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; 4000cc38: 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 ) { 4000cc3c: 80 a5 40 08 cmp %l5, %o0 4000cc40: 28 80 00 0a bleu,a 4000cc68 <_Heap_Allocate_aligned_with_boundary+0x130> 4000cc44: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 4000cc48: 10 bf ff d2 b 4000cb90 <_Heap_Allocate_aligned_with_boundary+0x58> 4000cc4c: 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 ) { 4000cc50: 1a 80 00 13 bcc 4000cc9c <_Heap_Allocate_aligned_with_boundary+0x164> 4000cc54: 80 a5 80 18 cmp %l6, %i0 if ( boundary_line < boundary_floor ) { 4000cc58: 80 a5 40 08 cmp %l5, %o0 4000cc5c: 38 bf ff cd bgu,a 4000cb90 <_Heap_Allocate_aligned_with_boundary+0x58> 4000cc60: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 4000cc64: b0 22 00 19 sub %o0, %i1, %i0 4000cc68: 92 10 00 1a mov %i2, %o1 4000cc6c: 40 00 2f 6a call 40018a14 <.urem> 4000cc70: 90 10 00 18 mov %i0, %o0 4000cc74: 92 10 00 1b mov %i3, %o1 4000cc78: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4000cc7c: a6 06 00 19 add %i0, %i1, %l3 4000cc80: 40 00 2f 65 call 40018a14 <.urem> 4000cc84: 90 10 00 13 mov %l3, %o0 4000cc88: 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 ) { 4000cc8c: 80 a4 c0 08 cmp %l3, %o0 4000cc90: 18 bf ff f0 bgu 4000cc50 <_Heap_Allocate_aligned_with_boundary+0x118> 4000cc94: 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 ) { 4000cc98: 80 a5 80 18 cmp %l6, %i0 4000cc9c: 18 bf ff bc bgu 4000cb8c <_Heap_Allocate_aligned_with_boundary+0x54> 4000cca0: 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; 4000cca4: 90 10 00 18 mov %i0, %o0 4000cca8: a6 20 40 12 sub %g1, %l2, %l3 4000ccac: 92 10 00 1d mov %i5, %o1 4000ccb0: 40 00 2f 59 call 40018a14 <.urem> 4000ccb4: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 4000ccb8: 90 a4 c0 08 subcc %l3, %o0, %o0 4000ccbc: 02 bf ff b2 be 4000cb84 <_Heap_Allocate_aligned_with_boundary+0x4c> 4000ccc0: 80 a6 20 00 cmp %i0, 0 4000ccc4: 80 a5 c0 08 cmp %l7, %o0 4000ccc8: 38 bf ff b2 bgu,a 4000cb90 <_Heap_Allocate_aligned_with_boundary+0x58> 4000cccc: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 4000ccd0: 80 a6 20 00 cmp %i0, 0 4000ccd4: 22 bf ff af be,a 4000cb90 <_Heap_Allocate_aligned_with_boundary+0x58> 4000ccd8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000ccdc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000cce0: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000cce4: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000cce8: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000ccec: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000ccf0: 90 10 00 10 mov %l0, %o0 4000ccf4: 7f ff ec 3d call 40007de8 <_Heap_Block_allocate> 4000ccf8: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4000ccfc: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 4000cd00: 80 a0 40 11 cmp %g1, %l1 4000cd04: 1a 80 00 08 bcc 4000cd24 <_Heap_Allocate_aligned_with_boundary+0x1ec> 4000cd08: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000cd0c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 4000cd10: 81 c7 e0 08 ret 4000cd14: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4000cd18: 08 80 00 07 bleu 4000cd34 <_Heap_Allocate_aligned_with_boundary+0x1fc> 4000cd1c: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000cd20: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 4000cd24: 81 c7 e0 08 ret 4000cd28: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cd2c: 10 bf ff f4 b 4000ccfc <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000cd30: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4000cd34: 22 bf ff 8b be,a 4000cb60 <_Heap_Allocate_aligned_with_boundary+0x28> 4000cd38: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 4000cd3c: 10 bf ff 8a b 4000cb64 <_Heap_Allocate_aligned_with_boundary+0x2c> 4000cd40: 80 a4 00 12 cmp %l0, %l2 40008d6c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 40008d6c: 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; 40008d70: 25 10 00 24 sethi %hi(0x40009000), %l2 40008d74: 80 8e a0 ff btst 0xff, %i2 40008d78: a4 14 a3 6c or %l2, 0x36c, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 40008d7c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 40008d80: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 40008d84: 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; 40008d88: 12 80 00 04 bne 40008d98 <_Heap_Walk+0x2c> 40008d8c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40008d90: 25 10 00 23 sethi %hi(0x40008c00), %l2 40008d94: a4 14 a1 64 or %l2, 0x164, %l2 ! 40008d64 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 40008d98: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40008d9c: c2 00 60 90 ld [ %g1 + 0x90 ], %g1 ! 4001fc90 <_System_state_Current> 40008da0: 80 a0 60 03 cmp %g1, 3 40008da4: 22 80 00 04 be,a 40008db4 <_Heap_Walk+0x48> 40008da8: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 40008dac: 81 c7 e0 08 ret 40008db0: 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)( 40008db4: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40008db8: c4 06 20 08 ld [ %i0 + 8 ], %g2 40008dbc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40008dc0: 90 10 00 19 mov %i1, %o0 40008dc4: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 40008dc8: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 40008dcc: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40008dd0: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40008dd4: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40008dd8: 92 10 20 00 clr %o1 40008ddc: 15 10 00 73 sethi %hi(0x4001cc00), %o2 40008de0: 96 10 00 15 mov %l5, %o3 40008de4: 94 12 a3 c8 or %o2, 0x3c8, %o2 40008de8: 9f c4 80 00 call %l2 40008dec: 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 ) { 40008df0: 80 a5 60 00 cmp %l5, 0 40008df4: 02 80 00 36 be 40008ecc <_Heap_Walk+0x160> 40008df8: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 40008dfc: 12 80 00 3c bne 40008eec <_Heap_Walk+0x180> 40008e00: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 40008e04: 7f ff e3 30 call 40001ac4 <.urem> 40008e08: 92 10 00 15 mov %l5, %o1 40008e0c: 80 a2 20 00 cmp %o0, 0 40008e10: 12 80 00 40 bne 40008f10 <_Heap_Walk+0x1a4> 40008e14: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 40008e18: 7f ff e3 2b call 40001ac4 <.urem> 40008e1c: 92 10 00 15 mov %l5, %o1 40008e20: 80 a2 20 00 cmp %o0, 0 40008e24: 32 80 00 44 bne,a 40008f34 <_Heap_Walk+0x1c8> 40008e28: 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; 40008e2c: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 40008e30: ae 8d a0 01 andcc %l6, 1, %l7 40008e34: 22 80 00 48 be,a 40008f54 <_Heap_Walk+0x1e8> 40008e38: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 40008e3c: d6 04 00 00 ld [ %l0 ], %o3 40008e40: 80 a5 40 0b cmp %l5, %o3 40008e44: 32 80 00 1a bne,a 40008eac <_Heap_Walk+0x140> 40008e48: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 40008e4c: c2 05 20 04 ld [ %l4 + 4 ], %g1 40008e50: 82 08 7f fe and %g1, -2, %g1 40008e54: 82 05 00 01 add %l4, %g1, %g1 40008e58: c2 00 60 04 ld [ %g1 + 4 ], %g1 40008e5c: 80 88 60 01 btst 1, %g1 40008e60: 22 80 01 23 be,a 400092ec <_Heap_Walk+0x580> 40008e64: 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; 40008e68: 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 ) { 40008e6c: 80 a6 00 11 cmp %i0, %l1 40008e70: 02 80 00 6f be 4000902c <_Heap_Walk+0x2c0> 40008e74: 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; 40008e78: 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 40008e7c: 80 a7 00 11 cmp %i4, %l1 40008e80: 28 80 00 3c bleu,a 40008f70 <_Heap_Walk+0x204> 40008e84: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 40008e88: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008e8c: 96 10 00 11 mov %l1, %o3 40008e90: 92 10 20 01 mov 1, %o1 40008e94: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008e98: b0 10 20 00 clr %i0 40008e9c: 9f c4 80 00 call %l2 40008ea0: 94 12 a1 70 or %o2, 0x170, %o2 40008ea4: 81 c7 e0 08 ret 40008ea8: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 40008eac: 98 10 00 15 mov %l5, %o4 40008eb0: 92 10 20 01 mov 1, %o1 40008eb4: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008eb8: b0 10 20 00 clr %i0 40008ebc: 9f c4 80 00 call %l2 40008ec0: 94 12 a1 28 or %o2, 0x128, %o2 40008ec4: 81 c7 e0 08 ret 40008ec8: 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" ); 40008ecc: 90 10 00 19 mov %i1, %o0 40008ed0: 92 10 20 01 mov 1, %o1 40008ed4: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008ed8: b0 10 20 00 clr %i0 40008edc: 9f c4 80 00 call %l2 40008ee0: 94 12 a0 60 or %o2, 0x60, %o2 40008ee4: 81 c7 e0 08 ret 40008ee8: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 40008eec: 90 10 00 19 mov %i1, %o0 40008ef0: 96 10 00 15 mov %l5, %o3 40008ef4: 92 10 20 01 mov 1, %o1 40008ef8: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008efc: b0 10 20 00 clr %i0 40008f00: 9f c4 80 00 call %l2 40008f04: 94 12 a0 78 or %o2, 0x78, %o2 40008f08: 81 c7 e0 08 ret 40008f0c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 40008f10: 90 10 00 19 mov %i1, %o0 40008f14: 96 10 00 13 mov %l3, %o3 40008f18: 92 10 20 01 mov 1, %o1 40008f1c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f20: b0 10 20 00 clr %i0 40008f24: 9f c4 80 00 call %l2 40008f28: 94 12 a0 98 or %o2, 0x98, %o2 40008f2c: 81 c7 e0 08 ret 40008f30: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 40008f34: 96 10 00 10 mov %l0, %o3 40008f38: 92 10 20 01 mov 1, %o1 40008f3c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f40: b0 10 20 00 clr %i0 40008f44: 9f c4 80 00 call %l2 40008f48: 94 12 a0 c0 or %o2, 0xc0, %o2 40008f4c: 81 c7 e0 08 ret 40008f50: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 40008f54: 92 10 20 01 mov 1, %o1 40008f58: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f5c: b0 10 20 00 clr %i0 40008f60: 9f c4 80 00 call %l2 40008f64: 94 12 a0 f8 or %o2, 0xf8, %o2 40008f68: 81 c7 e0 08 ret 40008f6c: 81 e8 00 00 restore 40008f70: 80 a6 c0 11 cmp %i3, %l1 40008f74: 0a bf ff c6 bcs 40008e8c <_Heap_Walk+0x120> 40008f78: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 40008f7c: 90 04 60 08 add %l1, 8, %o0 40008f80: 7f ff e2 d1 call 40001ac4 <.urem> 40008f84: 92 10 00 1a mov %i2, %o1 40008f88: 80 a2 20 00 cmp %o0, 0 40008f8c: 12 80 00 df bne 40009308 <_Heap_Walk+0x59c> 40008f90: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40008f94: c2 04 60 04 ld [ %l1 + 4 ], %g1 40008f98: 82 08 7f fe and %g1, -2, %g1 40008f9c: 82 04 40 01 add %l1, %g1, %g1 40008fa0: c2 00 60 04 ld [ %g1 + 4 ], %g1 40008fa4: 80 88 60 01 btst 1, %g1 40008fa8: 12 80 00 ea bne 40009350 <_Heap_Walk+0x5e4> 40008fac: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 40008fb0: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40008fb4: 80 a6 00 0c cmp %i0, %o4 40008fb8: 02 80 00 19 be 4000901c <_Heap_Walk+0x2b0> 40008fbc: ba 10 00 11 mov %l1, %i5 40008fc0: 30 80 00 dc b,a 40009330 <_Heap_Walk+0x5c4> <== NOT EXECUTED 40008fc4: 0a bf ff b2 bcs 40008e8c <_Heap_Walk+0x120> 40008fc8: 90 10 00 19 mov %i1, %o0 40008fcc: 80 a6 c0 11 cmp %i3, %l1 40008fd0: 0a bf ff b0 bcs 40008e90 <_Heap_Walk+0x124> 40008fd4: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 40008fd8: 90 04 60 08 add %l1, 8, %o0 40008fdc: 7f ff e2 ba call 40001ac4 <.urem> 40008fe0: 92 10 00 1a mov %i2, %o1 40008fe4: 80 a2 20 00 cmp %o0, 0 40008fe8: 32 80 00 c8 bne,a 40009308 <_Heap_Walk+0x59c> 40008fec: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40008ff0: c2 04 60 04 ld [ %l1 + 4 ], %g1 40008ff4: 82 08 7f fe and %g1, -2, %g1 40008ff8: 82 00 40 11 add %g1, %l1, %g1 40008ffc: c2 00 60 04 ld [ %g1 + 4 ], %g1 40009000: 80 88 60 01 btst 1, %g1 40009004: 32 80 00 d2 bne,a 4000934c <_Heap_Walk+0x5e0> 40009008: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 4000900c: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40009010: 80 a3 00 1d cmp %o4, %i5 40009014: 12 80 00 c5 bne 40009328 <_Heap_Walk+0x5bc> 40009018: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 4000901c: 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 ) { 40009020: 80 a6 00 11 cmp %i0, %l1 40009024: 12 bf ff e8 bne 40008fc4 <_Heap_Walk+0x258> 40009028: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 4000902c: 80 a5 00 10 cmp %l4, %l0 40009030: 02 bf ff 5f be 40008dac <_Heap_Walk+0x40> 40009034: 37 10 00 74 sethi %hi(0x4001d000), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40009038: 35 10 00 74 sethi %hi(0x4001d000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 4000903c: 39 10 00 74 sethi %hi(0x4001d000), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40009040: 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)( 40009044: b6 16 e2 18 or %i3, 0x218, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40009048: b4 16 a2 30 or %i2, 0x230, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 4000904c: b8 17 23 c8 or %i4, 0x3c8, %i4 40009050: 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; 40009054: 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 ) { 40009058: 80 a5 e0 00 cmp %l7, 0 4000905c: 02 80 00 16 be 400090b4 <_Heap_Walk+0x348> 40009060: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 40009064: 90 10 00 19 mov %i1, %o0 40009068: 92 10 20 00 clr %o1 4000906c: 94 10 00 1b mov %i3, %o2 40009070: 96 10 00 10 mov %l0, %o3 40009074: 9f c4 80 00 call %l2 40009078: 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 4000907c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40009080: 80 a0 40 11 cmp %g1, %l1 40009084: 28 80 00 18 bleu,a 400090e4 <_Heap_Walk+0x378> 40009088: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 4000908c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40009090: 96 10 00 10 mov %l0, %o3 40009094: 98 10 00 11 mov %l1, %o4 40009098: 92 10 20 01 mov 1, %o1 4000909c: 15 10 00 74 sethi %hi(0x4001d000), %o2 400090a0: b0 10 20 00 clr %i0 400090a4: 9f c4 80 00 call %l2 400090a8: 94 12 a2 58 or %o2, 0x258, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 400090ac: 81 c7 e0 08 ret 400090b0: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 400090b4: da 04 00 00 ld [ %l0 ], %o5 400090b8: 90 10 00 19 mov %i1, %o0 400090bc: 92 10 20 00 clr %o1 400090c0: 94 10 00 1a mov %i2, %o2 400090c4: 96 10 00 10 mov %l0, %o3 400090c8: 9f c4 80 00 call %l2 400090cc: 98 10 00 16 mov %l6, %o4 400090d0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 400090d4: 80 a0 40 11 cmp %g1, %l1 400090d8: 18 bf ff ee bgu 40009090 <_Heap_Walk+0x324> 400090dc: 90 10 00 19 mov %i1, %o0 400090e0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400090e4: 80 a0 40 11 cmp %g1, %l1 400090e8: 0a bf ff ea bcs 40009090 <_Heap_Walk+0x324> 400090ec: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 400090f0: 90 10 00 16 mov %l6, %o0 400090f4: 7f ff e2 74 call 40001ac4 <.urem> 400090f8: 92 10 00 1d mov %i5, %o1 400090fc: 80 a2 20 00 cmp %o0, 0 40009100: 12 80 00 5d bne 40009274 <_Heap_Walk+0x508> 40009104: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 40009108: 18 80 00 65 bgu 4000929c <_Heap_Walk+0x530> 4000910c: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 40009110: 3a 80 00 6e bcc,a 400092c8 <_Heap_Walk+0x55c> 40009114: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 40009118: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000911c: 80 88 60 01 btst 1, %g1 40009120: 12 80 00 40 bne 40009220 <_Heap_Walk+0x4b4> 40009124: 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; 40009128: 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)( 4000912c: 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; 40009130: 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; 40009134: 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; 40009138: 1b 10 00 74 sethi %hi(0x4001d000), %o5 4000913c: 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; 40009140: 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); 40009144: 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; 40009148: 02 80 00 07 be 40009164 <_Heap_Walk+0x3f8> 4000914c: 9a 13 63 20 or %o5, 0x320, %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)" : ""), 40009150: 1b 10 00 74 sethi %hi(0x4001d000), %o5 40009154: 80 a3 00 18 cmp %o4, %i0 40009158: 02 80 00 03 be 40009164 <_Heap_Walk+0x3f8> 4000915c: 9a 13 63 30 or %o5, 0x330, %o5 40009160: 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)( 40009164: c2 04 20 08 ld [ %l0 + 8 ], %g1 40009168: 05 10 00 74 sethi %hi(0x4001d000), %g2 4000916c: 80 a0 c0 01 cmp %g3, %g1 40009170: 02 80 00 07 be 4000918c <_Heap_Walk+0x420> 40009174: 84 10 a3 40 or %g2, 0x340, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40009178: 05 10 00 74 sethi %hi(0x4001d000), %g2 4000917c: 80 a0 40 18 cmp %g1, %i0 40009180: 02 80 00 03 be 4000918c <_Heap_Walk+0x420> 40009184: 84 10 a3 50 or %g2, 0x350, %g2 40009188: 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)( 4000918c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40009190: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 40009194: 90 10 00 19 mov %i1, %o0 40009198: 92 10 20 00 clr %o1 4000919c: 15 10 00 74 sethi %hi(0x4001d000), %o2 400091a0: 96 10 00 10 mov %l0, %o3 400091a4: 9f c4 80 00 call %l2 400091a8: 94 12 a3 60 or %o2, 0x360, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 400091ac: da 05 c0 00 ld [ %l7 ], %o5 400091b0: 80 a5 80 0d cmp %l6, %o5 400091b4: 02 80 00 0c be 400091e4 <_Heap_Walk+0x478> 400091b8: 90 10 00 19 mov %i1, %o0 (*printer)( 400091bc: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 400091c0: 96 10 00 10 mov %l0, %o3 400091c4: 98 10 00 16 mov %l6, %o4 400091c8: 92 10 20 01 mov 1, %o1 400091cc: 15 10 00 74 sethi %hi(0x4001d000), %o2 400091d0: b0 10 20 00 clr %i0 400091d4: 9f c4 80 00 call %l2 400091d8: 94 12 a3 90 or %o2, 0x390, %o2 400091dc: 81 c7 e0 08 ret 400091e0: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 400091e4: 80 8d 20 01 btst 1, %l4 400091e8: 02 80 00 1c be 40009258 <_Heap_Walk+0x4ec> 400091ec: 96 10 00 10 mov %l0, %o3 400091f0: 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 ) { 400091f4: 80 a0 40 18 cmp %g1, %i0 400091f8: 12 80 00 07 bne 40009214 <_Heap_Walk+0x4a8> 400091fc: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40009200: 10 80 00 0f b 4000923c <_Heap_Walk+0x4d0> <== NOT EXECUTED 40009204: 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 ) { 40009208: 80 a0 40 18 cmp %g1, %i0 4000920c: 02 80 00 0a be 40009234 <_Heap_Walk+0x4c8> 40009210: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 40009214: 32 bf ff fd bne,a 40009208 <_Heap_Walk+0x49c> 40009218: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 4000921c: 80 a5 40 11 cmp %l5, %l1 40009220: 02 bf fe e3 be 40008dac <_Heap_Walk+0x40> 40009224: 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 ) { 40009228: ec 04 60 04 ld [ %l1 + 4 ], %l6 4000922c: 10 bf ff 8a b 40009054 <_Heap_Walk+0x2e8> 40009230: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40009234: 90 10 00 19 mov %i1, %o0 40009238: 96 10 00 10 mov %l0, %o3 4000923c: 92 10 20 01 mov 1, %o1 40009240: 15 10 00 75 sethi %hi(0x4001d400), %o2 40009244: b0 10 20 00 clr %i0 40009248: 9f c4 80 00 call %l2 4000924c: 94 12 a0 00 mov %o2, %o2 40009250: 81 c7 e0 08 ret 40009254: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 40009258: 92 10 20 01 mov 1, %o1 4000925c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009260: b0 10 20 00 clr %i0 40009264: 9f c4 80 00 call %l2 40009268: 94 12 a3 d0 or %o2, 0x3d0, %o2 4000926c: 81 c7 e0 08 ret 40009270: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 40009274: 90 10 00 19 mov %i1, %o0 40009278: 96 10 00 10 mov %l0, %o3 4000927c: 98 10 00 16 mov %l6, %o4 40009280: 92 10 20 01 mov 1, %o1 40009284: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009288: b0 10 20 00 clr %i0 4000928c: 9f c4 80 00 call %l2 40009290: 94 12 a2 88 or %o2, 0x288, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 40009294: 81 c7 e0 08 ret 40009298: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 4000929c: 90 10 00 19 mov %i1, %o0 400092a0: 96 10 00 10 mov %l0, %o3 400092a4: 98 10 00 16 mov %l6, %o4 400092a8: 9a 10 00 13 mov %l3, %o5 400092ac: 92 10 20 01 mov 1, %o1 400092b0: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092b4: b0 10 20 00 clr %i0 400092b8: 9f c4 80 00 call %l2 400092bc: 94 12 a2 b8 or %o2, 0x2b8, %o2 block, block_size, min_block_size ); return false; 400092c0: 81 c7 e0 08 ret 400092c4: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 400092c8: 96 10 00 10 mov %l0, %o3 400092cc: 98 10 00 11 mov %l1, %o4 400092d0: 92 10 20 01 mov 1, %o1 400092d4: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092d8: b0 10 20 00 clr %i0 400092dc: 9f c4 80 00 call %l2 400092e0: 94 12 a2 e8 or %o2, 0x2e8, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 400092e4: 81 c7 e0 08 ret 400092e8: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 400092ec: 92 10 20 01 mov 1, %o1 400092f0: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092f4: b0 10 20 00 clr %i0 400092f8: 9f c4 80 00 call %l2 400092fc: 94 12 a1 58 or %o2, 0x158, %o2 40009300: 81 c7 e0 08 ret 40009304: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 40009308: 96 10 00 11 mov %l1, %o3 4000930c: 92 10 20 01 mov 1, %o1 40009310: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009314: b0 10 20 00 clr %i0 40009318: 9f c4 80 00 call %l2 4000931c: 94 12 a1 90 or %o2, 0x190, %o2 40009320: 81 c7 e0 08 ret 40009324: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 40009328: 90 10 00 19 mov %i1, %o0 4000932c: 96 10 00 11 mov %l1, %o3 40009330: 92 10 20 01 mov 1, %o1 40009334: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009338: b0 10 20 00 clr %i0 4000933c: 9f c4 80 00 call %l2 40009340: 94 12 a1 e0 or %o2, 0x1e0, %o2 40009344: 81 c7 e0 08 ret 40009348: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 4000934c: 96 10 00 11 mov %l1, %o3 40009350: 92 10 20 01 mov 1, %o1 40009354: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009358: b0 10 20 00 clr %i0 4000935c: 9f c4 80 00 call %l2 40009360: 94 12 a1 c0 or %o2, 0x1c0, %o2 40009364: 81 c7 e0 08 ret 40009368: 81 e8 00 00 restore 400080a8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 400080a8: 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 ) 400080ac: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 400080b0: 80 a5 20 00 cmp %l4, 0 400080b4: 02 80 00 ab be 40008360 <_Objects_Extend_information+0x2b8> 400080b8: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 400080bc: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 400080c0: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 400080c4: ab 2d 60 10 sll %l5, 0x10, %l5 400080c8: 92 10 00 12 mov %l2, %o1 400080cc: 40 00 41 a6 call 40018764 <.udiv> 400080d0: 91 35 60 10 srl %l5, 0x10, %o0 400080d4: 91 2a 20 10 sll %o0, 0x10, %o0 400080d8: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 400080dc: 80 a7 20 00 cmp %i4, 0 400080e0: 02 80 00 a7 be 4000837c <_Objects_Extend_information+0x2d4> 400080e4: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 400080e8: c2 05 00 00 ld [ %l4 ], %g1 400080ec: 80 a0 60 00 cmp %g1, 0 400080f0: 02 80 00 a4 be 40008380 <_Objects_Extend_information+0x2d8> 400080f4: a2 10 00 13 mov %l3, %l1 400080f8: 10 80 00 06 b 40008110 <_Objects_Extend_information+0x68> 400080fc: a0 10 20 00 clr %l0 40008100: c2 05 00 01 ld [ %l4 + %g1 ], %g1 40008104: 80 a0 60 00 cmp %g1, 0 40008108: 22 80 00 08 be,a 40008128 <_Objects_Extend_information+0x80> 4000810c: 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++ ) { 40008110: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40008114: 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++ ) { 40008118: 80 a7 00 10 cmp %i4, %l0 4000811c: 18 bf ff f9 bgu 40008100 <_Objects_Extend_information+0x58> 40008120: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40008124: 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 ) { 40008128: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 4000812c: 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 ) { 40008130: 82 10 63 ff or %g1, 0x3ff, %g1 40008134: 80 a5 40 01 cmp %l5, %g1 40008138: 18 80 00 96 bgu 40008390 <_Objects_Extend_information+0x2e8> 4000813c: 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; 40008140: 40 00 41 4f call 4001867c <.umul> 40008144: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 40008148: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 4000814c: 80 a0 60 00 cmp %g1, 0 40008150: 12 80 00 6d bne 40008304 <_Objects_Extend_information+0x25c> 40008154: 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 ); 40008158: 40 00 08 92 call 4000a3a0 <_Workspace_Allocate_or_fatal_error> 4000815c: 01 00 00 00 nop 40008160: 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 ) { 40008164: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008168: 80 a4 40 01 cmp %l1, %g1 4000816c: 2a 80 00 43 bcs,a 40008278 <_Objects_Extend_information+0x1d0> 40008170: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 40008174: 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 ); 40008178: 91 2d 20 01 sll %l4, 1, %o0 4000817c: 90 02 00 14 add %o0, %l4, %o0 40008180: 90 05 40 08 add %l5, %o0, %o0 40008184: 90 02 00 13 add %o0, %l3, %o0 40008188: 40 00 08 95 call 4000a3dc <_Workspace_Allocate> 4000818c: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 40008190: ac 92 20 00 orcc %o0, 0, %l6 40008194: 02 80 00 7d be 40008388 <_Objects_Extend_information+0x2e0> 40008198: 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 ) { 4000819c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400081a0: 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); 400081a4: ae 05 80 14 add %l6, %l4, %l7 400081a8: 0a 80 00 5e bcs 40008320 <_Objects_Extend_information+0x278> 400081ac: 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++ ) { 400081b0: 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, 400081b4: 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++ ) { 400081b8: 02 80 00 08 be 400081d8 <_Objects_Extend_information+0x130> 400081bc: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 400081c0: 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++ ) { 400081c4: 82 00 60 01 inc %g1 400081c8: 80 a4 c0 01 cmp %l3, %g1 400081cc: 18 bf ff fd bgu 400081c0 <_Objects_Extend_information+0x118> 400081d0: c0 20 80 14 clr [ %g2 + %l4 ] 400081d4: 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 ); 400081d8: 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; 400081dc: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 400081e0: 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 ; 400081e4: 80 a4 40 03 cmp %l1, %g3 400081e8: 1a 80 00 0a bcc 40008210 <_Objects_Extend_information+0x168> 400081ec: c0 25 80 1d clr [ %l6 + %i5 ] 400081f0: 85 2c 60 02 sll %l1, 2, %g2 400081f4: 82 10 00 11 mov %l1, %g1 400081f8: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 400081fc: 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++ ) { 40008200: 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 ; 40008204: 80 a0 40 03 cmp %g1, %g3 40008208: 0a bf ff fd bcs 400081fc <_Objects_Extend_information+0x154> 4000820c: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40008210: 7f ff e7 01 call 40001e14 40008214: 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( 40008218: c6 06 00 00 ld [ %i0 ], %g3 4000821c: 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; 40008220: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40008224: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40008228: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 4000822c: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40008230: 87 28 e0 18 sll %g3, 0x18, %g3 40008234: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40008238: 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( 4000823c: ab 2d 60 10 sll %l5, 0x10, %l5 40008240: 03 00 00 40 sethi %hi(0x10000), %g1 40008244: ab 35 60 10 srl %l5, 0x10, %l5 40008248: 82 10 c0 01 or %g3, %g1, %g1 4000824c: 82 10 40 02 or %g1, %g2, %g1 40008250: 82 10 40 15 or %g1, %l5, %g1 40008254: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40008258: 7f ff e6 f3 call 40001e24 4000825c: 01 00 00 00 nop if ( old_tables ) 40008260: 80 a4 e0 00 cmp %l3, 0 40008264: 22 80 00 05 be,a 40008278 <_Objects_Extend_information+0x1d0> 40008268: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 4000826c: 40 00 08 65 call 4000a400 <_Workspace_Free> 40008270: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40008274: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008278: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 4000827c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 40008280: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40008284: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40008288: 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; 4000828c: 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( 40008290: 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( 40008294: a4 07 bf f4 add %fp, -12, %l2 40008298: 40 00 11 7d call 4000c88c <_Chain_Initialize> 4000829c: 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 ) { 400082a0: 30 80 00 0c b,a 400082d0 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 400082a4: c4 16 20 04 lduh [ %i0 + 4 ], %g2 400082a8: 83 28 60 18 sll %g1, 0x18, %g1 400082ac: 85 28 a0 1b sll %g2, 0x1b, %g2 400082b0: 82 10 40 14 or %g1, %l4, %g1 400082b4: 82 10 40 02 or %g1, %g2, %g1 400082b8: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400082bc: 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( 400082c0: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 400082c4: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400082c8: 7f ff fc e2 call 40007650 <_Chain_Append> 400082cc: 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 ) { 400082d0: 40 00 11 5c call 4000c840 <_Chain_Get> 400082d4: 90 10 00 12 mov %l2, %o0 400082d8: 80 a2 20 00 cmp %o0, 0 400082dc: 32 bf ff f2 bne,a 400082a4 <_Objects_Extend_information+0x1fc> 400082e0: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 400082e4: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400082e8: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 400082ec: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 400082f0: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400082f4: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 400082f8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400082fc: 81 c7 e0 08 ret 40008300: 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 ); 40008304: 40 00 08 36 call 4000a3dc <_Workspace_Allocate> 40008308: 01 00 00 00 nop if ( !new_object_block ) 4000830c: a4 92 20 00 orcc %o0, 0, %l2 40008310: 32 bf ff 96 bne,a 40008168 <_Objects_Extend_information+0xc0> 40008314: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008318: 81 c7 e0 08 ret 4000831c: 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, 40008320: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 40008324: 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, 40008328: 40 00 1d b9 call 4000fa0c 4000832c: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40008330: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40008334: 94 10 00 1d mov %i5, %o2 40008338: 40 00 1d b5 call 4000fa0c 4000833c: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40008340: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40008344: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40008348: 94 04 c0 0a add %l3, %o2, %o2 4000834c: 90 10 00 14 mov %l4, %o0 40008350: 40 00 1d af call 4000fa0c 40008354: 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 ); 40008358: 10 bf ff a1 b 400081dc <_Objects_Extend_information+0x134> 4000835c: 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 ) 40008360: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40008364: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 40008368: ab 2d 60 10 sll %l5, 0x10, %l5 4000836c: a2 10 00 13 mov %l3, %l1 40008370: a0 10 20 00 clr %l0 40008374: 10 bf ff 6c b 40008124 <_Objects_Extend_information+0x7c> 40008378: 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 ) 4000837c: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 40008380: 10 bf ff 69 b 40008124 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 40008384: 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 ); 40008388: 40 00 08 1e call 4000a400 <_Workspace_Free> 4000838c: 90 10 00 12 mov %l2, %o0 return; 40008390: 81 c7 e0 08 ret 40008394: 81 e8 00 00 restore 400085ac <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 400085ac: 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; 400085b0: 05 10 00 74 sethi %hi(0x4001d000), %g2 400085b4: 83 2e 60 02 sll %i1, 2, %g1 400085b8: 84 10 a2 60 or %g2, 0x260, %g2 400085bc: 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; 400085c0: 85 2f 20 10 sll %i4, 0x10, %g2 400085c4: 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; 400085c8: 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; 400085cc: 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; 400085d0: 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; 400085d4: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400085d8: 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; 400085dc: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 400085e0: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 400085e4: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 400085e8: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 400085ec: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 400085f0: 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; 400085f4: 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 = 400085f8: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400085fc: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 40008600: 80 a0 a0 00 cmp %g2, 0 40008604: 02 80 00 05 be 40008618 <_Objects_Initialize_information+0x6c> 40008608: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 4000860c: 80 a6 e0 00 cmp %i3, 0 40008610: 02 80 00 28 be 400086b0 <_Objects_Initialize_information+0x104> 40008614: 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; 40008618: 07 10 00 73 sethi %hi(0x4001cc00), %g3 4000861c: 86 10 e3 6c or %g3, 0x36c, %g3 ! 4001cf6c /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 40008620: 80 a0 00 1b cmp %g0, %i3 40008624: b3 2e 60 18 sll %i1, 0x18, %i1 40008628: 84 40 20 00 addx %g0, 0, %g2 4000862c: 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; 40008630: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 40008634: 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 = 40008638: 07 00 00 40 sethi %hi(0x10000), %g3 4000863c: b2 16 40 03 or %i1, %g3, %i1 40008640: b4 16 40 1a or %i1, %i2, %i2 40008644: b4 16 80 02 or %i2, %g2, %i2 40008648: 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) & 4000864c: 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) ) 40008650: 80 88 60 03 btst 3, %g1 40008654: 02 80 00 0c be 40008684 <_Objects_Initialize_information+0xd8> 40008658: 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); 4000865c: 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; 40008660: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED 40008664: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED the_chain->permanent_null = NULL; 40008668: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 4000866c: 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 ) { 40008670: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40008674: 12 80 00 0d bne 400086a8 <_Objects_Initialize_information+0xfc> <== NOT EXECUTED 40008678: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED 4000867c: 81 c7 e0 08 ret 40008680: 81 e8 00 00 restore /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 40008684: 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); 40008688: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 4000868c: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 40008690: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 40008694: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 40008698: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 4000869c: 80 a6 e0 00 cmp %i3, 0 400086a0: 02 bf ff f7 be 4000867c <_Objects_Initialize_information+0xd0> 400086a4: 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 ); 400086a8: 7f ff fe 80 call 400080a8 <_Objects_Extend_information> 400086ac: 81 e8 00 00 restore /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 400086b0: 92 10 20 01 mov 1, %o1 400086b4: 7f ff fe 1e call 40007f2c <_Internal_error_Occurred> 400086b8: 94 10 20 14 mov 0x14, %o2 400086bc: 01 00 00 00 nop 4000877c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 4000877c: 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 ); 40008780: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 40008784: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 40008788: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 4000878c: 92 10 00 11 mov %l1, %o1 40008790: 40 00 3f f5 call 40018764 <.udiv> 40008794: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40008798: 80 a2 20 00 cmp %o0, 0 4000879c: 02 80 00 12 be 400087e4 <_Objects_Shrink_information+0x68> 400087a0: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 400087a4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 400087a8: c4 00 c0 00 ld [ %g3 ], %g2 400087ac: 80 a4 40 02 cmp %l1, %g2 400087b0: 12 80 00 09 bne 400087d4 <_Objects_Shrink_information+0x58> 400087b4: 82 10 20 00 clr %g1 400087b8: 10 80 00 0d b 400087ec <_Objects_Shrink_information+0x70> <== NOT EXECUTED 400087bc: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400087c0: 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 ] == 400087c4: 80 a4 40 02 cmp %l1, %g2 400087c8: 02 80 00 09 be 400087ec <_Objects_Shrink_information+0x70> 400087cc: 84 04 a0 04 add %l2, 4, %g2 400087d0: 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++ ) { 400087d4: 82 00 60 01 inc %g1 400087d8: 80 a2 00 01 cmp %o0, %g1 400087dc: 38 bf ff f9 bgu,a 400087c0 <_Objects_Shrink_information+0x44> 400087e0: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 400087e4: 81 c7 e0 08 ret 400087e8: 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; 400087ec: 10 80 00 06 b 40008804 <_Objects_Shrink_information+0x88> 400087f0: 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 ); 400087f4: 80 a4 60 00 cmp %l1, 0 400087f8: 22 80 00 12 be,a 40008840 <_Objects_Shrink_information+0xc4> 400087fc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40008800: 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 ); 40008804: 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) && 40008808: 80 a0 40 10 cmp %g1, %l0 4000880c: 0a bf ff fa bcs 400087f4 <_Objects_Shrink_information+0x78> 40008810: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 40008814: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 40008818: 84 04 00 02 add %l0, %g2, %g2 4000881c: 80 a0 40 02 cmp %g1, %g2 40008820: 1a bf ff f6 bcc 400087f8 <_Objects_Shrink_information+0x7c> 40008824: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 40008828: 40 00 0f fc call 4000c818 <_Chain_Extract> 4000882c: 01 00 00 00 nop } } while ( the_object ); 40008830: 80 a4 60 00 cmp %l1, 0 40008834: 12 bf ff f4 bne 40008804 <_Objects_Shrink_information+0x88> 40008838: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4000883c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40008840: 40 00 06 f0 call 4000a400 <_Workspace_Free> 40008844: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008848: 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; 4000884c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 40008850: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 40008854: 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; 40008858: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 4000885c: 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; 40008860: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008864: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 40008868: 81 c7 e0 08 ret 4000886c: 81 e8 00 00 restore 4000c5c8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000c5c8: 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 ]; 4000c5cc: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 if ( !api ) 4000c5d0: 80 a4 20 00 cmp %l0, 0 4000c5d4: 02 80 00 1f be 4000c650 <_RTEMS_tasks_Post_switch_extension+0x88> 4000c5d8: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000c5dc: 7f ff d6 0e call 40001e14 4000c5e0: 01 00 00 00 nop signal_set = asr->signals_posted; 4000c5e4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 4000c5e8: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 4000c5ec: 7f ff d6 0e call 40001e24 4000c5f0: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000c5f4: 80 a4 60 00 cmp %l1, 0 4000c5f8: 32 80 00 04 bne,a 4000c608 <_RTEMS_tasks_Post_switch_extension+0x40> 4000c5fc: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4000c600: 81 c7 e0 08 ret <== NOT EXECUTED 4000c604: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c608: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000c60c: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c610: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000c614: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c618: 94 10 00 12 mov %l2, %o2 4000c61c: 27 00 00 3f sethi %hi(0xfc00), %l3 4000c620: 40 00 07 c5 call 4000e534 4000c624: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000c628: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000c62c: 9f c0 40 00 call %g1 4000c630: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 4000c634: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c638: 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; 4000c63c: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c640: 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; 4000c644: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c648: 40 00 07 bb call 4000e534 4000c64c: 94 10 00 12 mov %l2, %o2 4000c650: 81 c7 e0 08 ret 4000c654: 81 e8 00 00 restore 400088d4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 400088d4: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 400088d8: 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 ); 400088dc: 40 00 04 41 call 400099e0 <_Thread_Set_transient> 400088e0: 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 ) 400088e4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400088e8: 80 a0 40 19 cmp %g1, %i1 400088ec: 02 80 00 05 be 40008900 <_Thread_Change_priority+0x2c> 400088f0: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 400088f4: 92 10 00 19 mov %i1, %o1 400088f8: 40 00 03 be call 400097f0 <_Thread_Set_priority> 400088fc: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 40008900: 7f ff e5 45 call 40001e14 40008904: 01 00 00 00 nop 40008908: 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; 4000890c: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 40008910: 80 a4 a0 04 cmp %l2, 4 40008914: 02 80 00 18 be 40008974 <_Thread_Change_priority+0xa0> 40008918: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 4000891c: 02 80 00 0b be 40008948 <_Thread_Change_priority+0x74> 40008920: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 40008924: 7f ff e5 40 call 40001e24 <== NOT EXECUTED 40008928: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 4000892c: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 40008930: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 40008934: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 40008938: 32 80 00 0d bne,a 4000896c <_Thread_Change_priority+0x98> <== NOT EXECUTED 4000893c: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 40008940: 81 c7 e0 08 ret 40008944: 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 ); 40008948: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 4000894c: 7f ff e5 36 call 40001e24 40008950: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 40008954: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008958: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000895c: 80 8c 80 01 btst %l2, %g1 40008960: 02 bf ff f8 be 40008940 <_Thread_Change_priority+0x6c> 40008964: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 40008968: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 4000896c: 40 00 03 71 call 40009730 <_Thread_queue_Requeue> 40008970: 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 ) ) { 40008974: 12 80 00 14 bne 400089c4 <_Thread_Change_priority+0xf0> 40008978: 23 10 00 74 sethi %hi(0x4001d000), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000897c: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40008980: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 40008984: 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 ); 40008988: c0 24 20 10 clr [ %l0 + 0x10 ] 4000898c: 84 10 c0 02 or %g3, %g2, %g2 40008990: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 40008994: c4 14 63 b0 lduh [ %l1 + 0x3b0 ], %g2 40008998: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 4000899c: 80 8e a0 ff btst 0xff, %i2 400089a0: 82 10 80 01 or %g2, %g1, %g1 400089a4: c2 34 63 b0 sth %g1, [ %l1 + 0x3b0 ] 400089a8: 02 80 00 48 be 40008ac8 <_Thread_Change_priority+0x1f4> 400089ac: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400089b0: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400089b4: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 400089b8: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 400089bc: 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; 400089c0: 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 ); 400089c4: 7f ff e5 18 call 40001e24 400089c8: 90 10 00 18 mov %i0, %o0 400089cc: 7f ff e5 12 call 40001e14 400089d0: 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 ); 400089d4: c2 14 63 b0 lduh [ %l1 + 0x3b0 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 400089d8: 05 10 00 74 sethi %hi(0x4001d000), %g2 400089dc: 83 28 60 10 sll %g1, 0x10, %g1 400089e0: da 00 a2 54 ld [ %g2 + 0x254 ], %o5 400089e4: 85 30 60 10 srl %g1, 0x10, %g2 400089e8: 80 a0 a0 ff cmp %g2, 0xff 400089ec: 08 80 00 27 bleu 40008a88 <_Thread_Change_priority+0x1b4> 400089f0: 07 10 00 6e sethi %hi(0x4001b800), %g3 400089f4: 83 30 60 18 srl %g1, 0x18, %g1 400089f8: 86 10 e3 78 or %g3, 0x378, %g3 400089fc: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008a00: 09 10 00 75 sethi %hi(0x4001d400), %g4 40008a04: 85 28 a0 10 sll %g2, 0x10, %g2 40008a08: 88 11 20 30 or %g4, 0x30, %g4 40008a0c: 83 30 a0 0f srl %g2, 0xf, %g1 40008a10: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40008a14: 83 28 60 10 sll %g1, 0x10, %g1 40008a18: 89 30 60 10 srl %g1, 0x10, %g4 40008a1c: 80 a1 20 ff cmp %g4, 0xff 40008a20: 18 80 00 28 bgu 40008ac0 <_Thread_Change_priority+0x1ec> 40008a24: 83 30 60 18 srl %g1, 0x18, %g1 40008a28: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40008a2c: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40008a30: 85 30 a0 0c srl %g2, 0xc, %g2 40008a34: 83 28 60 10 sll %g1, 0x10, %g1 40008a38: 83 30 60 10 srl %g1, 0x10, %g1 40008a3c: 82 00 40 02 add %g1, %g2, %g1 40008a40: 85 28 60 04 sll %g1, 4, %g2 40008a44: 83 28 60 02 sll %g1, 2, %g1 40008a48: 82 20 80 01 sub %g2, %g1, %g1 40008a4c: 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 ); 40008a50: 05 10 00 74 sethi %hi(0x4001d000), %g2 40008a54: c4 00 a3 bc ld [ %g2 + 0x3bc ], %g2 ! 4001d3bc <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40008a58: 07 10 00 74 sethi %hi(0x4001d000), %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() && 40008a5c: 80 a0 40 02 cmp %g1, %g2 40008a60: 02 80 00 08 be 40008a80 <_Thread_Change_priority+0x1ac> 40008a64: c2 20 e3 8c st %g1, [ %g3 + 0x38c ] _Thread_Executing->is_preemptible ) 40008a68: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 40008a6c: 80 a0 60 00 cmp %g1, 0 40008a70: 02 80 00 04 be 40008a80 <_Thread_Change_priority+0x1ac> 40008a74: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 40008a78: 03 10 00 74 sethi %hi(0x4001d000), %g1 40008a7c: c4 28 63 cc stb %g2, [ %g1 + 0x3cc ] ! 4001d3cc <_Context_Switch_necessary> _ISR_Enable( level ); 40008a80: 7f ff e4 e9 call 40001e24 40008a84: 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 ); 40008a88: 86 10 e3 78 or %g3, 0x378, %g3 40008a8c: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008a90: 09 10 00 75 sethi %hi(0x4001d400), %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 ); 40008a94: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008a98: 88 11 20 30 or %g4, 0x30, %g4 40008a9c: 85 28 a0 10 sll %g2, 0x10, %g2 40008aa0: 83 30 a0 0f srl %g2, 0xf, %g1 40008aa4: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40008aa8: 83 28 60 10 sll %g1, 0x10, %g1 40008aac: 89 30 60 10 srl %g1, 0x10, %g4 40008ab0: 80 a1 20 ff cmp %g4, 0xff 40008ab4: 28 bf ff de bleu,a 40008a2c <_Thread_Change_priority+0x158> 40008ab8: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40008abc: 83 30 60 18 srl %g1, 0x18, %g1 40008ac0: 10 bf ff dc b 40008a30 <_Thread_Change_priority+0x15c> 40008ac4: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008ac8: 84 00 60 04 add %g1, 4, %g2 40008acc: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 40008ad0: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 40008ad4: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008ad8: 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; 40008adc: 10 bf ff ba b 400089c4 <_Thread_Change_priority+0xf0> 40008ae0: e0 20 80 00 st %l0, [ %g2 ] 4000d380 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000d380: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000d384: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000d388: e0 00 63 bc ld [ %g1 + 0x3bc ], %l0 ! 4001d3bc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000d38c: 7f ff d2 a2 call 40001e14 4000d390: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000d394: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000d398: c4 04 40 00 ld [ %l1 ], %g2 4000d39c: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000d3a0: 80 a0 80 01 cmp %g2, %g1 4000d3a4: 02 80 00 1f be 4000d420 <_Thread_Reset_timeslice+0xa0> 4000d3a8: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000d3ac: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 4000d3b0: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000d3b4: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d3b8: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000d3bc: 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; 4000d3c0: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000d3c4: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d3c8: 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; 4000d3cc: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000d3d0: 7f ff d2 95 call 40001e24 4000d3d4: 01 00 00 00 nop 4000d3d8: 7f ff d2 8f call 40001e14 4000d3dc: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000d3e0: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000d3e4: c4 00 63 8c ld [ %g1 + 0x38c ], %g2 ! 4001d38c <_Thread_Heir> 4000d3e8: 80 a4 00 02 cmp %l0, %g2 4000d3ec: 02 80 00 06 be 4000d404 <_Thread_Reset_timeslice+0x84> 4000d3f0: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4000d3f4: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 4000d3f8: c4 28 63 cc stb %g2, [ %g1 + 0x3cc ] ! 4001d3cc <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000d3fc: 7f ff d2 8a call 40001e24 <== NOT EXECUTED 4000d400: 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; 4000d404: c4 04 40 00 ld [ %l1 ], %g2 4000d408: c4 20 63 8c st %g2, [ %g1 + 0x38c ] _Context_Switch_necessary = true; 4000d40c: 84 10 20 01 mov 1, %g2 4000d410: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000d414: c4 28 63 cc stb %g2, [ %g1 + 0x3cc ] ! 4001d3cc <_Context_Switch_necessary> _ISR_Enable( level ); 4000d418: 7f ff d2 83 call 40001e24 4000d41c: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000d420: 7f ff d2 81 call 40001e24 4000d424: 81 e8 00 00 restore 4000d428: 01 00 00 00 nop 40009c0c <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 40009c0c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 40009c10: 03 10 00 74 sethi %hi(0x4001d000), %g1 40009c14: e0 00 63 bc ld [ %g1 + 0x3bc ], %l0 ! 4001d3bc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 40009c18: 7f ff e0 7f call 40001e14 40009c1c: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 40009c20: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 40009c24: c4 04 40 00 ld [ %l1 ], %g2 40009c28: c2 04 60 08 ld [ %l1 + 8 ], %g1 40009c2c: 80 a0 80 01 cmp %g2, %g1 40009c30: 02 80 00 19 be 40009c94 <_Thread_Yield_processor+0x88> 40009c34: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40009c38: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 40009c3c: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 40009c40: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009c44: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40009c48: 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; 40009c4c: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 40009c50: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40009c54: 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; 40009c58: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 40009c5c: 7f ff e0 72 call 40001e24 40009c60: 01 00 00 00 nop 40009c64: 7f ff e0 6c call 40001e14 40009c68: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 40009c6c: 03 10 00 74 sethi %hi(0x4001d000), %g1 40009c70: c4 00 63 8c ld [ %g1 + 0x38c ], %g2 ! 4001d38c <_Thread_Heir> 40009c74: 80 a4 00 02 cmp %l0, %g2 40009c78: 22 80 00 0e be,a 40009cb0 <_Thread_Yield_processor+0xa4> 40009c7c: 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; 40009c80: 84 10 20 01 mov 1, %g2 40009c84: 03 10 00 74 sethi %hi(0x4001d000), %g1 40009c88: c4 28 63 cc stb %g2, [ %g1 + 0x3cc ] ! 4001d3cc <_Context_Switch_necessary> _ISR_Enable( level ); 40009c8c: 7f ff e0 66 call 40001e24 40009c90: 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 ) ) 40009c94: 03 10 00 74 sethi %hi(0x4001d000), %g1 40009c98: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 4001d38c <_Thread_Heir> 40009c9c: 80 a4 00 01 cmp %l0, %g1 40009ca0: 32 bf ff f9 bne,a 40009c84 <_Thread_Yield_processor+0x78> 40009ca4: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 40009ca8: 7f ff e0 5f call 40001e24 40009cac: 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; 40009cb0: 10 bf ff f4 b 40009c80 <_Thread_Yield_processor+0x74> 40009cb4: c4 20 63 8c st %g2, [ %g1 + 0x38c ] 40009474 <_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 ) { 40009474: 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; 40009478: 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); 4000947c: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40009480: 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); 40009484: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009488: 82 06 60 38 add %i1, 0x38, %g1 4000948c: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 40009490: 2d 10 00 72 sethi %hi(0x4001c800), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40009494: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40009498: 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 ]; 4000949c: ab 28 60 04 sll %g1, 4, %l5 400094a0: ac 15 a0 c4 or %l6, 0xc4, %l6 400094a4: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 400094a8: 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 ]; 400094ac: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 400094b0: 12 80 00 24 bne 40009540 <_Thread_queue_Enqueue_priority+0xcc> 400094b4: 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; 400094b8: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 400094bc: 7f ff e2 56 call 40001e14 400094c0: 01 00 00 00 nop 400094c4: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 400094c8: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400094cc: 80 a0 40 16 cmp %g1, %l6 400094d0: 02 80 00 3a be 400095b8 <_Thread_queue_Enqueue_priority+0x144> 400094d4: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 400094d8: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 400094dc: 80 a4 00 13 cmp %l0, %l3 400094e0: 18 80 00 0b bgu 4000950c <_Thread_queue_Enqueue_priority+0x98> 400094e4: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400094e8: 10 80 00 36 b 400095c0 <_Thread_queue_Enqueue_priority+0x14c> 400094ec: 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 ) ) { 400094f0: 80 a4 40 16 cmp %l1, %l6 400094f4: 02 80 00 32 be 400095bc <_Thread_queue_Enqueue_priority+0x148> 400094f8: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 400094fc: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 40009500: 80 a4 00 13 cmp %l0, %l3 40009504: 28 80 00 2f bleu,a 400095c0 <_Thread_queue_Enqueue_priority+0x14c> 40009508: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4000950c: 7f ff e2 46 call 40001e24 40009510: 90 10 00 12 mov %l2, %o0 40009514: 7f ff e2 40 call 40001e14 40009518: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000951c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40009520: 80 8d 00 01 btst %l4, %g1 40009524: 32 bf ff f3 bne,a 400094f0 <_Thread_queue_Enqueue_priority+0x7c> 40009528: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 4000952c: 7f ff e2 3e call 40001e24 <== NOT EXECUTED 40009530: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40009534: 30 bf ff e2 b,a 400094bc <_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 ); 40009538: 7f ff e2 3b call 40001e24 4000953c: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40009540: 7f ff e2 35 call 40001e14 40009544: 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; 40009548: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 4000954c: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 40009550: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40009554: 80 a0 40 15 cmp %g1, %l5 40009558: 02 80 00 20 be 400095d8 <_Thread_queue_Enqueue_priority+0x164> 4000955c: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 40009560: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 40009564: 80 a4 00 13 cmp %l0, %l3 40009568: 0a 80 00 0b bcs 40009594 <_Thread_queue_Enqueue_priority+0x120> 4000956c: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40009570: 10 80 00 1b b 400095dc <_Thread_queue_Enqueue_priority+0x168> 40009574: 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 ) ) { 40009578: 80 a4 40 15 cmp %l1, %l5 4000957c: 02 80 00 17 be 400095d8 <_Thread_queue_Enqueue_priority+0x164> 40009580: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 40009584: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 40009588: 80 a4 00 13 cmp %l0, %l3 4000958c: 3a 80 00 14 bcc,a 400095dc <_Thread_queue_Enqueue_priority+0x168> 40009590: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40009594: 7f ff e2 24 call 40001e24 40009598: 90 10 00 12 mov %l2, %o0 4000959c: 7f ff e2 1e call 40001e14 400095a0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400095a4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400095a8: 80 8d 00 01 btst %l4, %g1 400095ac: 32 bf ff f3 bne,a 40009578 <_Thread_queue_Enqueue_priority+0x104> 400095b0: e2 04 60 04 ld [ %l1 + 4 ], %l1 400095b4: 30 bf ff e1 b,a 40009538 <_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 ) ) { 400095b8: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400095bc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400095c0: 80 a0 a0 01 cmp %g2, 1 400095c4: 02 80 00 17 be 40009620 <_Thread_queue_Enqueue_priority+0x1ac> 400095c8: 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; 400095cc: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 400095d0: 81 c7 e0 08 ret 400095d4: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400095d8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400095dc: 80 a0 a0 01 cmp %g2, 1 400095e0: 32 bf ff fc bne,a 400095d0 <_Thread_queue_Enqueue_priority+0x15c> 400095e4: 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 ) 400095e8: 80 a4 00 13 cmp %l0, %l3 400095ec: 02 80 00 1a be 40009654 <_Thread_queue_Enqueue_priority+0x1e0> 400095f0: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400095f4: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400095f8: 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; 400095fc: 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; 40009600: 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; 40009604: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 40009608: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000960c: b0 10 20 01 mov 1, %i0 40009610: 7f ff e2 05 call 40001e24 40009614: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40009618: 81 c7 e0 08 ret 4000961c: 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 ) 40009620: 02 80 00 0d be 40009654 <_Thread_queue_Enqueue_priority+0x1e0> 40009624: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40009628: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000962c: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40009630: 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; 40009634: 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; 40009638: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 4000963c: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009640: b0 10 20 01 mov 1, %i0 40009644: 7f ff e1 f8 call 40001e24 40009648: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4000964c: 81 c7 e0 08 ret 40009650: 81 e8 00 00 restore 40009654: 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; 40009658: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000965c: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40009660: 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; 40009664: 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; 40009668: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 4000966c: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009670: b0 10 20 01 mov 1, %i0 40009674: 7f ff e1 ec call 40001e24 40009678: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4000967c: 81 c7 e0 08 ret 40009680: 81 e8 00 00 restore 40009730 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009730: 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 ) 40009734: 80 a6 20 00 cmp %i0, 0 40009738: 02 80 00 13 be 40009784 <_Thread_queue_Requeue+0x54> 4000973c: 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 ) { 40009740: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 40009744: 80 a4 60 01 cmp %l1, 1 40009748: 02 80 00 04 be 40009758 <_Thread_queue_Requeue+0x28> 4000974c: 01 00 00 00 nop 40009750: 81 c7 e0 08 ret <== NOT EXECUTED 40009754: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40009758: 7f ff e1 af call 40001e14 4000975c: 01 00 00 00 nop 40009760: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40009764: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40009768: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000976c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40009770: 80 88 80 01 btst %g2, %g1 40009774: 12 80 00 06 bne 4000978c <_Thread_queue_Requeue+0x5c> 40009778: 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 ); 4000977c: 7f ff e1 aa call 40001e24 40009780: 90 10 00 10 mov %l0, %o0 40009784: 81 c7 e0 08 ret 40009788: 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 ); 4000978c: 92 10 00 19 mov %i1, %o1 40009790: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 40009794: 40 00 0e 59 call 4000d0f8 <_Thread_queue_Extract_priority_helper> 40009798: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4000979c: 90 10 00 18 mov %i0, %o0 400097a0: 92 10 00 19 mov %i1, %o1 400097a4: 7f ff ff 34 call 40009474 <_Thread_queue_Enqueue_priority> 400097a8: 94 07 bf fc add %fp, -4, %o2 400097ac: 30 bf ff f4 b,a 4000977c <_Thread_queue_Requeue+0x4c> 40016cd0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40016cd0: 9d e3 bf 88 save %sp, -120, %sp 40016cd4: 2d 10 00 f6 sethi %hi(0x4003d800), %l6 40016cd8: ba 07 bf f4 add %fp, -12, %i5 40016cdc: a8 07 bf f8 add %fp, -8, %l4 40016ce0: a4 07 bf e8 add %fp, -24, %l2 40016ce4: ae 07 bf ec add %fp, -20, %l7 40016ce8: 2b 10 00 f6 sethi %hi(0x4003d800), %l5 40016cec: 39 10 00 f5 sethi %hi(0x4003d400), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40016cf0: c0 27 bf f8 clr [ %fp + -8 ] 40016cf4: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40016cf8: fa 27 bf fc st %i5, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40016cfc: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40016d00: e4 27 bf f0 st %l2, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40016d04: ee 27 bf e8 st %l7, [ %fp + -24 ] 40016d08: ac 15 a0 d4 or %l6, 0xd4, %l6 40016d0c: aa 15 60 10 or %l5, 0x10, %l5 40016d10: b8 17 23 80 or %i4, 0x380, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d14: a2 06 20 30 add %i0, 0x30, %l1 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d18: a6 06 20 68 add %i0, 0x68, %l3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40016d1c: b2 06 20 08 add %i0, 8, %i1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40016d20: b4 06 20 40 add %i0, 0x40, %i2 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 40016d24: b6 10 20 01 mov 1, %i3 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 40016d28: fa 26 20 78 st %i5, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40016d2c: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40016d30: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d34: 90 10 00 11 mov %l1, %o0 40016d38: 92 20 40 09 sub %g1, %o1, %o1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40016d3c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d40: 40 00 11 c0 call 4001b440 <_Watchdog_Adjust_to_chain> 40016d44: 94 10 00 12 mov %l2, %o2 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40016d48: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40016d4c: e0 05 40 00 ld [ %l5 ], %l0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 40016d50: 80 a4 00 09 cmp %l0, %o1 40016d54: 38 80 00 2f bgu,a 40016e10 <_Timer_server_Body+0x140> 40016d58: 92 24 00 09 sub %l0, %o1, %o1 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 40016d5c: 80 a4 00 09 cmp %l0, %o1 40016d60: 0a 80 00 30 bcs 40016e20 <_Timer_server_Body+0x150> 40016d64: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 40016d68: e0 26 20 74 st %l0, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 40016d6c: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40016d70: 40 00 02 98 call 400177d0 <_Chain_Get> 40016d74: 01 00 00 00 nop if ( timer == NULL ) { 40016d78: 80 a2 20 00 cmp %o0, 0 40016d7c: 02 80 00 10 be 40016dbc <_Timer_server_Body+0xec> 40016d80: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40016d84: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40016d88: 80 a0 60 01 cmp %g1, 1 40016d8c: 02 80 00 29 be 40016e30 <_Timer_server_Body+0x160> 40016d90: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40016d94: 12 bf ff f6 bne 40016d6c <_Timer_server_Body+0x9c> 40016d98: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 40016d9c: 40 00 11 df call 4001b518 <_Watchdog_Insert> 40016da0: 90 10 00 13 mov %l3, %o0 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 40016da4: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40016da8: 40 00 02 8a call 400177d0 <_Chain_Get> 40016dac: 01 00 00 00 nop if ( timer == NULL ) { 40016db0: 80 a2 20 00 cmp %o0, 0 40016db4: 32 bf ff f5 bne,a 40016d88 <_Timer_server_Body+0xb8> 40016db8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 40016dbc: 7f ff df 71 call 4000eb80 40016dc0: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 40016dc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40016dc8: 80 a5 00 01 cmp %l4, %g1 40016dcc: 02 80 00 1d be 40016e40 <_Timer_server_Body+0x170> 40016dd0: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 40016dd4: 7f ff df 6f call 4000eb90 <== NOT EXECUTED 40016dd8: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40016ddc: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40016de0: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016de4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40016de8: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40016dec: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016df0: 40 00 11 94 call 4001b440 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 40016df4: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40016df8: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40016dfc: e0 05 40 00 ld [ %l5 ], %l0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 40016e00: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 40016e04: 08 bf ff d7 bleu 40016d60 <_Timer_server_Body+0x90> <== NOT EXECUTED 40016e08: 01 00 00 00 nop <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016e0c: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 40016e10: 90 10 00 13 mov %l3, %o0 40016e14: 40 00 11 8b call 4001b440 <_Watchdog_Adjust_to_chain> 40016e18: 94 10 00 12 mov %l2, %o2 40016e1c: 30 bf ff d3 b,a 40016d68 <_Timer_server_Body+0x98> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 40016e20: 90 10 00 13 mov %l3, %o0 40016e24: 40 00 11 57 call 4001b380 <_Watchdog_Adjust> 40016e28: 92 10 20 01 mov 1, %o1 40016e2c: 30 bf ff cf b,a 40016d68 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 40016e30: 92 02 20 10 add %o0, 0x10, %o1 40016e34: 40 00 11 b9 call 4001b518 <_Watchdog_Insert> 40016e38: 90 10 00 11 mov %l1, %o0 40016e3c: 30 bf ff cc b,a 40016d6c <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 40016e40: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 40016e44: 7f ff df 53 call 4000eb90 40016e48: 01 00 00 00 nop _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 40016e4c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40016e50: 80 a5 c0 01 cmp %l7, %g1 40016e54: 12 80 00 0c bne 40016e84 <_Timer_server_Body+0x1b4> 40016e58: 01 00 00 00 nop 40016e5c: 30 80 00 13 b,a 40016ea8 <_Timer_server_Body+0x1d8> * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 40016e60: c0 24 20 08 clr [ %l0 + 8 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 40016e64: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 40016e68: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 40016e6c: 7f ff df 49 call 4000eb90 40016e70: 01 00 00 00 nop /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 40016e74: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 40016e78: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 40016e7c: 9f c0 40 00 call %g1 40016e80: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 40016e84: 7f ff df 3f call 4000eb80 40016e88: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40016e8c: e0 07 bf e8 ld [ %fp + -24 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40016e90: 80 a5 c0 10 cmp %l7, %l0 40016e94: 32 bf ff f3 bne,a 40016e60 <_Timer_server_Body+0x190> 40016e98: c2 04 00 00 ld [ %l0 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 40016e9c: 7f ff df 3d call 4000eb90 40016ea0: 01 00 00 00 nop 40016ea4: 30 bf ff a1 b,a 40016d28 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 40016ea8: c0 2e 20 7c clrb [ %i0 + 0x7c ] 40016eac: c2 07 00 00 ld [ %i4 ], %g1 40016eb0: 82 00 60 01 inc %g1 40016eb4: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 40016eb8: d0 06 00 00 ld [ %i0 ], %o0 40016ebc: 40 00 0e 90 call 4001a8fc <_Thread_Set_state> 40016ec0: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 40016ec4: 7f ff ff 59 call 40016c28 <_Timer_server_Reset_interval_system_watchdog> 40016ec8: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40016ecc: 7f ff ff 6c call 40016c7c <_Timer_server_Reset_tod_system_watchdog> 40016ed0: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40016ed4: 40 00 0b c1 call 40019dd8 <_Thread_Enable_dispatch> 40016ed8: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40016edc: 90 10 00 19 mov %i1, %o0 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 40016ee0: f6 2e 20 7c stb %i3, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40016ee4: 40 00 11 fa call 4001b6cc <_Watchdog_Remove> 40016ee8: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40016eec: 40 00 11 f8 call 4001b6cc <_Watchdog_Remove> 40016ef0: 90 10 00 1a mov %i2, %o0 40016ef4: 30 bf ff 8d b,a 40016d28 <_Timer_server_Body+0x58> 4000c2a8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000c2a8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 4000c2ac: 7f ff da a7 call 40002d48 4000c2b0: 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)); 4000c2b4: 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; 4000c2b8: 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 ) ) { 4000c2bc: 80 a0 40 11 cmp %g1, %l1 4000c2c0: 02 80 00 1f be 4000c33c <_Watchdog_Adjust+0x94> 4000c2c4: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000c2c8: 12 80 00 1f bne 4000c344 <_Watchdog_Adjust+0x9c> 4000c2cc: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000c2d0: 80 a6 a0 00 cmp %i2, 0 4000c2d4: 02 80 00 1a be 4000c33c <_Watchdog_Adjust+0x94> 4000c2d8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000c2dc: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000c2e0: 80 a6 80 19 cmp %i2, %i1 4000c2e4: 1a 80 00 0b bcc 4000c310 <_Watchdog_Adjust+0x68> 4000c2e8: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 4000c2ec: 10 80 00 1d b 4000c360 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000c2f0: 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 ) { 4000c2f4: b4 a6 80 19 subcc %i2, %i1, %i2 4000c2f8: 02 80 00 11 be 4000c33c <_Watchdog_Adjust+0x94> 4000c2fc: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000c300: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000c304: 80 a6 40 1a cmp %i1, %i2 4000c308: 38 80 00 16 bgu,a 4000c360 <_Watchdog_Adjust+0xb8> 4000c30c: 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; 4000c310: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 4000c314: 7f ff da 91 call 40002d58 4000c318: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000c31c: 40 00 00 b6 call 4000c5f4 <_Watchdog_Tickle> 4000c320: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 4000c324: 7f ff da 89 call 40002d48 4000c328: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000c32c: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 4000c330: 80 a4 40 02 cmp %l1, %g2 4000c334: 12 bf ff f0 bne 4000c2f4 <_Watchdog_Adjust+0x4c> 4000c338: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 4000c33c: 7f ff da 87 call 40002d58 4000c340: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000c344: 12 bf ff fe bne 4000c33c <_Watchdog_Adjust+0x94> 4000c348: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000c34c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000c350: b4 00 80 1a add %g2, %i2, %i2 4000c354: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 4000c358: 7f ff da 80 call 40002d58 4000c35c: 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; 4000c360: 10 bf ff f7 b 4000c33c <_Watchdog_Adjust+0x94> 4000c364: f4 20 60 10 st %i2, [ %g1 + 0x10 ] 400255e0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 400255e0: 81 c3 e0 08 retl <== NOT EXECUTED 400255e4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001ade0 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 4001ade0: 9d e3 bf a0 save %sp, -96, %sp 4001ade4: 40 00 06 80 call 4001c7e4 <_fini> 4001ade8: 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(); 4001adec: 7f ff ff e2 call 4001ad74 4001adf0: 01 00 00 00 nop rtems_shutdown_executive(status); 4001adf4: 40 00 00 50 call 4001af34 4001adf8: 90 10 00 18 mov %i0, %o0 4001adfc: 30 80 00 00 b,a 4001adfc <_exit+0x1c> <== NOT EXECUTED 4003f0bc <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4003f0bc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4003f0c0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4003f0c4: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4003f0c8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4003f0cc: 7f ff ff 69 call 4003ee70 <== NOT EXECUTED 4003f0d0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4003f0d4: 01 00 00 00 nop 400255b4 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 400255b4: 81 c3 e0 08 retl <== NOT EXECUTED 400255b8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000be48 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000be48: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000be4c: 7f ff ff e6 call 4000bde4 <== NOT EXECUTED 4000be50: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000be54: 01 00 00 00 nop 400255d8 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 400255d8: 81 c3 e0 08 retl <== NOT EXECUTED 400255dc: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002bc34 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 4002bc34: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002bc38: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002bc3c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002bc40: 7f ff ff 52 call 4002b988 <== NOT EXECUTED 4002bc44: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002bc48: 01 00 00 00 nop 4002bf0c <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 4002bf0c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002bf10: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002bf14: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002bf18: 7f ff ff b1 call 4002bddc <== NOT EXECUTED 4002bf1c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002bf20: 01 00 00 00 nop 4001af00 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 4001af00: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4001af04: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4001af08: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001af0c: 40 00 00 17 call 4001af68 <== NOT EXECUTED 4001af10: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001af14: 01 00 00 00 nop 4005efa8 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 4005efa8: 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 ); 4005efac: 7f fe a4 70 call 4000816c <== NOT EXECUTED 4005efb0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 4005efb4: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4005efb8: 32 80 01 1d bne,a 4005f42c <_rename_r+0x484> <== NOT EXECUTED 4005efbc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 4005efc0: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 4005efc4: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005efc8: 02 80 00 13 be 4005f014 <_rename_r+0x6c> <== NOT EXECUTED 4005efcc: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005efd0: 02 80 00 11 be 4005f014 <_rename_r+0x6c> <== NOT EXECUTED 4005efd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005efd8: 02 80 00 10 be 4005f018 <_rename_r+0x70> <== NOT EXECUTED 4005efdc: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 4005efe0: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED 4005efe4: a2 10 20 00 clr %l1 <== NOT EXECUTED 4005efe8: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4005efec: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED 4005eff0: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4005eff4: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4005eff8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4005effc: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4005f000: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4005f004: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4005f008: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4005f00c: 10 80 00 0f b 4005f048 <_rename_r+0xa0> <== NOT EXECUTED 4005f010: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 4005f014: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 4005f018: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED 4005f01c: a2 10 20 00 clr %l1 <== NOT EXECUTED 4005f020: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4005f024: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED 4005f028: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 4005f02c: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4005f030: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 4005f034: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4005f038: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 4005f03c: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4005f040: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4005f044: 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; 4005f048: c2 07 bf d4 ld [ %fp + -44 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; 4005f04c: 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; 4005f050: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED 4005f054: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; 4005f058: 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; 4005f05c: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 4005f060: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4005f064: 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; 4005f068: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED 4005f06c: 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 ), 4005f070: 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; 4005f074: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED 4005f078: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4005f07c: 7f ff b1 eb call 4004b828 <== NOT EXECUTED 4005f080: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED 4005f084: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005f088: 7f fe a4 1a call 400080f0 <== NOT EXECUTED 4005f08c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005f090: b2 06 40 08 add %i1, %o0, %i1 <== NOT EXECUTED 4005f094: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4005f098: 7f ff b1 e4 call 4004b828 <== NOT EXECUTED 4005f09c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005f0a0: 94 10 20 00 clr %o2 <== NOT EXECUTED 4005f0a4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005f0a8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4005f0ac: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005f0b0: 7f fe a4 4f call 400081ec <== NOT EXECUTED 4005f0b4: 98 10 20 00 clr %o4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 4005f0b8: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 4005f0bc: 12 80 00 87 bne 4005f2d8 <_rename_r+0x330> <== NOT EXECUTED 4005f0c0: 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 ); 4005f0c4: c2 4e 80 00 ldsb [ %i2 ], %g1 <== NOT EXECUTED 4005f0c8: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005f0cc: 02 80 00 13 be 4005f118 <_rename_r+0x170> <== NOT EXECUTED 4005f0d0: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005f0d4: 02 80 00 11 be 4005f118 <_rename_r+0x170> <== NOT EXECUTED 4005f0d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f0dc: 02 80 00 10 be 4005f11c <_rename_r+0x174> <== NOT EXECUTED 4005f0e0: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 4005f0e4: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED 4005f0e8: 90 10 20 00 clr %o0 <== NOT EXECUTED 4005f0ec: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4005f0f0: c4 27 bf c0 st %g2, [ %fp + -64 ] <== NOT EXECUTED 4005f0f4: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4005f0f8: c4 27 bf c4 st %g2, [ %fp + -60 ] <== NOT EXECUTED 4005f0fc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4005f100: c4 27 bf c8 st %g2, [ %fp + -56 ] <== NOT EXECUTED 4005f104: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4005f108: c4 27 bf cc st %g2, [ %fp + -52 ] <== NOT EXECUTED 4005f10c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4005f110: 10 80 00 0f b 4005f14c <_rename_r+0x1a4> <== NOT EXECUTED 4005f114: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED 4005f118: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 4005f11c: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED 4005f120: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4005f124: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4005f128: c4 27 bf c0 st %g2, [ %fp + -64 ] <== NOT EXECUTED 4005f12c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 4005f130: c4 27 bf c4 st %g2, [ %fp + -60 ] <== NOT EXECUTED 4005f134: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 4005f138: c4 27 bf c8 st %g2, [ %fp + -56 ] <== NOT EXECUTED 4005f13c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 4005f140: c4 27 bf cc st %g2, [ %fp + -52 ] <== NOT EXECUTED 4005f144: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4005f148: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 4005f14c: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005f150: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4005f154: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f158: 02 80 00 98 be 4005f3b8 <_rename_r+0x410> <== NOT EXECUTED 4005f15c: 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 ); 4005f160: 90 06 80 08 add %i2, %o0, %o0 <== NOT EXECUTED 4005f164: b4 07 bf c0 add %fp, -64, %i2 <== NOT EXECUTED 4005f168: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f16c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED if ( result != 0 ) { 4005f170: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 4005f174: 12 80 00 69 bne 4005f318 <_rename_r+0x370> <== NOT EXECUTED 4005f178: 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 ) { 4005f17c: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 4005f180: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4005f184: 12 80 00 2e bne 4005f23c <_rename_r+0x294> <== NOT EXECUTED 4005f188: 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 ) { 4005f18c: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 <== NOT EXECUTED 4005f190: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f194: 02 80 00 83 be 4005f3a0 <_rename_r+0x3f8> <== NOT EXECUTED 4005f198: 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 ); 4005f19c: b2 07 bf d4 add %fp, -44, %i1 <== NOT EXECUTED 4005f1a0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005f1a4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005f1a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f1ac: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005f1b0: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005f1b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f1b8: 02 80 00 08 be 4005f1d8 <_rename_r+0x230> <== NOT EXECUTED 4005f1bc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4005f1c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f1c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f1c8: 02 80 00 05 be 4005f1dc <_rename_r+0x234> <== NOT EXECUTED 4005f1cc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f1d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f1d4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005f1d8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f1dc: 02 80 00 0d be 4005f210 <_rename_r+0x268> <== NOT EXECUTED 4005f1e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f1e4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005f1e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f1ec: 22 80 00 09 be,a 4005f210 <_rename_r+0x268> <== NOT EXECUTED 4005f1f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f1f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f1f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f1fc: 22 80 00 05 be,a 4005f210 <_rename_r+0x268> <== NOT EXECUTED 4005f200: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f204: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f208: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005f20c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f210: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f214: 02 80 00 8f be 4005f450 <_rename_r+0x4a8> <== NOT EXECUTED 4005f218: 01 00 00 00 nop <== NOT EXECUTED 4005f21c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f220: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f224: 02 80 00 8b be 4005f450 <_rename_r+0x4a8> <== NOT EXECUTED 4005f228: 01 00 00 00 nop <== NOT EXECUTED 4005f22c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f230: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 4005f234: 81 c7 e0 08 ret <== NOT EXECUTED 4005f238: 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 ); 4005f23c: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005f240: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f244: 02 80 00 09 be 4005f268 <_rename_r+0x2c0> <== NOT EXECUTED 4005f248: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f24c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f250: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f254: 02 80 00 05 be 4005f268 <_rename_r+0x2c0> <== NOT EXECUTED 4005f258: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f25c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f260: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005f264: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f268: 02 80 00 0d be 4005f29c <_rename_r+0x2f4> <== NOT EXECUTED 4005f26c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f270: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005f274: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f278: 22 80 00 09 be,a 4005f29c <_rename_r+0x2f4> <== NOT EXECUTED 4005f27c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f280: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f284: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f288: 22 80 00 05 be,a 4005f29c <_rename_r+0x2f4> <== NOT EXECUTED 4005f28c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f290: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f294: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005f298: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f29c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f2a0: 02 80 00 08 be 4005f2c0 <_rename_r+0x318> <== NOT EXECUTED 4005f2a4: 01 00 00 00 nop <== NOT EXECUTED 4005f2a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f2ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f2b0: 02 80 00 04 be 4005f2c0 <_rename_r+0x318> <== NOT EXECUTED 4005f2b4: 01 00 00 00 nop <== NOT EXECUTED 4005f2b8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f2bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 4005f2c0: 7f ff 96 2f call 40044b7c <__errno> <== NOT EXECUTED 4005f2c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005f2c8: 82 10 20 12 mov 0x12, %g1 <== NOT EXECUTED 4005f2cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005f2d0: 81 c7 e0 08 ret <== NOT EXECUTED 4005f2d4: 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 ) 4005f2d8: 02 80 00 0b be 4005f304 <_rename_r+0x35c> <== NOT EXECUTED 4005f2dc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f2e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f2e4: 02 80 00 08 be 4005f304 <_rename_r+0x35c> <== NOT EXECUTED 4005f2e8: 01 00 00 00 nop <== NOT EXECUTED 4005f2ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f2f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f2f4: 02 80 00 04 be 4005f304 <_rename_r+0x35c> <== NOT EXECUTED 4005f2f8: 01 00 00 00 nop <== NOT EXECUTED 4005f2fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f300: 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 ); 4005f304: 7f ff 96 1e call 40044b7c <__errno> <== NOT EXECUTED 4005f308: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005f30c: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED 4005f310: 81 c7 e0 08 ret <== NOT EXECUTED 4005f314: 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 ); 4005f318: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005f31c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f320: 02 80 00 09 be 4005f344 <_rename_r+0x39c> <== NOT EXECUTED 4005f324: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f328: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f32c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f330: 02 80 00 05 be 4005f344 <_rename_r+0x39c> <== NOT EXECUTED 4005f334: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f338: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f33c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005f340: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f344: 02 80 00 0d be 4005f378 <_rename_r+0x3d0> <== NOT EXECUTED 4005f348: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f34c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005f350: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f354: 22 80 00 09 be,a 4005f378 <_rename_r+0x3d0> <== NOT EXECUTED 4005f358: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f35c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f360: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f364: 22 80 00 05 be,a 4005f378 <_rename_r+0x3d0> <== NOT EXECUTED 4005f368: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f36c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f370: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005f374: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f378: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f37c: 02 bf ff e2 be 4005f304 <_rename_r+0x35c> <== NOT EXECUTED 4005f380: 01 00 00 00 nop <== NOT EXECUTED 4005f384: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f388: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f38c: 02 bf ff de be 4005f304 <_rename_r+0x35c> <== NOT EXECUTED 4005f390: 01 00 00 00 nop <== NOT EXECUTED 4005f394: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f398: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4005f39c: 30 bf ff da b,a 4005f304 <_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 ); 4005f3a0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4005f3a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f3a8: 02 80 00 05 be 4005f3bc <_rename_r+0x414> <== NOT EXECUTED 4005f3ac: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f3b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f3b4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005f3b8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005f3bc: 02 80 00 0d be 4005f3f0 <_rename_r+0x448> <== NOT EXECUTED 4005f3c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005f3c4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005f3c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f3cc: 22 80 00 09 be,a 4005f3f0 <_rename_r+0x448> <== NOT EXECUTED 4005f3d0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f3d4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f3d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f3dc: 22 80 00 05 be,a 4005f3f0 <_rename_r+0x448> <== NOT EXECUTED 4005f3e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f3e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f3e8: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005f3ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005f3f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f3f4: 02 80 00 08 be 4005f414 <_rename_r+0x46c> <== NOT EXECUTED 4005f3f8: 01 00 00 00 nop <== NOT EXECUTED 4005f3fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005f400: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005f404: 02 80 00 04 be 4005f414 <_rename_r+0x46c> <== NOT EXECUTED 4005f408: 01 00 00 00 nop <== NOT EXECUTED 4005f40c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005f410: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4005f414: 7f ff 95 da call 40044b7c <__errno> <== NOT EXECUTED 4005f418: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005f41c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4005f420: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005f424: 81 c7 e0 08 ret <== NOT EXECUTED 4005f428: 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, 4005f42c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005f430: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 4005f434: 96 07 bf d4 add %fp, -44, %o3 <== NOT EXECUTED 4005f438: 98 10 20 00 clr %o4 <== NOT EXECUTED 4005f43c: 7f fe a3 ad call 400082f0 <== NOT EXECUTED 4005f440: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 4005f444: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4005f448: 02 bf ff 00 be 4005f048 <_rename_r+0xa0> <== NOT EXECUTED 4005f44c: 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; } 4005f450: 81 c7 e0 08 ret <== NOT EXECUTED 4005f454: 81 e8 00 00 restore <== NOT EXECUTED 40009e7c <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40009e7c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40009e80: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40009e84: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40009e88: 7f ff ff b1 call 40009d4c <== NOT EXECUTED 40009e8c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40009e90: 01 00 00 00 nop 4000f048 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4000f048: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000f04c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000f050: 7f ff ff 43 call 4000ed5c <== NOT EXECUTED 4000f054: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000f058: 01 00 00 00 nop 4002a480 : #include int chdir( const char *pathname ) { 4002a480: 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 ); 4002a484: 40 00 84 e9 call 4004b828 4002a488: 90 10 00 18 mov %i0, %o0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4002a48c: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4002a490: 92 10 00 08 mov %o0, %o1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4002a494: 94 10 20 01 mov 1, %o2 4002a498: 90 10 00 18 mov %i0, %o0 4002a49c: 96 10 00 10 mov %l0, %o3 4002a4a0: 98 10 20 01 mov 1, %o4 4002a4a4: 7f ff 77 93 call 400082f0 4002a4a8: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4002a4ac: 80 a2 20 00 cmp %o0, 0 4002a4b0: 12 80 00 31 bne 4002a574 4002a4b4: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4002a4b8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4002a4bc: 80 a0 60 00 cmp %g1, 0 4002a4c0: 22 80 00 2f be,a 4002a57c 4002a4c4: 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 ) { 4002a4c8: 9f c0 40 00 call %g1 4002a4cc: 90 10 00 10 mov %l0, %o0 4002a4d0: 80 a2 20 01 cmp %o0, 1 4002a4d4: 12 80 00 1b bne 4002a540 4002a4d8: 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 ); 4002a4dc: 21 10 01 a9 sethi %hi(0x4006a400), %l0 4002a4e0: d0 04 21 b8 ld [ %l0 + 0x1b8 ], %o0 ! 4006a5b8 4002a4e4: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 4002a4e8: 80 a0 60 00 cmp %g1, 0 4002a4ec: 22 80 00 0a be,a 4002a514 4002a4f0: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002a4f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a4f8: 80 a0 60 00 cmp %g1, 0 4002a4fc: 22 80 00 06 be,a 4002a514 4002a500: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002a504: 9f c0 40 00 call %g1 4002a508: 90 02 20 04 add %o0, 4, %o0 4002a50c: d0 04 21 b8 ld [ %l0 + 0x1b8 ], %o0 rtems_filesystem_current = loc; 4002a510: c2 07 bf ec ld [ %fp + -20 ], %g1 4002a514: c2 22 20 04 st %g1, [ %o0 + 4 ] 4002a518: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002a51c: c2 22 20 08 st %g1, [ %o0 + 8 ] 4002a520: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002a524: c2 22 20 0c st %g1, [ %o0 + 0xc ] 4002a528: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002a52c: c2 22 20 10 st %g1, [ %o0 + 0x10 ] 4002a530: c2 07 bf fc ld [ %fp + -4 ], %g1 4002a534: c2 22 20 14 st %g1, [ %o0 + 0x14 ] return 0; } 4002a538: 81 c7 e0 08 ret 4002a53c: 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 ); 4002a540: 80 a0 60 00 cmp %g1, 0 4002a544: 02 80 00 08 be 4002a564 4002a548: 01 00 00 00 nop 4002a54c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a550: 80 a0 60 00 cmp %g1, 0 4002a554: 02 80 00 04 be 4002a564 4002a558: 01 00 00 00 nop 4002a55c: 9f c0 40 00 call %g1 4002a560: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4002a564: 40 00 69 86 call 40044b7c <__errno> 4002a568: b0 10 3f ff mov -1, %i0 4002a56c: 82 10 20 14 mov 0x14, %g1 4002a570: c2 22 00 00 st %g1, [ %o0 ] 4002a574: 81 c7 e0 08 ret 4002a578: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 4002a57c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a580: 02 80 00 04 be 4002a590 <== NOT EXECUTED 4002a584: 01 00 00 00 nop <== NOT EXECUTED 4002a588: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002a58c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002a590: 40 00 69 7b call 40044b7c <__errno> <== NOT EXECUTED 4002a594: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a598: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002a59c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a5a0: 81 c7 e0 08 ret <== NOT EXECUTED 4002a5a4: 81 e8 00 00 restore <== NOT EXECUTED 40007f24 : int chmod( const char *path, mode_t mode ) { 40007f24: 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 ); 40007f28: 40 01 0e 40 call 4004b828 40007f2c: 90 10 00 18 mov %i0, %o0 40007f30: a0 07 bf ec add %fp, -20, %l0 40007f34: 92 10 00 08 mov %o0, %o1 40007f38: 94 10 20 00 clr %o2 40007f3c: 90 10 00 18 mov %i0, %o0 40007f40: 96 10 00 10 mov %l0, %o3 40007f44: 98 10 20 01 mov 1, %o4 40007f48: 40 00 00 ea call 400082f0 40007f4c: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40007f50: 80 a2 20 00 cmp %o0, 0 40007f54: 12 80 00 16 bne 40007fac 40007f58: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 40007f5c: 80 a0 60 00 cmp %g1, 0 40007f60: 22 80 00 25 be,a 40007ff4 40007f64: 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 ){ 40007f68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007f6c: 80 a0 60 00 cmp %g1, 0 40007f70: 02 80 00 11 be 40007fb4 40007f74: 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 ); 40007f78: 90 10 00 10 mov %l0, %o0 40007f7c: 9f c0 40 00 call %g1 40007f80: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40007f84: c2 07 bf f8 ld [ %fp + -8 ], %g1 40007f88: 80 a0 60 00 cmp %g1, 0 40007f8c: 02 80 00 08 be 40007fac 40007f90: b0 10 00 08 mov %o0, %i0 40007f94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007f98: 80 a0 60 00 cmp %g1, 0 40007f9c: 02 80 00 23 be 40008028 40007fa0: 01 00 00 00 nop 40007fa4: 9f c0 40 00 call %g1 40007fa8: 90 10 00 10 mov %l0, %o0 return result; } 40007fac: 81 c7 e0 08 ret 40007fb0: 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 ); 40007fb4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40007fb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007fbc: 02 80 00 08 be 40007fdc <== NOT EXECUTED 40007fc0: 01 00 00 00 nop <== NOT EXECUTED 40007fc4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40007fc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007fcc: 02 80 00 04 be 40007fdc <== NOT EXECUTED 40007fd0: 01 00 00 00 nop <== NOT EXECUTED 40007fd4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007fd8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40007fdc: 40 00 f2 e8 call 40044b7c <__errno> <== NOT EXECUTED 40007fe0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007fe4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007fe8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007fec: 81 c7 e0 08 ret <== NOT EXECUTED 40007ff0: 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 ); 40007ff4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007ff8: 02 80 00 08 be 40008018 <== NOT EXECUTED 40007ffc: 01 00 00 00 nop <== NOT EXECUTED 40008000: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40008004: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008008: 02 80 00 04 be 40008018 <== NOT EXECUTED 4000800c: 01 00 00 00 nop <== NOT EXECUTED 40008010: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008014: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 40008018: 40 00 f2 d9 call 40044b7c <__errno> <== NOT EXECUTED 4000801c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008020: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40008024: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008028: 81 c7 e0 08 ret <== NOT EXECUTED 4000802c: 81 e8 00 00 restore <== NOT EXECUTED 4002a5a8 : int chown( const char *path, uid_t owner, gid_t group ) { 4002a5a8: 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 ) ) 4002a5ac: 40 00 84 9f call 4004b828 4002a5b0: 90 10 00 18 mov %i0, %o0 4002a5b4: a0 07 bf ec add %fp, -20, %l0 4002a5b8: 92 10 00 08 mov %o0, %o1 4002a5bc: 94 10 20 00 clr %o2 4002a5c0: 90 10 00 18 mov %i0, %o0 4002a5c4: 96 10 00 10 mov %l0, %o3 4002a5c8: 98 10 20 01 mov 1, %o4 4002a5cc: 7f ff 77 49 call 400082f0 4002a5d0: b0 10 3f ff mov -1, %i0 4002a5d4: 80 a2 20 00 cmp %o0, 0 4002a5d8: 12 80 00 15 bne 4002a62c 4002a5dc: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 4002a5e0: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 4002a5e4: 80 a0 60 00 cmp %g1, 0 4002a5e8: 02 80 00 13 be 4002a634 4002a5ec: 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 ); 4002a5f0: 95 2e a0 10 sll %i2, 0x10, %o2 4002a5f4: 93 32 60 10 srl %o1, 0x10, %o1 4002a5f8: 95 32 a0 10 srl %o2, 0x10, %o2 4002a5fc: 9f c0 40 00 call %g1 4002a600: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002a604: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002a608: 80 a0 60 00 cmp %g1, 0 4002a60c: 02 80 00 08 be 4002a62c 4002a610: b0 10 00 08 mov %o0, %i0 4002a614: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a618: 80 a0 60 00 cmp %g1, 0 4002a61c: 02 80 00 10 be 4002a65c 4002a620: 01 00 00 00 nop 4002a624: 9f c0 40 00 call %g1 4002a628: 90 10 00 10 mov %l0, %o0 return result; } 4002a62c: 81 c7 e0 08 ret 4002a630: 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 ); 4002a634: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002a638: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a63c: 02 80 00 04 be 4002a64c <== NOT EXECUTED 4002a640: 01 00 00 00 nop <== NOT EXECUTED 4002a644: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002a648: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002a64c: 40 00 69 4c call 40044b7c <__errno> <== NOT EXECUTED 4002a650: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a654: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002a658: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a65c: 81 c7 e0 08 ret <== NOT EXECUTED 4002a660: 81 e8 00 00 restore <== NOT EXECUTED 4002a664 : #include int chroot( const char *pathname ) { 4002a664: 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) { 4002a668: 21 10 01 a9 sethi %hi(0x4006a400), %l0 4002a66c: e2 04 21 b8 ld [ %l0 + 0x1b8 ], %l1 ! 4006a5b8 4002a670: 03 10 01 b9 sethi %hi(0x4006e400), %g1 4002a674: 82 10 60 60 or %g1, 0x60, %g1 ! 4006e460 4002a678: 80 a4 40 01 cmp %l1, %g1 4002a67c: 02 80 00 28 be 4002a71c 4002a680: 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); 4002a684: 7f ff ff 7f call 4002a480 4002a688: 90 10 00 18 mov %i0, %o0 if (result) { 4002a68c: 80 a2 20 00 cmp %o0, 0 4002a690: 12 80 00 2f bne 4002a74c 4002a694: 11 10 01 87 sethi %hi(0x40061c00), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4002a698: 92 10 20 01 mov 1, %o1 4002a69c: 90 12 20 b8 or %o0, 0xb8, %o0 4002a6a0: 94 10 20 00 clr %o2 4002a6a4: 96 07 bf ec add %fp, -20, %o3 4002a6a8: 7f ff 77 12 call 400082f0 4002a6ac: 98 10 20 00 clr %o4 4002a6b0: 80 a2 20 00 cmp %o0, 0 4002a6b4: 12 80 00 26 bne 4002a74c 4002a6b8: d0 04 21 b8 ld [ %l0 + 0x1b8 ], %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); 4002a6bc: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 4002a6c0: 80 a0 60 00 cmp %g1, 0 4002a6c4: 22 80 00 0b be,a 4002a6f0 4002a6c8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002a6cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002a6d0: 80 a0 60 00 cmp %g1, 0 4002a6d4: 22 80 00 07 be,a 4002a6f0 4002a6d8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002a6dc: 9f c0 40 00 call %g1 4002a6e0: 90 02 20 18 add %o0, 0x18, %o0 4002a6e4: 03 10 01 a9 sethi %hi(0x4006a400), %g1 4002a6e8: d0 00 61 b8 ld [ %g1 + 0x1b8 ], %o0 ! 4006a5b8 rtems_filesystem_root = loc; 4002a6ec: c2 07 bf ec ld [ %fp + -20 ], %g1 4002a6f0: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 4002a6f4: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002a6f8: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 4002a6fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002a700: c2 22 20 20 st %g1, [ %o0 + 0x20 ] 4002a704: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002a708: c2 22 20 24 st %g1, [ %o0 + 0x24 ] 4002a70c: c2 07 bf fc ld [ %fp + -4 ], %g1 4002a710: c2 22 20 28 st %g1, [ %o0 + 0x28 ] return 0; } 4002a714: 81 c7 e0 08 ret 4002a718: 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*/ 4002a71c: 40 00 06 d1 call 4002c260 4002a720: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4002a724: c2 04 21 b8 ld [ %l0 + 0x1b8 ], %g1 4002a728: 80 a0 40 11 cmp %g1, %l1 4002a72c: 12 bf ff d6 bne 4002a684 4002a730: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002a734: 40 00 69 12 call 40044b7c <__errno> <== NOT EXECUTED 4002a738: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4002a73c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002a740: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a744: 81 c7 e0 08 ret <== NOT EXECUTED 4002a748: 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 ); 4002a74c: 40 00 69 0c call 40044b7c <__errno> <== NOT EXECUTED 4002a750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a754: 40 00 69 0a call 40044b7c <__errno> <== NOT EXECUTED 4002a758: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4002a75c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4002a760: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 4002a764: 81 c7 e0 08 ret <== NOT EXECUTED 4002a768: 81 e8 00 00 restore <== NOT EXECUTED 4000adcc : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 4000adcc: 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; 4000add0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 4000add4: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000add8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000addc: d2 00 60 0c ld [ %g1 + 0xc ], %o1 4000ade0: 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; 4000ade4: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 4000ade8: 94 07 bf f4 add %fp, -12, %o2 4000adec: 40 00 03 67 call 4000bb88 4000adf0: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 4000adf4: 80 a2 20 00 cmp %o0, 0 4000adf8: 12 80 00 04 bne 4000ae08 4000adfc: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000ae00: 81 c7 e0 08 ret 4000ae04: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000ae08: 40 00 00 3f call 4000af04 <== NOT EXECUTED 4000ae0c: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000ae10: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae14: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000ae24 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4000ae24: 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; 4000ae28: e0 06 c0 00 ld [ %i3 ], %l0 if (!device_name_table) 4000ae2c: 80 a4 20 00 cmp %l0, 0 4000ae30: 02 80 00 2f be 4000aeec 4000ae34: 03 10 00 41 sethi %hi(0x40010400), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4000ae38: e6 00 63 28 ld [ %g1 + 0x328 ], %l3 ! 40010728 } /* 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 ); 4000ae3c: a2 10 20 00 clr %l1 for (i = 0; i < rtems_device_table_size; i++) { 4000ae40: 80 a4 e0 00 cmp %l3, 0 4000ae44: 02 80 00 18 be 4000aea4 4000ae48: 82 10 20 00 clr %g1 if (!device_name_table[i].device_name) 4000ae4c: 85 28 60 04 sll %g1, 4, %g2 4000ae50: a9 28 60 02 sll %g1, 2, %l4 4000ae54: a8 05 00 02 add %l4, %g2, %l4 4000ae58: 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++) { 4000ae5c: a2 04 60 01 inc %l1 if (!device_name_table[i].device_name) 4000ae60: 80 a4 a0 00 cmp %l2, 0 4000ae64: 02 80 00 0d be 4000ae98 4000ae68: a8 04 00 14 add %l0, %l4, %l4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4000ae6c: 90 10 00 18 mov %i0, %o0 4000ae70: 92 10 00 12 mov %l2, %o1 4000ae74: 40 00 0b 45 call 4000db88 4000ae78: 94 10 00 19 mov %i1, %o2 4000ae7c: 80 a2 20 00 cmp %o0, 0 4000ae80: 12 80 00 07 bne 4000ae9c 4000ae84: 80 a4 c0 11 cmp %l3, %l1 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4000ae88: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1 4000ae8c: 80 a0 60 00 cmp %g1, 0 4000ae90: 02 80 00 0b be 4000aebc 4000ae94: 03 10 00 42 sethi %hi(0x40010800), %g1 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4000ae98: 80 a4 c0 11 cmp %l3, %l1 4000ae9c: 18 bf ff ec bgu 4000ae4c 4000aea0: 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 ); 4000aea4: 40 00 07 99 call 4000cd08 <__errno> 4000aea8: b0 10 3f ff mov -1, %i0 4000aeac: 82 10 20 02 mov 2, %g1 4000aeb0: c2 22 00 00 st %g1, [ %o0 ] } 4000aeb4: 81 c7 e0 08 ret 4000aeb8: 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; 4000aebc: c2 00 60 a4 ld [ %g1 + 0xa4 ], %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]; 4000aec0: e8 26 c0 00 st %l4, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4000aec4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000aec8: 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; 4000aecc: 03 10 00 42 sethi %hi(0x40010800), %g1 4000aed0: 82 10 60 58 or %g1, 0x58, %g1 ! 40010858 4000aed4: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 4000aed8: 03 10 00 42 sethi %hi(0x40010800), %g1 4000aedc: 82 10 60 10 or %g1, 0x10, %g1 ! 40010810 4000aee0: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4000aee4: 81 c7 e0 08 ret 4000aee8: 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 ); 4000aeec: 40 00 07 87 call 4000cd08 <__errno> <== NOT EXECUTED 4000aef0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000aef4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000aef8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000aefc: 81 c7 e0 08 ret <== NOT EXECUTED 4000af00: 81 e8 00 00 restore <== NOT EXECUTED 40002e80 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40002e80: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 40002e84: 23 10 00 41 sethi %hi(0x40010400), %l1 40002e88: c2 04 63 28 ld [ %l1 + 0x328 ], %g1 ! 40010728 40002e8c: 85 28 60 04 sll %g1, 4, %g2 40002e90: 83 28 60 02 sll %g1, 2, %g1 40002e94: 40 00 1e 41 call 4000a798 <_Workspace_Allocate> 40002e98: 90 00 40 02 add %g1, %g2, %o0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 40002e9c: a0 92 20 00 orcc %o0, 0, %l0 40002ea0: 02 80 00 10 be 40002ee0 40002ea4: c2 04 63 28 ld [ %l1 + 0x328 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 40002ea8: 92 10 20 00 clr %o1 40002eac: 85 28 60 04 sll %g1, 4, %g2 40002eb0: 83 28 60 02 sll %g1, 2, %g1 40002eb4: 40 00 29 f5 call 4000d688 40002eb8: 94 00 40 02 add %g1, %g2, %o2 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 40002ebc: 03 10 00 42 sethi %hi(0x40010800), %g1 40002ec0: 82 10 60 58 or %g1, 0x58, %g1 ! 40010858 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 40002ec4: e0 26 20 1c st %l0, [ %i0 + 0x1c ] device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 40002ec8: c2 26 20 24 st %g1, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = &devFS_ops; 40002ecc: 03 10 00 42 sethi %hi(0x40010800), %g1 40002ed0: 82 10 60 10 or %g1, 0x10, %g1 ! 40010810 40002ed4: c2 26 20 28 st %g1, [ %i0 + 0x28 ] /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 40002ed8: 81 c7 e0 08 ret 40002edc: 91 e8 20 00 restore %g0, 0, %o0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 40002ee0: 40 00 27 8a call 4000cd08 <__errno> <== NOT EXECUTED 40002ee4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002ee8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40002eec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002ef0: 81 c7 e0 08 ret <== NOT EXECUTED 40002ef4: 81 e8 00 00 restore <== NOT EXECUTED 400030a8 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 400030a8: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 400030ac: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.command = command; 400030b0: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; status = rtems_io_control( 400030b4: d2 00 60 0c ld [ %g1 + 0xc ], %o1 400030b8: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 400030bc: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; 400030c0: f4 27 bf f8 st %i2, [ %fp + -8 ] status = rtems_io_control( 400030c4: 40 00 11 54 call 40007614 400030c8: 94 07 bf f0 add %fp, -16, %o2 np->major, np->minor, (void *) &args ); if ( status ) 400030cc: 80 a2 20 00 cmp %o0, 0 400030d0: 12 80 00 05 bne 400030e4 400030d4: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 400030d8: f0 07 bf fc ld [ %fp + -4 ], %i0 } 400030dc: 81 c7 e0 08 ret 400030e0: 81 e8 00 00 restore np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 400030e4: 40 00 1f 88 call 4000af04 <== NOT EXECUTED 400030e8: 01 00 00 00 nop <== NOT EXECUTED 400030ec: 81 c7 e0 08 ret <== NOT EXECUTED 400030f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40002ef8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40002ef8: 9d e3 bf a0 save %sp, -96, %sp * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 40002efc: c2 4e 00 00 ldsb [ %i0 ], %g1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40002f00: a0 10 00 18 mov %i0, %l0 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 40002f04: 80 a0 60 64 cmp %g1, 0x64 40002f08: 02 80 00 4c be 40003038 40002f0c: aa 10 00 19 mov %i1, %l5 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 40002f10: 03 00 00 3c sethi %hi(0xf000), %g1 40002f14: b2 0e 40 01 and %i1, %g1, %i1 40002f18: 03 00 00 08 sethi %hi(0x2000), %g1 40002f1c: 80 a6 40 01 cmp %i1, %g1 40002f20: 02 80 00 0b be 40002f4c 40002f24: 03 00 00 18 sethi %hi(0x6000), %g1 40002f28: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40002f2c: 22 80 00 09 be,a 40002f50 <== NOT EXECUTED 40002f30: e4 07 00 00 ld [ %i4 ], %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40002f34: 40 00 27 75 call 4000cd08 <__errno> <== NOT EXECUTED 40002f38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002f3c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40002f40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002f44: 81 c7 e0 08 ret <== NOT EXECUTED 40002f48: 81 e8 00 00 restore <== NOT EXECUTED else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 40002f4c: e4 07 00 00 ld [ %i4 ], %l2 if (!device_name_table) 40002f50: 80 a4 a0 00 cmp %l2, 0 40002f54: 02 80 00 4d be 40003088 40002f58: 03 10 00 41 sethi %hi(0x40010400), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40002f5c: e6 00 63 28 ld [ %g1 + 0x328 ], %l3 ! 40010728 40002f60: 80 a4 e0 00 cmp %l3, 0 40002f64: 02 80 00 43 be 40003070 40002f68: 82 10 20 00 clr %g1 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 40002f6c: a8 10 3f ff mov -1, %l4 40002f70: 10 80 00 0a b 40002f98 40002f74: a2 10 20 00 clr %l1 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 40002f78: 40 00 2a 7e call 4000d970 40002f7c: 01 00 00 00 nop 40002f80: 80 a2 20 00 cmp %o0, 0 40002f84: 02 80 00 27 be 40003020 40002f88: a2 04 60 01 inc %l1 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40002f8c: 80 a4 40 13 cmp %l1, %l3 40002f90: 1a 80 00 0e bcc 40002fc8 40002f94: 82 10 00 11 mov %l1, %g1 if (device_name_table[i].device_name == NULL) 40002f98: 85 28 60 04 sll %g1, 4, %g2 40002f9c: 83 28 60 02 sll %g1, 2, %g1 40002fa0: 82 00 40 02 add %g1, %g2, %g1 40002fa4: d2 04 80 01 ld [ %l2 + %g1 ], %o1 40002fa8: 80 a2 60 00 cmp %o1, 0 40002fac: 12 bf ff f3 bne 40002f78 40002fb0: 90 10 00 10 mov %l0, %o0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 40002fb4: a8 10 00 11 mov %l1, %l4 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40002fb8: a2 04 60 01 inc %l1 40002fbc: 80 a4 40 13 cmp %l1, %l3 40002fc0: 0a bf ff f6 bcs 40002f98 40002fc4: 82 10 00 11 mov %l1, %g1 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 40002fc8: 80 a5 3f ff cmp %l4, -1 40002fcc: 02 80 00 29 be 40003070 40002fd0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 40002fd4: 7f ff fa ed call 40001b88 40002fd8: 01 00 00 00 nop 40002fdc: a2 10 00 08 mov %o0, %l1 device_name_table[slot].device_name = (char *)path; 40002fe0: 83 2d 20 04 sll %l4, 4, %g1 device_name_table[slot].device_name_length = strlen(path); 40002fe4: 90 10 00 10 mov %l0, %o0 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 40002fe8: a9 2d 20 02 sll %l4, 2, %l4 40002fec: a8 05 00 01 add %l4, %g1, %l4 40002ff0: e0 24 80 14 st %l0, [ %l2 + %l4 ] device_name_table[slot].device_name_length = strlen(path); 40002ff4: 40 00 2a b0 call 4000dab4 40002ff8: a4 04 80 14 add %l2, %l4, %l2 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 40002ffc: ea 34 a0 10 sth %l5, [ %l2 + 0x10 ] if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 40003000: d0 24 a0 04 st %o0, [ %l2 + 4 ] device_name_table[slot].major = major; 40003004: f4 24 a0 08 st %i2, [ %l2 + 8 ] device_name_table[slot].minor = minor; 40003008: f6 24 a0 0c st %i3, [ %l2 + 0xc ] device_name_table[slot].mode = mode; _ISR_Enable(level); 4000300c: b0 10 20 00 clr %i0 40003010: 7f ff fa e2 call 40001b98 40003014: 90 10 00 11 mov %l1, %o0 return 0; } 40003018: 81 c7 e0 08 ret 4000301c: 81 e8 00 00 restore for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 40003020: 40 00 27 3a call 4000cd08 <__errno> <== NOT EXECUTED 40003024: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003028: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 4000302c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003030: 81 c7 e0 08 ret <== NOT EXECUTED 40003034: 81 e8 00 00 restore <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 40003038: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 4000303c: 80 a0 60 65 cmp %g1, 0x65 40003040: 12 bf ff b5 bne 40002f14 40003044: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 40003048: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 4000304c: 80 a0 60 76 cmp %g1, 0x76 40003050: 12 bf ff b1 bne 40002f14 40003054: 03 00 00 3c sethi %hi(0xf000), %g1 40003058: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 4000305c: 80 a0 60 00 cmp %g1, 0 40003060: 12 bf ff ac bne 40002f10 40003064: b0 10 20 00 clr %i0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 40003068: 81 c7 e0 08 ret 4000306c: 81 e8 00 00 restore if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 40003070: 40 00 27 26 call 4000cd08 <__errno> <== NOT EXECUTED 40003074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003078: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000307c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003080: 81 c7 e0 08 ret <== NOT EXECUTED 40003084: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 40003088: 40 00 27 20 call 4000cd08 <__errno> <== NOT EXECUTED 4000308c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003090: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40003094: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003098: 81 c7 e0 08 ret <== NOT EXECUTED 4000309c: 81 e8 00 00 restore <== NOT EXECUTED 400030f4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400030f4: 9d e3 bf 90 save %sp, -112, %sp rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 400030f8: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 400030fc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = iop->flags; 40003100: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 40003104: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 40003108: d2 00 60 0c ld [ %g1 + 0xc ], %o1 4000310c: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 40003110: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 40003114: 94 07 bf f4 add %fp, -12, %o2 40003118: 40 00 11 9c call 40007788 4000311c: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) 40003120: 80 a2 20 00 cmp %o0, 0 40003124: 12 80 00 04 bne 40003134 40003128: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000312c: 81 c7 e0 08 ret 40003130: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40003134: 40 00 1f 74 call 4000af04 <== NOT EXECUTED 40003138: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000313c: 81 c7 e0 08 ret <== NOT EXECUTED 40003140: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003144 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40003144: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 40003148: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 4000314c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 40003150: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 40003154: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 40003158: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 4000315c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 40003160: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED 40003164: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 40003168: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; 4000316c: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 40003170: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 40003174: 40 00 11 9d call 400077e8 <== NOT EXECUTED 40003178: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 4000317c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003180: 12 80 00 05 bne 40003194 <== NOT EXECUTED 40003184: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 40003188: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 4000318c: 81 c7 e0 08 ret <== NOT EXECUTED 40003190: 81 e8 00 00 restore <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40003194: 40 00 1f 5c call 4000af04 <== NOT EXECUTED 40003198: 01 00 00 00 nop <== NOT EXECUTED 4000319c: 81 c7 e0 08 ret <== NOT EXECUTED 400031a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400031a4 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 400031a4: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 400031a8: c2 06 00 00 ld [ %i0 ], %g1 if (!the_dev) 400031ac: 80 a0 60 00 cmp %g1, 0 400031b0: 02 80 00 0a be 400031d8 400031b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 400031b8: c6 10 60 10 lduh [ %g1 + 0x10 ], %g3 the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 400031bc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 400031c0: c2 00 60 08 ld [ %g1 + 8 ], %g1 buf->st_mode = the_dev->mode; 400031c4: c6 36 60 0c sth %g3, [ %i1 + 0xc ] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 400031c8: c2 26 60 18 st %g1, [ %i1 + 0x18 ] 400031cc: c4 26 60 1c st %g2, [ %i1 + 0x1c ] buf->st_mode = the_dev->mode; return 0; } 400031d0: 81 c7 e0 08 ret 400031d4: 91 e8 20 00 restore %g0, 0, %o0 { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 400031d8: 40 00 26 cc call 4000cd08 <__errno> <== NOT EXECUTED 400031dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400031e0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400031e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400031e8: 81 c7 e0 08 ret <== NOT EXECUTED 400031ec: 81 e8 00 00 restore <== NOT EXECUTED 400031f0 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 400031f0: 9d e3 bf 80 save %sp, -128, %sp args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 400031f4: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 400031f8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 400031fc: c4 27 bf f8 st %g2, [ %fp + -8 ] np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 40003200: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; args.bytes_moved = 0; 40003204: c0 27 bf fc clr [ %fp + -4 ] rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 40003208: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 4000320c: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40003210: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 40003214: c4 3f bf e8 std %g2, [ %fp + -24 ] args.buffer = (void *) buffer; 40003218: f2 27 bf f0 st %i1, [ %fp + -16 ] rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 4000321c: f0 27 bf e0 st %i0, [ %fp + -32 ] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 40003220: 40 00 11 8a call 40007848 40003224: 94 07 bf e0 add %fp, -32, %o2 np->major, np->minor, (void *) &args ); if ( status ) 40003228: 80 a2 20 00 cmp %o0, 0 4000322c: 12 80 00 05 bne 40003240 40003230: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 40003234: f0 07 bf fc ld [ %fp + -4 ], %i0 } 40003238: 81 c7 e0 08 ret 4000323c: 81 e8 00 00 restore np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 40003240: 40 00 1f 31 call 4000af04 <== NOT EXECUTED 40003244: 01 00 00 00 nop <== NOT EXECUTED 40003248: 81 c7 e0 08 ret <== NOT EXECUTED 4000324c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d57c : */ int device_close( rtems_libio_t *iop ) { 4000d57c: 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; 4000d580: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000d584: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 4000d588: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000d58c: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000d590: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d594: 94 07 bf f4 add %fp, -12, %o2 4000d598: 40 00 04 50 call 4000e6d8 4000d59c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000d5a0: 80 a2 20 00 cmp %o0, 0 4000d5a4: 12 80 00 04 bne 4000d5b4 4000d5a8: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000d5ac: 81 c7 e0 08 ret 4000d5b0: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000d5b4: 40 00 05 c9 call 4000ecd8 <== NOT EXECUTED 4000d5b8: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000d5bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000d5c0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d47c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000d47c: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000d480: 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; 4000d484: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 4000d488: 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; 4000d48c: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000d490: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d494: 40 00 04 a9 call 4000e738 4000d498: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d49c: 80 a2 20 00 cmp %o0, 0 4000d4a0: 12 80 00 05 bne 4000d4b4 4000d4a4: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 4000d4a8: f0 07 bf fc ld [ %fp + -4 ], %i0 } 4000d4ac: 81 c7 e0 08 ret 4000d4b0: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000d4b4: 40 00 06 09 call 4000ecd8 <== NOT EXECUTED 4000d4b8: 01 00 00 00 nop <== NOT EXECUTED 4000d4bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000d4c0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d5c4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000d5c4: 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; 4000d5c8: 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; 4000d5cc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000d5d0: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 4000d5d4: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 4000d5d8: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 4000d5dc: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d5e0: 94 07 bf f4 add %fp, -12, %o2 4000d5e4: 40 00 04 6d call 4000e798 4000d5e8: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d5ec: 80 a2 20 00 cmp %o0, 0 4000d5f0: 12 80 00 04 bne 4000d600 4000d5f4: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000d5f8: 81 c7 e0 08 ret 4000d5fc: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000d600: 40 00 05 b6 call 4000ecd8 <== NOT EXECUTED 4000d604: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000d608: 81 c7 e0 08 ret <== NOT EXECUTED 4000d60c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d520 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000d520: 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; 4000d524: 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; 4000d528: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4000d52c: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 4000d530: 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; 4000d534: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000d538: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 4000d53c: 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; 4000d540: 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; 4000d544: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 4000d548: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000d54c: 40 00 04 ab call 4000e7f8 <== NOT EXECUTED 4000d550: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d554: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d558: 12 80 00 05 bne 4000d56c <== NOT EXECUTED 4000d55c: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000d560: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 4000d564: 81 c7 e0 08 ret <== NOT EXECUTED 4000d568: 81 e8 00 00 restore <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000d56c: 40 00 05 db call 4000ecd8 <== NOT EXECUTED 4000d570: 01 00 00 00 nop <== NOT EXECUTED 4000d574: 81 c7 e0 08 ret <== NOT EXECUTED 4000d578: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d4c4 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000d4c4: 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; 4000d4c8: 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; 4000d4cc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 4000d4d0: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 4000d4d4: 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; 4000d4d8: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 4000d4dc: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 4000d4e0: 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; 4000d4e4: 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; 4000d4e8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 4000d4ec: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d4f0: 40 00 04 da call 4000e858 4000d4f4: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d4f8: 80 a2 20 00 cmp %o0, 0 4000d4fc: 12 80 00 05 bne 4000d510 4000d500: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000d504: f0 07 bf fc ld [ %fp + -4 ], %i0 } 4000d508: 81 c7 e0 08 ret 4000d50c: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000d510: 40 00 05 f2 call 4000ecd8 <== NOT EXECUTED 4000d514: 01 00 00 00 nop <== NOT EXECUTED 4000d518: 81 c7 e0 08 ret <== NOT EXECUTED 4000d51c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40005104 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40005104: 9d e3 bf a0 save %sp, -96, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40005108: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 4000510c: 80 a0 60 00 cmp %g1, 0 40005110: 12 80 00 04 bne 40005120 40005114: 01 00 00 00 nop 40005118: 81 c7 e0 08 ret 4000511c: 81 e8 00 00 restore rtems_interrupt_disable (level); 40005120: 7f ff f3 3d call 40001e14 <== NOT EXECUTED 40005124: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40005128: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 4000512c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40005130: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005134: 02 80 00 14 be 40005184 <== NOT EXECUTED 40005138: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 4000513c: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED 40005140: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40005144: 7f ff f3 38 call 40001e24 <== NOT EXECUTED 40005148: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 4000514c: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40005150: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005154: 40 00 06 be call 40006c4c <== NOT EXECUTED 40005158: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4000515c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005160: 12 80 00 0b bne 4000518c <== NOT EXECUTED 40005164: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 40005168: 7f ff f3 2b call 40001e14 <== NOT EXECUTED 4000516c: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40005170: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40005174: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40005178: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000517c: 32 bf ff f2 bne,a 40005144 <== NOT EXECUTED 40005180: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 40005184: 7f ff f3 28 call 40001e24 <== NOT EXECUTED 40005188: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4000518c: 40 00 08 5d call 40007300 <== NOT EXECUTED 40005190: 01 00 00 00 nop 40005194: 01 00 00 00 nop 40004254 : int dup2( int fildes, int fildes2 ) { 40004254: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40004258: a0 07 bf b8 add %fp, -72, %l0 4000425c: 90 10 00 18 mov %i0, %o0 40004260: 40 00 02 28 call 40004b00 40004264: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40004268: 80 a2 3f ff cmp %o0, -1 4000426c: 12 80 00 04 bne 4000427c 40004270: 92 10 00 10 mov %l0, %o1 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 40004274: 81 c7 e0 08 ret 40004278: 91 e8 3f ff restore %g0, -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 4000427c: 40 00 02 21 call 40004b00 40004280: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40004284: 80 a2 3f ff cmp %o0, -1 40004288: 02 bf ff fb be 40004274 4000428c: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40004290: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40004294: 40 00 00 cf call 400045d0 <== NOT EXECUTED 40004298: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000429c: 81 c7 e0 08 ret <== NOT EXECUTED 400042a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40004b30 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 40004b30: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40004b34: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004b38: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004b3c: 02 80 00 0d be 40004b70 <== NOT EXECUTED 40004b40: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40004b44: 05 10 00 72 sethi %hi(0x4001c800), %g2 <== NOT EXECUTED 40004b48: c4 00 a1 84 ld [ %g2 + 0x184 ], %g2 ! 4001c984 <__ctype_ptr__> <== NOT EXECUTED 40004b4c: 82 00 80 08 add %g2, %o0, %g1 <== NOT EXECUTED 40004b50: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 40004b54: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004b58: 02 80 00 06 be 40004b70 <== NOT EXECUTED 40004b5c: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 40004b60: 02 80 00 04 be 40004b70 <== NOT EXECUTED 40004b64: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40004b68: 12 80 00 06 bne 40004b80 <== NOT EXECUTED 40004b6c: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 40004b70: 7f ff ff 83 call 4000497c <== NOT EXECUTED 40004b74: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004b78: 81 c7 e0 08 ret <== NOT EXECUTED 40004b7c: 81 e8 00 00 restore <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 40004b80: b0 1e 20 40 xor %i0, 0x40, %i0 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 40004b84: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 40004b88: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 40004b8c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40004b90: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004b94: 7f ff ff 2b call 40004840 <== NOT EXECUTED 40004b98: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40004b9c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004ba0: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 40004ba4: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40004ba8: 81 c7 e0 08 ret <== NOT EXECUTED 40004bac: 81 e8 00 00 restore <== NOT EXECUTED 4002ae58 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 4002ae58: 03 10 01 b8 sethi %hi(0x4006e000), %g1 <== NOT EXECUTED 4002ae5c: d0 00 60 bc ld [ %g1 + 0xbc ], %o0 ! 4006e0bc <== NOT EXECUTED 4002ae60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002ae64: 02 80 00 05 be 4002ae78 <== NOT EXECUTED 4002ae68: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 4002ae6c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002ae70: 40 00 67 9b call 40044cdc <== NOT EXECUTED 4002ae74: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002ae78: 81 c3 e0 08 retl <== NOT EXECUTED 4002ae7c: 01 00 00 00 nop 4002ae80 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 4002ae80: 03 10 01 b7 sethi %hi(0x4006dc00), %g1 <== NOT EXECUTED 4002ae84: d0 00 63 d4 ld [ %g1 + 0x3d4 ], %o0 ! 4006dfd4 <== NOT EXECUTED 4002ae88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002ae8c: 02 80 00 05 be 4002aea0 <== NOT EXECUTED 4002ae90: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 4002ae94: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002ae98: 40 00 67 91 call 40044cdc <== NOT EXECUTED 4002ae9c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002aea0: 81 c3 e0 08 retl <== NOT EXECUTED 4002aea4: 01 00 00 00 nop 40004bb0 : * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 40004bb0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->ccount == 0) 40004bb4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 40004bb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004bbc: 02 80 00 36 be 40004c94 <== NOT EXECUTED 40004bc0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 40004bc4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004bc8: 12 80 00 35 bne 40004c9c <== NOT EXECUTED 40004bcc: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004bd0: 27 10 00 72 sethi %hi(0x4001c800), %l3 <== NOT EXECUTED 40004bd4: 29 10 00 6e sethi %hi(0x4001b800), %l4 <== NOT EXECUTED 40004bd8: 25 10 00 6e sethi %hi(0x4001b800), %l2 <== NOT EXECUTED 40004bdc: a6 14 e1 84 or %l3, 0x184, %l3 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40004be0: a8 15 23 28 or %l4, 0x328, %l4 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 40004be4: 10 80 00 0c b 40004c14 <== NOT EXECUTED 40004be8: a4 14 a3 20 or %l2, 0x320, %l2 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004bec: 12 80 00 6a bne 40004d94 <== NOT EXECUTED 40004bf0: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004bf4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004bf8: 02 80 00 63 be 40004d84 <== NOT EXECUTED 40004bfc: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 40004c00: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004c04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c08: 02 80 00 5f be 40004d84 <== NOT EXECUTED 40004c0c: 01 00 00 00 nop <== NOT EXECUTED 40004c10: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 40004c14: c8 04 20 1c ld [ %l0 + 0x1c ], %g4 <== NOT EXECUTED 40004c18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004c1c: c2 24 20 20 st %g1, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40004c20: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004c24: 02 bf ff f4 be 40004bf4 <== NOT EXECUTED 40004c28: e2 09 00 01 ldub [ %g4 + %g1 ], %l1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40004c2c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004c30: 12 80 00 05 bne 40004c44 <== NOT EXECUTED 40004c34: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED 40004c38: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED 40004c3c: 22 80 00 54 be,a 40004d8c <== NOT EXECUTED 40004c40: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 40004c44: 80 a4 60 09 cmp %l1, 9 <== NOT EXECUTED 40004c48: 02 80 00 24 be 40004cd8 <== NOT EXECUTED 40004c4c: a2 04 60 01 inc %l1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004c50: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40004c54: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 40004c58: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004c5c: 12 bf ff e4 bne 40004bec <== NOT EXECUTED 40004c60: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40004c64: 11 10 00 6e sethi %hi(0x4001b800), %o0 <== NOT EXECUTED 40004c68: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004c6c: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED 40004c70: 7f ff fe f4 call 40004840 <== NOT EXECUTED 40004c74: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004c78: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004c7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c80: 02 bf ff de be 40004bf8 <== NOT EXECUTED 40004c84: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40004c88: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } } } if (!lineFlag) 40004c8c: 12 bf ff dd bne 40004c00 <== NOT EXECUTED 40004c90: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED 40004c94: 81 c7 e0 08 ret <== NOT EXECUTED 40004c98: 81 e8 00 00 restore <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 40004c9c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004ca0: 02 80 00 38 be 40004d80 <== NOT EXECUTED 40004ca4: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 40004ca8: 12 bf ff cb bne 40004bd4 <== NOT EXECUTED 40004cac: 27 10 00 72 sethi %hi(0x4001c800), %l3 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40004cb0: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 40004cb4: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40004cb8: 7f ff ff 9e call 40004b30 <== NOT EXECUTED 40004cbc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40004cc0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40004cc4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004cc8: 02 bf ff f3 be 40004c94 <== NOT EXECUTED 40004ccc: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 40004cd0: 7f ff ff 98 call 40004b30 <== NOT EXECUTED 40004cd4: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004cd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004cdc: 02 80 00 17 be 40004d38 <== NOT EXECUTED 40004ce0: e2 04 20 2c ld [ %l0 + 0x2c ], %l1 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 40004ce4: 96 08 a2 00 and %g2, 0x200, %o3 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40004ce8: d8 04 c0 00 ld [ %l3 ], %o4 <== NOT EXECUTED 40004cec: 10 80 00 07 b 40004d08 <== NOT EXECUTED 40004cf0: 84 10 20 00 clr %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40004cf4: 32 80 00 02 bne,a 40004cfc <== NOT EXECUTED 40004cf8: a2 04 60 02 add %l1, 2, %l1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004cfc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004d00: 22 80 00 0f be,a 40004d3c <== NOT EXECUTED 40004d04: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 40004d08: c6 09 00 02 ldub [ %g4 + %g2 ], %g3 <== NOT EXECUTED 40004d0c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (c == '\t') { 40004d10: 80 a0 e0 09 cmp %g3, 9 <== NOT EXECUTED 40004d14: 02 80 00 18 be 40004d74 <== NOT EXECUTED 40004d18: 9a 03 00 03 add %o4, %g3, %o5 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 40004d1c: c6 0b 60 01 ldub [ %o5 + 1 ], %g3 <== NOT EXECUTED 40004d20: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40004d24: 12 bf ff f4 bne 40004cf4 <== NOT EXECUTED 40004d28: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004d2c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004d30: 12 bf ff f6 bne 40004d08 <== NOT EXECUTED 40004d34: a2 04 60 01 inc %l1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004d38: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004d3c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40004d40: 16 bf ff ae bge 40004bf8 <== NOT EXECUTED 40004d44: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40004d48: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40004d4c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004d50: 7f ff fe bc call 40004840 <== NOT EXECUTED 40004d54: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 40004d58: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004d5c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004d60: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40004d64: 06 bf ff f9 bl 40004d48 <== NOT EXECUTED 40004d68: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004d6c: 10 bf ff a3 b 40004bf8 <== NOT EXECUTED 40004d70: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 40004d74: a2 14 60 07 or %l1, 7, %l1 <== NOT EXECUTED 40004d78: 10 bf ff e1 b 40004cfc <== NOT EXECUTED 40004d7c: a2 04 60 01 inc %l1 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 40004d80: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 40004d84: 81 c7 e0 08 ret <== NOT EXECUTED 40004d88: 81 e8 00 00 restore <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 40004d8c: 7f ff ff 69 call 40004b30 <== NOT EXECUTED 40004d90: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40004d94: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004d98: 7f ff fe aa call 40004840 <== NOT EXECUTED 40004d9c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004da0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004da4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004da8: 22 80 00 05 be,a 40004dbc <== NOT EXECUTED 40004dac: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED tty->column--; 40004db0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004db4: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40004db8: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40004dbc: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 40004dc0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004dc4: 02 bf ff a9 be 40004c68 <== NOT EXECUTED 40004dc8: 11 10 00 6e sethi %hi(0x4001b800), %o0 <== NOT EXECUTED 40004dcc: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED 40004dd0: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 40004dd4: 12 bf ff a6 bne 40004c6c <== NOT EXECUTED 40004dd8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004ddc: 10 bf ff 87 b 40004bf8 <== NOT EXECUTED 40004de0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4003ec68 : #include int fchdir( int fd ) { 4003ec68: 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 ); 4003ec6c: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 4003ec70: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 4006a2c4 <== NOT EXECUTED 4003ec74: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4003ec78: 1a 80 00 55 bcc 4003edcc <== NOT EXECUTED 4003ec7c: 03 10 01 b9 sethi %hi(0x4006e400), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4003ec80: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4003ec84: 85 2e 20 06 sll %i0, 6, %g2 <== NOT EXECUTED 4003ec88: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4003ec8c: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 4003ec90: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4003ec94: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4003ec98: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4003ec9c: 02 80 00 4c be 4003edcc <== NOT EXECUTED 4003eca0: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003eca4: 02 80 00 5d be 4003ee18 <== NOT EXECUTED 4003eca8: 01 00 00 00 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4003ecac: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 4003ecb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003ecb4: 02 80 00 5f be 4003ee30 <== NOT EXECUTED 4003ecb8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4003ecbc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4003ecc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003ecc4: 02 80 00 5b be 4003ee30 <== NOT EXECUTED 4003ecc8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4003eccc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003ecd0: 90 06 20 1c add %i0, 0x1c, %o0 <== NOT EXECUTED 4003ecd4: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4003ecd8: 12 80 00 37 bne 4003edb4 <== NOT EXECUTED 4003ecdc: 21 10 01 a9 sethi %hi(0x4006a400), %l0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003ece0: c2 04 21 b8 ld [ %l0 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003ece4: 11 10 01 87 sethi %hi(0x40061c00), %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003ece8: 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)) { 4003ecec: 90 12 20 b8 or %o0, 0xb8, %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4003ecf0: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 4003ecf4: 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)) { 4003ecf8: 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; 4003ecfc: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 4003ed00: 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)) { 4003ed04: 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; 4003ed08: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 4003ed0c: 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)) { 4003ed10: 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; 4003ed14: c4 27 bf e4 st %g2, [ %fp + -28 ] <== NOT EXECUTED 4003ed18: 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)) { 4003ed1c: 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; 4003ed20: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4003ed24: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED 4003ed28: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003ed2c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED 4003ed30: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003ed34: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED 4003ed38: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003ed3c: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 <== NOT EXECUTED 4003ed40: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003ed44: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003ed48: 7f ff 25 6a call 400082f0 <== NOT EXECUTED 4003ed4c: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED 4003ed50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4003ed54: 12 80 00 24 bne 4003ede4 <== NOT EXECUTED 4003ed58: 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 ); 4003ed5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003ed60: 02 80 00 09 be 4003ed84 <== NOT EXECUTED 4003ed64: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4003ed68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4003ed6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003ed70: 22 80 00 06 be,a 4003ed88 <== NOT EXECUTED 4003ed74: c2 04 21 b8 ld [ %l0 + 0x1b8 ], %g1 <== NOT EXECUTED 4003ed78: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003ed7c: 90 07 bf d8 add %fp, -40, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4003ed80: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 4003ed84: c2 04 21 b8 ld [ %l0 + 0x1b8 ], %g1 <== NOT EXECUTED 4003ed88: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003ed8c: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED 4003ed90: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003ed94: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 4003ed98: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003ed9c: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 4003eda0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003eda4: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 4003eda8: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return 0; } 4003edac: 81 c7 e0 08 ret <== NOT EXECUTED 4003edb0: 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 ); 4003edb4: 40 00 17 72 call 40044b7c <__errno> <== NOT EXECUTED 4003edb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003edbc: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 4003edc0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003edc4: 81 c7 e0 08 ret <== NOT EXECUTED 4003edc8: 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); 4003edcc: 40 00 17 6c call 40044b7c <__errno> <== NOT EXECUTED 4003edd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003edd4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4003edd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003eddc: 81 c7 e0 08 ret <== NOT EXECUTED 4003ede0: 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; 4003ede4: c4 07 bf d8 ld [ %fp + -40 ], %g2 <== NOT EXECUTED 4003ede8: c2 04 21 b8 ld [ %l0 + 0x1b8 ], %g1 <== NOT EXECUTED 4003edec: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 4003edf0: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED 4003edf4: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 4003edf8: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED 4003edfc: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 4003ee00: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 4003ee04: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 4003ee08: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 4003ee0c: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return -1; 4003ee10: 81 c7 e0 08 ret <== NOT EXECUTED 4003ee14: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003ee18: 40 00 17 59 call 40044b7c <__errno> <== NOT EXECUTED 4003ee1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003ee20: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4003ee24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003ee28: 81 c7 e0 08 ret <== NOT EXECUTED 4003ee2c: 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 ); 4003ee30: 40 00 17 53 call 40044b7c <__errno> <== NOT EXECUTED 4003ee34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003ee38: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4003ee3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003ee40: 81 c7 e0 08 ret <== NOT EXECUTED 4003ee44: 81 e8 00 00 restore <== NOT EXECUTED 4002a9a0 : int fchmod( int fd, mode_t mode ) { 4002a9a0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4002a9a4: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 4002a9a8: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 4006a2c4 <== NOT EXECUTED 4002a9ac: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002a9b0: 1a 80 00 19 bcc 4002aa14 <== NOT EXECUTED 4002a9b4: 03 10 01 b9 sethi %hi(0x4006e400), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002a9b8: d0 00 60 00 ld [ %g1 ], %o0 <== NOT EXECUTED 4002a9bc: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 4002a9c0: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4002a9c4: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 4002a9c8: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002a9cc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 4002a9d0: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4002a9d4: 02 80 00 10 be 4002aa14 <== NOT EXECUTED 4002a9d8: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002a9dc: 02 80 00 14 be 4002aa2c <== NOT EXECUTED 4002a9e0: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 4002a9e4: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 <== NOT EXECUTED 4002a9e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002a9ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002a9f0: 02 80 00 15 be 4002aa44 <== NOT EXECUTED 4002a9f4: 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 ); 4002a9f8: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED 4002a9fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002aa00: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4002aa04: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002aa08: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 4002aa0c: 81 c7 e0 08 ret <== NOT EXECUTED 4002aa10: 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); 4002aa14: 40 00 68 5a call 40044b7c <__errno> <== NOT EXECUTED 4002aa18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002aa1c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002aa20: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002aa24: 81 c7 e0 08 ret <== NOT EXECUTED 4002aa28: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002aa2c: 40 00 68 54 call 40044b7c <__errno> <== NOT EXECUTED 4002aa30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002aa34: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002aa38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002aa3c: 81 c7 e0 08 ret <== NOT EXECUTED 4002aa40: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002aa44: 40 00 68 4e call 40044b7c <__errno> <== NOT EXECUTED 4002aa48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002aa4c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002aa50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002aa54: 81 c7 e0 08 ret <== NOT EXECUTED 4002aa58: 81 e8 00 00 restore <== NOT EXECUTED 4002aa5c : int fchown( int fd, uid_t owner, gid_t group ) { 4002aa5c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4002aa60: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 4002aa64: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 4006a2c4 <== NOT EXECUTED 4002aa68: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002aa6c: 1a 80 00 19 bcc 4002aad0 <== NOT EXECUTED 4002aa70: 03 10 01 b9 sethi %hi(0x4006e400), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002aa74: d0 00 60 00 ld [ %g1 ], %o0 <== NOT EXECUTED 4002aa78: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 4002aa7c: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4002aa80: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 4002aa84: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002aa88: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 4002aa8c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4002aa90: 02 80 00 10 be 4002aad0 <== NOT EXECUTED 4002aa94: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002aa98: 02 80 00 14 be 4002aae8 <== NOT EXECUTED 4002aa9c: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 4002aaa0: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002aaa4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002aaa8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002aaac: 02 80 00 15 be 4002ab00 <== NOT EXECUTED 4002aab0: 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 ); 4002aab4: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 4002aab8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4002aabc: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED 4002aac0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002aac4: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 4002aac8: 81 c7 e0 08 ret <== NOT EXECUTED 4002aacc: 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); 4002aad0: 40 00 68 2b call 40044b7c <__errno> <== NOT EXECUTED 4002aad4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002aad8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002aadc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002aae0: 81 c7 e0 08 ret <== NOT EXECUTED 4002aae4: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002aae8: 40 00 68 25 call 40044b7c <__errno> <== NOT EXECUTED 4002aaec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002aaf0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002aaf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002aaf8: 81 c7 e0 08 ret <== NOT EXECUTED 4002aafc: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002ab00: 40 00 68 1f call 40044b7c <__errno> <== NOT EXECUTED 4002ab04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002ab08: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002ab0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002ab10: 81 c7 e0 08 ret <== NOT EXECUTED 4002ab14: 81 e8 00 00 restore <== NOT EXECUTED 4003ee70 : int fcntl( int fd, int cmd, ... ) { 4003ee70: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003ee74: 03 10 01 a8 sethi %hi(0x4006a000), %g1 4003ee78: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 4006a2c4 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4003ee7c: 84 07 a0 4c add %fp, 0x4c, %g2 4003ee80: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4003ee84: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4003ee88: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4003ee8c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003ee90: 80 a6 00 01 cmp %i0, %g1 4003ee94: 1a 80 00 7a bcc 4003f07c 4003ee98: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 4003ee9c: 21 10 01 b9 sethi %hi(0x4006e400), %l0 4003eea0: c6 04 20 00 ld [ %l0 ], %g3 4003eea4: 89 2e 20 06 sll %i0, 6, %g4 4003eea8: 93 2e 20 03 sll %i0, 3, %o1 4003eeac: 92 02 40 04 add %o1, %g4, %o1 4003eeb0: 92 00 c0 09 add %g3, %o1, %o1 rtems_libio_check_is_open(iop); 4003eeb4: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 4003eeb8: 80 8a 21 00 btst 0x100, %o0 4003eebc: 02 80 00 70 be 4003f07c 4003eec0: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003eec4: 08 80 00 08 bleu 4003eee4 4003eec8: 89 2e 60 02 sll %i1, 2, %g4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 4003eecc: 40 00 17 2c call 40044b7c <__errno> 4003eed0: b0 10 3f ff mov -1, %i0 4003eed4: 82 10 20 16 mov 0x16, %g1 4003eed8: c2 22 00 00 st %g1, [ %o0 ] 4003eedc: 81 c7 e0 08 ret 4003eee0: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003eee4: 1b 10 00 fb sethi %hi(0x4003ec00), %o5 4003eee8: 9a 13 62 48 or %o5, 0x248, %o5 ! 4003ee48 4003eeec: c8 03 40 04 ld [ %o5 + %g4 ], %g4 4003eef0: 81 c1 00 00 jmp %g4 4003eef4: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4003eef8: 40 00 17 21 call 40044b7c <__errno> 4003eefc: b0 10 3f ff mov -1, %i0 ! ffffffff 4003ef00: 82 10 20 86 mov 0x86, %g1 4003ef04: c2 22 00 00 st %g1, [ %o0 ] 4003ef08: 81 c7 e0 08 ret 4003ef0c: 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 ) ); 4003ef10: d0 00 80 00 ld [ %g2 ], %o0 4003ef14: 7f ff 26 70 call 400088d4 4003ef18: 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); 4003ef1c: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003ef20: 90 0a 22 01 and %o0, 0x201, %o0 4003ef24: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 4003ef28: b0 10 20 00 clr %i0 4003ef2c: 82 08 7d fe and %g1, -514, %g1 4003ef30: 82 12 00 01 or %o0, %g1, %g1 4003ef34: 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) { 4003ef38: c2 02 60 40 ld [ %o1 + 0x40 ], %g1 4003ef3c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4003ef40: 80 a0 60 00 cmp %g1, 0 4003ef44: 02 80 00 52 be 4003f08c 4003ef48: 01 00 00 00 nop int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4003ef4c: 9f c0 40 00 call %g1 4003ef50: 90 10 00 19 mov %i1, %o0 if (err) { 4003ef54: b2 92 20 00 orcc %o0, 0, %i1 4003ef58: 12 80 00 04 bne 4003ef68 4003ef5c: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4003ef60: 81 c7 e0 08 ret 4003ef64: 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; 4003ef68: 40 00 17 05 call 40044b7c <__errno> <== NOT EXECUTED 4003ef6c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003ef70: 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; } 4003ef74: 81 c7 e0 08 ret <== NOT EXECUTED 4003ef78: 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 ); 4003ef7c: 7f ff 25 a6 call 40008614 4003ef80: d2 27 bf f4 st %o1, [ %fp + -12 ] 4003ef84: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003ef88: 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) { 4003ef8c: 80 a6 20 00 cmp %i0, 0 4003ef90: 36 bf ff eb bge,a 4003ef3c 4003ef94: 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; } 4003ef98: 81 c7 e0 08 ret <== NOT EXECUTED 4003ef9c: 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 ) ) 4003efa0: c2 00 80 00 ld [ %g2 ], %g1 4003efa4: 80 a0 60 00 cmp %g1, 0 4003efa8: 22 80 00 2c be,a 4003f058 4003efac: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 4003efb0: 90 12 28 00 or %o0, 0x800, %o0 4003efb4: b0 10 20 00 clr %i0 4003efb8: 10 bf ff e0 b 4003ef38 4003efbc: 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); 4003efc0: b1 32 20 0b srl %o0, 0xb, %i0 4003efc4: 10 bf ff dd b 4003ef38 4003efc8: 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 ); 4003efcc: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 4003efd0: 80 a0 a0 00 cmp %g2, 0 4003efd4: 02 80 00 30 be 4003f094 4003efd8: 80 a0 40 02 cmp %g1, %g2 diop = rtems_libio_iop( fd2 ); 4003efdc: b0 10 20 00 clr %i0 <== NOT EXECUTED 4003efe0: 18 80 00 21 bgu 4003f064 <== NOT EXECUTED 4003efe4: 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; 4003efe8: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 4003efec: da 02 60 40 ld [ %o1 + 0x40 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003eff0: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4003eff4: c4 02 60 20 ld [ %o1 + 0x20 ], %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003eff8: c8 02 60 3c ld [ %o1 + 0x3c ], %g4 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003effc: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4003f000: c4 02 60 24 ld [ %o1 + 0x24 ], %g2 ret = (int) (diop - rtems_libio_iops); 4003f004: 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; 4003f008: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 4003f00c: c4 02 60 28 ld [ %o1 + 0x28 ], %g2 ret = (int) (diop - rtems_libio_iops); 4003f010: 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; 4003f014: c4 20 60 28 st %g2, [ %g1 + 0x28 ] 4003f018: c4 02 60 2c ld [ %o1 + 0x2c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 4003f01c: da 20 60 40 st %o5, [ %g1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003f020: c4 20 60 2c st %g2, [ %g1 + 0x2c ] ret = (int) (diop - rtems_libio_iops); 4003f024: 85 28 e0 06 sll %g3, 6, %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003f028: c8 20 60 3c st %g4, [ %g1 + 0x3c ] diop->flags = iop->flags; 4003f02c: d0 20 60 18 st %o0, [ %g1 + 0x18 ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 4003f030: 83 28 e0 03 sll %g3, 3, %g1 4003f034: 82 20 80 01 sub %g2, %g1, %g1 4003f038: 85 28 60 06 sll %g1, 6, %g2 4003f03c: 82 00 40 02 add %g1, %g2, %g1 4003f040: 82 00 40 03 add %g1, %g3, %g1 4003f044: b1 28 60 0f sll %g1, 0xf, %i0 4003f048: b0 26 00 01 sub %i0, %g1, %i0 4003f04c: b1 2e 20 03 sll %i0, 3, %i0 4003f050: 10 bf ff cf b 4003ef8c 4003f054: 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; 4003f058: b0 10 20 00 clr %i0 <== NOT EXECUTED 4003f05c: 10 bf ff b7 b 4003ef38 <== NOT EXECUTED 4003f060: 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 ); 4003f064: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 4003f068: 85 28 a0 03 sll %g2, 3, %g2 <== NOT EXECUTED 4003f06c: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 4003f070: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 4003f074: 10 bf ff dd b 4003efe8 <== NOT EXECUTED 4003f078: 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); 4003f07c: 40 00 16 c0 call 40044b7c <__errno> <== NOT EXECUTED 4003f080: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003f084: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4003f088: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4003f08c: 81 c7 e0 08 ret <== NOT EXECUTED 4003f090: 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(); 4003f094: 7f ff 25 cf call 400087d0 4003f098: d2 27 bf f4 st %o1, [ %fp + -12 ] if ( diop == 0 ) { 4003f09c: b0 10 3f ff mov -1, %i0 4003f0a0: 82 92 20 00 orcc %o0, 0, %g1 4003f0a4: 02 bf ff 8e be 4003eedc 4003f0a8: d2 07 bf f4 ld [ %fp + -12 ], %o1 4003f0ac: c6 04 20 00 ld [ %l0 ], %g3 4003f0b0: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 4003f0b4: 10 bf ff cd b 4003efe8 4003f0b8: b0 10 00 01 mov %g1, %i0 4000dbe8 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000dbe8: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000dbec: 21 10 00 73 sethi %hi(0x4001cc00), %l0 4000dbf0: d0 04 23 74 ld [ %l0 + 0x374 ], %o0 ! 4001cf74 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000dbf4: a2 10 00 18 mov %i0, %l1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000dbf8: 92 10 20 00 clr %o1 4000dbfc: 94 10 20 00 clr %o2 4000dc00: 7f ff e4 13 call 40006c4c 4000dc04: b0 10 3f fc mov -4, %i0 4000dc08: 80 a2 20 00 cmp %o0, 0 4000dc0c: 12 80 00 f9 bne 4000dff0 4000dc10: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4000dc14: e4 04 40 00 ld [ %l1 ], %l2 <== NOT EXECUTED if (pipe == NULL) { 4000dc18: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4000dc1c: 02 80 00 8e be 4000de54 <== NOT EXECUTED 4000dc20: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000dc24: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED 4000dc28: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000dc2c: 7f ff e4 08 call 40006c4c <== NOT EXECUTED 4000dc30: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000dc34: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000dc38: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000dc3c: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000dc40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000dc44: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000dc48: 02 80 00 67 be 4000dde4 <== NOT EXECUTED 4000dc4c: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000dc50: 7f ff e4 46 call 40006d68 <== NOT EXECUTED 4000dc54: d0 04 23 74 ld [ %l0 + 0x374 ], %o0 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4000dc58: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000dc5c: 12 80 00 e5 bne 4000dff0 <== NOT EXECUTED 4000dc60: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000dc64: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 4000dc68: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000dc6c: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000dc70: 02 80 00 35 be 4000dd44 <== NOT EXECUTED 4000dc74: e0 04 40 00 ld [ %l1 ], %l0 <== NOT EXECUTED 4000dc78: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000dc7c: 02 80 00 61 be 4000de00 <== NOT EXECUTED 4000dc80: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000dc84: 22 80 00 07 be,a 4000dca0 <== NOT EXECUTED 4000dc88: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4000dc8c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000dc90: 7f ff e4 36 call 40006d68 <== NOT EXECUTED 4000dc94: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 4000dc98: 81 c7 e0 08 ret <== NOT EXECUTED 4000dc9c: 81 e8 00 00 restore <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000dca0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dca4: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000dca8: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dcac: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 4000dcb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dcb4: 02 80 00 b9 be 4000df98 <== NOT EXECUTED 4000dcb8: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4000dcbc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000dcc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dcc4: 32 bf ff f3 bne,a 4000dc90 <== NOT EXECUTED 4000dcc8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4000dccc: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 4000dcd0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000dcd4: 32 bf ff ef bne,a 4000dc90 <== NOT EXECUTED 4000dcd8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4000dcdc: 10 80 00 0c b 4000dd0c <== NOT EXECUTED 4000dce0: 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)) 4000dce4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000dce8: 7f ff e3 d9 call 40006c4c <== NOT EXECUTED 4000dcec: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000dcf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dcf4: 12 80 00 0f bne 4000dd30 <== NOT EXECUTED 4000dcf8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4000dcfc: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 4000dd00: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 4000dd04: 32 bf ff e3 bne,a 4000dc90 <== NOT EXECUTED 4000dd08: 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); 4000dd0c: 7f ff e4 17 call 40006d68 <== NOT EXECUTED 4000dd10: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000dd14: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000dd18: 40 00 01 ed call 4000e4cc <== NOT EXECUTED 4000dd1c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000dd20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dd24: 22 bf ff f0 be,a 4000dce4 <== NOT EXECUTED 4000dd28: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4000dd2c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4000dd30: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000dd34: 7f ff ff 5b call 4000daa0 <== NOT EXECUTED 4000dd38: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 4000dd3c: 81 c7 e0 08 ret <== NOT EXECUTED 4000dd40: 81 e8 00 00 restore <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4000dd44: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000dd48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dd4c: 32 80 00 06 bne,a 4000dd64 <== NOT EXECUTED 4000dd50: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 4000dd54: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000dd58: 12 bf ff f6 bne 4000dd30 <== NOT EXECUTED 4000dd5c: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000dd60: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000dd64: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000dd68: 88 00 a0 01 add %g2, 1, %g4 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000dd6c: 86 00 e0 01 inc %g3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000dd70: c8 24 20 14 st %g4, [ %l0 + 0x14 ] <== NOT EXECUTED 4000dd74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000dd78: 02 80 00 8d be 4000dfac <== NOT EXECUTED 4000dd7c: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 4000dd80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dd84: 32 bf ff c3 bne,a 4000dc90 <== NOT EXECUTED 4000dd88: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED prevCounter = pipe->readerCounter; 4000dd8c: 10 80 00 0c b 4000ddbc <== NOT EXECUTED 4000dd90: 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)) 4000dd94: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000dd98: 7f ff e3 ad call 40006c4c <== NOT EXECUTED 4000dd9c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000dda0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dda4: 12 bf ff e3 bne 4000dd30 <== NOT EXECUTED 4000dda8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4000ddac: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 4000ddb0: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 4000ddb4: 32 bf ff b7 bne,a 4000dc90 <== NOT EXECUTED 4000ddb8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4000ddbc: 7f ff e3 eb call 40006d68 <== NOT EXECUTED 4000ddc0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000ddc4: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000ddc8: 40 00 01 c1 call 4000e4cc <== NOT EXECUTED 4000ddcc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ddd0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ddd4: 22 bf ff f0 be,a 4000dd94 <== NOT EXECUTED 4000ddd8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4000dddc: 10 bf ff d5 b 4000dd30 <== NOT EXECUTED 4000dde0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4000dde4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000dde8: 12 80 00 76 bne 4000dfc0 <== NOT EXECUTED 4000ddec: d0 04 23 74 ld [ %l0 + 0x374 ], %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000ddf0: 7f ff e3 de call 40006d68 <== NOT EXECUTED 4000ddf4: e4 24 40 00 st %l2, [ %l1 ] <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000ddf8: 10 bf ff 9c b 4000dc68 <== NOT EXECUTED 4000ddfc: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000de00: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000de04: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000de08: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000de0c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000de10: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 4000de14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000de18: 02 80 00 5b be 4000df84 <== NOT EXECUTED 4000de1c: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000de20: 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 ++; 4000de24: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000de28: 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 ++; 4000de2c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000de30: c6 24 20 14 st %g3, [ %l0 + 0x14 ] <== NOT EXECUTED 4000de34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000de38: 12 bf ff 95 bne 4000dc8c <== NOT EXECUTED 4000de3c: c4 24 20 24 st %g2, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000de40: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000de44: 40 00 01 8b call 4000e470 <== NOT EXECUTED 4000de48: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4000de4c: 10 bf ff 91 b 4000dc90 <== NOT EXECUTED 4000de50: 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)); 4000de54: 7f ff f8 ea call 4000c1fc <== NOT EXECUTED 4000de58: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 4000de5c: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 4000de60: 02 bf ff 7c be 4000dc50 <== NOT EXECUTED 4000de64: a4 10 00 13 mov %l3, %l2 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4000de68: 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)); 4000de6c: c0 24 c0 00 clr [ %l3 ] <== NOT EXECUTED 4000de70: c0 24 e0 08 clr [ %l3 + 8 ] <== NOT EXECUTED 4000de74: c0 24 e0 0c clr [ %l3 + 0xc ] <== NOT EXECUTED 4000de78: c0 24 e0 10 clr [ %l3 + 0x10 ] <== NOT EXECUTED 4000de7c: c0 24 e0 14 clr [ %l3 + 0x14 ] <== NOT EXECUTED 4000de80: c0 24 e0 18 clr [ %l3 + 0x18 ] <== NOT EXECUTED 4000de84: c0 24 e0 1c clr [ %l3 + 0x1c ] <== NOT EXECUTED 4000de88: c0 24 e0 20 clr [ %l3 + 0x20 ] <== NOT EXECUTED 4000de8c: c0 24 e0 24 clr [ %l3 + 0x24 ] <== NOT EXECUTED 4000de90: c0 24 e0 28 clr [ %l3 + 0x28 ] <== NOT EXECUTED 4000de94: c0 24 e0 2c clr [ %l3 + 0x2c ] <== NOT EXECUTED 4000de98: c0 24 e0 30 clr [ %l3 + 0x30 ] <== NOT EXECUTED pipe->Size = PIPE_BUF; 4000de9c: c2 24 e0 04 st %g1, [ %l3 + 4 ] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4000dea0: 7f ff f8 d7 call 4000c1fc <== NOT EXECUTED 4000dea4: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED if (! pipe->Buffer) 4000dea8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000deac: 02 80 00 33 be 4000df78 <== NOT EXECUTED 4000deb0: d0 24 c0 00 st %o0, [ %l3 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4000deb4: 29 10 00 72 sethi %hi(0x4001c800), %l4 <== NOT EXECUTED 4000deb8: d0 4d 21 70 ldsb [ %l4 + 0x170 ], %o0 ! 4001c970 <== NOT EXECUTED 4000debc: 2b 14 12 5c sethi %hi(0x50497000), %l5 <== NOT EXECUTED 4000dec0: 82 15 62 00 or %l5, 0x200, %g1 ! 50497200 <== NOT EXECUTED 4000dec4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000dec8: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000decc: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000ded0: 40 00 01 16 call 4000e328 <== NOT EXECUTED 4000ded4: 96 04 e0 2c add %l3, 0x2c, %o3 <== NOT EXECUTED 4000ded8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dedc: 32 80 00 25 bne,a 4000df70 <== NOT EXECUTED 4000dee0: 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( 4000dee4: d0 4d 21 70 ldsb [ %l4 + 0x170 ], %o0 <== NOT EXECUTED 4000dee8: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 4000deec: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 4000def0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000def4: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000def8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000defc: 40 00 01 0b call 4000e328 <== NOT EXECUTED 4000df00: 96 04 e0 30 add %l3, 0x30, %o3 <== NOT EXECUTED 4000df04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000df08: 12 80 00 17 bne 4000df64 <== NOT EXECUTED 4000df0c: 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( 4000df10: d0 4d 21 70 ldsb [ %l4 + 0x170 ], %o0 <== NOT EXECUTED 4000df14: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000df18: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED 4000df1c: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000df20: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000df24: 7f ff e2 a9 call 400069c8 <== NOT EXECUTED 4000df28: 98 04 e0 28 add %l3, 0x28, %o4 <== NOT EXECUTED 4000df2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000df30: 12 80 00 0b bne 4000df5c <== NOT EXECUTED 4000df34: c2 0d 21 70 ldub [ %l4 + 0x170 ], %g1 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4000df38: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4000df3c: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4000df40: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000df44: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 4000df48: 12 bf ff 37 bne 4000dc24 <== NOT EXECUTED 4000df4c: c4 2d 21 70 stb %g2, [ %l4 + 0x170 ] <== NOT EXECUTED c = 'a'; 4000df50: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 4000df54: 10 bf ff 34 b 4000dc24 <== NOT EXECUTED 4000df58: c2 2d 21 70 stb %g1, [ %l4 + 0x170 ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4000df5c: 40 00 01 2b call 4000e408 <== NOT EXECUTED 4000df60: d0 04 e0 30 ld [ %l3 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4000df64: 40 00 01 29 call 4000e408 <== NOT EXECUTED 4000df68: d0 04 e0 2c ld [ %l3 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4000df6c: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED 4000df70: 7f ff f7 2b call 4000bc1c <== NOT EXECUTED 4000df74: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 4000df78: 7f ff f7 29 call 4000bc1c <== NOT EXECUTED 4000df7c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4000df80: 30 bf ff 34 b,a 4000dc50 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4000df84: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000df88: 40 00 01 3a call 4000e470 <== NOT EXECUTED 4000df8c: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000df90: 10 bf ff a5 b 4000de24 <== NOT EXECUTED 4000df94: 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); 4000df98: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000df9c: 40 00 01 35 call 4000e470 <== NOT EXECUTED 4000dfa0: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 4000dfa4: 10 bf ff 47 b 4000dcc0 <== NOT EXECUTED 4000dfa8: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4000dfac: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000dfb0: 40 00 01 30 call 4000e470 <== NOT EXECUTED 4000dfb4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 4000dfb8: 10 bf ff 72 b 4000dd80 <== NOT EXECUTED 4000dfbc: 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); 4000dfc0: 40 00 01 12 call 4000e408 <== NOT EXECUTED 4000dfc4: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000dfc8: 40 00 01 10 call 4000e408 <== NOT EXECUTED 4000dfcc: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000dfd0: 7f ff e2 f2 call 40006b98 <== NOT EXECUTED 4000dfd4: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000dfd8: 7f ff f7 11 call 4000bc1c <== NOT EXECUTED 4000dfdc: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED free(pipe); 4000dfe0: 7f ff f7 0f call 4000bc1c <== NOT EXECUTED 4000dfe4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000dfe8: 7f ff e3 60 call 40006d68 <== NOT EXECUTED 4000dfec: d0 04 23 74 ld [ %l0 + 0x374 ], %o0 <== NOT EXECUTED 4000dff0: 81 c7 e0 08 ret 4000dff4: 81 e8 00 00 restore 4000c0a0 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c0a0: 05 10 01 b9 sethi %hi(0x4006e400), %g2 <== NOT EXECUTED 4000c0a4: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 ! 4006e448 <== NOT EXECUTED 4000c0a8: 84 10 a0 48 or %g2, 0x48, %g2 <== NOT EXECUTED 4000c0ac: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED 4000c0b0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000c0b4: 02 80 00 10 be 4000c0f4 <== NOT EXECUTED 4000c0b8: 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 ) { 4000c0bc: c8 02 60 10 ld [ %o1 + 0x10 ], %g4 <== NOT EXECUTED 4000c0c0: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED 4000c0c4: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 4000c0c8: 32 80 00 08 bne,a 4000c0e8 <== NOT EXECUTED 4000c0cc: 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; 4000c0d0: 81 c3 e0 08 retl <== NOT EXECUTED 4000c0d4: 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 ) { 4000c0d8: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 4000c0dc: 02 80 00 08 be 4000c0fc <== NOT EXECUTED 4000c0e0: 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 ) { 4000c0e4: 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; 4000c0e8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000c0ec: 32 bf ff fb bne,a 4000c0d8 <== NOT EXECUTED 4000c0f0: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED return true; } } return false; } 4000c0f4: 81 c3 e0 08 retl <== NOT EXECUTED 4000c0f8: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000c0fc: 81 c3 e0 08 retl <== NOT EXECUTED 4000c100: 01 00 00 00 nop 40004918 : long fpathconf( int fd, int name ) { 40004918: 9d e3 bf a0 save %sp, -96, %sp long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 4000491c: 03 10 00 82 sethi %hi(0x40020800), %g1 40004920: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 ! 40020ab4 40004924: 80 a6 00 01 cmp %i0, %g1 40004928: 1a 80 00 3f bcc 40004a24 4000492c: 03 10 00 84 sethi %hi(0x40021000), %g1 iop = rtems_libio_iop(fd); 40004930: c2 00 63 d4 ld [ %g1 + 0x3d4 ], %g1 ! 400213d4 40004934: 85 2e 20 06 sll %i0, 6, %g2 40004938: b1 2e 20 03 sll %i0, 3, %i0 4000493c: b0 06 00 02 add %i0, %g2, %i0 40004940: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 40004944: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40004948: 80 88 61 00 btst 0x100, %g1 4000494c: 02 80 00 36 be 40004a24 40004950: 80 88 60 02 btst 2, %g1 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40004954: 02 80 00 3a be 40004a3c 40004958: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4000495c: 08 80 00 08 bleu 4000497c 40004960: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40004964: 40 00 35 5e call 40011edc <__errno> 40004968: b0 10 3f ff mov -1, %i0 4000496c: 82 10 20 16 mov 0x16, %g1 40004970: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 40004974: 81 c7 e0 08 ret 40004978: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4000497c: b3 2e 60 02 sll %i1, 2, %i1 40004980: 05 10 00 12 sethi %hi(0x40004800), %g2 40004984: 84 10 a0 e8 or %g2, 0xe8, %g2 ! 400048e8 40004988: c4 00 80 19 ld [ %g2 + %i1 ], %g2 4000498c: 81 c0 80 00 jmp %g2 40004990: 01 00 00 00 nop break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 40004994: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 40004998: 81 c7 e0 08 ret 4000499c: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 400049a0: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 400049a4: 81 c7 e0 08 ret 400049a8: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 400049ac: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 400049b0: 81 c7 e0 08 ret 400049b4: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 400049b8: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 400049bc: 81 c7 e0 08 ret 400049c0: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 400049c4: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 400049c8: 81 c7 e0 08 ret 400049cc: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 400049d0: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 400049d4: 81 c7 e0 08 ret 400049d8: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 400049dc: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 400049e0: 81 c7 e0 08 ret 400049e4: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 400049e8: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 400049ec: 81 c7 e0 08 ret 400049f0: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 400049f4: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 400049f8: 81 c7 e0 08 ret 400049fc: 81 e8 00 00 restore switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 40004a00: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 40004a04: 81 c7 e0 08 ret 40004a08: 81 e8 00 00 restore the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 40004a0c: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 40004a10: 81 c7 e0 08 ret 40004a14: 81 e8 00 00 restore break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 40004a18: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 40004a1c: 81 c7 e0 08 ret 40004a20: 81 e8 00 00 restore rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 40004a24: 40 00 35 2e call 40011edc <__errno> 40004a28: b0 10 3f ff mov -1, %i0 40004a2c: 82 10 20 09 mov 9, %g1 40004a30: c2 22 00 00 st %g1, [ %o0 ] 40004a34: 81 c7 e0 08 ret 40004a38: 81 e8 00 00 restore rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40004a3c: 40 00 35 28 call 40011edc <__errno> <== NOT EXECUTED 40004a40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004a44: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004a48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004a4c: 81 c7 e0 08 ret <== NOT EXECUTED 40004a50: 81 e8 00 00 restore <== NOT EXECUTED 4000bc1c : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000bc1c: 9d e3 bf a0 save %sp, -96, %sp 4000bc20: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000bc24: 82 10 61 38 or %g1, 0x138, %g1 ! 4001d138 4000bc28: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4000bc2c: b2 10 00 18 mov %i0, %i1 4000bc30: 84 00 a0 01 inc %g2 if ( !ptr ) 4000bc34: 80 a6 20 00 cmp %i0, 0 4000bc38: 02 80 00 15 be 4000bc8c 4000bc3c: 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()) && 4000bc40: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000bc44: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 4001d4a0 <_System_state_Current> 4000bc48: 80 a0 60 03 cmp %g1, 3 4000bc4c: 02 80 00 17 be 4000bca8 4000bc50: 03 10 00 73 sethi %hi(0x4001cc00), %g1 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000bc54: c2 00 62 48 ld [ %g1 + 0x248 ], %g1 ! 4001ce48 4000bc58: 80 a0 60 00 cmp %g1, 0 4000bc5c: 02 80 00 06 be 4000bc74 4000bc60: 21 10 00 72 sethi %hi(0x4001c800), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000bc64: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000bc68: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000bc6c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4000bc70: 21 10 00 72 sethi %hi(0x4001c800), %l0 <== NOT EXECUTED 4000bc74: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 ! 4001c820 4000bc78: 40 00 04 bb call 4000cf64 <_Protected_heap_Free> 4000bc7c: 92 10 00 19 mov %i1, %o1 4000bc80: 80 8a 20 ff btst 0xff, %o0 4000bc84: 02 80 00 04 be 4000bc94 4000bc88: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 4000bc8c: 81 c7 e0 08 ret 4000bc90: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000bc94: 31 10 00 6f sethi %hi(0x4001bc00), %i0 <== NOT EXECUTED 4000bc98: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000bc9c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000bca0: 7f ff e1 47 call 400041bc <== NOT EXECUTED 4000bca4: 91 ee 22 78 restore %i0, 0x278, %o0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000bca8: 40 00 01 2f call 4000c164 4000bcac: 01 00 00 00 nop 4000bcb0: 80 8a 20 ff btst 0xff, %o0 4000bcb4: 12 bf ff e8 bne 4000bc54 4000bcb8: 03 10 00 73 sethi %hi(0x4001cc00), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000bcbc: 40 00 01 3c call 4000c1ac <== NOT EXECUTED 4000bcc0: 81 e8 00 00 restore <== NOT EXECUTED 4000bcc4: 01 00 00 00 nop 4002c12c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 4002c12c: 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 4002c130: 03 10 01 b9 sethi %hi(0x4006e400), %g1 <== NOT EXECUTED 4002c134: 82 10 60 60 or %g1, 0x60, %g1 ! 4006e460 <== NOT EXECUTED 4002c138: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002c13c: 02 80 00 18 be 4002c19c <== NOT EXECUTED 4002c140: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 4002c144: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 4002c148: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c14c: 22 80 00 09 be,a 4002c170 <== NOT EXECUTED 4002c150: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002c154: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002c158: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c15c: 22 80 00 05 be,a 4002c170 <== NOT EXECUTED 4002c160: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002c164: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c168: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 4002c16c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002c170: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c174: 02 80 00 08 be 4002c194 <== NOT EXECUTED 4002c178: 01 00 00 00 nop <== NOT EXECUTED 4002c17c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002c180: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c184: 02 80 00 04 be 4002c194 <== NOT EXECUTED 4002c188: 01 00 00 00 nop <== NOT EXECUTED 4002c18c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c190: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 4002c194: 7f ff 70 92 call 400083dc <== NOT EXECUTED 4002c198: 81 e8 00 00 restore <== NOT EXECUTED 4002c19c: 81 c7 e0 08 ret <== NOT EXECUTED 4002c1a0: 81 e8 00 00 restore <== NOT EXECUTED 4001aa98 : int fstat( int fd, struct stat *sbuf ) { 4001aa98: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 4001aa9c: 80 a6 60 00 cmp %i1, 0 4001aaa0: 02 80 00 3b be 4001ab8c 4001aaa4: 03 10 00 72 sethi %hi(0x4001c800), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 4001aaa8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 ! 4001c814 4001aaac: 80 a6 00 01 cmp %i0, %g1 4001aab0: 1a 80 00 2b bcc 4001ab5c 4001aab4: 03 10 00 74 sethi %hi(0x4001d000), %g1 4001aab8: d0 00 61 2c ld [ %g1 + 0x12c ], %o0 ! 4001d12c 4001aabc: 83 2e 20 06 sll %i0, 6, %g1 4001aac0: b1 2e 20 03 sll %i0, 3, %i0 4001aac4: b0 06 00 01 add %i0, %g1, %i0 4001aac8: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 4001aacc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 4001aad0: 80 88 61 00 btst 0x100, %g1 4001aad4: 02 80 00 22 be 4001ab5c 4001aad8: 01 00 00 00 nop if ( !iop->handlers ) 4001aadc: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4001aae0: 80 a0 60 00 cmp %g1, 0 4001aae4: 02 80 00 1e be 4001ab5c 4001aae8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 4001aaec: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001aaf0: 80 a0 60 00 cmp %g1, 0 4001aaf4: 02 80 00 20 be 4001ab74 4001aaf8: 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) ); 4001aafc: c0 26 40 00 clr [ %i1 ] 4001ab00: c0 26 60 04 clr [ %i1 + 4 ] 4001ab04: c0 26 60 08 clr [ %i1 + 8 ] 4001ab08: c0 26 60 0c clr [ %i1 + 0xc ] 4001ab0c: c0 26 60 10 clr [ %i1 + 0x10 ] 4001ab10: c0 26 60 14 clr [ %i1 + 0x14 ] 4001ab14: c0 26 60 18 clr [ %i1 + 0x18 ] 4001ab18: c0 26 60 1c clr [ %i1 + 0x1c ] 4001ab1c: c0 26 60 20 clr [ %i1 + 0x20 ] 4001ab20: c0 26 60 24 clr [ %i1 + 0x24 ] 4001ab24: c0 26 60 28 clr [ %i1 + 0x28 ] 4001ab28: c0 26 60 2c clr [ %i1 + 0x2c ] 4001ab2c: c0 26 60 30 clr [ %i1 + 0x30 ] 4001ab30: c0 26 60 34 clr [ %i1 + 0x34 ] 4001ab34: c0 26 60 38 clr [ %i1 + 0x38 ] 4001ab38: c0 26 60 3c clr [ %i1 + 0x3c ] 4001ab3c: c0 26 60 40 clr [ %i1 + 0x40 ] 4001ab40: c0 26 60 44 clr [ %i1 + 0x44 ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 4001ab44: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4001ab48: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001ab4c: 9f c0 40 00 call %g1 4001ab50: 90 02 20 1c add %o0, 0x1c, %o0 } 4001ab54: 81 c7 e0 08 ret 4001ab58: 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 ); 4001ab5c: 7f ff d1 71 call 4000f120 <__errno> 4001ab60: b0 10 3f ff mov -1, %i0 4001ab64: 82 10 20 09 mov 9, %g1 4001ab68: c2 22 00 00 st %g1, [ %o0 ] 4001ab6c: 81 c7 e0 08 ret 4001ab70: 81 e8 00 00 restore if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001ab74: 7f ff d1 6b call 4000f120 <__errno> <== NOT EXECUTED 4001ab78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001ab7c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001ab80: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001ab84: 81 c7 e0 08 ret <== NOT EXECUTED 4001ab88: 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 ); 4001ab8c: 7f ff d1 65 call 4000f120 <__errno> 4001ab90: b0 10 3f ff mov -1, %i0 4001ab94: 82 10 20 0e mov 0xe, %g1 4001ab98: c2 22 00 00 st %g1, [ %o0 ] 4001ab9c: 81 c7 e0 08 ret 4001aba0: 81 e8 00 00 restore 4002ac3c : #include int fsync( int fd ) { 4002ac3c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4002ac40: 03 10 01 a8 sethi %hi(0x4006a000), %g1 4002ac44: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 4006a2c4 4002ac48: 80 a6 00 01 cmp %i0, %g1 4002ac4c: 1a 80 00 19 bcc 4002acb0 4002ac50: 03 10 01 b9 sethi %hi(0x4006e400), %g1 iop = rtems_libio_iop( fd ); 4002ac54: d0 00 60 00 ld [ %g1 ], %o0 4002ac58: 83 2e 20 06 sll %i0, 6, %g1 4002ac5c: b1 2e 20 03 sll %i0, 3, %i0 4002ac60: b0 06 00 01 add %i0, %g1, %i0 4002ac64: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 4002ac68: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 4002ac6c: 80 88 61 00 btst 0x100, %g1 4002ac70: 02 80 00 10 be 4002acb0 4002ac74: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002ac78: 02 80 00 14 be 4002acc8 4002ac7c: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 4002ac80: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4002ac84: 80 a0 60 00 cmp %g1, 0 4002ac88: 02 80 00 0a be 4002acb0 4002ac8c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 4002ac90: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002ac94: 80 a0 60 00 cmp %g1, 0 4002ac98: 02 80 00 12 be 4002ace0 4002ac9c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 4002aca0: 9f c0 40 00 call %g1 4002aca4: 01 00 00 00 nop } 4002aca8: 81 c7 e0 08 ret 4002acac: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 4002acb0: 40 00 67 b3 call 40044b7c <__errno> <== NOT EXECUTED 4002acb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002acb8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002acbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002acc0: 81 c7 e0 08 ret <== NOT EXECUTED 4002acc4: 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 ); 4002acc8: 40 00 67 ad call 40044b7c <__errno> 4002accc: b0 10 3f ff mov -1, %i0 4002acd0: 82 10 20 16 mov 0x16, %g1 4002acd4: c2 22 00 00 st %g1, [ %o0 ] 4002acd8: 81 c7 e0 08 ret 4002acdc: 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 ); 4002ace0: 40 00 67 a7 call 40044b7c <__errno> 4002ace4: b0 10 3f ff mov -1, %i0 4002ace8: 82 10 20 86 mov 0x86, %g1 4002acec: c2 22 00 00 st %g1, [ %o0 ] 4002acf0: 81 c7 e0 08 ret 4002acf4: 81 e8 00 00 restore 4000bcc8 : int ftruncate( int fd, off_t length ) { 4000bcc8: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000bccc: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000bcd0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 ! 4001c814 4000bcd4: 80 a6 00 01 cmp %i0, %g1 4000bcd8: 1a 80 00 2b bcc 4000bd84 4000bcdc: 03 10 00 74 sethi %hi(0x4001d000), %g1 iop = rtems_libio_iop( fd ); 4000bce0: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 4001d12c 4000bce4: 85 2e 20 06 sll %i0, 6, %g2 4000bce8: b1 2e 20 03 sll %i0, 3, %i0 4000bcec: b0 06 00 02 add %i0, %g2, %i0 4000bcf0: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 4000bcf4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000bcf8: 80 88 61 00 btst 0x100, %g1 4000bcfc: 02 80 00 22 be 4000bd84 4000bd00: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000bd04: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000bd08: c2 27 bf ec st %g1, [ %fp + -20 ] 4000bd0c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000bd10: c2 27 bf f0 st %g1, [ %fp + -16 ] 4000bd14: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000bd18: c2 27 bf f4 st %g1, [ %fp + -12 ] 4000bd1c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 4000bd20: c2 27 bf f8 st %g1, [ %fp + -8 ] 4000bd24: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 4000bd28: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000bd2c: 80 a0 60 00 cmp %g1, 0 4000bd30: 02 80 00 21 be 4000bdb4 4000bd34: 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 ) 4000bd38: 9f c0 40 00 call %g1 4000bd3c: 90 07 bf ec add %fp, -20, %o0 4000bd40: 80 a2 20 01 cmp %o0, 1 4000bd44: 02 80 00 22 be 4000bdcc 4000bd48: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000bd4c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000bd50: 80 88 60 04 btst 4, %g1 4000bd54: 02 80 00 12 be 4000bd9c 4000bd58: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 4000bd5c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000bd60: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000bd64: 80 a0 60 00 cmp %g1, 0 4000bd68: 02 80 00 13 be 4000bdb4 4000bd6c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4000bd70: 92 10 00 19 mov %i1, %o1 4000bd74: 9f c0 40 00 call %g1 4000bd78: 94 10 00 1a mov %i2, %o2 } 4000bd7c: 81 c7 e0 08 ret 4000bd80: 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); 4000bd84: 40 00 0c e7 call 4000f120 <__errno> <== NOT EXECUTED 4000bd88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bd8c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4000bd90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bd94: 81 c7 e0 08 ret <== NOT EXECUTED 4000bd98: 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 ); 4000bd9c: 40 00 0c e1 call 4000f120 <__errno> <== NOT EXECUTED 4000bda0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bda4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000bda8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bdac: 81 c7 e0 08 ret <== NOT EXECUTED 4000bdb0: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000bdb4: 40 00 0c db call 4000f120 <__errno> <== NOT EXECUTED 4000bdb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bdbc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000bdc0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bdc4: 81 c7 e0 08 ret <== NOT EXECUTED 4000bdc8: 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 ); 4000bdcc: 40 00 0c d5 call 4000f120 <__errno> 4000bdd0: b0 10 3f ff mov -1, %i0 4000bdd4: 82 10 20 15 mov 0x15, %g1 4000bdd8: c2 22 00 00 st %g1, [ %o0 ] 4000bddc: 81 c7 e0 08 ret 4000bde0: 81 e8 00 00 restore 4005ee70 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4005ee70: 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 ); 4005ee74: 03 10 01 a8 sethi %hi(0x4006a000), %g1 4005ee78: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 4006a2c4 4005ee7c: 80 a6 00 01 cmp %i0, %g1 4005ee80: 1a 80 00 08 bcc 4005eea0 4005ee84: a0 10 20 00 clr %l0 4005ee88: 03 10 01 b9 sethi %hi(0x4006e400), %g1 4005ee8c: e0 00 60 00 ld [ %g1 ], %l0 4005ee90: 83 2e 20 06 sll %i0, 6, %g1 4005ee94: b1 2e 20 03 sll %i0, 3, %i0 4005ee98: b0 06 00 01 add %i0, %g1, %i0 4005ee9c: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4005eea0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4005eea4: c2 27 bf ec st %g1, [ %fp + -20 ] 4005eea8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 4005eeac: c2 27 bf f0 st %g1, [ %fp + -16 ] 4005eeb0: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 4005eeb4: c2 27 bf f4 st %g1, [ %fp + -12 ] 4005eeb8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 4005eebc: c2 27 bf f8 st %g1, [ %fp + -8 ] 4005eec0: c4 04 20 2c ld [ %l0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 4005eec4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4005eec8: 80 a0 60 00 cmp %g1, 0 4005eecc: 02 80 00 17 be 4005ef28 4005eed0: 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 ) 4005eed4: 9f c0 40 00 call %g1 4005eed8: 90 07 bf ec add %fp, -20, %o0 4005eedc: 80 a2 20 01 cmp %o0, 1 4005eee0: 12 80 00 0c bne 4005ef10 4005eee4: 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 ) 4005eee8: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4005eeec: c2 00 60 08 ld [ %g1 + 8 ], %g1 4005eef0: 80 a0 60 00 cmp %g1, 0 4005eef4: 02 80 00 0d be 4005ef28 4005eef8: 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 ); 4005eefc: 92 10 00 19 mov %i1, %o1 4005ef00: 9f c0 40 00 call %g1 4005ef04: 94 10 00 1a mov %i2, %o2 } 4005ef08: 81 c7 e0 08 ret 4005ef0c: 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 ); 4005ef10: 7f ff 97 1b call 40044b7c <__errno> 4005ef14: b0 10 3f ff mov -1, %i0 4005ef18: 82 10 20 14 mov 0x14, %g1 4005ef1c: c2 22 00 00 st %g1, [ %o0 ] 4005ef20: 81 c7 e0 08 ret 4005ef24: 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 ); 4005ef28: 7f ff 97 15 call 40044b7c <__errno> <== NOT EXECUTED 4005ef2c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005ef30: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4005ef34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005ef38: 81 c7 e0 08 ret <== NOT EXECUTED 4005ef3c: 81 e8 00 00 restore <== NOT EXECUTED 4002ae34 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 4002ae34: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 4002ae38: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED return _POSIX_types_Gid; } 4002ae3c: 81 c3 e0 08 retl <== NOT EXECUTED 4002ae40: d0 10 60 32 lduh [ %g1 + 0x32 ], %o0 <== NOT EXECUTED 4002b520 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002b520: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4002b524: 7f ff ff b3 call 4002b3f0 4002b528: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 4002b52c: 11 10 01 7f sethi %hi(0x4005fc00), %o0 4002b530: 13 10 01 a7 sethi %hi(0x40069c00), %o1 4002b534: 90 12 22 48 or %o0, 0x248, %o0 4002b538: 40 00 68 38 call 40045618 4002b53c: 92 12 61 a0 or %o1, 0x1a0, %o1 4002b540: a0 92 20 00 orcc %o0, 0, %l0 4002b544: 12 80 00 0b bne 4002b570 4002b548: 92 10 00 1a mov %i2, %o1 4002b54c: 30 80 00 27 b,a 4002b5e8 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 4002b550: 40 00 7e b5 call 4004b024 4002b554: 92 10 00 18 mov %i0, %o1 4002b558: 80 a0 00 08 cmp %g0, %o0 4002b55c: 82 60 3f ff subx %g0, -1, %g1 } else { match = (grp->gr_gid == gid); } if (match) { 4002b560: 80 a0 60 00 cmp %g1, 0 4002b564: 12 80 00 14 bne 4002b5b4 4002b568: 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)) { 4002b56c: 92 10 00 1a mov %i2, %o1 4002b570: 94 10 00 1b mov %i3, %o2 4002b574: 96 10 00 1c mov %i4, %o3 4002b578: 7f ff fe d1 call 4002b0bc 4002b57c: 90 10 00 10 mov %l0, %o0 4002b580: 80 a2 20 00 cmp %o0, 0 4002b584: 02 80 00 11 be 4002b5c8 4002b588: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 4002b58c: 32 bf ff f1 bne,a 4002b550 4002b590: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 4002b594: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002b598: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4002b59c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002b5a0: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002b5a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b5a8: 02 bf ff f2 be 4002b570 <== NOT EXECUTED 4002b5ac: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4002b5b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002b5b4: 40 00 65 ca call 40044cdc 4002b5b8: b0 10 20 00 clr %i0 *result = grp; 4002b5bc: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002b5c0: 81 c7 e0 08 ret 4002b5c4: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 4002b5c8: 40 00 65 6d call 40044b7c <__errno> <== NOT EXECUTED 4002b5cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b5d0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002b5d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4002b5d8: 40 00 65 c1 call 40044cdc <== NOT EXECUTED 4002b5dc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4002b5e0: 81 c7 e0 08 ret <== NOT EXECUTED 4002b5e4: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 4002b5e8: 40 00 65 65 call 40044b7c <__errno> <== NOT EXECUTED 4002b5ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b5f0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002b5f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4002b5f8: 81 c7 e0 08 ret <== NOT EXECUTED 4002b5fc: 81 e8 00 00 restore <== NOT EXECUTED 4002b23c : return NULL; return p; } struct group *getgrent(void) { 4002b23c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 4002b240: 03 10 01 b8 sethi %hi(0x4006e000), %g1 <== NOT EXECUTED 4002b244: d0 00 60 bc ld [ %g1 + 0xbc ], %o0 ! 4006e0bc <== NOT EXECUTED 4002b248: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b24c: 32 80 00 04 bne,a 4002b25c <== NOT EXECUTED 4002b250: 31 10 01 b8 sethi %hi(0x4006e000), %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } 4002b254: 81 c7 e0 08 ret <== NOT EXECUTED 4002b258: 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)) 4002b25c: 15 10 01 b8 sethi %hi(0x4006e000), %o2 <== NOT EXECUTED 4002b260: 92 16 21 88 or %i0, 0x188, %o1 <== NOT EXECUTED 4002b264: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED 4002b268: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002b26c: 7f ff ff 94 call 4002b0bc <== NOT EXECUTED 4002b270: b0 16 21 88 or %i0, 0x188, %i0 <== NOT EXECUTED 4002b274: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b278: 02 bf ff f7 be 4002b254 <== NOT EXECUTED 4002b27c: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 4002b280: 81 c7 e0 08 ret <== NOT EXECUTED 4002b284: 81 e8 00 00 restore <== NOT EXECUTED 4002b634 : } struct group *getgrgid( gid_t gid ) { 4002b634: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4002b638: 13 10 01 b8 sethi %hi(0x4006e000), %o1 <== NOT EXECUTED 4002b63c: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002b640: 92 12 61 88 or %o1, 0x188, %o1 <== NOT EXECUTED 4002b644: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4002b648: 15 10 01 b8 sethi %hi(0x4006e000), %o2 <== NOT EXECUTED 4002b64c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002b650: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED 4002b654: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 4002b658: 7f ff ff ea call 4002b600 <== NOT EXECUTED 4002b65c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002b660: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b664: 22 80 00 02 be,a 4002b66c <== NOT EXECUTED 4002b668: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002b66c: 81 c7 e0 08 ret <== NOT EXECUTED 4002b670: 81 e8 00 00 restore <== NOT EXECUTED 4002b600 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002b600: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4002b604: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002b608: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4002b60c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002b610: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002b614: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002b618: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4002b61c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 4002b620: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002b624: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002b628: 7f ff ff be call 4002b520 <== NOT EXECUTED 4002b62c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002b630: 01 00 00 00 nop 400255ac : */ pid_t getpid( void ) { return _Objects_Local_node; } 400255ac: 81 c3 e0 08 retl <== NOT EXECUTED 400255b0: 90 10 20 01 mov 1, %o0 ! 1 <== NOT EXECUTED 4002b720 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002b720: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4002b724: 7f ff ff 33 call 4002b3f0 4002b728: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 4002b72c: 11 10 01 7f sethi %hi(0x4005fc00), %o0 4002b730: 13 10 01 a7 sethi %hi(0x40069c00), %o1 4002b734: 90 12 21 90 or %o0, 0x190, %o0 4002b738: 40 00 67 b8 call 40045618 4002b73c: 92 12 61 a0 or %o1, 0x1a0, %o1 4002b740: a0 92 20 00 orcc %o0, 0, %l0 4002b744: 12 80 00 0b bne 4002b770 4002b748: 92 10 00 1a mov %i2, %o1 4002b74c: 30 80 00 27 b,a 4002b7e8 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 4002b750: 40 00 7e 35 call 4004b024 4002b754: 92 10 00 18 mov %i0, %o1 4002b758: 80 a0 00 08 cmp %g0, %o0 4002b75c: 82 60 3f ff subx %g0, -1, %g1 } else { match = (pwd->pw_uid == uid); } if (match) { 4002b760: 80 a0 60 00 cmp %g1, 0 4002b764: 12 80 00 14 bne 4002b7b4 4002b768: 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)) { 4002b76c: 92 10 00 1a mov %i2, %o1 4002b770: 94 10 00 1b mov %i3, %o2 4002b774: 96 10 00 1c mov %i4, %o3 4002b778: 7f ff fe c4 call 4002b288 4002b77c: 90 10 00 10 mov %l0, %o0 4002b780: 80 a2 20 00 cmp %o0, 0 4002b784: 02 80 00 11 be 4002b7c8 4002b788: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 4002b78c: 32 bf ff f1 bne,a 4002b750 4002b790: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 4002b794: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4002b798: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4002b79c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002b7a0: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4002b7a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002b7a8: 02 bf ff f2 be 4002b770 <== NOT EXECUTED 4002b7ac: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4002b7b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002b7b4: 40 00 65 4a call 40044cdc 4002b7b8: b0 10 20 00 clr %i0 *result = pwd; 4002b7bc: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002b7c0: 81 c7 e0 08 ret 4002b7c4: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 4002b7c8: 40 00 64 ed call 40044b7c <__errno> <== NOT EXECUTED 4002b7cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b7d0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002b7d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4002b7d8: 40 00 65 41 call 40044cdc <== NOT EXECUTED 4002b7dc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4002b7e0: 81 c7 e0 08 ret <== NOT EXECUTED 4002b7e4: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 4002b7e8: 40 00 64 e5 call 40044b7c <__errno> <== NOT EXECUTED 4002b7ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002b7f0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002b7f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4002b7f8: 81 c7 e0 08 ret <== NOT EXECUTED 4002b7fc: 81 e8 00 00 restore <== NOT EXECUTED 4002b3a4 : return NULL; return p; } struct passwd *getpwent(void) { 4002b3a4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 4002b3a8: 03 10 01 b7 sethi %hi(0x4006dc00), %g1 <== NOT EXECUTED 4002b3ac: d0 00 63 d4 ld [ %g1 + 0x3d4 ], %o0 ! 4006dfd4 <== NOT EXECUTED 4002b3b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b3b4: 32 80 00 04 bne,a 4002b3c4 <== NOT EXECUTED 4002b3b8: 31 10 01 b8 sethi %hi(0x4006e000), %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } 4002b3bc: 81 c7 e0 08 ret <== NOT EXECUTED 4002b3c0: 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)) 4002b3c4: 15 10 01 b7 sethi %hi(0x4006dc00), %o2 <== NOT EXECUTED 4002b3c8: 92 16 20 a0 or %i0, 0xa0, %o1 <== NOT EXECUTED 4002b3cc: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4002b3d0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002b3d4: 7f ff ff ad call 4002b288 <== NOT EXECUTED 4002b3d8: b0 16 20 a0 or %i0, 0xa0, %i0 <== NOT EXECUTED 4002b3dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b3e0: 02 bf ff f7 be 4002b3bc <== NOT EXECUTED 4002b3e4: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 4002b3e8: 81 c7 e0 08 ret <== NOT EXECUTED 4002b3ec: 81 e8 00 00 restore <== NOT EXECUTED 4002b834 : } struct passwd *getpwuid( uid_t uid ) { 4002b834: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 4002b838: 13 10 01 b8 sethi %hi(0x4006e000), %o1 <== NOT EXECUTED 4002b83c: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002b840: 92 12 60 a0 or %o1, 0xa0, %o1 <== NOT EXECUTED 4002b844: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4002b848: 15 10 01 b7 sethi %hi(0x4006dc00), %o2 <== NOT EXECUTED 4002b84c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002b850: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4002b854: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 4002b858: 7f ff ff ea call 4002b800 <== NOT EXECUTED 4002b85c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002b860: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b864: 22 80 00 02 be,a 4002b86c <== NOT EXECUTED 4002b868: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002b86c: 81 c7 e0 08 ret <== NOT EXECUTED 4002b870: 81 e8 00 00 restore <== NOT EXECUTED 4002b800 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002b800: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4002b804: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002b808: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002b80c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4002b810: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4002b814: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002b818: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4002b81c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 4002b820: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002b824: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002b828: 7f ff ff be call 4002b720 <== NOT EXECUTED 4002b82c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002b830: 01 00 00 00 nop 4000bde4 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4000bde4: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000bde8: 80 a6 20 00 cmp %i0, 0 4000bdec: 02 80 00 11 be 4000be30 4000bdf0: 01 00 00 00 nop { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4000bdf4: 7f ff d8 08 call 40001e14 4000bdf8: 01 00 00 00 nop 4000bdfc: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000be00: 40 00 03 10 call 4000ca40 <_TOD_Get> 4000be04: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 4000be08: 7f ff d8 07 call 40001e24 4000be0c: 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; 4000be10: 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; 4000be14: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 4000be18: 92 10 23 e8 mov 0x3e8, %o1 4000be1c: 40 00 32 54 call 4001876c <.div> 4000be20: c2 26 00 00 st %g1, [ %i0 ] 4000be24: 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; } 4000be28: 81 c7 e0 08 ret 4000be2c: 91 e8 20 00 restore %g0, 0, %o0 void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4000be30: 40 00 0c bc call 4000f120 <__errno> <== NOT EXECUTED 4000be34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000be38: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000be3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4000be40: 81 c7 e0 08 ret <== NOT EXECUTED 4000be44: 81 e8 00 00 restore <== NOT EXECUTED 40008514 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 40008514: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 40008518: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED return _POSIX_types_Uid; } 4000851c: 81 c3 e0 08 retl <== NOT EXECUTED 40008520: d0 10 60 30 lduh [ %g1 + 0x30 ], %o0 <== NOT EXECUTED 400148a8 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 400148a8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 400148ac: e0 06 40 00 ld [ %i1 ], %l0 400148b0: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 400148b4: 82 04 20 54 add %l0, 0x54, %g1 400148b8: 80 a0 80 01 cmp %g2, %g1 400148bc: 12 80 00 30 bne 4001497c 400148c0: 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 ) 400148c4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 400148c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400148cc: 80 a4 00 01 cmp %l0, %g1 400148d0: 02 80 00 31 be 40014994 400148d4: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 400148d8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 400148dc: 80 a0 60 00 cmp %g1, 0 400148e0: 12 80 00 2d bne 40014994 400148e4: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 400148e8: c2 04 20 08 ld [ %l0 + 8 ], %g1 400148ec: 80 a0 60 00 cmp %g1, 0 400148f0: 22 80 00 06 be,a 40014908 400148f4: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 400148f8: 7f ff d3 9e call 40009770 <_Chain_Extract> 400148fc: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40014900: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40014904: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40014908: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4001490c: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40014910: 90 07 bf f8 add %fp, -8, %o0 40014914: 7f ff c1 2c call 40004dc4 40014918: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4001491c: 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) ) { 40014920: 90 10 00 10 mov %l0, %o0 40014924: 7f ff f3 d4 call 40011874 40014928: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4001492c: 80 a2 20 00 cmp %o0, 0 40014930: 12 80 00 11 bne 40014974 40014934: 01 00 00 00 nop 40014938: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4001493c: 80 a0 60 00 cmp %g1, 0 40014940: 12 80 00 0d bne 40014974 40014944: 03 10 00 8b sethi %hi(0x40022c00), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40014948: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 40022fd0 4001494c: c4 06 40 00 ld [ %i1 ], %g2 40014950: c6 00 60 04 ld [ %g1 + 4 ], %g3 40014954: 80 a0 c0 02 cmp %g3, %g2 40014958: 22 80 00 02 be,a 40014960 4001495c: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 40014960: 90 10 00 10 mov %l0, %o0 40014964: 7f ff c0 ed call 40004d18 40014968: b0 10 20 00 clr %i0 4001496c: 81 c7 e0 08 ret 40014970: 81 e8 00 00 restore } return 0; } 40014974: 81 c7 e0 08 ret 40014978: 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 ); 4001497c: 40 00 01 b9 call 40015060 <__errno> 40014980: b0 10 3f ff mov -1, %i0 40014984: 82 10 20 5a mov 0x5a, %g1 40014988: c2 22 00 00 st %g1, [ %o0 ] 4001498c: 81 c7 e0 08 ret 40014990: 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 ); 40014994: 40 00 01 b3 call 40015060 <__errno> 40014998: b0 10 3f ff mov -1, %i0 4001499c: 82 10 20 10 mov 0x10, %g1 400149a0: c2 22 00 00 st %g1, [ %o0 ] 400149a4: 81 c7 e0 08 ret 400149a8: 81 e8 00 00 restore 4002b3f0 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 4002b3f0: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 4002b3f4: 03 10 01 b7 sethi %hi(0x4006dc00), %g1 4002b3f8: c4 48 63 d0 ldsb [ %g1 + 0x3d0 ], %g2 ! 4006dfd0 4002b3fc: 80 a0 a0 00 cmp %g2, 0 4002b400: 02 80 00 04 be 4002b410 4002b404: 84 10 20 01 mov 1, %g2 4002b408: 81 c7 e0 08 ret 4002b40c: 81 e8 00 00 restore return; etc_passwd_initted = 1; mkdir("/etc", 0777); 4002b410: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 4002b414: c4 28 63 d0 stb %g2, [ %g1 + 0x3d0 ] mkdir("/etc", 0777); 4002b418: 11 10 01 7f sethi %hi(0x4005fc00), %o0 4002b41c: 7f ff 76 1f call 40008c98 4002b420: 90 12 21 08 or %o0, 0x108, %o0 ! 4005fd08 <_rodata_start+0x7a8> /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4002b424: 31 10 01 7f sethi %hi(0x4005fc00), %i0 4002b428: 21 10 01 a7 sethi %hi(0x40069c00), %l0 4002b42c: 90 16 21 90 or %i0, 0x190, %o0 4002b430: 40 00 68 7a call 40045618 4002b434: 92 14 21 a0 or %l0, 0x1a0, %o1 4002b438: 80 a2 20 00 cmp %o0, 0 4002b43c: 22 80 00 0d be,a 4002b470 4002b440: 90 16 21 90 or %i0, 0x190, %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); 4002b444: 40 00 66 26 call 40044cdc 4002b448: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 4002b44c: 92 14 21 a0 or %l0, 0x1a0, %o1 4002b450: 21 10 01 7f sethi %hi(0x4005fc00), %l0 4002b454: 40 00 68 71 call 40045618 4002b458: 90 14 22 48 or %l0, 0x248, %o0 ! 4005fe48 <_rodata_start+0x8e8> 4002b45c: 80 a2 20 00 cmp %o0, 0 4002b460: 22 80 00 11 be,a 4002b4a4 4002b464: 90 14 22 48 or %l0, 0x248, %o0 fclose(fp); 4002b468: 40 00 66 1d call 40044cdc <== NOT EXECUTED 4002b46c: 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) { 4002b470: 13 10 01 8c sethi %hi(0x40063000), %o1 4002b474: 40 00 68 69 call 40045618 4002b478: 92 12 63 90 or %o1, 0x390, %o1 ! 40063390 4002b47c: b0 92 20 00 orcc %o0, 0, %i0 4002b480: 02 bf ff f3 be 4002b44c 4002b484: 92 10 20 01 mov 1, %o1 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4002b488: 94 10 20 66 mov 0x66, %o2 4002b48c: 96 10 00 18 mov %i0, %o3 4002b490: 11 10 01 94 sethi %hi(0x40065000), %o0 4002b494: 40 00 6d 41 call 40046998 4002b498: 90 12 20 f8 or %o0, 0xf8, %o0 ! 400650f8 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4002b49c: 10 bf ff ea b 4002b444 4002b4a0: 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) { 4002b4a4: 13 10 01 8c sethi %hi(0x40063000), %o1 4002b4a8: 40 00 68 5c call 40045618 4002b4ac: 92 12 63 90 or %o1, 0x390, %o1 ! 40063390 4002b4b0: b0 92 20 00 orcc %o0, 0, %i0 4002b4b4: 02 bf ff d5 be 4002b408 4002b4b8: 11 10 01 94 sethi %hi(0x40065000), %o0 fprintf( fp, "root:x:0:root\n" 4002b4bc: 92 10 20 01 mov 1, %o1 4002b4c0: 94 10 20 2a mov 0x2a, %o2 4002b4c4: 96 10 00 18 mov %i0, %o3 4002b4c8: 40 00 6d 34 call 40046998 4002b4cc: 90 12 21 60 or %o0, 0x160, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 4002b4d0: 40 00 66 03 call 40044cdc 4002b4d4: 81 e8 00 00 restore 4002b4d8: 01 00 00 00 nop 40007668 : int ioctl( int fd, ioctl_command_t command, ... ) { 40007668: 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 ); 4000766c: 03 10 00 8c sethi %hi(0x40023000), %g1 40007670: c2 00 63 54 ld [ %g1 + 0x354 ], %g1 ! 40023354 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40007674: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40007678: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4000767c: 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 ); 40007680: 80 a6 00 01 cmp %i0, %g1 40007684: 1a 80 00 18 bcc 400076e4 40007688: f4 27 a0 4c st %i2, [ %fp + 0x4c ] iop = rtems_libio_iop( fd ); 4000768c: 03 10 00 8f sethi %hi(0x40023c00), %g1 40007690: d0 00 61 50 ld [ %g1 + 0x150 ], %o0 ! 40023d50 40007694: 83 2e 20 06 sll %i0, 6, %g1 40007698: b1 2e 20 03 sll %i0, 3, %i0 4000769c: b0 06 00 01 add %i0, %g1, %i0 400076a0: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 400076a4: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400076a8: 80 88 61 00 btst 0x100, %g1 400076ac: 02 80 00 0e be 400076e4 400076b0: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 400076b4: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 400076b8: 80 a0 60 00 cmp %g1, 0 400076bc: 02 80 00 0a be 400076e4 400076c0: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 400076c4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400076c8: 80 a0 60 00 cmp %g1, 0 400076cc: 02 80 00 0c be 400076fc 400076d0: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 400076d4: 9f c0 40 00 call %g1 400076d8: 94 10 00 1a mov %i2, %o2 return rc; } 400076dc: 81 c7 e0 08 ret 400076e0: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 400076e4: 40 00 37 6d call 40015498 <__errno> 400076e8: b0 10 3f ff mov -1, %i0 400076ec: 82 10 20 09 mov 9, %g1 400076f0: c2 22 00 00 st %g1, [ %o0 ] 400076f4: 81 c7 e0 08 ret 400076f8: 81 e8 00 00 restore if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400076fc: 40 00 37 67 call 40015498 <__errno> <== NOT EXECUTED 40007700: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007704: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007708: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000770c: 81 c7 e0 08 ret <== NOT EXECUTED 40007710: 81 e8 00 00 restore <== NOT EXECUTED 40004de4 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40004de4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40004de8: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 40004dec: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004df0: 02 80 00 03 be 40004dfc <== NOT EXECUTED 40004df4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40004df8: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40004dfc: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004e00: 02 80 00 0c be 40004e30 <== NOT EXECUTED 40004e04: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED c = tolower (c); 40004e08: 05 10 00 72 sethi %hi(0x4001c800), %g2 <== NOT EXECUTED 40004e0c: c4 00 a1 84 ld [ %g2 + 0x184 ], %g2 ! 4001c984 <__ctype_ptr__> <== NOT EXECUTED 40004e10: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 40004e14: 84 00 80 10 add %g2, %l0, %g2 <== NOT EXECUTED 40004e18: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 40004e1c: 84 08 a0 03 and %g2, 3, %g2 <== NOT EXECUTED 40004e20: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40004e24: 22 80 00 02 be,a 40004e2c <== NOT EXECUTED 40004e28: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED if (c == '\r') { 40004e2c: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 40004e30: 80 a0 a0 0d cmp %g2, 0xd <== NOT EXECUTED 40004e34: 02 80 00 16 be 40004e8c <== NOT EXECUTED 40004e38: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 40004e3c: 02 80 00 41 be 40004f40 <== NOT EXECUTED 40004e40: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004e44: 32 80 00 1a bne,a 40004eac <== NOT EXECUTED 40004e48: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 40004e4c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004e50: 05 10 00 72 sethi %hi(0x4001c800), %g2 <== NOT EXECUTED 40004e54: c4 00 a1 18 ld [ %g2 + 0x118 ], %g2 ! 4001c918 <== NOT EXECUTED 40004e58: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40004e5c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004e60: 16 80 00 09 bge 40004e84 <== NOT EXECUTED 40004e64: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40004e68: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40004e6c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004e70: 12 80 00 39 bne 40004f54 <== NOT EXECUTED 40004e74: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40004e78: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40004e7c: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40004e80: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40004e84: 81 c7 e0 08 ret <== NOT EXECUTED 40004e88: 81 e8 00 00 restore <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 40004e8c: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 40004e90: 02 80 00 04 be 40004ea0 <== NOT EXECUTED 40004e94: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 40004e98: 81 c7 e0 08 ret <== NOT EXECUTED 40004e9c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 40004ea0: 32 80 00 02 bne,a 40004ea8 <== NOT EXECUTED 40004ea4: a0 10 20 0a mov 0xa, %l0 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004ea8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004eac: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004eb0: 22 bf ff e8 be,a 40004e50 <== NOT EXECUTED 40004eb4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40004eb8: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 <== NOT EXECUTED 40004ebc: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004ec0: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004ec4: 22 80 00 43 be,a 40004fd0 <== NOT EXECUTED 40004ec8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40004ecc: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 <== NOT EXECUTED 40004ed0: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004ed4: 22 80 00 2e be,a 40004f8c <== NOT EXECUTED 40004ed8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40004edc: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 <== NOT EXECUTED 40004ee0: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004ee4: 02 bf ff e8 be 40004e84 <== NOT EXECUTED 40004ee8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40004eec: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40004ef0: 02 80 00 2c be 40004fa0 <== NOT EXECUTED 40004ef4: 80 88 60 48 btst 0x48, %g1 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 40004ef8: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 <== NOT EXECUTED 40004efc: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004f00: 02 80 00 07 be 40004f1c <== NOT EXECUTED 40004f04: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 40004f08: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 <== NOT EXECUTED 40004f0c: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 40004f10: 32 bf ff d0 bne,a 40004e50 <== NOT EXECUTED 40004f14: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40004f18: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40004f1c: 12 80 00 18 bne 40004f7c <== NOT EXECUTED 40004f20: 01 00 00 00 nop <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40004f24: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004f28: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40004f2c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40004f30: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40004f34: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 40004f38: 81 c7 e0 08 ret <== NOT EXECUTED 40004f3c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 40004f40: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED 40004f44: 32 bf ff d9 bne,a 40004ea8 <== NOT EXECUTED 40004f48: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004f4c: 10 bf ff d8 b 40004eac <== NOT EXECUTED 40004f50: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 40004f54: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004f58: 7f ff fe f6 call 40004b30 <== NOT EXECUTED 40004f5c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004f60: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004f64: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40004f68: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40004f6c: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40004f70: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40004f74: 81 c7 e0 08 ret <== NOT EXECUTED 40004f78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 40004f7c: 7f ff fe ed call 40004b30 <== NOT EXECUTED 40004f80: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004f84: 10 bf ff e9 b 40004f28 <== NOT EXECUTED 40004f88: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 40004f8c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004f90: 7f ff ff 08 call 40004bb0 <== NOT EXECUTED 40004f94: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 40004f98: 81 c7 e0 08 ret <== NOT EXECUTED 40004f9c: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 40004fa0: 22 80 00 05 be,a 40004fb4 <== NOT EXECUTED 40004fa4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40004fa8: 7f ff fe e2 call 40004b30 <== NOT EXECUTED 40004fac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004fb0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004fb4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40004fb8: 86 10 20 0a mov 0xa, %g3 <== NOT EXECUTED 40004fbc: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED 40004fc0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40004fc4: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 40004fc8: 81 c7 e0 08 ret <== NOT EXECUTED 40004fcc: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 40004fd0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004fd4: 7f ff fe f7 call 40004bb0 <== NOT EXECUTED 40004fd8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 40004fdc: 81 c7 e0 08 ret <== NOT EXECUTED 40004fe0: 81 e8 00 00 restore <== NOT EXECUTED 400255d0 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 400255d0: 81 c3 e0 08 retl <== NOT EXECUTED 400255d4: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 4001ad74 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 4001ad74: 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())) 4001ad78: 03 10 00 75 sethi %hi(0x4001d400), %g1 4001ad7c: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 4001d4a0 <_System_state_Current> 4001ad80: 80 a0 60 03 cmp %g1, 3 4001ad84: 02 80 00 04 be 4001ad94 4001ad88: 03 10 00 70 sethi %hi(0x4001c000), %g1 4001ad8c: 81 c7 e0 08 ret <== NOT EXECUTED 4001ad90: 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) { 4001ad94: 21 10 00 72 sethi %hi(0x4001c800), %l0 4001ad98: e2 00 63 e8 ld [ %g1 + 0x3e8 ], %l1 4001ad9c: c2 04 21 88 ld [ %l0 + 0x188 ], %g1 4001ada0: 80 a0 40 11 cmp %g1, %l1 4001ada4: 02 80 00 05 be 4001adb8 4001ada8: 01 00 00 00 nop _wrapup_reent(_global_impure_ptr); 4001adac: 40 00 01 80 call 4001b3ac <_wrapup_reent> 4001adb0: 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; 4001adb4: e2 24 21 88 st %l1, [ %l0 + 0x188 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 4001adb8: 7f ff d1 32 call 4000f280 4001adbc: d0 04 60 04 ld [ %l1 + 4 ], %o0 fclose (stdout); 4001adc0: c2 04 21 88 ld [ %l0 + 0x188 ], %g1 4001adc4: 7f ff d1 2f call 4000f280 4001adc8: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 4001adcc: c2 04 21 88 ld [ %l0 + 0x188 ], %g1 4001add0: f0 00 60 0c ld [ %g1 + 0xc ], %i0 4001add4: 7f ff d1 2b call 4000f280 4001add8: 81 e8 00 00 restore 4001addc: 01 00 00 00 nop 4002b988 : int link( const char *existing, const char *new ) { 4002b988: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 4002b98c: 40 00 7f a7 call 4004b828 4002b990: 90 10 00 18 mov %i0, %o0 4002b994: a0 07 bf e8 add %fp, -24, %l0 4002b998: 92 10 00 08 mov %o0, %o1 4002b99c: 94 10 20 00 clr %o2 4002b9a0: 90 10 00 18 mov %i0, %o0 4002b9a4: 96 10 00 10 mov %l0, %o3 4002b9a8: 98 10 20 01 mov 1, %o4 4002b9ac: 7f ff 72 51 call 400082f0 4002b9b0: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 4002b9b4: 80 a2 20 00 cmp %o0, 0 4002b9b8: 12 80 00 88 bne 4002bbd8 4002b9bc: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002b9c0: c2 4e 40 00 ldsb [ %i1 ], %g1 4002b9c4: 80 a0 60 5c cmp %g1, 0x5c 4002b9c8: 02 80 00 06 be 4002b9e0 4002b9cc: 80 a0 60 2f cmp %g1, 0x2f 4002b9d0: 02 80 00 04 be 4002b9e0 4002b9d4: 80 a0 60 00 cmp %g1, 0 4002b9d8: 12 80 00 3c bne 4002bac8 4002b9dc: 03 10 01 a9 sethi %hi(0x4006a400), %g1 4002b9e0: 03 10 01 a9 sethi %hi(0x4006a400), %g1 4002b9e4: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 4002b9e8: 90 10 20 01 mov 1, %o0 4002b9ec: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4002b9f0: c4 27 bf d4 st %g2, [ %fp + -44 ] 4002b9f4: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4002b9f8: c4 27 bf d8 st %g2, [ %fp + -40 ] 4002b9fc: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4002ba00: c4 27 bf dc st %g2, [ %fp + -36 ] 4002ba04: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4002ba08: c4 27 bf e0 st %g2, [ %fp + -32 ] 4002ba0c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002ba10: c2 27 bf e4 st %g1, [ %fp + -28 ] if ( !parent_loc.ops->evalformake_h ) { 4002ba14: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002ba18: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002ba1c: 80 a0 60 00 cmp %g1, 0 4002ba20: 02 80 00 60 be 4002bba0 4002ba24: 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 ); 4002ba28: 94 07 bf fc add %fp, -4, %o2 4002ba2c: b2 07 bf d4 add %fp, -44, %i1 4002ba30: 9f c0 40 00 call %g1 4002ba34: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 4002ba38: a2 92 20 00 orcc %o0, 0, %l1 4002ba3c: 12 80 00 4a bne 4002bb64 4002ba40: 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 ) { 4002ba44: c4 07 bf e4 ld [ %fp + -28 ], %g2 4002ba48: 80 a0 80 01 cmp %g2, %g1 4002ba4c: 12 80 00 2c bne 4002bafc 4002ba50: 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 ) { 4002ba54: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4002ba58: 80 a0 60 00 cmp %g1, 0 4002ba5c: 02 80 00 61 be 4002bbe0 4002ba60: 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 ); 4002ba64: 90 10 00 10 mov %l0, %o0 4002ba68: 9f c0 40 00 call %g1 4002ba6c: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &existing_loc ); 4002ba70: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002ba74: 80 a0 60 00 cmp %g1, 0 4002ba78: 02 80 00 08 be 4002ba98 4002ba7c: b0 10 00 08 mov %o0, %i0 4002ba80: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002ba84: 80 a0 60 00 cmp %g1, 0 4002ba88: 22 80 00 05 be,a 4002ba9c 4002ba8c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002ba90: 9f c0 40 00 call %g1 4002ba94: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 4002ba98: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002ba9c: 80 a0 60 00 cmp %g1, 0 4002baa0: 02 80 00 4e be 4002bbd8 4002baa4: 01 00 00 00 nop 4002baa8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002baac: 80 a0 60 00 cmp %g1, 0 4002bab0: 02 80 00 4a be 4002bbd8 4002bab4: 01 00 00 00 nop 4002bab8: 9f c0 40 00 call %g1 4002babc: 90 10 00 19 mov %i1, %o0 return result; } 4002bac0: 81 c7 e0 08 ret 4002bac4: 81 e8 00 00 restore /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002bac8: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 4002bacc: 90 10 20 00 clr %o0 4002bad0: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002bad4: c4 27 bf d4 st %g2, [ %fp + -44 ] 4002bad8: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002badc: c4 27 bf d8 st %g2, [ %fp + -40 ] 4002bae0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4002bae4: c4 27 bf dc st %g2, [ %fp + -36 ] 4002bae8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4002baec: c4 27 bf e0 st %g2, [ %fp + -32 ] 4002baf0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4002baf4: 10 bf ff c8 b 4002ba14 4002baf8: 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 ); 4002bafc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002bb00: 80 a0 60 00 cmp %g1, 0 4002bb04: 22 80 00 09 be,a 4002bb28 4002bb08: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002bb0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002bb10: 80 a0 60 00 cmp %g1, 0 4002bb14: 22 80 00 05 be,a 4002bb28 4002bb18: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002bb1c: 9f c0 40 00 call %g1 4002bb20: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 4002bb24: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002bb28: 80 a0 60 00 cmp %g1, 0 4002bb2c: 02 80 00 08 be 4002bb4c 4002bb30: 01 00 00 00 nop 4002bb34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002bb38: 80 a0 60 00 cmp %g1, 0 4002bb3c: 02 80 00 04 be 4002bb4c 4002bb40: 01 00 00 00 nop 4002bb44: 9f c0 40 00 call %g1 4002bb48: 90 10 00 19 mov %i1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 4002bb4c: 40 00 64 0c call 40044b7c <__errno> 4002bb50: b0 10 3f ff mov -1, %i0 4002bb54: 82 10 20 12 mov 0x12, %g1 4002bb58: c2 22 00 00 st %g1, [ %o0 ] 4002bb5c: 81 c7 e0 08 ret 4002bb60: 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 ); 4002bb64: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002bb68: 80 a0 60 00 cmp %g1, 0 4002bb6c: 02 80 00 08 be 4002bb8c 4002bb70: 01 00 00 00 nop 4002bb74: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002bb78: 80 a0 60 00 cmp %g1, 0 4002bb7c: 02 80 00 04 be 4002bb8c 4002bb80: 01 00 00 00 nop 4002bb84: 9f c0 40 00 call %g1 4002bb88: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 4002bb8c: 40 00 63 fc call 40044b7c <__errno> 4002bb90: b0 10 3f ff mov -1, %i0 4002bb94: e2 22 00 00 st %l1, [ %o0 ] 4002bb98: 81 c7 e0 08 ret 4002bb9c: 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 ); 4002bba0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002bba4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002bba8: 02 80 00 08 be 4002bbc8 <== NOT EXECUTED 4002bbac: 01 00 00 00 nop <== NOT EXECUTED 4002bbb0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002bbb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002bbb8: 02 80 00 04 be 4002bbc8 <== NOT EXECUTED 4002bbbc: 01 00 00 00 nop <== NOT EXECUTED 4002bbc0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002bbc4: 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 ); 4002bbc8: 40 00 63 ed call 40044b7c <__errno> <== NOT EXECUTED 4002bbcc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002bbd0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002bbd4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002bbd8: 81 c7 e0 08 ret 4002bbdc: 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 ); 4002bbe0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002bbe4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002bbe8: 02 80 00 0a be 4002bc10 <== NOT EXECUTED 4002bbec: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002bbf0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002bbf4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002bbf8: 02 80 00 06 be 4002bc10 <== NOT EXECUTED 4002bbfc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002bc00: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002bc04: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002bc08: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 4002bc0c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002bc10: 02 bf ff ee be 4002bbc8 <== NOT EXECUTED 4002bc14: 01 00 00 00 nop <== NOT EXECUTED 4002bc18: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002bc1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002bc20: 02 bf ff ea be 4002bbc8 <== NOT EXECUTED 4002bc24: 01 00 00 00 nop <== NOT EXECUTED 4002bc28: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002bc2c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4002bc30: 30 bf ff e6 b,a 4002bbc8 <== NOT EXECUTED 4001abd0 : off_t lseek( int fd, off_t offset, int whence ) { 4001abd0: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001abd4: 03 10 00 72 sethi %hi(0x4001c800), %g1 4001abd8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 ! 4001c814 off_t lseek( int fd, off_t offset, int whence ) { 4001abdc: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001abe0: 80 a6 00 01 cmp %i0, %g1 4001abe4: 1a 80 00 46 bcc 4001acfc 4001abe8: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 4001abec: 03 10 00 74 sethi %hi(0x4001d000), %g1 4001abf0: e0 00 61 2c ld [ %g1 + 0x12c ], %l0 ! 4001d12c 4001abf4: 83 2e 20 06 sll %i0, 6, %g1 4001abf8: b1 2e 20 03 sll %i0, 3, %i0 4001abfc: b0 06 00 01 add %i0, %g1, %i0 4001ac00: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 4001ac04: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001ac08: 80 88 61 00 btst 0x100, %g1 4001ac0c: 02 80 00 3c be 4001acfc 4001ac10: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 4001ac14: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001ac18: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 4001ac1c: 80 a1 20 00 cmp %g4, 0 4001ac20: 02 80 00 3f be 4001ad1c 4001ac24: 80 a6 e0 01 cmp %i3, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 4001ac28: 02 80 00 27 be 4001acc4 4001ac2c: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 4001ac30: 80 a6 e0 02 cmp %i3, 2 4001ac34: 02 80 00 11 be 4001ac78 4001ac38: 80 a6 e0 00 cmp %i3, 0 4001ac3c: 12 80 00 26 bne 4001acd4 4001ac40: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 4001ac44: 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 ); 4001ac48: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001ac4c: 92 10 00 02 mov %g2, %o1 4001ac50: 94 10 00 03 mov %g3, %o2 4001ac54: 96 10 00 1b mov %i3, %o3 4001ac58: 9f c0 40 00 call %g1 4001ac5c: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 4001ac60: 80 a2 3f ff cmp %o0, -1 4001ac64: 02 80 00 13 be 4001acb0 4001ac68: 80 a2 7f ff cmp %o1, -1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001ac6c: b2 10 00 09 mov %o1, %i1 4001ac70: 81 c7 e0 08 ret 4001ac74: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001ac78: 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 ); 4001ac7c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001ac80: 9a 86 80 0d addcc %i2, %o5, %o5 4001ac84: 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 ); 4001ac88: 92 10 00 02 mov %g2, %o1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 4001ac8c: 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 ); 4001ac90: 94 10 00 03 mov %g3, %o2 4001ac94: 96 10 00 1b mov %i3, %o3 4001ac98: 9f c0 40 00 call %g1 4001ac9c: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 4001aca0: 80 a2 3f ff cmp %o0, -1 4001aca4: 12 bf ff f3 bne 4001ac70 4001aca8: b2 10 00 09 mov %o1, %i1 4001acac: 80 a2 7f ff cmp %o1, -1 4001acb0: 12 bf ff f0 bne 4001ac70 4001acb4: b2 10 00 09 mov %o1, %i1 iop->offset = old_offset; 4001acb8: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001acbc: 81 c7 e0 08 ret 4001acc0: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 4001acc4: 9a 86 80 13 addcc %i2, %l3, %o5 4001acc8: 98 46 40 12 addx %i1, %l2, %o4 break; 4001accc: 10 bf ff df b 4001ac48 4001acd0: 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 ); 4001acd4: 7f ff d1 13 call 4000f120 <__errno> 4001acd8: 01 00 00 00 nop 4001acdc: 82 10 20 16 mov 0x16, %g1 ! 16 4001ace0: c2 22 00 00 st %g1, [ %o0 ] 4001ace4: 11 3f ff ff sethi %hi(0xfffffc00), %o0 4001ace8: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 4001acec: 92 10 00 08 mov %o0, %o1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001acf0: b0 10 00 08 mov %o0, %i0 4001acf4: 81 c7 e0 08 ret 4001acf8: 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); 4001acfc: 7f ff d1 09 call 4000f120 <__errno> <== NOT EXECUTED 4001ad00: 01 00 00 00 nop <== NOT EXECUTED 4001ad04: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4001ad08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001ad0c: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 4001ad10: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 4001ad14: 10 bf ff d6 b 4001ac6c <== NOT EXECUTED 4001ad18: 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 ); 4001ad1c: 7f ff d1 01 call 4000f120 <__errno> <== NOT EXECUTED 4001ad20: 01 00 00 00 nop <== NOT EXECUTED 4001ad24: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001ad28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001ad2c: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 4001ad30: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 4001ad34: 10 bf ff ce b 4001ac6c <== NOT EXECUTED 4001ad38: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002bddc : int _STAT_NAME( const char *path, struct stat *buf ) { 4002bddc: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 4002bde0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4002bde4: 02 80 00 34 be 4002beb4 <== NOT EXECUTED 4002bde8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 4002bdec: 40 00 7e 8f call 4004b828 <== NOT EXECUTED 4002bdf0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002bdf4: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4002bdf8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002bdfc: 94 10 20 00 clr %o2 <== NOT EXECUTED 4002be00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002be04: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4002be08: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002be0c: 7f ff 71 39 call 400082f0 <== NOT EXECUTED 4002be10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 4002be14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002be18: 12 80 00 25 bne 4002beac <== NOT EXECUTED 4002be1c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 4002be20: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 4002be24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002be28: 02 80 00 29 be 4002becc <== NOT EXECUTED 4002be2c: 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) ); 4002be30: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 4002be34: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 4002be38: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4002be3c: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 4002be40: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 4002be44: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 4002be48: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4002be4c: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 4002be50: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4002be54: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 4002be58: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4002be5c: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 4002be60: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 4002be64: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 4002be68: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 4002be6c: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 4002be70: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 4002be74: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 4002be78: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002be7c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002be80: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002be84: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002be88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002be8c: 02 80 00 08 be 4002beac <== NOT EXECUTED 4002be90: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002be94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002be98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002be9c: 02 80 00 1a be 4002bf04 <== NOT EXECUTED 4002bea0: 01 00 00 00 nop <== NOT EXECUTED 4002bea4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002bea8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 4002beac: 81 c7 e0 08 ret <== NOT EXECUTED 4002beb0: 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 ); 4002beb4: 40 00 63 32 call 40044b7c <__errno> <== NOT EXECUTED 4002beb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002bebc: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002bec0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002bec4: 81 c7 e0 08 ret <== NOT EXECUTED 4002bec8: 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 ); 4002becc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002bed0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002bed4: 02 80 00 08 be 4002bef4 <== NOT EXECUTED 4002bed8: 01 00 00 00 nop <== NOT EXECUTED 4002bedc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002bee0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002bee4: 02 80 00 04 be 4002bef4 <== NOT EXECUTED 4002bee8: 01 00 00 00 nop <== NOT EXECUTED 4002beec: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002bef0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002bef4: 40 00 63 22 call 40044b7c <__errno> <== NOT EXECUTED 4002bef8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002befc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002bf00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002bf04: 81 c7 e0 08 ret <== NOT EXECUTED 4002bf08: 81 e8 00 00 restore <== NOT EXECUTED 4000c1fc : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000c1fc: 9d e3 bf a0 save %sp, -96, %sp 4000c200: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000c204: 82 10 61 38 or %g1, 0x138, %g1 ! 4001d138 4000c208: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000c20c: a0 10 00 18 mov %i0, %l0 4000c210: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000c214: 7f ff ff ed call 4000c1c8 4000c218: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 4000c21c: 80 a6 20 00 cmp %i0, 0 4000c220: 02 80 00 25 be 4000c2b4 4000c224: 03 10 00 75 sethi %hi(0x4001d400), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000c228: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 4001d4a0 <_System_state_Current> 4000c22c: 80 a0 60 03 cmp %g1, 3 4000c230: 02 80 00 1c be 4000c2a0 4000c234: 03 10 00 72 sethi %hi(0x4001c800), %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 ); 4000c238: d0 00 60 20 ld [ %g1 + 0x20 ], %o0 ! 4001c820 4000c23c: 92 10 00 10 mov %l0, %o1 4000c240: 94 10 20 00 clr %o2 4000c244: 40 00 03 3a call 4000cf2c <_Protected_heap_Allocate_aligned_with_boundary> 4000c248: 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 ) { 4000c24c: b0 92 20 00 orcc %o0, 0, %i0 4000c250: 02 80 00 1b be 4000c2bc 4000c254: 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 ) 4000c258: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000c25c: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 4001ce50 4000c260: 80 a0 60 00 cmp %g1, 0 4000c264: 02 80 00 05 be 4000c278 4000c268: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000c26c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000c270: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c274: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000c278: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000c27c: c2 00 62 48 ld [ %g1 + 0x248 ], %g1 ! 4001ce48 4000c280: 80 a0 60 00 cmp %g1, 0 4000c284: 02 80 00 05 be 4000c298 4000c288: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000c28c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000c290: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c294: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000c298: 81 c7 e0 08 ret 4000c29c: 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()) && 4000c2a0: 7f ff ff b1 call 4000c164 4000c2a4: 01 00 00 00 nop 4000c2a8: 80 8a 20 ff btst 0xff, %o0 4000c2ac: 12 bf ff e3 bne 4000c238 4000c2b0: 03 10 00 72 sethi %hi(0x4001c800), %g1 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000c2b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c2b8: 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) 4000c2bc: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000c2c0: c2 00 62 4c ld [ %g1 + 0x24c ], %g1 ! 4001ce4c 4000c2c4: 80 a0 60 00 cmp %g1, 0 4000c2c8: 02 80 00 08 be 4000c2e8 4000c2cc: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000c2d0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000c2d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c2d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000c2dc: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000c2e0: 12 bf ff df bne 4000c25c <== NOT EXECUTED 4000c2e4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED errno = ENOMEM; 4000c2e8: 40 00 0b 8e call 4000f120 <__errno> 4000c2ec: 01 00 00 00 nop 4000c2f0: 82 10 20 0c mov 0xc, %g1 ! c 4000c2f4: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4000c2f8: 81 c7 e0 08 ret 4000c2fc: 81 e8 00 00 restore 4000c1ac : 4000c1ac: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4000c1b0: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 4000c1b4: 90 12 21 7c or %o0, 0x17c, %o0 ! 4001d57c <== NOT EXECUTED 4000c1b8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000c1bc: 7f ff ed 25 call 40007650 <_Chain_Append> <== NOT EXECUTED 4000c1c0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000c1c4: 01 00 00 00 nop 4000c1c8 : void malloc_deferred_frees_process(void) { 4000c1c8: 9d e3 bf a0 save %sp, -96, %sp 4000c1cc: 21 10 00 75 sethi %hi(0x4001d400), %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) 4000c1d0: 10 80 00 04 b 4000c1e0 4000c1d4: a0 14 21 7c or %l0, 0x17c, %l0 ! 4001d57c free(to_be_freed); 4000c1d8: 7f ff fe 91 call 4000bc1c <== NOT EXECUTED 4000c1dc: 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 ); 4000c1e0: 40 00 01 98 call 4000c840 <_Chain_Get> 4000c1e4: 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) 4000c1e8: 80 a2 20 00 cmp %o0, 0 4000c1ec: 12 bf ff fb bne 4000c1d8 4000c1f0: 01 00 00 00 nop free(to_be_freed); } 4000c1f4: 81 c7 e0 08 ret 4000c1f8: 81 e8 00 00 restore 400138ac : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 400138ac: 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) ) { 400138b0: 7f ff f7 f1 call 40011874 400138b4: 90 10 00 18 mov %i0, %o0 400138b8: 80 a2 20 00 cmp %o0, 0 400138bc: 12 80 00 13 bne 40013908 400138c0: 01 00 00 00 nop 400138c4: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 400138c8: 80 a0 60 00 cmp %g1, 0 400138cc: 12 80 00 0f bne 40013908 400138d0: 03 10 00 8b sethi %hi(0x40022c00), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 400138d4: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 40022fd0 400138d8: c4 00 60 04 ld [ %g1 + 4 ], %g2 400138dc: 80 a0 80 18 cmp %g2, %i0 400138e0: 22 80 00 02 be,a 400138e8 400138e4: 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) 400138e8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400138ec: 80 a0 60 06 cmp %g1, 6 400138f0: 02 80 00 04 be 40013900 400138f4: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 400138f8: 7f ff ff 7a call 400136e0 400138fc: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 40013900: 7f ff c5 06 call 40004d18 40013904: 90 10 00 18 mov %i0, %o0 } return 0; } 40013908: 81 c7 e0 08 ret 4001390c: 91 e8 20 00 restore %g0, 0, %o0 40013600 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40013600: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 40013604: 80 a6 20 00 cmp %i0, 0 40013608: 02 80 00 16 be 40013660 4001360c: 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 40013614: d0 06 00 00 ld [ %i0 ], %o0 40013618: a0 10 00 08 mov %o0, %l0 4001361c: a2 10 20 00 clr %l1 if ( b[i] ) { 40013620: d0 04 00 00 ld [ %l0 ], %o0 40013624: 80 a2 20 00 cmp %o0, 0 40013628: 02 80 00 05 be 4001363c 4001362c: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40013630: 7f ff ff 2f call 400132ec 40013634: 01 00 00 00 nop b[i] = 0; 40013638: 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 40013644: a0 04 20 04 add %l0, 4, %l0 40013648: 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 ); 4001364c: 7f ff ff 28 call 400132ec 40013650: 01 00 00 00 nop *block_table = 0; 40013654: c0 26 00 00 clr [ %i0 ] } 40013658: 81 c7 e0 08 ret 4001365c: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 40013660: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013664: 15 10 00 89 sethi %hi(0x40022400), %o2 <== NOT EXECUTED 40013668: 17 10 00 89 sethi %hi(0x40022400), %o3 <== NOT EXECUTED 4001366c: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013670: 94 12 a2 80 or %o2, 0x280, %o2 <== NOT EXECUTED 40013674: 96 12 e1 98 or %o3, 0x198, %o3 <== NOT EXECUTED 40013678: 7f ff c4 6f call 40004834 <__assert_func> <== NOT EXECUTED 4001367c: 92 10 21 b3 mov 0x1b3, %o1 <== NOT EXECUTED 40013680: 01 00 00 00 nop 40013bd8 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 40013bd8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40013bdc: 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 ) 40013be0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40013be4: 80 a0 40 19 cmp %g1, %i1 40013be8: 16 80 00 07 bge 40013c04 40013bec: 90 10 00 10 mov %l0, %o0 return IMFS_memfile_extend( the_jnode, length ); 40013bf0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40013bf4: 7f ff ff 91 call 40013a38 <== NOT EXECUTED 40013bf8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40013bfc: 81 c7 e0 08 ret <== NOT EXECUTED 40013c00: 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 ) 40013c04: 22 80 00 0d be,a 40013c38 40013c08: 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; 40013c0c: f2 24 20 50 st %i1, [ %l0 + 0x50 ] <== NOT EXECUTED 40013c10: f4 24 20 54 st %i2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 40013c14: f4 26 20 0c st %i2, [ %i0 + 0xc ] 40013c18: f2 26 20 08 st %i1, [ %i0 + 8 ] IMFS_update_atime( the_jnode ); 40013c1c: 90 07 bf f8 add %fp, -8, %o0 40013c20: 7f ff c4 69 call 40004dc4 40013c24: 92 10 20 00 clr %o1 40013c28: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013c2c: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 40013c30: 81 c7 e0 08 ret 40013c34: 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 ) 40013c38: 80 a0 40 1a cmp %g1, %i2 40013c3c: 3a bf ff f5 bcc,a 40013c10 40013c40: f2 24 20 50 st %i1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 40013c44: 10 bf ff eb b 40013bf0 <== NOT EXECUTED 40013c48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40013c4c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 40013c4c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40013c50: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 40013c54: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013c58: 80 a0 60 06 cmp %g1, 6 40013c5c: 02 80 00 0f be 40013c98 40013c60: 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 )) 40013c64: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 40013c68: 92 10 00 02 mov %g2, %o1 40013c6c: 7f ff ff 73 call 40013a38 40013c70: 94 10 00 03 mov %g3, %o2 40013c74: 80 a2 20 00 cmp %o0, 0 40013c78: 12 80 00 1b bne 40013ce4 40013c7c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 40013c80: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 40013c84: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 40013c88: d8 3e 20 08 std %o4, [ %i0 + 8 ] } return iop->offset; } 40013c8c: b2 10 00 03 mov %g3, %i1 40013c90: 81 c7 e0 08 ret 40013c94: 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) 40013c98: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 40013c9c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40013ca0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40013ca4: 14 80 00 0c bg 40013cd4 <== NOT EXECUTED 40013ca8: c8 06 20 14 ld [ %i0 + 0x14 ], %g4 <== NOT EXECUTED 40013cac: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40013cb0: 02 80 00 07 be 40013ccc <== NOT EXECUTED 40013cb4: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 40013cb8: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 40013cbc: 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; } 40013cc0: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 40013cc4: 81 c7 e0 08 ret <== NOT EXECUTED 40013cc8: 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) 40013ccc: 28 bf ff fc bleu,a 40013cbc <== NOT EXECUTED 40013cd0: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 40013cd4: 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; } 40013cd8: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 40013cdc: 81 c7 e0 08 ret <== NOT EXECUTED 40013ce0: 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 ); 40013ce4: 40 00 04 df call 40015060 <__errno> <== NOT EXECUTED 40013ce8: 01 00 00 00 nop <== NOT EXECUTED 40013cec: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40013cf0: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 40013cf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013cf8: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 40013cfc: 10 bf ff e4 b 40013c8c <== NOT EXECUTED 40013d00: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 40013fd0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40013fd0: 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)) 40013fd4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40013fd8: 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)) 40013fdc: 80 88 62 04 btst 0x204, %g1 40013fe0: 02 80 00 06 be 40013ff8 40013fe4: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 && (the_jnode->type == IMFS_LINEAR_FILE)) { 40013fe8: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40013fec: 80 a0 a0 06 cmp %g2, 6 40013ff0: 22 80 00 0c be,a 40014020 40013ff4: 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) 40013ff8: 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) 40013ffc: 80 88 62 00 btst 0x200, %g1 40014000: 22 80 00 05 be,a 40014014 40014004: c4 3c 20 08 std %g2, [ %l0 + 8 ] iop->offset = the_jnode->info.file.size; 40014008: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] 4001400c: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2 iop->size = the_jnode->info.file.size; 40014010: c4 3c 20 08 std %g2, [ %l0 + 8 ] 40014014: b0 10 20 00 clr %i0 return 0; } 40014018: 81 c7 e0 08 ret 4001401c: 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; 40014020: d6 04 60 58 ld [ %l1 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 40014024: 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; 40014028: 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; 4001402c: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED 40014030: 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; 40014034: 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; 40014038: 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) 4001403c: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 40014040: 12 80 00 06 bne 40014058 <== NOT EXECUTED 40014044: c2 24 60 48 st %g1, [ %l1 + 0x48 ] <== NOT EXECUTED 40014048: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 4001404c: 84 10 20 00 clr %g2 <== NOT EXECUTED 40014050: 10 bf ff eb b 40013ffc <== NOT EXECUTED 40014054: 86 10 20 00 clr %g3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 40014058: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4001405c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40014060: 94 10 20 00 clr %o2 <== NOT EXECUTED 40014064: 7f ff ff 28 call 40013d04 <== NOT EXECUTED 40014068: 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) 4001406c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40014070: 02 bf ff ea be 40014018 <== NOT EXECUTED 40014074: 01 00 00 00 nop <== NOT EXECUTED 40014078: 10 bf ff e0 b 40013ff8 <== NOT EXECUTED 4001407c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 40013910 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40013910: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40013914: 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 ) { 40013918: c2 04 20 08 ld [ %l0 + 8 ], %g1 4001391c: 80 a0 60 00 cmp %g1, 0 40013920: 22 80 00 06 be,a 40013938 40013924: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 40013928: 7f ff d7 92 call 40009770 <_Chain_Extract> 4001392c: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40013930: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40013934: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40013938: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4001393c: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40013940: 90 07 bf f8 add %fp, -8, %o0 40013944: 7f ff c5 20 call 40004dc4 40013948: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4001394c: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 40013950: 90 10 00 10 mov %l0, %o0 40013954: 7f ff ff d6 call 400138ac 40013958: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } 4001395c: 81 c7 e0 08 ret 40013960: 91 e8 00 08 restore %g0, %o0, %o0 4000aa10 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000aa10: 13 10 00 6f sethi %hi(0x4001bc00), %o1 4000aa14: 15 10 00 6f sethi %hi(0x4001bc00), %o2 4000aa18: 92 12 60 ec or %o1, 0xec, %o1 4000aa1c: 94 12 a2 b0 or %o2, 0x2b0, %o2 4000aa20: 96 10 00 0a mov %o2, %o3 4000aa24: 82 13 c0 00 mov %o7, %g1 4000aa28: 40 00 03 59 call 4000b78c 4000aa2c: 9e 10 40 00 mov %g1, %o7 4000aa30: 01 00 00 00 nop <== NOT EXECUTED 400036d0 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400036d0: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 400036d4: 03 00 00 3c sethi %hi(0xf000), %g1 400036d8: b3 2e 60 10 sll %i1, 0x10, %i1 400036dc: b3 36 60 10 srl %i1, 0x10, %i1 400036e0: 80 8e 40 01 btst %i1, %g1 400036e4: 02 80 00 4f be 40003820 400036e8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400036ec: c2 4e 00 00 ldsb [ %i0 ], %g1 400036f0: 80 a0 60 5c cmp %g1, 0x5c 400036f4: 02 80 00 1c be 40003764 400036f8: 80 a0 60 2f cmp %g1, 0x2f 400036fc: 02 80 00 1a be 40003764 40003700: 80 a0 60 00 cmp %g1, 0 40003704: 02 80 00 19 be 40003768 40003708: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000370c: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001c928 40003710: c4 00 60 04 ld [ %g1 + 4 ], %g2 40003714: c4 27 bf e8 st %g2, [ %fp + -24 ] 40003718: c4 00 60 08 ld [ %g1 + 8 ], %g2 4000371c: c4 27 bf ec st %g2, [ %fp + -20 ] 40003720: c4 00 60 0c ld [ %g1 + 0xc ], %g2 40003724: c4 27 bf f0 st %g2, [ %fp + -16 ] 40003728: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000372c: c4 27 bf f4 st %g2, [ %fp + -12 ] 40003730: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40003734: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !temp_loc.ops->evalformake_h ) { 40003738: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000373c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003740: 80 a0 60 00 cmp %g1, 0 40003744: 12 80 00 19 bne 400037a8 40003748: 90 10 20 00 clr %o0 if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000374c: 40 00 2e 75 call 4000f120 <__errno> <== NOT EXECUTED 40003750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003754: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000375c: 81 c7 e0 08 ret 40003760: 81 e8 00 00 restore int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40003764: 03 10 00 72 sethi %hi(0x4001c800), %g1 40003768: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001c928 4000376c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40003770: c4 27 bf e8 st %g2, [ %fp + -24 ] 40003774: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40003778: c4 27 bf ec st %g2, [ %fp + -20 ] 4000377c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 40003780: c4 27 bf f0 st %g2, [ %fp + -16 ] 40003784: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 40003788: c4 27 bf f4 st %g2, [ %fp + -12 ] 4000378c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40003790: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !temp_loc.ops->evalformake_h ) { 40003794: c2 07 bf f4 ld [ %fp + -12 ], %g1 40003798: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000379c: 80 a0 60 00 cmp %g1, 0 400037a0: 02 bf ff eb be 4000374c 400037a4: 90 10 20 01 mov 1, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 400037a8: 90 06 00 08 add %i0, %o0, %o0 400037ac: a0 07 bf e8 add %fp, -24, %l0 400037b0: 94 07 bf fc add %fp, -4, %o2 400037b4: 92 10 00 10 mov %l0, %o1 400037b8: 9f c0 40 00 call %g1 400037bc: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 400037c0: 80 a2 20 00 cmp %o0, 0 400037c4: 12 bf ff e6 bne 4000375c 400037c8: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !temp_loc.ops->mknod_h ) { 400037cc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 400037d0: 80 a0 60 00 cmp %g1, 0 400037d4: 02 80 00 19 be 40003838 400037d8: d0 07 bf fc ld [ %fp + -4 ], %o0 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 400037dc: 92 10 00 19 mov %i1, %o1 400037e0: 94 10 00 1a mov %i2, %o2 400037e4: 96 10 00 1b mov %i3, %o3 400037e8: 9f c0 40 00 call %g1 400037ec: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400037f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400037f4: 80 a0 60 00 cmp %g1, 0 400037f8: 02 bf ff d9 be 4000375c 400037fc: b0 10 00 08 mov %o0, %i0 40003800: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003804: 80 a0 60 00 cmp %g1, 0 40003808: 02 80 00 0a be 40003830 4000380c: 01 00 00 00 nop 40003810: 9f c0 40 00 call %g1 40003814: 90 10 00 10 mov %l0, %o0 return result; } 40003818: 81 c7 e0 08 ret 4000381c: 81 e8 00 00 restore int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40003820: 40 00 2e 40 call 4000f120 <__errno> <== NOT EXECUTED 40003824: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003828: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000382c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003830: 81 c7 e0 08 ret 40003834: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 40003838: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000383c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003840: 02 bf ff c3 be 4000374c <== NOT EXECUTED 40003844: 01 00 00 00 nop <== NOT EXECUTED 40003848: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000384c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003850: 30 bf ff bf b,a 4000374c <== NOT EXECUTED 40003874 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 40003874: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 40003878: 80 a6 60 00 cmp %i1, 0 4000387c: 02 80 00 94 be 40003acc 40003880: a0 10 00 18 mov %i0, %l0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 40003884: 80 a6 a0 01 cmp %i2, 1 40003888: 18 80 00 91 bgu 40003acc 4000388c: 01 00 00 00 nop errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 40003890: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40003894: 80 a0 60 00 cmp %g1, 0 40003898: 02 80 00 98 be 40003af8 4000389c: 80 a6 e0 00 cmp %i3, 0 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 400038a0: 02 80 00 05 be 400038b4 400038a4: 90 10 20 6c mov 0x6c, %o0 size += strlen( device ) + 1; 400038a8: 40 00 31 d5 call 4000fffc <== NOT EXECUTED 400038ac: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 400038b0: 90 02 20 6d add %o0, 0x6d, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 400038b4: 40 00 22 52 call 4000c1fc 400038b8: 01 00 00 00 nop if ( !temp_mt_entry ) { 400038bc: a2 92 20 00 orcc %o0, 0, %l1 400038c0: 02 80 00 97 be 40003b1c 400038c4: a6 10 00 11 mov %l1, %l3 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 400038c8: f4 24 60 30 st %i2, [ %l1 + 0x30 ] if ( device ) { 400038cc: 80 a6 e0 00 cmp %i3, 0 400038d0: 02 80 00 7d be 40003ac4 400038d4: e2 24 60 2c st %l1, [ %l1 + 0x2c ] temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 400038d8: 90 04 60 6c add %l1, 0x6c, %o0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 400038dc: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 400038e0: 40 00 31 a4 call 4000ff70 <== NOT EXECUTED 400038e4: d0 24 60 68 st %o0, [ %l1 + 0x68 ] <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 400038e8: 80 a7 20 00 cmp %i4, 0 400038ec: 22 80 00 6e be,a 40003aa4 400038f0: c0 24 60 1c clr [ %l1 + 0x1c ] if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 400038f4: 40 00 31 c2 call 4000fffc 400038f8: 90 10 00 1c mov %i4, %o0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 400038fc: a4 07 bf ec add %fp, -20, %l2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 40003900: 92 10 00 08 mov %o0, %o1 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 40003904: 94 10 20 07 mov 7, %o2 40003908: 90 10 00 1c mov %i4, %o0 4000390c: 96 10 00 12 mov %l2, %o3 40003910: 7f ff fe b7 call 400033ec 40003914: 98 10 20 01 mov 1, %o4 40003918: 80 a2 3f ff cmp %o0, -1 4000391c: 02 80 00 7b be 40003b08 40003920: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 40003924: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40003928: 80 a0 60 00 cmp %g1, 0 4000392c: 02 80 00 46 be 40003a44 40003930: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40003934: 9f c0 40 00 call %g1 40003938: 90 10 00 12 mov %l2, %o0 4000393c: 80 a2 20 01 cmp %o0, 1 40003940: 12 80 00 69 bne 40003ae4 40003944: 09 10 00 74 sethi %hi(0x4001d000), %g4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40003948: c2 01 21 68 ld [ %g4 + 0x168 ], %g1 ! 4001d168 4000394c: 88 11 21 68 or %g4, 0x168, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40003950: 88 01 20 04 add %g4, 4, %g4 40003954: 80 a0 40 04 cmp %g1, %g4 40003958: 02 80 00 0e be 40003990 4000395c: c6 07 bf ec ld [ %fp + -20 ], %g3 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 40003960: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40003964: 80 a0 80 03 cmp %g2, %g3 40003968: 32 80 00 07 bne,a 40003984 4000396c: c2 00 40 00 ld [ %g1 ], %g1 40003970: 30 80 00 48 b,a 40003a90 <== NOT EXECUTED 40003974: 80 a0 80 03 cmp %g2, %g3 40003978: 02 80 00 46 be 40003a90 4000397c: 01 00 00 00 nop * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 40003980: c2 00 40 00 ld [ %g1 ], %g1 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40003984: 80 a0 40 04 cmp %g1, %g4 40003988: 32 bf ff fb bne,a 40003974 4000398c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 40003990: c6 24 60 08 st %g3, [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = loc.handlers; 40003994: c6 07 bf f4 ld [ %fp + -12 ], %g3 temp_mt_entry->mt_point_node.ops = loc.ops; 40003998: c4 07 bf f8 ld [ %fp + -8 ], %g2 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 4000399c: c6 24 60 10 st %g3, [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 400039a0: c6 07 bf fc ld [ %fp + -4 ], %g3 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 400039a4: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 400039a8: c6 24 60 18 st %g3, [ %l1 + 0x18 ] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 400039ac: 80 a0 60 00 cmp %g1, 0 400039b0: 02 80 00 25 be 40003a44 400039b4: c4 24 60 14 st %g2, [ %l1 + 0x14 ] errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 400039b8: 90 10 00 11 mov %l1, %o0 400039bc: 9f c0 40 00 call %g1 400039c0: a6 10 00 12 mov %l2, %l3 400039c4: 80 a2 20 00 cmp %o0, 0 400039c8: 12 80 00 24 bne 40003a58 400039cc: 90 10 00 11 mov %l1, %o0 temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 400039d0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 400039d4: 9f c0 40 00 call %g1 400039d8: 90 10 00 11 mov %l1, %o0 400039dc: 80 a2 20 00 cmp %o0, 0 400039e0: 12 80 00 0b bne 40003a0c 400039e4: 11 10 00 74 sethi %hi(0x4001d000), %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 400039e8: 92 10 00 11 mov %l1, %o1 400039ec: 40 00 0f 19 call 40007650 <_Chain_Append> 400039f0: 90 12 21 68 or %o0, 0x168, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 400039f4: 80 a4 20 00 cmp %l0, 0 400039f8: 02 80 00 03 be 40003a04 400039fc: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 40003a00: e2 24 00 00 st %l1, [ %l0 ] 40003a04: 81 c7 e0 08 ret 40003a08: 81 e8 00 00 restore temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 40003a0c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40003a10: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 40003a14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003a18: 02 80 00 04 be 40003a28 <== NOT EXECUTED 40003a1c: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 40003a20: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003a24: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40003a28: 40 00 20 7d call 4000bc1c <== NOT EXECUTED 40003a2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( loc_to_free ) 40003a30: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40003a34: 32 80 00 0c bne,a 40003a64 <== NOT EXECUTED 40003a38: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); return -1; } 40003a3c: 81 c7 e0 08 ret <== NOT EXECUTED 40003a40: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 40003a44: 40 00 2d b7 call 4000f120 <__errno> <== NOT EXECUTED 40003a48: 01 00 00 00 nop <== NOT EXECUTED 40003a4c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40003a50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40003a54: 90 10 00 11 mov %l1, %o0 40003a58: 40 00 20 71 call 4000bc1c 40003a5c: a6 10 00 12 mov %l2, %l3 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 40003a60: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40003a64: 80 a0 60 00 cmp %g1, 0 40003a68: 02 bf ff e7 be 40003a04 40003a6c: b0 10 3f ff mov -1, %i0 40003a70: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003a74: 80 a0 60 00 cmp %g1, 0 40003a78: 02 bf ff e3 be 40003a04 40003a7c: 90 10 00 13 mov %l3, %o0 40003a80: 9f c0 40 00 call %g1 40003a84: 01 00 00 00 nop 40003a88: 81 c7 e0 08 ret 40003a8c: 81 e8 00 00 restore /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 40003a90: 40 00 2d a4 call 4000f120 <__errno> 40003a94: 01 00 00 00 nop 40003a98: 82 10 20 10 mov 0x10, %g1 ! 10 goto cleanup_and_bail; 40003a9c: 10 bf ff ee b 40003a54 40003aa0: c2 22 00 00 st %g1, [ %o0 ] * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; temp_mt_entry->mt_fs_root.handlers = NULL; 40003aa4: c0 24 60 24 clr [ %l1 + 0x24 ] temp_mt_entry->mt_fs_root.ops = NULL; 40003aa8: c0 24 60 28 clr [ %l1 + 0x28 ] temp_mt_entry->mt_point_node.node_access = NULL; 40003aac: c0 24 60 08 clr [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 40003ab0: c0 24 60 10 clr [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = NULL; 40003ab4: c0 24 60 14 clr [ %l1 + 0x14 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 40003ab8: c0 24 60 18 clr [ %l1 + 0x18 ] 40003abc: 10 bf ff c5 b 400039d0 40003ac0: a6 10 20 00 clr %l3 if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 40003ac4: 10 bf ff 89 b 400038e8 40003ac8: c0 24 60 68 clr [ %l1 + 0x68 ] * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 40003acc: 40 00 2d 95 call 4000f120 <__errno> 40003ad0: b0 10 3f ff mov -1, %i0 40003ad4: 82 10 20 16 mov 0x16, %g1 40003ad8: c2 22 00 00 st %g1, [ %o0 ] return -1; 40003adc: 81 c7 e0 08 ret 40003ae0: 81 e8 00 00 restore /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 40003ae4: 40 00 2d 8f call 4000f120 <__errno> 40003ae8: 01 00 00 00 nop 40003aec: 82 10 20 14 mov 0x14, %g1 ! 14 goto cleanup_and_bail; 40003af0: 10 bf ff d9 b 40003a54 40003af4: c2 22 00 00 st %g1, [ %o0 ] return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 40003af8: 40 00 2d 8a call 4000f120 <__errno> <== NOT EXECUTED 40003afc: a6 10 20 00 clr %l3 <== NOT EXECUTED 40003b00: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003b04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40003b08: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40003b0c: 40 00 20 44 call 4000bc1c <== NOT EXECUTED 40003b10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003b14: 81 c7 e0 08 ret <== NOT EXECUTED 40003b18: 81 e8 00 00 restore <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 40003b1c: 40 00 2d 81 call 4000f120 <__errno> <== NOT EXECUTED 40003b20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003b24: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40003b28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 40003b2c: 81 c7 e0 08 ret <== NOT EXECUTED 40003b30: 81 e8 00 00 restore <== NOT EXECUTED 40003ba4 : */ int newlib_free_buffers( FILE *fp ) { 40003ba4: 9d e3 bf a0 save %sp, -96, %sp switch ( fileno(fp) ) { 40003ba8: 40 00 2e 77 call 4000f584 40003bac: 90 10 00 18 mov %i0, %o0 40003bb0: 80 a2 20 02 cmp %o0, 2 40003bb4: 28 80 00 06 bleu,a 40003bcc 40003bb8: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 40003bbc: 40 00 2d b1 call 4000f280 <== NOT EXECUTED 40003bc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 40003bc4: 81 c7 e0 08 ret 40003bc8: 91 e8 20 00 restore %g0, 0, %o0 { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 40003bcc: 80 88 60 80 btst 0x80, %g1 40003bd0: 02 bf ff fd be 40003bc4 40003bd4: 01 00 00 00 nop free( fp->_bf._base ); 40003bd8: 40 00 20 11 call 4000bc1c <== NOT EXECUTED 40003bdc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 40003be0: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 40003be4: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40003be8: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 40003bec: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40003bf0: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED break; default: fclose(fp); } return 0; } 40003bf4: 81 c7 e0 08 ret <== NOT EXECUTED 40003bf8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40003c44 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 40003c44: 9d e3 bf a0 save %sp, -96, %sp rtems_device_driver status; if ( !initialized ) { 40003c48: 03 10 00 87 sethi %hi(0x40021c00), %g1 40003c4c: c4 48 62 e0 ldsb [ %g1 + 0x2e0 ], %g2 ! 40021ee0 40003c50: 80 a0 a0 00 cmp %g2, 0 40003c54: 02 80 00 04 be 40003c64 40003c58: 84 10 20 01 mov 1, %g2 NULL_major = major; } return RTEMS_SUCCESSFUL; } 40003c5c: 81 c7 e0 08 ret 40003c60: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 40003c64: 11 10 00 7f sethi %hi(0x4001fc00), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 40003c68: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] status = rtems_io_register_name( 40003c6c: 90 12 22 d0 or %o0, 0x2d0, %o0 40003c70: 92 10 00 18 mov %i0, %o1 40003c74: 40 00 00 51 call 40003db8 40003c78: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40003c7c: 80 a2 20 00 cmp %o0, 0 40003c80: 12 80 00 05 bne 40003c94 40003c84: 03 10 00 88 sethi %hi(0x40022000), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 40003c88: f0 20 61 c8 st %i0, [ %g1 + 0x1c8 ] ! 400221c8 } return RTEMS_SUCCESSFUL; } 40003c8c: 81 c7 e0 08 ret 40003c90: 91 e8 20 00 restore %g0, 0, %o0 major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 40003c94: 40 00 11 a8 call 40008334 <== NOT EXECUTED 40003c98: 01 00 00 00 nop 40003c9c: 01 00 00 00 nop 40003c20 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 40003c20: 80 a2 a0 00 cmp %o2, 0 40003c24: 02 80 00 04 be 40003c34 40003c28: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 40003c2c: c2 02 a0 14 ld [ %o2 + 0x14 ], %g1 <== NOT EXECUTED 40003c30: c2 22 a0 1c st %g1, [ %o2 + 0x1c ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 40003c34: 81 c3 e0 08 retl 40003c38: 90 10 20 00 clr %o0 40003e44 : int open( const char *pathname, int flags, ... ) { 40003e44: 9d e3 bf 88 save %sp, -120, %sp eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); 40003e48: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40003e4c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40003e50: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40003e54: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40003e58: a2 06 60 01 add %i1, 1, %l1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40003e5c: 80 8c 60 02 btst 2, %l1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40003e60: a2 0c 60 01 and %l1, 1, %l1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40003e64: 02 80 00 03 be 40003e70 40003e68: a3 2c 60 02 sll %l1, 2, %l1 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40003e6c: a2 14 60 02 or %l1, 2, %l1 va_start(ap, flags); mode = va_arg( ap, int ); 40003e70: 82 07 a0 50 add %fp, 0x50, %g1 40003e74: e4 07 a0 4c ld [ %fp + 0x4c ], %l2 40003e78: c2 27 bf fc st %g1, [ %fp + -4 ] * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 40003e7c: 40 00 20 6c call 4000c02c 40003e80: a6 10 20 17 mov 0x17, %l3 if ( iop == 0 ) { 40003e84: a0 92 20 00 orcc %o0, 0, %l0 40003e88: 02 80 00 6c be 40004038 40003e8c: 01 00 00 00 nop /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 40003e90: 40 00 30 5b call 4000fffc 40003e94: 90 10 00 18 mov %i0, %o0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40003e98: 94 10 00 11 mov %l1, %o2 pathname, strlen( pathname ), eval_flags, &loc, true ); 40003e9c: 92 10 00 08 mov %o0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40003ea0: a2 07 bf e8 add %fp, -24, %l1 40003ea4: 90 10 00 18 mov %i0, %o0 40003ea8: 96 10 00 11 mov %l1, %o3 40003eac: 7f ff fd 50 call 400033ec 40003eb0: 98 10 20 01 mov 1, %o4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 40003eb4: 80 a2 3f ff cmp %o0, -1 40003eb8: 02 80 00 65 be 4000404c 40003ebc: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 40003ec0: a6 10 20 11 mov 0x11, %l3 40003ec4: 80 a0 6a 00 cmp %g1, 0xa00 40003ec8: 02 80 00 4a be 40003ff0 40003ecc: a8 10 00 11 mov %l1, %l4 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003ed0: c2 07 bf f0 ld [ %fp + -16 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003ed4: e6 04 20 18 ld [ %l0 + 0x18 ], %l3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003ed8: c2 24 20 40 st %g1, [ %l0 + 0x40 ] iop->file_info = loc.node_access; 40003edc: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 40003ee0: 90 10 00 19 mov %i1, %o0 40003ee4: 40 00 20 93 call 4000c130 40003ee8: c2 24 20 3c st %g1, [ %l0 + 0x3c ] iop->pathinfo = loc; 40003eec: c4 07 bf e8 ld [ %fp + -24 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40003ef0: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 40003ef4: c4 24 20 1c st %g2, [ %l0 + 0x1c ] 40003ef8: c4 07 bf ec ld [ %fp + -20 ], %g2 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003efc: 90 12 00 13 or %o0, %l3, %o0 iop->pathinfo = loc; 40003f00: c4 24 20 20 st %g2, [ %l0 + 0x20 ] 40003f04: c4 07 bf f0 ld [ %fp + -16 ], %g2 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003f08: d0 24 20 18 st %o0, [ %l0 + 0x18 ] iop->pathinfo = loc; 40003f0c: c4 24 20 24 st %g2, [ %l0 + 0x24 ] 40003f10: c4 07 bf f4 ld [ %fp + -12 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40003f14: 80 a0 60 00 cmp %g1, 0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 40003f18: c4 24 20 28 st %g2, [ %l0 + 0x28 ] 40003f1c: c4 07 bf f8 ld [ %fp + -8 ], %g2 if ( !iop->handlers || !iop->handlers->open_h ) { 40003f20: 02 80 00 32 be 40003fe8 40003f24: c4 24 20 2c st %g2, [ %l0 + 0x2c ] 40003f28: c2 00 40 00 ld [ %g1 ], %g1 40003f2c: 80 a0 60 00 cmp %g1, 0 40003f30: 02 80 00 2e be 40003fe8 40003f34: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40003f38: 96 10 00 12 mov %l2, %o3 40003f3c: 90 10 00 10 mov %l0, %o0 40003f40: 9f c0 40 00 call %g1 40003f44: 94 10 00 19 mov %i1, %o2 if ( rc ) { 40003f48: 80 a2 20 00 cmp %o0, 0 40003f4c: 12 80 00 12 bne 40003f94 40003f50: 80 8e 64 00 btst 0x400, %i1 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40003f54: 12 80 00 48 bne 40004074 40003f58: 23 10 00 74 sethi %hi(0x4001d000), %l1 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003f5c: c2 04 61 2c ld [ %l1 + 0x12c ], %g1 ! 4001d12c 40003f60: a0 24 00 01 sub %l0, %g1, %l0 40003f64: a1 3c 20 03 sra %l0, 3, %l0 40003f68: 85 2c 20 06 sll %l0, 6, %g2 40003f6c: 83 2c 20 03 sll %l0, 3, %g1 40003f70: 82 20 80 01 sub %g2, %g1, %g1 40003f74: 85 28 60 06 sll %g1, 6, %g2 40003f78: 82 00 40 02 add %g1, %g2, %g1 40003f7c: 82 00 40 10 add %g1, %l0, %g1 40003f80: b1 28 60 0f sll %g1, 0xf, %i0 40003f84: b0 26 00 01 sub %i0, %g1, %i0 40003f88: b1 2e 20 03 sll %i0, 3, %i0 } 40003f8c: 81 c7 e0 08 ret 40003f90: 91 ee 00 10 restore %i0, %l0, %o0 goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 40003f94: a8 10 00 11 mov %l1, %l4 40003f98: 40 00 2c 62 call 4000f120 <__errno> 40003f9c: 01 00 00 00 nop 40003fa0: e6 02 00 00 ld [ %o0 ], %l3 */ done: va_end(ap); if ( rc ) { 40003fa4: 80 a4 e0 00 cmp %l3, 0 40003fa8: 12 80 00 12 bne 40003ff0 40003fac: 23 10 00 74 sethi %hi(0x4001d000), %l1 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003fb0: c2 04 61 2c ld [ %l1 + 0x12c ], %g1 ! 4001d12c <== NOT EXECUTED 40003fb4: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 40003fb8: a1 3c 20 03 sra %l0, 3, %l0 <== NOT EXECUTED 40003fbc: 85 2c 20 06 sll %l0, 6, %g2 <== NOT EXECUTED 40003fc0: 83 2c 20 03 sll %l0, 3, %g1 <== NOT EXECUTED 40003fc4: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED 40003fc8: 85 28 60 06 sll %g1, 6, %g2 <== NOT EXECUTED 40003fcc: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40003fd0: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 40003fd4: b1 28 60 0f sll %g1, 0xf, %i0 <== NOT EXECUTED 40003fd8: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED 40003fdc: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED } 40003fe0: 81 c7 e0 08 ret <== NOT EXECUTED 40003fe4: 91 ee 00 10 restore %i0, %l0, %o0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003fe8: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 40003fec: a6 10 20 86 mov 0x86, %l3 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 40003ff0: 80 a4 20 00 cmp %l0, 0 40003ff4: 02 80 00 05 be 40004008 40003ff8: 80 a5 20 00 cmp %l4, 0 rtems_libio_free( iop ); 40003ffc: 40 00 1f f5 call 4000bfd0 40004000: 90 10 00 10 mov %l0, %o0 if ( loc_to_free ) 40004004: 80 a5 20 00 cmp %l4, 0 40004008: 02 80 00 0c be 40004038 4000400c: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40004010: c2 05 20 0c ld [ %l4 + 0xc ], %g1 40004014: 80 a0 60 00 cmp %g1, 0 40004018: 02 80 00 08 be 40004038 4000401c: 01 00 00 00 nop 40004020: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004024: 80 a0 60 00 cmp %g1, 0 40004028: 02 80 00 04 be 40004038 4000402c: 01 00 00 00 nop 40004030: 9f c0 40 00 call %g1 40004034: 90 10 00 14 mov %l4, %o0 rtems_set_errno_and_return_minus_one( rc ); 40004038: 40 00 2c 3a call 4000f120 <__errno> 4000403c: b0 10 3f ff mov -1, %i0 40004040: e6 22 00 00 st %l3, [ %o0 ] 40004044: 81 c7 e0 08 ret 40004048: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 4000404c: 40 00 2c 35 call 4000f120 <__errno> 40004050: 01 00 00 00 nop 40004054: c2 02 00 00 ld [ %o0 ], %g1 40004058: 80 a0 60 02 cmp %g1, 2 4000405c: 02 80 00 31 be 40004120 40004060: 80 8e 62 00 btst 0x200, %i1 rc = errno; 40004064: 40 00 2c 2f call 4000f120 <__errno> 40004068: a8 10 20 00 clr %l4 goto done; 4000406c: 10 bf ff ce b 40003fa4 40004070: e6 02 00 00 ld [ %o0 ], %l3 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 40004074: c2 04 61 2c ld [ %l1 + 0x12c ], %g1 40004078: 92 10 20 00 clr %o1 4000407c: 82 24 00 01 sub %l0, %g1, %g1 40004080: 83 38 60 03 sra %g1, 3, %g1 40004084: 87 28 60 06 sll %g1, 6, %g3 40004088: 85 28 60 03 sll %g1, 3, %g2 4000408c: 84 20 c0 02 sub %g3, %g2, %g2 40004090: 87 28 a0 06 sll %g2, 6, %g3 40004094: 84 00 80 03 add %g2, %g3, %g2 40004098: 84 00 80 01 add %g2, %g1, %g2 4000409c: 91 28 a0 0f sll %g2, 0xf, %o0 400040a0: 84 22 00 02 sub %o0, %g2, %g2 400040a4: 94 10 20 00 clr %o2 400040a8: 91 28 a0 03 sll %g2, 3, %o0 400040ac: 40 00 1f 07 call 4000bcc8 400040b0: 90 02 00 01 add %o0, %g1, %o0 if ( rc ) { 400040b4: a6 92 20 00 orcc %o0, 0, %l3 400040b8: 02 bf ff aa be 40003f60 400040bc: c2 04 61 2c ld [ %l1 + 0x12c ], %g1 if(errno) rc = errno; 400040c0: 40 00 2c 18 call 4000f120 <__errno> <== NOT EXECUTED 400040c4: 01 00 00 00 nop <== NOT EXECUTED 400040c8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400040cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400040d0: 12 80 00 30 bne 40004190 <== NOT EXECUTED 400040d4: 01 00 00 00 nop <== NOT EXECUTED close( iop - rtems_libio_iops ); 400040d8: c2 04 61 2c ld [ %l1 + 0x12c ], %g1 <== NOT EXECUTED 400040dc: a8 10 20 00 clr %l4 <== NOT EXECUTED 400040e0: 82 24 00 01 sub %l0, %g1, %g1 <== NOT EXECUTED 400040e4: 83 38 60 03 sra %g1, 3, %g1 <== NOT EXECUTED 400040e8: 87 28 60 06 sll %g1, 6, %g3 <== NOT EXECUTED 400040ec: 85 28 60 03 sll %g1, 3, %g2 <== NOT EXECUTED 400040f0: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 400040f4: 87 28 a0 06 sll %g2, 6, %g3 <== NOT EXECUTED 400040f8: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED 400040fc: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40004100: 87 28 a0 0f sll %g2, 0xf, %g3 <== NOT EXECUTED 40004104: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 40004108: a0 10 20 00 clr %l0 <== NOT EXECUTED 4000410c: 91 28 a0 03 sll %g2, 3, %o0 <== NOT EXECUTED 40004110: 40 00 1e 93 call 4000bb5c <== NOT EXECUTED 40004114: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40004118: 10 bf ff a4 b 40003fa8 <== NOT EXECUTED 4000411c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 40004120: a6 10 20 02 mov 2, %l3 40004124: 02 bf ff b3 be 40003ff0 40004128: a8 10 20 00 clr %l4 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 4000412c: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40004130: 90 10 00 18 mov %i0, %o0 40004134: 92 14 80 09 or %l2, %o1, %o1 40004138: 94 10 20 00 clr %o2 4000413c: 93 2a 60 10 sll %o1, 0x10, %o1 40004140: 96 10 20 00 clr %o3 40004144: 7f ff fd 63 call 400036d0 40004148: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 4000414c: 80 a2 20 00 cmp %o0, 0 40004150: 12 bf ff 92 bne 40003f98 40004154: 01 00 00 00 nop rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 40004158: 40 00 2f a9 call 4000fffc 4000415c: 90 10 00 18 mov %i0, %o0 40004160: 94 10 20 00 clr %o2 40004164: 92 10 00 08 mov %o0, %o1 40004168: 96 10 00 11 mov %l1, %o3 4000416c: 90 10 00 18 mov %i0, %o0 40004170: 98 10 20 01 mov 1, %o4 40004174: 7f ff fc 9e call 400033ec 40004178: a6 10 20 0d mov 0xd, %l3 if ( status != 0 ) { /* The file did not exist */ 4000417c: 80 a2 20 00 cmp %o0, 0 40004180: 12 bf ff 9c bne 40003ff0 40004184: a8 10 20 00 clr %l4 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40004188: 10 bf ff 53 b 40003ed4 4000418c: c2 07 bf f0 ld [ %fp + -16 ], %g1 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 40004190: 40 00 2b e4 call 4000f120 <__errno> <== NOT EXECUTED 40004194: 01 00 00 00 nop <== NOT EXECUTED 40004198: 10 bf ff d0 b 400040d8 <== NOT EXECUTED 4000419c: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED 40003dd0 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 40003dd0: 9d e3 bf a0 save %sp, -96, %sp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 40003dd4: 21 10 00 6e sethi %hi(0x4001b800), %l0 40003dd8: 92 10 20 00 clr %o1 40003ddc: 90 14 20 20 or %l0, 0x20, %o0 40003de0: 40 00 00 19 call 40003e44 40003de4: 94 10 20 00 clr %o2 40003de8: 80 a2 3f ff cmp %o0, -1 40003dec: 02 80 00 0e be 40003e24 40003df0: 90 14 20 20 or %l0, 0x20, %o0 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40003df4: 92 10 20 01 mov 1, %o1 40003df8: 40 00 00 13 call 40003e44 40003dfc: 94 10 20 00 clr %o2 40003e00: 80 a2 3f ff cmp %o0, -1 40003e04: 02 80 00 0c be 40003e34 40003e08: 92 10 20 01 mov 1, %o1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40003e0c: 90 14 20 20 or %l0, 0x20, %o0 40003e10: 40 00 00 0d call 40003e44 40003e14: 94 10 20 00 clr %o2 40003e18: 80 a2 3f ff cmp %o0, -1 40003e1c: 02 80 00 04 be 40003e2c 40003e20: 11 15 55 11 sethi %hi(0x55544400), %o0 40003e24: 81 c7 e0 08 ret 40003e28: 81 e8 00 00 restore rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 40003e2c: 40 00 0d 35 call 40007300 <== NOT EXECUTED 40003e30: 90 12 20 32 or %o0, 0x32, %o0 <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 40003e34: 11 15 55 11 sethi %hi(0x55544400), %o0 <== NOT EXECUTED 40003e38: 40 00 0d 32 call 40007300 <== NOT EXECUTED 40003e3c: 90 12 20 31 or %o0, 0x31, %o0 ! 55544431 <== NOT EXECUTED 40003e40: 01 00 00 00 nop 4000497c : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 4000497c: 9d e3 bf a0 save %sp, -96, %sp int i; if (tty->termios.c_oflag & OPOST) { 40004980: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 40004984: 80 88 60 01 btst 1, %g1 40004988: 02 80 00 19 be 400049ec 4000498c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 40004990: b0 0e 20 ff and %i0, 0xff, %i0 40004994: 80 a6 20 09 cmp %i0, 9 40004998: 22 80 00 42 be,a 40004aa0 4000499c: c6 06 60 28 ld [ %i1 + 0x28 ], %g3 400049a0: 08 80 00 19 bleu 40004a04 400049a4: 80 a6 20 08 cmp %i0, 8 400049a8: 80 a6 20 0a cmp %i0, 0xa 400049ac: 02 80 00 22 be 40004a34 400049b0: 80 a6 20 0d cmp %i0, 0xd 400049b4: 02 80 00 2d be 40004a68 400049b8: 80 88 60 10 btst 0x10, %g1 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 400049bc: 80 88 60 02 btst 2, %g1 400049c0: 12 80 00 46 bne 40004ad8 400049c4: 03 10 00 72 sethi %hi(0x4001c800), %g1 400049c8: c2 00 61 84 ld [ %g1 + 0x184 ], %g1 ! 4001c984 <__ctype_ptr__> c = toupper(c); if (!iscntrl(c)) 400049cc: b0 00 40 18 add %g1, %i0, %i0 400049d0: c2 0e 20 01 ldub [ %i0 + 1 ], %g1 400049d4: 80 88 60 20 btst 0x20, %g1 400049d8: 12 80 00 06 bne 400049f0 400049dc: 94 10 00 19 mov %i1, %o2 tty->column++; 400049e0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 400049e4: 82 00 60 01 inc %g1 400049e8: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 400049ec: 94 10 00 19 mov %i1, %o2 400049f0: 90 07 a0 44 add %fp, 0x44, %o0 400049f4: 7f ff ff 93 call 40004840 400049f8: 92 10 20 01 mov 1, %o1 400049fc: 81 c7 e0 08 ret 40004a00: 81 e8 00 00 restore oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 40004a04: 12 bf ff ef bne 400049c0 <== NOT EXECUTED 40004a08: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 40004a0c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004a10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004a14: 04 bf ff f6 ble 400049ec <== NOT EXECUTED 40004a18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004a1c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += i; break; case '\b': if (tty->column > 0) tty->column--; 40004a20: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004a24: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40004a28: 7f ff ff 86 call 40004840 <== NOT EXECUTED 40004a2c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004a30: 30 80 00 3e b,a 40004b28 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 40004a34: 80 88 60 20 btst 0x20, %g1 40004a38: 32 80 00 02 bne,a 40004a40 40004a3c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 40004a40: 80 88 60 04 btst 4, %g1 40004a44: 02 bf ff eb be 400049f0 40004a48: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40004a4c: 11 10 00 6e sethi %hi(0x4001b800), %o0 40004a50: 92 10 20 01 mov 1, %o1 40004a54: 90 12 23 08 or %o0, 0x308, %o0 40004a58: 7f ff ff 7a call 40004840 40004a5c: 94 10 00 19 mov %i1, %o2 tty->column = 0; 40004a60: 10 bf ff e3 b 400049ec 40004a64: c0 26 60 28 clr [ %i1 + 0x28 ] } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40004a68: 02 80 00 06 be 40004a80 <== NOT EXECUTED 40004a6c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40004a70: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED 40004a74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004a78: 02 bf ff e1 be 400049fc <== NOT EXECUTED 40004a7c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 40004a80: 22 bf ff db be,a 400049ec <== NOT EXECUTED 40004a84: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 40004a88: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 40004a8c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004a90: 02 bf ff d7 be 400049ec <== NOT EXECUTED 40004a94: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; break; 40004a98: 10 bf ff d5 b 400049ec <== NOT EXECUTED 40004a9c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004aa0: 05 00 00 06 sethi %hi(0x1800), %g2 40004aa4: 82 08 40 02 and %g1, %g2, %g1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40004aa8: 92 10 20 08 mov 8, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004aac: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40004ab0: 82 08 e0 07 and %g3, 7, %g1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004ab4: 02 80 00 17 be 40004b10 40004ab8: 92 22 40 01 sub %o1, %g1, %o1 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40004abc: 86 02 40 03 add %o1, %g3, %g3 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004ac0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40004ac4: c6 26 60 28 st %g3, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004ac8: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40004acc: 7f ff ff 5d call 40004840 <== NOT EXECUTED 40004ad0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004ad4: 30 80 00 15 b,a 40004b28 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 40004ad8: c2 00 61 84 ld [ %g1 + 0x184 ], %g1 <== NOT EXECUTED 40004adc: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 40004ae0: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED 40004ae4: c6 0e 20 01 ldub [ %i0 + 1 ], %g3 <== NOT EXECUTED 40004ae8: 86 08 e0 03 and %g3, 3, %g3 <== NOT EXECUTED 40004aec: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40004af0: 22 80 00 05 be,a 40004b04 <== NOT EXECUTED 40004af4: 84 00 bf e0 add %g2, -32, %g2 <== NOT EXECUTED 40004af8: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED 40004afc: 10 bf ff b4 b 400049cc <== NOT EXECUTED 40004b00: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED 40004b04: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED 40004b08: 10 bf ff b1 b 400049cc <== NOT EXECUTED 40004b0c: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 40004b10: 86 02 40 03 add %o1, %g3, %g3 rtems_termios_puts ( " ", i, tty); 40004b14: 94 10 00 19 mov %i1, %o2 break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 40004b18: c6 26 60 28 st %g3, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 40004b1c: 11 10 00 6e sethi %hi(0x4001b800), %o0 40004b20: 7f ff ff 48 call 40004840 40004b24: 90 12 23 10 or %o0, 0x310, %o0 ! 4001bb10 <__FUNCTION__.5752+0x258> return; 40004b28: 81 c7 e0 08 ret 40004b2c: 81 e8 00 00 restore 4000eb28 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4000eb28: 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) 4000eb2c: 23 10 00 70 sethi %hi(0x4001c000), %l1 4000eb30: a0 07 bf dc add %fp, -36, %l0 4000eb34: 92 10 20 03 mov 3, %o1 4000eb38: 90 14 60 40 or %l1, 0x40, %o0 4000eb3c: 94 10 20 07 mov 7, %o2 4000eb40: 96 10 00 10 mov %l0, %o3 4000eb44: 7f ff d2 2a call 400033ec 4000eb48: 98 10 20 01 mov 1, %o4 4000eb4c: 80 a2 20 00 cmp %o0, 0 4000eb50: 12 80 00 43 bne 4000ec5c 4000eb54: 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); 4000eb58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000eb5c: 22 80 00 09 be,a 4000eb80 <== NOT EXECUTED 4000eb60: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 4000eb64: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001cc1c <== NOT EXECUTED 4000eb68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000eb6c: 22 80 00 05 be,a 4000eb80 <== NOT EXECUTED 4000eb70: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 4000eb74: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000eb78: 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 ++); 4000eb7c: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 4000eb80: c4 10 63 7a lduh [ %g1 + 0x37a ], %g2 ! 4001cf7a else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000eb84: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000eb88: 95 28 a0 10 sll %g2, 0x10, %o2 4000eb8c: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000eb90: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000eb94: c4 30 63 7a sth %g2, [ %g1 + 0x37a ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000eb98: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 4000eb9c: 03 00 00 19 sethi %hi(0x6400), %g1 4000eba0: 84 10 a1 70 or %g2, 0x170, %g2 4000eba4: 82 10 62 6f or %g1, 0x26f, %g1 4000eba8: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ebac: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ebb0: c4 3f bf f0 std %g2, [ %fp + -16 ] 4000ebb4: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ebb8: 90 07 bf fa add %fp, -6, %o0 4000ebbc: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000ebc0: 40 00 04 43 call 4000fccc 4000ebc4: 92 12 60 48 or %o1, 0x48, %o1 ! 4001c048 <__FUNCTION__.5901+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4000ebc8: 90 10 00 10 mov %l0, %o0 4000ebcc: 40 00 00 5a call 4000ed34 4000ebd0: 92 10 21 80 mov 0x180, %o1 4000ebd4: 80 a2 20 00 cmp %o0, 0 4000ebd8: 12 80 00 1d bne 4000ec4c 4000ebdc: 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); 4000ebe0: 7f ff d4 99 call 40003e44 4000ebe4: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 4000ebe8: 80 a2 20 00 cmp %o0, 0 4000ebec: 06 80 00 2f bl 4000eca8 4000ebf0: 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]); 4000ebf4: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED 4000ebf8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 ! 4001c814 <== NOT EXECUTED 4000ebfc: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000ec00: 0a 80 00 23 bcs 4000ec8c <== NOT EXECUTED 4000ec04: 82 10 20 00 clr %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000ec08: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000ec0c: 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; 4000ec10: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000ec14: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000ec18: 7f ff d4 8b call 40003e44 <== NOT EXECUTED 4000ec1c: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 4000ec20: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 4000ec24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ec28: 06 80 00 26 bl 4000ecc0 <== NOT EXECUTED 4000ec2c: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4000ec30: 40 00 00 4b call 4000ed5c <== NOT EXECUTED 4000ec34: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4000ec38: 40 00 01 3a call 4000f120 <__errno> 4000ec3c: b0 10 3f ff mov -1, %i0 4000ec40: e2 22 00 00 st %l1, [ %o0 ] } 4000ec44: 81 c7 e0 08 ret 4000ec48: 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){ 4000ec4c: 40 00 01 35 call 4000f120 <__errno> <== NOT EXECUTED 4000ec50: 01 00 00 00 nop <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4000ec54: 81 c7 e0 08 ret <== NOT EXECUTED 4000ec58: 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) 4000ec5c: 40 00 01 31 call 4000f120 <__errno> 4000ec60: 01 00 00 00 nop 4000ec64: c2 02 00 00 ld [ %o0 ], %g1 4000ec68: 80 a0 60 02 cmp %g1, 2 4000ec6c: 12 bf ff fa bne 4000ec54 4000ec70: 90 14 60 40 or %l1, 0x40, %o0 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4000ec74: 7f ff d2 8d call 400036a8 4000ec78: 92 10 23 ff mov 0x3ff, %o1 4000ec7c: 80 a2 20 00 cmp %o0, 0 4000ec80: 02 bf ff c0 be 4000eb80 4000ec84: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000ec88: 30 bf ff f3 b,a 4000ec54 <== 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]); 4000ec8c: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 4000ec90: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 4001d12c <== NOT EXECUTED 4000ec94: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4000ec98: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 4000ec9c: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 4000eca0: 10 bf ff da b 4000ec08 <== NOT EXECUTED 4000eca4: 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; 4000eca8: 40 00 01 1e call 4000f120 <__errno> 4000ecac: 01 00 00 00 nop 4000ecb0: 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); 4000ecb4: 40 00 00 2a call 4000ed5c 4000ecb8: 90 10 00 10 mov %l0, %o0 4000ecbc: 30 bf ff df b,a 4000ec38 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4000ecc0: 40 00 01 18 call 4000f120 <__errno> <== NOT EXECUTED 4000ecc4: 01 00 00 00 nop <== NOT EXECUTED 4000ecc8: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 4000eccc: 7f ff f3 a4 call 4000bb5c <== NOT EXECUTED 4000ecd0: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 4000ecd4: 30 bf ff d7 b,a 4000ec30 <== NOT EXECUTED 4000d688 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000d688: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 4000d68c: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000d690: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 4000d694: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000d698: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000d69c: 12 80 00 12 bne 4000d6e4 <== NOT EXECUTED 4000d6a0: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 4000d6a4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000d6a8: 02 80 00 0f be 4000d6e4 <== NOT EXECUTED 4000d6ac: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4000d6b0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d6b4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d6b8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d6bc: 7f ff e5 64 call 40006c4c <== NOT EXECUTED 4000d6c0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d6c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d6c8: 12 80 00 07 bne 4000d6e4 <== NOT EXECUTED 4000d6cc: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000d6d0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d6d4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000d6d8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d6dc: 7f ff e5 a3 call 40006d68 <== NOT EXECUTED 4000d6e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 4000d6e4: 81 c7 e0 08 ret <== NOT EXECUTED 4000d6e8: 81 e8 00 00 restore <== NOT EXECUTED 4000d610 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4000d610: 81 c3 e0 08 retl <== NOT EXECUTED 4000d614: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED 4000d8e4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000d8e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000d8e8: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000d8ec: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000d8f0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d8f4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d8f8: 7f ff e4 d5 call 40006c4c <== NOT EXECUTED 4000d8fc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d900: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d904: 12 80 00 2f bne 4000d9c0 <== NOT EXECUTED 4000d908: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4000d90c: a4 10 20 00 clr %l2 <== NOT EXECUTED 4000d910: b0 10 20 00 clr %i0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4000d914: 02 80 00 26 be 4000d9ac <== NOT EXECUTED 4000d918: 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); 4000d91c: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4000d920: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000d924: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000d928: 12 80 00 2a bne 4000d9d0 <== NOT EXECUTED 4000d92c: 82 26 80 12 sub %i2, %l2, %g1 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4000d930: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000d934: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d938: 22 80 00 1d be,a 4000d9ac <== NOT EXECUTED 4000d93c: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4000d940: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000d944: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d948: 32 80 00 19 bne,a 4000d9ac <== NOT EXECUTED 4000d94c: 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 ++; 4000d950: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d954: 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 ++; 4000d958: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d95c: 7f ff e5 03 call 40006d68 <== NOT EXECUTED 4000d960: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000d964: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d968: 40 00 02 d9 call 4000e4cc <== NOT EXECUTED 4000d96c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d970: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d974: 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)) 4000d978: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d97c: 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)) 4000d980: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d984: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d988: 7f ff e4 b1 call 40006c4c <== NOT EXECUTED 4000d98c: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000d990: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d994: 12 80 00 32 bne 4000da5c <== NOT EXECUTED 4000d998: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4000d99c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000d9a0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000d9a4: 02 bf ff df be 4000d920 <== NOT EXECUTED 4000d9a8: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4000d9ac: 7f ff e4 ef call 40006d68 <== NOT EXECUTED 4000d9b0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 4000d9b4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d9b8: 04 80 00 04 ble 4000d9c8 <== NOT EXECUTED 4000d9bc: 01 00 00 00 nop <== NOT EXECUTED return read; return ret; } 4000d9c0: 81 c7 e0 08 ret <== NOT EXECUTED 4000d9c4: 81 e8 00 00 restore <== NOT EXECUTED 4000d9c8: 81 c7 e0 08 ret <== NOT EXECUTED 4000d9cc: 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); 4000d9d0: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000d9d4: 38 80 00 02 bgu,a 4000d9dc <== NOT EXECUTED 4000d9d8: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4000d9dc: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000d9e0: e8 04 20 04 ld [ %l0 + 4 ], %l4 <== NOT EXECUTED 4000d9e4: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED if (chunk > chunk1) { 4000d9e8: 80 a4 40 14 cmp %l1, %l4 <== NOT EXECUTED 4000d9ec: 14 80 00 1e bg 4000da64 <== NOT EXECUTED 4000d9f0: 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); 4000d9f4: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED 4000d9f8: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000d9fc: 40 00 08 04 call 4000fa0c <== NOT EXECUTED 4000da00: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED pipe->Start += chunk; 4000da04: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000da08: 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; 4000da0c: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000da10: 40 00 2c 01 call 40018a14 <.urem> <== NOT EXECUTED 4000da14: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000da18: 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; 4000da1c: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000da20: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4000da24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000da28: 12 80 00 03 bne 4000da34 <== NOT EXECUTED 4000da2c: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 4000da30: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 4000da34: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000da38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000da3c: 32 80 00 15 bne,a 4000da90 <== NOT EXECUTED 4000da40: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 4000da44: 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) { 4000da48: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000da4c: 0a bf ff b5 bcs 4000d920 <== NOT EXECUTED 4000da50: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED 4000da54: 10 bf ff d6 b 4000d9ac <== NOT EXECUTED 4000da58: 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)) { 4000da5c: 10 bf ff d6 b 4000d9b4 <== NOT EXECUTED 4000da60: 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); 4000da64: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 4000da68: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000da6c: 40 00 07 e8 call 4000fa0c <== NOT EXECUTED 4000da70: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4000da74: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 4000da78: 90 04 80 14 add %l2, %l4, %o0 <== NOT EXECUTED 4000da7c: 94 24 40 14 sub %l1, %l4, %o2 <== NOT EXECUTED 4000da80: 40 00 07 e3 call 4000fa0c <== NOT EXECUTED 4000da84: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; 4000da88: 10 bf ff e0 b 4000da08 <== NOT EXECUTED 4000da8c: 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); 4000da90: 40 00 02 78 call 4000e470 <== NOT EXECUTED 4000da94: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 4000da98: 10 bf ff ec b 4000da48 <== NOT EXECUTED 4000da9c: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 4000daa0 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000daa0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 4000daa4: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4000daa8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000daac: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000dab0: 7f ff e4 67 call 40006c4c <== NOT EXECUTED 4000dab4: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4000dab8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dabc: 12 80 00 48 bne 4000dbdc <== NOT EXECUTED 4000dac0: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4000dac4: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4000dac8: 80 8c a0 02 btst 2, %l2 <== NOT EXECUTED 4000dacc: 02 80 00 05 be 4000dae0 <== NOT EXECUTED 4000dad0: a4 0c a0 06 and %l2, 6, %l2 <== NOT EXECUTED pipe->Readers --; 4000dad4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000dad8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000dadc: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4000dae0: 80 8c a0 04 btst 4, %l2 <== NOT EXECUTED 4000dae4: 32 80 00 1d bne,a 4000db58 <== NOT EXECUTED 4000dae8: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4000daec: 23 10 00 73 sethi %hi(0x4001cc00), %l1 <== NOT EXECUTED 4000daf0: d0 04 63 74 ld [ %l1 + 0x374 ], %o0 ! 4001cf74 <== NOT EXECUTED 4000daf4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000daf8: 7f ff e4 55 call 40006c4c <== NOT EXECUTED 4000dafc: 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) 4000db00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000db04: 12 80 00 36 bne 4000dbdc <== NOT EXECUTED 4000db08: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4000db0c: 7f ff e4 97 call 40006d68 <== NOT EXECUTED 4000db10: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4000db14: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000db18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db1c: 12 80 00 12 bne 4000db64 <== NOT EXECUTED 4000db20: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000db24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db28: 02 80 00 1d be 4000db9c <== NOT EXECUTED 4000db2c: 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) 4000db30: 02 80 00 06 be 4000db48 <== NOT EXECUTED 4000db34: d0 04 63 74 ld [ %l1 + 0x374 ], %o0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4000db38: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000db3c: 40 00 02 4d call 4000e470 <== NOT EXECUTED 4000db40: 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); 4000db44: d0 04 63 74 ld [ %l1 + 0x374 ], %o0 <== NOT EXECUTED 4000db48: 7f ff e4 88 call 40006d68 <== NOT EXECUTED 4000db4c: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000db50: 81 c7 e0 08 ret <== NOT EXECUTED 4000db54: 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 --; 4000db58: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000db5c: 10 bf ff e4 b 4000daec <== NOT EXECUTED 4000db60: 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) 4000db64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db68: 12 bf ff f8 bne 4000db48 <== NOT EXECUTED 4000db6c: d0 04 63 74 ld [ %l1 + 0x374 ], %o0 <== NOT EXECUTED 4000db70: 80 a4 a0 02 cmp %l2, 2 <== NOT EXECUTED 4000db74: 02 bf ff f5 be 4000db48 <== NOT EXECUTED 4000db78: 01 00 00 00 nop <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000db7c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000db80: 40 00 02 3c call 4000e470 <== NOT EXECUTED 4000db84: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4000db88: d0 04 63 74 ld [ %l1 + 0x374 ], %o0 <== NOT EXECUTED 4000db8c: 7f ff e4 77 call 40006d68 <== NOT EXECUTED 4000db90: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000db94: 81 c7 e0 08 ret <== NOT EXECUTED 4000db98: 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); 4000db9c: 40 00 02 1b call 4000e408 <== NOT EXECUTED 4000dba0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000dba4: 40 00 02 19 call 4000e408 <== NOT EXECUTED 4000dba8: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000dbac: 7f ff e3 fb call 40006b98 <== NOT EXECUTED 4000dbb0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000dbb4: 7f ff f8 1a call 4000bc1c <== NOT EXECUTED 4000dbb8: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED free(pipe); 4000dbbc: 7f ff f8 18 call 4000bc1c <== NOT EXECUTED 4000dbc0: 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); 4000dbc4: d0 04 63 74 ld [ %l1 + 0x374 ], %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; 4000dbc8: 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); 4000dbcc: 7f ff e4 67 call 40006d68 <== NOT EXECUTED 4000dbd0: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000dbd4: 81 c7 e0 08 ret <== NOT EXECUTED 4000dbd8: 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); 4000dbdc: 7f ff e5 c9 call 40007300 <== NOT EXECUTED 4000dbe0: 01 00 00 00 nop 4000dbe4: 01 00 00 00 nop 4000d6ec : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4000d6ec: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4000d6f0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4000d6f4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000d6f8: 12 80 00 04 bne 4000d708 <== NOT EXECUTED 4000d6fc: b0 10 20 00 clr %i0 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4000d700: 81 c7 e0 08 ret <== NOT EXECUTED 4000d704: 81 e8 00 00 restore <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4000d708: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d70c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d710: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d714: 7f ff e5 4e call 40006c4c <== NOT EXECUTED 4000d718: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d71c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d720: 12 bf ff f8 bne 4000d700 <== NOT EXECUTED 4000d724: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4000d728: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d72c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d730: 02 80 00 56 be 4000d888 <== NOT EXECUTED 4000d734: 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; 4000d738: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED 4000d73c: 80 a6 80 15 cmp %i2, %l5 <== NOT EXECUTED 4000d740: 18 80 00 03 bgu 4000d74c <== NOT EXECUTED 4000d744: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 4000d748: a4 10 00 1a mov %i2, %l2 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4000d74c: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000d750: 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); 4000d754: 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) { 4000d758: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000d75c: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED 4000d760: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d764: 1a 80 00 28 bcc 4000d804 <== NOT EXECUTED 4000d768: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 4000d76c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000d770: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d774: 32 80 00 46 bne,a 4000d88c <== NOT EXECUTED 4000d778: 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 ++; 4000d77c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d780: 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 ++; 4000d784: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d788: 7f ff e5 78 call 40006d68 <== NOT EXECUTED 4000d78c: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000d790: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d794: 40 00 03 4e call 4000e4cc <== NOT EXECUTED 4000d798: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d79c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d7a0: 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)) 4000d7a4: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d7a8: 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)) 4000d7ac: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d7b0: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d7b4: 7f ff e5 26 call 40006c4c <== NOT EXECUTED 4000d7b8: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000d7bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d7c0: 12 80 00 3a bne 4000d8a8 <== NOT EXECUTED 4000d7c4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4000d7c8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d7cc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000d7d0: 12 80 00 2f bne 4000d88c <== NOT EXECUTED 4000d7d4: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4000d7d8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d7dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d7e0: 02 80 00 2b be 4000d88c <== NOT EXECUTED 4000d7e4: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED 4000d7e8: 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) { 4000d7ec: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000d7f0: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED 4000d7f4: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d7f8: 2a bf ff de bcs,a 4000d770 <== NOT EXECUTED 4000d7fc: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4000d800: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED 4000d804: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000d808: 38 80 00 02 bgu,a 4000d810 <== NOT EXECUTED 4000d80c: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4000d810: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 4000d814: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 4000d818: 40 00 2c 7f call 40018a14 <.urem> <== NOT EXECUTED 4000d81c: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000d820: a4 25 40 08 sub %l5, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000d824: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d828: 04 80 00 22 ble 4000d8b0 <== NOT EXECUTED 4000d82c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4000d830: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED 4000d834: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000d838: 40 00 08 75 call 4000fa0c <== NOT EXECUTED 4000d83c: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4000d840: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4000d844: 92 04 80 13 add %l2, %l3, %o1 <== NOT EXECUTED 4000d848: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000d84c: 40 00 08 70 call 4000fa0c <== NOT EXECUTED 4000d850: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4000d854: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000d858: 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; 4000d85c: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000d860: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d864: 12 80 00 19 bne 4000d8c8 <== NOT EXECUTED 4000d868: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4000d86c: 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) { 4000d870: 80 a6 80 18 cmp %i2, %i0 <== NOT EXECUTED 4000d874: 08 80 00 1a bleu 4000d8dc <== NOT EXECUTED 4000d878: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED 4000d87c: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED 4000d880: 10 bf ff b6 b 4000d758 <== NOT EXECUTED 4000d884: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 4000d888: 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); 4000d88c: 7f ff e5 37 call 40006d68 <== NOT EXECUTED 4000d890: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4000d894: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d898: 14 bf ff 9a bg 4000d700 <== NOT EXECUTED 4000d89c: 01 00 00 00 nop <== NOT EXECUTED return written; return ret; } 4000d8a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000d8a4: 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)) { 4000d8a8: 10 bf ff fb b 4000d894 <== NOT EXECUTED 4000d8ac: 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); 4000d8b0: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED 4000d8b4: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000d8b8: 40 00 08 55 call 4000fa0c <== NOT EXECUTED 4000d8bc: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED pipe->Length += chunk; 4000d8c0: 10 bf ff e6 b 4000d858 <== NOT EXECUTED 4000d8c4: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4000d8c8: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d8cc: 40 00 02 e9 call 4000e470 <== NOT EXECUTED 4000d8d0: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 4000d8d4: 10 bf ff e7 b 4000d870 <== NOT EXECUTED 4000d8d8: 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) { 4000d8dc: 10 bf ff ec b 4000d88c <== NOT EXECUTED 4000d8e0: a2 10 20 00 clr %l1 <== NOT EXECUTED 4001ae00 : ssize_t read( int fd, void *buffer, size_t count ) { 4001ae00: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001ae04: 03 10 00 72 sethi %hi(0x4001c800), %g1 4001ae08: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 ! 4001c814 4001ae0c: 80 a6 00 01 cmp %i0, %g1 4001ae10: 1a 80 00 23 bcc 4001ae9c 4001ae14: 03 10 00 74 sethi %hi(0x4001d000), %g1 iop = rtems_libio_iop( fd ); 4001ae18: e0 00 61 2c ld [ %g1 + 0x12c ], %l0 ! 4001d12c 4001ae1c: 83 2e 20 06 sll %i0, 6, %g1 4001ae20: b1 2e 20 03 sll %i0, 3, %i0 4001ae24: b0 06 00 01 add %i0, %g1, %i0 4001ae28: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001ae2c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001ae30: 80 88 61 00 btst 0x100, %g1 4001ae34: 02 80 00 1a be 4001ae9c 4001ae38: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001ae3c: 02 80 00 1e be 4001aeb4 4001ae40: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001ae44: 02 80 00 14 be 4001ae94 4001ae48: b0 10 20 00 clr %i0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001ae4c: 80 88 60 02 btst 2, %g1 4001ae50: 02 80 00 19 be 4001aeb4 4001ae54: 01 00 00 00 nop /* * Now process the read(). */ if ( !iop->handlers->read_h ) 4001ae58: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001ae5c: c2 00 60 08 ld [ %g1 + 8 ], %g1 4001ae60: 80 a0 60 00 cmp %g1, 0 4001ae64: 02 80 00 1a be 4001aecc 4001ae68: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 4001ae6c: 94 10 00 1a mov %i2, %o2 4001ae70: 9f c0 40 00 call %g1 4001ae74: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001ae78: b0 92 20 00 orcc %o0, 0, %i0 4001ae7c: 04 80 00 06 ble 4001ae94 4001ae80: 85 3e 20 1f sra %i0, 0x1f, %g2 iop->offset += rc; 4001ae84: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001ae88: 86 83 40 18 addcc %o5, %i0, %g3 4001ae8c: 84 43 00 02 addx %o4, %g2, %g2 4001ae90: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001ae94: 81 c7 e0 08 ret 4001ae98: 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 ); 4001ae9c: 7f ff d0 a1 call 4000f120 <__errno> 4001aea0: b0 10 3f ff mov -1, %i0 4001aea4: 82 10 20 09 mov 9, %g1 4001aea8: c2 22 00 00 st %g1, [ %o0 ] 4001aeac: 81 c7 e0 08 ret 4001aeb0: 81 e8 00 00 restore rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001aeb4: 7f ff d0 9b call 4000f120 <__errno> <== NOT EXECUTED 4001aeb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001aebc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001aec0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001aec4: 81 c7 e0 08 ret <== NOT EXECUTED 4001aec8: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001aecc: 7f ff d0 95 call 4000f120 <__errno> <== NOT EXECUTED 4001aed0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001aed4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001aed8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001aedc: 81 c7 e0 08 ret <== NOT EXECUTED 4001aee0: 81 e8 00 00 restore <== NOT EXECUTED 4002c3c4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 4002c3c4: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 4002c3c8: 80 a6 60 00 cmp %i1, 0 4002c3cc: 02 80 00 2b be 4002c478 4002c3d0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 4002c3d4: 40 00 7d 15 call 4004b828 4002c3d8: 90 10 00 18 mov %i0, %o0 4002c3dc: a0 07 bf ec add %fp, -20, %l0 4002c3e0: 92 10 00 08 mov %o0, %o1 4002c3e4: 94 10 20 00 clr %o2 4002c3e8: 90 10 00 18 mov %i0, %o0 4002c3ec: 96 10 00 10 mov %l0, %o3 4002c3f0: 98 10 20 00 clr %o4 4002c3f4: 7f ff 6f bf call 400082f0 4002c3f8: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 4002c3fc: 80 a2 20 00 cmp %o0, 0 4002c400: 12 80 00 1c bne 4002c470 4002c404: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 4002c408: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4002c40c: 80 a0 60 00 cmp %g1, 0 4002c410: 22 80 00 31 be,a 4002c4d4 4002c414: 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 ){ 4002c418: 9f c0 40 00 call %g1 4002c41c: 90 10 00 10 mov %l0, %o0 4002c420: 80 a2 20 04 cmp %o0, 4 4002c424: 12 80 00 1b bne 4002c490 4002c428: 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 ){ 4002c42c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 4002c430: 80 a0 60 00 cmp %g1, 0 4002c434: 02 80 00 27 be 4002c4d0 4002c438: 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 ); 4002c43c: 94 10 00 1a mov %i2, %o2 4002c440: 9f c0 40 00 call %g1 4002c444: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002c448: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002c44c: 80 a0 60 00 cmp %g1, 0 4002c450: 02 80 00 08 be 4002c470 4002c454: b0 10 00 08 mov %o0, %i0 4002c458: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002c45c: 80 a0 60 00 cmp %g1, 0 4002c460: 02 80 00 26 be 4002c4f8 4002c464: 01 00 00 00 nop 4002c468: 9f c0 40 00 call %g1 4002c46c: 90 10 00 10 mov %l0, %o0 return result; } 4002c470: 81 c7 e0 08 ret 4002c474: 81 e8 00 00 restore { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 4002c478: 40 00 61 c1 call 40044b7c <__errno> <== NOT EXECUTED 4002c47c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c480: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002c484: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c488: 81 c7 e0 08 ret <== NOT EXECUTED 4002c48c: 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 ); 4002c490: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002c494: 80 a0 60 00 cmp %g1, 0 4002c498: 02 80 00 08 be 4002c4b8 4002c49c: 01 00 00 00 nop 4002c4a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002c4a4: 80 a0 60 00 cmp %g1, 0 4002c4a8: 02 80 00 04 be 4002c4b8 4002c4ac: 01 00 00 00 nop 4002c4b0: 9f c0 40 00 call %g1 4002c4b4: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 4002c4b8: 40 00 61 b1 call 40044b7c <__errno> 4002c4bc: b0 10 3f ff mov -1, %i0 4002c4c0: 82 10 20 16 mov 0x16, %g1 4002c4c4: c2 22 00 00 st %g1, [ %o0 ] 4002c4c8: 81 c7 e0 08 ret 4002c4cc: 81 e8 00 00 restore } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 4002c4d0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002c4d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c4d8: 02 80 00 04 be 4002c4e8 <== NOT EXECUTED 4002c4dc: 01 00 00 00 nop <== NOT EXECUTED 4002c4e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c4e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002c4e8: 40 00 61 a5 call 40044b7c <__errno> <== NOT EXECUTED 4002c4ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c4f0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002c4f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c4f8: 81 c7 e0 08 ret <== NOT EXECUTED 4002c4fc: 81 e8 00 00 restore <== NOT EXECUTED 40005994 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 40005994: 9d e3 bf a0 save %sp, -96, %sp int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 40005998: 03 10 00 85 sethi %hi(0x40021400), %g1 4000599c: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40021614 400059a0: 80 a6 00 01 cmp %i0, %g1 400059a4: 1a 80 00 4a bcc 40005acc 400059a8: 03 10 00 89 sethi %hi(0x40022400), %g1 iop = rtems_libio_iop( fd ); 400059ac: e4 00 63 04 ld [ %g1 + 0x304 ], %l2 ! 40022704 400059b0: 83 2e 20 06 sll %i0, 6, %g1 400059b4: b1 2e 20 03 sll %i0, 3, %i0 400059b8: b0 06 00 01 add %i0, %g1, %i0 400059bc: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 400059c0: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 400059c4: 80 88 61 00 btst 0x100, %g1 400059c8: 02 80 00 41 be 40005acc 400059cc: 80 88 60 02 btst 2, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 400059d0: 02 80 00 39 be 40005ab4 400059d4: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 400059d8: 02 80 00 37 be 40005ab4 400059dc: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 400059e0: 04 80 00 35 ble 40005ab4 400059e4: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 400059e8: 14 80 00 33 bg 40005ab4 400059ec: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 400059f0: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 400059f4: c2 00 60 08 ld [ %g1 + 8 ], %g1 400059f8: 80 a0 60 00 cmp %g1, 0 400059fc: 02 80 00 3c be 40005aec 40005a00: 86 10 20 00 clr %g3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40005a04: 84 10 00 19 mov %i1, %g2 40005a08: 88 10 20 00 clr %g4 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 40005a0c: da 00 80 00 ld [ %g2 ], %o5 40005a10: 80 a3 60 00 cmp %o5, 0 40005a14: 02 80 00 28 be 40005ab4 40005a18: 86 00 e0 01 inc %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 40005a1c: da 00 a0 04 ld [ %g2 + 4 ], %o5 40005a20: 80 a3 60 00 cmp %o5, 0 40005a24: 02 80 00 24 be 40005ab4 40005a28: 84 00 a0 08 add %g2, 8, %g2 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 40005a2c: 9a 01 00 0d add %g4, %o5, %o5 if ( total < old ) 40005a30: 80 a1 00 0d cmp %g4, %o5 40005a34: 14 80 00 20 bg 40005ab4 40005a38: 80 a6 80 03 cmp %i2, %g3 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40005a3c: 14 bf ff f4 bg 40005a0c 40005a40: 88 10 00 0d mov %o5, %g4 40005a44: a6 10 20 00 clr %l3 40005a48: 10 80 00 04 b 40005a58 40005a4c: b0 10 20 00 clr %i0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40005a50: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 <== NOT EXECUTED 40005a54: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 40005a58: d2 06 40 00 ld [ %i1 ], %o1 40005a5c: d4 06 60 04 ld [ %i1 + 4 ], %o2 40005a60: 9f c0 40 00 call %g1 40005a64: 90 10 00 12 mov %l2, %o0 if ( bytes < 0 ) 40005a68: 80 a2 20 00 cmp %o0, 0 40005a6c: 06 80 00 1e bl 40005ae4 40005a70: 01 00 00 00 nop return -1; if ( bytes > 0 ) { 40005a74: 02 80 00 07 be 40005a90 40005a78: a1 3a 20 1f sra %o0, 0x1f, %l0 iop->offset += bytes; 40005a7c: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 <== NOT EXECUTED 40005a80: 86 80 c0 08 addcc %g3, %o0, %g3 <== NOT EXECUTED total += bytes; 40005a84: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 40005a88: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 40005a8c: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 40005a90: c2 06 60 04 ld [ %i1 + 4 ], %g1 40005a94: 80 a2 00 01 cmp %o0, %g1 40005a98: 12 80 00 05 bne 40005aac 40005a9c: a6 04 e0 01 inc %l3 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40005aa0: 80 a6 80 13 cmp %i2, %l3 <== NOT EXECUTED 40005aa4: 14 bf ff eb bg 40005a50 <== NOT EXECUTED 40005aa8: b2 06 60 08 add %i1, 8, %i1 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40005aac: 81 c7 e0 08 ret 40005ab0: 81 e8 00 00 restore /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 40005ab4: 40 00 30 11 call 40011af8 <__errno> 40005ab8: b0 10 3f ff mov -1, %i0 40005abc: 82 10 20 16 mov 0x16, %g1 40005ac0: c2 22 00 00 st %g1, [ %o0 ] 40005ac4: 81 c7 e0 08 ret 40005ac8: 81 e8 00 00 restore rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 40005acc: 40 00 30 0b call 40011af8 <__errno> <== NOT EXECUTED 40005ad0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005ad4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40005ad8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005adc: 81 c7 e0 08 ret <== NOT EXECUTED 40005ae0: 81 e8 00 00 restore <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40005ae4: 81 c7 e0 08 ret <== NOT EXECUTED 40005ae8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40005aec: 40 00 30 03 call 40011af8 <__errno> <== NOT EXECUTED 40005af0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005af4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40005af8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005afc: 81 c7 e0 08 ret <== NOT EXECUTED 40005b00: 81 e8 00 00 restore <== NOT EXECUTED 4001af68 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001af68: 9d e3 bf 98 save %sp, -104, %sp 4001af6c: 21 10 00 74 sethi %hi(0x4001d000), %l0 4001af70: a0 14 21 38 or %l0, 0x138, %l0 ! 4001d138 4001af74: 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())) { 4001af78: 03 10 00 75 sethi %hi(0x4001d400), %g1 4001af7c: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 4001d4a0 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001af80: 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())) { 4001af84: 80 a0 60 03 cmp %g1, 3 4001af88: 02 80 00 36 be 4001b060 4001af8c: c4 24 20 10 st %g2, [ %l0 + 0x10 ] } /* * Continue with realloc(). */ if ( !ptr ) 4001af90: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4001af94: 02 80 00 3e be 4001b08c 4001af98: 80 a6 60 00 cmp %i1, 0 return malloc( size ); if ( !size ) { 4001af9c: 02 80 00 11 be 4001afe0 4001afa0: 23 10 00 72 sethi %hi(0x4001c800), %l1 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 4001afa4: d0 04 60 20 ld [ %l1 + 0x20 ], %o0 ! 4001c820 4001afa8: 92 10 00 18 mov %i0, %o1 4001afac: 40 00 00 75 call 4001b180 <_Protected_heap_Get_block_size> 4001afb0: 94 07 bf fc add %fp, -4, %o2 4001afb4: 80 8a 20 ff btst 0xff, %o0 4001afb8: 02 80 00 0f be 4001aff4 4001afbc: d0 04 60 20 ld [ %l1 + 0x20 ], %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 ) ) { 4001afc0: 92 10 00 18 mov %i0, %o1 4001afc4: 40 00 00 7c call 4001b1b4 <_Protected_heap_Resize_block> 4001afc8: 94 10 00 19 mov %i1, %o2 4001afcc: 80 8a 20 ff btst 0xff, %o0 4001afd0: 02 80 00 0f be 4001b00c 4001afd4: 01 00 00 00 nop memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 4001afd8: 81 c7 e0 08 ret 4001afdc: 81 e8 00 00 restore */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 4001afe0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001afe4: 7f ff c3 0e call 4000bc1c <== NOT EXECUTED 4001afe8: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 4001afec: 81 c7 e0 08 ret <== NOT EXECUTED 4001aff0: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 4001aff4: 7f ff d0 4b call 4000f120 <__errno> 4001aff8: b0 10 20 00 clr %i0 4001affc: 82 10 20 16 mov 0x16, %g1 4001b000: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4001b004: 81 c7 e0 08 ret 4001b008: 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 ); 4001b00c: 7f ff c4 7c call 4000c1fc 4001b010: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001b014: 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 ); 4001b018: a2 10 00 08 mov %o0, %l1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001b01c: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 4001b020: 80 a2 20 00 cmp %o0, 0 4001b024: 02 80 00 18 be 4001b084 4001b028: c2 24 20 04 st %g1, [ %l0 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4001b02c: c2 07 bf fc ld [ %fp + -4 ], %g1 4001b030: 80 a6 40 01 cmp %i1, %g1 4001b034: 08 80 00 03 bleu 4001b040 4001b038: 94 10 00 19 mov %i1, %o2 4001b03c: 94 10 00 01 mov %g1, %o2 4001b040: 92 10 00 18 mov %i0, %o1 4001b044: 7f ff d2 72 call 4000fa0c 4001b048: 90 10 00 11 mov %l1, %o0 free( ptr ); 4001b04c: 90 10 00 18 mov %i0, %o0 4001b050: 7f ff c2 f3 call 4000bc1c 4001b054: b0 10 00 11 mov %l1, %i0 return new_area; 4001b058: 81 c7 e0 08 ret 4001b05c: 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) 4001b060: 03 10 00 74 sethi %hi(0x4001d000), %g1 4001b064: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 4001d300 <_Thread_Dispatch_disable_level> 4001b068: 80 a0 60 00 cmp %g1, 0 4001b06c: 12 80 00 06 bne 4001b084 4001b070: 03 10 00 74 sethi %hi(0x4001d000), %g1 return (void *) 0; if (_ISR_Nest_level > 0) 4001b074: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 4001d398 <_ISR_Nest_level> 4001b078: 80 a0 60 00 cmp %g1, 0 4001b07c: 02 bf ff c6 be 4001af94 4001b080: 80 a6 20 00 cmp %i0, 0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 4001b084: 81 c7 e0 08 ret 4001b088: 91 e8 20 00 restore %g0, 0, %o0 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 4001b08c: 7f ff c4 5c call 4000c1fc 4001b090: 90 10 00 19 mov %i1, %o0 4001b094: 81 c7 e0 08 ret 4001b098: 91 e8 00 08 restore %g0, %o0, %o0 40009a40 : #include int rmdir( const char *pathname ) { 40009a40: 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 ); 40009a44: 7f ff f9 ca call 4000816c 40009a48: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 40009a4c: a0 92 20 00 orcc %o0, 0, %l0 40009a50: 32 80 00 95 bne,a 40009ca4 40009a54: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 40009a58: c2 4e 00 00 ldsb [ %i0 ], %g1 40009a5c: 80 a0 60 5c cmp %g1, 0x5c 40009a60: 02 80 00 13 be 40009aac 40009a64: 80 a0 60 2f cmp %g1, 0x2f 40009a68: 02 80 00 11 be 40009aac 40009a6c: 80 a0 60 00 cmp %g1, 0 40009a70: 02 80 00 10 be 40009ab0 <== NOT EXECUTED 40009a74: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 40009a78: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED 40009a7c: a2 10 20 00 clr %l1 <== NOT EXECUTED 40009a80: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40009a84: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 40009a88: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 40009a8c: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 40009a90: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 40009a94: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED 40009a98: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40009a9c: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED 40009aa0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40009aa4: 10 80 00 0f b 40009ae0 <== NOT EXECUTED 40009aa8: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED 40009aac: 03 10 01 a9 sethi %hi(0x4006a400), %g1 40009ab0: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 40009ab4: a2 10 20 00 clr %l1 40009ab8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40009abc: c4 27 bf ec st %g2, [ %fp + -20 ] 40009ac0: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 40009ac4: c4 27 bf f0 st %g2, [ %fp + -16 ] 40009ac8: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 40009acc: c4 27 bf f4 st %g2, [ %fp + -12 ] 40009ad0: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 40009ad4: c4 27 bf f8 st %g2, [ %fp + -8 ] 40009ad8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40009adc: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009ae0: c2 07 bf ec ld [ %fp + -20 ], %g1 name = pathname + parentpathlen; 40009ae4: b0 06 00 10 add %i0, %l0, %i0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009ae8: c2 27 bf d8 st %g1, [ %fp + -40 ] 40009aec: c2 07 bf f0 ld [ %fp + -16 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40009af0: 90 10 00 18 mov %i0, %o0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009af4: c2 27 bf dc st %g1, [ %fp + -36 ] 40009af8: 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 ), 40009afc: a0 07 bf d8 add %fp, -40, %l0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009b00: c2 27 bf e0 st %g1, [ %fp + -32 ] 40009b04: c2 07 bf f8 ld [ %fp + -8 ], %g1 40009b08: c2 27 bf e4 st %g1, [ %fp + -28 ] 40009b0c: c2 07 bf fc ld [ %fp + -4 ], %g1 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40009b10: 40 01 07 46 call 4004b828 40009b14: c2 27 bf e8 st %g1, [ %fp + -24 ] 40009b18: 92 10 00 08 mov %o0, %o1 40009b1c: 7f ff f9 75 call 400080f0 40009b20: 90 10 00 18 mov %i0, %o0 40009b24: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 40009b28: 40 01 07 40 call 4004b828 40009b2c: 90 10 00 18 mov %i0, %o0 40009b30: 94 10 20 00 clr %o2 40009b34: 92 10 00 08 mov %o0, %o1 40009b38: 96 10 00 10 mov %l0, %o3 40009b3c: 90 10 00 18 mov %i0, %o0 40009b40: 7f ff f9 ab call 400081ec 40009b44: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 40009b48: 80 a2 20 00 cmp %o0, 0 40009b4c: 12 80 00 2a bne 40009bf4 40009b50: c4 07 bf e4 ld [ %fp + -28 ], %g2 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40009b54: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40009b58: 80 a0 60 00 cmp %g1, 0 40009b5c: 22 80 00 78 be,a 40009d3c 40009b60: 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 ){ 40009b64: 9f c0 40 00 call %g1 40009b68: 90 10 00 10 mov %l0, %o0 40009b6c: 80 a2 20 01 cmp %o0, 1 40009b70: 12 80 00 26 bne 40009c08 40009b74: c2 07 bf e0 ld [ %fp + -32 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40009b78: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40009b7c: 80 a0 60 00 cmp %g1, 0 40009b80: 02 80 00 53 be 40009ccc 40009b84: 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 ); 40009b88: 92 10 00 10 mov %l0, %o1 40009b8c: 9f c0 40 00 call %g1 40009b90: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 40009b94: c2 07 bf e4 ld [ %fp + -28 ], %g1 40009b98: 80 a0 60 00 cmp %g1, 0 40009b9c: 02 80 00 08 be 40009bbc 40009ba0: b0 10 00 08 mov %o0, %i0 40009ba4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009ba8: 80 a0 60 00 cmp %g1, 0 40009bac: 02 80 00 05 be 40009bc0 40009bb0: 80 8c 60 ff btst 0xff, %l1 40009bb4: 9f c0 40 00 call %g1 40009bb8: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40009bbc: 80 8c 60 ff btst 0xff, %l1 40009bc0: 02 80 00 0b be 40009bec 40009bc4: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40009bc8: 80 a0 60 00 cmp %g1, 0 40009bcc: 02 80 00 5a be 40009d34 40009bd0: 01 00 00 00 nop 40009bd4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009bd8: 80 a0 60 00 cmp %g1, 0 40009bdc: 02 80 00 56 be 40009d34 40009be0: 01 00 00 00 nop 40009be4: 9f c0 40 00 call %g1 40009be8: 90 10 00 12 mov %l2, %o0 40009bec: 81 c7 e0 08 ret 40009bf0: 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 ) 40009bf4: 80 8c 60 ff btst 0xff, %l1 40009bf8: 12 80 00 20 bne 40009c78 40009bfc: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 40009c00: 81 c7 e0 08 ret 40009c04: 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 ); 40009c08: c2 07 bf e4 ld [ %fp + -28 ], %g1 40009c0c: 80 a0 60 00 cmp %g1, 0 40009c10: 02 80 00 09 be 40009c34 40009c14: 80 8c 60 ff btst 0xff, %l1 40009c18: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009c1c: 80 a0 60 00 cmp %g1, 0 40009c20: 02 80 00 05 be 40009c34 40009c24: 80 8c 60 ff btst 0xff, %l1 40009c28: 9f c0 40 00 call %g1 40009c2c: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40009c30: 80 8c 60 ff btst 0xff, %l1 40009c34: 02 80 00 0b be 40009c60 40009c38: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40009c3c: 80 a0 60 00 cmp %g1, 0 40009c40: 02 80 00 08 be 40009c60 40009c44: 01 00 00 00 nop 40009c48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009c4c: 80 a0 60 00 cmp %g1, 0 40009c50: 02 80 00 04 be 40009c60 40009c54: 01 00 00 00 nop 40009c58: 9f c0 40 00 call %g1 40009c5c: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40009c60: 40 00 eb c7 call 40044b7c <__errno> 40009c64: b0 10 3f ff mov -1, %i0 40009c68: 82 10 20 14 mov 0x14, %g1 40009c6c: c2 22 00 00 st %g1, [ %o0 ] 40009c70: 81 c7 e0 08 ret 40009c74: 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 ); 40009c78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009c7c: 02 bf ff dc be 40009bec <== NOT EXECUTED 40009c80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009c84: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009c88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009c8c: 02 bf ff d8 be 40009bec <== NOT EXECUTED 40009c90: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 40009c94: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009c98: 01 00 00 00 nop <== NOT EXECUTED 40009c9c: 81 c7 e0 08 ret <== NOT EXECUTED 40009ca0: 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, 40009ca4: 92 10 00 10 mov %l0, %o1 40009ca8: 94 10 20 02 mov 2, %o2 40009cac: 96 07 bf ec add %fp, -20, %o3 40009cb0: 7f ff f9 90 call 400082f0 40009cb4: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 40009cb8: 80 a2 20 00 cmp %o0, 0 40009cbc: 12 bf ff d1 bne 40009c00 40009cc0: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009cc4: 10 bf ff 88 b 40009ae4 40009cc8: 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 ); 40009ccc: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 40009cd0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009cd4: 02 80 00 09 be 40009cf8 <== NOT EXECUTED 40009cd8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40009cdc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009ce0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009ce4: 02 80 00 05 be 40009cf8 <== NOT EXECUTED 40009ce8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40009cec: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009cf0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 40009cf4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40009cf8: 02 80 00 0b be 40009d24 <== NOT EXECUTED 40009cfc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 40009d00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009d04: 02 80 00 08 be 40009d24 <== NOT EXECUTED 40009d08: 01 00 00 00 nop <== NOT EXECUTED 40009d0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009d10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009d14: 02 80 00 04 be 40009d24 <== NOT EXECUTED 40009d18: 01 00 00 00 nop <== NOT EXECUTED 40009d1c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009d20: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009d24: 40 00 eb 96 call 40044b7c <__errno> <== NOT EXECUTED 40009d28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009d2c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009d30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009d34: 81 c7 e0 08 ret <== NOT EXECUTED 40009d38: 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 ); 40009d3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009d40: 12 bf ff eb bne 40009cec <== NOT EXECUTED 40009d44: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40009d48: 30 bf ff ec b,a 40009cf8 <== NOT EXECUTED 40016064 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 40016064: 11 10 00 a1 sethi %hi(0x40028400), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40016068: 81 c3 e0 08 retl <== NOT EXECUTED 4001606c: 90 12 20 b8 or %o0, 0xb8, %o0 ! 400284b8 <== NOT EXECUTED 40012d9c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40012d9c: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40012da0: 90 10 00 18 mov %i0, %o0 40012da4: 40 00 00 0b call 40012dd0 40012da8: 92 10 00 19 mov %i1, %o1 if (nap) 40012dac: 80 a2 20 00 cmp %o0, 0 40012db0: 02 80 00 05 be 40012dc4 40012db4: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 40012db8: f0 02 00 00 ld [ %o0 ], %i0 40012dbc: 81 c7 e0 08 ret 40012dc0: 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); 40012dc4: 40 00 0c a8 call 40016064 <== NOT EXECUTED 40012dc8: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40012dcc: 01 00 00 00 nop 4000f070 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000f070: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000f074: d0 06 00 00 ld [ %i0 ], %o0 4000f078: 80 a2 20 00 cmp %o0, 0 4000f07c: 02 80 00 1d be 4000f0f0 4000f080: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000f084: 40 00 03 8d call 4000feb8 4000f088: 92 12 60 30 or %o1, 0x30, %o1 ! 4001c030 <__FUNCTION__.5901+0x18> 4000f08c: 80 a2 20 00 cmp %o0, 0 4000f090: 02 80 00 11 be 4000f0d4 4000f094: 84 10 20 00 clr %g2 default_ap = ap++; for ( ; ap->name; ap++) if (ap->local_value == local_value) 4000f098: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000f09c: 80 a0 40 19 cmp %g1, %i1 4000f0a0: 32 80 00 07 bne,a 4000f0bc 4000f0a4: b0 06 20 0c add %i0, 0xc, %i0 4000f0a8: 30 80 00 14 b,a 4000f0f8 4000f0ac: 80 a0 40 19 cmp %g1, %i1 4000f0b0: 02 80 00 12 be 4000f0f8 4000f0b4: 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++) 4000f0b8: b0 06 20 0c add %i0, 0xc, %i0 4000f0bc: c2 06 00 00 ld [ %i0 ], %g1 4000f0c0: 80 a0 60 00 cmp %g1, 0 4000f0c4: 32 bf ff fa bne,a 4000f0ac 4000f0c8: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (ap->local_value == local_value) return ap; return default_ap; } 4000f0cc: 81 c7 e0 08 ret 4000f0d0: 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++) 4000f0d4: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 4000f0d8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000f0dc: 02 80 00 07 be 4000f0f8 <== NOT EXECUTED 4000f0e0: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED 4000f0e4: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000f0e8: 10 bf ff ec b 4000f098 <== NOT EXECUTED 4000f0ec: 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)) 4000f0f0: 81 c7 e0 08 ret <== NOT EXECUTED 4000f0f4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000f0f8: 81 c7 e0 08 ret 4000f0fc: 81 e8 00 00 restore 4000e298 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000e298: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000e29c: d0 06 00 00 ld [ %i0 ], %o0 4000e2a0: 80 a2 20 00 cmp %o0, 0 4000e2a4: 02 80 00 1d be 4000e318 4000e2a8: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000e2ac: 40 00 07 03 call 4000feb8 4000e2b0: 92 12 60 30 or %o1, 0x30, %o1 ! 4001c030 <__FUNCTION__.5901+0x18> 4000e2b4: 80 a2 20 00 cmp %o0, 0 4000e2b8: 02 80 00 11 be 4000e2fc 4000e2bc: 84 10 20 00 clr %g2 default_ap = ap++; for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4000e2c0: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000e2c4: 80 a0 40 19 cmp %g1, %i1 4000e2c8: 32 80 00 07 bne,a 4000e2e4 4000e2cc: b0 06 20 0c add %i0, 0xc, %i0 4000e2d0: 30 80 00 14 b,a 4000e320 4000e2d4: 80 a0 40 19 cmp %g1, %i1 4000e2d8: 02 80 00 12 be 4000e320 4000e2dc: 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++) 4000e2e0: b0 06 20 0c add %i0, 0xc, %i0 4000e2e4: c2 06 00 00 ld [ %i0 ], %g1 4000e2e8: 80 a0 60 00 cmp %g1, 0 4000e2ec: 32 bf ff fa bne,a 4000e2d4 4000e2f0: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000e2f4: 81 c7 e0 08 ret 4000e2f8: 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++) 4000e2fc: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED 4000e300: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000e304: 02 80 00 07 be 4000e320 <== NOT EXECUTED 4000e308: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED 4000e30c: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000e310: 10 bf ff ec b 4000e2c0 <== NOT EXECUTED 4000e314: 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)) 4000e318: 81 c7 e0 08 ret <== NOT EXECUTED 4000e31c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e320: 81 c7 e0 08 ret 4000e324: 81 e8 00 00 restore 4000ed0c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000ed0c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000ed10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ed14: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ed18: 40 00 00 d6 call 4000f070 <== NOT EXECUTED 4000ed1c: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000ed20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ed24: 32 80 00 02 bne,a 4000ed2c <== NOT EXECUTED 4000ed28: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000ed2c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed30: 81 e8 00 00 restore <== NOT EXECUTED 4000345c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 4000345c: 9d e3 bf a0 save %sp, -96, %sp const char *p; if ( !name ) 40003460: 80 a6 20 00 cmp %i0, 0 40003464: 12 80 00 05 bne 40003478 40003468: 80 a6 60 00 cmp %i1, 0 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 4000347c: 80 a6 a0 00 cmp %i2, 0 return NULL; if ( !length ) 40003480: 22 bf ff fc be,a 40003470 40003484: b2 10 20 00 clr %i1 return NULL; value[0] = '\0'; 40003488: c0 2e 40 00 clrb [ %i1 ] p = rtems_bsp_cmdline_get_param_raw( name ); 4000348c: 40 00 00 25 call 40003520 40003490: 90 10 00 18 mov %i0, %o0 if ( !p ) 40003494: 80 a2 20 00 cmp %o0, 0 40003498: 22 bf ff f6 be,a 40003470 4000349c: b2 10 20 00 clr %i1 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 400034b0: b4 86 bf ff addcc %i2, -1, %i2 400034b4: 02 bf ff ef be 40003470 400034b8: 88 10 20 00 clr %g4 400034bc: 82 10 20 00 clr %g1 400034c0: 10 80 00 12 b 40003508 400034c4: 9a 10 20 00 clr %o5 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 400034c8: 32 80 00 06 bne,a 400034e0 400034cc: c6 2e 40 04 stb %g3, [ %i1 + %g4 ] <== NOT EXECUTED 400034d0: 80 a0 a0 20 cmp %g2, 0x20 400034d4: 02 bf ff e7 be 40003470 400034d8: 01 00 00 00 nop break; value[i++] = *p++; 400034dc: c6 2e 40 04 stb %g3, [ %i1 + %g4 ] 400034e0: 82 00 60 01 inc %g1 value[i] = '\0'; 400034e4: c0 2e 40 01 clrb [ %i1 + %g1 ] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 400034f8: 88 10 00 01 mov %g1, %g4 400034fc: 80 a0 40 1a cmp %g1, %i2 40003500: 1a bf ff dc bcc 40003470 40003504: 01 00 00 00 nop if ( *p == '\"' ) { 40003508: 85 38 a0 18 sra %g2, 0x18, %g2 4000350c: 80 a0 a0 22 cmp %g2, 0x22 40003510: 12 bf ff ee bne 400034c8 40003514: 80 8b 60 01 btst 1, %o5 quotes++; 40003518: 10 bf ff f1 b 400034dc <== NOT EXECUTED 4000351c: 9a 03 60 01 inc %o5 <== NOT EXECUTED 40003554 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 40003554: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 40003558: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000355c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003560: 7f ff ff bf call 4000345c <== NOT EXECUTED 40003564: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if ( !p ) 40003568: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000356c: 12 80 00 05 bne 40003580 <== NOT EXECUTED 40003570: 01 00 00 00 nop <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 40003574: b2 10 20 00 clr %i1 ! 0 <== NOT EXECUTED } 40003578: 81 c7 e0 08 ret <== NOT EXECUTED 4000357c: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 40003580: 40 00 33 ee call 40010538 <== NOT EXECUTED 40003584: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( *rhs != '=' ) 40003588: c2 4c 40 08 ldsb [ %l1 + %o0 ], %g1 <== NOT EXECUTED 4000358c: 80 a0 60 3d cmp %g1, 0x3d <== NOT EXECUTED 40003590: 12 bf ff f9 bne 40003574 <== NOT EXECUTED 40003594: a2 04 40 08 add %l1, %o0, %l1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 40003598: c6 0c 60 01 ldub [ %l1 + 1 ], %g3 <== NOT EXECUTED 4000359c: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED 400035a0: 89 38 a0 18 sra %g2, 0x18, %g4 <== NOT EXECUTED 400035a4: 80 a1 20 22 cmp %g4, 0x22 <== NOT EXECUTED 400035a8: 02 80 00 14 be 400035f8 <== NOT EXECUTED 400035ac: 82 04 60 01 add %l1, 1, %g1 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) 400035b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400035b4: 02 80 00 09 be 400035d8 <== NOT EXECUTED 400035b8: 84 10 00 19 mov %i1, %g2 <== NOT EXECUTED *d++ = *rhs++; 400035bc: c6 28 80 00 stb %g3, [ %g2 ] <== NOT EXECUTED 400035c0: 82 00 60 01 inc %g1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 400035c4: c6 48 40 00 ldsb [ %g1 ], %g3 <== NOT EXECUTED *d++ = *rhs++; 400035c8: 84 00 a0 01 inc %g2 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 400035cc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400035d0: 12 bf ff fb bne 400035bc <== NOT EXECUTED 400035d4: c6 08 40 00 ldub [ %g1 ], %g3 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 400035d8: c6 48 bf ff ldsb [ %g2 + -1 ], %g3 <== NOT EXECUTED 400035dc: 80 a0 e0 22 cmp %g3, 0x22 <== NOT EXECUTED 400035e0: 02 80 00 03 be 400035ec <== NOT EXECUTED 400035e4: 82 00 bf ff add %g2, -1, %g1 <== NOT EXECUTED 400035e8: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED d--; *d = '\0'; 400035ec: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED return value; } 400035f0: 81 c7 e0 08 ret <== NOT EXECUTED 400035f4: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 400035f8: c6 0c 60 02 ldub [ %l1 + 2 ], %g3 <== NOT EXECUTED 400035fc: 82 04 60 02 add %l1, 2, %g1 <== NOT EXECUTED 40003600: 10 bf ff ec b 400035b0 <== NOT EXECUTED 40003604: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED 40003e34 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003e34: 9d e3 bf 60 save %sp, -160, %sp Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40003e38: 80 a6 60 00 cmp %i1, 0 40003e3c: 02 80 00 72 be 40004004 40003e40: 01 00 00 00 nop * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 40003e44: 40 00 15 d7 call 400095a0 <_TOD_Get_uptime> 40003e48: 90 07 bf f0 add %fp, -16, %o0 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40003e4c: 92 07 bf f0 add %fp, -16, %o1 40003e50: a8 07 bf e8 add %fp, -24, %l4 40003e54: 11 10 00 ae sethi %hi(0x4002b800), %o0 40003e58: 94 10 00 14 mov %l4, %o2 40003e5c: 40 00 20 30 call 4000bf1c <_Timespec_Subtract> 40003e60: 90 12 21 4c or %o0, 0x14c, %o0 } } } #endif (*print)( 40003e64: 90 10 00 18 mov %i0, %o0 40003e68: 13 10 00 84 sethi %hi(0x40021000), %o1 40003e6c: 37 10 00 ad sethi %hi(0x4002b400), %i3 40003e70: 92 12 60 f0 or %o1, 0xf0, %o1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003e74: 3b 10 00 84 sethi %hi(0x40021000), %i5 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003e78: 2f 10 00 ad sethi %hi(0x4002b400), %l7 } } } #endif (*print)( 40003e7c: 9f c6 40 00 call %i1 40003e80: 2d 10 00 84 sethi %hi(0x40021000), %l6 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003e84: a4 07 bf c8 add %fp, -56, %l2 } } } #endif (*print)( 40003e88: b6 16 e1 f4 or %i3, 0x1f4, %i3 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003e8c: ba 17 62 68 or %i5, 0x268, %i5 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003e90: ae 15 e3 4c or %l7, 0x34c, %l7 /* * Print the information */ (*print)( context, 40003e94: ac 15 a2 80 or %l6, 0x280, %l6 40003e98: a6 07 bf e0 add %fp, -32, %l3 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40003e9c: aa 07 bf fc add %fp, -4, %l5 40003ea0: b8 07 bf f8 add %fp, -8, %i4 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 40003ea4: b4 07 bf d8 add %fp, -40, %i2 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40003ea8: c2 06 c0 00 ld [ %i3 ], %g1 40003eac: 80 a0 60 00 cmp %g1, 0 40003eb0: 22 80 00 47 be,a 40003fcc 40003eb4: b6 06 e0 04 add %i3, 4, %i3 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40003eb8: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40003ebc: 80 a4 60 00 cmp %l1, 0 40003ec0: 22 80 00 43 be,a 40003fcc 40003ec4: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40003ec8: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40003ecc: 86 90 60 00 orcc %g1, 0, %g3 40003ed0: 02 80 00 3e be 40003fc8 40003ed4: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40003ed8: 10 80 00 17 b 40003f34 40003edc: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40003ee0: 96 10 00 1c mov %i4, %o3 40003ee4: 90 10 00 13 mov %l3, %o0 40003ee8: 40 00 1f 7b call 4000bcd4 <_Timespec_Divide> 40003eec: 92 10 00 14 mov %l4, %o1 /* * Print the information */ (*print)( context, 40003ef0: d0 07 bf e4 ld [ %fp + -28 ], %o0 40003ef4: 40 00 67 3c call 4001dbe4 <.udiv> 40003ef8: 92 10 23 e8 mov 0x3e8, %o1 40003efc: d4 07 bf e0 ld [ %fp + -32 ], %o2 40003f00: d8 07 bf fc ld [ %fp + -4 ], %o4 40003f04: da 07 bf f8 ld [ %fp + -8 ], %o5 40003f08: 96 10 00 08 mov %o0, %o3 40003f0c: 92 10 00 16 mov %l6, %o1 40003f10: 9f c6 40 00 call %i1 40003f14: 90 10 00 18 mov %i0, %o0 40003f18: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 40003f1c: 83 28 e0 10 sll %g3, 0x10, %g1 40003f20: 83 30 60 10 srl %g1, 0x10, %g1 40003f24: 80 a0 40 10 cmp %g1, %l0 40003f28: 2a 80 00 29 bcs,a 40003fcc 40003f2c: b6 06 e0 04 add %i3, 4, %i3 the_thread = (Thread_Control *)information->local_table[ i ]; 40003f30: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40003f34: 83 2c 20 02 sll %l0, 2, %g1 40003f38: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003f3c: 94 10 00 12 mov %l2, %o2 40003f40: 92 10 20 0d mov 0xd, %o1 information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 40003f44: 80 a0 60 00 cmp %g1, 0 40003f48: 02 bf ff f5 be 40003f1c 40003f4c: a0 04 20 01 inc %l0 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003f50: d0 00 60 08 ld [ %g1 + 8 ], %o0 40003f54: 40 00 10 83 call 40008160 40003f58: c2 27 bf c4 st %g1, [ %fp + -60 ] (*print)( 40003f5c: c2 07 bf c4 ld [ %fp + -60 ], %g1 40003f60: 90 10 00 18 mov %i0, %o0 40003f64: d4 00 60 08 ld [ %g1 + 8 ], %o2 40003f68: 92 10 00 1d mov %i5, %o1 40003f6c: 9f c6 40 00 call %i1 40003f70: 96 10 00 12 mov %l2, %o3 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40003f74: c2 07 bf c4 ld [ %fp + -60 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003f78: c4 05 c0 00 ld [ %l7 ], %g2 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40003f7c: c6 00 60 84 ld [ %g1 + 0x84 ], %g3 40003f80: c6 27 bf e0 st %g3, [ %fp + -32 ] 40003f84: c6 00 60 88 ld [ %g1 + 0x88 ], %g3 40003f88: c6 27 bf e4 st %g3, [ %fp + -28 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003f8c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 40003f90: c2 00 60 08 ld [ %g1 + 8 ], %g1 40003f94: 80 a0 80 01 cmp %g2, %g1 40003f98: 32 bf ff d2 bne,a 40003ee0 40003f9c: 94 10 00 15 mov %l5, %o2 Timestamp_Control used; _Timestamp_Subtract( 40003fa0: 92 07 bf f0 add %fp, -16, %o1 40003fa4: 94 10 00 1a mov %i2, %o2 40003fa8: 11 10 00 ad sethi %hi(0x4002b400), %o0 40003fac: 40 00 1f dc call 4000bf1c <_Timespec_Subtract> 40003fb0: 90 12 23 54 or %o0, 0x354, %o0 ! 4002b754 <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 40003fb4: 90 10 00 13 mov %l3, %o0 40003fb8: 40 00 1f 2e call 4000bc70 <_Timespec_Add_to> 40003fbc: 92 10 00 1a mov %i2, %o1 }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40003fc0: 10 bf ff c8 b 40003ee0 40003fc4: 94 10 00 15 mov %l5, %o2 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 40003fc8: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 40003fcc: 03 10 00 ad sethi %hi(0x4002b400), %g1 40003fd0: 82 10 62 04 or %g1, 0x204, %g1 ! 4002b604 <_Objects_Information_table+0x14> 40003fd4: 80 a6 c0 01 cmp %i3, %g1 40003fd8: 32 bf ff b5 bne,a 40003eac 40003fdc: c2 06 c0 00 ld [ %i3 ], %g1 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 40003fe0: d0 07 bf ec ld [ %fp + -20 ], %o0 40003fe4: 40 00 67 00 call 4001dbe4 <.udiv> 40003fe8: 92 10 23 e8 mov 0x3e8, %o1 40003fec: d4 07 bf e8 ld [ %fp + -24 ], %o2 40003ff0: 96 10 00 08 mov %o0, %o3 40003ff4: 13 10 00 84 sethi %hi(0x40021000), %o1 40003ff8: 90 10 00 18 mov %i0, %o0 40003ffc: 9f c6 40 00 call %i1 40004000: 92 12 62 98 or %o1, 0x298, %o1 40004004: 81 c7 e0 08 ret 40004008: 81 e8 00 00 restore 4000ecd8 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4000ecd8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000ecdc: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000ece0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ece4: 40 00 00 0a call 4000ed0c <== NOT EXECUTED 4000ece8: 90 12 20 dc or %o0, 0xdc, %o0 <== NOT EXECUTED 4000ecec: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000ecf0: 02 80 00 05 be 4000ed04 <== NOT EXECUTED 4000ecf4: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000ecf8: 40 00 01 0a call 4000f120 <__errno> <== NOT EXECUTED 4000ecfc: 01 00 00 00 nop <== NOT EXECUTED 4000ed00: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000ed04: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed08: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40008bbc : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 40008bbc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40008bc0: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 40008bc4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008bc8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008bcc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008bd0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 40008bd4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008bd8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008bdc: 7f ff ff 7e call 400089d4 <== NOT EXECUTED 40008be0: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40008be4: 81 c7 e0 08 ret <== NOT EXECUTED 40008be8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003268 : } int rtems_filesystem_dirname( const char *pathname ) { 40003268: 9d e3 bf a0 save %sp, -96, %sp int len = strlen( pathname ); 4000326c: 40 00 33 64 call 4000fffc 40003270: 90 10 00 18 mov %i0, %o0 while ( len ) { 40003274: 80 a2 20 00 cmp %o0, 0 40003278: 02 80 00 19 be 400032dc 4000327c: 84 10 00 08 mov %o0, %g2 len--; 40003280: 90 02 3f ff add %o0, -1, %o0 if ( rtems_filesystem_is_separator( pathname[len] ) ) 40003284: c2 4e 00 08 ldsb [ %i0 + %o0 ], %g1 40003288: 80 a0 60 5c cmp %g1, 0x5c 4000328c: 02 80 00 14 be 400032dc 40003290: 80 a0 60 2f cmp %g1, 0x2f 40003294: 02 80 00 12 be 400032dc 40003298: 80 a0 60 00 cmp %g1, 0 4000329c: 12 80 00 09 bne 400032c0 400032a0: a0 06 00 02 add %i0, %g2, %l0 break; } return len; } 400032a4: 81 c7 e0 08 ret <== NOT EXECUTED 400032a8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { int len = strlen( pathname ); while ( len ) { len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 400032ac: 80 a0 60 2f cmp %g1, 0x2f 400032b0: 02 80 00 0b be 400032dc 400032b4: 80 a0 60 00 cmp %g1, 0 400032b8: 02 80 00 09 be 400032dc 400032bc: a0 04 3f ff add %l0, -1, %l0 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 400032c0: 80 a2 20 00 cmp %o0, 0 400032c4: 02 80 00 07 be 400032e0 400032c8: b0 10 00 08 mov %o0, %i0 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 400032cc: c2 4c 3f fe ldsb [ %l0 + -2 ], %g1 400032d0: 80 a0 60 5c cmp %g1, 0x5c 400032d4: 12 bf ff f6 bne 400032ac 400032d8: 90 02 3f ff add %o0, -1, %o0 break; } return len; } 400032dc: b0 10 00 08 mov %o0, %i0 400032e0: 81 c7 e0 08 ret 400032e4: 81 e8 00 00 restore 400033ec : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 400033ec: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 400033f0: 80 a6 20 00 cmp %i0, 0 400033f4: 02 80 00 33 be 400034c0 400033f8: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 400033fc: 22 80 00 2b be,a 400034a8 40003400: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40003404: c2 4e 00 00 ldsb [ %i0 ], %g1 40003408: 80 a0 60 5c cmp %g1, 0x5c 4000340c: 02 80 00 06 be 40003424 40003410: 80 a0 60 2f cmp %g1, 0x2f 40003414: 02 80 00 04 be 40003424 40003418: 80 a0 60 00 cmp %g1, 0 4000341c: 12 80 00 13 bne 40003468 40003420: 03 10 00 72 sethi %hi(0x4001c800), %g1 40003424: 03 10 00 72 sethi %hi(0x4001c800), %g1 40003428: c4 00 61 28 ld [ %g1 + 0x128 ], %g2 ! 4001c928 4000342c: 86 10 20 01 mov 1, %g3 40003430: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4 40003434: 82 10 20 01 mov 1, %g1 40003438: c8 26 c0 00 st %g4, [ %i3 ] 4000343c: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4 40003440: c8 26 e0 04 st %g4, [ %i3 + 4 ] 40003444: c8 00 a0 20 ld [ %g2 + 0x20 ], %g4 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 40003448: b2 26 40 01 sub %i1, %g1, %i1 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 4000344c: c8 26 e0 08 st %g4, [ %i3 + 8 ] 40003450: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4 40003454: c8 26 e0 0c st %g4, [ %i3 + 0xc ] 40003458: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2 4000345c: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 40003460: 7f ff ff a2 call 400032e8 40003464: 91 ee 00 03 restore %i0, %g3, %o0 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40003468: c4 00 61 28 ld [ %g1 + 0x128 ], %g2 4000346c: 86 10 20 00 clr %g3 40003470: c8 00 a0 04 ld [ %g2 + 4 ], %g4 40003474: 82 10 20 00 clr %g1 40003478: c8 26 c0 00 st %g4, [ %i3 ] 4000347c: c8 00 a0 08 ld [ %g2 + 8 ], %g4 40003480: c8 26 e0 04 st %g4, [ %i3 + 4 ] 40003484: c8 00 a0 0c ld [ %g2 + 0xc ], %g4 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 40003488: b2 26 40 01 sub %i1, %g1, %i1 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 4000348c: c8 26 e0 08 st %g4, [ %i3 + 8 ] 40003490: c8 00 a0 10 ld [ %g2 + 0x10 ], %g4 40003494: c8 26 e0 0c st %g4, [ %i3 + 0xc ] 40003498: c4 00 a0 14 ld [ %g2 + 0x14 ], %g2 4000349c: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 400034a0: 7f ff ff 92 call 400032e8 400034a4: 91 ee 00 03 restore %i0, %g3, %o0 if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400034a8: 40 00 2f 1e call 4000f120 <__errno> <== NOT EXECUTED 400034ac: 01 00 00 00 nop <== NOT EXECUTED 400034b0: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 400034b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 400034b8: 81 c7 e0 08 ret <== NOT EXECUTED 400034bc: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 400034c0: 40 00 2f 18 call 4000f120 <__errno> 400034c4: b0 10 3f ff mov -1, %i0 400034c8: 82 10 20 0e mov 0xe, %g1 400034cc: c2 22 00 00 st %g1, [ %o0 ] 400034d0: 81 c7 e0 08 ret 400034d4: 81 e8 00 00 restore 400032e8 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 400032e8: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 400032ec: 80 a6 20 00 cmp %i0, 0 400032f0: 02 80 00 33 be 400033bc 400032f4: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 400032f8: 02 80 00 37 be 400033d4 400032fc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 40003300: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 40003304: c2 00 40 00 ld [ %g1 ], %g1 40003308: 80 a0 60 00 cmp %g1, 0 4000330c: 02 80 00 26 be 400033a4 40003310: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 40003314: 92 10 00 19 mov %i1, %o1 40003318: 94 10 00 1a mov %i2, %o2 4000331c: 9f c0 40 00 call %g1 40003320: 96 10 00 1b mov %i3, %o3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 40003324: b0 92 20 00 orcc %o0, 0, %i0 40003328: 12 80 00 0f bne 40003364 4000332c: 80 a7 20 00 cmp %i4, 0 40003330: 02 80 00 2d be 400033e4 40003334: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40003338: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 4000333c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40003340: 80 a0 60 00 cmp %g1, 0 40003344: 22 80 00 13 be,a 40003390 40003348: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 4000334c: 9f c0 40 00 call %g1 40003350: 90 10 00 1b mov %i3, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 40003354: 90 02 3f fd add %o0, -3, %o0 40003358: 80 a2 20 01 cmp %o0, 1 4000335c: 28 80 00 04 bleu,a 4000336c 40003360: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 40003364: 81 c7 e0 08 ret 40003368: 81 e8 00 00 restore type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 4000336c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40003370: 80 a0 60 00 cmp %g1, 0 40003374: 02 80 00 06 be 4000338c 40003378: 90 10 00 1b mov %i3, %o0 * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 4000337c: 9f c0 40 00 call %g1 40003380: 92 10 00 1a mov %i2, %o1 } } return result; } 40003384: 81 c7 e0 08 ret 40003388: 91 e8 00 08 restore %g0, %o0, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 4000338c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40003390: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003394: 02 80 00 04 be 400033a4 <== NOT EXECUTED 40003398: 01 00 00 00 nop <== NOT EXECUTED 4000339c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400033a0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400033a4: 40 00 2f 5f call 4000f120 <__errno> <== NOT EXECUTED 400033a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033ac: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400033b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033b4: 81 c7 e0 08 ret <== NOT EXECUTED 400033b8: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 400033bc: 40 00 2f 59 call 4000f120 <__errno> <== NOT EXECUTED 400033c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033c4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400033c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033cc: 81 c7 e0 08 ret <== NOT EXECUTED 400033d0: 81 e8 00 00 restore <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400033d4: 40 00 2f 53 call 4000f120 <__errno> <== NOT EXECUTED 400033d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033dc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 400033e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033e4: 81 c7 e0 08 ret 400033e8: 81 e8 00 00 restore 40003090 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 40003090: 9d e3 bf 88 save %sp, -120, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 40003094: 21 10 00 72 sethi %hi(0x4001c800), %l0 40003098: c2 04 21 28 ld [ %l0 + 0x128 ], %g1 ! 4001c928 4000309c: 84 10 20 12 mov 0x12, %g2 init_fs_mount_table(); 400030a0: 40 00 01 ed call 40003854 400030a4: c4 30 60 2c sth %g2, [ %g1 + 0x2c ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 400030a8: 03 10 00 6d sethi %hi(0x4001b400), %g1 400030ac: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 4001b6fc 400030b0: 80 a0 60 00 cmp %g1, 0 400030b4: 02 80 00 45 be 400031c8 400030b8: 03 10 00 72 sethi %hi(0x4001c800), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 400030bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001c81c status = mount( 400030c0: 90 07 bf fc add %fp, -4, %o0 400030c4: d8 00 60 0c ld [ %g1 + 0xc ], %o4 400030c8: d2 00 40 00 ld [ %g1 ], %o1 400030cc: d4 00 60 04 ld [ %g1 + 4 ], %o2 400030d0: 40 00 01 e9 call 40003874 400030d4: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 400030d8: 80 a2 3f ff cmp %o0, -1 400030dc: 02 80 00 40 be 400031dc 400030e0: c4 07 bf fc ld [ %fp + -4 ], %g2 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 400030e4: c2 04 21 28 ld [ %l0 + 0x128 ], %g1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 400030e8: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 400030ec: c0 30 60 2e clrh [ %g1 + 0x2e ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 400030f0: c6 20 60 18 st %g3, [ %g1 + 0x18 ] 400030f4: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 400030f8: a4 07 bf e8 add %fp, -24, %l2 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 400030fc: c6 20 60 1c st %g3, [ %g1 + 0x1c ] 40003100: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003104: 23 10 00 6e sethi %hi(0x4001b800), %l1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40003108: c6 20 60 20 st %g3, [ %g1 + 0x20 ] 4000310c: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003110: 92 10 20 01 mov 1, %o1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40003114: c6 20 60 24 st %g3, [ %g1 + 0x24 ] 40003118: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4000311c: 94 10 20 00 clr %o2 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40003120: c4 20 60 28 st %g2, [ %g1 + 0x28 ] /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003124: 96 10 00 12 mov %l2, %o3 40003128: 98 10 20 00 clr %o4 4000312c: 40 00 00 b0 call 400033ec 40003130: 90 14 62 f0 or %l1, 0x2f0, %o0 rtems_filesystem_root = loc; 40003134: c2 04 21 28 ld [ %l0 + 0x128 ], %g1 40003138: c4 07 bf e8 ld [ %fp + -24 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4000313c: 96 10 00 12 mov %l2, %o3 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 40003140: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 40003144: c4 07 bf ec ld [ %fp + -20 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003148: 92 10 20 01 mov 1, %o1 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4000314c: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 40003150: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003154: 94 10 20 00 clr %o2 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 40003158: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4000315c: c4 07 bf f4 ld [ %fp + -12 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003160: 98 10 20 00 clr %o4 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 40003164: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 40003168: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4000316c: 90 14 62 f0 or %l1, 0x2f0, %o0 40003170: 40 00 00 9f call 400033ec 40003174: c4 20 60 28 st %g2, [ %g1 + 0x28 ] rtems_filesystem_current = loc; 40003178: c4 07 bf e8 ld [ %fp + -24 ], %g2 4000317c: c2 04 21 28 ld [ %l0 + 0x128 ], %g1 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 40003180: 11 10 00 6e sethi %hi(0x4001b800), %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 40003184: c4 20 60 04 st %g2, [ %g1 + 4 ] 40003188: c4 07 bf ec ld [ %fp + -20 ], %g2 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 4000318c: 90 12 22 f8 or %o0, 0x2f8, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 40003190: c4 20 60 08 st %g2, [ %g1 + 8 ] 40003194: c4 07 bf f0 ld [ %fp + -16 ], %g2 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 40003198: 92 10 21 ff mov 0x1ff, %o1 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 4000319c: c4 20 60 0c st %g2, [ %g1 + 0xc ] 400031a0: c4 07 bf f4 ld [ %fp + -12 ], %g2 400031a4: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 400031a8: c4 07 bf f8 ld [ %fp + -8 ], %g2 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 400031ac: 40 00 01 3f call 400036a8 400031b0: c4 20 60 14 st %g2, [ %g1 + 0x14 ] if ( status != 0 ) 400031b4: 80 a2 20 00 cmp %o0, 0 400031b8: 12 80 00 07 bne 400031d4 400031bc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 400031c0: 81 c7 e0 08 ret 400031c4: 81 e8 00 00 restore /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 400031c8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 400031cc: 40 00 10 4d call 40007300 <== NOT EXECUTED 400031d0: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 400031d4: 40 00 10 4b call 40007300 <== NOT EXECUTED 400031d8: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 400031dc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 400031e0: 40 00 10 48 call 40007300 <== NOT EXECUTED 400031e4: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 400031e8: 01 00 00 00 nop 4000c088 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4000c088: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000c08c: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 4000c090: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 4000c094: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4000c098: 81 c3 e0 08 retl <== NOT EXECUTED 4000c09c: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 400031ec : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 400031ec: 82 10 00 08 mov %o0, %g1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 400031f0: 80 a2 60 00 cmp %o1, 0 400031f4: 12 80 00 04 bne 40003204 400031f8: c4 0a 00 00 ldub [ %o0 ], %g2 pathname++; pathnamelen--; stripped++; } return stripped; } 400031fc: 81 c3 e0 08 retl <== NOT EXECUTED 40003200: 90 10 20 00 clr %o0 <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 40003204: 85 28 a0 18 sll %g2, 0x18, %g2 40003208: 85 38 a0 18 sra %g2, 0x18, %g2 4000320c: 80 a0 a0 00 cmp %g2, 0 40003210: 02 80 00 14 be 40003260 40003214: 90 10 20 00 clr %o0 40003218: 80 a0 a0 5c cmp %g2, 0x5c 4000321c: 02 80 00 04 be 4000322c 40003220: 80 a0 a0 2f cmp %g2, 0x2f 40003224: 12 80 00 0f bne 40003260 40003228: 01 00 00 00 nop { pathname++; pathnamelen--; stripped++; 4000322c: 90 02 20 01 inc %o0 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 40003230: 80 a2 40 08 cmp %o1, %o0 40003234: 02 80 00 0b be 40003260 40003238: c4 08 40 08 ldub [ %g1 + %o0 ], %g2 4000323c: 85 28 a0 18 sll %g2, 0x18, %g2 40003240: 85 38 a0 18 sra %g2, 0x18, %g2 40003244: 80 a0 a0 00 cmp %g2, 0 40003248: 02 80 00 06 be 40003260 4000324c: 80 a0 a0 5c cmp %g2, 0x5c 40003250: 02 bf ff f7 be 4000322c 40003254: 80 a0 a0 2f cmp %g2, 0x2f 40003258: 22 bf ff f6 be,a 40003230 4000325c: 90 02 20 01 inc %o0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 40003260: 81 c3 e0 08 retl 40003264: 01 00 00 00 nop 40002f00 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40002f00: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 40002f04: 40 00 34 3e call 4000fffc <== NOT EXECUTED 40002f08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002f0c: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40002f10: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40002f14: 94 10 20 00 clr %o2 <== NOT EXECUTED 40002f18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002f1c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40002f20: 40 00 01 33 call 400033ec <== NOT EXECUTED 40002f24: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002f28: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 40002f2c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002f30: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40002f34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f38: 02 80 00 13 be 40002f84 <== NOT EXECUTED 40002f3c: e4 07 bf ec ld [ %fp + -20 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 40002f40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40002f48: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40002f4c: 02 80 00 1a be 40002fb4 <== NOT EXECUTED 40002f50: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002f54: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40002f58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f5c: 02 80 00 2b be 40003008 <== NOT EXECUTED 40002f60: 01 00 00 00 nop <== NOT EXECUTED 40002f64: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002f68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f6c: 02 80 00 27 be 40003008 <== NOT EXECUTED 40002f70: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40002f74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f78: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED 40002f7c: 81 c7 e0 08 ret <== NOT EXECUTED 40002f80: 81 e8 00 00 restore <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 40002f84: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002f88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f8c: 02 80 00 04 be 40002f9c <== NOT EXECUTED 40002f90: 01 00 00 00 nop <== NOT EXECUTED 40002f94: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f98: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002f9c: 40 00 30 61 call 4000f120 <__errno> <== NOT EXECUTED 40002fa0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002fa4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002fa8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002fac: 81 c7 e0 08 ret <== NOT EXECUTED 40002fb0: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40002fb4: 12 bf ff e9 bne 40002f58 <== NOT EXECUTED 40002fb8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 40002fbc: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 40002fc0: 40 00 34 0f call 4000fffc <== NOT EXECUTED 40002fc4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002fc8: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40002fcc: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40002fd0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; 40002fd4: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40002fd8: c4 04 a0 54 ld [ %l2 + 0x54 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002fdc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002fe0: 02 80 00 0c be 40003010 <== NOT EXECUTED 40002fe4: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40002fe8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002fec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002ff0: 02 80 00 08 be 40003010 <== NOT EXECUTED 40002ff4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40002ff8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002ffc: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003000: 81 c7 e0 08 ret <== NOT EXECUTED 40003004: 81 e8 00 00 restore <== NOT EXECUTED 40003008: 81 c7 e0 08 ret <== NOT EXECUTED 4000300c: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40003010: 81 c7 e0 08 ret <== NOT EXECUTED 40003014: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40009320 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40009320: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40009324: 03 10 00 8e sethi %hi(0x40023800), %g1 40009328: c2 00 63 28 ld [ %g1 + 0x328 ], %g1 ! 40023b28 <_ISR_Nest_level> rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 4000932c: 09 10 00 8f sethi %hi(0x40023c00), %g4 if ( rtems_interrupt_is_in_progress() ) 40009330: 80 a0 60 00 cmp %g1, 0 40009334: 84 10 20 12 mov 0x12, %g2 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40009338: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 4000933c: 12 80 00 49 bne 40009460 40009340: c6 01 21 90 ld [ %g4 + 0x190 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 40009344: 80 a6 a0 00 cmp %i2, 0 40009348: 02 80 00 4b be 40009474 4000934c: 80 a6 60 00 cmp %i1, 0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 40009350: 02 80 00 49 be 40009474 40009354: c6 26 80 00 st %g3, [ %i2 ] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009358: c4 06 40 00 ld [ %i1 ], %g2 4000935c: 80 a0 a0 00 cmp %g2, 0 40009360: 22 80 00 42 be,a 40009468 40009364: c4 06 60 04 ld [ %i1 + 4 ], %g2 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 40009368: 80 a0 c0 18 cmp %g3, %i0 4000936c: 08 80 00 3d bleu 40009460 40009370: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009374: 05 10 00 8e sethi %hi(0x40023800), %g2 40009378: c6 00 a2 90 ld [ %g2 + 0x290 ], %g3 ! 40023a90 <_Thread_Dispatch_disable_level> 4000937c: 86 00 e0 01 inc %g3 40009380: c6 20 a2 90 st %g3, [ %g2 + 0x290 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 40009384: 80 a6 20 00 cmp %i0, 0 40009388: 12 80 00 2b bne 40009434 4000938c: 05 10 00 8f sethi %hi(0x40023c00), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 40009390: da 01 21 90 ld [ %g4 + 0x190 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 40009394: 80 a3 60 00 cmp %o5, 0 40009398: 02 80 00 3a be 40009480 4000939c: d8 00 a1 94 ld [ %g2 + 0x194 ], %o4 400093a0: 10 80 00 05 b 400093b4 400093a4: 86 10 00 0c mov %o4, %g3 400093a8: 80 a3 40 18 cmp %o5, %i0 400093ac: 08 80 00 0b bleu 400093d8 400093b0: 86 00 e0 18 add %g3, 0x18, %g3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 400093b4: c8 00 c0 00 ld [ %g3 ], %g4 400093b8: 80 a1 20 00 cmp %g4, 0 400093bc: 32 bf ff fb bne,a 400093a8 400093c0: b0 06 20 01 inc %i0 400093c4: c8 00 e0 04 ld [ %g3 + 4 ], %g4 400093c8: 80 a1 20 00 cmp %g4, 0 400093cc: 32 bf ff f7 bne,a 400093a8 400093d0: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 400093d4: 80 a3 40 18 cmp %o5, %i0 400093d8: 02 80 00 2b be 40009484 400093dc: f0 26 80 00 st %i0, [ %i2 ] 400093e0: 85 2e 20 03 sll %i0, 3, %g2 400093e4: 87 2e 20 05 sll %i0, 5, %g3 400093e8: 84 20 c0 02 sub %g3, %g2, %g2 400093ec: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400093f0: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 400093f4: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400093f8: c6 20 80 00 st %g3, [ %g2 ] 400093fc: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40009400: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40009404: c6 20 a0 04 st %g3, [ %g2 + 4 ] 40009408: c6 00 60 08 ld [ %g1 + 8 ], %g3 4000940c: c6 20 a0 08 st %g3, [ %g2 + 8 ] 40009410: c6 00 60 0c ld [ %g1 + 0xc ], %g3 40009414: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 40009418: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 4000941c: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 40009420: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 40009424: 40 00 07 2f call 4000b0e0 <_Thread_Enable_dispatch> 40009428: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 4000942c: 40 00 24 16 call 40012484 40009430: 81 e8 00 00 restore _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 40009434: c6 00 a1 94 ld [ %g2 + 0x194 ], %g3 40009438: 89 2e 20 05 sll %i0, 5, %g4 4000943c: 85 2e 20 03 sll %i0, 3, %g2 40009440: 84 21 00 02 sub %g4, %g2, %g2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009444: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 40009448: 80 a1 20 00 cmp %g4, 0 4000944c: 02 80 00 12 be 40009494 40009450: 84 00 c0 02 add %g3, %g2, %g2 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 40009454: 40 00 07 23 call 4000b0e0 <_Thread_Enable_dispatch> 40009458: 01 00 00 00 nop 4000945c: 84 10 20 0c mov 0xc, %g2 ! c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 40009460: 81 c7 e0 08 ret 40009464: 91 e8 00 02 restore %g0, %g2, %o0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009468: 80 a0 a0 00 cmp %g2, 0 4000946c: 12 bf ff c0 bne 4000936c 40009470: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40009474: 84 10 20 09 mov 9, %g2 } 40009478: 81 c7 e0 08 ret 4000947c: 91 e8 00 02 restore %g0, %g2, %o0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 40009480: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 40009484: 40 00 07 17 call 4000b0e0 <_Thread_Enable_dispatch> 40009488: 01 00 00 00 nop return sc; 4000948c: 10 bf ff f5 b 40009460 40009490: 84 10 20 05 mov 5, %g2 ! 5 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40009494: c6 00 a0 04 ld [ %g2 + 4 ], %g3 40009498: 80 a0 e0 00 cmp %g3, 0 4000949c: 12 bf ff ee bne 40009454 400094a0: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 400094a4: 10 bf ff d3 b 400093f0 400094a8: f0 26 80 00 st %i0, [ %i2 ] 40009bf0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40009bf0: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40009bf4: 80 a6 20 00 cmp %i0, 0 40009bf8: 02 80 00 23 be 40009c84 40009bfc: 25 10 00 ad sethi %hi(0x4002b400), %l2 40009c00: a4 14 a1 f4 or %l2, 0x1f4, %l2 ! 4002b5f4 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 40009c04: 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 ] ) 40009c08: c2 04 80 00 ld [ %l2 ], %g1 40009c0c: 80 a0 60 00 cmp %g1, 0 40009c10: 22 80 00 1a be,a 40009c78 40009c14: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40009c18: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( !information ) 40009c1c: 80 a4 60 00 cmp %l1, 0 40009c20: 22 80 00 16 be,a 40009c78 40009c24: a4 04 a0 04 add %l2, 4, %l2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40009c28: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40009c2c: 84 90 60 00 orcc %g1, 0, %g2 40009c30: 22 80 00 12 be,a 40009c78 40009c34: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 40009c38: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40009c3c: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40009c40: 83 2c 20 02 sll %l0, 2, %g1 40009c44: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( !the_thread ) 40009c48: 90 90 60 00 orcc %g1, 0, %o0 40009c4c: 02 80 00 05 be 40009c60 40009c50: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40009c54: 9f c6 00 00 call %i0 40009c58: 01 00 00 00 nop 40009c5c: 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++ ) { 40009c60: 83 28 a0 10 sll %g2, 0x10, %g1 40009c64: 83 30 60 10 srl %g1, 0x10, %g1 40009c68: 80 a0 40 10 cmp %g1, %l0 40009c6c: 3a bf ff f5 bcc,a 40009c40 40009c70: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40009c74: 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++ ) { 40009c78: 80 a4 80 13 cmp %l2, %l3 40009c7c: 32 bf ff e4 bne,a 40009c0c 40009c80: c2 04 80 00 ld [ %l2 ], %g1 40009c84: 81 c7 e0 08 ret 40009c88: 81 e8 00 00 restore 4000c02c : * 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 ) { 4000c02c: 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 ); 4000c030: 21 10 00 74 sethi %hi(0x4001d000), %l0 4000c034: d0 04 21 34 ld [ %l0 + 0x134 ], %o0 ! 4001d134 4000c038: 92 10 20 00 clr %o1 4000c03c: 7f ff eb 04 call 40006c4c 4000c040: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000c044: 23 10 00 74 sethi %hi(0x4001d000), %l1 4000c048: c2 04 61 30 ld [ %l1 + 0x130 ], %g1 ! 4001d130 4000c04c: 80 a0 60 00 cmp %g1, 0 4000c050: 12 80 00 07 bne 4000c06c 4000c054: 05 10 00 74 sethi %hi(0x4001d000), %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; 4000c058: b0 10 20 00 clr %i0 failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000c05c: 7f ff eb 43 call 40006d68 4000c060: d0 04 21 34 ld [ %l0 + 0x134 ], %o0 return iop; } 4000c064: 81 c7 e0 08 ret 4000c068: 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( 4000c06c: c4 00 a1 2c ld [ %g2 + 0x12c ], %g2 4000c070: 92 10 20 01 mov 1, %o1 4000c074: 82 20 40 02 sub %g1, %g2, %g1 4000c078: 83 38 60 03 sra %g1, 3, %g1 4000c07c: 87 28 60 06 sll %g1, 6, %g3 4000c080: 85 28 60 03 sll %g1, 3, %g2 4000c084: 84 20 c0 02 sub %g3, %g2, %g2 4000c088: 87 28 a0 06 sll %g2, 6, %g3 4000c08c: 84 00 80 03 add %g2, %g3, %g2 4000c090: 84 00 80 01 add %g2, %g1, %g2 4000c094: 87 28 a0 0f sll %g2, 0xf, %g3 4000c098: 84 20 c0 02 sub %g3, %g2, %g2 4000c09c: 07 13 10 92 sethi %hi(0x4c424800), %g3 4000c0a0: 85 28 a0 03 sll %g2, 3, %g2 4000c0a4: 86 10 e1 00 or %g3, 0x100, %g3 4000c0a8: 82 00 80 01 add %g2, %g1, %g1 4000c0ac: 94 10 20 54 mov 0x54, %o2 4000c0b0: 96 10 20 00 clr %o3 4000c0b4: 90 10 40 03 or %g1, %g3, %o0 4000c0b8: 7f ff ea 44 call 400069c8 4000c0bc: 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) 4000c0c0: 80 a2 20 00 cmp %o0, 0 4000c0c4: 32 bf ff e6 bne,a 4000c05c 4000c0c8: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000c0cc: f0 04 61 30 ld [ %l1 + 0x130 ], %i0 next = iop->data1; 4000c0d0: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000c0d4: c0 26 20 30 clr [ %i0 + 0x30 ] 4000c0d8: c0 26 20 1c clr [ %i0 + 0x1c ] 4000c0dc: c0 26 20 34 clr [ %i0 + 0x34 ] 4000c0e0: c0 26 00 00 clr [ %i0 ] 4000c0e4: c0 26 20 04 clr [ %i0 + 4 ] 4000c0e8: c0 26 20 08 clr [ %i0 + 8 ] 4000c0ec: c0 26 20 0c clr [ %i0 + 0xc ] 4000c0f0: c0 26 20 10 clr [ %i0 + 0x10 ] 4000c0f4: c0 26 20 14 clr [ %i0 + 0x14 ] 4000c0f8: c0 26 20 20 clr [ %i0 + 0x20 ] 4000c0fc: c0 26 20 24 clr [ %i0 + 0x24 ] 4000c100: c0 26 20 28 clr [ %i0 + 0x28 ] 4000c104: c0 26 20 2c clr [ %i0 + 0x2c ] 4000c108: c0 26 20 40 clr [ %i0 + 0x40 ] 4000c10c: c0 26 20 44 clr [ %i0 + 0x44 ] 4000c110: c0 26 20 38 clr [ %i0 + 0x38 ] 4000c114: c0 26 20 3c clr [ %i0 + 0x3c ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4000c118: c2 24 61 30 st %g1, [ %l1 + 0x130 ] 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; 4000c11c: 82 10 21 00 mov 0x100, %g1 4000c120: c2 26 20 18 st %g1, [ %i0 + 0x18 ] iop->sem = sema; 4000c124: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_libio_iop_freelist = next; goto done; 4000c128: 10 bf ff cd b 4000c05c 4000c12c: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 400034d8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 400034d8: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 400034dc: 21 10 00 72 sethi %hi(0x4001c800), %l0 400034e0: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 ! 4001c814 400034e4: 80 a2 20 00 cmp %o0, 0 400034e8: 22 80 00 1c be,a 40003558 400034ec: 11 13 10 92 sethi %hi(0x4c424800), %o0 <== NOT EXECUTED { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 400034f0: 40 00 21 86 call 4000bb08 400034f4: 92 10 20 48 mov 0x48, %o1 400034f8: 03 10 00 74 sethi %hi(0x4001d000), %g1 400034fc: d0 20 61 2c st %o0, [ %g1 + 0x12c ] ! 4001d12c sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 40003500: 80 a2 20 00 cmp %o0, 0 40003504: 02 80 00 29 be 400035a8 40003508: 82 10 00 08 mov %o0, %g1 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 4000350c: c6 04 20 14 ld [ %l0 + 0x14 ], %g3 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 40003510: 05 10 00 74 sethi %hi(0x4001d000), %g2 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40003514: 80 a0 e0 01 cmp %g3, 1 40003518: 08 80 00 0e bleu 40003550 4000351c: d0 20 a1 30 st %o0, [ %g2 + 0x130 ] 40003520: 82 02 20 48 add %o0, 0x48, %g1 40003524: 84 10 20 01 mov 1, %g2 iop->data1 = iop + 1; 40003528: c2 20 7f f0 st %g1, [ %g1 + -16 ] 4000352c: 84 00 a0 01 inc %g2 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40003530: 80 a0 80 03 cmp %g2, %g3 40003534: 12 bf ff fd bne 40003528 40003538: 82 00 60 48 add %g1, 0x48, %g1 4000353c: 84 00 bf ff add %g2, -1, %g2 40003540: 83 28 a0 06 sll %g2, 6, %g1 40003544: 85 28 a0 03 sll %g2, 3, %g2 40003548: 82 00 80 01 add %g2, %g1, %g1 4000354c: 82 02 00 01 add %o0, %g1, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 40003550: c0 20 60 38 clr [ %g1 + 0x38 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 40003554: 11 13 10 92 sethi %hi(0x4c424800), %o0 40003558: 92 10 20 01 mov 1, %o1 4000355c: 90 12 21 4f or %o0, 0x14f, %o0 40003560: 94 10 20 54 mov 0x54, %o2 40003564: 96 10 20 00 clr %o3 40003568: 19 10 00 74 sethi %hi(0x4001d000), %o4 4000356c: 40 00 0d 17 call 400069c8 40003570: 98 13 21 34 or %o4, 0x134, %o4 ! 4001d134 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 40003574: 80 a2 20 00 cmp %o0, 0 40003578: 12 80 00 0a bne 400035a0 4000357c: 03 10 00 72 sethi %hi(0x4001c800), %g1 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 40003580: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 ! 4001c810 40003584: 80 a0 60 00 cmp %g1, 0 40003588: 02 80 00 04 be 40003598 4000358c: 01 00 00 00 nop (* rtems_fs_init_helper)(); 40003590: 9f c0 40 00 call %g1 40003594: 01 00 00 00 nop 40003598: 81 c7 e0 08 ret 4000359c: 81 e8 00 00 restore RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 400035a0: 40 00 0f 58 call 40007300 <== NOT EXECUTED 400035a4: 01 00 00 00 nop <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 400035a8: 40 00 0f 56 call 40007300 <== NOT EXECUTED 400035ac: 90 10 20 1a mov 0x1a, %o0 ! 1a <== NOT EXECUTED 400035b0: 01 00 00 00 nop 4002c260 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 4002c260: 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); 4002c264: 90 10 20 00 clr %o0 4002c268: 92 10 20 00 clr %o1 4002c26c: 40 00 04 90 call 4002d4ac 4002c270: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 4002c274: b0 92 20 00 orcc %o0, 0, %i0 4002c278: 12 80 00 51 bne 4002c3bc 4002c27c: 21 10 01 a9 sethi %hi(0x4006a400), %l0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 4002c280: e6 04 21 b8 ld [ %l0 + 0x1b8 ], %l3 ! 4006a5b8 4002c284: 23 10 01 b9 sethi %hi(0x4006e400), %l1 4002c288: a2 14 60 60 or %l1, 0x60, %l1 ! 4006e460 4002c28c: 80 a4 c0 11 cmp %l3, %l1 4002c290: 02 80 00 3a be 4002c378 4002c294: a4 14 21 b8 or %l0, 0x1b8, %l2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 4002c298: 92 10 00 11 mov %l1, %o1 4002c29c: 94 10 20 48 mov 0x48, %o2 4002c2a0: 40 00 6f 0a call 40047ec8 4002c2a4: 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; 4002c2a8: 03 10 01 b9 sethi %hi(0x4006e400), %g1 4002c2ac: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 ! 4006e448 } 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*/ 4002c2b0: c6 07 bf fc ld [ %fp + -4 ], %g3 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002c2b4: 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*/ 4002c2b8: c6 24 c0 00 st %g3, [ %l3 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002c2bc: c4 24 e0 18 st %g2, [ %l3 + 0x18 ] 4002c2c0: 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); 4002c2c4: 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; 4002c2c8: c4 24 e0 1c st %g2, [ %l3 + 0x1c ] 4002c2cc: 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); 4002c2d0: 25 10 01 82 sethi %hi(0x40060800), %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; 4002c2d4: c4 24 e0 20 st %g2, [ %l3 + 0x20 ] 4002c2d8: 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); 4002c2dc: 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; 4002c2e0: c4 24 e0 24 st %g2, [ %l3 + 0x24 ] 4002c2e4: 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); 4002c2e8: 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; 4002c2ec: 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); 4002c2f0: 96 10 00 11 mov %l1, %o3 4002c2f4: 98 10 20 00 clr %o4 4002c2f8: 7f ff 6f fe call 400082f0 4002c2fc: 90 14 a2 98 or %l2, 0x298, %o0 rtems_filesystem_root = loc; 4002c300: c2 04 21 b8 ld [ %l0 + 0x1b8 ], %g1 4002c304: c4 07 bf e8 ld [ %fp + -24 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c308: 90 14 a2 98 or %l2, 0x298, %o0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 4002c30c: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 4002c310: c4 07 bf ec ld [ %fp + -20 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c314: 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; 4002c318: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4002c31c: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c320: 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; 4002c324: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 4002c328: c4 07 bf f4 ld [ %fp + -12 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c32c: 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; 4002c330: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 4002c334: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4002c338: 98 10 20 00 clr %o4 4002c33c: 7f ff 6f ed call 400082f0 4002c340: c4 20 60 28 st %g2, [ %g1 + 0x28 ] rtems_filesystem_current = loc; 4002c344: c4 07 bf e8 ld [ %fp + -24 ], %g2 4002c348: c2 04 21 b8 ld [ %l0 + 0x1b8 ], %g1 4002c34c: c4 20 60 04 st %g2, [ %g1 + 4 ] 4002c350: c4 07 bf ec ld [ %fp + -20 ], %g2 4002c354: c4 20 60 08 st %g2, [ %g1 + 8 ] 4002c358: c4 07 bf f0 ld [ %fp + -16 ], %g2 4002c35c: c4 20 60 0c st %g2, [ %g1 + 0xc ] 4002c360: c4 07 bf f4 ld [ %fp + -12 ], %g2 4002c364: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 4002c368: c4 07 bf f8 ld [ %fp + -8 ], %g2 4002c36c: c4 20 60 14 st %g2, [ %g1 + 0x14 ] return RTEMS_SUCCESSFUL; } 4002c370: 81 c7 e0 08 ret 4002c374: 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)); 4002c378: 90 10 20 48 mov 0x48, %o0 4002c37c: 7f ff 71 ce call 40008ab4 4002c380: b0 10 20 1a mov 0x1a, %i0 if (!tmp) 4002c384: a6 92 20 00 orcc %o0, 0, %l3 4002c388: 02 80 00 0d be 4002c3bc 4002c38c: 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); 4002c390: 90 10 20 00 clr %o0 4002c394: 15 10 00 b0 sethi %hi(0x4002c000), %o2 4002c398: 40 00 05 5b call 4002d904 4002c39c: 94 12 a1 2c or %o2, 0x12c, %o2 ! 4002c12c if (sc != RTEMS_SUCCESSFUL) { 4002c3a0: b0 92 20 00 orcc %o0, 0, %i0 4002c3a4: 12 80 00 04 bne 4002c3b4 4002c3a8: 01 00 00 00 nop * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 4002c3ac: 10 bf ff bb b 4002c298 4002c3b0: e6 24 21 b8 st %l3, [ %l0 + 0x1b8 ] 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); 4002c3b4: 7f ff 70 0a call 400083dc <== NOT EXECUTED 4002c3b8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return sc; 4002c3bc: 81 c7 e0 08 ret <== NOT EXECUTED 4002c3c0: 81 e8 00 00 restore <== NOT EXECUTED 4002c1a4 : * 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) { 4002c1a4: 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); 4002c1a8: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002c1ac: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002c1b0: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 4002c1b4: 40 00 04 be call 4002d4ac <== NOT EXECUTED 4002c1b8: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002c1bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002c1c0: 12 80 00 14 bne 4002c210 <== NOT EXECUTED 4002c1c4: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 4002c1c8: 21 10 01 a9 sethi %hi(0x4006a400), %l0 <== NOT EXECUTED 4002c1cc: e6 04 21 b8 ld [ %l0 + 0x1b8 ], %l3 ! 4006a5b8 <== NOT EXECUTED 4002c1d0: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 4002c1d4: c6 04 c0 00 ld [ %l3 ], %g3 <== NOT EXECUTED 4002c1d8: 82 14 21 b8 or %l0, 0x1b8, %g1 <== NOT EXECUTED 4002c1dc: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 4002c1e0: 02 80 00 0e be 4002c218 <== NOT EXECUTED 4002c1e4: 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, 4002c1e8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4002c1ec: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4002c1f0: 40 00 06 23 call 4002da7c <== NOT EXECUTED 4002c1f4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 4002c1f8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002c1fc: 02 80 00 10 be 4002c23c <== NOT EXECUTED 4002c200: 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; 4002c204: 05 10 01 b9 sethi %hi(0x4006e400), %g2 <== NOT EXECUTED 4002c208: 84 10 a0 60 or %g2, 0x60, %g2 ! 4006e460 <== NOT EXECUTED 4002c20c: c4 24 21 b8 st %g2, [ %l0 + 0x1b8 ] <== NOT EXECUTED return sc; } 4002c210: 81 c7 e0 08 ret <== NOT EXECUTED 4002c214: 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); 4002c218: 40 00 05 eb call 4002d9c4 <== NOT EXECUTED 4002c21c: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002c220: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002c224: 12 bf ff fb bne 4002c210 <== NOT EXECUTED 4002c228: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 4002c22c: 7f ff ff c0 call 4002c12c <== NOT EXECUTED 4002c230: 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, 4002c234: 10 bf ff ee b 4002c1ec <== NOT EXECUTED 4002c238: 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); 4002c23c: 15 10 00 b0 sethi %hi(0x4002c000), %o2 <== NOT EXECUTED 4002c240: 40 00 05 b1 call 4002d904 <== NOT EXECUTED 4002c244: 94 12 a1 2c or %o2, 0x12c, %o2 ! 4002c12c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4002c248: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4002c24c: 12 bf ff ef bne 4002c208 <== NOT EXECUTED 4002c250: 05 10 01 b9 sethi %hi(0x4006e400), %g2 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 4002c254: 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; 4002c258: 10 bf ff ee b 4002c210 <== NOT EXECUTED 4002c25c: c4 24 21 b8 st %g2, [ %l0 + 0x1b8 ] <== NOT EXECUTED 40008bb8 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 40008bb8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 40008bbc: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 40008bc0: d0 00 62 d0 ld [ %g1 + 0x2d0 ], %o0 ! 4006a2d0 <== NOT EXECUTED 40008bc4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008bc8: 40 00 18 e6 call 4000ef60 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40008bcc: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 40008bd0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 40008bd4: 02 80 00 08 be 40008bf4 <== NOT EXECUTED 40008bd8: 03 10 01 b9 sethi %hi(0x4006e400), %g1 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 40008bdc: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 40008be0: 82 10 60 18 or %g1, 0x18, %g1 <== NOT EXECUTED 40008be4: c4 18 60 28 ldd [ %g1 + 0x28 ], %g2 <== NOT EXECUTED 40008be8: 86 80 c0 04 addcc %g3, %g4, %g3 <== NOT EXECUTED 40008bec: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 40008bf0: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 40008bf4: 81 c7 e0 08 ret <== NOT EXECUTED 40008bf8: 81 e8 00 00 restore <== NOT EXECUTED 40008bfc : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 40008bfc: 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 ) 40008c00: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40008c04: 02 80 00 14 be 40008c54 <== NOT EXECUTED 40008c08: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 40008c0c: d0 00 62 d0 ld [ %g1 + 0x2d0 ], %o0 ! 4006a2d0 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 40008c10: 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); 40008c14: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008c18: 40 00 18 d2 call 4000ef60 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40008c1c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 40008c20: 03 10 01 b9 sethi %hi(0x4006e400), %g1 <== NOT EXECUTED 40008c24: d8 07 bf fc ld [ %fp + -4 ], %o4 <== NOT EXECUTED 40008c28: 82 10 60 18 or %g1, 0x18, %g1 <== NOT EXECUTED 40008c2c: c4 18 60 20 ldd [ %g1 + 0x20 ], %g2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008c30: da 00 60 2c ld [ %g1 + 0x2c ], %o5 <== NOT EXECUTED if (current_depth > s->max_depth) 40008c34: 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); 40008c38: 86 80 c0 0c addcc %g3, %o4, %g3 <== NOT EXECUTED 40008c3c: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 40008c40: c4 38 60 20 std %g2, [ %g1 + 0x20 ] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008c44: 84 20 c0 0d sub %g3, %o5, %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40008c48: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 40008c4c: 38 80 00 02 bgu,a 40008c54 <== NOT EXECUTED 40008c50: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 40008c54: 81 c7 e0 08 ret <== NOT EXECUTED 40008c58: 81 e8 00 00 restore <== NOT EXECUTED 40008c5c : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40008c5c: 03 10 01 b9 sethi %hi(0x4006e400), %g1 <== NOT EXECUTED 40008c60: c0 20 60 18 clr [ %g1 + 0x18 ] ! 4006e418 <== NOT EXECUTED 40008c64: c0 20 60 1c clr [ %g1 + 0x1c ] <== NOT EXECUTED 40008c68: 82 10 60 18 or %g1, 0x18, %g1 <== NOT EXECUTED 40008c6c: c0 20 60 28 clr [ %g1 + 0x28 ] <== NOT EXECUTED 40008c70: c0 20 60 2c clr [ %g1 + 0x2c ] <== NOT EXECUTED 40008c74: c0 20 60 08 clr [ %g1 + 8 ] <== NOT EXECUTED 40008c78: c0 20 60 0c clr [ %g1 + 0xc ] <== NOT EXECUTED 40008c7c: c0 20 60 10 clr [ %g1 + 0x10 ] <== NOT EXECUTED 40008c80: c0 20 60 14 clr [ %g1 + 0x14 ] <== NOT EXECUTED 40008c84: c0 20 60 18 clr [ %g1 + 0x18 ] <== NOT EXECUTED 40008c88: c0 20 60 1c clr [ %g1 + 0x1c ] <== NOT EXECUTED 40008c8c: c0 20 60 20 clr [ %g1 + 0x20 ] <== NOT EXECUTED } 40008c90: 81 c3 e0 08 retl <== NOT EXECUTED 40008c94: c0 20 60 24 clr [ %g1 + 0x24 ] <== NOT EXECUTED 40011b10 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40011b10: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40011b14: a0 96 20 00 orcc %i0, 0, %l0 40011b18: 02 80 00 20 be 40011b98 40011b1c: 03 10 00 8f sethi %hi(0x40023c00), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40011b20: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 40023c30 <_System_state_Current> 40011b24: 80 a0 60 03 cmp %g1, 3 40011b28: 02 80 00 17 be 40011b84 40011b2c: c0 24 00 00 clr [ %l0 ] /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 40011b30: 7f ff cd 18 call 40004f90 40011b34: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 40011b38: 03 10 00 8b sethi %hi(0x40022c00), %g1 40011b3c: d0 00 62 e0 ld [ %g1 + 0x2e0 ], %o0 ! 40022ee0 40011b40: 94 10 00 19 mov %i1, %o2 40011b44: 92 10 00 1a mov %i2, %o1 40011b48: 7f ff e3 95 call 4000a99c <_Protected_heap_Allocate_aligned_with_boundary> 40011b4c: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40011b50: b2 92 20 00 orcc %o0, 0, %i1 40011b54: 02 80 00 12 be 40011b9c 40011b58: 03 10 00 8d sethi %hi(0x40023400), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 40011b5c: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 40023528 40011b60: 80 a0 60 00 cmp %g1, 0 40011b64: 22 80 00 06 be,a 40011b7c 40011b68: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 40011b6c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40011b70: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011b74: 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; 40011b78: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 40011b7c: 81 c7 e0 08 ret 40011b80: 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()) && 40011b84: 7f ff cc ea call 40004f2c 40011b88: 01 00 00 00 nop 40011b8c: 80 8a 20 ff btst 0xff, %o0 40011b90: 12 bf ff e8 bne 40011b30 40011b94: 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; 40011b98: b0 10 20 16 mov 0x16, %i0 ! 16 } 40011b9c: 81 c7 e0 08 ret 40011ba0: 81 e8 00 00 restore 40008b88 : void rtems_panic( const char *printf_format, ... ) { 40008b88: 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); 40008b8c: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40008b90: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40008b94: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40008b98: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008b9c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008ba0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008ba4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40008ba8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008bac: 7f ff ff 8a call 400089d4 <== NOT EXECUTED 40008bb0: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 40008bb4: 81 c7 e0 08 ret <== NOT EXECUTED 40008bb8: 81 e8 00 00 restore <== NOT EXECUTED 4000d618 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4000d618: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 4000d61c: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000d620: c2 08 62 44 ldub [ %g1 + 0x244 ], %g1 ! 4001ce44 4000d624: 80 a0 60 00 cmp %g1, 0 4000d628: 02 80 00 13 be 4000d674 4000d62c: 19 10 00 73 sethi %hi(0x4001cc00), %o4 return; if (rtems_pipe_semaphore) 4000d630: c2 03 23 74 ld [ %o4 + 0x374 ], %g1 ! 4001cf74 <== NOT EXECUTED 4000d634: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d638: 12 80 00 0f bne 4000d674 <== NOT EXECUTED 4000d63c: 98 13 23 74 or %o4, 0x374, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4000d640: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 4000d644: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000d648: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 4000d64c: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 4000d650: 7f ff e4 de call 400069c8 <== NOT EXECUTED 4000d654: 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) 4000d658: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d65c: 12 80 00 08 bne 4000d67c <== NOT EXECUTED 4000d660: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4000d664: 7f ff e3 b5 call 40006538 <== NOT EXECUTED 4000d668: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 4000d66c: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 4000d670: d0 30 63 7a sth %o0, [ %g1 + 0x37a ] ! 4001cf7a <== NOT EXECUTED 4000d674: 81 c7 e0 08 ret 4000d678: 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); 4000d67c: 7f ff e7 21 call 40007300 <== NOT EXECUTED 4000d680: 01 00 00 00 nop 4000d684: 01 00 00 00 nop 400066d4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 400066d4: 9d e3 bf a0 save %sp, -96, %sp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 400066d8: 21 10 01 b9 sethi %hi(0x4006e400), %l0 400066dc: c2 04 22 9c ld [ %l0 + 0x29c ], %g1 ! 4006e69c <_Thread_Executing> ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 400066e0: d0 00 60 c4 ld [ %g1 + 0xc4 ], %o0 400066e4: 80 a7 80 08 cmp %fp, %o0 400066e8: 0a 80 00 06 bcs 40006700 400066ec: a2 10 20 00 clr %l1 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 400066f0: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 400066f4: 82 02 00 01 add %o0, %g1, %g1 400066f8: 80 a0 40 1e cmp %g1, %fp 400066fc: a2 60 3f ff subx %g0, -1, %l1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 40006700: 03 10 01 ad sethi %hi(0x4006b400), %g1 40006704: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 4006b7b4 40006708: 80 a0 a0 00 cmp %g2, 0 4000670c: 02 80 00 09 be 40006730 40006710: 82 10 20 01 mov 1, %g1 pattern_ok = (!memcmp( 40006714: 90 02 20 08 add %o0, 8, %o0 40006718: 13 10 01 b8 sethi %hi(0x4006e000), %o1 4000671c: 94 10 20 10 mov 0x10, %o2 40006720: 40 01 05 b9 call 40047e04 40006724: 92 12 63 e8 or %o1, 0x3e8, %o1 40006728: 80 a0 00 08 cmp %g0, %o0 4000672c: 82 60 3f ff subx %g0, -1, %g1 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 40006730: 80 8c 60 ff btst 0xff, %l1 40006734: 02 80 00 05 be 40006748 40006738: 92 08 60 ff and %g1, 0xff, %o1 4000673c: 92 88 60 ff andcc %g1, 0xff, %o1 40006740: 12 80 00 05 bne 40006754 40006744: b0 10 20 00 clr %i0 return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 40006748: d0 04 22 9c ld [ %l0 + 0x29c ], %o0 <== NOT EXECUTED 4000674c: 7f ff ff b8 call 4000662c <== NOT EXECUTED 40006750: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 40006754: 81 c7 e0 08 ret 40006758: 81 e8 00 00 restore 40006610 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 40006610: 13 10 00 25 sethi %hi(0x40009400), %o1 <== NOT EXECUTED 40006614: 90 10 20 00 clr %o0 <== NOT EXECUTED 40006618: 92 12 63 dc or %o1, 0x3dc, %o1 <== NOT EXECUTED 4000661c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40006620: 7f ff ff e6 call 400065b8 <== NOT EXECUTED 40006624: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006628: 01 00 00 00 nop 400065b8 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 400065b8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED print_context = context; 400065bc: 23 10 01 ad sethi %hi(0x4006b400), %l1 <== NOT EXECUTED print_handler = print; 400065c0: 21 10 01 ad sethi %hi(0x4006b400), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 400065c4: f0 24 63 b8 st %i0, [ %l1 + 0x3b8 ] <== NOT EXECUTED print_handler = print; 400065c8: f2 24 23 bc st %i1, [ %l0 + 0x3bc ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 400065cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400065d0: 13 10 01 82 sethi %hi(0x40060800), %o1 <== NOT EXECUTED 400065d4: 9f c6 40 00 call %i1 <== NOT EXECUTED 400065d8: 92 12 60 10 or %o1, 0x10, %o1 ! 40060810 <== NOT EXECUTED (*print)( context, 400065dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400065e0: 13 10 01 82 sethi %hi(0x40060800), %o1 <== NOT EXECUTED 400065e4: 9f c6 40 00 call %i1 <== NOT EXECUTED 400065e8: 92 12 60 28 or %o1, 0x28, %o1 ! 40060828 <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 400065ec: 11 10 00 19 sethi %hi(0x40006400), %o0 <== NOT EXECUTED 400065f0: 40 00 1f e4 call 4000e580 <== NOT EXECUTED 400065f4: 90 12 20 2c or %o0, 0x2c, %o0 ! 4000642c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 400065f8: 7f ff ff 8d call 4000642c <== NOT EXECUTED 400065fc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 40006600: c0 24 63 b8 clr [ %l1 + 0x3b8 ] <== NOT EXECUTED print_handler = NULL; 40006604: c0 24 23 bc clr [ %l0 + 0x3bc ] <== NOT EXECUTED } 40006608: 81 c7 e0 08 ret <== NOT EXECUTED 4000660c: 81 e8 00 00 restore <== NOT EXECUTED 4000675c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 4000675c: 9d e3 bf a0 save %sp, -96, %sp Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 40006760: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 40006764: 80 a7 80 01 cmp %fp, %g1 40006768: 0a 80 00 07 bcs 40006784 4000676c: 90 00 60 08 add %g1, 8, %o0 void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 40006770: c4 06 20 c0 ld [ %i0 + 0xc0 ], %g2 40006774: 82 00 40 02 add %g1, %g2, %g1 40006778: 80 a7 80 01 cmp %fp, %g1 4000677c: 28 80 00 0b bleu,a 400067a8 40006780: 13 10 01 b8 sethi %hi(0x4006e000), %o1 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 40006784: 13 10 01 b8 sethi %hi(0x4006e000), %o1 <== NOT EXECUTED 40006788: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000678c: 40 01 05 9e call 40047e04 <== NOT EXECUTED 40006790: 92 12 63 e8 or %o1, 0x3e8, %o1 <== NOT EXECUTED 40006794: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40006798: b2 60 3f ff subx %g0, -1, %i1 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 4000679c: b2 0e 60 01 and %i1, 1, %i1 <== NOT EXECUTED 400067a0: 7f ff ff a3 call 4000662c <== NOT EXECUTED 400067a4: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 400067a8: 94 10 20 10 mov 0x10, %o2 400067ac: 92 12 63 e8 or %o1, 0x3e8, %o1 400067b0: 40 01 05 95 call 40047e04 400067b4: b2 10 20 00 clr %i1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 400067b8: 80 a2 20 00 cmp %o0, 0 400067bc: 12 bf ff f9 bne 400067a0 400067c0: b2 0e 60 01 and %i1, 1, %i1 400067c4: 81 c7 e0 08 ret 400067c8: 81 e8 00 00 restore 4000deb4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000deb4: 9d e3 bf 98 save %sp, -104, %sp 4000deb8: a4 10 00 18 mov %i0, %l2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000debc: 80 a6 60 00 cmp %i1, 0 4000dec0: 02 80 00 1c be 4000df30 4000dec4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000dec8: 40 00 09 6f call 40010484 <__errno> 4000decc: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000ded0: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000ded4: c0 22 00 00 clr [ %o0 ] *n = 0; 4000ded8: c0 26 40 00 clr [ %i1 ] 4000dedc: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000dee0: 40 00 14 e1 call 40013264 4000dee4: 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 ) 4000dee8: 80 a6 a0 00 cmp %i2, 0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000deec: 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 ) 4000def0: 02 80 00 1b be 4000df5c 4000def4: a2 10 00 09 mov %o1, %l1 *endptr = end; 4000def8: c2 07 bf fc ld [ %fp + -4 ], %g1 4000defc: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000df00: 80 a0 40 12 cmp %g1, %l2 4000df04: 02 80 00 0b be 4000df30 4000df08: 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)) 4000df0c: 03 10 00 82 sethi %hi(0x40020800), %g1 4000df10: d4 18 60 d0 ldd [ %g1 + 0xd0 ], %o2 ! 400208d0 <_CPU_Trap_slot_template+0x14> 4000df14: 90 10 00 10 mov %l0, %o0 4000df18: 40 00 3d 3c call 4001d408 <__gtdf2> 4000df1c: 92 10 00 11 mov %l1, %o1 4000df20: 80 a2 20 00 cmp %o0, 0 4000df24: 14 80 00 05 bg 4000df38 4000df28: 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; 4000df2c: e0 3e 40 00 std %l0, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000df30: 81 c7 e0 08 ret 4000df34: 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)) 4000df38: 40 00 09 53 call 40010484 <__errno> 4000df3c: b0 10 20 0a mov 0xa, %i0 4000df40: c2 02 00 00 ld [ %o0 ], %g1 4000df44: 80 a0 60 22 cmp %g1, 0x22 4000df48: 02 bf ff fa be 4000df30 4000df4c: 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; 4000df50: e0 3e 40 00 std %l0, [ %i1 ] <== NOT EXECUTED 4000df54: 81 c7 e0 08 ret <== NOT EXECUTED 4000df58: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000df5c: 10 bf ff e9 b 4000df00 4000df60: c2 07 bf fc ld [ %fp + -4 ], %g1 4000df64 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000df64: 9d e3 bf 98 save %sp, -104, %sp 4000df68: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000df6c: 80 a6 60 00 cmp %i1, 0 4000df70: 02 80 00 19 be 4000dfd4 4000df74: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000df78: 40 00 09 43 call 40010484 <__errno> 4000df7c: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000df80: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000df84: c0 22 00 00 clr [ %o0 ] *n = 0; 4000df88: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000df8c: 40 00 14 a3 call 40013218 4000df90: 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 ) 4000df94: 80 a6 a0 00 cmp %i2, 0 4000df98: 02 80 00 1a be 4000e000 4000df9c: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000dfa0: c2 07 bf fc ld [ %fp + -4 ], %g1 4000dfa4: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000dfa8: 80 a0 40 10 cmp %g1, %l0 4000dfac: 02 80 00 0a be 4000dfd4 4000dfb0: 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)) 4000dfb4: 90 10 00 11 mov %l1, %o0 4000dfb8: 13 1f df ff sethi %hi(0x7f7ffc00), %o1 4000dfbc: 40 00 3a 5b call 4001c928 <__gtsf2> 4000dfc0: 92 12 63 ff or %o1, 0x3ff, %o1 ! 7f7fffff 4000dfc4: 80 a2 20 00 cmp %o0, 0 4000dfc8: 14 80 00 05 bg 4000dfdc 4000dfcc: 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; 4000dfd0: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000dfd4: 81 c7 e0 08 ret 4000dfd8: 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)) 4000dfdc: 40 00 09 2a call 40010484 <__errno> 4000dfe0: b0 10 20 0a mov 0xa, %i0 4000dfe4: c2 02 00 00 ld [ %o0 ], %g1 4000dfe8: 80 a0 60 22 cmp %g1, 0x22 4000dfec: 02 bf ff fa be 4000dfd4 4000dff0: 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; 4000dff4: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000dff8: 81 c7 e0 08 ret <== NOT EXECUTED 4000dffc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e000: 10 bf ff ea b 4000dfa8 4000e004: c2 07 bf fc ld [ %fp + -4 ], %g1 400211fc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 400211fc: 9d e3 bf 98 save %sp, -104, %sp 40021200: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 40021204: 80 a6 60 00 cmp %i1, 0 40021208: 02 80 00 18 be 40021268 4002120c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 40021210: 40 00 8e 5b call 40044b7c <__errno> 40021214: 01 00 00 00 nop 40021218: c0 22 00 00 clr [ %o0 ] *n = 0; 4002121c: 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 ); 40021220: 94 10 00 1b mov %i3, %o2 40021224: 90 10 00 10 mov %l0, %o0 40021228: 40 00 ad f7 call 4004ca04 4002122c: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 40021230: 80 a6 a0 00 cmp %i2, 0 40021234: 02 80 00 18 be 40021294 40021238: a2 10 00 08 mov %o0, %l1 *endptr = end; 4002123c: c2 07 bf fc ld [ %fp + -4 ], %g1 40021240: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 40021244: 80 a0 40 10 cmp %g1, %l0 40021248: 02 80 00 08 be 40021268 4002124c: 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)) 40021250: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40021254: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40021258: 80 a4 40 01 cmp %l1, %g1 4002125c: 02 80 00 05 be 40021270 40021260: 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; 40021264: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 40021268: 81 c7 e0 08 ret 4002126c: 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)) 40021270: 40 00 8e 43 call 40044b7c <__errno> 40021274: b0 10 20 0a mov 0xa, %i0 40021278: c2 02 00 00 ld [ %o0 ], %g1 4002127c: 80 a0 60 22 cmp %g1, 0x22 40021280: 02 bf ff fa be 40021268 40021284: 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; 40021288: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4002128c: 81 c7 e0 08 ret <== NOT EXECUTED 40021290: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40021294: 10 bf ff ec b 40021244 40021298: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e174 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e174: 9d e3 bf 98 save %sp, -104, %sp 4000e178: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e17c: 80 a6 60 00 cmp %i1, 0 4000e180: 02 80 00 24 be 4000e210 4000e184: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e188: 40 00 08 bf call 40010484 <__errno> 4000e18c: 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 ); 4000e190: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000e194: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e198: 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 ); 4000e19c: 90 10 00 10 mov %l0, %o0 4000e1a0: 40 00 14 ba call 40013488 4000e1a4: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e1a8: 80 a6 a0 00 cmp %i2, 0 4000e1ac: 02 80 00 1b be 4000e218 4000e1b0: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e1b4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e1b8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e1bc: 80 a0 40 10 cmp %g1, %l0 4000e1c0: 02 80 00 14 be 4000e210 4000e1c4: 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)) 4000e1c8: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000e1cc: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000e1d0: 80 a4 40 01 cmp %l1, %g1 4000e1d4: 02 80 00 08 be 4000e1f4 4000e1d8: 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)) 4000e1dc: 80 a4 40 01 cmp %l1, %g1 4000e1e0: 02 80 00 05 be 4000e1f4 4000e1e4: 01 00 00 00 nop return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e1e8: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; 4000e1ec: 81 c7 e0 08 ret 4000e1f0: 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)) 4000e1f4: 40 00 08 a4 call 40010484 <__errno> 4000e1f8: 01 00 00 00 nop 4000e1fc: c2 02 00 00 ld [ %o0 ], %g1 4000e200: 80 a0 60 22 cmp %g1, 0x22 4000e204: 32 bf ff fa bne,a 4000e1ec 4000e208: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4000e20c: b0 10 20 0a mov 0xa, %i0 } 4000e210: 81 c7 e0 08 ret 4000e214: 81 e8 00 00 restore 4000e218: 10 bf ff e9 b 4000e1bc 4000e21c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e0a8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e0a8: 9d e3 bf 90 save %sp, -112, %sp 4000e0ac: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e0b0: 80 a6 60 00 cmp %i1, 0 4000e0b4: 02 80 00 29 be 4000e158 4000e0b8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e0bc: 40 00 08 f2 call 40010484 <__errno> 4000e0c0: 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 ); 4000e0c4: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000e0c8: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e0cc: c0 26 40 00 clr [ %i1 ] 4000e0d0: 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 ); 4000e0d4: 90 10 00 10 mov %l0, %o0 4000e0d8: 40 00 14 f6 call 400134b0 4000e0dc: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e0e0: 80 a6 a0 00 cmp %i2, 0 4000e0e4: 02 80 00 22 be 4000e16c 4000e0e8: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e0ec: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e0f0: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e0f4: 80 a0 40 10 cmp %g1, %l0 4000e0f8: 02 80 00 18 be 4000e158 4000e0fc: 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)) 4000e100: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000e104: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000e108: 80 a4 40 01 cmp %l1, %g1 4000e10c: 02 80 00 15 be 4000e160 4000e110: 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)) 4000e114: 03 20 00 00 sethi %hi(0x80000000), %g1 4000e118: 80 a4 40 01 cmp %l1, %g1 4000e11c: 02 80 00 06 be 4000e134 4000e120: 80 a2 60 00 cmp %o1, 0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000e124: d2 26 60 04 st %o1, [ %i1 + 4 ] 4000e128: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; 4000e12c: 81 c7 e0 08 ret 4000e130: 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)) 4000e134: 32 bf ff fd bne,a 4000e128 4000e138: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED 4000e13c: 40 00 08 d2 call 40010484 <__errno> 4000e140: d2 27 bf f4 st %o1, [ %fp + -12 ] 4000e144: c2 02 00 00 ld [ %o0 ], %g1 4000e148: 80 a0 60 22 cmp %g1, 0x22 4000e14c: 12 bf ff f6 bne 4000e124 4000e150: d2 07 bf f4 ld [ %fp + -12 ], %o1 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4000e154: b0 10 20 0a mov 0xa, %i0 } 4000e158: 81 c7 e0 08 ret 4000e15c: 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)) 4000e160: 12 bf ff ee bne 4000e118 4000e164: 03 20 00 00 sethi %hi(0x80000000), %g1 4000e168: 30 bf ff f5 b,a 4000e13c 4000e16c: 10 bf ff e2 b 4000e0f4 4000e170: c2 07 bf fc ld [ %fp + -4 ], %g1 4002129c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4002129c: 9d e3 bf 98 save %sp, -104, %sp 400212a0: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 400212a4: 80 a6 60 00 cmp %i1, 0 400212a8: 02 80 00 16 be 40021300 400212ac: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 400212b0: 40 00 8e 33 call 40044b7c <__errno> 400212b4: 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 ); 400212b8: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 400212bc: c0 22 00 00 clr [ %o0 ] *n = 0; 400212c0: 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 ); 400212c4: 90 10 00 10 mov %l0, %o0 400212c8: 40 00 af 05 call 4004cedc 400212cc: 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 ) 400212d0: 80 a6 a0 00 cmp %i2, 0 400212d4: 02 80 00 16 be 4002132c 400212d8: a2 10 00 08 mov %o0, %l1 *endptr = end; 400212dc: c2 07 bf fc ld [ %fp + -4 ], %g1 400212e0: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 400212e4: 80 a0 40 10 cmp %g1, %l0 400212e8: 02 80 00 06 be 40021300 400212ec: 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)) 400212f0: 80 a4 7f ff cmp %l1, -1 400212f4: 02 80 00 05 be 40021308 400212f8: 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; 400212fc: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 40021300: 81 c7 e0 08 ret 40021304: 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)) 40021308: 40 00 8e 1d call 40044b7c <__errno> <== NOT EXECUTED 4002130c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 40021310: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40021314: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 40021318: 02 bf ff fa be 40021300 <== NOT EXECUTED 4002131c: 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; 40021320: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40021324: 81 c7 e0 08 ret <== NOT EXECUTED 40021328: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4002132c: 10 bf ff ee b 400212e4 40021330: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e318 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e318: 9d e3 bf 98 save %sp, -104, %sp 4000e31c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e320: 80 a6 60 00 cmp %i1, 0 4000e324: 02 80 00 16 be 4000e37c 4000e328: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e32c: 40 00 08 56 call 40010484 <__errno> 4000e330: 01 00 00 00 nop 4000e334: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e338: 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 ); 4000e33c: 94 10 00 1b mov %i3, %o2 4000e340: 90 10 00 10 mov %l0, %o0 4000e344: 40 00 15 87 call 40013960 4000e348: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e34c: 80 a6 a0 00 cmp %i2, 0 4000e350: 02 80 00 16 be 4000e3a8 4000e354: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e358: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e35c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e360: 80 a0 40 10 cmp %g1, %l0 4000e364: 02 80 00 06 be 4000e37c 4000e368: 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)) 4000e36c: 80 a4 7f ff cmp %l1, -1 4000e370: 02 80 00 05 be 4000e384 4000e374: 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; 4000e378: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000e37c: 81 c7 e0 08 ret 4000e380: 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)) 4000e384: 40 00 08 40 call 40010484 <__errno> 4000e388: b0 10 20 0a mov 0xa, %i0 4000e38c: c2 02 00 00 ld [ %o0 ], %g1 4000e390: 80 a0 60 22 cmp %g1, 0x22 4000e394: 02 bf ff fa be 4000e37c 4000e398: 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; 4000e39c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000e3a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000e3a4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e3a8: 10 bf ff ee b 4000e360 4000e3ac: c2 07 bf fc ld [ %fp + -4 ], %g1 40021394 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 40021394: 9d e3 bf 98 save %sp, -104, %sp 40021398: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4002139c: 80 a6 60 00 cmp %i1, 0 400213a0: 02 80 00 16 be 400213f8 400213a4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 400213a8: 40 00 8d f5 call 40044b7c <__errno> 400213ac: 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 ); 400213b0: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 400213b4: c0 22 00 00 clr [ %o0 ] *n = 0; 400213b8: 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 ); 400213bc: 90 10 00 10 mov %l0, %o0 400213c0: 40 00 ae c7 call 4004cedc 400213c4: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 400213c8: 80 a6 a0 00 cmp %i2, 0 400213cc: 02 80 00 16 be 40021424 400213d0: a2 10 00 08 mov %o0, %l1 *endptr = end; 400213d4: c2 07 bf fc ld [ %fp + -4 ], %g1 400213d8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 400213dc: 80 a0 40 10 cmp %g1, %l0 400213e0: 02 80 00 06 be 400213f8 400213e4: 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)) 400213e8: 80 a4 7f ff cmp %l1, -1 400213ec: 02 80 00 05 be 40021400 400213f0: 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; 400213f4: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 400213f8: 81 c7 e0 08 ret 400213fc: 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)) 40021400: 40 00 8d df call 40044b7c <__errno> 40021404: b0 10 20 0a mov 0xa, %i0 40021408: c2 02 00 00 ld [ %o0 ], %g1 4002140c: 80 a0 60 22 cmp %g1, 0x22 40021410: 02 bf ff fa be 400213f8 40021414: 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; 40021418: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4002141c: 81 c7 e0 08 ret <== NOT EXECUTED 40021420: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40021424: 10 bf ff ee b 400213dc 40021428: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e3b0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000e3b0: 9d e3 bf 90 save %sp, -112, %sp 4000e3b4: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000e3b8: 80 a6 60 00 cmp %i1, 0 4000e3bc: 02 80 00 23 be 4000e448 4000e3c0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000e3c4: 40 00 08 30 call 40010484 <__errno> 4000e3c8: 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 ); 4000e3cc: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000e3d0: c0 22 00 00 clr [ %o0 ] *n = 0; 4000e3d4: c0 26 40 00 clr [ %i1 ] 4000e3d8: 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 ); 4000e3dc: 90 10 00 10 mov %l0, %o0 4000e3e0: 40 00 15 6a call 40013988 4000e3e4: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000e3e8: 80 a6 a0 00 cmp %i2, 0 4000e3ec: 02 80 00 19 be 4000e450 4000e3f0: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000e3f4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000e3f8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000e3fc: 80 a0 40 10 cmp %g1, %l0 4000e400: 02 80 00 12 be 4000e448 4000e404: 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)) 4000e408: 80 a4 7f ff cmp %l1, -1 4000e40c: 02 80 00 06 be 4000e424 4000e410: 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; 4000e414: d2 26 60 04 st %o1, [ %i1 + 4 ] 4000e418: e2 26 40 00 st %l1, [ %i1 ] return RTEMS_SUCCESSFUL; } 4000e41c: 81 c7 e0 08 ret 4000e420: 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)) 4000e424: 32 bf ff fd bne,a 4000e418 4000e428: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED 4000e42c: 40 00 08 16 call 40010484 <__errno> 4000e430: d2 27 bf f4 st %o1, [ %fp + -12 ] 4000e434: c2 02 00 00 ld [ %o0 ], %g1 4000e438: b0 10 20 0a mov 0xa, %i0 4000e43c: 80 a0 60 22 cmp %g1, 0x22 4000e440: 12 bf ff f5 bne 4000e414 4000e444: d2 07 bf f4 ld [ %fp + -12 ], %o1 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4000e448: 81 c7 e0 08 ret 4000e44c: 81 e8 00 00 restore 4000e450: 10 bf ff eb b 4000e3fc 4000e454: c2 07 bf fc ld [ %fp + -4 ], %g1 400057c0 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 400057c0: 82 10 00 08 mov %o0, %g1 int baud_index; switch (termios_baud) { 400057c4: 80 a2 20 09 cmp %o0, 9 400057c8: 02 80 00 2d be 4000587c 400057cc: 90 10 20 09 mov 9, %o0 400057d0: 80 a0 60 09 cmp %g1, 9 400057d4: 04 80 00 1a ble 4000583c 400057d8: 80 a0 60 04 cmp %g1, 4 400057dc: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 400057e0: 02 80 00 27 be 4000587c <== NOT EXECUTED 400057e4: 90 10 20 0e mov 0xe, %o0 <== NOT EXECUTED 400057e8: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 400057ec: 04 80 00 26 ble 40005884 <== NOT EXECUTED 400057f0: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 400057f4: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 400057f8: 86 10 a0 02 or %g2, 2, %g3 ! 1002 <== NOT EXECUTED 400057fc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40005800: 02 80 00 1f be 4000587c <== NOT EXECUTED 40005804: 90 10 20 11 mov 0x11, %o0 <== NOT EXECUTED 40005808: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000580c: 04 80 00 38 ble 400058ec <== NOT EXECUTED 40005810: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED 40005814: 86 10 a0 03 or %g2, 3, %g3 <== NOT EXECUTED 40005818: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000581c: 02 80 00 18 be 4000587c <== NOT EXECUTED 40005820: 90 10 20 12 mov 0x12, %o0 <== NOT EXECUTED 40005824: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 40005828: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000582c: 02 80 00 14 be 4000587c <== NOT EXECUTED 40005830: 90 10 20 13 mov 0x13, %o0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 40005834: 81 c3 e0 08 retl 40005838: 90 10 3f ff mov -1, %o0 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4000583c: 02 80 00 10 be 4000587c 40005840: 90 10 20 04 mov 4, %o0 40005844: 80 a0 60 04 cmp %g1, 4 40005848: 14 80 00 1c bg 400058b8 4000584c: 80 a0 60 06 cmp %g1, 6 40005850: 80 a0 60 01 cmp %g1, 1 40005854: 02 80 00 0a be 4000587c 40005858: 90 10 20 01 mov 1, %o0 4000585c: 80 a0 60 01 cmp %g1, 1 40005860: 04 80 00 2b ble 4000590c 40005864: 80 a0 60 02 cmp %g1, 2 40005868: 02 80 00 05 be 4000587c <== NOT EXECUTED 4000586c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40005870: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40005874: 12 bf ff f0 bne 40005834 <== NOT EXECUTED 40005878: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED 4000587c: 81 c3 e0 08 retl <== NOT EXECUTED 40005880: 01 00 00 00 nop <== NOT EXECUTED 40005884: 02 bf ff fe be 4000587c <== NOT EXECUTED 40005888: 90 10 20 0b mov 0xb, %o0 ! b <== NOT EXECUTED 4000588c: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 40005890: 06 bf ff fb bl 4000587c <== NOT EXECUTED 40005894: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 40005898: 80 a0 60 0c cmp %g1, 0xc <== NOT EXECUTED 4000589c: 02 bf ff f8 be 4000587c <== NOT EXECUTED 400058a0: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED 400058a4: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 400058a8: 12 bf ff e3 bne 40005834 <== NOT EXECUTED 400058ac: 90 10 20 0d mov 0xd, %o0 <== NOT EXECUTED 400058b0: 81 c3 e0 08 retl <== NOT EXECUTED 400058b4: 01 00 00 00 nop <== NOT EXECUTED 400058b8: 02 bf ff f1 be 4000587c <== NOT EXECUTED 400058bc: 90 10 20 06 mov 6, %o0 ! 6 <== NOT EXECUTED 400058c0: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 400058c4: 06 bf ff ee bl 4000587c <== NOT EXECUTED 400058c8: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED 400058cc: 80 a0 60 07 cmp %g1, 7 <== NOT EXECUTED 400058d0: 02 bf ff eb be 4000587c <== NOT EXECUTED 400058d4: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED 400058d8: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 400058dc: 12 bf ff d6 bne 40005834 <== NOT EXECUTED 400058e0: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED 400058e4: 81 c3 e0 08 retl <== NOT EXECUTED 400058e8: 01 00 00 00 nop <== NOT EXECUTED 400058ec: 02 bf ff e4 be 4000587c <== NOT EXECUTED 400058f0: 90 10 20 0f mov 0xf, %o0 ! f <== NOT EXECUTED 400058f4: 84 10 a0 01 or %g2, 1, %g2 <== NOT EXECUTED 400058f8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400058fc: 12 bf ff ce bne 40005834 <== NOT EXECUTED 40005900: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED 40005904: 81 c3 e0 08 retl <== NOT EXECUTED 40005908: 01 00 00 00 nop <== NOT EXECUTED 4000590c: 80 a0 60 00 cmp %g1, 0 40005910: 12 bf ff c9 bne 40005834 40005914: 90 10 20 00 clr %o0 case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 40005918: 81 c3 e0 08 retl <== NOT EXECUTED 4000591c: 01 00 00 00 nop 4000423c : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 4000423c: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED 40004240: d0 20 61 18 st %o0, [ %g1 + 0x118 ] ! 4001c918 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40004244: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 40004248: 90 10 20 00 clr %o0 <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; 4000424c: d2 20 61 1c st %o1, [ %g1 + 0x11c ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40004250: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40004254: 81 c3 e0 08 retl <== NOT EXECUTED 40004258: d4 20 61 20 st %o2, [ %g1 + 0x120 ] ! 4001c920 <== NOT EXECUTED 40005970 : } } rtems_status_code rtems_termios_close (void *arg) { 40005970: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005974: 23 10 00 74 sethi %hi(0x4001d000), %l1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005978: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4000597c: d0 04 61 74 ld [ %l1 + 0x174 ], %o0 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005980: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005984: 92 10 20 00 clr %o1 40005988: 40 00 04 b1 call 40006c4c 4000598c: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40005990: 80 a2 20 00 cmp %o0, 0 40005994: 12 80 00 6e bne 40005b4c 40005998: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 4000599c: c2 04 20 08 ld [ %l0 + 8 ], %g1 400059a0: 82 00 7f ff add %g1, -1, %g1 400059a4: 80 a0 60 00 cmp %g1, 0 400059a8: 12 80 00 3a bne 40005a90 400059ac: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400059b0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 400059b4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 400059b8: 85 28 a0 05 sll %g2, 5, %g2 400059bc: 82 10 62 68 or %g1, 0x268, %g1 400059c0: 82 00 40 02 add %g1, %g2, %g1 400059c4: c2 00 60 04 ld [ %g1 + 4 ], %g1 400059c8: 80 a0 60 00 cmp %g1, 0 400059cc: 22 80 00 48 be,a 40005aec 400059d0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400059d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400059d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 400059dc: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 400059e0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400059e4: 22 80 00 4f be,a 40005b20 <== NOT EXECUTED 400059e8: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 400059ec: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 400059f0: 80 a0 60 00 cmp %g1, 0 400059f4: 22 80 00 07 be,a 40005a10 400059f8: c2 04 00 00 ld [ %l0 ], %g1 (*tty->device.lastClose)(tty->major, tty->minor, arg); 400059fc: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 40005a00: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40005a04: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005a08: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40005a0c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40005a10: 80 a0 60 00 cmp %g1, 0 40005a14: 22 80 00 27 be,a 40005ab0 40005a18: c2 04 20 04 ld [ %l0 + 4 ], %g1 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 40005a1c: c4 04 20 04 ld [ %l0 + 4 ], %g2 40005a20: c4 20 60 04 st %g2, [ %g1 + 4 ] } if (tty->back == NULL) { 40005a24: c4 04 20 04 ld [ %l0 + 4 ], %g2 40005a28: 80 a0 a0 00 cmp %g2, 0 40005a2c: 22 80 00 2b be,a 40005ad8 40005a30: 05 10 00 74 sethi %hi(0x4001d000), %g2 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 40005a34: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40005a38: 40 00 04 58 call 40006b98 40005a3c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 40005a40: 40 00 04 56 call 40006b98 40005a44: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40005a48: 40 00 04 54 call 40006b98 40005a4c: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 40005a50: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40005a54: 80 a0 60 00 cmp %g1, 0 40005a58: 02 80 00 13 be 40005aa4 40005a5c: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 40005a60: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005a64: 80 a0 60 02 cmp %g1, 2 40005a68: 02 80 00 0f be 40005aa4 40005a6c: 01 00 00 00 nop rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 40005a70: 40 00 18 6b call 4000bc1c 40005a74: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40005a78: 40 00 18 69 call 4000bc1c 40005a7c: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40005a80: 40 00 18 67 call 4000bc1c 40005a84: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40005a88: 40 00 18 65 call 4000bc1c 40005a8c: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 40005a90: d0 04 61 74 ld [ %l1 + 0x174 ], %o0 40005a94: 40 00 04 b5 call 40006d68 40005a98: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40005a9c: 81 c7 e0 08 ret 40005aa0: 81 e8 00 00 restore rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 40005aa4: 40 00 04 3d call 40006b98 <== NOT EXECUTED 40005aa8: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40005aac: 30 bf ff f1 b,a 40005a70 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 40005ab0: 05 10 00 74 sethi %hi(0x4001d000), %g2 if ( rtems_termios_ttyTail != NULL ) { 40005ab4: 80 a0 60 00 cmp %g1, 0 40005ab8: 02 80 00 27 be 40005b54 40005abc: c2 20 a1 78 st %g1, [ %g2 + 0x178 ] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 40005ac0: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 40005ac4: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 40005ac8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005acc: 12 bf ff da bne 40005a34 <== NOT EXECUTED 40005ad0: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 40005ad4: 05 10 00 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { 40005ad8: 80 a0 60 00 cmp %g1, 0 40005adc: 02 bf ff d7 be 40005a38 40005ae0: c2 20 a1 7c st %g1, [ %g2 + 0x17c ] rtems_termios_ttyHead->back = NULL; 40005ae4: 10 bf ff d5 b 40005a38 40005ae8: c0 20 60 04 clr [ %g1 + 4 ] } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005aec: 92 10 20 00 clr %o1 40005af0: 40 00 04 57 call 40006c4c 40005af4: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40005af8: 80 a2 20 00 cmp %o0, 0 40005afc: 12 80 00 14 bne 40005b4c 40005b00: 01 00 00 00 nop rtems_fatal_error_occurred (sc); } drainOutput (tty); 40005b04: 7f ff fd 80 call 40005104 40005b08: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40005b0c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005b10: 80 a0 60 02 cmp %g1, 2 40005b14: 32 bf ff b7 bne,a 400059f0 40005b18: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 40005b1c: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 40005b20: 40 00 03 0a call 40006748 <== NOT EXECUTED 40005b24: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40005b28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005b2c: 12 80 00 08 bne 40005b4c <== NOT EXECUTED 40005b30: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 40005b34: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40005b38: 40 00 03 04 call 40006748 <== NOT EXECUTED 40005b3c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40005b40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005b44: 22 bf ff ab be,a 400059f0 <== NOT EXECUTED 40005b48: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005b4c: 40 00 05 ed call 40007300 <== NOT EXECUTED 40005b50: 01 00 00 00 nop <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 40005b54: 03 10 00 74 sethi %hi(0x4001d000), %g1 40005b58: 10 bf ff b8 b 40005a38 40005b5c: c0 20 61 7c clr [ %g1 + 0x17c ] ! 4001d17c 40004474 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40004474: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40004478: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4000447c: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40004480: 84 00 80 19 add %g2, %i1, %g2 <== NOT EXECUTED 40004484: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004488: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000448c: 02 80 00 10 be 400044cc <== NOT EXECUTED 40004490: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 40004494: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40004498: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4000449c: 02 80 00 04 be 400044ac <== NOT EXECUTED 400044a0: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 400044a4: 7f ff ff 74 call 40004274 <== NOT EXECUTED 400044a8: 81 e8 00 00 restore <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400044ac: c2 00 63 1c ld [ %g1 + 0x31c ], %g1 <== NOT EXECUTED 400044b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044b4: 02 80 00 04 be 400044c4 <== NOT EXECUTED 400044b8: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 400044bc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400044c0: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 400044c4: 81 c7 e0 08 ret <== NOT EXECUTED 400044c8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 400044cc: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400044d0: 40 00 08 9e call 40006748 <== NOT EXECUTED 400044d4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 400044d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400044dc: 02 bf ff fa be 400044c4 <== NOT EXECUTED 400044e0: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400044e4: 40 00 0b 87 call 40007300 <== NOT EXECUTED 400044e8: 01 00 00 00 nop 400044ec: 01 00 00 00 nop 400044f0 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 400044f0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 400044f4: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400044f8: 23 10 00 73 sethi %hi(0x4001cc00), %l1 <== NOT EXECUTED 400044fc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004500: a2 14 62 68 or %l1, 0x268, %l1 <== NOT EXECUTED 40004504: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40004508: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED 4000450c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004510: 02 80 00 22 be 40004598 <== NOT EXECUTED 40004514: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED while (len--) { 40004518: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000451c: 22 80 00 0f be,a 40004558 <== NOT EXECUTED 40004520: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 40004524: 10 80 00 05 b 40004538 <== NOT EXECUTED 40004528: a4 10 20 00 clr %l2 <== NOT EXECUTED 4000452c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004530: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40004534: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40004538: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED 4000453c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004540: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004544: a4 04 a0 01 inc %l2 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 40004548: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED 4000454c: 32 bf ff f8 bne,a 4000452c <== NOT EXECUTED 40004550: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40004554: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 40004558: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000455c: 12 80 00 0d bne 40004590 <== NOT EXECUTED 40004560: 01 00 00 00 nop <== NOT EXECUTED 40004564: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 40004568: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000456c: 02 80 00 09 be 40004590 <== NOT EXECUTED 40004570: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004574: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 40004578: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000457c: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40004580: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004584: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED 40004588: 81 c7 e0 08 ret <== NOT EXECUTED 4000458c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 40004590: 81 c7 e0 08 ret <== NOT EXECUTED 40004594: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004598: a2 10 00 1a mov %i2, %l1 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 4000459c: ae 06 20 4a add %i0, 0x4a, %l7 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 400045a0: ac 06 20 30 add %i0, 0x30, %l6 <== NOT EXECUTED 400045a4: a8 10 20 00 clr %l4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400045a8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400045ac: 02 80 00 1c be 4000461c <== NOT EXECUTED 400045b0: b0 10 20 00 clr %i0 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 400045b4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400045b8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400045bc: 02 80 00 0b be 400045e8 <== NOT EXECUTED 400045c0: e4 0e 40 00 ldub [ %i1 ], %l2 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 400045c4: c4 0c 20 4a ldub [ %l0 + 0x4a ], %g2 <== NOT EXECUTED 400045c8: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED 400045cc: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 400045d0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400045d4: 02 80 00 63 be 40004760 <== NOT EXECUTED 400045d8: c4 0c 20 49 ldub [ %l0 + 0x49 ], %g2 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 400045dc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400045e0: 02 80 00 68 be 40004780 <== NOT EXECUTED 400045e4: 01 00 00 00 nop <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 400045e8: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 400045ec: 02 80 00 22 be 40004674 <== NOT EXECUTED 400045f0: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 400045f4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400045f8: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 400045fc: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 40004600: 02 80 00 0e be 40004638 <== NOT EXECUTED 40004604: 01 00 00 00 nop <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004608: b2 06 60 01 inc %i1 <== NOT EXECUTED 4000460c: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40004610: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40004614: 12 bf ff e8 bne 400045b4 <== NOT EXECUTED 40004618: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 4000461c: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40004620: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40004624: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40004628: 40 00 09 d0 call 40006d68 <== NOT EXECUTED 4000462c: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED return dropped; 40004630: 81 c7 e0 08 ret <== NOT EXECUTED 40004634: 81 e8 00 00 restore <== NOT EXECUTED } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); 40004638: 7f ff f5 f7 call 40001e14 <== NOT EXECUTED 4000463c: 01 00 00 00 nop <== NOT EXECUTED 40004640: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40004644: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004648: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 4000464c: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 40004650: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004654: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004658: 12 80 00 57 bne 400047b4 <== NOT EXECUTED 4000465c: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 40004660: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40004664: 7f ff f5 f0 call 40001e24 <== NOT EXECUTED 40004668: b2 06 60 01 inc %i1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4000466c: 10 bf ff e9 b 40004610 <== NOT EXECUTED 40004670: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40004674: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 40004678: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 4000467c: 40 00 50 e6 call 40018a14 <.urem> <== NOT EXECUTED 40004680: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40004684: 7f ff f5 e4 call 40001e14 <== NOT EXECUTED 40004688: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED 4000468c: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 40004690: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 40004694: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 40004698: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 4000469c: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 400046a0: 40 00 50 dd call 40018a14 <.urem> <== NOT EXECUTED 400046a4: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 400046a8: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 <== NOT EXECUTED 400046ac: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400046b0: 08 80 00 13 bleu 400046fc <== NOT EXECUTED 400046b4: 01 00 00 00 nop <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 400046b8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 400046bc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400046c0: 12 80 00 0f bne 400046fc <== NOT EXECUTED 400046c4: 01 00 00 00 nop <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 400046c8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400046cc: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 400046d0: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400046d4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400046d8: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 400046dc: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 400046e0: 02 80 00 3d be 400047d4 <== NOT EXECUTED 400046e4: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 400046e8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400046ec: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 400046f0: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 400046f4: 02 80 00 49 be 40004818 <== NOT EXECUTED 400046f8: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 400046fc: 7f ff f5 ca call 40001e24 <== NOT EXECUTED 40004700: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40004704: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 40004708: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 4000470c: 22 80 00 22 be,a 40004794 <== NOT EXECUTED 40004710: b0 06 20 01 inc %i0 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 40004714: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40004718: e4 28 40 13 stb %l2, [ %g1 + %l3 ] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4000471c: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 40004720: e6 24 20 60 st %l3, [ %l0 + 0x60 ] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40004724: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004728: 32 bf ff b9 bne,a 4000460c <== NOT EXECUTED 4000472c: b2 06 60 01 inc %i1 <== NOT EXECUTED 40004730: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 40004734: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004738: 22 bf ff b5 be,a 4000460c <== NOT EXECUTED 4000473c: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004740: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 40004744: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004748: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4000474c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004750: b2 06 60 01 inc %i1 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 40004754: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004758: 10 bf ff ae b 40004610 <== NOT EXECUTED 4000475c: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 40004760: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004764: 02 80 00 0f be 400047a0 <== NOT EXECUTED 40004768: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4000476c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 40004770: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 40004774: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 40004778: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 4000477c: 30 bf ff 9e b,a 400045f4 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 40004780: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 40004784: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 40004788: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 4000478c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 40004790: 30 bf ff 99 b,a 400045f4 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004794: b2 06 60 01 inc %i1 <== NOT EXECUTED 40004798: 10 bf ff 9e b 40004610 <== NOT EXECUTED 4000479c: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 400047a0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 400047a4: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 400047a8: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED 400047ac: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED 400047b0: 30 bf ff 91 b,a 400045f4 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 400047b4: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 400047b8: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 400047bc: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400047c0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400047c4: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 400047c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400047cc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400047d0: 30 bf ff a4 b,a 40004660 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 400047d4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400047d8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400047dc: 12 80 00 06 bne 400047f4 <== NOT EXECUTED 400047e0: 01 00 00 00 nop <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 400047e4: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 400047e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400047ec: 12 bf ff c4 bne 400046fc <== NOT EXECUTED 400047f0: 01 00 00 00 nop <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 400047f4: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400047f8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400047fc: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 40004800: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004804: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 40004808: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000480c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004810: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004814: 30 bf ff ba b,a 400046fc <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40004818: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4000481c: c2 04 20 ac ld [ %l0 + 0xac ], %g1 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40004820: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 40004824: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40004828: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000482c: 02 bf ff b4 be 400046fc <== NOT EXECUTED 40004830: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40004834: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004838: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 4000483c: 30 bf ff b0 b,a 400046fc <== NOT EXECUTED 400041ec : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 400041ec: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 400041f0: 19 10 00 74 sethi %hi(0x4001d000), %o4 400041f4: c2 03 21 74 ld [ %o4 + 0x174 ], %g1 ! 4001d174 400041f8: 80 a0 60 00 cmp %g1, 0 400041fc: 02 80 00 04 be 4000420c 40004200: 98 13 21 74 or %o4, 0x174, %o4 40004204: 81 c7 e0 08 ret 40004208: 81 e8 00 00 restore sc = rtems_semaphore_create ( 4000420c: 11 15 14 9b sethi %hi(0x54526c00), %o0 40004210: 92 10 20 01 mov 1, %o1 40004214: 90 12 21 69 or %o0, 0x169, %o0 40004218: 94 10 20 54 mov 0x54, %o2 4000421c: 40 00 09 eb call 400069c8 40004220: 96 10 20 00 clr %o3 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 40004224: 80 a2 20 00 cmp %o0, 0 40004228: 02 bf ff f7 be 40004204 4000422c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40004230: 40 00 0c 34 call 40007300 <== NOT EXECUTED 40004234: 01 00 00 00 nop 40004238: 01 00 00 00 nop 40005564 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40005564: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005568: c2 06 00 00 ld [ %i0 ], %g1 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 4000556c: c0 26 20 0c clr [ %i0 + 0xc ] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005570: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40005574: e4 06 20 08 ld [ %i0 + 8 ], %l2 rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005578: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 4000557c: 92 10 20 00 clr %o1 40005580: 40 00 05 b3 call 40006c4c 40005584: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40005588: a2 92 20 00 orcc %o0, 0, %l1 4000558c: 32 80 00 16 bne,a 400055e4 40005590: e2 26 20 0c st %l1, [ %i0 + 0xc ] <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 40005594: c2 06 20 04 ld [ %i0 + 4 ], %g1 40005598: 80 a0 60 04 cmp %g1, 4 4000559c: 22 80 00 0c be,a 400055cc 400055a0: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400055a4: 18 80 00 12 bgu 400055ec 400055a8: 05 10 01 19 sethi %hi(0x40046400), %g2 400055ac: 80 a0 60 02 cmp %g1, 2 400055b0: 22 80 00 26 be,a 40005648 400055b4: d2 06 20 08 ld [ %i0 + 8 ], %o1 400055b8: 08 80 00 81 bleu 400057bc 400055bc: 80 a0 60 01 cmp %g1, 1 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 400055c0: 7f ff fe d1 call 40005104 400055c4: 90 10 00 10 mov %l0, %o0 break; 400055c8: 30 80 00 04 b,a 400055d8 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 400055cc: c2 24 20 dc st %g1, [ %l0 + 0xdc ] <== NOT EXECUTED 400055d0: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED 400055d4: c2 24 20 e0 st %g1, [ %l0 + 0xe0 ] <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 400055d8: 40 00 05 e4 call 40006d68 400055dc: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 args->ioctl_return = sc; 400055e0: e2 26 20 0c st %l1, [ %i0 + 0xc ] return sc; } 400055e4: 81 c7 e0 08 ret 400055e8: 91 e8 00 11 restore %g0, %l1, %o0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 400055ec: 84 10 a2 7f or %g2, 0x27f, %g2 <== NOT EXECUTED 400055f0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400055f4: 02 80 00 66 be 4000578c <== NOT EXECUTED 400055f8: 01 00 00 00 nop <== NOT EXECUTED 400055fc: 18 80 00 77 bgu 400057d8 <== NOT EXECUTED 40005600: 05 10 01 1d sethi %hi(0x40047400), %g2 <== NOT EXECUTED 40005604: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40005608: 22 80 00 98 be,a 40005868 <== NOT EXECUTED 4000560c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40005610: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40005614: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 40005618: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 4000561c: 82 10 62 68 or %g1, 0x268, %g1 <== NOT EXECUTED 40005620: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40005624: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40005628: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000562c: 02 bf ff eb be 400055d8 <== NOT EXECUTED 40005630: a2 10 20 0a mov 0xa, %l1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40005634: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005638: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000563c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40005640: 10 bf ff e6 b 400055d8 <== NOT EXECUTED 40005644: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 40005648: a4 04 20 30 add %l0, 0x30, %l2 4000564c: 94 10 20 24 mov 0x24, %o2 40005650: 40 00 28 ef call 4000fa0c 40005654: 90 10 00 12 mov %l2, %o0 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 40005658: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 4000565c: 80 88 62 00 btst 0x200, %g1 40005660: 02 80 00 19 be 400056c4 40005664: 01 00 00 00 nop 40005668: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000566c: 80 88 64 00 btst 0x400, %g1 40005670: 12 80 00 15 bne 400056c4 40005674: 01 00 00 00 nop !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 40005678: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 4000567c: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 40005680: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 40005684: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005688: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 4000568c: 02 80 00 0e be 400056c4 <== NOT EXECUTED 40005690: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40005694: 7f ff f1 e0 call 40001e14 <== NOT EXECUTED 40005698: 01 00 00 00 nop <== NOT EXECUTED 4000569c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400056a0: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400056a4: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 400056a8: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 400056ac: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400056b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400056b4: 12 80 00 a7 bne 40005950 <== NOT EXECUTED 400056b8: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 400056bc: 7f ff f1 da call 40001e24 <== NOT EXECUTED 400056c0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 400056c4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 400056c8: 80 88 64 00 btst 0x400, %g1 400056cc: 02 80 00 0c be 400056fc 400056d0: 03 00 00 04 sethi %hi(0x1000), %g1 400056d4: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 400056d8: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400056dc: 12 80 00 08 bne 400056fc <== NOT EXECUTED 400056e0: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 400056e4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400056e8: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 400056ec: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 400056f0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400056f4: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 400056f8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 400056fc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40005700: 80 88 61 00 btst 0x100, %g1 40005704: 12 80 00 5d bne 40005878 40005708: c4 04 20 38 ld [ %l0 + 0x38 ], %g2 /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 4000570c: 80 a0 a0 00 cmp %g2, 0 40005710: 06 80 00 84 bl 40005920 40005714: 01 00 00 00 nop tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40005718: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000571c: 05 00 00 04 sethi %hi(0x1000), %g2 40005720: 80 88 40 02 btst %g1, %g2 40005724: 02 80 00 06 be 4000573c 40005728: 80 88 64 00 btst 0x400, %g1 tty->flow_ctrl |= FL_MDXOF; 4000572c: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED 40005730: 84 10 a4 00 or %g2, 0x400, %g2 <== NOT EXECUTED 40005734: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 40005738: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 4000573c: 22 80 00 06 be,a 40005754 40005740: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40005744: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40005748: 82 10 62 00 or %g1, 0x200, %g1 4000574c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 40005750: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 40005754: 80 88 60 02 btst 2, %g1 40005758: 02 80 00 5e be 400058d0 4000575c: 01 00 00 00 nop else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005760: c0 24 20 6c clr [ %l0 + 0x6c ] tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40005764: c0 24 20 70 clr [ %l0 + 0x70 ] tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40005768: c0 24 20 74 clr [ %l0 + 0x74 ] else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4000576c: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 40005770: 80 a0 60 00 cmp %g1, 0 40005774: 02 bf ff 99 be 400055d8 40005778: 01 00 00 00 nop (*tty->device.setAttributes)(tty->minor, &tty->termios); 4000577c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 40005780: 9f c0 40 00 call %g1 40005784: 92 10 00 12 mov %l2, %o1 40005788: 30 bf ff 94 b,a 400055d8 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 4000578c: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 40005790: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40005794: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED 40005798: 0c 80 00 5f bneg 40005914 <== NOT EXECUTED 4000579c: 01 00 00 00 nop <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 400057a0: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED 400057a4: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 400057a8: c6 06 20 08 ld [ %i0 + 8 ], %g3 <== NOT EXECUTED 400057ac: 84 21 00 02 sub %g4, %g2, %g2 <== NOT EXECUTED 400057b0: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 400057b4: 10 bf ff 89 b 400055d8 <== NOT EXECUTED 400057b8: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 400057bc: 32 bf ff 96 bne,a 40005614 400057c0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 400057c4: d0 06 20 08 ld [ %i0 + 8 ], %o0 400057c8: 92 04 20 30 add %l0, 0x30, %o1 400057cc: 40 00 28 90 call 4000fa0c 400057d0: 94 10 20 24 mov 0x24, %o2 break; 400057d4: 30 bf ff 81 b,a 400055d8 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 400057d8: 84 10 a0 1a or %g2, 0x1a, %g2 <== NOT EXECUTED 400057dc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400057e0: 02 80 00 1e be 40005858 <== NOT EXECUTED 400057e4: 05 20 01 1d sethi %hi(0x80047400), %g2 <== NOT EXECUTED 400057e8: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <== NOT EXECUTED 400057ec: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400057f0: 32 bf ff 89 bne,a 40005614 <== NOT EXECUTED 400057f4: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400057f8: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 400057fc: 25 10 00 73 sethi %hi(0x4001cc00), %l2 <== NOT EXECUTED 40005800: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40005804: a4 14 a2 68 or %l2, 0x268, %l2 <== NOT EXECUTED 40005808: 82 04 80 01 add %l2, %g1, %g1 <== NOT EXECUTED 4000580c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40005810: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005814: 22 80 00 06 be,a 4000582c <== NOT EXECUTED 40005818: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 4000581c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005820: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005824: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 40005828: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 4000582c: c0 24 20 d0 clr [ %l0 + 0xd0 ] <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 40005830: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 40005834: 83 28 a0 05 sll %g2, 5, %g1 <== NOT EXECUTED 40005838: c2 04 80 01 ld [ %l2 + %g1 ], %g1 <== NOT EXECUTED 4000583c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005840: 02 bf ff 66 be 400055d8 <== NOT EXECUTED 40005844: c4 24 20 cc st %g2, [ %l0 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 40005848: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000584c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005850: 10 bf ff 62 b 400055d8 <== NOT EXECUTED 40005854: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 40005858: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 4000585c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED break; 40005860: 10 bf ff 5e b 400055d8 <== NOT EXECUTED 40005864: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 40005868: c2 24 20 d4 st %g1, [ %l0 + 0xd4 ] <== NOT EXECUTED 4000586c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 40005870: 10 bf ff 5a b 400055d8 <== NOT EXECUTED 40005874: c2 24 20 d8 st %g1, [ %l0 + 0xd8 ] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 40005878: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000587c: 06 80 00 29 bl 40005920 <== NOT EXECUTED 40005880: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 40005884: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005888: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 4000588c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 40005890: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005894: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40005898: 02 80 00 09 be 400058bc <== NOT EXECUTED 4000589c: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 400058a0: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 400058a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400058a8: 02 80 00 05 be 400058bc <== NOT EXECUTED 400058ac: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400058b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400058b4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400058b8: c4 04 20 38 ld [ %l0 + 0x38 ], %g2 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400058bc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400058c0: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400058c4: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 400058c8: 10 bf ff 92 b 40005710 <== NOT EXECUTED 400058cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 400058d0: 40 00 03 12 call 40006518 <== NOT EXECUTED 400058d4: e6 0c 20 46 ldub [ %l0 + 0x46 ], %l3 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 400058d8: 40 00 4b 69 call 4001867c <.umul> <== NOT EXECUTED 400058dc: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 400058e0: 40 00 4b a1 call 40018764 <.udiv> <== NOT EXECUTED 400058e4: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 400058e8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400058ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400058f0: 02 80 00 11 be 40005934 <== NOT EXECUTED 400058f4: d0 24 20 54 st %o0, [ %l0 + 0x54 ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 400058f8: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 400058fc: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40005900: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005904: 12 bf ff 99 bne 40005768 <== NOT EXECUTED 40005908: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 4000590c: 10 bf ff 98 b 4000576c <== NOT EXECUTED 40005910: d0 24 20 74 st %o0, [ %l0 + 0x74 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 40005914: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40005918: 10 bf ff a2 b 400057a0 <== NOT EXECUTED 4000591c: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 40005920: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005924: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40005928: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 4000592c: 10 bf ff 7c b 4000571c <== NOT EXECUTED 40005930: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 40005934: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40005938: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000593c: 32 bf ff 8a bne,a 40005764 <== NOT EXECUTED 40005940: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 40005944: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40005948: 10 bf ff 89 b 4000576c <== NOT EXECUTED 4000594c: c2 24 20 6c st %g1, [ %l0 + 0x6c ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 40005950: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 40005954: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40005958: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 4000595c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40005960: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40005964: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005968: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 4000596c: 30 bf ff 54 b,a 400056bc <== NOT EXECUTED 40005ae8 : #include int rtems_termios_number_to_baud( int32_t baud ) { 40005ae8: 82 10 00 08 mov %o0, %g1 int termios_baud; switch (baud) { 40005aec: 80 a2 24 b0 cmp %o0, 0x4b0 40005af0: 02 80 00 32 be 40005bb8 40005af4: 90 10 20 09 mov 9, %o0 40005af8: 80 a0 64 b0 cmp %g1, 0x4b0 40005afc: 04 80 00 1e ble 40005b74 40005b00: 80 a0 60 86 cmp %g1, 0x86 40005b04: 05 00 00 12 sethi %hi(0x4800), %g2 40005b08: 84 10 a3 00 or %g2, 0x300, %g2 ! 4b00 40005b0c: 80 a0 40 02 cmp %g1, %g2 40005b10: 02 80 00 2a be 40005bb8 40005b14: 90 10 20 0e mov 0xe, %o0 40005b18: 80 a0 40 02 cmp %g1, %g2 40005b1c: 04 80 00 29 ble 40005bc0 40005b20: 80 a0 69 60 cmp %g1, 0x960 40005b24: 07 00 00 70 sethi %hi(0x1c000), %g3 case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 40005b28: 05 00 00 04 sethi %hi(0x1000), %g2 int32_t baud ) { int termios_baud; switch (baud) { 40005b2c: 86 10 e2 00 or %g3, 0x200, %g3 40005b30: 80 a0 40 03 cmp %g1, %g3 40005b34: 02 80 00 21 be 40005bb8 40005b38: 90 10 a0 02 or %g2, 2, %o0 40005b3c: 80 a0 40 03 cmp %g1, %g3 40005b40: 04 80 00 46 ble 40005c58 40005b44: 07 00 00 25 sethi %hi(0x9400), %g3 40005b48: 07 00 00 e1 sethi %hi(0x38400), %g3 40005b4c: 80 a0 40 03 cmp %g1, %g3 40005b50: 02 80 00 1a be 40005bb8 40005b54: 90 10 a0 03 or %g2, 3, %o0 case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 40005b58: 90 10 a0 04 or %g2, 4, %o0 int32_t baud ) { int termios_baud; switch (baud) { 40005b5c: 05 00 01 c2 sethi %hi(0x70800), %g2 40005b60: 80 a0 40 02 cmp %g1, %g2 40005b64: 02 80 00 4b be 40005c90 40005b68: 01 00 00 00 nop case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 40005b6c: 81 c3 e0 08 retl 40005b70: 90 10 3f ff mov -1, %o0 ! ffffffff int32_t baud ) { int termios_baud; switch (baud) { 40005b74: 02 80 00 11 be 40005bb8 40005b78: 90 10 20 04 mov 4, %o0 40005b7c: 80 a0 60 86 cmp %g1, 0x86 40005b80: 04 80 00 21 ble 40005c04 40005b84: 80 a0 60 32 cmp %g1, 0x32 40005b88: 80 a0 60 c8 cmp %g1, 0xc8 40005b8c: 02 80 00 0b be 40005bb8 40005b90: 90 10 20 06 mov 6, %o0 40005b94: 80 a0 60 c8 cmp %g1, 0xc8 40005b98: 04 80 00 28 ble 40005c38 40005b9c: 80 a0 60 96 cmp %g1, 0x96 40005ba0: 80 a0 61 2c cmp %g1, 0x12c 40005ba4: 02 80 00 05 be 40005bb8 40005ba8: 90 10 20 07 mov 7, %o0 40005bac: 80 a0 62 58 cmp %g1, 0x258 40005bb0: 12 bf ff ef bne 40005b6c 40005bb4: 90 10 20 08 mov 8, %o0 40005bb8: 81 c3 e0 08 retl 40005bbc: 01 00 00 00 nop 40005bc0: 02 bf ff fe be 40005bb8 40005bc4: 90 10 20 0b mov 0xb, %o0 ! b 40005bc8: 80 a0 69 60 cmp %g1, 0x960 40005bcc: 04 80 00 2f ble 40005c88 40005bd0: 80 a0 67 08 cmp %g1, 0x708 40005bd4: 05 00 00 04 sethi %hi(0x1000), %g2 40005bd8: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 12c0 40005bdc: 80 a0 40 02 cmp %g1, %g2 40005be0: 02 bf ff f6 be 40005bb8 40005be4: 90 10 20 0c mov 0xc, %o0 40005be8: 05 00 00 09 sethi %hi(0x2400), %g2 40005bec: 84 10 a1 80 or %g2, 0x180, %g2 ! 2580 40005bf0: 80 a0 40 02 cmp %g1, %g2 40005bf4: 12 bf ff de bne 40005b6c 40005bf8: 90 10 20 0d mov 0xd, %o0 40005bfc: 81 c3 e0 08 retl 40005c00: 01 00 00 00 nop 40005c04: 02 bf ff ed be 40005bb8 40005c08: 90 10 20 01 mov 1, %o0 ! 1 40005c0c: 80 a0 60 32 cmp %g1, 0x32 40005c10: 04 80 00 0e ble 40005c48 40005c14: 80 a0 60 00 cmp %g1, 0 40005c18: 80 a0 60 4b cmp %g1, 0x4b 40005c1c: 02 bf ff e7 be 40005bb8 40005c20: 90 10 20 02 mov 2, %o0 40005c24: 80 a0 60 6e cmp %g1, 0x6e 40005c28: 12 bf ff d1 bne 40005b6c 40005c2c: 90 10 20 03 mov 3, %o0 40005c30: 81 c3 e0 08 retl 40005c34: 01 00 00 00 nop 40005c38: 12 bf ff cd bne 40005b6c 40005c3c: 90 10 20 05 mov 5, %o0 ! 5 40005c40: 81 c3 e0 08 retl 40005c44: 01 00 00 00 nop 40005c48: 12 bf ff c9 bne 40005b6c 40005c4c: 90 10 20 00 clr %o0 ! 0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 40005c50: 81 c3 e0 08 retl 40005c54: 01 00 00 00 nop int32_t baud ) { int termios_baud; switch (baud) { 40005c58: 86 10 e2 00 or %g3, 0x200, %g3 40005c5c: 80 a0 40 03 cmp %g1, %g3 40005c60: 02 bf ff d6 be 40005bb8 40005c64: 90 10 20 0f mov 0xf, %o0 case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 40005c68: 90 10 a0 01 or %g2, 1, %o0 int32_t baud ) { int termios_baud; switch (baud) { 40005c6c: 05 00 00 38 sethi %hi(0xe000), %g2 40005c70: 84 10 a1 00 or %g2, 0x100, %g2 ! e100 40005c74: 80 a0 40 02 cmp %g1, %g2 40005c78: 32 bf ff d0 bne,a 40005bb8 40005c7c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40005c80: 81 c3 e0 08 retl 40005c84: 01 00 00 00 nop 40005c88: 12 bf ff b9 bne 40005b6c 40005c8c: 90 10 20 0a mov 0xa, %o0 ! a 40005c90: 81 c3 e0 08 retl 40005c94: 01 00 00 00 nop 40005b60 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 40005b60: 9d e3 bf a0 save %sp, -96, %sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 40005b64: 23 10 00 74 sethi %hi(0x4001d000), %l1 40005b68: d0 04 61 74 ld [ %l1 + 0x174 ], %o0 ! 4001d174 40005b6c: 92 10 20 00 clr %o1 40005b70: 40 00 04 37 call 40006c4c 40005b74: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40005b78: a0 92 20 00 orcc %o0, 0, %l0 40005b7c: 32 80 00 29 bne,a 40005c20 40005b80: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40005b84: 29 10 00 74 sethi %hi(0x4001d000), %l4 40005b88: e4 05 21 7c ld [ %l4 + 0x17c ], %l2 ! 4001d17c 40005b8c: 80 a4 a0 00 cmp %l2, 0 40005b90: 32 80 00 08 bne,a 40005bb0 40005b94: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005b98: 10 80 00 33 b 40005c64 40005b9c: 90 10 20 01 mov 1, %o0 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40005ba0: 80 a4 a0 00 cmp %l2, 0 40005ba4: 02 80 00 30 be 40005c64 40005ba8: 90 10 20 01 mov 1, %o0 if ((tty->major == major) && (tty->minor == minor)) 40005bac: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 <== NOT EXECUTED 40005bb0: 80 a0 40 18 cmp %g1, %i0 40005bb4: 32 bf ff fb bne,a 40005ba0 40005bb8: e4 04 80 00 ld [ %l2 ], %l2 40005bbc: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 40005bc0: 80 a0 40 19 cmp %g1, %i1 40005bc4: 32 bf ff f7 bne,a 40005ba0 40005bc8: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 40005bcc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40005bd0: c6 06 80 00 ld [ %i2 ], %g3 if (!tty->refcount++) { 40005bd4: 84 00 60 01 add %g1, 1, %g2 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40005bd8: e4 20 e0 38 st %l2, [ %g3 + 0x38 ] if (!tty->refcount++) { 40005bdc: 80 a0 60 00 cmp %g1, 0 40005be0: 12 80 00 0d bne 40005c14 40005be4: c4 24 a0 08 st %g2, [ %l2 + 8 ] if (tty->device.firstOpen) 40005be8: c2 04 a0 98 ld [ %l2 + 0x98 ], %g1 40005bec: 80 a0 60 00 cmp %g1, 0 40005bf0: 02 80 00 05 be 40005c04 40005bf4: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 40005bf8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40005bfc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005c00: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005c04: c2 04 a0 b4 ld [ %l2 + 0xb4 ], %g1 40005c08: 80 a0 60 02 cmp %g1, 2 40005c0c: 22 80 00 07 be,a 40005c28 40005c10: d0 04 a0 c4 ld [ %l2 + 0xc4 ], %o0 <== NOT EXECUTED (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 40005c14: 40 00 04 55 call 40006d68 40005c18: d0 04 61 74 ld [ %l1 + 0x174 ], %o0 return RTEMS_SUCCESSFUL; } 40005c1c: b0 10 00 10 mov %l0, %i0 40005c20: 81 c7 e0 08 ret 40005c24: 81 e8 00 00 restore (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 40005c28: 13 10 00 18 sethi %hi(0x40006000), %o1 <== NOT EXECUTED 40005c2c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40005c30: 40 00 05 22 call 400070b8 <== NOT EXECUTED 40005c34: 92 12 60 50 or %o1, 0x50, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005c38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005c3c: 12 80 00 bf bne 40005f38 <== NOT EXECUTED 40005c40: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 40005c44: d0 04 a0 c8 ld [ %l2 + 0xc8 ], %o0 <== NOT EXECUTED 40005c48: 13 10 00 17 sethi %hi(0x40005c00), %o1 <== NOT EXECUTED 40005c4c: 40 00 05 1b call 400070b8 <== NOT EXECUTED 40005c50: 92 12 63 b8 or %o1, 0x3b8, %o1 ! 40005fb8 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005c54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005c58: 02 bf ff ef be 40005c14 <== NOT EXECUTED 40005c5c: 01 00 00 00 nop <== NOT EXECUTED 40005c60: 30 80 00 b6 b,a 40005f38 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005c64: 40 00 17 a9 call 4000bb08 40005c68: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 40005c6c: a6 92 20 00 orcc %o0, 0, %l3 40005c70: 02 80 00 99 be 40005ed4 40005c74: a4 10 00 13 mov %l3, %l2 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40005c78: 03 10 00 72 sethi %hi(0x4001c800), %g1 40005c7c: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 4001c91c 40005c80: c2 24 e0 64 st %g1, [ %l3 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40005c84: d0 04 e0 64 ld [ %l3 + 0x64 ], %o0 40005c88: 40 00 19 5d call 4000c1fc 40005c8c: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 40005c90: 80 a2 20 00 cmp %o0, 0 40005c94: 02 80 00 8e be 40005ecc 40005c98: d0 24 e0 58 st %o0, [ %l3 + 0x58 ] return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40005c9c: 03 10 00 72 sethi %hi(0x4001c800), %g1 40005ca0: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001c920 40005ca4: c2 24 e0 88 st %g1, [ %l3 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40005ca8: d0 04 e0 88 ld [ %l3 + 0x88 ], %o0 40005cac: 40 00 19 54 call 4000c1fc 40005cb0: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40005cb4: 80 a2 20 00 cmp %o0, 0 40005cb8: 02 80 00 8c be 40005ee8 40005cbc: d0 24 e0 7c st %o0, [ %l3 + 0x7c ] return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40005cc0: 03 10 00 72 sethi %hi(0x4001c800), %g1 40005cc4: 40 00 19 4e call 4000c1fc 40005cc8: d0 00 61 18 ld [ %g1 + 0x118 ], %o0 ! 4001c918 if (tty->cbuf == NULL) { 40005ccc: 80 a2 20 00 cmp %o0, 0 40005cd0: 02 80 00 9c be 40005f40 40005cd4: d0 24 e0 1c st %o0, [ %l3 + 0x1c ] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005cd8: c2 05 21 7c ld [ %l4 + 0x17c ], %g1 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 40005cdc: c0 24 e0 d4 clr [ %l3 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40005ce0: c0 24 e0 d8 clr [ %l3 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40005ce4: c0 24 e0 dc clr [ %l3 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40005ce8: c0 24 e0 e0 clr [ %l3 + 0xe0 ] tty->tty_rcvwakeup = 0; 40005cec: c0 24 e0 e4 clr [ %l3 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005cf0: c2 24 c0 00 st %g1, [ %l3 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40005cf4: 80 a0 60 00 cmp %g1, 0 40005cf8: 02 80 00 03 be 40005d04 40005cfc: c0 24 e0 04 clr [ %l3 + 4 ] rtems_termios_ttyHead->back = tty; 40005d00: e6 20 60 04 st %l3, [ %g1 + 4 ] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40005d04: 03 10 00 74 sethi %hi(0x4001d000), %g1 40005d08: c4 00 61 78 ld [ %g1 + 0x178 ], %g2 ! 4001d178 40005d0c: 80 a0 a0 00 cmp %g2, 0 40005d10: 02 80 00 a8 be 40005fb0 40005d14: e6 25 21 7c st %l3, [ %l4 + 0x17c ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40005d18: 29 10 00 72 sethi %hi(0x4001c800), %l4 40005d1c: d0 4d 21 24 ldsb [ %l4 + 0x124 ], %o0 ! 4001c924 40005d20: 03 15 14 9a sethi %hi(0x54526800), %g1 40005d24: 82 10 61 00 or %g1, 0x100, %g1 ! 54526900 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 40005d28: f2 24 e0 10 st %i1, [ %l3 + 0x10 ] tty->major = major; 40005d2c: f0 24 e0 0c st %i0, [ %l3 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40005d30: 90 12 00 01 or %o0, %g1, %o0 40005d34: 92 10 20 01 mov 1, %o1 40005d38: 94 10 20 54 mov 0x54, %o2 40005d3c: 96 10 20 00 clr %o3 40005d40: 40 00 03 22 call 400069c8 40005d44: 98 04 e0 14 add %l3, 0x14, %o4 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 40005d48: 80 a2 20 00 cmp %o0, 0 40005d4c: 12 80 00 7b bne 40005f38 40005d50: 03 15 14 9b sethi %hi(0x54526c00), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40005d54: d0 4d 21 24 ldsb [ %l4 + 0x124 ], %o0 40005d58: 82 10 63 00 or %g1, 0x300, %g1 40005d5c: 92 10 20 01 mov 1, %o1 40005d60: 90 12 00 01 or %o0, %g1, %o0 40005d64: 94 10 20 54 mov 0x54, %o2 40005d68: 96 10 20 00 clr %o3 40005d6c: 40 00 03 17 call 400069c8 40005d70: 98 04 e0 18 add %l3, 0x18, %o4 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 40005d74: 80 a2 20 00 cmp %o0, 0 40005d78: 12 80 00 70 bne 40005f38 40005d7c: 03 15 14 9e sethi %hi(0x54527800), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40005d80: d0 4d 21 24 ldsb [ %l4 + 0x124 ], %o0 40005d84: 92 10 20 00 clr %o1 40005d88: 90 12 00 01 or %o0, %g1, %o0 40005d8c: 94 10 20 20 mov 0x20, %o2 40005d90: 96 10 20 00 clr %o3 40005d94: 40 00 03 0d call 400069c8 40005d98: 98 04 e0 8c add %l3, 0x8c, %o4 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 40005d9c: 80 a2 20 00 cmp %o0, 0 40005da0: 12 80 00 66 bne 40005f38 40005da4: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40005da8: c0 24 e0 94 clr [ %l3 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 40005dac: 90 04 e0 98 add %l3, 0x98, %o0 40005db0: 40 00 27 17 call 4000fa0c 40005db4: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005db8: c2 04 e0 b4 ld [ %l3 + 0xb4 ], %g1 40005dbc: 80 a0 60 02 cmp %g1, 2 40005dc0: 02 80 00 65 be 40005f54 40005dc4: d0 4d 21 24 ldsb [ %l4 + 0x124 ], %o0 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 40005dc8: c2 04 e0 a0 ld [ %l3 + 0xa0 ], %g1 40005dcc: 80 a0 60 00 cmp %g1, 0 40005dd0: 02 80 00 4f be 40005f0c 40005dd4: d0 4d 21 24 ldsb [ %l4 + 0x124 ], %o0 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 40005dd8: c2 04 e0 b4 ld [ %l3 + 0xb4 ], %g1 40005ddc: 80 a0 60 02 cmp %g1, 2 40005de0: 02 80 00 4c be 40005f10 40005de4: 03 15 14 9c sethi %hi(0x54527000), %g1 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 40005de8: c0 24 e0 b8 clr [ %l3 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40005dec: c6 04 e0 64 ld [ %l3 + 0x64 ], %g3 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40005df0: c2 0d 21 24 ldub [ %l4 + 0x124 ], %g1 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40005df4: 87 30 e0 01 srl %g3, 1, %g3 40005df8: c6 24 e0 bc st %g3, [ %l3 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40005dfc: 07 00 00 09 sethi %hi(0x2400), %g3 40005e00: 86 10 e1 02 or %g3, 0x102, %g3 ! 2502 40005e04: c6 24 e0 30 st %g3, [ %l3 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40005e08: 07 00 00 06 sethi %hi(0x1800), %g3 40005e0c: 86 10 e0 05 or %g3, 5, %g3 ! 1805 40005e10: c6 24 e0 34 st %g3, [ %l3 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40005e14: 86 10 28 bd mov 0x8bd, %g3 40005e18: c6 24 e0 38 st %g3, [ %l3 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40005e1c: 07 00 00 20 sethi %hi(0x8000), %g3 40005e20: 86 10 e2 3b or %g3, 0x23b, %g3 ! 823b 40005e24: c6 24 e0 3c st %g3, [ %l3 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 40005e28: 86 10 20 03 mov 3, %g3 40005e2c: c6 2c e0 41 stb %g3, [ %l3 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40005e30: 86 10 20 1c mov 0x1c, %g3 40005e34: c6 2c e0 42 stb %g3, [ %l3 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40005e38: 86 10 20 7f mov 0x7f, %g3 40005e3c: c6 2c e0 43 stb %g3, [ %l3 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40005e40: 86 10 20 15 mov 0x15, %g3 40005e44: c6 2c e0 44 stb %g3, [ %l3 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40005e48: 86 10 20 04 mov 4, %g3 40005e4c: c6 2c e0 45 stb %g3, [ %l3 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40005e50: 86 10 20 11 mov 0x11, %g3 40005e54: c6 2c e0 49 stb %g3, [ %l3 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 40005e58: 86 10 20 13 mov 0x13, %g3 40005e5c: c6 2c e0 4a stb %g3, [ %l3 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40005e60: 86 10 20 1a mov 0x1a, %g3 40005e64: c6 2c e0 4b stb %g3, [ %l3 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 40005e68: 86 10 20 12 mov 0x12, %g3 40005e6c: c6 2c e0 4d stb %g3, [ %l3 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40005e70: 86 10 20 0f mov 0xf, %g3 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 40005e74: c4 04 e0 64 ld [ %l3 + 0x64 ], %g2 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 40005e78: c6 2c e0 4e stb %g3, [ %l3 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40005e7c: 86 10 20 17 mov 0x17, %g3 40005e80: c6 2c e0 4f stb %g3, [ %l3 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40005e84: 86 10 20 16 mov 0x16, %g3 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 40005e88: c0 2c e0 4c clrb [ %l3 + 0x4c ] tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 40005e8c: c6 2c e0 50 stb %g3, [ %l3 + 0x50 ] tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; 40005e90: c0 2c e0 51 clrb [ %l3 + 0x51 ] tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 40005e94: 87 28 a0 01 sll %g2, 1, %g3 40005e98: 84 00 c0 02 add %g3, %g2, %g2 40005e9c: 85 30 a0 02 srl %g2, 2, %g2 40005ea0: c4 24 e0 c0 st %g2, [ %l3 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 40005ea4: 84 00 60 01 add %g1, 1, %g2 40005ea8: 83 28 60 18 sll %g1, 0x18, %g1 40005eac: 83 38 60 18 sra %g1, 0x18, %g1 40005eb0: 80 a0 60 7a cmp %g1, 0x7a 40005eb4: 12 bf ff 46 bne 40005bcc 40005eb8: c4 2d 21 24 stb %g2, [ %l4 + 0x124 ] c = 'a'; 40005ebc: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 40005ec0: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED 40005ec4: 10 bf ff 42 b 40005bcc <== NOT EXECUTED 40005ec8: c4 28 61 24 stb %g2, [ %g1 + 0x124 ] ! 4001c924 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 40005ecc: 40 00 17 54 call 4000bc1c <== NOT EXECUTED 40005ed0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005ed4: d0 04 61 74 ld [ %l1 + 0x174 ], %o0 <== NOT EXECUTED 40005ed8: 40 00 03 a4 call 40006d68 <== NOT EXECUTED 40005edc: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 40005ee0: 81 c7 e0 08 ret <== NOT EXECUTED 40005ee4: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 40005ee8: d0 04 e0 58 ld [ %l3 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40005eec: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); 40005ef0: 40 00 17 4b call 4000bc1c <== NOT EXECUTED 40005ef4: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED free(tty); 40005ef8: 40 00 17 49 call 4000bc1c <== NOT EXECUTED 40005efc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005f00: 40 00 03 9a call 40006d68 <== NOT EXECUTED 40005f04: d0 04 61 74 ld [ %l1 + 0x174 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 40005f08: 30 bf ff 46 b,a 40005c20 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 40005f0c: 03 15 14 9c sethi %hi(0x54527000), %g1 <== NOT EXECUTED 40005f10: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <== NOT EXECUTED 40005f14: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005f18: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40005f1c: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40005f20: 96 10 20 00 clr %o3 <== NOT EXECUTED 40005f24: 40 00 02 a9 call 400069c8 <== NOT EXECUTED 40005f28: 98 04 e0 68 add %l3, 0x68, %o4 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 40005f2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005f30: 02 bf ff ae be 40005de8 <== NOT EXECUTED 40005f34: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40005f38: 40 00 04 f2 call 40007300 <== NOT EXECUTED 40005f3c: 01 00 00 00 nop <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 40005f40: d0 04 e0 7c ld [ %l3 + 0x7c ], %o0 <== NOT EXECUTED 40005f44: 40 00 17 36 call 4000bc1c <== NOT EXECUTED 40005f48: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40005f4c: 10 bf ff e9 b 40005ef0 <== NOT EXECUTED 40005f50: d0 04 e0 58 ld [ %l3 + 0x58 ], %o0 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 40005f54: 03 15 1e 15 sethi %hi(0x54785400), %g1 <== NOT EXECUTED 40005f58: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40005f5c: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40005f60: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005f64: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005f68: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005f6c: 40 00 03 ab call 40006e18 <== NOT EXECUTED 40005f70: 9a 04 e0 c8 add %l3, 0xc8, %o5 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 40005f74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005f78: 12 bf ff f0 bne 40005f38 <== NOT EXECUTED 40005f7c: 03 14 9e 15 sethi %hi(0x52785400), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 40005f80: d0 4d 21 24 ldsb [ %l4 + 0x124 ], %o0 <== NOT EXECUTED 40005f84: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40005f88: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40005f8c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005f90: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005f94: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005f98: 40 00 03 a0 call 40006e18 <== NOT EXECUTED 40005f9c: 9a 04 e0 c4 add %l3, 0xc4, %o5 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 40005fa0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005fa4: 22 bf ff 8a be,a 40005dcc <== NOT EXECUTED 40005fa8: c2 04 e0 a0 ld [ %l3 + 0xa0 ], %g1 <== NOT EXECUTED 40005fac: 30 bf ff e3 b,a 40005f38 <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 40005fb0: 10 bf ff 5a b 40005d18 40005fb4: e6 20 61 78 st %l3, [ %g1 + 0x178 ] 40004840 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40004840: 9d e3 bf a0 save %sp, -96, %sp const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 40004844: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 40004848: 80 a0 60 00 cmp %g1, 0 4000484c: 02 80 00 42 be 40004954 40004850: a8 10 00 18 mov %i0, %l4 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 40004854: e6 06 a0 80 ld [ %i2 + 0x80 ], %l3 <== NOT EXECUTED while (len) { 40004858: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000485c: 02 80 00 43 be 40004968 <== NOT EXECUTED 40004860: a4 10 20 02 mov 2, %l2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 40004864: aa 10 20 01 mov 1, %l5 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 40004868: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 4000486c: 40 00 50 6a call 40018a14 <.urem> <== NOT EXECUTED 40004870: 90 04 e0 01 add %l3, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40004874: 7f ff f5 68 call 40001e14 <== NOT EXECUTED 40004878: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED 4000487c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 40004880: e2 06 a0 84 ld [ %i2 + 0x84 ], %l1 <== NOT EXECUTED 40004884: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 40004888: 12 80 00 13 bne 400048d4 <== NOT EXECUTED 4000488c: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40004890: e4 26 a0 94 st %l2, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40004894: 7f ff f5 64 call 40001e24 <== NOT EXECUTED 40004898: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 4000489c: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 400048a0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400048a4: 40 00 08 ea call 40006c4c <== NOT EXECUTED 400048a8: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 400048ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400048b0: 12 80 00 30 bne 40004970 <== NOT EXECUTED 400048b4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 400048b8: 7f ff f5 57 call 40001e14 <== NOT EXECUTED 400048bc: 01 00 00 00 nop <== NOT EXECUTED 400048c0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 400048c4: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 400048c8: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 400048cc: 22 bf ff f2 be,a 40004894 <== NOT EXECUTED 400048d0: e4 26 a0 94 st %l2, [ %i2 + 0x94 ] <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 400048d4: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1 <== NOT EXECUTED 400048d8: c6 0d 00 00 ldub [ %l4 ], %g3 <== NOT EXECUTED 400048dc: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2 <== NOT EXECUTED 400048e0: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 400048e4: c2 06 a0 94 ld [ %i2 + 0x94 ], %g1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 400048e8: e6 26 a0 80 st %l3, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 400048ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400048f0: 12 80 00 0a bne 40004918 <== NOT EXECUTED 400048f4: 01 00 00 00 nop <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 400048f8: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400048fc: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40004900: 02 80 00 0c be 40004930 <== NOT EXECUTED 40004904: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 40004908: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 4000490c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 40004910: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 40004914: ea 26 a0 94 st %l5, [ %i2 + 0x94 ] <== NOT EXECUTED } rtems_interrupt_enable (level); 40004918: 7f ff f5 43 call 40001e24 <== NOT EXECUTED 4000491c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 40004920: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED 40004924: 02 80 00 11 be 40004968 <== NOT EXECUTED 40004928: a8 05 20 01 inc %l4 <== NOT EXECUTED 4000492c: 30 bf ff cf b,a 40004868 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 40004930: c4 06 a0 84 ld [ %i2 + 0x84 ], %g2 <== NOT EXECUTED tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 40004934: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1 <== NOT EXECUTED 40004938: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 <== NOT EXECUTED 4000493c: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 40004940: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40004944: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004948: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 4000494c: 10 bf ff f3 b 40004918 <== NOT EXECUTED 40004950: ea 26 a0 94 st %l5, [ %i2 + 0x94 ] <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 40004954: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 40004958: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 4000495c: 92 10 00 18 mov %i0, %o1 40004960: 9f c0 40 00 call %g1 40004964: 94 10 00 19 mov %i1, %o2 return; 40004968: 81 c7 e0 08 ret 4000496c: 81 e8 00 00 restore rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40004970: 40 00 0a 64 call 40007300 <== NOT EXECUTED 40004974: 01 00 00 00 nop 40004978: 01 00 00 00 nop 40005198 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40005198: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4000519c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 400051a0: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400051a4: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 400051a8: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400051ac: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 400051b0: ac 10 00 18 mov %i0, %l6 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400051b4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400051b8: 40 00 06 a5 call 40006c4c <== NOT EXECUTED 400051bc: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 400051c0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400051c4: 12 80 00 10 bne 40005204 <== NOT EXECUTED 400051c8: 05 10 00 73 sethi %hi(0x4001cc00), %g2 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 400051cc: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 400051d0: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400051d4: 84 10 a2 68 or %g2, 0x268, %g2 <== NOT EXECUTED 400051d8: 82 00 60 08 add %g1, 8, %g1 <== NOT EXECUTED 400051dc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 400051e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400051e4: 02 80 00 0a be 4000520c <== NOT EXECUTED 400051e8: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 400051ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400051f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400051f4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 400051f8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 400051fc: 40 00 06 db call 40006d68 <== NOT EXECUTED 40005200: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED return sc; 40005204: 81 c7 e0 08 ret <== NOT EXECUTED 40005208: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 4000520c: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40005210: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40005214: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005218: 22 80 00 20 be,a 40005298 <== NOT EXECUTED 4000521c: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005220: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40005224: 22 80 00 16 be,a 4000527c <== NOT EXECUTED 40005228: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED 4000522c: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 40005230: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40005234: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40005238: 26 80 00 09 bl,a 4000525c <== NOT EXECUTED 4000523c: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40005240: 10 80 00 0f b 4000527c <== NOT EXECUTED 40005244: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005248: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 4000524c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005250: 24 80 00 0b ble,a 4000527c <== NOT EXECUTED 40005254: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40005258: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 4000525c: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40005260: c4 08 80 01 ldub [ %g2 + %g1 ], %g2 <== NOT EXECUTED 40005264: 82 00 60 01 inc %g1 <== NOT EXECUTED 40005268: c4 2d 00 00 stb %g2, [ %l4 ] <== NOT EXECUTED 4000526c: c2 24 20 24 st %g1, [ %l0 + 0x24 ] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005270: 12 bf ff f6 bne 40005248 <== NOT EXECUTED 40005274: a8 05 20 01 inc %l4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40005278: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 4000527c: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40005280: a6 20 40 13 sub %g1, %l3, %l3 <== NOT EXECUTED 40005284: e6 25 a0 1c st %l3, [ %l6 + 0x1c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40005288: 40 00 06 b8 call 40006d68 <== NOT EXECUTED 4000528c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40005290: 81 c7 e0 08 ret <== NOT EXECUTED 40005294: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 40005298: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 4000529c: c4 24 20 2c st %g2, [ %l0 + 0x2c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 400052a0: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 400052a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400052a8: 02 80 00 06 be 400052c0 <== NOT EXECUTED 400052ac: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 400052b0: c4 04 20 b4 ld [ %l0 + 0xb4 ], %g2 <== NOT EXECUTED 400052b4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400052b8: 22 80 00 67 be,a 40005454 <== NOT EXECUTED 400052bc: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 400052c0: e2 04 20 74 ld [ %l0 + 0x74 ], %l1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400052c4: 25 10 00 72 sethi %hi(0x4001c800), %l2 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 400052c8: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400052cc: a4 14 a1 18 or %l2, 0x118, %l2 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 400052d0: aa 10 20 01 mov 1, %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400052d4: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400052d8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400052dc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400052e0: 02 80 00 3d be 400053d4 <== NOT EXECUTED 400052e4: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 400052e8: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400052ec: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 400052f0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400052f4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400052f8: 16 80 00 37 bge 400053d4 <== NOT EXECUTED 400052fc: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 40005300: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40005304: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40005308: 40 00 4d c3 call 40018a14 <.urem> <== NOT EXECUTED 4000530c: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40005310: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40005314: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40005318: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4000531c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40005320: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40005324: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40005328: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 4000532c: 40 00 4d ba call 40018a14 <.urem> <== NOT EXECUTED 40005330: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 40005334: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40005338: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000533c: 3a 80 00 18 bcc,a 4000539c <== NOT EXECUTED 40005340: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40005344: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005348: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000534c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 40005350: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005354: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 40005358: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 4000535c: 22 80 00 30 be,a 4000541c <== NOT EXECUTED 40005360: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 40005364: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005368: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4000536c: 22 80 00 0c be,a 4000539c <== NOT EXECUTED 40005370: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40005374: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40005378: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 4000537c: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED 40005380: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40005384: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005388: 22 80 00 05 be,a 4000539c <== NOT EXECUTED 4000538c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40005390: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005394: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40005398: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 4000539c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 400053a0: 02 80 00 17 be 400053fc <== NOT EXECUTED 400053a4: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 400053a8: 7f ff ff 0f call 40004fe4 <== NOT EXECUTED 400053ac: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400053b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400053b4: 32 80 00 02 bne,a 400053bc <== NOT EXECUTED 400053b8: aa 10 20 00 clr %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400053bc: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400053c0: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400053c4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400053c8: 12 bf ff c8 bne 400052e8 <== NOT EXECUTED 400053cc: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 400053d0: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 400053d4: 02 bf ff 94 be 40005224 <== NOT EXECUTED 400053d8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 400053dc: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 400053e0: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 400053e4: 40 00 06 1a call 40006c4c <== NOT EXECUTED 400053e8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 400053ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400053f0: 02 bf ff b9 be 400052d4 <== NOT EXECUTED 400053f4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400053f8: 30 bf ff 8b b,a 40005224 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 400053fc: 7f ff fe fa call 40004fe4 <== NOT EXECUTED 40005400: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40005404: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40005408: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 4000540c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005410: 36 bf ff eb bge,a 400053bc <== NOT EXECUTED 40005414: aa 10 20 00 clr %l5 <== NOT EXECUTED 40005418: 30 bf ff e9 b,a 400053bc <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 4000541c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005420: 22 80 00 07 be,a 4000543c <== NOT EXECUTED 40005424: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 40005428: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 4000542c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40005430: 02 bf ff cd be 40005364 <== NOT EXECUTED 40005434: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 40005438: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 4000543c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40005440: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40005444: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005448: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 4000544c: 10 bf ff d4 b 4000539c <== NOT EXECUTED 40005450: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40005454: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40005458: 02 80 00 0e be 40005490 <== NOT EXECUTED 4000545c: 01 00 00 00 nop <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40005460: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005464: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40005468: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000546c: 06 80 00 3a bl 40005554 <== NOT EXECUTED 40005470: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40005474: 7f ff fe dc call 40004fe4 <== NOT EXECUTED 40005478: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000547c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005480: 12 bf ff 69 bne 40005224 <== NOT EXECUTED 40005484: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40005488: 10 bf ff f6 b 40005460 <== NOT EXECUTED 4000548c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 40005490: 40 00 04 2a call 40006538 <== NOT EXECUTED 40005494: 01 00 00 00 nop <== NOT EXECUTED 40005498: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 4000549c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400054a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400054a4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 400054a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400054ac: 06 80 00 10 bl 400054ec <== NOT EXECUTED 400054b0: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 400054b4: 7f ff fe cc call 40004fe4 <== NOT EXECUTED 400054b8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400054bc: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 400054c0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 400054c4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400054c8: 16 bf ff 56 bge 40005220 <== NOT EXECUTED 400054cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 400054d0: 22 bf ff f4 be,a 400054a0 <== NOT EXECUTED 400054d4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400054d8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400054dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400054e0: 22 bf ff f0 be,a 400054a0 <== NOT EXECUTED 400054e4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400054e8: 30 bf ff ea b,a 40005490 <== NOT EXECUTED rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 400054ec: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 400054f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400054f4: 02 80 00 0d be 40005528 <== NOT EXECUTED 400054f8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 400054fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005500: 02 80 00 06 be 40005518 <== NOT EXECUTED 40005504: 01 00 00 00 nop <== NOT EXECUTED 40005508: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 4000550c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005510: 12 80 00 09 bne 40005534 <== NOT EXECUTED 40005514: 01 00 00 00 nop <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 40005518: 40 00 07 05 call 4000712c <== NOT EXECUTED 4000551c: 90 10 20 01 mov 1, %o0 ! 1 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 40005520: 10 bf ff e0 b 400054a0 <== NOT EXECUTED 40005524: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40005528: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000552c: 02 bf ff 3e be 40005224 <== NOT EXECUTED 40005530: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 40005534: 40 00 04 01 call 40006538 <== NOT EXECUTED 40005538: 01 00 00 00 nop <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 4000553c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 40005540: 90 22 00 11 sub %o0, %l1, %o0 <== NOT EXECUTED 40005544: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40005548: 08 bf ff f4 bleu 40005518 <== NOT EXECUTED 4000554c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40005550: 30 bf ff 35 b,a 40005224 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 40005554: 40 00 06 f6 call 4000712c <== NOT EXECUTED 40005558: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4000555c: 10 bf ff c1 b 40005460 <== NOT EXECUTED 40005560: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004274 : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 40004274: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 40004278: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000427c: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40004280: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40004284: 02 80 00 44 be 40004394 <== NOT EXECUTED 40004288: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 4000428c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004290: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40004294: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40004298: 22 80 00 50 be,a 400043d8 <== NOT EXECUTED 4000429c: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 400042a0: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 400042a4: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 400042a8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400042ac: 22 80 00 30 be,a 4000436c <== NOT EXECUTED 400042b0: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 400042b4: 7f ff f6 d8 call 40001e14 <== NOT EXECUTED 400042b8: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 400042bc: e2 06 20 90 ld [ %i0 + 0x90 ], %l1 <== NOT EXECUTED tty->t_dqlen = 0; 400042c0: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400042c4: 7f ff f6 d8 call 40001e24 <== NOT EXECUTED 400042c8: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 400042cc: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 400042d0: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 400042d4: 40 00 51 d0 call 40018a14 <.urem> <== NOT EXECUTED 400042d8: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 400042dc: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 400042e0: d0 24 20 84 st %o0, [ %l0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 400042e4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400042e8: 02 80 00 55 be 4000443c <== NOT EXECUTED 400042ec: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 400042f0: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 400042f4: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 400042f8: 22 80 00 48 be,a 40004418 <== NOT EXECUTED 400042fc: c2 04 20 d4 ld [ %l0 + 0xd4 ], %g1 <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 40004300: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004304: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40004308: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 4000430c: 02 80 00 4f be 40004448 <== NOT EXECUTED 40004310: 01 00 00 00 nop <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40004314: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40004318: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000431c: 18 80 00 1b bgu 40004388 <== NOT EXECUTED 40004320: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 40004324: f0 04 20 80 ld [ %l0 + 0x80 ], %i0 <== NOT EXECUTED 40004328: b0 26 00 11 sub %i0, %l1, %i0 <== NOT EXECUTED /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 4000432c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004330: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40004334: 02 80 00 04 be 40004344 <== NOT EXECUTED 40004338: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 4000433c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004340: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40004344: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40004348: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 4000434c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40004350: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004354: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED 40004358: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000435c: c4 24 20 94 st %g2, [ %l0 + 0x94 ] <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40004360: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40004364: 81 c7 e0 08 ret <== NOT EXECUTED 40004368: 81 e8 00 00 restore <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 4000436c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40004370: 12 bf ff fd bne 40004364 <== NOT EXECUTED 40004374: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40004378: 40 00 0a 7c call 40006d68 <== NOT EXECUTED 4000437c: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 40004380: 81 c7 e0 08 ret <== NOT EXECUTED 40004384: 81 e8 00 00 restore <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 40004388: f0 04 20 88 ld [ %l0 + 0x88 ], %i0 <== NOT EXECUTED 4000438c: 10 bf ff e8 b 4000432c <== NOT EXECUTED 40004390: b0 26 00 11 sub %i0, %l1, %i0 <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 40004394: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40004398: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 4000439c: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 400043a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400043a4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 400043a8: 7f ff f6 9b call 40001e14 <== NOT EXECUTED 400043ac: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400043b0: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400043b4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400043b8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400043bc: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400043c0: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400043c4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400043c8: 7f ff f6 97 call 40001e24 <== NOT EXECUTED 400043cc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 400043d0: 81 c7 e0 08 ret <== NOT EXECUTED 400043d4: 81 e8 00 00 restore <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 400043d8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400043dc: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED 400043e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400043e4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 400043e8: 7f ff f6 8b call 40001e14 <== NOT EXECUTED 400043ec: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400043f0: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400043f4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400043f8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400043fc: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 40004400: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40004404: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40004408: 7f ff f6 87 call 40001e24 <== NOT EXECUTED 4000440c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40004410: 81 c7 e0 08 ret <== NOT EXECUTED 40004414: 81 e8 00 00 restore <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40004418: c0 24 20 94 clr [ %l0 + 0x94 ] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4000441c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004420: 02 bf ff d0 be 40004360 <== NOT EXECUTED 40004424: b0 10 20 00 clr %i0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40004428: d2 04 20 d8 ld [ %l0 + 0xd8 ], %o1 <== NOT EXECUTED 4000442c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004430: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40004434: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED 40004438: 30 bf ff f6 b,a 40004410 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4000443c: 40 00 0a 4b call 40006d68 <== NOT EXECUTED 40004440: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40004444: 30 bf ff ab b,a 400042f0 <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 40004448: 7f ff f6 73 call 40001e14 <== NOT EXECUTED 4000444c: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 40004450: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40004454: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 40004458: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4000445c: c4 24 20 94 st %g2, [ %l0 + 0x94 ] <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 40004460: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40004464: 7f ff f6 70 call 40001e24 <== NOT EXECUTED 40004468: b0 10 20 00 clr %i0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4000446c: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED 40004470: 30 bf ff e8 b,a 40004410 <== NOT EXECUTED 40006050 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40006050: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40006054: a0 07 bf f8 add %fp, -8, %l0 <== NOT EXECUTED 40006058: a2 07 bf ff add %fp, -1, %l1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4000605c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40006060: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40006064: 94 10 20 00 clr %o2 <== NOT EXECUTED 40006068: 40 00 01 57 call 400065c4 <== NOT EXECUTED 4000606c: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 40006070: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40006074: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40006078: 32 80 00 16 bne,a 400060d0 <== NOT EXECUTED 4000607c: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40006080: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED 40006084: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006088: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 4000608c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40006090: 02 bf ff f3 be 4000605c <== NOT EXECUTED 40006094: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40006098: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 4000609c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400060a0: 7f ff f9 14 call 400044f0 <== NOT EXECUTED 400060a4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 400060a8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 400060ac: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400060b0: 94 10 20 00 clr %o2 <== NOT EXECUTED 400060b4: 40 00 01 44 call 400065c4 <== NOT EXECUTED 400060b8: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 400060bc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400060c0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400060c4: 22 bf ff f0 be,a 40006084 <== NOT EXECUTED 400060c8: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 400060cc: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 400060d0: 40 00 03 9d call 40006f44 <== NOT EXECUTED 400060d4: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 400060d8: 10 bf ff e2 b 40006060 <== NOT EXECUTED 400060dc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4000425c : void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 4000425c: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40004260: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004264: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40004268: 40 00 09 38 call 40006748 <== NOT EXECUTED 4000426c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40004270: 01 00 00 00 nop 40005fb8 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40005fb8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40005fbc: 23 10 00 73 sethi %hi(0x4001cc00), %l1 <== NOT EXECUTED 40005fc0: a0 07 bf fc add %fp, -4, %l0 <== NOT EXECUTED 40005fc4: a2 14 62 68 or %l1, 0x268, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005fc8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005fcc: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005fd0: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005fd4: 40 00 01 7c call 400065c4 <== NOT EXECUTED 40005fd8: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 40005fdc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40005fe0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005fe4: 12 80 00 16 bne 4000603c <== NOT EXECUTED 40005fe8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40005fec: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40005ff0: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40005ff4: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 40005ff8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40005ffc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006000: 02 80 00 04 be 40006010 <== NOT EXECUTED 40006004: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40006008: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000600c: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40006010: 7f ff f8 99 call 40004274 <== NOT EXECUTED 40006014: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40006018: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 4000601c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40006020: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40006024: 40 00 01 68 call 400065c4 <== NOT EXECUTED 40006028: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 4000602c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40006030: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40006034: 02 bf ff ee be 40005fec <== NOT EXECUTED 40006038: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 4000603c: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40006040: 40 00 03 c1 call 40006f44 <== NOT EXECUTED 40006044: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40006048: 10 bf ff e1 b 40005fcc <== NOT EXECUTED 4000604c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005030 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40005030: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005034: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005038: 92 10 20 00 clr %o1 rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4000503c: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005040: 94 10 20 00 clr %o2 40005044: 40 00 07 02 call 40006c4c 40005048: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 if (sc != RTEMS_SUCCESSFUL) 4000504c: a2 92 20 00 orcc %o0, 0, %l1 40005050: 12 80 00 0f bne 4000508c 40005054: 03 10 00 73 sethi %hi(0x4001cc00), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40005058: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 4000505c: 85 28 a0 05 sll %g2, 5, %g2 40005060: 82 10 62 68 or %g1, 0x268, %g1 40005064: 82 00 40 02 add %g1, %g2, %g1 40005068: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4000506c: 80 a0 60 00 cmp %g1, 0 40005070: 02 80 00 09 be 40005094 40005074: 92 10 00 18 mov %i0, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40005078: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000507c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005080: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40005084: 40 00 07 39 call 40006d68 <== NOT EXECUTED 40005088: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 4000508c: 81 c7 e0 08 ret <== NOT EXECUTED 40005090: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 40005094: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 40005098: 80 88 60 01 btst 1, %g1 4000509c: 22 80 00 16 be,a 400050f4 400050a0: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0 <== NOT EXECUTED uint32_t count = args->count; 400050a4: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 char *buffer = args->buffer; 400050a8: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 while (count--) 400050ac: 80 a4 e0 00 cmp %l3, 0 400050b0: a4 10 20 00 clr %l2 400050b4: 02 80 00 0a be 400050dc 400050b8: 82 10 20 00 clr %g1 oproc (*buffer++, tty); 400050bc: d0 0d 00 12 ldub [ %l4 + %l2 ], %o0 400050c0: 7f ff fe 2f call 4000497c 400050c4: 92 10 00 10 mov %l0, %o1 400050c8: a4 04 a0 01 inc %l2 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 400050cc: 80 a4 80 13 cmp %l2, %l3 400050d0: 32 bf ff fc bne,a 400050c0 400050d4: d0 0d 00 12 ldub [ %l4 + %l2 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 400050d8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400050dc: c2 26 20 1c st %g1, [ %i0 + 0x1c ] } rtems_semaphore_release (tty->osem); 400050e0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 400050e4: 40 00 07 21 call 40006d68 400050e8: b0 10 00 11 mov %l1, %i0 return sc; } 400050ec: 81 c7 e0 08 ret 400050f0: 81 e8 00 00 restore while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 400050f4: 7f ff fd d3 call 40004840 <== NOT EXECUTED 400050f8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 400050fc: 10 bf ff f8 b 400050dc <== NOT EXECUTED 40005100: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED 400089d4 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 400089d4: 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) 400089d8: 29 08 00 00 sethi %hi(0x20000000), %l4 <== NOT EXECUTED 400089dc: a8 8e 00 14 andcc %i0, %l4, %l4 <== NOT EXECUTED 400089e0: 02 80 00 0f be 40008a1c <== NOT EXECUTED 400089e4: 05 10 00 a3 sethi %hi(0x40028c00), %g2 <== NOT EXECUTED { if (rtems_panic_in_progress++) 400089e8: c6 00 a1 98 ld [ %g2 + 0x198 ], %g3 ! 40028d98 <== NOT EXECUTED 400089ec: 82 00 e0 01 add %g3, 1, %g1 <== NOT EXECUTED 400089f0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400089f4: 02 80 00 07 be 40008a10 <== NOT EXECUTED 400089f8: c2 20 a1 98 st %g1, [ %g2 + 0x198 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400089fc: 03 10 00 a3 sethi %hi(0x40028c00), %g1 <== NOT EXECUTED 40008a00: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 ! 40028f80 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008a04: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40008a08: c6 20 63 80 st %g3, [ %g1 + 0x380 ] <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 40008a0c: c2 00 a1 98 ld [ %g2 + 0x198 ], %g1 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40008a10: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008a14: 14 80 00 3c bg 40008b04 <== NOT EXECUTED 40008a18: a4 10 20 00 clr %l2 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40008a1c: 21 10 00 a1 sethi %hi(0x40028400), %l0 <== NOT EXECUTED 40008a20: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 ! 400284f8 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 40008a24: 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 */ 40008a28: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40008a2c: 40 00 37 b7 call 40016908 <== NOT EXECUTED 40008a30: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40008a34: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 40008a38: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40008a3c: 12 80 00 45 bne 40008b50 <== NOT EXECUTED 40008a40: 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); 40008a44: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 <== NOT EXECUTED 40008a48: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008a4c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008a50: 40 00 4f 6b call 4001c7fc <== NOT EXECUTED 40008a54: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 40008a58: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40008a5c: 12 80 00 31 bne 40008b20 <== NOT EXECUTED 40008a60: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 40008a64: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008a68: 02 80 00 12 be 40008ab0 <== NOT EXECUTED 40008a6c: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40008a70: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008a74: 04 80 00 09 ble 40008a98 <== NOT EXECUTED 40008a78: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008a7c: 40 00 3b ca call 400179a4 <== NOT EXECUTED 40008a80: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008a84: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40008a88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008a8c: 12 80 00 35 bne 40008b60 <== NOT EXECUTED 40008a90: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40008a94: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008a98: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008a9c: 92 12 60 90 or %o1, 0x90, %o1 <== NOT EXECUTED 40008aa0: 40 00 38 6e call 40016c58 <== NOT EXECUTED 40008aa4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40008aa8: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40008aac: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 <== NOT EXECUTED 40008ab0: 13 10 00 99 sethi %hi(0x40026400), %o1 <== NOT EXECUTED 40008ab4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008ab8: 40 00 38 68 call 40016c58 <== NOT EXECUTED 40008abc: 92 12 63 88 or %o1, 0x388, %o1 <== NOT EXECUTED (void) fflush(stderr); 40008ac0: c2 04 20 f8 ld [ %l0 + 0xf8 ], %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"); 40008ac4: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED (void) fflush(stderr); 40008ac8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008acc: 40 00 37 8f call 40016908 <== NOT EXECUTED 40008ad0: a4 04 c0 12 add %l3, %l2, %l2 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40008ad4: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40008ad8: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40008adc: 02 80 00 0a be 40008b04 <== NOT EXECUTED 40008ae0: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40008ae4: 22 80 00 0a be,a 40008b0c <== NOT EXECUTED 40008ae8: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40008aec: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008af0: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008af4: 40 00 00 32 call 40008bbc <== NOT EXECUTED 40008af8: 92 12 60 a8 or %o1, 0xa8, %o1 <== NOT EXECUTED _exit(local_errno); 40008afc: 40 00 03 5e call 40009874 <_exit> <== NOT EXECUTED 40008b00: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 40008b04: 81 c7 e0 08 ret <== NOT EXECUTED 40008b08: 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"); 40008b0c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008b10: 40 00 00 2b call 40008bbc <== NOT EXECUTED 40008b14: 92 12 60 c0 or %o1, 0xc0, %o1 <== NOT EXECUTED abort(); 40008b18: 40 00 36 65 call 400164ac <== NOT EXECUTED 40008b1c: 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)); 40008b20: 03 10 00 a1 sethi %hi(0x40028400), %g1 <== NOT EXECUTED 40008b24: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 400284f8 <_impure_ptr> <== NOT EXECUTED 40008b28: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008b2c: 7f ff ff a3 call 400089b8 <== NOT EXECUTED 40008b30: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40008b34: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008b38: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008b3c: 92 12 60 70 or %o1, 0x70, %o1 <== NOT EXECUTED 40008b40: 40 00 38 46 call 40016c58 <== NOT EXECUTED 40008b44: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008b48: 10 bf ff c7 b 40008a64 <== NOT EXECUTED 40008b4c: 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; 40008b50: 40 00 36 65 call 400164e4 <__errno> <== NOT EXECUTED 40008b54: 01 00 00 00 nop <== NOT EXECUTED 40008b58: 10 bf ff bb b 40008a44 <== NOT EXECUTED 40008b5c: 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)); 40008b60: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008b64: 40 00 3b 90 call 400179a4 <== NOT EXECUTED 40008b68: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40008b6c: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008b70: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008b74: 92 12 60 80 or %o1, 0x80, %o1 <== NOT EXECUTED 40008b78: 40 00 38 38 call 40016c58 <== NOT EXECUTED 40008b7c: 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)) 40008b80: 10 bf ff cb b 40008aac <== NOT EXECUTED 40008b84: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED 4002aea8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4002aea8: 9d e3 bf a0 save %sp, -96, %sp 4002aeac: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002aeb0: 2b 10 01 ab sethi %hi(0x4006ac00), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 4002aeb4: 29 10 01 ab sethi %hi(0x4006ac00), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4002aeb8: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002aebc: aa 15 61 a0 or %l5, 0x1a0, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 4002aec0: a8 15 21 90 or %l4, 0x190, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4002aec4: a4 10 20 00 clr %l2 4002aec8: a2 10 20 00 clr %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002aecc: c2 06 20 04 ld [ %i0 + 4 ], %g1 4002aed0: 82 00 7f ff add %g1, -1, %g1 4002aed4: 80 a0 60 00 cmp %g1, 0 4002aed8: 06 80 00 24 bl 4002af68 4002aedc: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002aee0: c2 06 00 00 ld [ %i0 ], %g1 4002aee4: e0 08 40 00 ldub [ %g1 ], %l0 4002aee8: 84 00 60 01 add %g1, 1, %g2 if (c == ':') 4002aeec: 80 a4 20 3a cmp %l0, 0x3a 4002aef0: 02 80 00 25 be 4002af84 4002aef4: c4 26 00 00 st %g2, [ %i0 ] break; if (sign == 0) { 4002aef8: 80 a4 a0 00 cmp %l2, 0 4002aefc: 32 80 00 06 bne,a 4002af14 4002af00: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 4002af04: 80 a4 20 2d cmp %l0, 0x2d 4002af08: 02 80 00 30 be 4002afc8 4002af0c: a4 10 20 01 mov 1, %l2 limit++; continue; } sign = 1; } if (!isdigit(c)) 4002af10: c2 05 00 00 ld [ %l4 ], %g1 4002af14: 82 00 40 10 add %g1, %l0, %g1 4002af18: c2 08 60 01 ldub [ %g1 + 1 ], %g1 4002af1c: 80 88 60 04 btst 4, %g1 4002af20: 02 80 00 28 be 4002afc0 4002af24: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 4002af28: 40 00 c8 5f call 4005d0a4 <.udiv> 4002af2c: 92 10 20 0a mov 0xa, %o1 4002af30: 80 a4 40 08 cmp %l1, %o0 4002af34: 18 80 00 23 bgu 4002afc0 4002af38: 01 00 00 00 nop 4002af3c: 02 80 00 1b be 4002afa8 4002af40: a0 04 3f d0 add %l0, -48, %l0 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 4002af44: 83 2c 60 03 sll %l1, 3, %g1 4002af48: a3 2c 60 01 sll %l1, 1, %l1 4002af4c: a2 04 40 01 add %l1, %g1, %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002af50: 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; 4002af54: a2 04 00 11 add %l0, %l1, %l1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4002af58: 82 00 7f ff add %g1, -1, %g1 4002af5c: 80 a0 60 00 cmp %g1, 0 4002af60: 16 bf ff e0 bge 4002aee0 4002af64: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002af68: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 4002af6c: 40 00 7c d4 call 4004a2bc <__srget_r> <== NOT EXECUTED 4002af70: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4002af74: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 4002af78: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 4002af7c: 12 bf ff e0 bne 4002aefc <== NOT EXECUTED 4002af80: 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) 4002af84: 80 a4 a0 00 cmp %l2, 0 4002af88: 02 80 00 0e be 4002afc0 4002af8c: 90 10 00 12 mov %l2, %o0 return 0; *val = i * sign; 4002af90: 92 10 00 11 mov %l1, %o1 4002af94: 7f ff 60 bf call 40003290 <.umul> 4002af98: b0 10 20 01 mov 1, %i0 4002af9c: d0 26 40 00 st %o0, [ %i1 ] return 1; 4002afa0: 81 c7 e0 08 ret 4002afa4: 81 e8 00 00 restore sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 4002afa8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4002afac: 40 00 c8 ea call 4005d354 <.urem> <== NOT EXECUTED 4002afb0: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4002afb4: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 4002afb8: 08 bf ff e4 bleu 4002af48 <== NOT EXECUTED 4002afbc: 83 2c 60 03 sll %l1, 3, %g1 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 4002afc0: 81 c7 e0 08 ret <== NOT EXECUTED 4002afc4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 4002afc8: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 4002afcc: 10 bf ff c0 b 4002aecc <== NOT EXECUTED 4002afd0: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 4002afd4 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 4002afd4: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 4002afd8: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 4002afdc: 21 10 01 ab sethi %hi(0x4006ac00), %l0 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 4002afe0: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 4002afe4: 10 80 00 19 b 4002b048 4002afe8: a0 14 21 a0 or %l0, 0x1a0, %l0 4002afec: c2 06 00 00 ld [ %i0 ], %g1 4002aff0: d0 08 40 00 ldub [ %g1 ], %o0 4002aff4: 84 00 60 01 add %g1, 1, %g2 if (c == ':') { 4002aff8: 80 a2 20 3a cmp %o0, 0x3a 4002affc: 02 80 00 1e be 4002b074 4002b000: c4 26 00 00 st %g2, [ %i0 ] if (nlFlag) return 0; break; } if (c == '\n') { 4002b004: 80 a2 20 0a cmp %o0, 0xa 4002b008: 02 80 00 28 be 4002b0a8 4002b00c: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) return 0; break; } if (c == EOF) 4002b010: 02 80 00 29 be 4002b0b4 4002b014: 01 00 00 00 nop return 0; if (*nleft < 2) 4002b018: c2 06 c0 00 ld [ %i3 ], %g1 4002b01c: 80 a0 60 01 cmp %g1, 1 4002b020: 08 80 00 25 bleu 4002b0b4 4002b024: 01 00 00 00 nop return 0; **bufp = c; 4002b028: c2 06 80 00 ld [ %i2 ], %g1 4002b02c: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 4002b030: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 4002b034: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002b038: 84 00 a0 01 inc %g2 --(*nleft); 4002b03c: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002b040: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 4002b044: c2 26 c0 00 st %g1, [ %i3 ] { int c; *name = *bufp; for (;;) { c = getc(fp); 4002b048: c2 06 20 04 ld [ %i0 + 4 ], %g1 4002b04c: 82 00 7f ff add %g1, -1, %g1 4002b050: 80 a0 60 00 cmp %g1, 0 4002b054: 16 bf ff e6 bge 4002afec 4002b058: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002b05c: d0 04 00 00 ld [ %l0 ], %o0 4002b060: 40 00 7c 97 call 4004a2bc <__srget_r> 4002b064: 92 10 00 18 mov %i0, %o1 if (c == ':') { 4002b068: 80 a2 20 3a cmp %o0, 0x3a 4002b06c: 12 bf ff e7 bne 4002b008 4002b070: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 4002b074: 80 a7 20 00 cmp %i4, 0 4002b078: 12 80 00 0f bne 4002b0b4 4002b07c: 01 00 00 00 nop return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 4002b080: c2 06 80 00 ld [ %i2 ], %g1 4002b084: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 4002b088: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 4002b08c: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4002b090: 84 00 a0 01 inc %g2 --(*nleft); 4002b094: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4002b098: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 4002b09c: c2 26 c0 00 st %g1, [ %i3 ] return 1; 4002b0a0: 81 c7 e0 08 ret 4002b0a4: 91 e8 20 01 restore %g0, 1, %o0 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 4002b0a8: 80 a7 20 00 cmp %i4, 0 4002b0ac: 32 bf ff f6 bne,a 4002b084 4002b0b0: c2 06 80 00 ld [ %i2 ], %g1 } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 4002b0b4: 81 c7 e0 08 ret <== NOT EXECUTED 4002b0b8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4002b0bc : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4002b0bc: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b0c0: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4002b0c4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002b0c8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b0cc: a2 07 a0 4c add %fp, 0x4c, %l1 4002b0d0: a0 07 a0 50 add %fp, 0x50, %l0 4002b0d4: 90 10 00 18 mov %i0, %o0 4002b0d8: 92 10 00 19 mov %i1, %o1 4002b0dc: 94 10 00 11 mov %l1, %o2 4002b0e0: 7f ff ff bd call 4002afd4 4002b0e4: 96 10 00 10 mov %l0, %o3 4002b0e8: 80 a2 20 00 cmp %o0, 0 4002b0ec: 12 80 00 04 bne 4002b0fc 4002b0f0: 90 10 00 18 mov %i0, %o0 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 4002b0f4: 81 c7 e0 08 ret <== NOT EXECUTED 4002b0f8: 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) 4002b0fc: 92 06 60 04 add %i1, 4, %o1 4002b100: 94 10 00 11 mov %l1, %o2 4002b104: 96 10 00 10 mov %l0, %o3 4002b108: 7f ff ff b3 call 4002afd4 4002b10c: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b110: 80 a2 20 00 cmp %o0, 0 4002b114: 02 bf ff f8 be 4002b0f4 4002b118: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 4002b11c: 7f ff ff 63 call 4002aea8 4002b120: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b124: 80 a2 20 00 cmp %o0, 0 4002b128: 02 bf ff f3 be 4002b0f4 4002b12c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 4002b130: 94 10 00 11 mov %l1, %o2 4002b134: 96 10 00 10 mov %l0, %o3 4002b138: 92 07 bf f8 add %fp, -8, %o1 4002b13c: 7f ff ff a6 call 4002afd4 4002b140: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4002b144: 80 a2 20 00 cmp %o0, 0 4002b148: 02 bf ff eb be 4002b0f4 4002b14c: 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; 4002b150: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b154: 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; 4002b158: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b15c: c6 0b 40 00 ldub [ %o5 ], %g3 4002b160: 88 10 20 01 mov 1, %g4 4002b164: 83 28 e0 18 sll %g3, 0x18, %g1 4002b168: 80 a0 60 00 cmp %g1, 0 4002b16c: 02 80 00 0e be 4002b1a4 4002b170: 86 10 20 17 mov 0x17, %g3 4002b174: 84 00 a0 01 inc %g2 4002b178: c6 08 80 00 ldub [ %g2 ], %g3 if(*cp == ',') 4002b17c: 83 38 60 18 sra %g1, 0x18, %g1 memcount++; 4002b180: 82 18 60 2c xor %g1, 0x2c, %g1 4002b184: 80 a0 00 01 cmp %g0, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b188: 83 28 e0 18 sll %g3, 0x18, %g1 if(*cp == ',') memcount++; 4002b18c: 88 61 3f ff subx %g4, -1, %g4 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b190: 80 a0 60 00 cmp %g1, 0 4002b194: 32 bf ff f9 bne,a 4002b178 4002b198: 84 00 a0 01 inc %g2 4002b19c: 87 29 20 02 sll %g4, 2, %g3 4002b1a0: 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)) 4002b1a4: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 4002b1a8: 80 a0 40 03 cmp %g1, %g3 4002b1ac: 0a bf ff d2 bcs 4002b0f4 4002b1b0: 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++) { 4002b1b4: 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); 4002b1b8: 84 00 a0 0f add %g2, 0xf, %g2 4002b1bc: 84 08 bf f0 and %g2, -16, %g2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4002b1c0: da 20 80 00 st %o5, [ %g2 ] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002b1c4: 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); 4002b1c8: 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++) { 4002b1cc: c4 08 40 00 ldub [ %g1 ], %g2 4002b1d0: 88 10 20 04 mov 4, %g4 4002b1d4: 85 28 a0 18 sll %g2, 0x18, %g2 4002b1d8: 80 a0 a0 00 cmp %g2, 0 4002b1dc: 12 80 00 09 bne 4002b200 4002b1e0: 82 00 60 01 inc %g1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4002b1e4: 10 80 00 13 b 4002b230 <== NOT EXECUTED 4002b1e8: 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++) { 4002b1ec: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 4002b1f0: 85 28 a0 18 sll %g2, 0x18, %g2 4002b1f4: 80 a0 a0 00 cmp %g2, 0 4002b1f8: 02 80 00 0c be 4002b228 4002b1fc: 82 00 60 01 inc %g1 if(*cp == ',') { 4002b200: 85 38 a0 18 sra %g2, 0x18, %g2 4002b204: 80 a0 a0 2c cmp %g2, 0x2c 4002b208: 32 bf ff fa bne,a 4002b1f0 4002b20c: c4 08 40 00 ldub [ %g1 ], %g2 *cp = '\0'; 4002b210: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 4002b214: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 4002b218: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 4002b21c: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4002b220: 10 bf ff f3 b 4002b1ec <== NOT EXECUTED 4002b224: 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++) { 4002b228: 89 28 e0 02 sll %g3, 2, %g4 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4002b22c: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4002b230: c0 20 40 04 clr [ %g1 + %g4 ] return 1; 4002b234: 81 c7 e0 08 ret 4002b238: 91 e8 20 01 restore %g0, 1, %o0 4002b288 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4002b288: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b28c: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4002b290: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002b294: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b298: a2 07 a0 4c add %fp, 0x4c, %l1 4002b29c: a0 07 a0 50 add %fp, 0x50, %l0 4002b2a0: 90 10 00 18 mov %i0, %o0 4002b2a4: 92 10 00 19 mov %i1, %o1 4002b2a8: 94 10 00 11 mov %l1, %o2 4002b2ac: 7f ff ff 4a call 4002afd4 4002b2b0: 96 10 00 10 mov %l0, %o3 4002b2b4: 80 a2 20 00 cmp %o0, 0 4002b2b8: 12 80 00 04 bne 4002b2c8 4002b2bc: 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; } 4002b2c0: 81 c7 e0 08 ret <== NOT EXECUTED 4002b2c4: 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) 4002b2c8: 92 06 60 04 add %i1, 4, %o1 4002b2cc: 94 10 00 11 mov %l1, %o2 4002b2d0: 96 10 00 10 mov %l0, %o3 4002b2d4: 7f ff ff 40 call 4002afd4 4002b2d8: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b2dc: 80 a2 20 00 cmp %o0, 0 4002b2e0: 02 bf ff f8 be 4002b2c0 4002b2e4: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 4002b2e8: 7f ff fe f0 call 4002aea8 4002b2ec: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b2f0: 80 a2 20 00 cmp %o0, 0 4002b2f4: 02 bf ff f3 be 4002b2c0 4002b2f8: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 4002b2fc: 7f ff fe eb call 4002aea8 4002b300: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b304: 80 a2 20 00 cmp %o0, 0 4002b308: 02 bf ff ee be 4002b2c0 4002b30c: 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) 4002b310: 92 06 60 0c add %i1, 0xc, %o1 4002b314: 94 10 00 11 mov %l1, %o2 4002b318: 96 10 00 10 mov %l0, %o3 4002b31c: 7f ff ff 2e call 4002afd4 4002b320: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b324: 80 a2 20 00 cmp %o0, 0 4002b328: 02 bf ff e6 be 4002b2c0 4002b32c: 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) 4002b330: 92 06 60 10 add %i1, 0x10, %o1 4002b334: 94 10 00 11 mov %l1, %o2 4002b338: 96 10 00 10 mov %l0, %o3 4002b33c: 7f ff ff 26 call 4002afd4 4002b340: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b344: 80 a2 20 00 cmp %o0, 0 4002b348: 02 bf ff de be 4002b2c0 4002b34c: 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) 4002b350: 92 06 60 14 add %i1, 0x14, %o1 4002b354: 94 10 00 11 mov %l1, %o2 4002b358: 96 10 00 10 mov %l0, %o3 4002b35c: 7f ff ff 1e call 4002afd4 4002b360: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b364: 80 a2 20 00 cmp %o0, 0 4002b368: 02 bf ff d6 be 4002b2c0 4002b36c: 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)) 4002b370: 94 10 00 11 mov %l1, %o2 4002b374: 96 10 00 10 mov %l0, %o3 4002b378: 92 06 60 18 add %i1, 0x18, %o1 4002b37c: 7f ff ff 16 call 4002afd4 4002b380: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002b384: 80 a2 20 00 cmp %o0, 0 4002b388: 02 bf ff ce be 4002b2c0 4002b38c: 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; 4002b390: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 4002b394: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002b398: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 4002b39c: 81 c7 e0 08 ret 4002b3a0: 91 e8 20 01 restore %g0, 1, %o0 4002ae44 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 4002ae44: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 4002ae48: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED 4002ae4c: d0 30 60 32 sth %o0, [ %g1 + 0x32 ] <== NOT EXECUTED return 0; } 4002ae50: 81 c3 e0 08 retl <== NOT EXECUTED 4002ae54: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002b4dc : return NULL; return &grent; } void setgrent(void) { 4002b4dc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 4002b4e0: 7f ff ff c4 call 4002b3f0 <== NOT EXECUTED 4002b4e4: 21 10 01 b8 sethi %hi(0x4006e000), %l0 <== NOT EXECUTED if (group_fp != NULL) 4002b4e8: d0 04 20 bc ld [ %l0 + 0xbc ], %o0 ! 4006e0bc <== NOT EXECUTED 4002b4ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b4f0: 22 80 00 05 be,a 4002b504 <== NOT EXECUTED 4002b4f4: 11 10 01 7f sethi %hi(0x4005fc00), %o0 <== NOT EXECUTED fclose(group_fp); 4002b4f8: 40 00 65 f9 call 40044cdc <== NOT EXECUTED 4002b4fc: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 4002b500: 11 10 01 7f sethi %hi(0x4005fc00), %o0 <== NOT EXECUTED 4002b504: 13 10 01 a7 sethi %hi(0x40069c00), %o1 <== NOT EXECUTED 4002b508: 90 12 22 48 or %o0, 0x248, %o0 <== NOT EXECUTED 4002b50c: 40 00 68 43 call 40045618 <== NOT EXECUTED 4002b510: 92 12 61 a0 or %o1, 0x1a0, %o1 <== NOT EXECUTED 4002b514: d0 24 20 bc st %o0, [ %l0 + 0xbc ] <== NOT EXECUTED } 4002b518: 81 c7 e0 08 ret <== NOT EXECUTED 4002b51c: 81 e8 00 00 restore <== NOT EXECUTED 4002b6dc : return NULL; return &pwent; } void setpwent(void) { 4002b6dc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 4002b6e0: 7f ff ff 44 call 4002b3f0 <== NOT EXECUTED 4002b6e4: 21 10 01 b7 sethi %hi(0x4006dc00), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 4002b6e8: d0 04 23 d4 ld [ %l0 + 0x3d4 ], %o0 ! 4006dfd4 <== NOT EXECUTED 4002b6ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002b6f0: 22 80 00 05 be,a 4002b704 <== NOT EXECUTED 4002b6f4: 11 10 01 7f sethi %hi(0x4005fc00), %o0 <== NOT EXECUTED fclose(passwd_fp); 4002b6f8: 40 00 65 79 call 40044cdc <== NOT EXECUTED 4002b6fc: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4002b700: 11 10 01 7f sethi %hi(0x4005fc00), %o0 <== NOT EXECUTED 4002b704: 13 10 01 a7 sethi %hi(0x40069c00), %o1 <== NOT EXECUTED 4002b708: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED 4002b70c: 40 00 67 c3 call 40045618 <== NOT EXECUTED 4002b710: 92 12 61 a0 or %o1, 0x1a0, %o1 <== NOT EXECUTED 4002b714: d0 24 23 d4 st %o0, [ %l0 + 0x3d4 ] <== NOT EXECUTED } 4002b718: 81 c7 e0 08 ret <== NOT EXECUTED 4002b71c: 81 e8 00 00 restore <== NOT EXECUTED 40008524 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40008524: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 40008528: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 <== NOT EXECUTED 4000852c: d0 30 60 30 sth %o0, [ %g1 + 0x30 ] <== NOT EXECUTED return 0; } 40008530: 81 c3 e0 08 retl <== NOT EXECUTED 40008534: 90 10 20 00 clr %o0 <== NOT EXECUTED 40004fe4 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40004fe4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 40004fe8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004fec: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40004ff0: 32 80 00 05 bne,a 40005004 <== NOT EXECUTED 40004ff4: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 40004ff8: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 40004ffc: 7f ff ff 7a call 40004de4 <== NOT EXECUTED 40005000: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005004: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005008: 40 00 07 11 call 40006c4c <== NOT EXECUTED 4000500c: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40005010: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40005014: 7f ff ff 74 call 40004de4 <== NOT EXECUTED 40005018: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000501c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40005020: 40 00 07 52 call 40006d68 <== NOT EXECUTED 40005024: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40005028: 81 c7 e0 08 ret <== NOT EXECUTED 4000502c: 81 e8 00 00 restore <== NOT EXECUTED 40009d4c : int _STAT_NAME( const char *path, struct stat *buf ) { 40009d4c: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40009d50: 80 a6 60 00 cmp %i1, 0 40009d54: 02 80 00 34 be 40009e24 40009d58: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 40009d5c: 40 01 06 b3 call 4004b828 40009d60: 90 10 00 18 mov %i0, %o0 40009d64: a0 07 bf ec add %fp, -20, %l0 40009d68: 92 10 00 08 mov %o0, %o1 40009d6c: 94 10 20 00 clr %o2 40009d70: 90 10 00 18 mov %i0, %o0 40009d74: 96 10 00 10 mov %l0, %o3 40009d78: 98 10 20 01 mov 1, %o4 40009d7c: 7f ff f9 5d call 400082f0 40009d80: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 40009d84: 80 a2 20 00 cmp %o0, 0 40009d88: 12 80 00 25 bne 40009e1c 40009d8c: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 40009d90: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40009d94: 80 a0 a0 00 cmp %g2, 0 40009d98: 02 80 00 29 be 40009e3c 40009d9c: 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) ); 40009da0: c0 26 40 00 clr [ %i1 ] 40009da4: c0 26 60 04 clr [ %i1 + 4 ] 40009da8: c0 26 60 08 clr [ %i1 + 8 ] 40009dac: c0 26 60 0c clr [ %i1 + 0xc ] 40009db0: c0 26 60 10 clr [ %i1 + 0x10 ] 40009db4: c0 26 60 14 clr [ %i1 + 0x14 ] 40009db8: c0 26 60 18 clr [ %i1 + 0x18 ] 40009dbc: c0 26 60 1c clr [ %i1 + 0x1c ] 40009dc0: c0 26 60 20 clr [ %i1 + 0x20 ] 40009dc4: c0 26 60 24 clr [ %i1 + 0x24 ] 40009dc8: c0 26 60 28 clr [ %i1 + 0x28 ] 40009dcc: c0 26 60 2c clr [ %i1 + 0x2c ] 40009dd0: c0 26 60 30 clr [ %i1 + 0x30 ] 40009dd4: c0 26 60 34 clr [ %i1 + 0x34 ] 40009dd8: c0 26 60 38 clr [ %i1 + 0x38 ] 40009ddc: c0 26 60 3c clr [ %i1 + 0x3c ] 40009de0: c0 26 60 40 clr [ %i1 + 0x40 ] 40009de4: c0 26 60 44 clr [ %i1 + 0x44 ] status = (*loc.handlers->fstat_h)( &loc, buf ); 40009de8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40009dec: 9f c0 40 00 call %g1 40009df0: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40009df4: c2 07 bf f8 ld [ %fp + -8 ], %g1 40009df8: 80 a0 60 00 cmp %g1, 0 40009dfc: 02 80 00 08 be 40009e1c 40009e00: b0 10 00 08 mov %o0, %i0 40009e04: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009e08: 80 a0 60 00 cmp %g1, 0 40009e0c: 02 80 00 1a be 40009e74 40009e10: 01 00 00 00 nop 40009e14: 9f c0 40 00 call %g1 40009e18: 90 10 00 10 mov %l0, %o0 return status; } 40009e1c: 81 c7 e0 08 ret 40009e20: 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 ); 40009e24: 40 00 eb 56 call 40044b7c <__errno> 40009e28: b0 10 3f ff mov -1, %i0 40009e2c: 82 10 20 0e mov 0xe, %g1 40009e30: c2 22 00 00 st %g1, [ %o0 ] 40009e34: 81 c7 e0 08 ret 40009e38: 81 e8 00 00 restore 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 40009e3c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40009e40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009e44: 02 80 00 08 be 40009e64 <== NOT EXECUTED 40009e48: 01 00 00 00 nop <== NOT EXECUTED 40009e4c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009e50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009e54: 02 80 00 04 be 40009e64 <== NOT EXECUTED 40009e58: 01 00 00 00 nop <== NOT EXECUTED 40009e5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009e60: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009e64: 40 00 eb 46 call 40044b7c <__errno> <== NOT EXECUTED 40009e68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009e6c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009e70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009e74: 81 c7 e0 08 ret <== NOT EXECUTED 40009e78: 81 e8 00 00 restore <== NOT EXECUTED 4002c594 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 4002c594: 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 ) ) 4002c598: 40 00 7c a4 call 4004b828 <== NOT EXECUTED 4002c59c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002c5a0: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4002c5a4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002c5a8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4002c5ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002c5b0: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4002c5b4: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4002c5b8: 7f ff 6f 4e call 400082f0 <== NOT EXECUTED 4002c5bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c5c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002c5c4: 12 80 00 23 bne 4002c650 <== NOT EXECUTED 4002c5c8: 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; 4002c5cc: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002c5d0: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 4002c5d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c5d8: 02 80 00 20 be 4002c658 <== NOT EXECUTED 4002c5dc: 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)); 4002c5e0: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 4002c5e4: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 4002c5e8: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 4002c5ec: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 4002c5f0: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 4002c5f4: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 4002c5f8: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 4002c5fc: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 4002c600: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4002c604: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 4002c608: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 4002c60c: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 4002c610: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 4002c614: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 4002c618: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 4002c61c: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 4002c620: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c624: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002c628: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002c62c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c630: 02 80 00 08 be 4002c650 <== NOT EXECUTED 4002c634: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002c638: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002c63c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c640: 02 80 00 0a be 4002c668 <== NOT EXECUTED 4002c644: 01 00 00 00 nop <== NOT EXECUTED 4002c648: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c64c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 4002c650: 81 c7 e0 08 ret <== NOT EXECUTED 4002c654: 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 ); 4002c658: 40 00 61 49 call 40044b7c <__errno> <== NOT EXECUTED 4002c65c: 01 00 00 00 nop <== NOT EXECUTED 4002c660: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4002c664: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c668: 81 c7 e0 08 ret <== NOT EXECUTED 4002c66c: 81 e8 00 00 restore <== NOT EXECUTED 4002c670 : int symlink( const char *actualpath, const char *sympath ) { 4002c670: 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 ); 4002c674: c2 4e 40 00 ldsb [ %i1 ], %g1 4002c678: 80 a0 60 5c cmp %g1, 0x5c 4002c67c: 02 80 00 07 be 4002c698 4002c680: a2 10 00 18 mov %i0, %l1 4002c684: 80 a0 60 2f cmp %g1, 0x2f 4002c688: 02 80 00 04 be 4002c698 4002c68c: 80 a0 60 00 cmp %g1, 0 4002c690: 12 80 00 2f bne 4002c74c 4002c694: 03 10 01 a9 sethi %hi(0x4006a400), %g1 4002c698: 03 10 01 a9 sethi %hi(0x4006a400), %g1 4002c69c: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 4002c6a0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4002c6a4: c4 27 bf e8 st %g2, [ %fp + -24 ] 4002c6a8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4002c6ac: c4 27 bf ec st %g2, [ %fp + -20 ] 4002c6b0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4002c6b4: c4 27 bf f0 st %g2, [ %fp + -16 ] 4002c6b8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4002c6bc: c4 27 bf f4 st %g2, [ %fp + -12 ] 4002c6c0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002c6c4: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !loc.ops->evalformake_h ) { 4002c6c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002c6cc: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002c6d0: 80 a0 60 00 cmp %g1, 0 4002c6d4: 02 80 00 2e be 4002c78c 4002c6d8: 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 ); 4002c6dc: 90 06 40 08 add %i1, %o0, %o0 4002c6e0: a0 07 bf e8 add %fp, -24, %l0 4002c6e4: 94 07 bf fc add %fp, -4, %o2 4002c6e8: 92 10 00 10 mov %l0, %o1 4002c6ec: 9f c0 40 00 call %g1 4002c6f0: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 4002c6f4: 80 a2 20 00 cmp %o0, 0 4002c6f8: 12 80 00 13 bne 4002c744 4002c6fc: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 4002c700: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 4002c704: 80 a0 60 00 cmp %g1, 0 4002c708: 02 80 00 27 be 4002c7a4 4002c70c: 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); 4002c710: 92 10 00 11 mov %l1, %o1 4002c714: 9f c0 40 00 call %g1 4002c718: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002c71c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002c720: 80 a0 60 00 cmp %g1, 0 4002c724: 02 80 00 08 be 4002c744 4002c728: b0 10 00 08 mov %o0, %i0 4002c72c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002c730: 80 a0 60 00 cmp %g1, 0 4002c734: 02 80 00 1a be 4002c79c 4002c738: 01 00 00 00 nop 4002c73c: 9f c0 40 00 call %g1 4002c740: 90 10 00 10 mov %l0, %o0 return result; } 4002c744: 81 c7 e0 08 ret 4002c748: 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 ); 4002c74c: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 4002c750: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002c754: c4 27 bf e8 st %g2, [ %fp + -24 ] 4002c758: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002c75c: c4 27 bf ec st %g2, [ %fp + -20 ] 4002c760: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4002c764: c4 27 bf f0 st %g2, [ %fp + -16 ] 4002c768: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4002c76c: c4 27 bf f4 st %g2, [ %fp + -12 ] 4002c770: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4002c774: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !loc.ops->evalformake_h ) { 4002c778: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002c77c: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002c780: 80 a0 60 00 cmp %g1, 0 4002c784: 12 bf ff d6 bne 4002c6dc 4002c788: 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 ); 4002c78c: 40 00 60 fc call 40044b7c <__errno> <== NOT EXECUTED 4002c790: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c794: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002c798: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c79c: 81 c7 e0 08 ret <== NOT EXECUTED 4002c7a0: 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 ); 4002c7a4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002c7a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c7ac: 02 bf ff f8 be 4002c78c <== NOT EXECUTED 4002c7b0: 01 00 00 00 nop <== NOT EXECUTED 4002c7b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c7b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002c7bc: 30 bf ff f4 b,a 4002c78c <== NOT EXECUTED 40015560 : int tcsetattr( int fd, int opt, struct termios *tp ) { 40015560: 9d e3 bf a0 save %sp, -96, %sp switch (opt) { 40015564: 80 a6 60 00 cmp %i1, 0 40015568: 02 80 00 10 be 400155a8 4001556c: 80 a6 60 01 cmp %i1, 1 40015570: 02 80 00 08 be 40015590 <== NOT EXECUTED 40015574: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015578: 40 00 10 50 call 400196b8 <__errno> <== NOT EXECUTED 4001557c: 01 00 00 00 nop <== NOT EXECUTED 40015580: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40015584: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 40015588: 81 c7 e0 08 ret <== NOT EXECUTED 4001558c: 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) 40015590: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40015594: 40 00 0c 94 call 400187e4 <== NOT EXECUTED 40015598: 94 10 20 00 clr %o2 <== NOT EXECUTED 4001559c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400155a0: 06 bf ff fa bl 40015588 <== NOT EXECUTED 400155a4: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 400155a8: 40 00 0c 8f call 400187e4 400155ac: 93 e8 20 02 restore %g0, 2, %o1 400155b0: 01 00 00 00 nop 4000ed5c : #include int unlink( const char *path ) { 4000ed5c: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4000ed60: 7f ff d1 42 call 40003268 4000ed64: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 4000ed68: a0 92 20 00 orcc %o0, 0, %l0 4000ed6c: 32 80 00 91 bne,a 4000efb0 4000ed70: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4000ed74: c2 4e 00 00 ldsb [ %i0 ], %g1 4000ed78: 80 a0 60 5c cmp %g1, 0x5c 4000ed7c: 02 80 00 13 be 4000edc8 4000ed80: 80 a0 60 2f cmp %g1, 0x2f 4000ed84: 02 80 00 11 be 4000edc8 4000ed88: 80 a0 60 00 cmp %g1, 0 4000ed8c: 02 80 00 10 be 4000edcc <== NOT EXECUTED 4000ed90: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED 4000ed94: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001c928 <== NOT EXECUTED 4000ed98: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000ed9c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 4000eda0: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED 4000eda4: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED 4000eda8: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 4000edac: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 4000edb0: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED 4000edb4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4000edb8: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED 4000edbc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4000edc0: 10 80 00 0f b 4000edfc <== NOT EXECUTED 4000edc4: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED 4000edc8: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000edcc: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 4001c928 4000edd0: a2 10 20 00 clr %l1 4000edd4: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000edd8: c4 27 bf ec st %g2, [ %fp + -20 ] 4000eddc: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000ede0: c4 27 bf f0 st %g2, [ %fp + -16 ] 4000ede4: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4000ede8: c4 27 bf f4 st %g2, [ %fp + -12 ] 4000edec: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 4000edf0: c4 27 bf f8 st %g2, [ %fp + -8 ] 4000edf4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000edf8: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000edfc: c2 07 bf ec ld [ %fp + -20 ], %g1 name = path + parentpathlen; 4000ee00: b0 06 00 10 add %i0, %l0, %i0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ee04: c2 27 bf d8 st %g1, [ %fp + -40 ] 4000ee08: c2 07 bf f0 ld [ %fp + -16 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000ee0c: 90 10 00 18 mov %i0, %o0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ee10: c2 27 bf dc st %g1, [ %fp + -36 ] 4000ee14: 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 ), 4000ee18: a0 07 bf d8 add %fp, -40, %l0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ee1c: c2 27 bf e0 st %g1, [ %fp + -32 ] 4000ee20: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000ee24: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000ee28: c2 07 bf fc ld [ %fp + -4 ], %g1 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000ee2c: 40 00 04 74 call 4000fffc 4000ee30: c2 27 bf e8 st %g1, [ %fp + -24 ] 4000ee34: 92 10 00 08 mov %o0, %o1 4000ee38: 7f ff d0 ed call 400031ec 4000ee3c: 90 10 00 18 mov %i0, %o0 4000ee40: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000ee44: 40 00 04 6e call 4000fffc 4000ee48: 90 10 00 18 mov %i0, %o0 4000ee4c: 94 10 20 00 clr %o2 4000ee50: 92 10 00 08 mov %o0, %o1 4000ee54: 96 10 00 10 mov %l0, %o3 4000ee58: 90 10 00 18 mov %i0, %o0 4000ee5c: 7f ff d1 23 call 400032e8 4000ee60: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000ee64: 80 a2 20 00 cmp %o0, 0 4000ee68: 12 80 00 2a bne 4000ef10 4000ee6c: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4000ee70: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000ee74: 80 a0 60 00 cmp %g1, 0 4000ee78: 22 80 00 37 be,a 4000ef54 4000ee7c: 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 ) { 4000ee80: 9f c0 40 00 call %g1 4000ee84: 90 10 00 10 mov %l0, %o0 4000ee88: 80 a2 20 01 cmp %o0, 1 4000ee8c: 02 80 00 53 be 4000efd8 4000ee90: 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 ) { 4000ee94: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000ee98: 80 a0 60 00 cmp %g1, 0 4000ee9c: 02 80 00 2d be 4000ef50 4000eea0: 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 ); 4000eea4: 92 10 00 10 mov %l0, %o1 4000eea8: 9f c0 40 00 call %g1 4000eeac: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 4000eeb0: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000eeb4: 80 a0 60 00 cmp %g1, 0 4000eeb8: 02 80 00 08 be 4000eed8 4000eebc: b0 10 00 08 mov %o0, %i0 4000eec0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000eec4: 80 a0 60 00 cmp %g1, 0 4000eec8: 02 80 00 05 be 4000eedc 4000eecc: 80 8c 60 ff btst 0xff, %l1 4000eed0: 9f c0 40 00 call %g1 4000eed4: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000eed8: 80 8c 60 ff btst 0xff, %l1 4000eedc: 02 80 00 0b be 4000ef08 4000eee0: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000eee4: 80 a0 60 00 cmp %g1, 0 4000eee8: 02 80 00 56 be 4000f040 4000eeec: 01 00 00 00 nop 4000eef0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000eef4: 80 a0 60 00 cmp %g1, 0 4000eef8: 02 80 00 52 be 4000f040 4000eefc: 01 00 00 00 nop 4000ef00: 9f c0 40 00 call %g1 4000ef04: 90 10 00 12 mov %l2, %o0 4000ef08: 81 c7 e0 08 ret 4000ef0c: 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 ) 4000ef10: 80 8c 60 ff btst 0xff, %l1 4000ef14: 12 80 00 04 bne 4000ef24 4000ef18: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4000ef1c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ef20: 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 ); 4000ef24: 80 a0 60 00 cmp %g1, 0 4000ef28: 02 bf ff f8 be 4000ef08 4000ef2c: b0 10 3f ff mov -1, %i0 4000ef30: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000ef34: 80 a0 60 00 cmp %g1, 0 4000ef38: 02 bf ff f4 be 4000ef08 4000ef3c: 90 07 bf ec add %fp, -20, %o0 4000ef40: 9f c0 40 00 call %g1 4000ef44: 01 00 00 00 nop 4000ef48: 81 c7 e0 08 ret 4000ef4c: 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 ); 4000ef50: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000ef54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef58: 02 80 00 05 be 4000ef6c <== NOT EXECUTED 4000ef5c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000ef60: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ef64: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 4000ef68: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000ef6c: 02 80 00 0b be 4000ef98 <== NOT EXECUTED 4000ef70: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4000ef74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef78: 02 80 00 08 be 4000ef98 <== NOT EXECUTED 4000ef7c: 01 00 00 00 nop <== NOT EXECUTED 4000ef80: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000ef84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef88: 02 80 00 04 be 4000ef98 <== NOT EXECUTED 4000ef8c: 01 00 00 00 nop <== NOT EXECUTED 4000ef90: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ef94: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000ef98: 40 00 00 62 call 4000f120 <__errno> <== NOT EXECUTED 4000ef9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000efa0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000efa4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000efa8: 81 c7 e0 08 ret <== NOT EXECUTED 4000efac: 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, 4000efb0: 92 10 00 10 mov %l0, %o1 4000efb4: 94 10 20 02 mov 2, %o2 4000efb8: 96 07 bf ec add %fp, -20, %o3 4000efbc: 7f ff d1 0c call 400033ec 4000efc0: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4000efc4: 80 a2 20 00 cmp %o0, 0 4000efc8: 12 bf ff d5 bne 4000ef1c 4000efcc: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000efd0: 10 bf ff 8c b 4000ee00 4000efd4: 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 ); 4000efd8: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000efdc: 80 a0 60 00 cmp %g1, 0 4000efe0: 02 80 00 09 be 4000f004 4000efe4: 80 8c 60 ff btst 0xff, %l1 4000efe8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000efec: 80 a0 60 00 cmp %g1, 0 4000eff0: 02 80 00 05 be 4000f004 4000eff4: 80 8c 60 ff btst 0xff, %l1 4000eff8: 9f c0 40 00 call %g1 4000effc: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000f000: 80 8c 60 ff btst 0xff, %l1 4000f004: 02 80 00 0b be 4000f030 4000f008: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000f00c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000f010: 02 80 00 08 be 4000f030 <== NOT EXECUTED 4000f014: 01 00 00 00 nop <== NOT EXECUTED 4000f018: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000f01c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000f020: 02 80 00 04 be 4000f030 <== NOT EXECUTED 4000f024: 01 00 00 00 nop <== NOT EXECUTED 4000f028: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000f02c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4000f030: 40 00 00 3c call 4000f120 <__errno> 4000f034: b0 10 3f ff mov -1, %i0 4000f038: 82 10 20 15 mov 0x15, %g1 4000f03c: c2 22 00 00 st %g1, [ %o0 ] 4000f040: 81 c7 e0 08 ret 4000f044: 81 e8 00 00 restore 4000c104 : */ int unmount( const char *path ) { 4000c104: 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 ) ) 4000c108: 40 00 fd c8 call 4004b828 4000c10c: 90 10 00 18 mov %i0, %o0 4000c110: a0 07 bf ec add %fp, -20, %l0 4000c114: 92 10 00 08 mov %o0, %o1 4000c118: 94 10 20 00 clr %o2 4000c11c: 90 10 00 18 mov %i0, %o0 4000c120: 96 10 00 10 mov %l0, %o3 4000c124: 7f ff f0 73 call 400082f0 4000c128: 98 10 20 01 mov 1, %o4 4000c12c: 80 a2 20 00 cmp %o0, 0 4000c130: 12 80 00 3e bne 4000c228 4000c134: 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; 4000c138: c2 07 bf ec ld [ %fp + -20 ], %g1 4000c13c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 4000c140: 80 a0 80 01 cmp %g2, %g1 4000c144: 12 80 00 41 bne 4000c248 4000c148: 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 ); 4000c14c: 80 a0 60 00 cmp %g1, 0 4000c150: 22 80 00 09 be,a 4000c174 4000c154: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000c158: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000c15c: 80 a0 60 00 cmp %g1, 0 4000c160: 22 80 00 05 be,a 4000c174 4000c164: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000c168: 9f c0 40 00 call %g1 4000c16c: 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; 4000c170: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000c174: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000c178: 80 a0 60 00 cmp %g1, 0 4000c17c: 02 80 00 61 be 4000c300 4000c180: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 4000c184: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000c188: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000c18c: 80 a0 60 00 cmp %g1, 0 4000c190: 02 80 00 5c be 4000c300 4000c194: 03 10 01 a9 sethi %hi(0x4006a400), %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 ) 4000c198: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4006a5b8 4000c19c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000c1a0: 80 a0 40 11 cmp %g1, %l1 4000c1a4: 02 80 00 23 be 4000c230 4000c1a8: 07 10 01 b9 sethi %hi(0x4006e400), %g3 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c1ac: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 ! 4006e448 4000c1b0: 86 10 e0 48 or %g3, 0x48, %g3 4000c1b4: 86 00 e0 04 add %g3, 4, %g3 4000c1b8: 80 a0 40 03 cmp %g1, %g3 4000c1bc: 02 80 00 0f be 4000c1f8 4000c1c0: 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 ) { 4000c1c4: c8 04 60 2c ld [ %l1 + 0x2c ], %g4 4000c1c8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4000c1cc: 80 a0 80 04 cmp %g2, %g4 4000c1d0: 32 80 00 07 bne,a 4000c1ec 4000c1d4: c2 00 40 00 ld [ %g1 ], %g1 4000c1d8: 30 80 00 16 b,a 4000c230 <== NOT EXECUTED 4000c1dc: 80 a1 00 02 cmp %g4, %g2 4000c1e0: 02 80 00 14 be 4000c230 4000c1e4: 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 ) { 4000c1e8: 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; 4000c1ec: 80 a0 40 03 cmp %g1, %g3 4000c1f0: 32 bf ff fb bne,a 4000c1dc 4000c1f4: 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 ) 4000c1f8: 7f ff f1 3e call 400086f0 4000c1fc: 90 10 00 11 mov %l1, %o0 4000c200: 80 a2 20 01 cmp %o0, 1 4000c204: 02 80 00 0b be 4000c230 4000c208: 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 ) 4000c20c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000c210: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000c214: 9f c0 40 00 call %g1 4000c218: 90 10 00 11 mov %l1, %o0 4000c21c: 80 a2 20 00 cmp %o0, 0 4000c220: 22 80 00 19 be,a 4000c284 4000c224: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4000c228: 81 c7 e0 08 ret 4000c22c: 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 ); 4000c230: 40 00 e2 53 call 40044b7c <__errno> 4000c234: b0 10 3f ff mov -1, %i0 4000c238: 82 10 20 10 mov 0x10, %g1 4000c23c: c2 22 00 00 st %g1, [ %o0 ] 4000c240: 81 c7 e0 08 ret 4000c244: 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 ); 4000c248: 80 a0 60 00 cmp %g1, 0 4000c24c: 02 80 00 08 be 4000c26c 4000c250: 01 00 00 00 nop 4000c254: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000c258: 80 a0 60 00 cmp %g1, 0 4000c25c: 02 80 00 04 be 4000c26c 4000c260: 01 00 00 00 nop 4000c264: 9f c0 40 00 call %g1 4000c268: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4000c26c: 40 00 e2 44 call 40044b7c <__errno> 4000c270: b0 10 3f ff mov -1, %i0 4000c274: 82 10 20 0d mov 0xd, %g1 4000c278: c2 22 00 00 st %g1, [ %o0 ] 4000c27c: 81 c7 e0 08 ret 4000c280: 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){ 4000c284: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000c288: 9f c0 40 00 call %g1 4000c28c: 90 10 00 11 mov %l1, %o0 4000c290: 80 a2 20 00 cmp %o0, 0 4000c294: 32 80 00 13 bne,a 4000c2e0 4000c298: 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 ); 4000c29c: 40 00 06 23 call 4000db28 <_Chain_Extract> 4000c2a0: 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 ); 4000c2a4: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000c2a8: 80 a0 60 00 cmp %g1, 0 4000c2ac: 02 80 00 09 be 4000c2d0 4000c2b0: 90 10 00 11 mov %l1, %o0 4000c2b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000c2b8: 80 a0 60 00 cmp %g1, 0 4000c2bc: 02 80 00 05 be 4000c2d0 4000c2c0: 01 00 00 00 nop 4000c2c4: 9f c0 40 00 call %g1 4000c2c8: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 4000c2cc: 90 10 00 11 mov %l1, %o0 4000c2d0: 7f ff f0 43 call 400083dc 4000c2d4: b0 10 20 00 clr %i0 return 0; 4000c2d8: 81 c7 e0 08 ret 4000c2dc: 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 ) 4000c2e0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 4000c2e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c2e8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000c2ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c2f0: 02 bf ff ce be 4000c228 <== NOT EXECUTED 4000c2f4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4000c2f8: 40 00 05 2c call 4000d7a8 <== NOT EXECUTED 4000c2fc: 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 ); 4000c300: 40 00 e2 1f call 40044b7c <__errno> <== NOT EXECUTED 4000c304: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000c308: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000c30c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c310: 81 c7 e0 08 ret <== NOT EXECUTED 4000c314: 81 e8 00 00 restore <== NOT EXECUTED 4002c85c : int utime( const char *path, const struct utimbuf *times ) { 4002c85c: 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 ) ) 4002c860: 40 00 7b f2 call 4004b828 4002c864: 90 10 00 18 mov %i0, %o0 4002c868: a0 07 bf ec add %fp, -20, %l0 4002c86c: 92 10 00 08 mov %o0, %o1 4002c870: 94 10 20 00 clr %o2 4002c874: 90 10 00 18 mov %i0, %o0 4002c878: 96 10 00 10 mov %l0, %o3 4002c87c: 98 10 20 01 mov 1, %o4 4002c880: 7f ff 6e 9c call 400082f0 4002c884: b0 10 3f ff mov -1, %i0 4002c888: 80 a2 20 00 cmp %o0, 0 4002c88c: 12 80 00 14 bne 4002c8dc 4002c890: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 4002c894: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 4002c898: 80 a0 60 00 cmp %g1, 0 4002c89c: 22 80 00 12 be,a 4002c8e4 4002c8a0: 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 ); 4002c8a4: d4 06 60 04 ld [ %i1 + 4 ], %o2 4002c8a8: d2 06 40 00 ld [ %i1 ], %o1 4002c8ac: 9f c0 40 00 call %g1 4002c8b0: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 4002c8b4: c2 07 bf f8 ld [ %fp + -8 ], %g1 4002c8b8: 80 a0 60 00 cmp %g1, 0 4002c8bc: 02 80 00 08 be 4002c8dc 4002c8c0: b0 10 00 08 mov %o0, %i0 4002c8c4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002c8c8: 80 a0 60 00 cmp %g1, 0 4002c8cc: 02 80 00 0f be 4002c908 4002c8d0: 01 00 00 00 nop 4002c8d4: 9f c0 40 00 call %g1 4002c8d8: 90 10 00 10 mov %l0, %o0 return result; } 4002c8dc: 81 c7 e0 08 ret 4002c8e0: 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 ); 4002c8e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c8e8: 02 80 00 04 be 4002c8f8 <== NOT EXECUTED 4002c8ec: 01 00 00 00 nop <== NOT EXECUTED 4002c8f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c8f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002c8f8: 40 00 60 a1 call 40044b7c <__errno> <== NOT EXECUTED 4002c8fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c900: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002c904: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002c908: 81 c7 e0 08 ret <== NOT EXECUTED 4002c90c: 81 e8 00 00 restore <== NOT EXECUTED 400060e0 : */ void vprintk( const char *fmt, va_list ap ) { 400060e0: 9d e3 bf 88 save %sp, -120, %sp for (; *fmt != '\0'; fmt++) { 400060e4: c2 0e 00 00 ldub [ %i0 ], %g1 400060e8: 83 28 60 18 sll %g1, 0x18, %g1 400060ec: 80 a0 60 00 cmp %g1, 0 400060f0: 02 80 00 53 be 4000623c 400060f4: 29 10 00 72 sethi %hi(0x4001c800), %l4 400060f8: 3b 10 00 6e sethi %hi(0x4001b800), %i5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 400060fc: 37 10 00 6e sethi %hi(0x4001b800), %i3 bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 40006100: a8 15 21 0c or %l4, 0x10c, %l4 40006104: ba 17 63 30 or %i5, 0x330, %i5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40006108: b6 16 e2 80 or %i3, 0x280, %i3 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 4000610c: ac 07 bf e8 add %fp, -24, %l6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 40006110: 91 38 60 18 sra %g1, 0x18, %o0 40006114: 80 a2 20 25 cmp %o0, 0x25 40006118: 32 80 00 41 bne,a 4000621c 4000611c: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(*fmt); continue; } fmt++; 40006120: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40006124: c2 0e 00 00 ldub [ %i0 ], %g1 40006128: 85 28 60 18 sll %g1, 0x18, %g2 4000612c: 87 38 a0 18 sra %g2, 0x18, %g3 40006130: 80 a0 e0 30 cmp %g3, 0x30 40006134: 02 80 00 8d be 40006368 40006138: b8 10 20 20 mov 0x20, %i4 lead = '0'; fmt++; } if (*fmt == '-' ) { 4000613c: 87 38 a0 18 sra %g2, 0x18, %g3 40006140: 80 a0 e0 2d cmp %g3, 0x2d 40006144: 02 80 00 84 be 40006354 40006148: aa 10 20 00 clr %l5 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4000614c: 82 00 7f d0 add %g1, -48, %g1 40006150: 82 08 60 ff and %g1, 0xff, %g1 40006154: 80 a0 60 09 cmp %g1, 9 40006158: 18 80 00 0f bgu 40006194 4000615c: a0 10 20 00 clr %l0 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; 40006160: b0 06 20 01 inc %i0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40006164: c2 0e 00 00 ldub [ %i0 ], %g1 width *= 10; width += ((unsigned) *fmt - '0'); 40006168: 87 38 a0 18 sra %g2, 0x18, %g3 4000616c: 89 2c 20 03 sll %l0, 3, %g4 40006170: 85 28 60 18 sll %g1, 0x18, %g2 40006174: a1 2c 20 01 sll %l0, 1, %l0 40006178: a0 04 00 04 add %l0, %g4, %l0 4000617c: a0 04 00 03 add %l0, %g3, %l0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40006180: 86 00 7f d0 add %g1, -48, %g3 40006184: 86 08 e0 ff and %g3, 0xff, %g3 40006188: 80 a0 e0 09 cmp %g3, 9 4000618c: 08 bf ff f5 bleu 40006160 40006190: a0 04 3f d0 add %l0, -48, %l0 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40006194: 83 38 a0 18 sra %g2, 0x18, %g1 40006198: 80 a0 60 6c cmp %g1, 0x6c 4000619c: 02 80 00 78 be 4000637c 400061a0: 80 a0 60 63 cmp %g1, 0x63 lflag = true; c = *++fmt; } if ( c == 'c' ) { 400061a4: 22 80 00 7e be,a 4000639c 400061a8: d0 06 40 00 ld [ %i1 ], %o0 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { 400061ac: 80 a0 60 73 cmp %g1, 0x73 400061b0: 02 80 00 86 be 400063c8 400061b4: 80 a0 60 4f cmp %g1, 0x4f continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 400061b8: 02 80 00 64 be 40006348 400061bc: 80 a0 60 6f cmp %g1, 0x6f 400061c0: 02 80 00 62 be 40006348 400061c4: 80 a0 60 49 cmp %g1, 0x49 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 400061c8: 02 80 00 1f be 40006244 400061cc: 80 a0 60 69 cmp %g1, 0x69 400061d0: 02 80 00 1d be 40006244 400061d4: 80 a0 60 44 cmp %g1, 0x44 400061d8: 02 80 00 1b be 40006244 400061dc: 80 a0 60 64 cmp %g1, 0x64 400061e0: 02 80 00 19 be 40006244 400061e4: 80 a0 60 55 cmp %g1, 0x55 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 400061e8: 02 80 00 c7 be 40006504 400061ec: 80 a0 60 75 cmp %g1, 0x75 400061f0: 02 80 00 c5 be 40006504 400061f4: 91 38 a0 18 sra %g2, 0x18, %o0 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 400061f8: 80 a2 20 58 cmp %o0, 0x58 400061fc: 02 80 00 bf be 400064f8 40006200: 80 a2 20 78 cmp %o0, 0x78 40006204: 02 80 00 bd be 400064f8 40006208: 80 a2 20 70 cmp %o0, 0x70 base = 16; sign = false; } else if ( c == 'p' ) { 4000620c: 82 10 20 00 clr %g1 40006210: 02 80 00 0f be 4000624c 40006214: aa 10 20 10 mov 0x10, %l5 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 40006218: c2 05 00 00 ld [ %l4 ], %g1 4000621c: 9f c0 40 00 call %g1 40006220: 01 00 00 00 nop void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40006224: b0 06 20 01 inc %i0 40006228: c2 0e 00 00 ldub [ %i0 ], %g1 4000622c: 83 28 60 18 sll %g1, 0x18, %g1 40006230: 80 a0 60 00 cmp %g1, 0 40006234: 12 bf ff b8 bne 40006114 40006238: 91 38 60 18 sra %g1, 0x18, %o0 4000623c: 81 c7 e0 08 ret 40006240: 81 e8 00 00 restore base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 40006244: 82 10 20 01 mov 1, %g1 40006248: aa 10 20 0a mov 0xa, %l5 } printNum( 4000624c: e6 06 40 00 ld [ %i1 ], %l3 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 40006250: 80 88 60 ff btst 0xff, %g1 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 40006254: b2 06 60 04 add %i1, 4, %i1 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 40006258: 02 80 00 05 be 4000626c 4000625c: b8 0f 20 30 and %i4, 0x30, %i4 40006260: 80 a4 e0 00 cmp %l3, 0 40006264: 26 80 00 9f bl,a 400064e0 40006268: c2 05 00 00 ld [ %l4 ], %g1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 4000626c: 90 10 00 13 mov %l3, %o0 40006270: 92 10 00 15 mov %l5, %o1 40006274: 40 00 49 3c call 40018764 <.udiv> 40006278: ae 10 20 01 mov 1, %l7 4000627c: a2 92 20 00 orcc %o0, 0, %l1 40006280: 02 80 00 12 be 400062c8 40006284: a4 10 20 00 clr %l2 40006288: 10 80 00 03 b 40006294 4000628c: ae 10 00 15 mov %l5, %l7 40006290: a2 10 00 08 mov %o0, %l1 toPrint[count++] = (char) (unsigned_num - (n * base)); 40006294: 92 10 00 11 mov %l1, %o1 40006298: 40 00 48 f9 call 4001867c <.umul> 4000629c: 90 10 00 17 mov %l7, %o0 400062a0: 90 24 c0 08 sub %l3, %o0, %o0 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 400062a4: 92 10 00 15 mov %l5, %o1 toPrint[count++] = (char) (unsigned_num - (n * base)); 400062a8: d0 2d 80 12 stb %o0, [ %l6 + %l2 ] } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 400062ac: 90 10 00 11 mov %l1, %o0 400062b0: 40 00 49 2d call 40018764 <.udiv> 400062b4: a4 04 a0 01 inc %l2 400062b8: 80 a2 20 00 cmp %o0, 0 400062bc: 12 bf ff f5 bne 40006290 400062c0: a6 10 00 11 mov %l1, %l3 400062c4: ae 04 a0 01 add %l2, 1, %l7 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 400062c8: a4 07 80 12 add %fp, %l2, %l2 for (n=maxwidth ; n > count; n-- ) 400062cc: 80 a4 00 17 cmp %l0, %l7 400062d0: 08 80 00 09 bleu 400062f4 400062d4: e6 2c bf e8 stb %l3, [ %l2 + -24 ] BSP_output_char(lead); 400062d8: c2 05 00 00 ld [ %l4 ], %g1 400062dc: 9f c0 40 00 call %g1 400062e0: 90 10 00 1c mov %i4, %o0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 400062e4: a0 04 3f ff add %l0, -1, %l0 400062e8: 80 a4 00 17 cmp %l0, %l7 400062ec: 38 bf ff fc bgu,a 400062dc 400062f0: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(lead); for (n = 0; n < count; n++) { 400062f4: 80 a5 e0 00 cmp %l7, 0 400062f8: 02 bf ff cb be 40006224 400062fc: a2 05 ff ff add %l7, -1, %l1 40006300: a0 10 20 00 clr %l0 40006304: a2 05 80 11 add %l6, %l1, %l1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40006308: c4 4c 40 00 ldsb [ %l1 ], %g2 4000630c: c2 05 00 00 ld [ %l4 ], %g1 40006310: d0 4f 40 02 ldsb [ %i5 + %g2 ], %o0 40006314: 9f c0 40 00 call %g1 40006318: a0 04 20 01 inc %l0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 4000631c: 80 a4 00 17 cmp %l0, %l7 40006320: 0a bf ff fa bcs 40006308 40006324: a2 04 7f ff add %l1, -1, %l1 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40006328: b0 06 20 01 inc %i0 4000632c: c2 0e 00 00 ldub [ %i0 ], %g1 40006330: 83 28 60 18 sll %g1, 0x18, %g1 40006334: 80 a0 60 00 cmp %g1, 0 40006338: 12 bf ff 77 bne 40006114 4000633c: 91 38 60 18 sra %g1, 0x18, %o0 40006340: 81 c7 e0 08 ret <== NOT EXECUTED 40006344: 81 e8 00 00 restore <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 40006348: 82 10 20 00 clr %g1 4000634c: 10 bf ff c0 b 4000624c 40006350: aa 10 20 08 mov 8, %l5 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; 40006354: b0 06 20 01 inc %i0 40006358: c2 0e 00 00 ldub [ %i0 ], %g1 4000635c: aa 10 20 01 mov 1, %l5 40006360: 10 bf ff 7b b 4000614c 40006364: 85 28 60 18 sll %g1, 0x18, %g2 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 40006368: b0 06 20 01 inc %i0 4000636c: c2 0e 00 00 ldub [ %i0 ], %g1 40006370: b8 10 20 30 mov 0x30, %i4 40006374: 10 bf ff 72 b 4000613c 40006378: 85 28 60 18 sll %g1, 0x18, %g2 fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; 4000637c: b0 06 20 01 inc %i0 40006380: c2 0e 00 00 ldub [ %i0 ], %g1 40006384: 85 28 60 18 sll %g1, 0x18, %g2 } if ( c == 'c' ) { 40006388: 83 38 a0 18 sra %g2, 0x18, %g1 4000638c: 80 a0 60 63 cmp %g1, 0x63 40006390: 12 bf ff 88 bne 400061b0 40006394: 80 a0 60 73 cmp %g1, 0x73 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 40006398: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED BSP_output_char(chr); 4000639c: c2 05 00 00 ld [ %l4 ], %g1 400063a0: 91 2a 20 18 sll %o0, 0x18, %o0 400063a4: 9f c0 40 00 call %g1 400063a8: 91 3a 20 18 sra %o0, 0x18, %o0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 400063ac: b0 06 20 01 inc %i0 400063b0: c2 0e 00 00 ldub [ %i0 ], %g1 400063b4: 83 28 60 18 sll %g1, 0x18, %g1 400063b8: 80 a0 60 00 cmp %g1, 0 400063bc: 12 bf ff 55 bne 40006110 400063c0: b2 06 60 04 add %i1, 4, %i1 400063c4: 30 bf ff df b,a 40006340 <== NOT EXECUTED } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 400063c8: e4 06 40 00 ld [ %i1 ], %l2 if ( str == NULL ) { 400063cc: 80 a4 a0 00 cmp %l2, 0 400063d0: 02 80 00 50 be 40006510 400063d4: b2 06 60 04 add %i1, 4, %i1 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 400063d8: c2 4c 80 00 ldsb [ %l2 ], %g1 400063dc: 80 a0 60 00 cmp %g1, 0 400063e0: 02 80 00 07 be 400063fc 400063e4: a2 10 20 00 clr %l1 400063e8: a2 04 60 01 inc %l1 400063ec: c2 4c 80 11 ldsb [ %l2 + %l1 ], %g1 400063f0: 80 a0 60 00 cmp %g1, 0 400063f4: 32 bf ff fe bne,a 400063ec 400063f8: a2 04 60 01 inc %l1 ; /* leading spaces */ if ( !minus ) 400063fc: aa 8d 60 ff andcc %l5, 0xff, %l5 40006400: 12 80 00 0e bne 40006438 40006404: 80 a4 20 00 cmp %l0, 0 for ( i=len ; i 40006410: 80 a4 20 00 cmp %l0, 0 40006414: a6 10 00 11 mov %l1, %l3 BSP_output_char(' '); 40006418: c2 05 00 00 ld [ %l4 ], %g1 4000641c: 9f c0 40 00 call %g1 40006420: 90 10 20 20 mov 0x20, %o0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 40006430: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(' '); /* no width option */ if (width == 0) { 40006434: 80 a4 20 00 cmp %l0, 0 40006438: 32 80 00 07 bne,a 40006454 4000643c: d0 4c 80 00 ldsb [ %l2 ], %o0 width = len; } /* output the string */ for ( i=0 ; i 40006448: 80 a5 60 00 cmp %l5, 0 4000644c: a0 10 00 11 mov %l1, %l0 40006450: d0 4c 80 00 ldsb [ %l2 ], %o0 40006454: 80 a2 20 00 cmp %o0, 0 40006458: 02 80 00 0f be 40006494 4000645c: 80 a5 60 00 cmp %l5, 0 BSP_output_char(*str); 40006460: c2 05 00 00 ld [ %l4 ], %g1 40006464: 9f c0 40 00 call %g1 40006468: a4 04 a0 01 inc %l2 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 40006470: d0 4c 80 00 ldsb [ %l2 ], %o0 BSP_output_char(*str); 40006474: c2 05 00 00 ld [ %l4 ], %g1 40006478: 9f c0 40 00 call %g1 4000647c: 01 00 00 00 nop if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 4000648c: a4 04 a0 01 inc %l2 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 40006490: 80 a5 60 00 cmp %l5, 0 40006494: 22 bf ff 65 be,a 40006228 40006498: b0 06 20 01 inc %i0 for ( i=len ; i 400064a4: b0 06 20 01 inc %i0 BSP_output_char(' '); 400064a8: c2 05 00 00 ld [ %l4 ], %g1 400064ac: 9f c0 40 00 call %g1 400064b0: 90 10 20 20 mov 0x20, %o0 for ( i=0 ; i 400064c0: c2 05 00 00 ld [ %l4 ], %g1 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 400064c4: b0 06 20 01 inc %i0 400064c8: c2 0e 00 00 ldub [ %i0 ], %g1 400064cc: 83 28 60 18 sll %g1, 0x18, %g1 400064d0: 80 a0 60 00 cmp %g1, 0 400064d4: 32 bf ff 10 bne,a 40006114 400064d8: 91 38 60 18 sra %g1, 0x18, %o0 400064dc: 30 bf ff 99 b,a 40006340 <== NOT EXECUTED unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 400064e0: 9f c0 40 00 call %g1 400064e4: 90 10 20 2d mov 0x2d, %o0 unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 400064e8: 80 a0 00 10 cmp %g0, %l0 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 400064ec: a6 20 00 13 neg %l3 if (maxwidth) maxwidth--; 400064f0: 10 bf ff 5f b 4000626c 400064f4: a0 64 20 00 subx %l0, 0, %l0 } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 400064f8: 82 10 20 00 clr %g1 400064fc: 10 bf ff 54 b 4000624c 40006500: aa 10 20 10 mov 0x10, %l5 if ( c == 'o' || c == 'O' ) { base = 8; sign = false; } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 40006504: 82 10 20 00 clr %g1 40006508: 10 bf ff 51 b 4000624c 4000650c: aa 10 20 0a mov 0xa, %l5 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40006510: 10 bf ff b2 b 400063d8 40006514: a4 10 00 1b mov %i3, %l2 4001b09c : ssize_t write( int fd, const void *buffer, size_t count ) { 4001b09c: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b0a0: 03 10 00 72 sethi %hi(0x4001c800), %g1 4001b0a4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 ! 4001c814 4001b0a8: 80 a6 00 01 cmp %i0, %g1 4001b0ac: 1a 80 00 23 bcc 4001b138 4001b0b0: 03 10 00 74 sethi %hi(0x4001d000), %g1 iop = rtems_libio_iop( fd ); 4001b0b4: e0 00 61 2c ld [ %g1 + 0x12c ], %l0 ! 4001d12c 4001b0b8: 83 2e 20 06 sll %i0, 6, %g1 4001b0bc: b1 2e 20 03 sll %i0, 3, %i0 4001b0c0: b0 06 00 01 add %i0, %g1, %i0 4001b0c4: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001b0c8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b0cc: 80 88 61 00 btst 0x100, %g1 4001b0d0: 02 80 00 1a be 4001b138 4001b0d4: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001b0d8: 02 80 00 1e be 4001b150 4001b0dc: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001b0e0: 02 80 00 14 be 4001b130 4001b0e4: b0 10 20 00 clr %i0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001b0e8: 80 88 60 04 btst 4, %g1 4001b0ec: 02 80 00 19 be 4001b150 4001b0f0: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 4001b0f4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b0f8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4001b0fc: 80 a0 60 00 cmp %g1, 0 4001b100: 02 80 00 1a be 4001b168 4001b104: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 4001b108: 94 10 00 1a mov %i2, %o2 4001b10c: 9f c0 40 00 call %g1 4001b110: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001b114: b0 92 20 00 orcc %o0, 0, %i0 4001b118: 04 80 00 06 ble 4001b130 4001b11c: 85 3e 20 1f sra %i0, 0x1f, %g2 iop->offset += rc; 4001b120: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001b124: 86 83 40 18 addcc %o5, %i0, %g3 4001b128: 84 43 00 02 addx %o4, %g2, %g2 4001b12c: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001b130: 81 c7 e0 08 ret 4001b134: 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 ); 4001b138: 7f ff cf fa call 4000f120 <__errno> <== NOT EXECUTED 4001b13c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b140: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4001b144: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b148: 81 c7 e0 08 ret <== NOT EXECUTED 4001b14c: 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 ); 4001b150: 7f ff cf f4 call 4000f120 <__errno> <== NOT EXECUTED 4001b154: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b158: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001b15c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b160: 81 c7 e0 08 ret <== NOT EXECUTED 4001b164: 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 ); 4001b168: 7f ff cf ee call 4000f120 <__errno> <== NOT EXECUTED 4001b16c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b170: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001b174: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b178: 81 c7 e0 08 ret <== NOT EXECUTED 4001b17c: 81 e8 00 00 restore <== NOT EXECUTED 40008130 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 40008130: 9d e3 bf a0 save %sp, -96, %sp int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 40008134: 03 10 00 85 sethi %hi(0x40021400), %g1 40008138: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40021614 4000813c: 80 a6 00 01 cmp %i0, %g1 40008140: 1a 80 00 58 bcc 400082a0 40008144: 03 10 00 89 sethi %hi(0x40022400), %g1 iop = rtems_libio_iop( fd ); 40008148: e6 00 63 04 ld [ %g1 + 0x304 ], %l3 ! 40022704 4000814c: 83 2e 20 06 sll %i0, 6, %g1 40008150: b1 2e 20 03 sll %i0, 3, %i0 40008154: b0 06 00 01 add %i0, %g1, %i0 40008158: a6 04 c0 18 add %l3, %i0, %l3 rtems_libio_check_is_open( iop ); 4000815c: c2 04 e0 18 ld [ %l3 + 0x18 ], %g1 40008160: 80 88 61 00 btst 0x100, %g1 40008164: 02 80 00 4f be 400082a0 40008168: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000816c: 02 80 00 1d be 400081e0 40008170: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 40008174: 02 80 00 1b be 400081e0 40008178: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 4000817c: 04 80 00 19 ble 400081e0 40008180: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 40008184: 14 80 00 17 bg 400081e0 40008188: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 4000818c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40008190: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40008194: 80 a0 60 00 cmp %g1, 0 40008198: 02 80 00 48 be 400082b8 4000819c: 17 00 00 1f sethi %hi(0x7c00), %o3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 400081a0: 82 10 00 19 mov %i1, %g1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 400081a4: 96 12 e3 ff or %o3, 0x3ff, %o3 if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400081a8: 9a 10 20 01 mov 1, %o5 400081ac: 86 10 20 00 clr %g3 400081b0: 88 10 20 00 clr %g4 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 400081b4: c4 00 40 00 ld [ %g1 ], %g2 400081b8: 80 a0 a0 00 cmp %g2, 0 400081bc: 02 80 00 09 be 400081e0 400081c0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 400081c4: c4 00 60 04 ld [ %g1 + 4 ], %g2 400081c8: 80 a0 00 02 cmp %g0, %g2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 400081cc: 84 01 00 02 add %g4, %g2, %g2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 400081d0: 98 40 3f ff addx %g0, -1, %o4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 400081d4: 80 a0 80 0b cmp %g2, %o3 400081d8: 04 80 00 08 ble 400081f8 400081dc: 9a 0b 40 0c and %o5, %o4, %o5 rtems_set_errno_and_return_minus_one( EINVAL ); 400081e0: 40 00 26 46 call 40011af8 <__errno> 400081e4: b0 10 3f ff mov -1, %i0 400081e8: 82 10 20 16 mov 0x16, %g1 400081ec: c2 22 00 00 st %g1, [ %o0 ] 400081f0: 81 c7 e0 08 ret 400081f4: 81 e8 00 00 restore all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 400081f8: 80 a1 00 02 cmp %g4, %g2 400081fc: 14 bf ff f9 bg 400081e0 40008200: 86 00 e0 01 inc %g3 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 40008204: 80 a6 80 03 cmp %i2, %g3 40008208: 04 80 00 04 ble 40008218 4000820c: 82 00 60 08 add %g1, 8, %g1 40008210: 10 bf ff e9 b 400081b4 40008214: 88 10 00 02 mov %g2, %g4 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 40008218: 80 8b 60 ff btst 0xff, %o5 <== NOT EXECUTED 4000821c: a4 10 20 00 clr %l2 <== NOT EXECUTED 40008220: 12 bf ff f4 bne 400081f0 <== NOT EXECUTED 40008224: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 40008228: d4 06 60 04 ld [ %i1 + 4 ], %o2 <== NOT EXECUTED 4000822c: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 40008230: 12 80 00 07 bne 4000824c <== NOT EXECUTED 40008234: a4 04 a0 01 inc %l2 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40008238: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED 4000823c: 14 bf ff fb bg 40008228 <== NOT EXECUTED 40008240: b2 06 60 08 add %i1, 8, %i1 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40008244: 81 c7 e0 08 ret <== NOT EXECUTED 40008248: 81 e8 00 00 restore <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 4000824c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED 40008250: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 40008254: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 40008258: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000825c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if ( bytes < 0 ) 40008260: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008264: 06 80 00 1b bl 400082d0 <== NOT EXECUTED 40008268: 01 00 00 00 nop <== NOT EXECUTED return -1; if ( bytes > 0 ) { 4000826c: 02 80 00 07 be 40008288 <== NOT EXECUTED 40008270: a1 3a 20 1f sra %o0, 0x1f, %l0 <== NOT EXECUTED iop->offset += bytes; 40008274: c4 1c e0 10 ldd [ %l3 + 0x10 ], %g2 <== NOT EXECUTED 40008278: 86 80 c0 08 addcc %g3, %o0, %g3 <== NOT EXECUTED total += bytes; 4000827c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 40008280: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 40008284: c4 3c e0 10 std %g2, [ %l3 + 0x10 ] <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 40008288: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED 4000828c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40008290: 02 bf ff eb be 4000823c <== NOT EXECUTED 40008294: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED break; } return total; } 40008298: 81 c7 e0 08 ret <== NOT EXECUTED 4000829c: 81 e8 00 00 restore <== NOT EXECUTED ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 400082a0: 40 00 26 16 call 40011af8 <__errno> 400082a4: b0 10 3f ff mov -1, %i0 400082a8: 82 10 20 09 mov 9, %g1 400082ac: c2 22 00 00 st %g1, [ %o0 ] 400082b0: 81 c7 e0 08 ret 400082b4: 81 e8 00 00 restore if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400082b8: 40 00 26 10 call 40011af8 <__errno> <== NOT EXECUTED 400082bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400082c0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400082c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400082c8: 81 c7 e0 08 ret <== NOT EXECUTED 400082cc: 81 e8 00 00 restore <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 400082d0: 81 c7 e0 08 ret <== NOT EXECUTED 400082d4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED