4000d278 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000d278: 9d e3 bf a0 save %sp, -96, %sp 4000d27c: a0 10 00 18 mov %i0, %l0 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4000d280: 80 a6 20 00 cmp %i0, 0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000d284: 92 10 00 1a mov %i2, %o1 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4000d288: 02 80 00 40 be 4000d388 4000d28c: b0 10 20 00 clr %i0 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4000d290: 03 10 00 6e sethi %hi(0x4001b800), %g1 4000d294: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 4001b8f8 4000d298: 90 10 00 19 mov %i1, %o0 4000d29c: d4 10 60 2c lduh [ %g1 + 0x2c ], %o2 4000d2a0: b6 2e c0 0a andn %i3, %o2, %i3 4000d2a4: 95 2e e0 10 sll %i3, 0x10, %o2 4000d2a8: 7f ff ff ca call 4000d1d0 4000d2ac: 95 32 a0 10 srl %o2, 0x10, %o2 if ( !node ) 4000d2b0: b0 92 20 00 orcc %o0, 0, %i0 4000d2b4: 02 80 00 35 be 4000d388 4000d2b8: b2 06 7f ff add %i1, -1, %i1 return NULL; /* * Set the type specific information */ switch (type) { 4000d2bc: 80 a6 60 06 cmp %i1, 6 4000d2c0: 38 80 00 20 bgu,a 4000d340 4000d2c4: 11 10 00 6b sethi %hi(0x4001ac00), %o0 <== NOT EXECUTED 4000d2c8: b3 2e 60 02 sll %i1, 2, %i1 4000d2cc: 03 10 00 34 sethi %hi(0x4000d000), %g1 4000d2d0: 82 10 61 b4 or %g1, 0x1b4, %g1 ! 4000d1b4 4000d2d4: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000d2d8: 81 c0 40 00 jmp %g1 4000d2dc: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000d2e0: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 4000d2e4: c0 26 20 54 clr [ %i0 + 0x54 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000d2e8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000d2ec: 82 06 20 50 add %i0, 0x50, %g1 4000d2f0: 10 80 00 1b b 4000d35c 4000d2f4: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 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; 4000d2f8: 10 80 00 05 b 4000d30c 4000d2fc: c2 07 00 00 ld [ %i4 ], %g1 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 4000d300: 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; 4000d304: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 4000d308: c4 26 20 54 st %g2, [ %i0 + 0x54 ] break; 4000d30c: 10 80 00 14 b 4000d35c 4000d310: c2 26 20 50 st %g1, [ %i0 + 0x50 ] case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000d314: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED 4000d318: c0 26 20 54 clr [ %i0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000d31c: c0 26 20 58 clr [ %i0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000d320: c0 26 20 50 clr [ %i0 + 0x50 ] 4000d324: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 4000d328: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 4000d32c: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; break; 4000d330: 10 80 00 0b b 4000d35c 4000d334: c0 26 20 60 clr [ %i0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 4000d338: 10 80 00 09 b 4000d35c 4000d33c: c0 26 20 50 clr [ %i0 + 0x50 ] default: assert(0); 4000d340: 15 10 00 6b sethi %hi(0x4001ac00), %o2 <== NOT EXECUTED 4000d344: 17 10 00 6a sethi %hi(0x4001a800), %o3 <== NOT EXECUTED 4000d348: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED 4000d34c: 94 12 a3 e8 or %o2, 0x3e8, %o2 <== NOT EXECUTED 4000d350: 96 12 e0 70 or %o3, 0x70, %o3 <== NOT EXECUTED 4000d354: 7f ff d6 8d call 40002d88 <__assert_func> <== NOT EXECUTED 4000d358: 92 10 20 5c mov 0x5c, %o1 <== NOT EXECUTED /* * 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; 4000d35c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4000d360: d0 04 00 00 ld [ %l0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 4000d364: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 4000d368: d0 26 20 08 st %o0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 4000d36c: 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 ); 4000d370: 90 02 20 50 add %o0, 0x50, %o0 4000d374: 82 00 60 01 inc %g1 4000d378: c2 20 80 00 st %g1, [ %g2 ] 4000d37c: c2 26 20 34 st %g1, [ %i0 + 0x34 ] 4000d380: 7f ff e6 c3 call 40006e8c <_Chain_Append> 4000d384: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000d388: 81 c7 e0 08 ret 4000d38c: 81 e8 00 00 restore 40004a58 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40004a58: 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 ); 40004a5c: 80 a6 20 00 cmp %i0, 0 40004a60: 12 80 00 0a bne 40004a88 40004a64: 80 a6 60 00 cmp %i1, 0 40004a68: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40004a6c: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40004a70: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40004a74: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 40004a78: 94 12 a3 d0 or %o2, 0x3d0, %o2 <== NOT EXECUTED 40004a7c: 96 12 e2 d8 or %o3, 0x2d8, %o3 <== NOT EXECUTED 40004a80: 10 80 00 0b b 40004aac <== NOT EXECUTED 40004a84: 92 10 20 84 mov 0x84, %o1 <== NOT EXECUTED assert( level >= 0 ); 40004a88: 36 80 00 0b bge,a 40004ab4 40004a8c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40004a90: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40004a94: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40004a98: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40004a9c: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 40004aa0: 94 12 a3 d0 or %o2, 0x3d0, %o2 <== NOT EXECUTED 40004aa4: 96 12 e2 e8 or %o3, 0x2e8, %o3 <== NOT EXECUTED 40004aa8: 92 10 20 86 mov 0x86, %o1 <== NOT EXECUTED 40004aac: 40 00 01 e8 call 4000524c <__assert_func> <== NOT EXECUTED 40004ab0: 01 00 00 00 nop <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 40004ab4: 80 a0 60 01 cmp %g1, 1 40004ab8: 02 80 00 0a be 40004ae0 40004abc: 29 10 00 96 sethi %hi(0x40025800), %l4 40004ac0: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40004ac4: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 40004ac8: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 40004acc: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 40004ad0: 94 12 a3 d0 or %o2, 0x3d0, %o2 <== NOT EXECUTED 40004ad4: 96 12 e2 f8 or %o3, 0x2f8, %o3 <== NOT EXECUTED 40004ad8: 10 bf ff f5 b 40004aac <== NOT EXECUTED 40004adc: 92 10 20 88 mov 0x88, %o1 <== NOT EXECUTED the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40004ae0: 27 10 00 8f sethi %hi(0x40023c00), %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40004ae4: aa 06 20 54 add %i0, 0x54, %l5 40004ae8: a8 15 21 78 or %l4, 0x178, %l4 40004aec: a6 14 e3 20 or %l3, 0x320, %l3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004af0: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 40004af4: 10 80 00 14 b 40004b44 40004af8: a4 06 60 01 add %i1, 1, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40004afc: c2 05 00 00 ld [ %l4 ], %g1 40004b00: 90 10 00 13 mov %l3, %o0 40004b04: d2 00 60 08 ld [ %g1 + 8 ], %o1 40004b08: 40 00 39 1c call 40012f78 40004b0c: a2 04 60 01 inc %l1 !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++ ) 40004b10: 80 a4 40 19 cmp %l1, %i1 40004b14: 24 bf ff fb ble,a 40004b00 40004b18: c2 05 00 00 ld [ %l4 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40004b1c: 7f ff ff 71 call 400048e0 40004b20: 90 10 00 10 mov %l0, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40004b24: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004b28: 80 a0 60 01 cmp %g1, 1 40004b2c: 32 80 00 06 bne,a 40004b44 40004b30: e0 04 00 00 ld [ %l0 ], %l0 IMFS_dump_directory( the_jnode, level + 1 ); 40004b34: 90 10 00 10 mov %l0, %o0 40004b38: 7f ff ff c8 call 40004a58 40004b3c: 92 10 00 12 mov %l2, %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 ) { 40004b40: e0 04 00 00 ld [ %l0 ], %l0 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004b44: 80 a4 00 15 cmp %l0, %l5 40004b48: 12 bf ff ed bne 40004afc 40004b4c: a2 10 20 00 clr %l1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 40004b50: 81 c7 e0 08 ret 40004b54: 81 e8 00 00 restore 4000a17c : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a17c: 9d e3 bf 60 save %sp, -160, %sp case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000a180: 2b 10 00 6e sethi %hi(0x4001b800), %l5 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a184: a0 10 00 18 mov %i0, %l0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000a188: aa 15 60 f8 or %l5, 0xf8, %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000a18c: e2 06 c0 00 ld [ %i3 ], %l1 4000a190: ae 10 20 01 mov 1, %l7 4000a194: a4 10 20 00 clr %l2 * 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 ); 4000a198: a6 07 bf c0 add %fp, -64, %l3 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4000a19c: 10 80 00 6c b 4000a34c 4000a1a0: a8 07 bf fc add %fp, -4, %l4 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 4000a1a4: 90 04 00 12 add %l0, %l2, %o0 4000a1a8: 92 10 00 19 mov %i1, %o1 4000a1ac: 94 10 00 13 mov %l3, %o2 4000a1b0: 40 00 02 3f call 4000aaac 4000a1b4: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000a1b8: 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 ); 4000a1bc: ae 10 00 08 mov %o0, %l7 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000a1c0: 80 a0 60 00 cmp %g1, 0 4000a1c4: 02 80 00 5a be 4000a32c 4000a1c8: ec 07 bf fc ld [ %fp + -4 ], %l6 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000a1cc: 80 a2 20 00 cmp %o0, 0 4000a1d0: 02 80 00 0a be 4000a1f8 4000a1d4: b2 26 40 16 sub %i1, %l6, %i1 if ( node->type == IMFS_DIRECTORY ) 4000a1d8: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4000a1dc: 80 a0 a0 01 cmp %g2, 1 4000a1e0: 12 80 00 06 bne 4000a1f8 4000a1e4: 01 00 00 00 nop /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4000a1e8: c4 10 60 2e lduh [ %g1 + 0x2e ], %g2 4000a1ec: 80 88 a0 40 btst 0x40, %g2 4000a1f0: 02 80 00 84 be 4000a400 4000a1f4: 01 00 00 00 nop while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 4000a1f8: a4 04 80 16 add %l2, %l6, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000a1fc: 80 a5 e0 03 cmp %l7, 3 4000a200: 02 80 00 27 be 4000a29c 4000a204: a2 10 00 01 mov %g1, %l1 4000a208: 80 a5 e0 04 cmp %l7, 4 4000a20c: 02 80 00 4c be 4000a33c 4000a210: 80 a5 e0 02 cmp %l7, 2 4000a214: 12 80 00 4f bne 4000a350 4000a218: 80 a5 e0 04 cmp %l7, 4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000a21c: c4 05 40 00 ld [ %l5 ], %g2 4000a220: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 4000a224: 80 a0 40 02 cmp %g1, %g2 4000a228: 02 bf ff e0 be 4000a1a8 4000a22c: 90 04 00 12 add %l0, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 4000a230: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000a234: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 4000a238: 80 a0 40 02 cmp %g1, %g2 4000a23c: 32 80 00 11 bne,a 4000a280 4000a240: e2 00 60 08 ld [ %g1 + 8 ], %l1 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4000a244: 92 02 60 08 add %o1, 8, %o1 4000a248: a2 07 bf e8 add %fp, -24, %l1 4000a24c: 94 10 20 14 mov 0x14, %o2 4000a250: 40 00 12 00 call 4000ea50 4000a254: 90 10 00 11 mov %l1, %o0 *pathloc = newloc; 4000a258: 92 10 00 11 mov %l1, %o1 4000a25c: 90 10 00 1b mov %i3, %o0 4000a260: 40 00 11 fc call 4000ea50 4000a264: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4000a268: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 4000a26c: a4 24 80 16 sub %l2, %l6, %l2 4000a270: 92 06 40 16 add %i1, %l6, %o1 4000a274: c2 00 40 00 ld [ %g1 ], %g1 4000a278: 10 80 00 51 b 4000a3bc 4000a27c: 90 04 00 12 add %l0, %l2, %o0 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4000a280: 80 a4 60 00 cmp %l1, 0 4000a284: 32 bf ff c8 bne,a 4000a1a4 4000a288: e2 26 c0 00 st %l1, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a28c: 40 00 0f b6 call 4000e164 <__errno> 4000a290: 01 00 00 00 nop 4000a294: 10 80 00 5f b 4000a410 4000a298: ee 22 00 00 st %l7, [ %o0 ] case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4000a29c: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000a2a0: 80 a0 60 03 cmp %g1, 3 4000a2a4: 12 80 00 0a bne 4000a2cc 4000a2a8: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 4000a2ac: 90 10 00 1b mov %i3, %o0 4000a2b0: 7f ff ff 60 call 4000a030 4000a2b4: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000a2b8: e2 06 c0 00 ld [ %i3 ], %l1 if ( !node ) 4000a2bc: 80 a4 60 00 cmp %l1, 0 4000a2c0: 32 80 00 0c bne,a 4000a2f0 4000a2c4: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a2c8: 30 80 00 0d b,a 4000a2fc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4000a2cc: 32 80 00 09 bne,a 4000a2f0 4000a2d0: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 4000a2d4: 90 10 00 1b mov %i3, %o0 4000a2d8: 7f ff ff 70 call 4000a098 4000a2dc: 92 10 20 00 clr %o1 node = pathloc->node_access; if ( result == -1 ) 4000a2e0: 80 a2 3f ff cmp %o0, -1 4000a2e4: 02 80 00 44 be 4000a3f4 4000a2e8: e2 06 c0 00 ld [ %i3 ], %l1 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000a2ec: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a2f0: 80 a0 60 01 cmp %g1, 1 4000a2f4: 22 80 00 06 be,a 4000a30c 4000a2f8: d2 04 60 5c ld [ %l1 + 0x5c ], %o1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000a2fc: 40 00 0f 9a call 4000e164 <__errno> 4000a300: 01 00 00 00 nop 4000a304: 10 80 00 42 b 4000a40c 4000a308: 82 10 20 14 mov 0x14, %g1 ! 14 /* * 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 ) { 4000a30c: 80 a2 60 00 cmp %o1, 0 4000a310: 12 80 00 1c bne 4000a380 4000a314: 90 10 00 11 mov %l1, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000a318: 40 00 01 ba call 4000aa00 4000a31c: 92 10 00 13 mov %l3, %o1 if ( !node ) 4000a320: a2 92 20 00 orcc %o0, 0, %l1 4000a324: 32 bf ff a0 bne,a 4000a1a4 4000a328: e2 26 c0 00 st %l1, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a32c: 40 00 0f 8e call 4000e164 <__errno> 4000a330: 01 00 00 00 nop 4000a334: 10 80 00 36 b 4000a40c 4000a338: 82 10 20 02 mov 2, %g1 ! 2 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000a33c: 40 00 0f 8a call 4000e164 <__errno> 4000a340: 01 00 00 00 nop 4000a344: 10 80 00 32 b 4000a40c 4000a348: 82 10 20 5b mov 0x5b, %g1 ! 5b /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4000a34c: 80 a5 e0 04 cmp %l7, 4 4000a350: 02 80 00 04 be 4000a360 4000a354: 80 a5 e0 00 cmp %l7, 0 4000a358: 12 bf ff 94 bne 4000a1a8 4000a35c: 90 04 00 12 add %l0, %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 ) { 4000a360: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a364: 80 a0 60 01 cmp %g1, 1 4000a368: 12 80 00 1a bne 4000a3d0 4000a36c: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 4000a370: d2 04 60 5c ld [ %l1 + 0x5c ], %o1 4000a374: 80 a2 60 00 cmp %o1, 0 4000a378: 02 80 00 16 be 4000a3d0 4000a37c: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 4000a380: 92 02 60 1c add %o1, 0x1c, %o1 4000a384: a2 07 bf e8 add %fp, -24, %l1 4000a388: 94 10 20 14 mov 0x14, %o2 4000a38c: 40 00 11 b1 call 4000ea50 4000a390: 90 10 00 11 mov %l1, %o0 *pathloc = newloc; 4000a394: 92 10 00 11 mov %l1, %o1 4000a398: 90 10 00 1b mov %i3, %o0 4000a39c: 40 00 11 ad call 4000ea50 4000a3a0: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000a3a4: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 4000a3a8: d0 07 bf fc ld [ %fp + -4 ], %o0 4000a3ac: c2 00 40 00 ld [ %g1 ], %g1 4000a3b0: 92 06 40 08 add %i1, %o0, %o1 4000a3b4: 90 24 80 08 sub %l2, %o0, %o0 4000a3b8: 90 04 00 08 add %l0, %o0, %o0 4000a3bc: 94 10 00 1a mov %i2, %o2 4000a3c0: 9f c0 40 00 call %g1 4000a3c4: 96 10 00 1b mov %i3, %o3 4000a3c8: 81 c7 e0 08 ret 4000a3cc: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000a3d0: 7f ff fe f5 call 40009fa4 4000a3d4: 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; 4000a3d8: c2 06 c0 00 ld [ %i3 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4000a3dc: 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; 4000a3e0: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 4000a3e4: 82 0e 80 01 and %i2, %g1, %g1 4000a3e8: 80 a0 40 1a cmp %g1, %i2 4000a3ec: 12 80 00 05 bne 4000a400 4000a3f0: 01 00 00 00 nop if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000a3f4: b0 10 00 08 mov %o0, %i0 4000a3f8: 81 c7 e0 08 ret 4000a3fc: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000a400: 40 00 0f 59 call 4000e164 <__errno> 4000a404: 01 00 00 00 nop 4000a408: 82 10 20 0d mov 0xd, %g1 ! d 4000a40c: c2 22 00 00 st %g1, [ %o0 ] 4000a410: 10 bf ff f9 b 4000a3f4 4000a414: 90 10 3f ff mov -1, %o0 4000a030 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a030: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 4000a034: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000a038: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000a03c: 80 a0 a0 03 cmp %g2, 3 4000a040: 22 80 00 04 be,a 4000a050 4000a044: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 rtems_fatal_error_occurred (0xABCD0000); 4000a048: 7f ff f2 d1 call 40006b8c <== NOT EXECUTED 4000a04c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; IMFS_Set_handlers( node ); 4000a050: 90 10 00 18 mov %i0, %o0 4000a054: 7f ff ff d4 call 40009fa4 4000a058: 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; 4000a05c: c2 06 00 00 ld [ %i0 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4000a060: 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; 4000a064: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 4000a068: 82 0e 40 01 and %i1, %g1, %g1 4000a06c: 80 a0 40 19 cmp %g1, %i1 4000a070: 12 80 00 04 bne 4000a080 4000a074: 01 00 00 00 nop if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000a078: 81 c7 e0 08 ret 4000a07c: 91 e8 20 00 restore %g0, 0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000a080: 40 00 10 39 call 4000e164 <__errno> <== NOT EXECUTED 4000a084: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a088: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000a08c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a090: 81 c7 e0 08 ret <== NOT EXECUTED 4000a094: 81 e8 00 00 restore <== NOT EXECUTED 4000a014 : */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4000a014: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000a018: 93 2a 60 06 sll %o1, 6, %o1 <== NOT EXECUTED 4000a01c: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 <== NOT EXECUTED 4000a020: 82 2a 40 01 andn %o1, %g1, %g1 <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4000a024: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4000a028: 81 c3 e0 08 retl <== NOT EXECUTED 4000a02c: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 4000a098 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a098: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 4000a09c: e2 06 00 00 ld [ %i0 ], %l1 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a0a0: a0 10 00 18 mov %i0, %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000a0a4: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a0a8: 80 a0 60 04 cmp %g1, 4 4000a0ac: 12 80 00 07 bne 4000a0c8 4000a0b0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4000a0b4: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000a0b8: 80 a0 60 00 cmp %g1, 0 4000a0bc: 32 80 00 05 bne,a 4000a0d0 4000a0c0: c2 26 00 00 st %g1, [ %i0 ] rtems_fatal_error_occurred( 0xBAD00000 ); 4000a0c4: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 4000a0c8: 7f ff f2 b1 call 40006b8c <== NOT EXECUTED 4000a0cc: 01 00 00 00 nop <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 4000a0d0: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 4000a0d4: c2 48 40 00 ldsb [ %g1 ], %g1 4000a0d8: 80 a0 60 5c cmp %g1, 0x5c 4000a0dc: 02 80 00 06 be 4000a0f4 4000a0e0: 80 a0 60 2f cmp %g1, 0x2f 4000a0e4: 02 80 00 04 be 4000a0f4 4000a0e8: 80 a0 60 00 cmp %g1, 0 4000a0ec: 12 80 00 09 bne 4000a110 4000a0f0: 82 10 20 00 clr %g1 4000a0f4: 03 10 00 6e sethi %hi(0x4001b800), %g1 4000a0f8: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 4001b8f8 4000a0fc: 90 10 00 10 mov %l0, %o0 4000a100: 92 02 60 18 add %o1, 0x18, %o1 4000a104: 40 00 12 53 call 4000ea50 4000a108: 94 10 20 14 mov 0x14, %o2 4000a10c: 82 10 20 01 mov 1, %g1 * 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] ), 4000a110: e2 04 60 50 ld [ %l1 + 0x50 ], %l1 4000a114: a2 04 40 01 add %l1, %g1, %l1 4000a118: 40 00 13 ca call 4000f040 4000a11c: 90 10 00 11 mov %l1, %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000a120: 94 10 00 19 mov %i1, %o2 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 4000a124: 92 10 00 08 mov %o0, %o1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000a128: 96 10 00 10 mov %l0, %o3 4000a12c: 40 00 00 14 call 4000a17c 4000a130: 90 10 00 11 mov %l1, %o0 4000a134: b0 10 00 08 mov %o0, %i0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 4000a138: 7f ff ff 9b call 40009fa4 4000a13c: 90 10 00 10 mov %l0, %o0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 4000a140: c2 04 00 00 ld [ %l0 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4000a144: 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; 4000a148: c2 10 60 2e lduh [ %g1 + 0x2e ], %g1 4000a14c: 82 0e 40 01 and %i1, %g1, %g1 4000a150: 80 a0 40 19 cmp %g1, %i1 4000a154: 12 80 00 04 bne 4000a164 4000a158: 01 00 00 00 nop if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000a15c: 81 c7 e0 08 ret 4000a160: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000a164: 40 00 10 00 call 4000e164 <__errno> <== NOT EXECUTED 4000a168: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a16c: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000a170: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a174: 81 c7 e0 08 ret <== NOT EXECUTED 4000a178: 81 e8 00 00 restore <== NOT EXECUTED 4000a944 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000a944: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a948: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000a94c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000a950: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000a954: 40 00 08 eb call 4000cd00 <== NOT EXECUTED 4000a958: 90 04 20 50 add %l0, 0x50, %o0 <== NOT EXECUTED if (! err) { 4000a95c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a960: 12 80 00 12 bne 4000a9a8 <== NOT EXECUTED 4000a964: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 4000a968: c2 04 60 18 ld [ %l1 + 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) 4000a96c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 4000a970: 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) 4000a974: 40 00 02 36 call 4000b24c <== NOT EXECUTED 4000a978: c2 24 60 18 st %g1, [ %l1 + 0x18 ] <== NOT EXECUTED 4000a97c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a980: 12 80 00 10 bne 4000a9c0 <== NOT EXECUTED 4000a984: 01 00 00 00 nop <== NOT EXECUTED 4000a988: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 4000a98c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a990: 12 80 00 0c bne 4000a9c0 <== NOT EXECUTED 4000a994: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 4000a998: 40 00 01 90 call 4000afd8 <== NOT EXECUTED 4000a99c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000a9a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a9a4: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000a9a8: 16 80 00 06 bge 4000a9c0 <== NOT EXECUTED 4000a9ac: 01 00 00 00 nop <== NOT EXECUTED 4000a9b0: 40 00 0d ed call 4000e164 <__errno> <== NOT EXECUTED 4000a9b4: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a9b8: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000a9bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 4000a9c0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a9c4: 81 e8 00 00 restore <== NOT EXECUTED 4000a7f4 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000a7f4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 4000a7f8: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000a7fc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED int err; if (command == FIONBIO) { 4000a800: 82 10 62 7e or %g1, 0x27e, %g1 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000a804: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED int err; if (command == FIONBIO) { 4000a808: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000a80c: 12 80 00 0f bne 4000a848 <== NOT EXECUTED 4000a810: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (buffer == NULL) 4000a814: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000a818: 02 80 00 12 be 4000a860 <== NOT EXECUTED 4000a81c: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 4000a820: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 4000a824: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000a828: 02 80 00 04 be 4000a838 <== NOT EXECUTED 4000a82c: c2 02 e0 18 ld [ %o3 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 4000a830: 10 80 00 03 b 4000a83c <== NOT EXECUTED 4000a834: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000a838: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000a83c: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000a840: 81 c7 e0 08 ret <== NOT EXECUTED 4000a844: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 4000a848: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 4000a84c: 40 00 08 31 call 4000c910 <== NOT EXECUTED 4000a850: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a854: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a858: 16 80 00 06 bge 4000a870 <== NOT EXECUTED 4000a85c: 01 00 00 00 nop <== NOT EXECUTED 4000a860: 40 00 0e 41 call 4000e164 <__errno> <== NOT EXECUTED 4000a864: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a868: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000a86c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 4000a870: 81 c7 e0 08 ret <== NOT EXECUTED 4000a874: 81 e8 00 00 restore <== NOT EXECUTED 4000a79c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4000a79c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000a7a0: 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 ) { 4000a7a4: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000a7a8: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000a7ac: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 4000a7b0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a7b4: 40 00 08 3a call 4000c89c <== NOT EXECUTED 4000a7b8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000a7bc: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 4000a7c0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a7c4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000a7c8: 16 80 00 08 bge 4000a7e8 <== NOT EXECUTED 4000a7cc: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED 4000a7d0: 40 00 0e 65 call 4000e164 <__errno> <== NOT EXECUTED 4000a7d4: a0 20 00 10 neg %l0 <== NOT EXECUTED 4000a7d8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 4000a7dc: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 4000a7e0: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 4000a7e4: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED } 4000a7e8: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 4000a7ec: 81 c7 e0 08 ret <== NOT EXECUTED 4000a7f0: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED 4000a8e0 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000a8e0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a8e4: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000a8e8: 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); 4000a8ec: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000a8f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a8f4: 40 00 08 90 call 4000cb34 <== NOT EXECUTED 4000a8f8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 4000a8fc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a900: 04 80 00 08 ble 4000a920 <== NOT EXECUTED 4000a904: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 4000a908: 40 00 02 19 call 4000b16c <== NOT EXECUTED 4000a90c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a910: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000a914: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED 4000a918: 81 c7 e0 08 ret <== NOT EXECUTED 4000a91c: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a920: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000a924: 02 80 00 06 be 4000a93c <== NOT EXECUTED 4000a928: 01 00 00 00 nop <== NOT EXECUTED 4000a92c: 40 00 0e 0e call 4000e164 <__errno> <== NOT EXECUTED 4000a930: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a934: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000a938: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 4000a93c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a940: 81 e8 00 00 restore <== NOT EXECUTED 4000a878 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000a878: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a87c: 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 ) { 4000a880: 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); 4000a884: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000a888: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a88c: 40 00 08 3a call 4000c974 <== NOT EXECUTED 4000a890: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 4000a894: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a898: 04 80 00 09 ble 4000a8bc <== NOT EXECUTED 4000a89c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 4000a8a0: 40 00 02 33 call 4000b16c <== NOT EXECUTED 4000a8a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a8a8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000a8ac: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4000a8b0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 4000a8b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a8b8: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000a8bc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000a8c0: 02 80 00 06 be 4000a8d8 <== NOT EXECUTED 4000a8c4: 01 00 00 00 nop <== NOT EXECUTED 4000a8c8: 40 00 0e 27 call 4000e164 <__errno> <== NOT EXECUTED 4000a8cc: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a8d0: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000a8d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 4000a8d8: 81 c7 e0 08 ret <== NOT EXECUTED 4000a8dc: 81 e8 00 00 restore <== NOT EXECUTED 4000aa00 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000aa00: 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 ); 4000aa04: 80 a6 20 00 cmp %i0, 0 4000aa08: 12 80 00 0a bne 4000aa30 4000aa0c: 80 a6 60 00 cmp %i1, 0 4000aa10: 11 10 00 6b sethi %hi(0x4001ac00), %o0 <== NOT EXECUTED 4000aa14: 15 10 00 6b sethi %hi(0x4001ac00), %o2 <== NOT EXECUTED 4000aa18: 17 10 00 6b sethi %hi(0x4001ac00), %o3 <== NOT EXECUTED 4000aa1c: 90 12 21 40 or %o0, 0x140, %o0 <== NOT EXECUTED 4000aa20: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 4000aa24: 96 12 e1 90 or %o3, 0x190, %o3 <== NOT EXECUTED 4000aa28: 7f ff e0 d8 call 40002d88 <__assert_func> <== NOT EXECUTED 4000aa2c: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 4000aa30: 02 80 00 1c be 4000aaa0 4000aa34: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000aa38: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000aa3c: 40 00 11 30 call 4000eefc 4000aa40: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 4001ada0 4000aa44: 80 a2 20 00 cmp %o0, 0 4000aa48: 02 80 00 09 be 4000aa6c 4000aa4c: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000aa50: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000aa54: 40 00 11 2a call 4000eefc 4000aa58: 92 12 61 a8 or %o1, 0x1a8, %o1 ! 4001ada8 4000aa5c: 80 a2 20 00 cmp %o0, 0 4000aa60: 12 80 00 05 bne 4000aa74 4000aa64: a0 06 20 54 add %i0, 0x54, %l0 return directory->Parent; 4000aa68: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000aa6c: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa70: 81 e8 00 00 restore <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 4000aa74: 10 80 00 08 b 4000aa94 4000aa78: f0 06 20 50 ld [ %i0 + 0x50 ], %i0 !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 ) ) 4000aa7c: 40 00 11 20 call 4000eefc 4000aa80: 92 06 20 0c add %i0, 0xc, %o1 4000aa84: 80 a2 20 00 cmp %o0, 0 4000aa88: 02 80 00 07 be 4000aaa4 4000aa8c: 01 00 00 00 nop the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 4000aa90: f0 06 00 00 ld [ %i0 ], %i0 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 4000aa94: 80 a6 00 10 cmp %i0, %l0 4000aa98: 12 bf ff f9 bne 4000aa7c 4000aa9c: 90 10 00 19 mov %i1, %o0 4000aaa0: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000aaa4: 81 c7 e0 08 ret 4000aaa8: 81 e8 00 00 restore 40010248 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40010248: 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; 4001024c: 94 10 20 14 mov 0x14, %o2 40010250: 90 07 bf ec add %fp, -20, %o0 /* * 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; 40010254: e0 06 20 1c ld [ %i0 + 0x1c ], %l0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40010258: a2 10 00 08 mov %o0, %l1 * 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; 4001025c: 40 00 10 e3 call 400145e8 40010260: 92 06 20 1c add %i0, 0x1c, %o1 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 40010264: c0 26 20 1c clr [ %i0 + 0x1c ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 40010268: e0 27 bf ec st %l0, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4001026c: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40010270: 7f ff fd 5d call 4000f7e4 40010274: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 40010278: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 4001027c: 80 a0 a0 01 cmp %g2, 1 40010280: 12 80 00 06 bne 40010298 40010284: 82 04 20 54 add %l0, 0x54, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40010288: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 4001028c: 80 a0 80 01 cmp %g2, %g1 40010290: 12 80 00 09 bne 400102b4 40010294: 80 a4 20 00 cmp %l0, 0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 40010298: 90 10 20 00 clr %o0 4001029c: 7f ff cf d7 call 400041f8 400102a0: 92 10 00 11 mov %l1, %o1 if (result != 0) 400102a4: 80 a2 20 00 cmp %o0, 0 400102a8: 12 80 00 13 bne 400102f4 400102ac: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 400102b0: 80 a4 20 00 cmp %l0, 0 400102b4: 22 80 00 11 be,a 400102f8 400102b8: b0 10 20 00 clr %i0 if ( jnode->type == IMFS_DIRECTORY ) { 400102bc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400102c0: 80 a0 60 01 cmp %g1, 1 400102c4: 32 bf ff ea bne,a 4001026c 400102c8: e0 27 bf ec st %l0, [ %fp + -20 ] <== NOT EXECUTED 400102cc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400102d0: 84 04 20 54 add %l0, 0x54, %g2 400102d4: 80 a0 40 02 cmp %g1, %g2 400102d8: 22 bf ff e5 be,a 4001026c 400102dc: e0 27 bf ec st %l0, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 400102e0: a0 90 60 00 orcc %g1, 0, %l0 400102e4: 32 bf ff e2 bne,a 4001026c 400102e8: e0 27 bf ec st %l0, [ %fp + -20 ] 400102ec: 81 c7 e0 08 ret <== NOT EXECUTED 400102f0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400102f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return 0; } 400102f8: 81 c7 e0 08 ret 400102fc: 81 e8 00 00 restore 4000aba0 : 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 ) { 4000aba0: 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, 4000aba4: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000aba8: c2 00 63 e8 ld [ %g1 + 0x3e8 ], %g1 ! 4001b7e8 4000abac: 86 10 20 00 clr %g3 4000abb0: 84 10 20 10 mov 0x10, %g2 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4000abb4: 80 a0 80 01 cmp %g2, %g1 4000abb8: 02 80 00 06 be 4000abd0 4000abbc: 86 00 e0 01 inc %g3 4000abc0: 80 a0 e0 06 cmp %g3, 6 4000abc4: 12 bf ff fc bne 4000abb4 4000abc8: 85 28 a0 01 sll %g2, 1, %g2 4000abcc: 84 10 20 80 mov 0x80, %g2 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4000abd0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 4000abd4: 40 00 09 99 call 4000d238 4000abd8: c4 20 63 40 st %g2, [ %g1 + 0x340 ] ! 4001bf40 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; 4000abdc: 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(); 4000abe0: 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; 4000abe4: 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; 4000abe8: 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; 4000abec: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000abf0: 90 06 20 38 add %i0, 0x38, %o0 4000abf4: 40 00 0f 97 call 4000ea50 4000abf8: 92 12 63 68 or %o1, 0x368, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000abfc: 90 10 20 01 mov 1, %o0 4000ac00: 40 00 00 b0 call 4000aec0 4000ac04: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ) { 4000ac08: 82 92 20 00 orcc %o0, 0, %g1 4000ac0c: 12 80 00 0a bne 4000ac34 4000ac10: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 free(temp_mt_entry->mt_fs_root.node_access); 4000ac14: 40 00 00 f1 call 4000afd8 <== NOT EXECUTED 4000ac18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000ac1c: 40 00 0d 52 call 4000e164 <__errno> <== NOT EXECUTED 4000ac20: 01 00 00 00 nop <== NOT EXECUTED 4000ac24: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000ac28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ac2c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ac30: 81 e8 00 00 restore <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000ac34: 84 10 20 01 mov 1, %g2 4000ac38: c4 20 40 00 st %g2, [ %g1 ] 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; 4000ac3c: c2 26 20 34 st %g1, [ %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; 4000ac40: f6 20 60 08 st %i3, [ %g1 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000ac44: c4 22 20 34 st %g2, [ %o0 + 0x34 ] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 4000ac48: f4 20 60 04 st %i2, [ %g1 + 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(); 4000ac4c: 40 00 07 16 call 4000c8a4 4000ac50: b0 10 20 00 clr %i0 return 0; } 4000ac54: 81 c7 e0 08 ret 4000ac58: 81 e8 00 00 restore 40003ecc : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40003ecc: 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; 40003ed0: c2 06 00 00 ld [ %i0 ], %g1 40003ed4: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40003ed8: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 40003edc: 80 a0 60 07 cmp %g1, 7 40003ee0: 08 80 00 06 bleu 40003ef8 40003ee4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMLINK ); 40003ee8: 40 00 3f 85 call 40013cfc <__errno> 40003eec: 01 00 00 00 nop 40003ef0: 10 80 00 17 b 40003f4c 40003ef4: 82 10 20 1f mov 0x1f, %g1 ! 1f /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 40003ef8: 40 00 43 1f call 40014b74 40003efc: 90 10 00 1a mov %i2, %o0 40003f00: a0 07 bf b0 add %fp, -80, %l0 40003f04: 92 10 00 08 mov %o0, %o1 40003f08: 96 07 bf fc add %fp, -4, %o3 40003f0c: 94 10 00 10 mov %l0, %o2 40003f10: 40 00 31 27 call 400103ac 40003f14: 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( 40003f18: 90 10 00 19 mov %i1, %o0 40003f1c: 94 10 00 10 mov %l0, %o2 40003f20: 92 10 20 03 mov 3, %o1 40003f24: 17 00 00 28 sethi %hi(0xa000), %o3 40003f28: 98 07 bf d8 add %fp, -40, %o4 40003f2c: 40 00 2d e1 call 4000f6b0 40003f30: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40003f34: 80 a2 20 00 cmp %o0, 0 40003f38: 12 80 00 08 bne 40003f58 40003f3c: c2 07 bf d8 ld [ %fp + -40 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40003f40: 40 00 3f 6f call 40013cfc <__errno> <== NOT EXECUTED 40003f44: 01 00 00 00 nop <== NOT EXECUTED 40003f48: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40003f4c: c2 22 00 00 st %g1, [ %o0 ] 40003f50: 81 c7 e0 08 ret 40003f54: 91 e8 3f ff restore %g0, -1, %o0 /* * 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 ); 40003f58: 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++; 40003f5c: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 40003f60: 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++; 40003f64: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 40003f68: 40 00 02 66 call 40004900 40003f6c: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] 40003f70: c4 07 bf f4 ld [ %fp + -12 ], %g2 40003f74: c2 07 bf d8 ld [ %fp + -40 ], %g1 40003f78: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40003f7c: 81 c7 e0 08 ret 40003f80: 91 e8 20 00 restore %g0, 0, %o0 400127a4 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 400127a4: 9d e3 bf a0 save %sp, -96, %sp 400127a8: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 400127ac: 80 a6 20 00 cmp %i0, 0 400127b0: 12 80 00 0a bne 400127d8 400127b4: 92 10 00 19 mov %i1, %o1 400127b8: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 400127bc: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 400127c0: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 400127c4: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 400127c8: 94 12 a2 f0 or %o2, 0x2f0, %o2 <== NOT EXECUTED 400127cc: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 400127d0: 10 80 00 0c b 40012800 <== NOT EXECUTED 400127d4: 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 ); 400127d8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400127dc: 80 a0 60 05 cmp %g1, 5 400127e0: 02 80 00 0a be 40012808 400127e4: 15 10 00 84 sethi %hi(0x40021000), %o2 400127e8: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 400127ec: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 400127f0: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 400127f4: 94 12 a2 f0 or %o2, 0x2f0, %o2 <== NOT EXECUTED 400127f8: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 400127fc: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 40012800: 7f ff c7 20 call 40004480 <__assert_func> <== NOT EXECUTED 40012804: 01 00 00 00 nop <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 40012808: 7f ff fe 6c call 400121b8 4001280c: 94 10 20 01 mov 1, %o2 ! 1 if ( *block_entry_ptr ) 40012810: 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 ); 40012814: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 40012818: 80 a0 60 00 cmp %g1, 0 4001281c: 12 80 00 09 bne 40012840 40012820: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 40012824: 7f ff fe 58 call 40012184 40012828: b0 10 20 01 mov 1, %i0 if ( !memory ) 4001282c: 80 a2 20 00 cmp %o0, 0 40012830: 02 80 00 04 be 40012840 40012834: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 40012838: d0 24 00 00 st %o0, [ %l0 ] 4001283c: b0 10 20 00 clr %i0 return 0; } 40012840: 81 c7 e0 08 ret 40012844: 81 e8 00 00 restore 40012848 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40012848: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001284c: 80 a6 20 00 cmp %i0, 0 40012850: 32 80 00 0a bne,a 40012878 40012854: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012858: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 4001285c: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012860: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012864: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012868: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 4001286c: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 40012870: 10 80 00 0c b 400128a0 <== NOT EXECUTED 40012874: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012878: 80 a0 60 05 cmp %g1, 5 4001287c: 02 80 00 0b be 400128a8 40012880: 03 10 00 88 sethi %hi(0x40022000), %g1 40012884: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012888: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 4001288c: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012890: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012894: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 40012898: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 4001289c: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 400128a0: 7f ff c6 f8 call 40004480 <__assert_func> <== NOT EXECUTED 400128a4: 01 00 00 00 nop <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 400128a8: e0 00 61 88 ld [ %g1 + 0x188 ], %l0 400128ac: a3 34 20 02 srl %l0, 2, %l1 400128b0: 92 10 00 11 mov %l1, %o1 400128b4: 40 00 2a 50 call 4001d1f4 <.umul> 400128b8: 90 04 60 01 add %l1, 1, %o0 400128bc: 92 10 00 11 mov %l1, %o1 400128c0: 40 00 2a 4d call 4001d1f4 <.umul> 400128c4: 90 02 20 01 inc %o0 400128c8: 92 10 00 10 mov %l0, %o1 400128cc: 40 00 2a 4a call 4001d1f4 <.umul> 400128d0: 90 02 3f ff add %o0, -1, %o0 400128d4: 82 10 20 00 clr %g1 400128d8: 80 a0 40 19 cmp %g1, %i1 400128dc: 34 80 00 0b bg,a 40012908 400128e0: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 <== NOT EXECUTED 400128e4: 80 a0 40 19 cmp %g1, %i1 400128e8: 12 80 00 04 bne 400128f8 400128ec: 80 a2 00 1a cmp %o0, %i2 400128f0: 38 80 00 06 bgu,a 40012908 400128f4: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 400128f8: 40 00 05 01 call 40013cfc <__errno> <== NOT EXECUTED 400128fc: 01 00 00 00 nop <== NOT EXECUTED 40012900: 10 80 00 2b b 400129ac <== NOT EXECUTED 40012904: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 40012908: 80 a6 40 11 cmp %i1, %l1 4001290c: 14 80 00 09 bg 40012930 40012910: e6 06 20 54 ld [ %i0 + 0x54 ], %l3 40012914: 80 a6 40 11 cmp %i1, %l1 40012918: 12 80 00 04 bne 40012928 4001291c: 80 a6 80 13 cmp %i2, %l3 40012920: 18 80 00 05 bgu 40012934 40012924: a5 3c 20 1f sra %l0, 0x1f, %l2 40012928: 81 c7 e0 08 ret 4001292c: 91 e8 20 00 restore %g0, 0, %o0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012930: a5 3c 20 1f sra %l0, 0x1f, %l2 <== NOT EXECUTED 40012934: 96 10 00 10 mov %l0, %o3 40012938: 94 10 00 12 mov %l2, %o2 4001293c: 90 10 00 19 mov %i1, %o0 40012940: 40 00 2b f2 call 4001d908 <__divdi3> 40012944: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012948: 90 10 00 11 mov %l1, %o0 4001294c: 96 10 00 10 mov %l0, %o3 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012950: a8 10 00 09 mov %o1, %l4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012954: 94 10 00 12 mov %l2, %o2 40012958: 40 00 2b ec call 4001d908 <__divdi3> 4001295c: 92 10 00 13 mov %l3, %o1 40012960: a2 10 00 09 mov %o1, %l1 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 40012964: 10 80 00 15 b 400129b8 40012968: a0 10 00 09 mov %o1, %l0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4001296c: 7f ff ff 8e call 400127a4 40012970: 92 10 00 10 mov %l0, %o1 40012974: 80 a2 20 00 cmp %o0, 0 40012978: 22 80 00 10 be,a 400129b8 4001297c: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 40012980: 10 80 00 06 b 40012998 <== NOT EXECUTED 40012984: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 40012988: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001298c: 7f ff fe d7 call 400124e8 <== NOT EXECUTED 40012990: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 40012994: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 40012998: 1a bf ff fc bcc 40012988 <== NOT EXECUTED 4001299c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 400129a0: 40 00 04 d7 call 40013cfc <__errno> <== NOT EXECUTED 400129a4: 01 00 00 00 nop <== NOT EXECUTED 400129a8: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 400129ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400129b0: 81 c7 e0 08 ret <== NOT EXECUTED 400129b4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 400129b8: 80 a4 00 14 cmp %l0, %l4 400129bc: 08 bf ff ec bleu 4001296c 400129c0: 90 10 00 18 mov %i0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 400129c4: f4 26 20 54 st %i2, [ %i0 + 0x54 ] 400129c8: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 400129cc: 81 c7 e0 08 ret 400129d0: 91 e8 20 00 restore %g0, 0, %o0 400121b8 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 400121b8: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400121bc: 80 a6 20 00 cmp %i0, 0 400121c0: 32 80 00 0a bne,a 400121e8 400121c4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400121c8: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 400121cc: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 400121d0: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 400121d4: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 400121d8: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 400121dc: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 400121e0: 10 80 00 0c b 40012210 <== NOT EXECUTED 400121e4: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 400121e8: 80 a0 60 05 cmp %g1, 5 400121ec: 02 80 00 0b be 40012218 400121f0: 03 10 00 88 sethi %hi(0x40022000), %g1 400121f4: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 400121f8: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 400121fc: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012200: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012204: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 40012208: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 4001220c: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED 40012210: 7f ff c8 9c call 40004480 <__assert_func> <== NOT EXECUTED 40012214: 01 00 00 00 nop <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40012218: e0 00 61 88 ld [ %g1 + 0x188 ], %l0 4001221c: a1 34 20 02 srl %l0, 2, %l0 40012220: 82 04 3f ff add %l0, -1, %g1 40012224: 80 a6 40 01 cmp %i1, %g1 40012228: 18 80 00 16 bgu 40012280 4001222c: 90 04 20 01 add %l0, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40012230: 80 a6 a0 00 cmp %i2, 0 40012234: 02 80 00 0f be 40012270 40012238: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 4001223c: 80 a0 60 00 cmp %g1, 0 40012240: 32 80 00 09 bne,a 40012264 40012244: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 p = memfile_alloc_block(); 40012248: 7f ff ff cf call 40012184 4001224c: 01 00 00 00 nop if ( !p ) 40012250: 80 a2 20 00 cmp %o0, 0 40012254: 22 80 00 86 be,a 4001246c 40012258: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 4001225c: d0 26 20 58 st %o0, [ %i0 + 0x58 ] } return &info->indirect[ my_block ]; 40012260: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 40012264: b3 2e 60 02 sll %i1, 2, %i1 40012268: 81 c7 e0 08 ret 4001226c: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) return 0; return &info->indirect[ my_block ]; 40012270: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40012274: 80 a0 60 00 cmp %g1, 0 return 0; return &info->indirect[ my_block ]; 40012278: 10 80 00 32 b 40012340 4001227c: b0 00 40 19 add %g1, %i1, %i0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40012280: 40 00 2b dd call 4001d1f4 <.umul> <== NOT EXECUTED 40012284: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012288: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 4001228c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40012290: 18 80 00 30 bgu 40012350 <== NOT EXECUTED 40012294: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40012298: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001229c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400122a0: 40 00 2c bb call 4001d58c <.urem> <== NOT EXECUTED 400122a4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 400122a8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 400122ac: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 400122b0: 40 00 2c 0b call 4001d2dc <.udiv> <== NOT EXECUTED 400122b4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 400122b8: 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; 400122bc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 400122c0: 02 80 00 18 be 40012320 <== NOT EXECUTED 400122c4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 400122c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400122cc: 12 80 00 08 bne 400122ec <== NOT EXECUTED 400122d0: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED p = memfile_alloc_block(); 400122d4: 7f ff ff ac call 40012184 <== NOT EXECUTED 400122d8: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 400122dc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400122e0: 22 80 00 63 be,a 4001246c <== NOT EXECUTED 400122e4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 400122e8: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 400122ec: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 400122f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400122f4: 12 80 00 08 bne 40012314 <== NOT EXECUTED 400122f8: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 400122fc: 7f ff ff a2 call 40012184 <== NOT EXECUTED 40012300: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40012304: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012308: 22 80 00 59 be,a 4001246c <== NOT EXECUTED 4001230c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40012310: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 40012314: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012318: 81 c7 e0 08 ret <== NOT EXECUTED 4001231c: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED } if ( !p ) 40012320: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012324: 02 80 00 52 be 4001246c <== NOT EXECUTED 40012328: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4001232c: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 40012330: 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 ]; 40012334: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40012338: 80 a0 60 00 cmp %g1, 0 <== 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 ]; 4001233c: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40012340: 12 80 00 4b bne 4001246c 40012344: 01 00 00 00 nop p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40012348: 81 c7 e0 08 ret <== NOT EXECUTED 4001234c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 40012350: 90 02 20 01 inc %o0 <== NOT EXECUTED 40012354: 40 00 2b a8 call 4001d1f4 <.umul> <== NOT EXECUTED 40012358: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001235c: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40012360: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40012364: 18 80 00 41 bgu 40012468 <== NOT EXECUTED 40012368: b2 26 40 11 sub %i1, %l1, %i1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001236c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012370: 40 00 2c 87 call 4001d58c <.urem> <== NOT EXECUTED 40012374: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012378: 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; 4001237c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012380: 40 00 2b d7 call 4001d2dc <.udiv> <== NOT EXECUTED 40012384: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40012388: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001238c: 40 00 2b d4 call 4001d2dc <.udiv> <== NOT EXECUTED 40012390: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40012394: 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; 40012398: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 4001239c: 40 00 2c 7c call 4001d58c <.urem> <== NOT EXECUTED 400123a0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 400123a4: 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; 400123a8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 400123ac: 02 80 00 23 be 40012438 <== NOT EXECUTED 400123b0: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 400123b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400123b8: 12 80 00 08 bne 400123d8 <== NOT EXECUTED 400123bc: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED p = memfile_alloc_block(); 400123c0: 7f ff ff 71 call 40012184 <== NOT EXECUTED 400123c4: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 400123c8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400123cc: 22 80 00 28 be,a 4001246c <== NOT EXECUTED 400123d0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 400123d4: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 400123d8: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 400123dc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400123e0: 12 80 00 08 bne 40012400 <== NOT EXECUTED 400123e4: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED p1 = memfile_alloc_block(); 400123e8: 7f ff ff 67 call 40012184 <== NOT EXECUTED 400123ec: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 400123f0: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 400123f4: 02 80 00 1e be 4001246c <== NOT EXECUTED 400123f8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 400123fc: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 40012400: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40012404: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 40012408: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001240c: 12 80 00 08 bne 4001242c <== NOT EXECUTED 40012410: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40012414: 7f ff ff 5c call 40012184 <== NOT EXECUTED 40012418: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 4001241c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012420: 22 80 00 13 be,a 4001246c <== NOT EXECUTED 40012424: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40012428: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 4001242c: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 40012430: 81 c7 e0 08 ret <== NOT EXECUTED 40012434: 91 ea 00 12 restore %o0, %l2, %o0 <== NOT EXECUTED } if ( !p ) 40012438: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001243c: 02 80 00 0c be 4001246c <== NOT EXECUTED 40012440: 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 ]; 40012444: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012448: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 4001244c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012450: 02 80 00 07 be 4001246c <== NOT EXECUTED 40012454: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40012458: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 4001245c: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 40012460: 81 c7 e0 08 ret <== NOT EXECUTED 40012464: 91 ee 00 12 restore %i0, %l2, %o0 <== NOT EXECUTED 40012468: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4001246c: 81 c7 e0 08 ret 40012470: 81 e8 00 00 restore 40012e54 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40012e54: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012e58: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40012e5c: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 40012e60: 12 80 00 0a bne 40012e88 40012e64: a6 10 00 1a mov %i2, %l3 40012e68: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012e6c: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012e70: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012e74: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012e78: 94 12 a2 80 or %o2, 0x280, %o2 <== NOT EXECUTED 40012e7c: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 40012e80: 10 80 00 0e b 40012eb8 <== NOT EXECUTED 40012e84: 92 10 22 4c mov 0x24c, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 40012e88: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40012e8c: 84 00 7f fb add %g1, -5, %g2 40012e90: 80 a0 a0 01 cmp %g2, 1 40012e94: 08 80 00 0b bleu 40012ec0 40012e98: 80 a6 e0 00 cmp %i3, 0 40012e9c: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012ea0: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012ea4: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012ea8: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012eac: 94 12 a2 80 or %o2, 0x280, %o2 <== NOT EXECUTED 40012eb0: 96 12 e1 f0 or %o3, 0x1f0, %o3 <== NOT EXECUTED 40012eb4: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED 40012eb8: 7f ff c5 72 call 40004480 <__assert_func> <== NOT EXECUTED 40012ebc: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 40012ec0: 32 80 00 0a bne,a 40012ee8 40012ec4: 80 a7 20 00 cmp %i4, 0 40012ec8: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012ecc: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012ed0: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012ed4: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012ed8: 94 12 a2 80 or %o2, 0x280, %o2 <== NOT EXECUTED 40012edc: 96 12 e2 40 or %o3, 0x240, %o3 <== NOT EXECUTED 40012ee0: 10 bf ff f6 b 40012eb8 <== NOT EXECUTED 40012ee4: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 40012ee8: 12 80 00 08 bne 40012f08 40012eec: 80 a0 60 06 cmp %g1, 6 rtems_set_errno_and_return_minus_one( EINVAL ); 40012ef0: 40 00 03 83 call 40013cfc <__errno> <== NOT EXECUTED 40012ef4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012ef8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40012efc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012f00: 81 c7 e0 08 ret <== NOT EXECUTED 40012f04: 81 e8 00 00 restore <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 40012f08: 32 80 00 1d bne,a 40012f7c 40012f0c: c6 04 20 50 ld [ %l0 + 0x50 ], %g3 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 40012f10: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 40012f14: 82 10 20 00 clr %g1 <== NOT EXECUTED 40012f18: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 40012f1c: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 40012f20: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40012f24: 14 80 00 0a bg 40012f4c <== NOT EXECUTED 40012f28: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED 40012f2c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40012f30: 12 80 00 08 bne 40012f50 <== NOT EXECUTED 40012f34: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED 40012f38: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 40012f3c: 38 80 00 05 bgu,a 40012f50 <== NOT EXECUTED 40012f40: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 40012f44: 10 80 00 04 b 40012f54 <== NOT EXECUTED 40012f48: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; 40012f4c: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 40012f50: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40012f54: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40012f58: 40 00 05 a4 call 400145e8 <== NOT EXECUTED 40012f5c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40012f60: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40012f64: 7f ff c6 67 call 40004900 <== NOT EXECUTED 40012f68: 92 10 20 00 clr %o1 <== NOT EXECUTED 40012f6c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40012f70: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 40012f74: 81 c7 e0 08 ret <== NOT EXECUTED 40012f78: 81 e8 00 00 restore <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 40012f7c: 88 10 20 00 clr %g4 /* * 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; 40012f80: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 40012f84: 80 a1 00 03 cmp %g4, %g3 40012f88: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 40012f8c: 14 80 00 08 bg 40012fac 40012f90: 9a 07 00 1a add %i4, %i2, %o5 40012f94: 80 a1 00 03 cmp %g4, %g3 40012f98: 32 80 00 07 bne,a 40012fb4 40012f9c: 03 10 00 88 sethi %hi(0x40022000), %g1 <== NOT EXECUTED 40012fa0: 80 a3 40 02 cmp %o5, %g2 40012fa4: 28 80 00 04 bleu,a 40012fb4 40012fa8: 03 10 00 88 sethi %hi(0x40022000), %g1 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 40012fac: b8 20 80 01 sub %g2, %g1, %i4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40012fb0: 03 10 00 88 sethi %hi(0x40022000), %g1 40012fb4: e2 00 61 88 ld [ %g1 + 0x188 ], %l1 ! 40022188 40012fb8: 90 10 00 12 mov %l2, %o0 40012fbc: 92 10 00 13 mov %l3, %o1 40012fc0: ab 3c 60 1f sra %l1, 0x1f, %l5 40012fc4: 96 10 00 11 mov %l1, %o3 40012fc8: 40 00 2b 37 call 4001dca4 <__moddi3> 40012fcc: 94 10 00 15 mov %l5, %o2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012fd0: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40012fd4: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012fd8: 94 10 00 15 mov %l5, %o2 40012fdc: 92 10 00 13 mov %l3, %o1 40012fe0: 40 00 2a 4a call 4001d908 <__divdi3> 40012fe4: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40012fe8: 80 a5 20 00 cmp %l4, 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; 40012fec: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 40012ff0: a6 10 00 1b mov %i3, %l3 40012ff4: 02 80 00 1c be 40013064 40012ff8: ac 10 20 00 clr %l6 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 ); 40012ffc: 90 10 00 10 mov %l0, %o0 40013000: 7f ff fc 6e call 400121b8 40013004: 94 10 20 00 clr %o2 assert( block_ptr ); 40013008: 80 a2 20 00 cmp %o0, 0 4001300c: 32 80 00 0a bne,a 40013034 40013010: a2 24 40 14 sub %l1, %l4, %l1 40013014: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40013018: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 4001301c: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40013020: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013024: 94 12 a2 80 or %o2, 0x280, %o2 <== NOT EXECUTED 40013028: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 4001302c: 10 bf ff a3 b 40012eb8 <== NOT EXECUTED 40013030: 92 10 22 96 mov 0x296, %o1 <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 40013034: 80 a7 00 11 cmp %i4, %l1 40013038: 08 80 00 03 bleu 40013044 4001303c: 94 10 00 1c mov %i4, %o2 40013040: 94 10 00 11 mov %l1, %o2 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 ); 40013044: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 40013048: a6 06 c0 0a add %i3, %o2, %l3 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 ); 4001304c: 92 02 40 14 add %o1, %l4, %o1 dest += to_copy; block++; 40013050: a4 04 a0 01 inc %l2 my_length -= to_copy; 40013054: b8 27 00 0a sub %i4, %o2, %i4 40013058: ac 10 00 0a mov %o2, %l6 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 ); 4001305c: 40 00 05 63 call 400145e8 40013060: 90 10 00 1b mov %i3, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40013064: 03 10 00 88 sethi %hi(0x40022000), %g1 40013068: a2 10 20 00 clr %l1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001306c: b6 10 61 88 or %g1, 0x188, %i3 40013070: 10 80 00 17 b 400130cc 40013074: e8 00 61 88 ld [ %g1 + 0x188 ], %l4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013078: 90 10 00 10 mov %l0, %o0 4001307c: 92 10 00 12 mov %l2, %o1 40013080: 94 10 20 00 clr %o2 40013084: 7f ff fc 4d call 400121b8 40013088: a2 04 40 14 add %l1, %l4, %l1 assert( block_ptr ); 4001308c: 80 a2 20 00 cmp %o0, 0 40013090: 32 80 00 0a bne,a 400130b8 40013094: d2 02 00 00 ld [ %o0 ], %o1 40013098: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 4001309c: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 400130a0: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 400130a4: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 400130a8: 94 12 a2 80 or %o2, 0x280, %o2 <== NOT EXECUTED 400130ac: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 400130b0: 10 bf ff 82 b 40012eb8 <== NOT EXECUTED 400130b4: 92 10 22 a7 mov 0x2a7, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 400130b8: a4 04 a0 01 inc %l2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 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 ); 400130bc: 90 10 00 15 mov %l5, %o0 dest += to_copy; block++; my_length -= to_copy; 400130c0: b8 27 00 14 sub %i4, %l4, %i4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 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 ); 400130c4: 40 00 05 49 call 400145e8 400130c8: 94 10 00 14 mov %l4, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400130cc: c2 06 c0 00 ld [ %i3 ], %g1 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 400130d0: b0 04 40 16 add %l1, %l6, %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400130d4: 80 a7 00 01 cmp %i4, %g1 400130d8: 1a bf ff e8 bcc 40013078 400130dc: aa 04 c0 11 add %l3, %l1, %l5 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 400130e0: 80 a7 20 00 cmp %i4, 0 400130e4: 02 80 00 16 be 4001313c 400130e8: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400130ec: 92 10 00 12 mov %l2, %o1 400130f0: 90 10 00 10 mov %l0, %o0 400130f4: 7f ff fc 31 call 400121b8 400130f8: 94 10 20 00 clr %o2 assert( block_ptr ); 400130fc: 80 a2 20 00 cmp %o0, 0 40013100: 32 80 00 0a bne,a 40013128 40013104: d2 02 00 00 ld [ %o0 ], %o1 40013108: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 4001310c: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40013110: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40013114: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40013118: 94 12 a2 80 or %o2, 0x280, %o2 <== NOT EXECUTED 4001311c: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 40013120: 10 bf ff 66 b 40012eb8 <== NOT EXECUTED 40013124: 92 10 22 b9 mov 0x2b9, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 40013128: b0 07 00 18 add %i4, %i0, %i0 if ( 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)[ 0 ], my_length ); 4001312c: 90 10 00 15 mov %l5, %o0 40013130: 40 00 05 2e call 400145e8 40013134: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 40013138: 90 07 bf f8 add %fp, -8, %o0 4001313c: 7f ff c5 f1 call 40004900 40013140: 92 10 20 00 clr %o1 40013144: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013148: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return copied; } 4001314c: 81 c7 e0 08 ret 40013150: 81 e8 00 00 restore 4001253c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4001253c: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012540: 80 a6 20 00 cmp %i0, 0 40012544: 32 80 00 0a bne,a 4001256c 40012548: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001254c: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012550: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012554: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012558: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 4001255c: 94 12 a2 98 or %o2, 0x298, %o2 <== NOT EXECUTED 40012560: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 40012564: 10 80 00 0c b 40012594 <== NOT EXECUTED 40012568: 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 ); 4001256c: 80 a0 60 05 cmp %g1, 5 40012570: 02 80 00 0b be 4001259c 40012574: 03 10 00 88 sethi %hi(0x40022000), %g1 40012578: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 4001257c: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012580: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012584: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012588: 94 12 a2 98 or %o2, 0x298, %o2 <== NOT EXECUTED 4001258c: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 40012590: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 40012594: 7f ff c7 bb call 40004480 <__assert_func> <== NOT EXECUTED 40012598: 01 00 00 00 nop <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 4001259c: e0 00 61 88 ld [ %g1 + 0x188 ], %l0 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400125a0: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 400125a4: 80 a0 60 00 cmp %g1, 0 400125a8: 02 80 00 05 be 400125bc 400125ac: a1 34 20 02 srl %l0, 2, %l0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 400125b0: 90 06 20 58 add %i0, 0x58, %o0 400125b4: 7f ff ff b0 call 40012474 400125b8: 92 10 00 10 mov %l0, %o1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400125bc: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 400125c0: 80 a0 60 00 cmp %g1, 0 400125c4: 22 80 00 17 be,a 40012620 400125c8: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; iinfo.file; 400125d0: a2 10 20 00 clr %l1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 400125d8: a4 14 a1 88 or %l2, 0x188, %l2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 400125dc: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 400125e0: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 400125e4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400125e8: 02 80 00 04 be 400125f8 <== NOT EXECUTED 400125ec: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 400125f0: 7f ff ff a1 call 40012474 <== NOT EXECUTED 400125f4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 4001260c: d0 06 20 5c ld [ %i0 + 0x5c ], %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 ); 40012610: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 40012614: 7f ff ff 98 call 40012474 <== NOT EXECUTED 40012618: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4001261c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED 40012620: 80 a0 60 00 cmp %g1, 0 40012624: 02 80 00 25 be 400126b8 40012628: 29 10 00 88 sethi %hi(0x40022000), %l4 4001262c: a2 10 20 00 clr %l1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40012634: a8 15 21 88 or %l4, 0x188, %l4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40012638: ab 2c 60 02 sll %l1, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4001263c: e4 00 40 15 ld [ %g1 + %l5 ], %l2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40012640: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40012644: 02 80 00 1b be 400126b0 <== NOT EXECUTED 40012648: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 4001264c: 10 80 00 09 b 40012670 <== NOT EXECUTED 40012650: a6 10 20 00 clr %l3 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 4001265c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 40012660: 7f ff ff 85 call 40012474 <== NOT EXECUTED 40012664: 92 10 00 10 mov %l0, %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 40012680: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 40012684: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40012694: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 400126a8: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 400126ac: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 400126b0: 7f ff ff 71 call 40012474 <== NOT EXECUTED 400126b4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 400126b8: 81 c7 e0 08 ret 400126bc: 91 e8 20 00 restore %g0, 0, %o0 400124e8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 400124e8: 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 ); 400124ec: 94 10 20 00 clr %o2 <== NOT EXECUTED 400124f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400124f4: 7f ff ff 31 call 400121b8 <== NOT EXECUTED 400124f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 400124fc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40012500: 32 80 00 0a bne,a 40012528 <== NOT EXECUTED 40012504: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED 40012508: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 4001250c: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012510: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012514: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012518: 94 12 a2 d0 or %o2, 0x2d0, %o2 <== NOT EXECUTED 4001251c: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 40012520: 7f ff c7 d8 call 40004480 <__assert_func> <== NOT EXECUTED 40012524: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED *block_ptr = 0; memfile_free_block( ptr ); } return 1; } 40012528: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; memfile_free_block( ptr ); 4001252c: 7f ff ff 0d call 40012160 <== NOT EXECUTED 40012530: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } return 1; } 40012534: 81 c7 e0 08 ret <== NOT EXECUTED 40012538: 81 e8 00 00 restore <== NOT EXECUTED 40012af0 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 40012af0: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012af4: a0 96 20 00 orcc %i0, 0, %l0 40012af8: 32 80 00 0a bne,a 40012b20 40012afc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40012b00: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012b04: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012b08: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012b0c: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012b10: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40012b14: 96 12 e1 60 or %o3, 0x160, %o3 <== NOT EXECUTED 40012b18: 10 80 00 8c b 40012d48 <== NOT EXECUTED 40012b1c: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012b20: 80 a0 60 05 cmp %g1, 5 40012b24: 02 80 00 0a be 40012b4c 40012b28: 80 a6 e0 00 cmp %i3, 0 40012b2c: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012b30: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012b34: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012b38: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012b3c: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40012b40: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 40012b44: 10 80 00 81 b 40012d48 <== NOT EXECUTED 40012b48: 92 10 22 e7 mov 0x2e7, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 40012b4c: 12 80 00 0a bne 40012b74 40012b50: 80 a7 20 00 cmp %i4, 0 40012b54: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012b58: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012b5c: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012b60: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012b64: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40012b68: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 40012b6c: 10 80 00 77 b 40012d48 <== NOT EXECUTED 40012b70: 92 10 22 ef mov 0x2ef, %o1 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 40012b74: 32 80 00 06 bne,a 40012b8c 40012b78: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 40012b7c: 40 00 04 60 call 40013cfc <__errno> <== NOT EXECUTED 40012b80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012b84: 10 80 00 15 b 40012bd8 <== NOT EXECUTED 40012b88: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 40012b8c: 80 a0 60 00 cmp %g1, 0 40012b90: 06 80 00 09 bl 40012bb4 40012b94: 94 07 00 1a add %i4, %i2, %o2 40012b98: 80 a0 60 00 cmp %g1, 0 40012b9c: 12 80 00 12 bne 40012be4 40012ba0: 03 10 00 88 sethi %hi(0x40022000), %g1 40012ba4: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40012ba8: 80 a0 40 0a cmp %g1, %o2 40012bac: 1a 80 00 0e bcc 40012be4 40012bb0: 03 10 00 88 sethi %hi(0x40022000), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 40012bb4: 90 10 00 10 mov %l0, %o0 40012bb8: 7f ff ff 24 call 40012848 40012bbc: 92 10 20 00 clr %o1 if ( status ) 40012bc0: 80 a2 20 00 cmp %o0, 0 40012bc4: 02 80 00 08 be 40012be4 40012bc8: 03 10 00 88 sethi %hi(0x40022000), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 40012bcc: 40 00 04 4c call 40013cfc <__errno> <== NOT EXECUTED 40012bd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012bd4: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40012bd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012bdc: 81 c7 e0 08 ret <== NOT EXECUTED 40012be0: 81 e8 00 00 restore <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40012be4: e2 00 61 88 ld [ %g1 + 0x188 ], %l1 40012be8: 92 10 00 1a mov %i2, %o1 40012bec: a7 3c 60 1f sra %l1, 0x1f, %l3 40012bf0: 96 10 00 11 mov %l1, %o3 40012bf4: 94 10 00 13 mov %l3, %o2 40012bf8: 40 00 2c 2b call 4001dca4 <__moddi3> 40012bfc: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012c00: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40012c04: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012c08: 90 10 00 19 mov %i1, %o0 40012c0c: 92 10 00 1a mov %i2, %o1 40012c10: 40 00 2b 3e call 4001d908 <__divdi3> 40012c14: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40012c18: b4 10 00 1b mov %i3, %i2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40012c1c: a6 10 00 09 mov %o1, %l3 if ( start_offset ) { 40012c20: 80 a4 a0 00 cmp %l2, 0 40012c24: 02 80 00 1b be 40012c90 40012c28: 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 ); 40012c2c: 90 10 00 10 mov %l0, %o0 40012c30: 7f ff fd 62 call 400121b8 40012c34: 94 10 20 00 clr %o2 assert( block_ptr ); 40012c38: 80 a2 20 00 cmp %o0, 0 40012c3c: 32 80 00 0a bne,a 40012c64 40012c40: 94 24 40 12 sub %l1, %l2, %o2 40012c44: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012c48: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012c4c: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012c50: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012c54: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40012c58: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 40012c5c: 10 80 00 3b b 40012d48 <== NOT EXECUTED 40012c60: 92 10 23 1c mov 0x31c, %o1 <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 40012c64: 80 a2 80 1c cmp %o2, %i4 40012c68: 38 80 00 02 bgu,a 40012c70 40012c6c: 94 10 00 1c mov %i4, %o2 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 ); 40012c70: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 40012c74: b4 06 c0 0a add %i3, %o2, %i2 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 ); 40012c78: 90 02 00 12 add %o0, %l2, %o0 src += to_copy; block++; 40012c7c: a6 04 e0 01 inc %l3 my_length -= to_copy; 40012c80: b8 27 00 0a sub %i4, %o2, %i4 copied += to_copy; 40012c84: b0 10 00 0a mov %o2, %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 ); 40012c88: 40 00 06 58 call 400145e8 40012c8c: 92 10 00 1b mov %i3, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40012c90: 03 10 00 88 sethi %hi(0x40022000), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40012c94: a4 10 61 88 or %g1, 0x188, %l2 ! 40022188 40012c98: 10 80 00 17 b 40012cf4 40012c9c: e2 00 61 88 ld [ %g1 + 0x188 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40012ca0: 92 10 00 13 mov %l3, %o1 40012ca4: 7f ff fd 45 call 400121b8 40012ca8: 94 10 20 00 clr %o2 assert( block_ptr ); 40012cac: 80 a2 20 00 cmp %o0, 0 40012cb0: 32 80 00 0a bne,a 40012cd8 40012cb4: d0 02 00 00 ld [ %o0 ], %o0 40012cb8: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012cbc: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012cc0: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012cc4: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012cc8: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40012ccc: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 40012cd0: 10 80 00 1e b 40012d48 <== NOT EXECUTED 40012cd4: 92 10 23 30 mov 0x330, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 40012cd8: 92 10 00 1a mov %i2, %o1 src += to_copy; block++; 40012cdc: a6 04 e0 01 inc %l3 my_length -= to_copy; 40012ce0: b8 27 00 11 sub %i4, %l1, %i4 * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 40012ce4: b0 06 00 11 add %i0, %l1, %i0 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; 40012ce8: b4 06 80 11 add %i2, %l1, %i2 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 ); 40012cec: 40 00 06 3f call 400145e8 40012cf0: 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 ) { 40012cf4: c2 04 80 00 ld [ %l2 ], %g1 40012cf8: 80 a7 00 01 cmp %i4, %g1 40012cfc: 1a bf ff e9 bcc 40012ca0 40012d00: 90 10 00 10 mov %l0, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 40012d04: 80 a7 20 00 cmp %i4, 0 40012d08: 02 80 00 17 be 40012d64 40012d0c: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40012d10: 92 10 00 13 mov %l3, %o1 40012d14: 90 10 00 10 mov %l0, %o0 40012d18: 7f ff fd 28 call 400121b8 40012d1c: 94 10 20 00 clr %o2 assert( block_ptr ); 40012d20: 80 a2 20 00 cmp %o0, 0 40012d24: 32 80 00 0b bne,a 40012d50 40012d28: d0 02 00 00 ld [ %o0 ], %o0 40012d2c: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012d30: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40012d34: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012d38: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012d3c: 94 12 a2 68 or %o2, 0x268, %o2 <== NOT EXECUTED 40012d40: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 40012d44: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED 40012d48: 7f ff c5 ce call 40004480 <__assert_func> <== NOT EXECUTED 40012d4c: 01 00 00 00 nop <== NOT EXECUTED #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; 40012d50: 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 ); 40012d54: 92 10 00 1a mov %i2, %o1 40012d58: 40 00 06 24 call 400145e8 40012d5c: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 40012d60: 90 07 bf f8 add %fp, -8, %o0 40012d64: 7f ff c6 e7 call 40004900 40012d68: 92 10 20 00 clr %o1 40012d6c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40012d70: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40012d74: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 40012d78: 81 c7 e0 08 ret 40012d7c: 81 e8 00 00 restore 4000ac5c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000ac5c: 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 ); 4000ac60: 40 00 10 f8 call 4000f040 4000ac64: 90 10 00 18 mov %i0, %o0 4000ac68: 96 07 bf fc add %fp, -4, %o3 4000ac6c: 92 10 00 08 mov %o0, %o1 4000ac70: 94 07 bf b8 add %fp, -72, %o2 4000ac74: 7f ff ff 8e call 4000aaac 4000ac78: 90 10 00 18 mov %i0, %o0 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000ac7c: 97 2e 60 10 sll %i1, 0x10, %o3 4000ac80: 03 00 00 3c sethi %hi(0xf000), %g1 4000ac84: 97 32 e0 10 srl %o3, 0x10, %o3 4000ac88: 05 00 00 10 sethi %hi(0x4000), %g2 4000ac8c: 82 0a c0 01 and %o3, %g1, %g1 4000ac90: 80 a0 40 02 cmp %g1, %g2 4000ac94: 02 80 00 19 be 4000acf8 4000ac98: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000ac9c: 05 00 00 20 sethi %hi(0x8000), %g2 4000aca0: 80 a0 40 02 cmp %g1, %g2 4000aca4: 02 80 00 16 be 4000acfc 4000aca8: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000acac: 05 00 00 08 sethi %hi(0x2000), %g2 4000acb0: 80 a0 40 02 cmp %g1, %g2 4000acb4: 02 80 00 05 be 4000acc8 4000acb8: 05 00 00 18 sethi %hi(0x6000), %g2 4000acbc: 80 a0 40 02 cmp %g1, %g2 4000acc0: 12 80 00 05 bne 4000acd4 4000acc4: 05 00 00 04 sethi %hi(0x1000), %g2 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4000acc8: f4 3f bf e0 std %i2, [ %fp + -32 ] 4000accc: 10 80 00 0c b 4000acfc 4000acd0: 92 10 20 02 mov 2, %o1 } else if (S_ISFIFO(mode)) 4000acd4: 80 a0 40 02 cmp %g1, %g2 4000acd8: 02 80 00 09 be 4000acfc 4000acdc: 92 10 20 07 mov 7, %o1 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000ace0: 40 00 0d 21 call 4000e164 <__errno> <== NOT EXECUTED 4000ace4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ace8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000acec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000acf0: 81 c7 e0 08 ret <== NOT EXECUTED 4000acf4: 81 e8 00 00 restore <== NOT EXECUTED 4000acf8: 92 10 20 01 mov 1, %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( 4000acfc: 94 07 bf b8 add %fp, -72, %o2 4000ad00: 98 07 bf e0 add %fp, -32, %o4 4000ad04: 40 00 09 5d call 4000d278 4000ad08: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000ad0c: 80 a2 20 00 cmp %o0, 0 4000ad10: 12 80 00 06 bne 4000ad28 4000ad14: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 4000ad18: 40 00 0d 13 call 4000e164 <__errno> <== NOT EXECUTED 4000ad1c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000ad20: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000ad24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000ad28: 81 c7 e0 08 ret 4000ad2c: 81 e8 00 00 restore 40004058 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004058: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4000405c: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004060: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40004064: 80 a0 a0 01 cmp %g2, 1 40004068: 22 80 00 08 be,a 40004088 4000406c: f0 20 60 5c st %i0, [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004070: 40 00 3f 23 call 40013cfc <__errno> <== NOT EXECUTED 40004074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004078: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 4000407c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004080: 81 c7 e0 08 ret <== NOT EXECUTED 40004084: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 40004088: 81 c7 e0 08 ret 4000408c: 91 e8 20 00 restore %g0, 0, %o0 400048e0 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 400048e0: 9d e3 bf a0 save %sp, -96, %sp assert( the_jnode ); 400048e4: 80 a6 20 00 cmp %i0, 0 400048e8: 12 80 00 0a bne 40004910 400048ec: 21 10 00 96 sethi %hi(0x40025800), %l0 400048f0: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 400048f4: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 400048f8: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 400048fc: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 40004900: 94 12 a3 e8 or %o2, 0x3e8, %o2 <== NOT EXECUTED 40004904: 96 12 e2 50 or %o3, 0x250, %o3 <== NOT EXECUTED 40004908: 10 80 00 3b b 400049f4 <== NOT EXECUTED 4000490c: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 40004910: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 40004914: 90 06 20 0c add %i0, 0xc, %o0 40004918: 40 00 39 98 call 40012f78 4000491c: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 40004920: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 40004924: 82 02 bf ff add %o2, -1, %g1 40004928: 80 a0 60 06 cmp %g1, 6 4000492c: 38 80 00 42 bgu,a 40004a34 40004930: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 <== NOT EXECUTED 40004934: 83 28 60 02 sll %g1, 2, %g1 40004938: 05 10 00 12 sethi %hi(0x40004800), %g2 4000493c: 84 10 a0 88 or %g2, 0x88, %g2 ! 40004888 40004940: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40004944: 81 c0 40 00 jmp %g1 40004948: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 4000494c: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 40004950: 90 10 20 2f mov 0x2f, %o0 40004954: 40 00 39 45 call 40012e68 40004958: d2 00 60 08 ld [ %g1 + 8 ], %o1 break; 4000495c: 10 80 00 3c b 40004a4c 40004960: 31 10 00 8f sethi %hi(0x40023c00), %i0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40004964: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 40004968: 13 10 00 8f sethi %hi(0x40023c00), %o1 4000496c: d6 06 20 54 ld [ %i0 + 0x54 ], %o3 40004970: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004974: d4 06 20 50 ld [ %i0 + 0x50 ], %o2 40004978: 10 80 00 08 b 40004998 4000497c: 92 12 62 60 or %o1, 0x260, %o1 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 40004980: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 <== NOT EXECUTED 40004984: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 <== NOT EXECUTED 40004988: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 4000498c: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 <== NOT EXECUTED 40004990: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 40004994: 92 12 62 78 or %o1, 0x278, %o1 ! 40023e78 <__FUNCTION__.5752+0x270> <== NOT EXECUTED 40004998: 40 00 39 1a call 40012e00 4000499c: 31 10 00 8f sethi %hi(0x40023c00), %i0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 400049a0: 30 80 00 2b b,a 40004a4c the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 400049a4: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 400049a8: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 400049ac: d0 00 60 08 ld [ %g1 + 8 ], %o0 400049b0: 13 10 00 8f sethi %hi(0x40023c00), %o1 400049b4: 40 00 39 13 call 40012e00 400049b8: 92 12 62 88 or %o1, 0x288, %o1 ! 40023e88 <__FUNCTION__.5752+0x280> (uint32_t)the_jnode->info.file.size ); #endif break; 400049bc: 10 80 00 24 b 40004a4c 400049c0: 31 10 00 8f sethi %hi(0x40023c00), %i0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 400049c4: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 <== NOT EXECUTED 400049c8: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 400049cc: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 400049d0: 40 00 39 6a call 40012f78 <== NOT EXECUTED 400049d4: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED assert(0); 400049d8: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED 400049dc: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 400049e0: 15 10 00 8f sethi %hi(0x40023c00), %o2 <== NOT EXECUTED 400049e4: 17 10 00 8f sethi %hi(0x40023c00), %o3 <== NOT EXECUTED 400049e8: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 400049ec: 94 12 a3 e8 or %o2, 0x3e8, %o2 <== NOT EXECUTED 400049f0: 96 12 e0 00 mov %o3, %o3 <== NOT EXECUTED 400049f4: 40 00 02 16 call 4000524c <__assert_func> <== NOT EXECUTED 400049f8: 01 00 00 00 nop <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 400049fc: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 <== NOT EXECUTED 40004a00: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40004a04: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 40004a08: 40 00 39 5c call 40012f78 <== NOT EXECUTED 40004a0c: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED assert(0); 40004a10: 10 bf ff f3 b 400049dc <== NOT EXECUTED 40004a14: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 40004a18: c2 04 21 78 ld [ %l0 + 0x178 ], %g1 <== NOT EXECUTED 40004a1c: 11 10 00 8f sethi %hi(0x40023c00), %o0 <== NOT EXECUTED 40004a20: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 40004a24: 40 00 39 55 call 40012f78 <== NOT EXECUTED 40004a28: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED assert(0); 40004a2c: 10 bf ff ec b 400049dc <== NOT EXECUTED 40004a30: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40004a34: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 40004a38: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004a3c: 40 00 38 f1 call 40012e00 <== NOT EXECUTED 40004a40: 92 12 62 c8 or %o1, 0x2c8, %o1 <== NOT EXECUTED assert(0); 40004a44: 10 bf ff e6 b 400049dc <== NOT EXECUTED 40004a48: 92 10 20 6c mov 0x6c, %o1 <== NOT EXECUTED break; } puts(""); 40004a4c: 40 00 40 3c call 40014b3c 40004a50: 91 ee 21 d0 restore %i0, 0x1d0, %o0 40004a54: 01 00 00 00 nop 4000409c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4000409c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 400040a0: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 400040a4: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400040a8: 80 a0 a0 04 cmp %g2, 4 400040ac: 02 80 00 0a be 400040d4 400040b0: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 400040b4: 40 00 3f 12 call 40013cfc <__errno> <== NOT EXECUTED 400040b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400040bc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400040c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400040c4: 81 c7 e0 08 ret <== NOT EXECUTED 400040c8: 81 e8 00 00 restore <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 400040cc: c4 2e 40 18 stb %g2, [ %i1 + %i0 ] 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++ ) 400040d0: b0 06 20 01 inc %i0 400040d4: 80 a6 00 1a cmp %i0, %i2 400040d8: 1a 80 00 07 bcc 400040f4 400040dc: 01 00 00 00 nop 400040e0: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 400040e4: c6 48 80 18 ldsb [ %g2 + %i0 ], %g3 400040e8: 80 a0 e0 00 cmp %g3, 0 400040ec: 12 bf ff f8 bne 400040cc 400040f0: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; return i; } 400040f4: 81 c7 e0 08 ret 400040f8: 81 e8 00 00 restore 400040fc : 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 */ ) { 400040fc: 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; 40004100: e0 06 40 00 ld [ %i1 ], %l0 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 40004104: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 40004108: 90 04 20 0c add %l0, 0xc, %o0 <== NOT EXECUTED 4000410c: 40 00 42 cf call 40014c48 <== NOT EXECUTED 40004110: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 40004114: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40004118: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000411c: 22 80 00 05 be,a 40004130 <== NOT EXECUTED 40004120: 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 ); 40004124: 40 00 13 4e call 40008e5c <_Chain_Extract> <== NOT EXECUTED 40004128: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 4000412c: 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 ); 40004130: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004134: 90 00 60 50 add %g1, 0x50, %o0 <== NOT EXECUTED 40004138: 40 00 13 3d call 40008e2c <_Chain_Append> <== NOT EXECUTED 4000413c: 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 ); 40004140: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40004144: 40 00 01 ef call 40004900 <== NOT EXECUTED 40004148: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000414c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40004150: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED return 0; } 40004154: 81 c7 e0 08 ret <== NOT EXECUTED 40004158: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ad3c : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000ad3c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000ad40: 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 ) { 4000ad44: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000ad48: 80 a0 60 00 cmp %g1, 0 4000ad4c: 22 80 00 06 be,a 4000ad64 4000ad50: 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 ); 4000ad54: 40 00 03 7b call 4000bb40 <_Chain_Extract> 4000ad58: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000ad5c: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000ad60: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000ad64: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000ad68: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000ad6c: 90 07 bf f8 add %fp, -8, %o0 4000ad70: 40 00 00 ff call 4000b16c 4000ad74: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000ad78: 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) ) { 4000ad7c: 90 10 00 10 mov %l0, %o0 4000ad80: 40 00 01 33 call 4000b24c 4000ad84: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000ad88: 80 a2 20 00 cmp %o0, 0 4000ad8c: 12 80 00 18 bne 4000adec 4000ad90: 01 00 00 00 nop 4000ad94: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000ad98: 80 a0 60 00 cmp %g1, 0 4000ad9c: 12 80 00 14 bne 4000adec 4000ada0: 03 10 00 6e sethi %hi(0x4001b800), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000ada4: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 4001b8f8 4000ada8: c4 06 40 00 ld [ %i1 ], %g2 4000adac: c6 00 60 04 ld [ %g1 + 4 ], %g3 4000adb0: 80 a0 c0 02 cmp %g3, %g2 4000adb4: 22 80 00 02 be,a 4000adbc 4000adb8: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000adbc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000adc0: 80 a0 60 04 cmp %g1, 4 4000adc4: 12 80 00 08 bne 4000ade4 4000adc8: 01 00 00 00 nop if ( the_jnode->info.sym_link.name ) 4000adcc: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 4000add0: 80 a2 20 00 cmp %o0, 0 4000add4: 02 80 00 04 be 4000ade4 4000add8: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 4000addc: 40 00 00 7f call 4000afd8 4000ade0: 01 00 00 00 nop } free( the_jnode ); 4000ade4: 40 00 00 7d call 4000afd8 4000ade8: 90 10 00 10 mov %l0, %o0 } return 0; } 4000adec: 81 c7 e0 08 ret 4000adf0: 91 e8 20 00 restore %g0, 0, %o0 4000ae0c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000ae0c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000ae10: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 4000ae14: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000ae18: 84 00 bf fe add %g2, -2, %g2 4000ae1c: 80 a0 a0 05 cmp %g2, 5 4000ae20: 18 80 00 10 bgu 4000ae60 4000ae24: 85 28 a0 02 sll %g2, 2, %g2 4000ae28: 07 10 00 2b sethi %hi(0x4000ac00), %g3 4000ae2c: 86 10 e1 f4 or %g3, 0x1f4, %g3 ! 4000adf4 4000ae30: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 4000ae34: 81 c0 80 00 jmp %g2 4000ae38: 01 00 00 00 nop rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000ae3c: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; 4000ae40: 10 80 00 0e b 4000ae78 4000ae44: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000ae48: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 4000ae4c: 10 80 00 0b b 4000ae78 4000ae50: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4000ae54: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED break; 4000ae58: 10 80 00 08 b 4000ae78 <== NOT EXECUTED 4000ae5c: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000ae60: 40 00 0c c1 call 4000e164 <__errno> <== NOT EXECUTED 4000ae64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ae68: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000ae6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ae70: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae74: 81 e8 00 00 restore <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; 4000ae78: c6 10 60 2e lduh [ %g1 + 0x2e ], %g3 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000ae7c: 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; 4000ae80: c6 36 60 0c sth %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000ae84: 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; 4000ae88: 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; 4000ae8c: 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; 4000ae90: 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; 4000ae94: 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; 4000ae98: 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; 4000ae9c: 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; 4000aea0: 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; 4000aea4: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 4000aea8: 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; 4000aeac: 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; 4000aeb0: 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; 4000aeb4: 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; } 4000aeb8: 81 c7 e0 08 ret 4000aebc: 91 e8 20 00 restore %g0, 0, %o0 4000415c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4000415c: 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 ); 40004160: 40 00 42 85 call 40014b74 40004164: 90 10 00 1a mov %i2, %o0 40004168: 96 07 bf fc add %fp, -4, %o3 4000416c: 92 10 00 08 mov %o0, %o1 40004170: a0 07 bf b8 add %fp, -72, %l0 40004174: 90 10 00 1a mov %i2, %o0 40004178: 40 00 30 8d call 400103ac 4000417c: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 40004180: 40 00 42 68 call 40014b20 40004184: 90 10 00 19 mov %i1, %o0 40004188: d0 27 bf e0 st %o0, [ %fp + -32 ] if (info.sym_link.name == NULL) { 4000418c: 80 a2 20 00 cmp %o0, 0 40004190: 12 80 00 08 bne 400041b0 40004194: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one(ENOMEM); 40004198: 40 00 3e d9 call 40013cfc <__errno> <== NOT EXECUTED 4000419c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400041a0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 400041a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400041a8: 81 c7 e0 08 ret 400041ac: 81 e8 00 00 restore * 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( 400041b0: 94 10 00 10 mov %l0, %o2 400041b4: 92 10 20 04 mov 4, %o1 400041b8: 17 00 00 28 sethi %hi(0xa000), %o3 400041bc: 98 07 bf e0 add %fp, -32, %o4 400041c0: 96 12 e1 ff or %o3, 0x1ff, %o3 400041c4: 40 00 2d 3b call 4000f6b0 400041c8: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 400041cc: 80 a2 20 00 cmp %o0, 0 400041d0: 12 bf ff f6 bne 400041a8 400041d4: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 400041d8: 40 00 01 a0 call 40004858 <== NOT EXECUTED 400041dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 400041e0: 40 00 3e c7 call 40013cfc <__errno> <== NOT EXECUTED 400041e4: 01 00 00 00 nop <== NOT EXECUTED 400041e8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400041ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 400041f0: 81 c7 e0 08 ret <== NOT EXECUTED 400041f4: 81 e8 00 00 restore <== NOT EXECUTED 400041f8 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 400041f8: 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; 400041fc: 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 ) { 40004200: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004204: 80 a0 60 03 cmp %g1, 3 40004208: 12 80 00 29 bne 400042ac 4000420c: a4 10 00 18 mov %i0, %l2 if ( !node->info.hard_link.link_node ) 40004210: e6 04 20 50 ld [ %l0 + 0x50 ], %l3 40004214: 80 a4 e0 00 cmp %l3, 0 40004218: 12 80 00 08 bne 40004238 4000421c: a2 07 bf e4 add %fp, -28, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 40004220: 40 00 3e b7 call 40013cfc <__errno> <== NOT EXECUTED 40004224: 01 00 00 00 nop <== NOT EXECUTED 40004228: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000422c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004230: 10 80 00 24 b 400042c0 <== NOT EXECUTED 40004234: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 40004238: 92 10 00 19 mov %i1, %o1 4000423c: 94 10 20 14 mov 0x14, %o2 40004240: 40 00 40 ea call 400145e8 40004244: 90 10 00 11 mov %l1, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 40004248: 90 10 00 11 mov %l1, %o0 4000424c: 40 00 2d 66 call 4000f7e4 40004250: e6 27 bf e4 st %l3, [ %fp + -28 ] /* * 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) 40004254: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40004258: c6 10 60 30 lduh [ %g1 + 0x30 ], %g3 4000425c: 80 a0 e0 01 cmp %g3, 1 40004260: 12 80 00 0c bne 40004290 40004264: 84 00 ff ff add %g3, -1, %g2 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 40004268: c2 07 bf ec ld [ %fp + -20 ], %g1 4000426c: 92 10 00 11 mov %l1, %o1 40004270: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40004274: 9f c0 40 00 call %g1 40004278: 90 10 00 18 mov %i0, %o0 if ( result != 0 ) 4000427c: 80 a2 20 00 cmp %o0, 0 40004280: 02 80 00 0b be 400042ac 40004284: 90 10 3f ff mov -1, %o0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 40004288: 81 c7 e0 08 ret 4000428c: 91 e8 00 08 restore %g0, %o0, %o0 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 40004290: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40004294: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40004298: 40 00 01 9a call 40004900 4000429c: 92 10 20 00 clr %o1 400042a0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400042a4: c4 07 bf f8 ld [ %fp + -8 ], %g2 400042a8: c4 20 60 44 st %g2, [ %g1 + 0x44 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 400042ac: c2 06 60 08 ld [ %i1 + 8 ], %g1 400042b0: 90 10 00 12 mov %l2, %o0 400042b4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400042b8: 9f c0 40 00 call %g1 400042bc: 92 10 00 19 mov %i1, %o1 return result; } 400042c0: b0 10 00 08 mov %o0, %i0 400042c4: 81 c7 e0 08 ret 400042c8: 81 e8 00 00 restore 400042cc : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 400042cc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 400042d0: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 400042d4: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400042d8: 80 a0 a0 01 cmp %g2, 1 400042dc: 22 80 00 06 be,a 400042f4 400042e0: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400042e4: 40 00 3e 86 call 40013cfc <__errno> <== NOT EXECUTED 400042e8: 01 00 00 00 nop <== NOT EXECUTED 400042ec: 10 80 00 08 b 4000430c <== NOT EXECUTED 400042f0: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 400042f4: 80 a0 a0 00 cmp %g2, 0 400042f8: 32 80 00 08 bne,a 40004318 400042fc: c0 20 60 5c clr [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 40004300: 40 00 3e 7f call 40013cfc <__errno> <== NOT EXECUTED 40004304: 01 00 00 00 nop <== NOT EXECUTED 40004308: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000430c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004310: 81 c7 e0 08 ret <== NOT EXECUTED 40004314: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 40004318: 81 c7 e0 08 ret 4000431c: 91 e8 20 00 restore %g0, 0, %o0 400031c4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 400031c4: 9d e3 bf a0 save %sp, -96, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 400031c8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400031cc: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 4001be18 400031d0: 80 a0 60 00 cmp %g1, 0 400031d4: 02 80 00 05 be 400031e8 400031d8: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 400031dc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 400031e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400031e4: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 400031e8: 40 00 20 bb call 4000b4d4 400031ec: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 400031f0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400031f4: c2 00 62 1c ld [ %g1 + 0x21c ], %g1 ! 4001be1c 400031f8: 80 a0 60 00 cmp %g1, 0 400031fc: 02 80 00 08 be 4000321c 40003200: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 40003204: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 40003208: 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)( 4000320c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003210: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 40003214: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40003218: 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 ( 4000321c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40003220: c2 08 62 15 ldub [ %g1 + 0x215 ], %g1 ! 4001be15 40003224: 80 a0 60 00 cmp %g1, 0 40003228: 12 80 00 0c bne 40003258 4000322c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 40003230: 03 10 00 6e sethi %hi(0x4001b800), %g1 40003234: c2 08 60 c0 ldub [ %g1 + 0xc0 ], %g1 ! 4001b8c0 40003238: 80 a0 60 00 cmp %g1, 0 4000323c: 02 80 00 07 be 40003258 40003240: 03 10 00 6f sethi %hi(0x4001bc00), %g1 ) { memset( heap_begin, 0, heap_size ); 40003244: 90 10 00 18 mov %i0, %o0 40003248: 92 10 20 00 clr %o1 4000324c: 40 00 2e 40 call 4000eb4c 40003250: 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 ) { 40003254: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40003258: c2 08 62 15 ldub [ %g1 + 0x215 ], %g1 ! 4001be15 4000325c: 80 a0 60 00 cmp %g1, 0 40003260: 12 80 00 0c bne 40003290 40003264: 03 10 00 6d sethi %hi(0x4001b400), %g1 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 40003268: d0 00 63 f0 ld [ %g1 + 0x3f0 ], %o0 ! 4001b7f0 4000326c: 92 10 00 18 mov %i0, %o1 40003270: 94 10 00 19 mov %i1, %o2 40003274: 40 00 10 3a call 4000735c <_Heap_Initialize> 40003278: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 4000327c: 80 a2 20 00 cmp %o0, 0 40003280: 12 80 00 05 bne 40003294 40003284: 33 10 00 70 sethi %hi(0x4001c000), %i1 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 40003288: 40 00 0e 41 call 40006b8c <== NOT EXECUTED 4000328c: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 40003290: 33 10 00 70 sethi %hi(0x4001c000), %i1 40003294: 03 10 00 6d sethi %hi(0x4001b400), %g1 40003298: f0 06 61 08 ld [ %i1 + 0x108 ], %i0 4000329c: 40 00 13 3c call 40007f8c <_Protected_heap_Get_size> 400032a0: d0 00 63 f0 ld [ %g1 + 0x3f0 ], %o0 400032a4: 90 02 00 18 add %o0, %i0, %o0 400032a8: d0 26 61 08 st %o0, [ %i1 + 0x108 ] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 400032ac: 81 c7 e0 08 ret 400032b0: 81 e8 00 00 restore 40005f44 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 40005f44: 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 ) 40005f48: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40005f4c: 02 80 00 49 be 40006070 <== NOT EXECUTED 40005f50: 03 10 01 97 sethi %hi(0x40065c00), %g1 <== NOT EXECUTED return; if ( !print_handler ) 40005f54: e4 00 61 5c ld [ %g1 + 0x15c ], %l2 ! 40065d5c <== NOT EXECUTED 40005f58: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40005f5c: 02 80 00 45 be 40006070 <== NOT EXECUTED 40005f60: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 40005f64: 32 80 00 0a bne,a 40005f8c <== NOT EXECUTED 40005f68: e8 06 21 48 ld [ %i0 + 0x148 ], %l4 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 40005f6c: 23 10 01 a2 sethi %hi(0x40068800), %l1 <== NOT EXECUTED 40005f70: a2 14 61 98 or %l1, 0x198, %l1 ! 40068998 <== NOT EXECUTED 40005f74: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED 40005f78: a8 10 20 00 clr %l4 <== NOT EXECUTED 40005f7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005f80: 12 80 00 04 bne 40005f90 <== NOT EXECUTED 40005f84: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005f88: 30 80 00 41 b,a 4000608c <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 40005f8c: a2 06 20 c0 add %i0, 0xc0, %l1 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 40005f90: ea 04 60 04 ld [ %l1 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40005f94: e6 04 40 00 ld [ %l1 ], %l3 <== 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); 40005f98: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40005f9c: a6 04 ff f0 add %l3, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40005fa0: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40005fa4: 7f ff ff d8 call 40005f04 <== NOT EXECUTED 40005fa8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED if ( high_water_mark ) 40005fac: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40005fb0: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40005fb4: a0 05 40 13 add %l5, %l3, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 40005fb8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); 40005fbc: a0 24 00 08 sub %l0, %o0, %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 ) 40005fc0: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 40005fc4: 02 80 00 10 be 40006004 <== NOT EXECUTED 40005fc8: 03 10 01 97 sethi %hi(0x40065c00), %g1 <== NOT EXECUTED (*print_handler)( 40005fcc: ea 06 20 08 ld [ %i0 + 8 ], %l5 <== NOT EXECUTED 40005fd0: ec 00 61 58 ld [ %g1 + 0x158 ], %l6 <== NOT EXECUTED 40005fd4: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 40005fd8: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40005fdc: 40 00 18 7b call 4000c1c8 <== NOT EXECUTED 40005fe0: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 40005fe4: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 40005fe8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 40005fec: 13 10 01 6b sethi %hi(0x4005ac00), %o1 <== NOT EXECUTED 40005ff0: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED 40005ff4: 9f c4 80 00 call %l2 <== NOT EXECUTED 40005ff8: 92 12 60 a8 or %o1, 0xa8, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 40005ffc: 10 80 00 08 b 4000601c <== NOT EXECUTED 40006000: d6 04 40 00 ld [ %l1 ], %o3 <== 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 ); 40006004: d0 00 61 58 ld [ %g1 + 0x158 ], %o0 <== NOT EXECUTED 40006008: 13 10 01 6b sethi %hi(0x4005ac00), %o1 <== NOT EXECUTED 4000600c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 40006010: 9f c4 80 00 call %l2 <== NOT EXECUTED 40006014: 92 12 60 b8 or %o1, 0xb8, %o1 <== NOT EXECUTED } (*print_handler)( 40006018: d6 04 40 00 ld [ %l1 ], %o3 <== NOT EXECUTED 4000601c: d4 04 60 04 ld [ %l1 + 4 ], %o2 <== NOT EXECUTED 40006020: 25 10 01 97 sethi %hi(0x40065c00), %l2 <== NOT EXECUTED 40006024: 23 10 01 97 sethi %hi(0x40065c00), %l1 <== NOT EXECUTED 40006028: c2 04 a1 5c ld [ %l2 + 0x15c ], %g1 <== NOT EXECUTED 4000602c: d0 04 61 58 ld [ %l1 + 0x158 ], %o0 <== NOT EXECUTED 40006030: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 40006034: 98 10 00 14 mov %l4, %o4 <== NOT EXECUTED 40006038: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 4000603c: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 40006040: 13 10 01 6b sethi %hi(0x4005ac00), %o1 <== NOT EXECUTED 40006044: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006048: 92 12 60 c8 or %o1, 0xc8, %o1 ! 4005acc8 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 4000604c: 03 10 01 97 sethi %hi(0x40065c00), %g1 <== NOT EXECUTED 40006050: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 40065d54 <== NOT EXECUTED 40006054: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006058: 12 80 00 08 bne 40006078 <== NOT EXECUTED 4000605c: c2 04 a1 5c ld [ %l2 + 0x15c ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 40006060: d0 04 61 58 ld [ %l1 + 0x158 ], %o0 <== NOT EXECUTED 40006064: 13 10 01 6b sethi %hi(0x4005ac00), %o1 <== NOT EXECUTED 40006068: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000606c: 92 12 60 e8 or %o1, 0xe8, %o1 ! 4005ace8 <== NOT EXECUTED 40006070: 81 c7 e0 08 ret <== NOT EXECUTED 40006074: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40006078: d0 04 61 58 ld [ %l1 + 0x158 ], %o0 <== NOT EXECUTED 4000607c: 13 10 01 6b sethi %hi(0x4005ac00), %o1 <== NOT EXECUTED 40006080: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40006084: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006088: 92 12 60 f8 or %o1, 0xf8, %o1 <== NOT EXECUTED 4000608c: 81 c7 e0 08 ret <== NOT EXECUTED 40006090: 81 e8 00 00 restore <== NOT EXECUTED 40005f04 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40005f04: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40005f08: 84 0a 7f fc and %o1, -4, %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 40005f0c: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 40005f10: 84 02 00 02 add %o0, %g2, %g2 <== NOT EXECUTED 40005f14: 10 80 00 06 b 40005f2c <== NOT EXECUTED 40005f18: 82 10 61 a5 or %g1, 0x1a5, %g1 <== NOT EXECUTED if (*base != U32_PATTERN) 40005f1c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40005f20: 12 80 00 07 bne 40005f3c <== NOT EXECUTED 40005f24: 01 00 00 00 nop <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 40005f28: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40005f2c: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 40005f30: 2a bf ff fb bcs,a 40005f1c <== NOT EXECUTED 40005f34: c6 02 00 00 ld [ %o0 ], %g3 <== NOT EXECUTED 40005f38: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 40005f3c: 81 c3 e0 08 retl <== NOT EXECUTED 40005f40: 01 00 00 00 nop 40006108 : * * 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) { 40006108: 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"); 4000610c: 11 10 01 6b sethi %hi(0x4005ac00), %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); 40006110: e0 06 20 c4 ld [ %i0 + 0xc4 ], %l0 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 40006114: 40 00 0b 50 call 40008e54 <== NOT EXECUTED 40006118: 90 12 21 68 or %o0, 0x168, %o0 <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 4000611c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40006120: 11 10 01 6b sethi %hi(0x4005ac00), %o0 <== NOT EXECUTED 40006124: 40 00 0b 4c call 40008e54 <== NOT EXECUTED 40006128: 90 12 21 78 or %o0, 0x178, %o0 ! 4005ad78 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 4000612c: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED 40006130: 11 10 01 6b sethi %hi(0x4005ac00), %o0 <== NOT EXECUTED 40006134: 40 00 0b 48 call 40008e54 <== NOT EXECUTED 40006138: 90 12 21 98 or %o0, 0x198, %o0 ! 4005ad98 <== NOT EXECUTED printk( 4000613c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 40006140: 11 10 01 6b sethi %hi(0x4005ac00), %o0 <== NOT EXECUTED 40006144: 40 00 0b 44 call 40008e54 <== NOT EXECUTED 40006148: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 4005adb0 <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 4000614c: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 40006150: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED 40006154: 40 00 18 1d call 4000c1c8 <== NOT EXECUTED 40006158: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED 4000615c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40006160: 11 10 01 6b sethi %hi(0x4005ac00), %o0 <== NOT EXECUTED 40006164: 40 00 0b 3c call 40008e54 <== NOT EXECUTED 40006168: 90 12 21 c8 or %o0, 0x1c8, %o0 ! 4005adc8 <== 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) 4000616c: 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( 40006170: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 40006174: 11 10 01 6b sethi %hi(0x4005ac00), %o0 <== NOT EXECUTED 40006178: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED 4000617c: 40 00 0b 36 call 40008e54 <== NOT EXECUTED 40006180: 90 12 21 e0 or %o0, 0x1e0, %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) { 40006184: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 40006188: 12 80 00 07 bne 400061a4 <== NOT EXECUTED 4000618c: 11 10 01 6b sethi %hi(0x4005ac00), %o0 <== NOT EXECUTED printk( 40006190: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED 40006194: 90 12 22 18 or %o0, 0x218, %o0 <== NOT EXECUTED 40006198: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 4000619c: 40 00 0b 2e call 40008e54 <== NOT EXECUTED 400061a0: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 400061a4: 40 00 1a 3e call 4000ca9c <== NOT EXECUTED 400061a8: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED 400061ac: 01 00 00 00 nop 4000bbe0 <_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 ) { 4000bbe0: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4000bbe4: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000bbe8: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 4001c38c <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000bbec: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000bbf0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 4000bbf4: 80 a0 a0 00 cmp %g2, 0 4000bbf8: 22 80 00 31 be,a 4000bcbc <_CORE_mutex_Seize_interrupt_trylock+0xdc> 4000bbfc: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 4000bc00: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000bc04: 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; 4000bc08: 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; 4000bc0c: 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; 4000bc10: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000bc14: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000bc18: 80 a0 a0 02 cmp %g2, 2 4000bc1c: 02 80 00 05 be 4000bc30 <_CORE_mutex_Seize_interrupt_trylock+0x50> 4000bc20: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 4000bc24: 80 a0 a0 03 cmp %g2, 3 4000bc28: 12 80 00 07 bne 4000bc44 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000bc2c: 01 00 00 00 nop _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000bc30: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000bc34: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000bc38: 84 00 e0 01 add %g3, 1, %g2 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000bc3c: 02 80 00 03 be 4000bc48 <_CORE_mutex_Seize_interrupt_trylock+0x68> 4000bc40: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000bc44: 30 80 00 2d b,a 4000bcf8 <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000bc48: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 4000bc4c: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 if ( current == ceiling ) { 4000bc50: 80 a0 c0 02 cmp %g3, %g2 4000bc54: 12 80 00 03 bne 4000bc60 <_CORE_mutex_Seize_interrupt_trylock+0x80> 4000bc58: 01 00 00 00 nop _ISR_Enable( *level_p ); 4000bc5c: 30 80 00 27 b,a 4000bcf8 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 4000bc60: 08 80 00 0f bleu 4000bc9c <_CORE_mutex_Seize_interrupt_trylock+0xbc> 4000bc64: 84 10 20 06 mov 6, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000bc68: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000bc6c: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 4001c2d0 <_Thread_Dispatch_disable_level> 4000bc70: 84 00 a0 01 inc %g2 4000bc74: c4 20 62 d0 st %g2, [ %g1 + 0x2d0 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4000bc78: 7f ff d8 39 call 40001d5c 4000bc7c: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 4000bc80: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000bc84: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000bc88: 7f ff f0 d8 call 40007fe8 <_Thread_Change_priority> 4000bc8c: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4000bc90: 7f ff f2 46 call 400085a8 <_Thread_Enable_dispatch> 4000bc94: b0 10 20 00 clr %i0 4000bc98: 30 80 00 1b b,a 4000bd04 <_CORE_mutex_Seize_interrupt_trylock+0x124> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000bc9c: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000bca0: 84 10 20 01 mov 1, %g2 the_mutex->nest_count = 0; /* undo locking above */ 4000bca4: c0 26 20 54 clr [ %i0 + 0x54 ] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000bca8: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000bcac: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000bcb0: 84 00 bf ff add %g2, -1, %g2 4000bcb4: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000bcb8: 30 80 00 10 b,a 4000bcf8 <_CORE_mutex_Seize_interrupt_trylock+0x118> /* * 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 ) ) { 4000bcbc: 80 a0 80 01 cmp %g2, %g1 4000bcc0: 12 80 00 13 bne 4000bd0c <_CORE_mutex_Seize_interrupt_trylock+0x12c> 4000bcc4: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000bcc8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000bccc: 80 a0 60 00 cmp %g1, 0 4000bcd0: 22 80 00 07 be,a 4000bcec <_CORE_mutex_Seize_interrupt_trylock+0x10c> 4000bcd4: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000bcd8: 80 a0 60 01 cmp %g1, 1 4000bcdc: 12 80 00 0c bne 4000bd0c <_CORE_mutex_Seize_interrupt_trylock+0x12c> 4000bce0: 82 10 20 02 mov 2, %g1 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; 4000bce4: 10 80 00 05 b 4000bcf8 <_CORE_mutex_Seize_interrupt_trylock+0x118> <== NOT EXECUTED 4000bce8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000bcec: 82 00 60 01 inc %g1 4000bcf0: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 4000bcf4: 30 80 00 01 b,a 4000bcf8 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4000bcf8: 7f ff d8 19 call 40001d5c 4000bcfc: d0 06 40 00 ld [ %i1 ], %o0 4000bd00: b0 10 20 00 clr %i0 4000bd04: 81 c7 e0 08 ret 4000bd08: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000bd0c: 81 c7 e0 08 ret 4000bd10: 91 e8 20 01 restore %g0, 1, %o0 400070a4 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 400070a4: 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 ) { 400070a8: 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 ) { 400070ac: 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 ) { 400070b0: 80 a0 60 00 cmp %g1, 0 400070b4: 02 80 00 07 be 400070d0 <_CORE_mutex_Surrender+0x2c> 400070b8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 400070bc: 03 10 00 70 sethi %hi(0x4001c000), %g1 400070c0: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 4001c38c <_Thread_Executing> 400070c4: 80 a2 00 01 cmp %o0, %g1 400070c8: 12 80 00 4b bne 400071f4 <_CORE_mutex_Surrender+0x150> 400070cc: 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 ) 400070d0: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400070d4: 80 a0 60 00 cmp %g1, 0 400070d8: 02 80 00 46 be 400071f0 <_CORE_mutex_Surrender+0x14c> 400070dc: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 400070e0: 80 a0 60 00 cmp %g1, 0 400070e4: 12 80 00 43 bne 400071f0 <_CORE_mutex_Surrender+0x14c> 400070e8: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 400070ec: 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 ) || 400070f0: 80 a0 60 02 cmp %g1, 2 400070f4: 02 80 00 04 be 40007104 <_CORE_mutex_Surrender+0x60> 400070f8: 80 a0 60 03 cmp %g1, 3 400070fc: 32 80 00 07 bne,a 40007118 <_CORE_mutex_Surrender+0x74> 40007100: c0 24 20 5c clr [ %l0 + 0x5c ] the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 40007104: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007108: 82 00 7f ff add %g1, -1, %g1 4000710c: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 40007110: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 40007114: 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 ) || 40007118: 80 a0 60 02 cmp %g1, 2 4000711c: 02 80 00 05 be 40007130 <_CORE_mutex_Surrender+0x8c> 40007120: c0 24 20 60 clr [ %l0 + 0x60 ] 40007124: 80 a0 60 03 cmp %g1, 3 40007128: 12 80 00 0d bne 4000715c <_CORE_mutex_Surrender+0xb8> 4000712c: 01 00 00 00 nop _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 && 40007130: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007134: 80 a0 60 00 cmp %g1, 0 40007138: 12 80 00 09 bne 4000715c <_CORE_mutex_Surrender+0xb8> 4000713c: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { 40007140: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40007144: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40007148: 80 a2 40 01 cmp %o1, %g1 4000714c: 02 80 00 04 be 4000715c <_CORE_mutex_Surrender+0xb8> 40007150: 01 00 00 00 nop _Thread_Change_priority( holder, holder->real_priority, true ); 40007154: 40 00 03 a5 call 40007fe8 <_Thread_Change_priority> 40007158: 94 10 20 01 mov 1, %o2 ! 1 /* * 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 ) ) ) { 4000715c: 40 00 05 ef call 40008918 <_Thread_queue_Dequeue> 40007160: 90 10 00 10 mov %l0, %o0 40007164: 82 92 20 00 orcc %o0, 0, %g1 40007168: 22 80 00 1f be,a 400071e4 <_CORE_mutex_Surrender+0x140> 4000716c: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40007170: c6 00 60 08 ld [ %g1 + 8 ], %g3 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 40007174: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40007178: c6 24 20 60 st %g3, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 4000717c: c2 24 20 5c st %g1, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 40007180: 86 10 20 01 mov 1, %g3 switch ( the_mutex->Attributes.discipline ) { 40007184: 80 a0 a0 02 cmp %g2, 2 40007188: 02 80 00 07 be 400071a4 <_CORE_mutex_Surrender+0x100> 4000718c: c6 24 20 54 st %g3, [ %l0 + 0x54 ] 40007190: 80 a0 a0 03 cmp %g2, 3 40007194: 12 80 00 18 bne 400071f4 <_CORE_mutex_Surrender+0x150> 40007198: b0 10 20 00 clr %i0 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++; 4000719c: 10 80 00 07 b 400071b8 <_CORE_mutex_Surrender+0x114> 400071a0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 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++; 400071a4: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 400071a8: 84 00 a0 01 inc %g2 400071ac: c4 20 60 1c st %g2, [ %g1 + 0x1c ] break; 400071b0: 81 c7 e0 08 ret 400071b4: 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){ 400071b8: 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++; 400071bc: 86 00 e0 01 inc %g3 400071c0: c6 20 60 1c st %g3, [ %g1 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 400071c4: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 the_thread->current_priority){ 400071c8: 80 a2 40 02 cmp %o1, %g2 400071cc: 3a 80 00 0a bcc,a 400071f4 <_CORE_mutex_Surrender+0x150> 400071d0: b0 10 20 00 clr %i0 _Thread_Change_priority( 400071d4: 40 00 03 85 call 40007fe8 <_Thread_Change_priority> <== NOT EXECUTED 400071d8: 94 10 20 00 clr %o2 <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 400071dc: 81 c7 e0 08 ret <== NOT EXECUTED 400071e0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400071e4: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 400071e8: 81 c7 e0 08 ret 400071ec: 91 e8 20 00 restore %g0, 0, %o0 400071f0: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 400071f4: 81 c7 e0 08 ret 400071f8: 81 e8 00 00 restore 40008b38 <_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 ) { 40008b38: 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; 40008b3c: 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); 40008b40: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40008b44: 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); 40008b48: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40008b4c: 82 06 60 38 add %i1, 0x38, %g1 40008b50: c2 26 60 40 st %g1, [ %i1 + 0x40 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40008b54: 2d 10 00 6e sethi %hi(0x4001b800), %l6 _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 ]; 40008b58: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008b5c: 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 ]; 40008b60: a7 28 60 04 sll %g1, 4, %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; 40008b64: ac 15 a0 94 or %l6, 0x94, %l6 _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 ]; 40008b68: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 40008b6c: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 _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 ]; 40008b70: a6 24 c0 01 sub %l3, %g1, %l3 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008b74: 12 80 00 28 bne 40008c14 <_Thread_queue_Enqueue_priority+0xdc> 40008b78: a6 06 00 13 add %i0, %l3, %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40008b7c: ac 04 e0 04 add %l3, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40008b80: 7f ff e4 73 call 40001d4c 40008b84: 01 00 00 00 nop 40008b88: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 40008b8c: a8 10 3f ff mov -1, %l4 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40008b90: 10 80 00 10 b 40008bd0 <_Thread_queue_Enqueue_priority+0x98> 40008b94: e2 04 c0 00 ld [ %l3 ], %l1 search_priority = search_thread->current_priority; if ( priority <= search_priority ) 40008b98: 80 a4 00 14 cmp %l0, %l4 40008b9c: 28 80 00 11 bleu,a 40008be0 <_Thread_queue_Enqueue_priority+0xa8> 40008ba0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 40008ba4: 7f ff e4 6e call 40001d5c 40008ba8: 90 10 00 12 mov %l2, %o0 40008bac: 7f ff e4 68 call 40001d4c 40008bb0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008bb4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40008bb8: 80 8d 40 01 btst %l5, %g1 40008bbc: 32 80 00 05 bne,a 40008bd0 <_Thread_queue_Enqueue_priority+0x98> 40008bc0: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40008bc4: 7f ff e4 66 call 40001d5c <== NOT EXECUTED 40008bc8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40008bcc: 30 bf ff ed b,a 40008b80 <_Thread_queue_Enqueue_priority+0x48> <== NOT EXECUTED 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 ) ) { 40008bd0: 80 a4 40 16 cmp %l1, %l6 40008bd4: 32 bf ff f1 bne,a 40008b98 <_Thread_queue_Enqueue_priority+0x60> 40008bd8: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40008bdc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008be0: 80 a0 60 01 cmp %g1, 1 40008be4: 12 80 00 3c bne 40008cd4 <_Thread_queue_Enqueue_priority+0x19c> 40008be8: 90 10 00 12 mov %l2, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40008bec: 80 a4 00 14 cmp %l0, %l4 40008bf0: 02 80 00 2e be 40008ca8 <_Thread_queue_Enqueue_priority+0x170> 40008bf4: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40008bf8: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008bfc: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40008c00: 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; 40008c04: 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; 40008c08: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008c0c: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008c10: 30 80 00 2d b,a 40008cc4 <_Thread_queue_Enqueue_priority+0x18c> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40008c14: 7f ff e4 4e call 40001d4c 40008c18: e8 0d 80 00 ldub [ %l6 ], %l4 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40008c1c: a8 05 20 01 inc %l4 _ISR_Disable( level ); 40008c20: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40008c24: 10 80 00 10 b 40008c64 <_Thread_queue_Enqueue_priority+0x12c> 40008c28: e2 04 e0 08 ld [ %l3 + 8 ], %l1 search_priority = search_thread->current_priority; if ( priority >= search_priority ) 40008c2c: 80 a4 00 14 cmp %l0, %l4 40008c30: 3a 80 00 11 bcc,a 40008c74 <_Thread_queue_Enqueue_priority+0x13c> 40008c34: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40008c38: 7f ff e4 49 call 40001d5c 40008c3c: 90 10 00 12 mov %l2, %o0 40008c40: 7f ff e4 43 call 40001d4c 40008c44: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008c48: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40008c4c: 80 8d 40 01 btst %l5, %g1 40008c50: 32 80 00 05 bne,a 40008c64 <_Thread_queue_Enqueue_priority+0x12c> 40008c54: e2 04 60 04 ld [ %l1 + 4 ], %l1 _ISR_Enable( level ); 40008c58: 7f ff e4 41 call 40001d5c 40008c5c: 90 10 00 12 mov %l2, %o0 goto restart_reverse_search; 40008c60: 30 bf ff ed b,a 40008c14 <_Thread_queue_Enqueue_priority+0xdc> 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 ) ) { 40008c64: 80 a4 40 13 cmp %l1, %l3 40008c68: 32 bf ff f1 bne,a 40008c2c <_Thread_queue_Enqueue_priority+0xf4> 40008c6c: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40008c70: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008c74: 80 a0 60 01 cmp %g1, 1 40008c78: 12 80 00 17 bne 40008cd4 <_Thread_queue_Enqueue_priority+0x19c> 40008c7c: 90 10 00 12 mov %l2, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40008c80: 80 a4 00 14 cmp %l0, %l4 40008c84: 02 80 00 09 be 40008ca8 <_Thread_queue_Enqueue_priority+0x170> 40008c88: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40008c8c: c2 04 40 00 ld [ %l1 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40008c90: e2 26 60 04 st %l1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 40008c94: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40008c98: 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; 40008c9c: f2 24 40 00 st %i1, [ %l1 ] next_node->previous = the_node; 40008ca0: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008ca4: 30 80 00 08 b,a 40008cc4 <_Thread_queue_Enqueue_priority+0x18c> 40008ca8: a2 04 60 3c add %l1, 0x3c, %l1 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; 40008cac: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008cb0: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40008cb4: 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; 40008cb8: 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; 40008cbc: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008cc0: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008cc4: 7f ff e4 26 call 40001d5c 40008cc8: b0 10 20 01 mov 1, %i0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008ccc: 81 c7 e0 08 ret 40008cd0: 81 e8 00 00 restore * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 40008cd4: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 * 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; 40008cd8: d0 26 80 00 st %o0, [ %i2 ] return the_thread_queue->sync_state; } 40008cdc: 81 c7 e0 08 ret 40008ce0: 81 e8 00 00 restore 40015aec <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40015aec: 9d e3 bf 88 save %sp, -120, %sp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40015af0: 35 10 00 ef sethi %hi(0x4003bc00), %i2 40015af4: b2 07 bf f4 add %fp, -12, %i1 40015af8: ac 07 bf f8 add %fp, -8, %l6 40015afc: a2 07 bf e8 add %fp, -24, %l1 40015b00: a6 07 bf ec add %fp, -20, %l3 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40015b04: 37 10 00 ef sethi %hi(0x4003bc00), %i3 40015b08: 2b 10 00 ef sethi %hi(0x4003bc00), %l5 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40015b0c: c0 27 bf f8 clr [ %fp + -8 ] 40015b10: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40015b14: f2 27 bf fc st %i1, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40015b18: ec 27 bf f4 st %l6, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40015b1c: e2 27 bf f0 st %l1, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40015b20: e6 27 bf e8 st %l3, [ %fp + -24 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40015b24: b4 16 a1 b4 or %i2, 0x1b4, %i2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40015b28: b6 16 e0 f0 or %i3, 0xf0, %i3 40015b2c: aa 15 60 60 or %l5, 0x60, %l5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b30: a8 06 20 30 add %i0, 0x30, %l4 /* * 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 ); 40015b34: a4 06 20 68 add %i0, 0x68, %l2 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40015b38: b8 06 20 08 add %i0, 8, %i4 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40015b3c: ba 06 20 40 add %i0, 0x40, %i5 _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; 40015b40: ae 10 20 01 mov 1, %l7 { /* * 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; 40015b44: f2 26 20 78 st %i1, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40015b48: c2 06 80 00 ld [ %i2 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40015b4c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b50: 94 10 00 11 mov %l1, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40015b54: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b58: 92 20 40 09 sub %g1, %o1, %o1 40015b5c: 40 00 10 e6 call 40019ef4 <_Watchdog_Adjust_to_chain> 40015b60: 90 10 00 14 mov %l4, %o0 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40015b64: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40015b68: e0 06 c0 00 ld [ %i3 ], %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 ) { 40015b6c: 80 a4 00 0a cmp %l0, %o2 40015b70: 08 80 00 06 bleu 40015b88 <_Timer_server_Body+0x9c> 40015b74: 92 24 00 0a sub %l0, %o2, %o1 /* * 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 ); 40015b78: 90 10 00 12 mov %l2, %o0 40015b7c: 40 00 10 de call 40019ef4 <_Watchdog_Adjust_to_chain> 40015b80: 94 10 00 11 mov %l1, %o2 40015b84: 30 80 00 06 b,a 40015b9c <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 40015b88: 1a 80 00 05 bcc 40015b9c <_Timer_server_Body+0xb0> 40015b8c: 94 22 80 10 sub %o2, %l0, %o2 /* * 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 ); 40015b90: 90 10 00 12 mov %l2, %o0 40015b94: 40 00 10 b1 call 40019e58 <_Watchdog_Adjust> 40015b98: 92 10 20 01 mov 1, %o1 } watchdogs->last_snapshot = snapshot; 40015b9c: 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 ); 40015ba0: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40015ba4: 40 00 02 61 call 40016528 <_Chain_Get> 40015ba8: 01 00 00 00 nop if ( timer == NULL ) { 40015bac: 80 a2 20 00 cmp %o0, 0 40015bb0: 02 80 00 0f be 40015bec <_Timer_server_Body+0x100> 40015bb4: 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 ) { 40015bb8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40015bbc: 80 a0 60 01 cmp %g1, 1 40015bc0: 12 80 00 05 bne 40015bd4 <_Timer_server_Body+0xe8> 40015bc4: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 40015bc8: 92 02 20 10 add %o0, 0x10, %o1 40015bcc: 10 80 00 05 b 40015be0 <_Timer_server_Body+0xf4> 40015bd0: 90 10 00 14 mov %l4, %o0 } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40015bd4: 12 bf ff f3 bne 40015ba0 <_Timer_server_Body+0xb4> 40015bd8: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 40015bdc: 90 10 00 12 mov %l2, %o0 40015be0: 40 00 10 fa call 40019fc8 <_Watchdog_Insert> 40015be4: 01 00 00 00 nop 40015be8: 30 bf ff ee b,a 40015ba0 <_Timer_server_Body+0xb4> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 40015bec: 7f ff e1 4c call 4000e11c 40015bf0: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 40015bf4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40015bf8: 80 a0 40 16 cmp %g1, %l6 40015bfc: 12 80 00 0a bne 40015c24 <_Timer_server_Body+0x138> 40015c00: 01 00 00 00 nop ts->insert_chain = NULL; 40015c04: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 40015c08: 7f ff e1 49 call 4000e12c 40015c0c: 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 ) ) { 40015c10: c2 07 bf e8 ld [ %fp + -24 ], %g1 40015c14: 80 a0 40 13 cmp %g1, %l3 40015c18: 12 80 00 06 bne 40015c30 <_Timer_server_Body+0x144> 40015c1c: 01 00 00 00 nop 40015c20: 30 80 00 1a b,a 40015c88 <_Timer_server_Body+0x19c> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 40015c24: 7f ff e1 42 call 4000e12c <== NOT EXECUTED 40015c28: 01 00 00 00 nop <== NOT EXECUTED 40015c2c: 30 bf ff c7 b,a 40015b48 <_Timer_server_Body+0x5c> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 40015c30: 7f ff e1 3b call 4000e11c 40015c34: 01 00 00 00 nop 40015c38: 84 10 00 08 mov %o0, %g2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40015c3c: 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)) 40015c40: 80 a4 00 13 cmp %l0, %l3 40015c44: 02 80 00 0e be 40015c7c <_Timer_server_Body+0x190> 40015c48: 80 a4 20 00 cmp %l0, 0 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 40015c4c: c2 04 00 00 ld [ %l0 ], %g1 the_chain->first = new_first; 40015c50: c2 27 bf e8 st %g1, [ %fp + -24 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 40015c54: 02 80 00 0a be 40015c7c <_Timer_server_Body+0x190> 40015c58: e2 20 60 04 st %l1, [ %g1 + 4 ] watchdog->state = WATCHDOG_INACTIVE; 40015c5c: c0 24 20 08 clr [ %l0 + 8 ] _ISR_Enable( level ); 40015c60: 7f ff e1 33 call 4000e12c 40015c64: 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 ); 40015c68: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 40015c6c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 40015c70: 9f c0 40 00 call %g1 40015c74: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 } 40015c78: 30 bf ff ee b,a 40015c30 <_Timer_server_Body+0x144> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 40015c7c: 7f ff e1 2c call 4000e12c 40015c80: 90 10 00 02 mov %g2, %o0 40015c84: 30 bf ff b0 b,a 40015b44 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 40015c88: c0 2e 20 7c clrb [ %i0 + 0x7c ] 40015c8c: c2 05 40 00 ld [ %l5 ], %g1 40015c90: 82 00 60 01 inc %g1 40015c94: c2 25 40 00 st %g1, [ %l5 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 40015c98: d0 06 00 00 ld [ %i0 ], %o0 40015c9c: 40 00 0d e5 call 40019430 <_Thread_Set_state> 40015ca0: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 40015ca4: 7f ff ff 68 call 40015a44 <_Timer_server_Reset_interval_system_watchdog> 40015ca8: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40015cac: 7f ff ff 7b call 40015a98 <_Timer_server_Reset_tod_system_watchdog> 40015cb0: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40015cb4: 40 00 0b 38 call 40018994 <_Thread_Enable_dispatch> 40015cb8: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40015cbc: 90 10 00 1c mov %i4, %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; 40015cc0: ee 2e 20 7c stb %l7, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40015cc4: 40 00 11 1e call 4001a13c <_Watchdog_Remove> 40015cc8: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40015ccc: 40 00 11 1c call 4001a13c <_Watchdog_Remove> 40015cd0: 90 10 00 1d mov %i5, %o0 40015cd4: 30 bf ff 9c b,a 40015b44 <_Timer_server_Body+0x58> 400240a0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 400240a0: 81 c3 e0 08 retl <== NOT EXECUTED 400240a4: 90 10 20 00 clr %o0 <== NOT EXECUTED 40019d88 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 40019d88: 9d e3 bf a0 save %sp, -96, %sp 40019d8c: 40 00 06 8a call 4001b7b4 <_fini> 40019d90: 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(); 40019d94: 7f ff ff e1 call 40019d18 40019d98: 01 00 00 00 nop rtems_shutdown_executive(status); 40019d9c: 40 00 00 4c call 40019ecc 40019da0: 90 10 00 18 mov %i0, %o0 40019da4: 30 80 00 00 b,a 40019da4 <_exit+0x1c> <== NOT EXECUTED 40039cd4 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 40039cd4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40039cd8: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40039cdc: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 40039ce0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40039ce4: 7f ff ff 7f call 40039ae0 <== NOT EXECUTED 40039ce8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40039cec: 01 00 00 00 nop 40024074 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 40024074: 81 c3 e0 08 retl <== NOT EXECUTED 40024078: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000b1d0 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000b1d0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000b1d4: 7f ff ff e6 call 4000b16c <== NOT EXECUTED 4000b1d8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000b1dc: 01 00 00 00 nop 40024098 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 40024098: 81 c3 e0 08 retl <== NOT EXECUTED 4002409c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40028274 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 40028274: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40028278: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002827c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40028280: 7f ff ff 62 call 40028008 <== NOT EXECUTED 40028284: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40028288: 01 00 00 00 nop 400284bc <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 400284bc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400284c0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400284c4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400284c8: 7f ff ff c0 call 400283c8 <== NOT EXECUTED 400284cc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400284d0: 01 00 00 00 nop 40019e98 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 40019e98: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40019e9c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40019ea0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40019ea4: 40 00 00 17 call 40019f00 <== NOT EXECUTED 40019ea8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40019eac: 01 00 00 00 nop 4005950c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 4005950c: 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 ); 40059510: 7f fe b9 4b call 40007a3c <== NOT EXECUTED 40059514: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 40059518: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4005951c: 32 80 00 17 bne,a 40059578 <_rename_r+0x6c> <== NOT EXECUTED 40059520: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 40059524: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 40059528: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005952c: 02 80 00 06 be 40059544 <_rename_r+0x38> <== NOT EXECUTED 40059530: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 40059534: 02 80 00 04 be 40059544 <_rename_r+0x38> <== NOT EXECUTED 40059538: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005953c: 12 80 00 07 bne 40059558 <_rename_r+0x4c> <== NOT EXECUTED 40059540: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40059544: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40059548: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 ! 40064b58 <== NOT EXECUTED 4005954c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 40059550: 10 80 00 05 b 40059564 <_rename_r+0x58> <== NOT EXECUTED 40059554: 92 02 60 18 add %o1, 0x18, %o1 <== NOT EXECUTED 40059558: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 <== NOT EXECUTED 4005955c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 40059560: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 40059564: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 40059568: 7f ff a3 b7 call 40042444 <== NOT EXECUTED 4005956c: a2 10 20 00 clr %l1 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 40059570: 10 80 00 0c b 400595a0 <_rename_r+0x94> <== NOT EXECUTED 40059574: 94 10 20 14 mov 0x14, %o2 <== 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, 40059578: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005957c: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 40059580: 96 07 bf d4 add %fp, -44, %o3 <== NOT EXECUTED 40059584: 98 10 20 00 clr %o4 <== NOT EXECUTED 40059588: 7f fe b9 7b call 40007b74 <== NOT EXECUTED 4005958c: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 40059590: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40059594: 12 80 00 2b bne 40059640 <_rename_r+0x134> <== NOT EXECUTED 40059598: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 4005959c: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 400595a0: a6 07 bf e8 add %fp, -24, %l3 <== NOT EXECUTED 400595a4: a4 07 bf d4 add %fp, -44, %l2 <== NOT EXECUTED 400595a8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400595ac: 7f ff a3 a6 call 40042444 <== NOT EXECUTED 400595b0: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED name = old + old_parent_pathlen; 400595b4: b2 06 40 10 add %i1, %l0, %i1 <== NOT EXECUTED 400595b8: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 400595bc: 7f ff b1 fa call 40045da4 <== NOT EXECUTED 400595c0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400595c4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 400595c8: 7f fe b9 0b call 400079f4 <== NOT EXECUTED 400595cc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400595d0: b2 06 40 08 add %i1, %o0, %i1 <== NOT EXECUTED 400595d4: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 400595d8: 7f ff b1 f3 call 40045da4 <== NOT EXECUTED 400595dc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400595e0: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED 400595e4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 400595e8: 94 10 20 00 clr %o2 <== NOT EXECUTED 400595ec: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400595f0: 7f fe b9 25 call 40007a84 <== NOT EXECUTED 400595f4: 98 10 20 00 clr %o4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 400595f8: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 400595fc: 22 80 00 13 be,a 40059648 <_rename_r+0x13c> <== NOT EXECUTED 40059600: c2 4e 80 00 ldsb [ %i2 ], %g1 <== NOT EXECUTED if ( free_old_parentloc ) 40059604: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40059608: 02 80 00 0b be 40059634 <_rename_r+0x128> <== NOT EXECUTED 4005960c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 40059610: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059614: 02 80 00 08 be 40059634 <_rename_r+0x128> <== NOT EXECUTED 40059618: 01 00 00 00 nop <== NOT EXECUTED 4005961c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40059620: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059624: 02 80 00 04 be 40059634 <_rename_r+0x128> <== NOT EXECUTED 40059628: 01 00 00 00 nop <== NOT EXECUTED 4005962c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40059630: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 40059634: 7f ff 96 b1 call 4003f0f8 <__errno> <== NOT EXECUTED 40059638: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005963c: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 40059640: 81 c7 e0 08 ret <== NOT EXECUTED 40059644: 81 e8 00 00 restore <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 40059648: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005964c: 02 80 00 06 be 40059664 <_rename_r+0x158> <== NOT EXECUTED 40059650: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 40059654: 02 80 00 04 be 40059664 <_rename_r+0x158> <== NOT EXECUTED 40059658: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005965c: 12 80 00 0a bne 40059684 <_rename_r+0x178> <== NOT EXECUTED 40059660: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40059664: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40059668: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 ! 40064b58 <== NOT EXECUTED 4005966c: 90 07 bf c0 add %fp, -64, %o0 <== NOT EXECUTED 40059670: 92 02 60 18 add %o1, 0x18, %o1 <== NOT EXECUTED 40059674: 7f ff a3 74 call 40042444 <== NOT EXECUTED 40059678: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005967c: 10 80 00 08 b 4005969c <_rename_r+0x190> <== NOT EXECUTED 40059680: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40059684: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 <== NOT EXECUTED 40059688: 90 07 bf c0 add %fp, -64, %o0 <== NOT EXECUTED 4005968c: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 40059690: 7f ff a3 6d call 40042444 <== NOT EXECUTED 40059694: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 40059698: 90 10 20 00 clr %o0 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 4005969c: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 400596a0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400596a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400596a8: 02 80 00 61 be 4005982c <_rename_r+0x320> <== NOT EXECUTED 400596ac: 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 ); 400596b0: 90 06 80 08 add %i2, %o0, %o0 <== NOT EXECUTED 400596b4: a0 07 bf c0 add %fp, -64, %l0 <== NOT EXECUTED 400596b8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400596bc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if ( result != 0 ) { 400596c0: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 400596c4: 02 80 00 28 be 40059764 <_rename_r+0x258> <== NOT EXECUTED 400596c8: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 400596cc: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 400596d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400596d4: 02 80 00 09 be 400596f8 <_rename_r+0x1ec> <== NOT EXECUTED 400596d8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400596dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400596e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400596e4: 02 80 00 05 be 400596f8 <_rename_r+0x1ec> <== NOT EXECUTED 400596e8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400596ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400596f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 400596f4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400596f8: 02 80 00 0d be 4005972c <_rename_r+0x220> <== NOT EXECUTED 400596fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 40059700: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40059704: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059708: 22 80 00 09 be,a 4005972c <_rename_r+0x220> <== NOT EXECUTED 4005970c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40059710: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40059714: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059718: 22 80 00 05 be,a 4005972c <_rename_r+0x220> <== NOT EXECUTED 4005971c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40059720: 9f c0 40 00 call %g1 <== NOT EXECUTED 40059724: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 40059728: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005972c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059730: 02 80 00 08 be 40059750 <_rename_r+0x244> <== NOT EXECUTED 40059734: 01 00 00 00 nop <== NOT EXECUTED 40059738: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005973c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059740: 02 80 00 04 be 40059750 <_rename_r+0x244> <== NOT EXECUTED 40059744: 01 00 00 00 nop <== NOT EXECUTED 40059748: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005974c: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 40059750: 7f ff 96 6a call 4003f0f8 <__errno> <== NOT EXECUTED 40059754: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40059758: e4 22 00 00 st %l2, [ %o0 ] <== NOT EXECUTED 4005975c: 81 c7 e0 08 ret <== NOT EXECUTED 40059760: 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 ) { 40059764: c6 07 bf e4 ld [ %fp + -28 ], %g3 <== NOT EXECUTED 40059768: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 4005976c: 02 80 00 26 be 40059804 <_rename_r+0x2f8> <== NOT EXECUTED 40059770: c4 07 bf cc ld [ %fp + -52 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 40059774: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40059778: 02 80 00 09 be 4005979c <_rename_r+0x290> <== NOT EXECUTED 4005977c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40059780: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40059784: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059788: 02 80 00 05 be 4005979c <_rename_r+0x290> <== NOT EXECUTED 4005978c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40059790: 9f c0 40 00 call %g1 <== NOT EXECUTED 40059794: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 40059798: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005979c: 02 80 00 0d be 400597d0 <_rename_r+0x2c4> <== NOT EXECUTED 400597a0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 400597a4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400597a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400597ac: 22 80 00 09 be,a 400597d0 <_rename_r+0x2c4> <== NOT EXECUTED 400597b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400597b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400597b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400597bc: 22 80 00 05 be,a 400597d0 <_rename_r+0x2c4> <== NOT EXECUTED 400597c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400597c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400597c8: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 400597cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400597d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400597d4: 02 80 00 08 be 400597f4 <_rename_r+0x2e8> <== NOT EXECUTED 400597d8: 01 00 00 00 nop <== NOT EXECUTED 400597dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400597e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400597e4: 02 80 00 04 be 400597f4 <_rename_r+0x2e8> <== NOT EXECUTED 400597e8: 01 00 00 00 nop <== NOT EXECUTED 400597ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400597f0: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 400597f4: 7f ff 96 41 call 4003f0f8 <__errno> <== NOT EXECUTED 400597f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400597fc: 10 80 00 26 b 40059894 <_rename_r+0x388> <== NOT EXECUTED 40059800: 82 10 20 12 mov 0x12, %g1 <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 40059804: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 <== NOT EXECUTED 40059808: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005980c: 12 80 00 25 bne 400598a0 <_rename_r+0x394> <== NOT EXECUTED 40059810: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 40059814: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40059818: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005981c: 02 80 00 05 be 40059830 <_rename_r+0x324> <== NOT EXECUTED 40059820: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40059824: 9f c0 40 00 call %g1 <== NOT EXECUTED 40059828: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005982c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40059830: 02 80 00 0d be 40059864 <_rename_r+0x358> <== NOT EXECUTED 40059834: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 40059838: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005983c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059840: 22 80 00 09 be,a 40059864 <_rename_r+0x358> <== NOT EXECUTED 40059844: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40059848: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005984c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059850: 22 80 00 05 be,a 40059864 <_rename_r+0x358> <== NOT EXECUTED 40059854: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40059858: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005985c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 40059860: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40059864: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059868: 02 80 00 08 be 40059888 <_rename_r+0x37c> <== NOT EXECUTED 4005986c: 01 00 00 00 nop <== NOT EXECUTED 40059870: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40059874: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059878: 02 80 00 04 be 40059888 <_rename_r+0x37c> <== NOT EXECUTED 4005987c: 01 00 00 00 nop <== NOT EXECUTED 40059880: 9f c0 40 00 call %g1 <== NOT EXECUTED 40059884: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40059888: 7f ff 96 1c call 4003f0f8 <__errno> <== NOT EXECUTED 4005988c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40059890: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40059894: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40059898: 81 c7 e0 08 ret <== NOT EXECUTED 4005989c: 81 e8 00 00 restore <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 400598a0: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 400598a4: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED 400598a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400598ac: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 400598b0: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 400598b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400598b8: 02 80 00 08 be 400598d8 <_rename_r+0x3cc> <== NOT EXECUTED 400598bc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400598c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400598c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400598c8: 02 80 00 05 be 400598dc <_rename_r+0x3d0> <== NOT EXECUTED 400598cc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400598d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400598d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 400598d8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400598dc: 02 80 00 0d be 40059910 <_rename_r+0x404> <== NOT EXECUTED 400598e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 400598e4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400598e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400598ec: 22 80 00 09 be,a 40059910 <_rename_r+0x404> <== NOT EXECUTED 400598f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400598f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400598f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400598fc: 22 80 00 05 be,a 40059910 <_rename_r+0x404> <== NOT EXECUTED 40059900: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40059904: 9f c0 40 00 call %g1 <== NOT EXECUTED 40059908: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005990c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40059910: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059914: 02 80 00 08 be 40059934 <_rename_r+0x428> <== NOT EXECUTED 40059918: 01 00 00 00 nop <== NOT EXECUTED 4005991c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40059920: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40059924: 02 80 00 04 be 40059934 <_rename_r+0x428> <== NOT EXECUTED 40059928: 01 00 00 00 nop <== NOT EXECUTED 4005992c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40059930: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED return result; } 40059934: 81 c7 e0 08 ret <== NOT EXECUTED 40059938: 81 e8 00 00 restore <== NOT EXECUTED 40009488 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40009488: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000948c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40009490: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40009494: 7f ff ff c0 call 40009394 <== NOT EXECUTED 40009498: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000949c: 01 00 00 00 nop 4000e0bc <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4000e0bc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000e0c0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000e0c4: 7f ff ff 58 call 4000de24 <== NOT EXECUTED 4000e0c8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000e0cc: 01 00 00 00 nop 40026c60 : #include int chdir( const char *pathname ) { 40026c60: 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 ); 40026c64: 40 00 7c 50 call 40045da4 40026c68: 90 10 00 18 mov %i0, %o0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40026c6c: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 40026c70: 92 10 00 08 mov %o0, %o1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40026c74: 94 10 20 01 mov 1, %o2 40026c78: 90 10 00 18 mov %i0, %o0 40026c7c: 96 10 00 10 mov %l0, %o3 40026c80: 98 10 20 01 mov 1, %o4 40026c84: 7f ff 83 bc call 40007b74 40026c88: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 40026c8c: 80 a2 20 00 cmp %o0, 0 40026c90: 12 80 00 37 bne 40026d6c 40026c94: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 40026c98: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40026c9c: 80 a0 60 00 cmp %g1, 0 40026ca0: 12 80 00 0c bne 40026cd0 40026ca4: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40026ca8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40026cac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40026cb0: 02 80 00 04 be 40026cc0 <== NOT EXECUTED 40026cb4: 01 00 00 00 nop <== NOT EXECUTED 40026cb8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40026cbc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40026cc0: 40 00 61 0e call 4003f0f8 <__errno> <== NOT EXECUTED 40026cc4: 01 00 00 00 nop <== NOT EXECUTED 40026cc8: 10 80 00 14 b 40026d18 <== NOT EXECUTED 40026ccc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40026cd0: 9f c0 40 00 call %g1 40026cd4: 90 10 00 10 mov %l0, %o0 40026cd8: 80 a2 20 01 cmp %o0, 1 40026cdc: 02 80 00 12 be 40026d24 40026ce0: 03 10 01 92 sethi %hi(0x40064800), %g1 rtems_filesystem_freenode( &loc ); 40026ce4: c2 07 bf f8 ld [ %fp + -8 ], %g1 40026ce8: 80 a0 60 00 cmp %g1, 0 40026cec: 02 80 00 08 be 40026d0c 40026cf0: 01 00 00 00 nop 40026cf4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40026cf8: 80 a0 60 00 cmp %g1, 0 40026cfc: 02 80 00 04 be 40026d0c 40026d00: 01 00 00 00 nop 40026d04: 9f c0 40 00 call %g1 40026d08: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40026d0c: 40 00 60 fb call 4003f0f8 <__errno> 40026d10: 01 00 00 00 nop 40026d14: 82 10 20 14 mov 0x14, %g1 ! 14 40026d18: c2 22 00 00 st %g1, [ %o0 ] 40026d1c: 81 c7 e0 08 ret 40026d20: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 40026d24: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 40026d28: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40026d2c: 80 a0 60 00 cmp %g1, 0 40026d30: 22 80 00 09 be,a 40026d54 40026d34: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40026d38: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006481c <_RTEMS_version+0x2c> 40026d3c: 80 a0 60 00 cmp %g1, 0 40026d40: 22 80 00 05 be,a 40026d54 40026d44: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40026d48: 9f c0 40 00 call %g1 40026d4c: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 40026d50: 03 10 01 92 sethi %hi(0x40064800), %g1 40026d54: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 40064b58 40026d58: 92 07 bf ec add %fp, -20, %o1 40026d5c: 90 02 20 04 add %o0, 4, %o0 40026d60: 94 10 20 14 mov 0x14, %o2 40026d64: 40 00 6d b8 call 40042444 40026d68: b0 10 20 00 clr %i0 return 0; } 40026d6c: 81 c7 e0 08 ret 40026d70: 81 e8 00 00 restore 40007834 : int chmod( const char *path, mode_t mode ) { 40007834: 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 ); 40007838: 40 00 f9 5b call 40045da4 4000783c: 90 10 00 18 mov %i0, %o0 40007840: a0 07 bf ec add %fp, -20, %l0 40007844: 92 10 00 08 mov %o0, %o1 40007848: 94 10 20 00 clr %o2 4000784c: 90 10 00 18 mov %i0, %o0 40007850: 96 10 00 10 mov %l0, %o3 40007854: 98 10 20 01 mov 1, %o4 40007858: 40 00 00 c7 call 40007b74 4000785c: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40007860: 80 a2 20 00 cmp %o0, 0 40007864: 12 80 00 24 bne 400078f4 40007868: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 4000786c: 80 a0 60 00 cmp %g1, 0 40007870: 32 80 00 10 bne,a 400078b0 40007874: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 40007878: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000787c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007880: 02 80 00 08 be 400078a0 <== NOT EXECUTED 40007884: 01 00 00 00 nop <== NOT EXECUTED 40007888: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000788c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007890: 02 80 00 04 be 400078a0 <== NOT EXECUTED 40007894: 01 00 00 00 nop <== NOT EXECUTED 40007898: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000789c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 400078a0: 40 00 de 16 call 4003f0f8 <__errno> <== NOT EXECUTED 400078a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400078a8: 10 80 00 12 b 400078f0 <== NOT EXECUTED 400078ac: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 400078b0: 80 a0 60 00 cmp %g1, 0 400078b4: 12 80 00 12 bne 400078fc 400078b8: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 400078bc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400078c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400078c4: 02 80 00 08 be 400078e4 <== NOT EXECUTED 400078c8: 01 00 00 00 nop <== NOT EXECUTED 400078cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400078d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400078d4: 02 80 00 04 be 400078e4 <== NOT EXECUTED 400078d8: 01 00 00 00 nop <== NOT EXECUTED 400078dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400078e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400078e4: 40 00 de 05 call 4003f0f8 <__errno> <== NOT EXECUTED 400078e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400078ec: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400078f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400078f4: 81 c7 e0 08 ret 400078f8: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 400078fc: 90 10 00 10 mov %l0, %o0 40007900: 9f c0 40 00 call %g1 40007904: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40007908: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000790c: 80 a0 60 00 cmp %g1, 0 40007910: 02 bf ff f9 be 400078f4 40007914: b0 10 00 08 mov %o0, %i0 40007918: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000791c: 80 a0 60 00 cmp %g1, 0 40007920: 02 80 00 04 be 40007930 40007924: 01 00 00 00 nop 40007928: 9f c0 40 00 call %g1 4000792c: 90 10 00 10 mov %l0, %o0 return result; } 40007930: 81 c7 e0 08 ret 40007934: 81 e8 00 00 restore 40026d74 : int chown( const char *path, uid_t owner, gid_t group ) { 40026d74: 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 ) ) 40026d78: 40 00 7c 0b call 40045da4 40026d7c: 90 10 00 18 mov %i0, %o0 40026d80: a0 07 bf ec add %fp, -20, %l0 40026d84: 92 10 00 08 mov %o0, %o1 40026d88: 94 10 20 00 clr %o2 40026d8c: 90 10 00 18 mov %i0, %o0 40026d90: 96 10 00 10 mov %l0, %o3 40026d94: 98 10 20 01 mov 1, %o4 40026d98: 7f ff 83 77 call 40007b74 40026d9c: b0 10 3f ff mov -1, %i0 40026da0: 80 a2 20 00 cmp %o0, 0 40026da4: 12 80 00 10 bne 40026de4 40026da8: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 40026dac: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 40026db0: 80 a0 60 00 cmp %g1, 0 40026db4: 12 80 00 0e bne 40026dec 40026db8: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40026dbc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40026dc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40026dc4: 02 80 00 04 be 40026dd4 <== NOT EXECUTED 40026dc8: 01 00 00 00 nop <== NOT EXECUTED 40026dcc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40026dd0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40026dd4: 40 00 60 c9 call 4003f0f8 <__errno> <== NOT EXECUTED 40026dd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40026ddc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40026de0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40026de4: 81 c7 e0 08 ret 40026de8: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 40026dec: 95 2e a0 10 sll %i2, 0x10, %o2 40026df0: 93 32 60 10 srl %o1, 0x10, %o1 40026df4: 95 32 a0 10 srl %o2, 0x10, %o2 40026df8: 9f c0 40 00 call %g1 40026dfc: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40026e00: c2 07 bf f8 ld [ %fp + -8 ], %g1 40026e04: 80 a0 60 00 cmp %g1, 0 40026e08: 02 bf ff f7 be 40026de4 40026e0c: b0 10 00 08 mov %o0, %i0 40026e10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40026e14: 80 a0 60 00 cmp %g1, 0 40026e18: 02 80 00 04 be 40026e28 40026e1c: 01 00 00 00 nop 40026e20: 9f c0 40 00 call %g1 40026e24: 90 10 00 10 mov %l0, %o0 return result; } 40026e28: 81 c7 e0 08 ret 40026e2c: 81 e8 00 00 restore 40026e30 : #include int chroot( const char *pathname ) { 40026e30: 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) { 40026e34: 23 10 01 92 sethi %hi(0x40064800), %l1 40026e38: e0 04 63 58 ld [ %l1 + 0x358 ], %l0 ! 40064b58 40026e3c: 03 10 01 a2 sethi %hi(0x40068800), %g1 40026e40: 82 10 62 00 or %g1, 0x200, %g1 ! 40068a00 40026e44: 80 a4 00 01 cmp %l0, %g1 40026e48: 12 80 00 0e bne 40026e80 40026e4c: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 40026e50: 40 00 06 71 call 40028814 40026e54: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 40026e58: c2 04 63 58 ld [ %l1 + 0x358 ], %g1 40026e5c: 80 a0 40 10 cmp %g1, %l0 40026e60: 12 80 00 08 bne 40026e80 40026e64: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40026e68: 40 00 60 a4 call 4003f0f8 <__errno> <== NOT EXECUTED 40026e6c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40026e70: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40026e74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40026e78: 81 c7 e0 08 ret <== NOT EXECUTED 40026e7c: 81 e8 00 00 restore <== NOT EXECUTED } result = chdir(pathname); 40026e80: 7f ff ff 78 call 40026c60 40026e84: 90 10 00 18 mov %i0, %o0 if (result) { 40026e88: 80 a2 20 00 cmp %o0, 0 40026e8c: 12 80 00 0b bne 40026eb8 40026e90: 11 10 01 70 sethi %hi(0x4005c000), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 40026e94: 92 10 20 01 mov 1, %o1 40026e98: 90 12 21 b8 or %o0, 0x1b8, %o0 40026e9c: 94 10 20 00 clr %o2 40026ea0: 96 07 bf ec add %fp, -20, %o3 40026ea4: 7f ff 83 34 call 40007b74 40026ea8: 98 10 20 00 clr %o4 40026eac: 80 a2 20 00 cmp %o0, 0 40026eb0: 02 80 00 0a be 40026ed8 40026eb4: 03 10 01 92 sethi %hi(0x40064800), %g1 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 40026eb8: 40 00 60 90 call 4003f0f8 <__errno> <== NOT EXECUTED 40026ebc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40026ec0: 40 00 60 8e call 4003f0f8 <__errno> <== NOT EXECUTED 40026ec4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40026ec8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40026ecc: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 40026ed0: 81 c7 e0 08 ret <== NOT EXECUTED 40026ed4: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 40026ed8: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 40026edc: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 40026ee0: 80 a0 60 00 cmp %g1, 0 40026ee4: 22 80 00 09 be,a 40026f08 40026ee8: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40026eec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006481c <_RTEMS_version+0x2c> 40026ef0: 80 a0 60 00 cmp %g1, 0 40026ef4: 22 80 00 05 be,a 40026f08 40026ef8: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40026efc: 9f c0 40 00 call %g1 40026f00: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_root = loc; 40026f04: 03 10 01 92 sethi %hi(0x40064800), %g1 40026f08: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 40064b58 40026f0c: 92 07 bf ec add %fp, -20, %o1 40026f10: 94 10 20 14 mov 0x14, %o2 40026f14: 90 02 20 18 add %o0, 0x18, %o0 40026f18: 40 00 6d 4b call 40042444 40026f1c: b0 10 20 00 clr %i0 return 0; } 40026f20: 81 c7 e0 08 ret 40026f24: 81 e8 00 00 restore 4000a2bc : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 4000a2bc: 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; 4000a2c0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 4000a2c4: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000a2c8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000a2cc: d2 00 60 0c ld [ %g1 + 0xc ], %o1 4000a2d0: 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; 4000a2d4: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 4000a2d8: 94 07 bf f4 add %fp, -12, %o2 4000a2dc: 40 00 03 40 call 4000afdc 4000a2e0: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 4000a2e4: 80 a2 20 00 cmp %o0, 0 4000a2e8: 02 80 00 05 be 4000a2fc 4000a2ec: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000a2f0: 40 00 00 3c call 4000a3e0 <== NOT EXECUTED 4000a2f4: 01 00 00 00 nop <== NOT EXECUTED 4000a2f8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000a2fc: 81 c7 e0 08 ret 4000a300: 81 e8 00 00 restore 4000a310 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4000a310: 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; 4000a314: e0 06 c0 00 ld [ %i3 ], %l0 if (!device_name_table) 4000a318: 80 a4 20 00 cmp %l0, 0 4000a31c: 02 80 00 05 be 4000a330 4000a320: 27 10 00 3e sethi %hi(0x4000f800), %l3 4000a324: a2 10 20 00 clr %l1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4000a328: 10 80 00 24 b 4000a3b8 4000a32c: a6 14 e1 98 or %l3, 0x198, %l3 } /* 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 ); 4000a330: 40 00 07 2e call 4000bfe8 <__errno> <== NOT EXECUTED 4000a334: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a338: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000a33c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a340: 81 c7 e0 08 ret <== NOT EXECUTED 4000a344: 81 e8 00 00 restore <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4000a348: e4 04 00 00 ld [ %l0 ], %l2 4000a34c: 80 a4 a0 00 cmp %l2, 0 4000a350: 02 80 00 19 be 4000a3b4 4000a354: a2 04 60 01 inc %l1 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4000a358: 92 10 00 12 mov %l2, %o1 4000a35c: 40 00 0a c3 call 4000ce68 4000a360: 94 10 00 19 mov %i1, %o2 4000a364: 80 a2 20 00 cmp %o0, 0 4000a368: 32 80 00 14 bne,a 4000a3b8 4000a36c: a0 04 20 14 add %l0, 0x14, %l0 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4000a370: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1 4000a374: 80 a0 60 00 cmp %g1, 0 4000a378: 32 80 00 10 bne,a 4000a3b8 4000a37c: a0 04 20 14 add %l0, 0x14, %l0 <== NOT EXECUTED /* 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; 4000a380: 03 10 00 3e sethi %hi(0x4000f800), %g1 4000a384: c2 00 63 14 ld [ %g1 + 0x314 ], %g1 ! 4000fb14 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 4000a388: e0 26 c0 00 st %l0, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4000a38c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000a390: 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; 4000a394: 03 10 00 3e sethi %hi(0x4000f800), %g1 4000a398: 82 10 62 c8 or %g1, 0x2c8, %g1 ! 4000fac8 4000a39c: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 4000a3a0: 03 10 00 3e sethi %hi(0x4000f800), %g1 4000a3a4: 82 10 62 80 or %g1, 0x280, %g1 ! 4000fa80 4000a3a8: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4000a3ac: 81 c7 e0 08 ret 4000a3b0: 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 ); for (i = 0; i < rtems_device_table_size; i++) { 4000a3b4: a0 04 20 14 add %l0, 0x14, %l0 4000a3b8: c2 04 c0 00 ld [ %l3 ], %g1 4000a3bc: 80 a4 40 01 cmp %l1, %g1 4000a3c0: 0a bf ff e2 bcs 4000a348 4000a3c4: 90 10 00 18 mov %i0, %o0 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4000a3c8: 40 00 07 08 call 4000bfe8 <__errno> 4000a3cc: b0 10 3f ff mov -1, %i0 4000a3d0: 82 10 20 02 mov 2, %g1 4000a3d4: c2 22 00 00 st %g1, [ %o0 ] } 4000a3d8: 81 c7 e0 08 ret 4000a3dc: 81 e8 00 00 restore 40002bbc : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40002bbc: 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( 40002bc0: 23 10 00 3e sethi %hi(0x4000f800), %l1 40002bc4: c2 04 61 98 ld [ %l1 + 0x198 ], %g1 ! 4000f998 40002bc8: 85 28 60 04 sll %g1, 4, %g2 40002bcc: 83 28 60 02 sll %g1, 2, %g1 40002bd0: 40 00 1c 3c call 40009cc0 <_Workspace_Allocate> 40002bd4: 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) 40002bd8: a0 92 20 00 orcc %o0, 0, %l0 40002bdc: 12 80 00 08 bne 40002bfc 40002be0: c2 04 61 98 ld [ %l1 + 0x198 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40002be4: 40 00 25 01 call 4000bfe8 <__errno> <== NOT EXECUTED 40002be8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002bec: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40002bf0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002bf4: 81 c7 e0 08 ret <== NOT EXECUTED 40002bf8: 81 e8 00 00 restore <== NOT EXECUTED memset( 40002bfc: 92 10 20 00 clr %o1 40002c00: 85 28 60 04 sll %g1, 4, %g2 40002c04: 83 28 60 02 sll %g1, 2, %g1 40002c08: 40 00 27 58 call 4000c968 40002c0c: 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; 40002c10: 03 10 00 3e sethi %hi(0x4000f800), %g1 40002c14: 82 10 62 c8 or %g1, 0x2c8, %g1 ! 4000fac8 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; 40002c18: 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; 40002c1c: c2 26 20 24 st %g1, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = &devFS_ops; 40002c20: 03 10 00 3e sethi %hi(0x4000f800), %g1 40002c24: 82 10 62 80 or %g1, 0x280, %g1 ! 4000fa80 40002c28: 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; } 40002c2c: 81 c7 e0 08 ret 40002c30: 91 e8 20 00 restore %g0, 0, %o0 40002dac : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 40002dac: 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; 40002db0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.command = command; 40002db4: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; status = rtems_io_control( 40002db8: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40002dbc: 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; 40002dc0: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; 40002dc4: f4 27 bf f8 st %i2, [ %fp + -8 ] status = rtems_io_control( 40002dc8: 40 00 10 26 call 40006e60 40002dcc: 94 07 bf f0 add %fp, -16, %o2 np->major, np->minor, (void *) &args ); if ( status ) 40002dd0: 80 a2 20 00 cmp %o0, 0 40002dd4: 22 80 00 06 be,a 40002dec 40002dd8: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 40002ddc: 40 00 1d 81 call 4000a3e0 <== NOT EXECUTED 40002de0: 01 00 00 00 nop <== NOT EXECUTED 40002de4: 81 c7 e0 08 ret <== NOT EXECUTED 40002de8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return args.ioctl_return; } 40002dec: b0 10 00 08 mov %o0, %i0 40002df0: 81 c7 e0 08 ret 40002df4: 81 e8 00 00 restore 40002c34 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40002c34: 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') && 40002c38: c2 4e 00 00 ldsb [ %i0 ], %g1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40002c3c: 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') && 40002c40: 80 a0 60 64 cmp %g1, 0x64 40002c44: 12 80 00 0e bne 40002c7c 40002c48: aa 10 00 19 mov %i1, %l5 40002c4c: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 40002c50: 80 a0 60 65 cmp %g1, 0x65 40002c54: 12 80 00 0b bne 40002c80 40002c58: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 40002c5c: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 40002c60: 80 a0 60 76 cmp %g1, 0x76 40002c64: 12 80 00 07 bne 40002c80 40002c68: 03 00 00 3c sethi %hi(0xf000), %g1 40002c6c: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 40002c70: 80 a0 60 00 cmp %g1, 0 40002c74: 02 80 00 4a be 40002d9c 40002c78: b0 10 20 00 clr %i0 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 40002c7c: 03 00 00 3c sethi %hi(0xf000), %g1 40002c80: b2 0e 40 01 and %i1, %g1, %i1 40002c84: 03 00 00 08 sethi %hi(0x2000), %g1 40002c88: 80 a6 40 01 cmp %i1, %g1 40002c8c: 02 80 00 09 be 40002cb0 40002c90: 03 00 00 18 sethi %hi(0x6000), %g1 40002c94: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40002c98: 22 80 00 07 be,a 40002cb4 <== NOT EXECUTED 40002c9c: e2 07 00 00 ld [ %i4 ], %l1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40002ca0: 40 00 24 d2 call 4000bfe8 <__errno> <== NOT EXECUTED 40002ca4: 01 00 00 00 nop <== NOT EXECUTED 40002ca8: 10 80 00 29 b 40002d4c <== NOT EXECUTED 40002cac: 82 10 20 16 mov 0x16, %g1 ! 16 <== 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; 40002cb0: e2 07 00 00 ld [ %i4 ], %l1 if (!device_name_table) 40002cb4: 80 a4 60 00 cmp %l1, 0 40002cb8: 02 80 00 08 be 40002cd8 40002cbc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40002cc0: 33 10 00 3e sethi %hi(0x4000f800), %i1 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; if (!device_name_table) 40002cc4: a8 10 00 11 mov %l1, %l4 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40002cc8: b2 16 61 98 or %i1, 0x198, %i1 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; if (!device_name_table) 40002ccc: a4 10 3f ff mov -1, %l2 40002cd0: 10 80 00 15 b 40002d24 40002cd4: a6 10 20 00 clr %l3 rtems_set_errno_and_return_minus_one( EFAULT ); 40002cd8: 40 00 24 c4 call 4000bfe8 <__errno> <== NOT EXECUTED 40002cdc: 01 00 00 00 nop <== NOT EXECUTED 40002ce0: 10 80 00 1b b 40002d4c <== NOT EXECUTED 40002ce4: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 40002ce8: d2 05 00 00 ld [ %l4 ], %o1 40002cec: 80 a2 60 00 cmp %o1, 0 40002cf0: 02 80 00 0b be 40002d1c 40002cf4: a8 05 20 14 add %l4, 0x14, %l4 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 40002cf8: 40 00 27 d6 call 4000cc50 40002cfc: 01 00 00 00 nop 40002d00: 80 a2 20 00 cmp %o0, 0 40002d04: 32 80 00 08 bne,a 40002d24 40002d08: a6 04 e0 01 inc %l3 rtems_set_errno_and_return_minus_one( EEXIST ); 40002d0c: 40 00 24 b7 call 4000bfe8 <__errno> <== NOT EXECUTED 40002d10: 01 00 00 00 nop <== NOT EXECUTED 40002d14: 10 80 00 0e b 40002d4c <== NOT EXECUTED 40002d18: 82 10 20 11 mov 0x11, %g1 ! 11 <== NOT EXECUTED 40002d1c: a4 10 00 13 mov %l3, %l2 /* 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++){ 40002d20: a6 04 e0 01 inc %l3 40002d24: c2 06 40 00 ld [ %i1 ], %g1 40002d28: 80 a4 c0 01 cmp %l3, %g1 40002d2c: 0a bf ff ef bcs 40002ce8 40002d30: 90 10 00 10 mov %l0, %o0 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 40002d34: 80 a4 bf ff cmp %l2, -1 40002d38: 12 80 00 08 bne 40002d58 40002d3c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 40002d40: 40 00 24 aa call 4000bfe8 <__errno> <== NOT EXECUTED 40002d44: 01 00 00 00 nop <== NOT EXECUTED 40002d48: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40002d4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002d50: 81 c7 e0 08 ret <== NOT EXECUTED 40002d54: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED _ISR_Disable(level); 40002d58: 7f ff fb 5c call 40001ac8 40002d5c: 01 00 00 00 nop 40002d60: a6 10 00 08 mov %o0, %l3 device_name_table[slot].device_name = (char *)path; 40002d64: 83 2c a0 04 sll %l2, 4, %g1 device_name_table[slot].device_name_length = strlen(path); 40002d68: 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; 40002d6c: a5 2c a0 02 sll %l2, 2, %l2 40002d70: a4 04 80 01 add %l2, %g1, %l2 40002d74: e0 24 40 12 st %l0, [ %l1 + %l2 ] device_name_table[slot].device_name_length = strlen(path); 40002d78: 40 00 28 07 call 4000cd94 40002d7c: a2 04 40 12 add %l1, %l2, %l1 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 40002d80: ea 34 60 10 sth %l5, [ %l1 + 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); 40002d84: d0 24 60 04 st %o0, [ %l1 + 4 ] device_name_table[slot].major = major; 40002d88: f4 24 60 08 st %i2, [ %l1 + 8 ] device_name_table[slot].minor = minor; 40002d8c: f6 24 60 0c st %i3, [ %l1 + 0xc ] device_name_table[slot].mode = mode; _ISR_Enable(level); 40002d90: b0 10 20 00 clr %i0 40002d94: 7f ff fb 51 call 40001ad8 40002d98: 90 10 00 13 mov %l3, %o0 return 0; } 40002d9c: 81 c7 e0 08 ret 40002da0: 81 e8 00 00 restore 40002df8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40002df8: 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; 40002dfc: 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; 40002e00: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = iop->flags; 40002e04: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 40002e08: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 40002e0c: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40002e10: 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; 40002e14: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 40002e18: 94 07 bf f4 add %fp, -12, %o2 40002e1c: 40 00 10 5c call 40006f8c 40002e20: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) 40002e24: 80 a2 20 00 cmp %o0, 0 40002e28: 02 80 00 05 be 40002e3c 40002e2c: 01 00 00 00 nop return rtems_deviceio_errno(status); 40002e30: 40 00 1d 6c call 4000a3e0 <== NOT EXECUTED 40002e34: 01 00 00 00 nop <== NOT EXECUTED 40002e38: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 40002e3c: 81 c7 e0 08 ret 40002e40: 81 e8 00 00 restore 40002e44 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40002e44: 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; 40002e48: 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; 40002e4c: 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; 40002e50: 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; 40002e54: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 40002e58: 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; 40002e5c: 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( 40002e60: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED 40002e64: 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; 40002e68: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; 40002e6c: 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; 40002e70: 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( 40002e74: 40 00 10 5c call 40006fe4 <== NOT EXECUTED 40002e78: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 40002e7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002e80: 22 80 00 06 be,a 40002e98 <== NOT EXECUTED 40002e84: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 40002e88: 40 00 1d 56 call 4000a3e0 <== NOT EXECUTED 40002e8c: 01 00 00 00 nop <== NOT EXECUTED 40002e90: 81 c7 e0 08 ret <== NOT EXECUTED 40002e94: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 40002e98: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40002e9c: 81 c7 e0 08 ret <== NOT EXECUTED 40002ea0: 81 e8 00 00 restore <== NOT EXECUTED 40002ea4 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 40002ea4: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 40002ea8: c2 06 00 00 ld [ %i0 ], %g1 if (!the_dev) 40002eac: 80 a0 60 00 cmp %g1, 0 40002eb0: 32 80 00 08 bne,a 40002ed0 40002eb4: c6 10 60 10 lduh [ %g1 + 0x10 ], %g3 rtems_set_errno_and_return_minus_one( EFAULT ); 40002eb8: 40 00 24 4c call 4000bfe8 <__errno> <== NOT EXECUTED 40002ebc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002ec0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40002ec4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002ec8: 81 c7 e0 08 ret <== NOT EXECUTED 40002ecc: 81 e8 00 00 restore <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 40002ed0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 40002ed4: c2 00 60 08 ld [ %g1 + 8 ], %g1 buf->st_mode = the_dev->mode; 40002ed8: 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 ); 40002edc: c2 26 60 18 st %g1, [ %i1 + 0x18 ] 40002ee0: c4 26 60 1c st %g2, [ %i1 + 0x1c ] buf->st_mode = the_dev->mode; return 0; } 40002ee4: 81 c7 e0 08 ret 40002ee8: 91 e8 20 00 restore %g0, 0, %o0 40002eec : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 40002eec: 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; 40002ef0: 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; 40002ef4: 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; 40002ef8: 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; 40002efc: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; args.bytes_moved = 0; 40002f00: 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; 40002f04: 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( 40002f08: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40002f0c: 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; 40002f10: c4 3f bf e8 std %g2, [ %fp + -24 ] args.buffer = (void *) buffer; 40002f14: 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; 40002f18: 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( 40002f1c: 40 00 10 48 call 4000703c 40002f20: 94 07 bf e0 add %fp, -32, %o2 np->major, np->minor, (void *) &args ); if ( status ) 40002f24: 80 a2 20 00 cmp %o0, 0 40002f28: 22 80 00 06 be,a 40002f40 40002f2c: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 40002f30: 40 00 1d 2c call 4000a3e0 <== NOT EXECUTED 40002f34: 01 00 00 00 nop <== NOT EXECUTED 40002f38: 81 c7 e0 08 ret <== NOT EXECUTED 40002f3c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 40002f40: b0 10 00 08 mov %o0, %i0 40002f44: 81 c7 e0 08 ret 40002f48: 81 e8 00 00 restore 4000c810 : */ int device_close( rtems_libio_t *iop ) { 4000c810: 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; 4000c814: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000c818: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 4000c81c: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000c820: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000c824: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000c828: 94 07 bf f4 add %fp, -12, %o2 4000c82c: 40 00 03 ee call 4000d7e4 4000c830: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000c834: 80 a2 20 00 cmp %o0, 0 4000c838: 02 80 00 05 be 4000c84c 4000c83c: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000c840: 40 00 05 58 call 4000dda0 <== NOT EXECUTED 4000c844: 01 00 00 00 nop <== NOT EXECUTED 4000c848: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000c84c: 81 c7 e0 08 ret 4000c850: 81 e8 00 00 restore 4000c710 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000c710: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000c714: 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; 4000c718: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 4000c71c: 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; 4000c720: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000c724: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000c728: 40 00 04 45 call 4000d83c 4000c72c: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c730: 80 a2 20 00 cmp %o0, 0 4000c734: 22 80 00 06 be,a 4000c74c 4000c738: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 4000c73c: 40 00 05 99 call 4000dda0 <== NOT EXECUTED 4000c740: 01 00 00 00 nop <== NOT EXECUTED 4000c744: 81 c7 e0 08 ret <== NOT EXECUTED 4000c748: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return args.ioctl_return; } 4000c74c: b0 10 00 08 mov %o0, %i0 4000c750: 81 c7 e0 08 ret 4000c754: 81 e8 00 00 restore 4000c854 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000c854: 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; 4000c858: 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; 4000c85c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000c860: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 4000c864: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 4000c868: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 4000c86c: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000c870: 94 07 bf f4 add %fp, -12, %o2 4000c874: 40 00 04 08 call 4000d894 4000c878: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c87c: 80 a2 20 00 cmp %o0, 0 4000c880: 02 80 00 05 be 4000c894 4000c884: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000c888: 40 00 05 46 call 4000dda0 <== NOT EXECUTED 4000c88c: 01 00 00 00 nop <== NOT EXECUTED 4000c890: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 4000c894: 81 c7 e0 08 ret 4000c898: 81 e8 00 00 restore 4000c7b4 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000c7b4: 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; 4000c7b8: 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; 4000c7bc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4000c7c0: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 4000c7c4: 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; 4000c7c8: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000c7cc: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 4000c7d0: 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; 4000c7d4: 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; 4000c7d8: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 4000c7dc: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000c7e0: 40 00 04 43 call 4000d8ec <== NOT EXECUTED 4000c7e4: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c7e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c7ec: 22 80 00 06 be,a 4000c804 <== NOT EXECUTED 4000c7f0: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000c7f4: 40 00 05 6b call 4000dda0 <== NOT EXECUTED 4000c7f8: 01 00 00 00 nop <== NOT EXECUTED 4000c7fc: 81 c7 e0 08 ret <== NOT EXECUTED 4000c800: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000c804: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000c808: 81 c7 e0 08 ret <== NOT EXECUTED 4000c80c: 81 e8 00 00 restore <== NOT EXECUTED 4000c758 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000c758: 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; 4000c75c: 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; 4000c760: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 4000c764: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 4000c768: 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; 4000c76c: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 4000c770: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 4000c774: 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; 4000c778: 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; 4000c77c: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 4000c780: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000c784: 40 00 04 70 call 4000d944 4000c788: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c78c: 80 a2 20 00 cmp %o0, 0 4000c790: 22 80 00 06 be,a 4000c7a8 4000c794: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 4000c798: 40 00 05 82 call 4000dda0 <== NOT EXECUTED 4000c79c: 01 00 00 00 nop <== NOT EXECUTED 4000c7a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c7a4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000c7a8: b0 10 00 08 mov %o0, %i0 4000c7ac: 81 c7 e0 08 ret 4000c7b0: 81 e8 00 00 restore 40004b5c : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40004b5c: 9d e3 bf a0 save %sp, -96, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40004b60: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40004b64: 80 a0 60 00 cmp %g1, 0 40004b68: 02 80 00 1a be 40004bd0 40004b6c: a0 10 00 18 mov %i0, %l0 rtems_interrupt_disable (level); 40004b70: 7f ff f4 77 call 40001d4c <== NOT EXECUTED 40004b74: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40004b78: 10 80 00 0f b 40004bb4 <== NOT EXECUTED 40004b7c: a2 10 20 02 mov 2, %l1 ! 2 <== NOT EXECUTED tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 40004b80: 7f ff f4 77 call 40001d5c <== NOT EXECUTED 40004b84: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40004b88: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 40004b8c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004b90: 40 00 06 58 call 400064f0 <== NOT EXECUTED 40004b94: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004b98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004b9c: 02 80 00 04 be 40004bac <== NOT EXECUTED 40004ba0: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004ba4: 40 00 07 fa call 40006b8c <== NOT EXECUTED 40004ba8: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40004bac: 7f ff f4 68 call 40001d4c <== NOT EXECUTED 40004bb0: 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) { 40004bb4: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 <== NOT EXECUTED 40004bb8: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40004bbc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004bc0: 32 bf ff f0 bne,a 40004b80 <== NOT EXECUTED 40004bc4: e2 24 20 94 st %l1, [ %l0 + 0x94 ] <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 40004bc8: 7f ff f4 65 call 40001d5c <== NOT EXECUTED 40004bcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40004bd0: 81 c7 e0 08 ret 40004bd4: 81 e8 00 00 restore 40003e58 : int dup2( int fildes, int fildes2 ) { 40003e58: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40003e5c: a0 07 bf b8 add %fp, -72, %l0 40003e60: 90 10 00 18 mov %i0, %o0 40003e64: 40 00 01 dc call 400045d4 40003e68: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40003e6c: 80 a2 3f ff cmp %o0, -1 40003e70: 02 80 00 0e be 40003ea8 40003e74: 90 10 3f ff mov -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40003e78: 92 10 00 10 mov %l0, %o1 40003e7c: 40 00 01 d6 call 400045d4 40003e80: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40003e84: 80 a2 3f ff cmp %o0, -1 40003e88: 02 80 00 07 be 40003ea4 40003e8c: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40003e90: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40003e94: 40 00 00 a1 call 40004118 <== NOT EXECUTED 40003e98: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003e9c: 81 c7 e0 08 ret <== NOT EXECUTED 40003ea0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003ea4: 90 10 3f ff mov -1, %o0 } 40003ea8: b0 10 00 08 mov %o0, %i0 40003eac: 81 c7 e0 08 ret 40003eb0: 81 e8 00 00 restore 400045a8 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 400045a8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 400045ac: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 400045b0: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400045b4: 02 80 00 1c be 40004624 <== NOT EXECUTED 400045b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400045bc: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED 400045c0: c4 00 61 54 ld [ %g1 + 0x154 ], %g2 ! 4001b954 <__ctype_ptr__> <== NOT EXECUTED 400045c4: 82 0e 20 ff and %i0, 0xff, %g1 <== NOT EXECUTED 400045c8: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 400045cc: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 400045d0: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 400045d4: 22 80 00 15 be,a 40004628 <== NOT EXECUTED 400045d8: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 400045dc: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 400045e0: 02 80 00 11 be 40004624 <== NOT EXECUTED 400045e4: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED 400045e8: 02 80 00 10 be 40004628 <== NOT EXECUTED 400045ec: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 400045f0: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 400045f4: 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] = '^'; 400045f8: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 400045fc: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 40004600: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40004604: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004608: 7f ff ff 39 call 400042ec <== NOT EXECUTED 4000460c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40004610: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004614: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 40004618: 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')) { 4000461c: 81 c7 e0 08 ret <== NOT EXECUTED 40004620: 81 e8 00 00 restore <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 40004624: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 40004628: 7f ff ff 7d call 4000441c <== NOT EXECUTED 4000462c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004630: 81 c7 e0 08 ret <== NOT EXECUTED 40004634: 81 e8 00 00 restore <== NOT EXECUTED 40027568 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40027568: 03 10 01 a1 sethi %hi(0x40068400), %g1 <== NOT EXECUTED 4002756c: d0 00 62 5c ld [ %g1 + 0x25c ], %o0 ! 4006865c <== NOT EXECUTED 40027570: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027574: 02 80 00 05 be 40027588 <== NOT EXECUTED 40027578: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 4002757c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40027580: 40 00 5f 36 call 4003f258 <== NOT EXECUTED 40027584: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40027588: 81 c3 e0 08 retl <== NOT EXECUTED 4002758c: 01 00 00 00 nop 40027590 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40027590: 03 10 01 a1 sethi %hi(0x40068400), %g1 <== NOT EXECUTED 40027594: d0 00 61 74 ld [ %g1 + 0x174 ], %o0 ! 40068574 <== NOT EXECUTED 40027598: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002759c: 02 80 00 05 be 400275b0 <== NOT EXECUTED 400275a0: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 400275a4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400275a8: 40 00 5f 2c call 4003f258 <== NOT EXECUTED 400275ac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400275b0: 81 c3 e0 08 retl <== NOT EXECUTED 400275b4: 01 00 00 00 nop 40004638 : * 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) { 40004638: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->ccount == 0) 4000463c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 40004640: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004644: 02 80 00 0a be 4000466c <== NOT EXECUTED 40004648: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 4000464c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004650: 02 80 00 7a be 40004838 <== NOT EXECUTED 40004654: 25 10 00 6e sethi %hi(0x4001b800), %l2 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 40004658: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 4000465c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40004660: 32 80 00 05 bne,a 40004674 <== NOT EXECUTED 40004664: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED tty->ccount = 0; 40004668: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 4000466c: 81 c7 e0 08 ret <== NOT EXECUTED 40004670: 81 e8 00 00 restore <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 40004674: 12 80 00 71 bne 40004838 <== NOT EXECUTED 40004678: 25 10 00 6e sethi %hi(0x4001b800), %l2 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 4000467c: 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; 40004680: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40004684: 7f ff ff c9 call 400045a8 <== NOT EXECUTED 40004688: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 4000468c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); 40004690: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 40004694: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004698: 02 bf ff f5 be 4000466c <== NOT EXECUTED 4000469c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 400046a0: 30 80 00 0f b,a 400046dc <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 400046a4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 400046a8: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 400046ac: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 400046b0: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 400046b4: 02 80 00 5c be 40004824 <== NOT EXECUTED 400046b8: e2 08 80 03 ldub [ %g2 + %g3 ], %l1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 400046bc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400046c0: 32 80 00 09 bne,a 400046e4 <== NOT EXECUTED 400046c4: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED 400046c8: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 400046cc: 32 80 00 06 bne,a 400046e4 <== NOT EXECUTED 400046d0: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 400046d4: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED 400046d8: b2 10 00 10 mov %l0, %i1 <== NOT EXECUTED 400046dc: 7f ff ff b3 call 400045a8 <== NOT EXECUTED 400046e0: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == '\t') { 400046e4: 80 a4 60 09 cmp %l1, 9 <== NOT EXECUTED 400046e8: 32 80 00 2a bne,a 40004790 <== NOT EXECUTED 400046ec: c4 04 80 00 ld [ %l2 ], %g2 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 400046f0: 82 08 62 00 and %g1, 0x200, %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 400046f4: e2 04 20 2c ld [ %l0 + 0x2c ], %l1 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 400046f8: da 04 80 00 ld [ %l2 ], %o5 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 400046fc: 10 80 00 13 b 40004748 <== NOT EXECUTED 40004700: 84 10 20 00 clr %g2 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { 40004704: c8 09 00 02 ldub [ %g4 + %g2 ], %g4 <== NOT EXECUTED 40004708: 80 a1 20 09 cmp %g4, 9 <== NOT EXECUTED 4000470c: 12 80 00 04 bne 4000471c <== NOT EXECUTED 40004710: 98 03 40 04 add %o5, %g4, %o4 <== NOT EXECUTED col = (col | 7) + 1; 40004714: 10 80 00 0b b 40004740 <== NOT EXECUTED 40004718: a2 14 60 07 or %l1, 7, %l1 <== NOT EXECUTED } else if (iscntrl (c)) { 4000471c: c8 0b 20 01 ldub [ %o4 + 1 ], %g4 <== NOT EXECUTED 40004720: 80 89 20 20 btst 0x20, %g4 <== NOT EXECUTED 40004724: 22 80 00 08 be,a 40004744 <== NOT EXECUTED 40004728: a2 04 60 01 inc %l1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 4000472c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004730: 32 80 00 05 bne,a 40004744 <== NOT EXECUTED 40004734: a2 04 60 02 add %l1, 2, %l1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 40004738: 10 80 00 04 b 40004748 <== NOT EXECUTED 4000473c: 84 00 a0 01 inc %g2 <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 40004740: a2 04 60 01 inc %l1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 40004744: 84 00 a0 01 inc %g2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004748: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 4000474c: 32 bf ff ee bne,a 40004704 <== NOT EXECUTED 40004750: c8 04 20 1c ld [ %l0 + 0x1c ], %g4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004754: 10 80 00 08 b 40004774 <== NOT EXECUTED 40004758: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 4000475c: 7f ff fe e4 call 400042ec <== NOT EXECUTED 40004760: 01 00 00 00 nop <== NOT EXECUTED tty->column--; 40004764: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004768: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000476c: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004770: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40004774: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40004778: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 4000477c: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40004780: 14 bf ff f7 bg 4000475c <== NOT EXECUTED 40004784: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004788: 10 80 00 28 b 40004828 <== NOT EXECUTED 4000478c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004790: a2 04 60 01 inc %l1 <== NOT EXECUTED 40004794: c4 08 80 11 ldub [ %g2 + %l1 ], %g2 <== NOT EXECUTED 40004798: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 4000479c: 22 80 00 10 be,a 400047dc <== NOT EXECUTED 400047a0: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400047a4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400047a8: 22 80 00 0d be,a 400047dc <== NOT EXECUTED 400047ac: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 400047b0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400047b4: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 400047b8: 7f ff fe cd call 400042ec <== NOT EXECUTED 400047bc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 400047c0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 400047c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400047c8: 22 80 00 05 be,a 400047dc <== NOT EXECUTED 400047cc: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED tty->column--; 400047d0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400047d4: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 400047d8: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 400047dc: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 400047e0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400047e4: 02 80 00 07 be 40004800 <== NOT EXECUTED 400047e8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400047ec: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 400047f0: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400047f4: 02 80 00 0d be 40004828 <== NOT EXECUTED 400047f8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 400047fc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40004800: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004804: 7f ff fe ba call 400042ec <== NOT EXECUTED 40004808: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 4000480c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004810: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004814: 02 80 00 05 be 40004828 <== NOT EXECUTED 40004818: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 4000481c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004820: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } } } if (!lineFlag) 40004824: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004828: 32 80 00 0a bne,a 40004850 <== NOT EXECUTED 4000482c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 40004830: 81 c7 e0 08 ret <== NOT EXECUTED 40004834: 81 e8 00 00 restore <== 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); 40004838: 27 10 00 6a sethi %hi(0x4001a800), %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 4000483c: 29 10 00 6a sethi %hi(0x4001a800), %l4 <== NOT EXECUTED 40004840: a4 14 a1 54 or %l2, 0x154, %l2 <== 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); 40004844: a6 14 e2 e8 or %l3, 0x2e8, %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 40004848: a8 15 22 e0 or %l4, 0x2e0, %l4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 4000484c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 40004850: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40004854: 32 bf ff 94 bne,a 400046a4 <== NOT EXECUTED 40004858: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED 4000485c: 81 c7 e0 08 ret <== NOT EXECUTED 40004860: 81 e8 00 00 restore <== NOT EXECUTED 40039944 : #include int fchdir( int fd ) { 40039944: 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 ); 40039948: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 4003994c: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 40064864 <== NOT EXECUTED 40039950: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40039954: 1a 80 00 0c bcc 40039984 <== NOT EXECUTED 40039958: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4003995c: 03 10 01 a2 sethi %hi(0x40068800), %g1 <== NOT EXECUTED 40039960: e4 00 61 a0 ld [ %g1 + 0x1a0 ], %l2 ! 400689a0 <== NOT EXECUTED 40039964: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40039968: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4003996c: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 40039970: a4 04 80 18 add %l2, %i0, %l2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40039974: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 <== NOT EXECUTED 40039978: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4003997c: 12 80 00 06 bne 40039994 <== NOT EXECUTED 40039980: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40039984: 40 00 15 dd call 4003f0f8 <__errno> <== NOT EXECUTED 40039988: 01 00 00 00 nop <== NOT EXECUTED 4003998c: 10 80 00 1b b 400399f8 <== NOT EXECUTED 40039990: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40039994: 32 80 00 06 bne,a 400399ac <== NOT EXECUTED 40039998: c2 04 a0 28 ld [ %l2 + 0x28 ], %g1 <== NOT EXECUTED 4003999c: 40 00 15 d7 call 4003f0f8 <__errno> <== NOT EXECUTED 400399a0: 01 00 00 00 nop <== NOT EXECUTED 400399a4: 10 80 00 15 b 400399f8 <== NOT EXECUTED 400399a8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 400399ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400399b0: 02 80 00 06 be 400399c8 <== NOT EXECUTED 400399b4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 400399b8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 400399bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400399c0: 32 80 00 06 bne,a 400399d8 <== NOT EXECUTED 400399c4: a4 04 a0 1c add %l2, 0x1c, %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400399c8: 40 00 15 cc call 4003f0f8 <__errno> <== NOT EXECUTED 400399cc: 01 00 00 00 nop <== NOT EXECUTED 400399d0: 10 80 00 0a b 400399f8 <== NOT EXECUTED 400399d4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 400399d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400399dc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400399e0: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 400399e4: 02 80 00 07 be 40039a00 <== NOT EXECUTED 400399e8: 23 10 01 92 sethi %hi(0x40064800), %l1 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 400399ec: 40 00 15 c3 call 4003f0f8 <__errno> <== NOT EXECUTED 400399f0: 01 00 00 00 nop <== NOT EXECUTED 400399f4: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 400399f8: 10 80 00 1c b 40039a68 <== NOT EXECUTED 400399fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 40039a00: e6 04 63 58 ld [ %l1 + 0x358 ], %l3 <== NOT EXECUTED 40039a04: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 40039a08: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED 40039a0c: a0 07 bf d8 add %fp, -40, %l0 <== NOT EXECUTED 40039a10: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40039a14: 40 00 22 8c call 40042444 <== NOT EXECUTED 40039a18: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 40039a1c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40039a20: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 40039a24: 40 00 22 88 call 40042444 <== NOT EXECUTED 40039a28: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 40039a2c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40039a30: 11 10 01 70 sethi %hi(0x4005c000), %o0 <== NOT EXECUTED 40039a34: 94 10 20 00 clr %o2 <== NOT EXECUTED 40039a38: 90 12 21 b8 or %o0, 0x1b8, %o0 <== NOT EXECUTED 40039a3c: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED 40039a40: 7f ff 38 4d call 40007b74 <== NOT EXECUTED 40039a44: 98 10 20 00 clr %o4 <== NOT EXECUTED 40039a48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40039a4c: 02 80 00 09 be 40039a70 <== NOT EXECUTED 40039a50: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 40039a54: d0 04 63 58 ld [ %l1 + 0x358 ], %o0 <== NOT EXECUTED 40039a58: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40039a5c: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40039a60: 40 00 22 79 call 40042444 <== NOT EXECUTED 40039a64: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED return -1; 40039a68: 81 c7 e0 08 ret <== NOT EXECUTED 40039a6c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 40039a70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40039a74: 22 80 00 09 be,a 40039a98 <== NOT EXECUTED 40039a78: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40039a7c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006481c <_RTEMS_version+0x2c> <== NOT EXECUTED 40039a80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40039a84: 22 80 00 05 be,a 40039a98 <== NOT EXECUTED 40039a88: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40039a8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40039a90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 40039a94: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40039a98: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 40064b58 <== NOT EXECUTED 40039a9c: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED 40039aa0: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 40039aa4: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40039aa8: 40 00 22 67 call 40042444 <== NOT EXECUTED 40039aac: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40039ab0: 81 c7 e0 08 ret <== NOT EXECUTED 40039ab4: 81 e8 00 00 restore <== NOT EXECUTED 40027160 : int fchmod( int fd, mode_t mode ) { 40027160: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40027164: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40027168: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 40064864 <== NOT EXECUTED 4002716c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40027170: 1a 80 00 0c bcc 400271a0 <== NOT EXECUTED 40027174: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40027178: 03 10 01 a2 sethi %hi(0x40068800), %g1 <== NOT EXECUTED 4002717c: d0 00 61 a0 ld [ %g1 + 0x1a0 ], %o0 ! 400689a0 <== NOT EXECUTED 40027180: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40027184: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 40027188: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 4002718c: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40027190: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 40027194: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40027198: 12 80 00 06 bne 400271b0 <== NOT EXECUTED 4002719c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 400271a0: 40 00 5f d6 call 4003f0f8 <__errno> <== NOT EXECUTED 400271a4: 01 00 00 00 nop <== NOT EXECUTED 400271a8: 10 80 00 0f b 400271e4 <== NOT EXECUTED 400271ac: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400271b0: 32 80 00 06 bne,a 400271c8 <== NOT EXECUTED 400271b4: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 <== NOT EXECUTED 400271b8: 40 00 5f d0 call 4003f0f8 <__errno> <== NOT EXECUTED 400271bc: 01 00 00 00 nop <== NOT EXECUTED 400271c0: 10 80 00 09 b 400271e4 <== NOT EXECUTED 400271c4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 400271c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400271cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400271d0: 32 80 00 08 bne,a 400271f0 <== NOT EXECUTED 400271d4: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400271d8: 40 00 5f c8 call 4003f0f8 <__errno> <== NOT EXECUTED 400271dc: 01 00 00 00 nop <== NOT EXECUTED 400271e0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400271e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400271e8: 10 80 00 07 b 40027204 <== NOT EXECUTED 400271ec: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 400271f0: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED 400271f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400271f8: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED 400271fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40027200: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 40027204: 81 c7 e0 08 ret <== NOT EXECUTED 40027208: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4002720c : int fchown( int fd, uid_t owner, gid_t group ) { 4002720c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40027210: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40027214: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 40064864 <== NOT EXECUTED 40027218: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002721c: 1a 80 00 0c bcc 4002724c <== NOT EXECUTED 40027220: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40027224: 03 10 01 a2 sethi %hi(0x40068800), %g1 <== NOT EXECUTED 40027228: d0 00 61 a0 ld [ %g1 + 0x1a0 ], %o0 ! 400689a0 <== NOT EXECUTED 4002722c: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40027230: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 40027234: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 40027238: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002723c: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 40027240: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40027244: 12 80 00 06 bne 4002725c <== NOT EXECUTED 40027248: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 4002724c: 40 00 5f ab call 4003f0f8 <__errno> <== NOT EXECUTED 40027250: 01 00 00 00 nop <== NOT EXECUTED 40027254: 10 80 00 0f b 40027290 <== NOT EXECUTED 40027258: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002725c: 32 80 00 06 bne,a 40027274 <== NOT EXECUTED 40027260: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 40027264: 40 00 5f a5 call 4003f0f8 <__errno> <== NOT EXECUTED 40027268: 01 00 00 00 nop <== NOT EXECUTED 4002726c: 10 80 00 09 b 40027290 <== NOT EXECUTED 40027270: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 40027274: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40027278: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002727c: 12 80 00 08 bne 4002729c <== NOT EXECUTED 40027280: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40027284: 40 00 5f 9d call 4003f0f8 <__errno> <== NOT EXECUTED 40027288: 01 00 00 00 nop <== NOT EXECUTED 4002728c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40027290: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40027294: 10 80 00 07 b 400272b0 <== NOT EXECUTED 40027298: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 4002729c: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 400272a0: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED 400272a4: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 400272a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400272ac: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 400272b0: 81 c7 e0 08 ret <== NOT EXECUTED 400272b4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40039ae0 : int fcntl( int fd, int cmd, ... ) { 40039ae0: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40039ae4: 03 10 01 92 sethi %hi(0x40064800), %g1 40039ae8: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 40064864 ... ) { int ret; va_list ap; va_start( ap, cmd ); 40039aec: 84 07 a0 4c add %fp, 0x4c, %g2 40039af0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40039af4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40039af8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40039afc: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40039b00: 80 a6 00 01 cmp %i0, %g1 40039b04: 1a 80 00 0c bcc 40039b34 40039b08: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 40039b0c: 07 10 01 a2 sethi %hi(0x40068800), %g3 40039b10: c6 00 e1 a0 ld [ %g3 + 0x1a0 ], %g3 ! 400689a0 40039b14: 89 2e 20 06 sll %i0, 6, %g4 40039b18: a1 2e 20 03 sll %i0, 3, %l0 40039b1c: a0 04 00 04 add %l0, %g4, %l0 40039b20: a0 00 c0 10 add %g3, %l0, %l0 rtems_libio_check_is_open(iop); 40039b24: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 40039b28: 80 8a 21 00 btst 0x100, %o0 40039b2c: 12 80 00 06 bne 40039b44 40039b30: 80 a6 60 09 cmp %i1, 9 40039b34: 40 00 15 71 call 4003f0f8 <__errno> <== NOT EXECUTED 40039b38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40039b3c: 10 80 00 51 b 40039c80 <== NOT EXECUTED 40039b40: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40039b44: 18 80 00 4c bgu 40039c74 40039b48: 89 2e 60 02 sll %i1, 2, %g4 40039b4c: 1b 10 00 e6 sethi %hi(0x40039800), %o5 40039b50: 9a 13 62 b8 or %o5, 0x2b8, %o5 ! 40039ab8 40039b54: c8 03 40 04 ld [ %o5 + %g4 ], %g4 40039b58: 81 c1 00 00 jmp %g4 40039b5c: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 40039b60: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 40039b64: 80 a0 a0 00 cmp %g2, 0 40039b68: 02 80 00 09 be 40039b8c 40039b6c: 80 a0 80 01 cmp %g2, %g1 diop = rtems_libio_iop( fd2 ); 40039b70: 1a 80 00 0c bcc 40039ba0 <== NOT EXECUTED 40039b74: a2 10 20 00 clr %l1 <== NOT EXECUTED 40039b78: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 40039b7c: a3 28 a0 03 sll %g2, 3, %l1 <== NOT EXECUTED 40039b80: a2 04 40 01 add %l1, %g1, %l1 <== NOT EXECUTED 40039b84: 10 80 00 07 b 40039ba0 <== NOT EXECUTED 40039b88: a2 00 c0 11 add %g3, %l1, %l1 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 40039b8c: 7f ff 39 14 call 40007fdc 40039b90: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 40039b94: a2 92 20 00 orcc %o0, 0, %l1 40039b98: 02 80 00 4d be 40039ccc 40039b9c: 01 00 00 00 nop break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 40039ba0: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 diop->flags = iop->flags; 40039ba4: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 40039ba8: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 diop->file_info = iop->file_info; 40039bac: c4 24 60 3c st %g2, [ %l1 + 0x3c ] diop->flags = iop->flags; 40039bb0: c2 24 60 18 st %g1, [ %l1 + 0x18 ] ret = -1; break; } } diop->handlers = iop->handlers; 40039bb4: c6 24 60 40 st %g3, [ %l1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40039bb8: 90 04 60 1c add %l1, 0x1c, %o0 40039bbc: 92 04 20 1c add %l0, 0x1c, %o1 40039bc0: 40 00 22 21 call 40042444 40039bc4: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 40039bc8: 03 10 01 a2 sethi %hi(0x40068800), %g1 40039bcc: f0 00 61 a0 ld [ %g1 + 0x1a0 ], %i0 ! 400689a0 40039bd0: a2 24 40 18 sub %l1, %i0, %l1 40039bd4: a3 3c 60 03 sra %l1, 3, %l1 40039bd8: 85 2c 60 06 sll %l1, 6, %g2 40039bdc: 83 2c 60 03 sll %l1, 3, %g1 40039be0: 82 20 80 01 sub %g2, %g1, %g1 40039be4: 85 28 60 06 sll %g1, 6, %g2 40039be8: 82 00 40 02 add %g1, %g2, %g1 40039bec: 82 00 40 11 add %g1, %l1, %g1 40039bf0: b1 28 60 0f sll %g1, 0xf, %i0 40039bf4: b0 26 00 01 sub %i0, %g1, %i0 40039bf8: b1 2e 20 03 sll %i0, 3, %i0 40039bfc: 10 80 00 24 b 40039c8c 40039c00: b0 06 00 11 add %i0, %l1, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 40039c04: b1 32 20 0b srl %o0, 0xb, %i0 40039c08: 10 80 00 24 b 40039c98 40039c0c: b0 0e 20 01 and %i0, 1, %i0 * 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 ) ) 40039c10: c2 00 80 00 ld [ %g2 ], %g1 40039c14: 80 a0 60 00 cmp %g1, 0 40039c18: 22 80 00 03 be,a 40039c24 40039c1c: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED 40039c20: 90 12 28 00 or %o0, 0x800, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 40039c24: d0 24 20 18 st %o0, [ %l0 + 0x18 ] 40039c28: 10 80 00 1c b 40039c98 40039c2c: b0 10 20 00 clr %i0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 40039c30: 7f ff 38 80 call 40007e30 40039c34: 01 00 00 00 nop 40039c38: 10 80 00 15 b 40039c8c 40039c3c: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 40039c40: d0 00 80 00 ld [ %g2 ], %o0 40039c44: 7f ff 39 1a call 400080ac 40039c48: b0 10 20 00 clr %i0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 40039c4c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40039c50: 90 0a 22 01 and %o0, 0x201, %o0 40039c54: 82 08 7d fe and %g1, -514, %g1 40039c58: 82 12 00 01 or %o0, %g1, %g1 40039c5c: 10 80 00 0f b 40039c98 40039c60: c2 24 20 18 st %g1, [ %l0 + 0x18 ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 40039c64: 40 00 15 25 call 4003f0f8 <__errno> 40039c68: b0 10 3f ff mov -1, %i0 40039c6c: 10 80 00 05 b 40039c80 40039c70: 82 10 20 86 mov 0x86, %g1 ret = -1; break; default: errno = EINVAL; 40039c74: 40 00 15 21 call 4003f0f8 <__errno> 40039c78: b0 10 3f ff mov -1, %i0 40039c7c: 82 10 20 16 mov 0x16, %g1 40039c80: c2 22 00 00 st %g1, [ %o0 ] 40039c84: 81 c7 e0 08 ret 40039c88: 81 e8 00 00 restore /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 40039c8c: 80 a6 20 00 cmp %i0, 0 40039c90: 06 80 00 0f bl 40039ccc 40039c94: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 40039c98: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40039c9c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 40039ca0: 80 a0 60 00 cmp %g1, 0 40039ca4: 02 bf ff f8 be 40039c84 40039ca8: 92 10 00 10 mov %l0, %o1 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 40039cac: 9f c0 40 00 call %g1 40039cb0: 90 10 00 19 mov %i1, %o0 if (err) { 40039cb4: a0 92 20 00 orcc %o0, 0, %l0 40039cb8: 02 80 00 05 be 40039ccc 40039cbc: 01 00 00 00 nop errno = err; 40039cc0: 40 00 15 0e call 4003f0f8 <__errno> <== NOT EXECUTED 40039cc4: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40039cc8: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 40039ccc: 81 c7 e0 08 ret 40039cd0: 81 e8 00 00 restore 4000ce10 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000ce10: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000ce14: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ce18: d0 00 63 44 ld [ %g1 + 0x344 ], %o0 ! 4001bf44 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000ce1c: a0 10 00 18 mov %i0, %l0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000ce20: 92 10 20 00 clr %o1 4000ce24: 94 10 20 00 clr %o2 4000ce28: 7f ff e5 b2 call 400064f0 4000ce2c: b0 10 3f fc mov -4, %i0 4000ce30: 80 a2 20 00 cmp %o0, 0 4000ce34: 12 80 00 de bne 4000d1ac 4000ce38: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4000ce3c: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (pipe == NULL) { 4000ce40: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000ce44: 32 80 00 49 bne,a 4000cf68 <== NOT EXECUTED 4000ce48: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4000ce4c: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED 4000ce50: 7f ff f9 bc call 4000b540 <== NOT EXECUTED 4000ce54: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 4000ce58: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 4000ce5c: 02 80 00 54 be 4000cfac <== NOT EXECUTED 4000ce60: a2 10 00 12 mov %l2, %l1 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4000ce64: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ce68: 40 00 07 39 call 4000eb4c <== NOT EXECUTED 4000ce6c: 94 10 20 34 mov 0x34, %o2 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4000ce70: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4000ce74: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED 4000ce78: 7f ff f9 b2 call 4000b540 <== NOT EXECUTED 4000ce7c: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED if (! pipe->Buffer) 4000ce80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ce84: 02 80 00 34 be 4000cf54 <== NOT EXECUTED 4000ce88: d0 24 80 00 st %o0, [ %l2 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4000ce8c: 27 10 00 6e sethi %hi(0x4001b800), %l3 <== NOT EXECUTED 4000ce90: d0 4c e1 40 ldsb [ %l3 + 0x140 ], %o0 ! 4001b940 <== NOT EXECUTED 4000ce94: 29 14 12 5c sethi %hi(0x50497000), %l4 <== NOT EXECUTED 4000ce98: 82 15 22 00 or %l4, 0x200, %g1 ! 50497200 <== NOT EXECUTED 4000ce9c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cea0: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000cea4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000cea8: 40 00 01 7e call 4000d4a0 <== NOT EXECUTED 4000ceac: 96 04 a0 2c add %l2, 0x2c, %o3 <== NOT EXECUTED 4000ceb0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ceb4: 32 80 00 26 bne,a 4000cf4c <== NOT EXECUTED 4000ceb8: d0 04 80 00 ld [ %l2 ], %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( 4000cebc: d0 4c e1 40 ldsb [ %l3 + 0x140 ], %o0 <== NOT EXECUTED 4000cec0: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 4000cec4: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 4000cec8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cecc: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000ced0: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000ced4: 40 00 01 73 call 4000d4a0 <== NOT EXECUTED 4000ced8: 96 04 a0 30 add %l2, 0x30, %o3 <== NOT EXECUTED 4000cedc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cee0: 12 80 00 18 bne 4000cf40 <== NOT EXECUTED 4000cee4: a8 15 23 00 or %l4, 0x300, %l4 <== 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( 4000cee8: d0 4c e1 40 ldsb [ %l3 + 0x140 ], %o0 <== NOT EXECUTED 4000ceec: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000cef0: 90 12 00 14 or %o0, %l4, %o0 <== NOT EXECUTED 4000cef4: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000cef8: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000cefc: 7f ff e4 db call 40006268 <== NOT EXECUTED 4000cf00: 98 04 a0 28 add %l2, 0x28, %o4 <== NOT EXECUTED 4000cf04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cf08: 12 80 00 0c bne 4000cf38 <== NOT EXECUTED 4000cf0c: 01 00 00 00 nop <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4000cf10: c2 0c e1 40 ldub [ %l3 + 0x140 ], %g1 <== NOT EXECUTED 4000cf14: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4000cf18: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4000cf1c: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000cf20: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 4000cf24: 12 80 00 10 bne 4000cf64 <== NOT EXECUTED 4000cf28: c4 2c e1 40 stb %g2, [ %l3 + 0x140 ] <== NOT EXECUTED c = 'a'; 4000cf2c: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 4000cf30: 10 80 00 0d b 4000cf64 <== NOT EXECUTED 4000cf34: c2 2c e1 40 stb %g1, [ %l3 + 0x140 ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4000cf38: 40 00 01 88 call 4000d558 <== NOT EXECUTED 4000cf3c: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4000cf40: 40 00 01 86 call 4000d558 <== NOT EXECUTED 4000cf44: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4000cf48: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED 4000cf4c: 7f ff f8 23 call 4000afd8 <== NOT EXECUTED 4000cf50: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 4000cf54: 7f ff f8 21 call 4000afd8 <== NOT EXECUTED 4000cf58: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000cf5c: 10 80 00 15 b 4000cfb0 <== NOT EXECUTED 4000cf60: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000cf64: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000cf68: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cf6c: 7f ff e5 61 call 400064f0 <== NOT EXECUTED 4000cf70: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000cf74: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000cf78: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000cf7c: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000cf80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000cf84: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000cf88: 12 80 00 09 bne 4000cfac <== NOT EXECUTED 4000cf8c: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED if (err) 4000cf90: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000cf94: 22 80 00 06 be,a 4000cfac <== NOT EXECUTED 4000cf98: e2 24 00 00 st %l1, [ %l0 ] <== NOT EXECUTED pipe_free(pipe); 4000cf9c: 7f ff ff 4d call 4000ccd0 <== NOT EXECUTED 4000cfa0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000cfa4: 10 80 00 03 b 4000cfb0 <== NOT EXECUTED 4000cfa8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000cfac: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000cfb0: 7f ff e5 97 call 4000660c <== NOT EXECUTED 4000cfb4: d0 00 63 44 ld [ %g1 + 0x344 ], %o0 ! 4001bf44 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4000cfb8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000cfbc: 12 80 00 7c bne 4000d1ac <== NOT EXECUTED 4000cfc0: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000cfc4: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 4000cfc8: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000cfcc: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000cfd0: 02 80 00 2e be 4000d088 <== NOT EXECUTED 4000cfd4: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED 4000cfd8: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000cfdc: 02 80 00 56 be 4000d134 <== NOT EXECUTED 4000cfe0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000cfe4: 12 80 00 6a bne 4000d18c <== NOT EXECUTED 4000cfe8: 01 00 00 00 nop <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000cfec: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000cff0: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000cff4: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000cff8: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000cffc: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 4000d000: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d004: 12 80 00 05 bne 4000d018 <== NOT EXECUTED 4000d008: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000d00c: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000d010: 40 00 01 6c call 4000d5c0 <== NOT EXECUTED 4000d014: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 4000d018: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000d01c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d020: 12 80 00 5b bne 4000d18c <== NOT EXECUTED 4000d024: 01 00 00 00 nop <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4000d028: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 4000d02c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d030: 12 80 00 57 bne 4000d18c <== NOT EXECUTED 4000d034: 01 00 00 00 nop <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4000d038: e4 04 60 24 ld [ %l1 + 0x24 ], %l2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4000d03c: 7f ff e5 74 call 4000660c <== NOT EXECUTED 4000d040: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000d044: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000d048: 40 00 01 75 call 4000d61c <== NOT EXECUTED 4000d04c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d050: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d054: 12 80 00 52 bne 4000d19c <== NOT EXECUTED 4000d058: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4000d05c: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000d060: 7f ff e5 24 call 400064f0 <== NOT EXECUTED 4000d064: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d068: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d06c: 32 80 00 4d bne,a 4000d1a0 <== NOT EXECUTED 4000d070: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4000d074: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 <== NOT EXECUTED 4000d078: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000d07c: 02 bf ff f0 be 4000d03c <== NOT EXECUTED 4000d080: 01 00 00 00 nop <== NOT EXECUTED 4000d084: 30 80 00 42 b,a 4000d18c <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4000d088: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 4000d08c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d090: 32 80 00 07 bne,a 4000d0ac <== NOT EXECUTED 4000d094: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000d098: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000d09c: 22 80 00 04 be,a 4000d0ac <== NOT EXECUTED 4000d0a0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000d0a4: 10 80 00 3f b 4000d1a0 <== NOT EXECUTED 4000d0a8: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000d0ac: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000d0b0: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000d0b4: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000d0b8: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 4000d0bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d0c0: 12 80 00 05 bne 4000d0d4 <== NOT EXECUTED 4000d0c4: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000d0c8: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000d0cc: 40 00 01 3d call 4000d5c0 <== NOT EXECUTED 4000d0d0: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Readers == 0) { 4000d0d4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 4000d0d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d0dc: 12 80 00 2c bne 4000d18c <== NOT EXECUTED 4000d0e0: 01 00 00 00 nop <== NOT EXECUTED prevCounter = pipe->readerCounter; 4000d0e4: e4 04 60 20 ld [ %l1 + 0x20 ], %l2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4000d0e8: 7f ff e5 49 call 4000660c <== NOT EXECUTED 4000d0ec: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000d0f0: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000d0f4: 40 00 01 4a call 4000d61c <== NOT EXECUTED 4000d0f8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d0fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d100: 12 80 00 27 bne 4000d19c <== NOT EXECUTED 4000d104: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4000d108: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000d10c: 7f ff e4 f9 call 400064f0 <== NOT EXECUTED 4000d110: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d114: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d118: 32 80 00 22 bne,a 4000d1a0 <== NOT EXECUTED 4000d11c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4000d120: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 4000d124: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000d128: 02 bf ff f0 be 4000d0e8 <== NOT EXECUTED 4000d12c: 01 00 00 00 nop <== NOT EXECUTED 4000d130: 30 80 00 17 b,a 4000d18c <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000d134: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000d138: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000d13c: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000d140: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000d144: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 4000d148: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d14c: 12 80 00 05 bne 4000d160 <== NOT EXECUTED 4000d150: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000d154: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000d158: 40 00 01 1a call 4000d5c0 <== NOT EXECUTED 4000d15c: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000d160: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4000d164: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000d168: 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 ++; 4000d16c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000d170: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 4000d174: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d178: 12 80 00 05 bne 4000d18c <== NOT EXECUTED 4000d17c: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000d180: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000d184: 40 00 01 0f call 4000d5c0 <== NOT EXECUTED 4000d188: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4000d18c: 7f ff e5 20 call 4000660c <== NOT EXECUTED 4000d190: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED return 0; 4000d194: 81 c7 e0 08 ret <== NOT EXECUTED 4000d198: 81 e8 00 00 restore <== NOT EXECUTED 4000d19c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4000d1a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000d1a4: 7f ff fe d7 call 4000cd00 <== NOT EXECUTED 4000d1a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 4000d1ac: 81 c7 e0 08 ret 4000d1b0: 81 e8 00 00 restore 4000b514 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000b514: 03 10 01 a2 sethi %hi(0x40068800), %g1 <== NOT EXECUTED 4000b518: 05 10 01 a2 sethi %hi(0x40068800), %g2 <== NOT EXECUTED 4000b51c: c2 00 61 e8 ld [ %g1 + 0x1e8 ], %g1 <== NOT EXECUTED 4000b520: 10 80 00 08 b 4000b540 <== NOT EXECUTED 4000b524: 84 10 a1 ec or %g2, 0x1ec, %g2 <== 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 ) { 4000b528: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 <== NOT EXECUTED 4000b52c: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 4000b530: 32 80 00 04 bne,a 4000b540 <== NOT EXECUTED 4000b534: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000b538: 81 c3 e0 08 retl <== NOT EXECUTED 4000b53c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000b540: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000b544: 32 bf ff f9 bne,a 4000b528 <== NOT EXECUTED 4000b548: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED return true; } } return false; } 4000b54c: 81 c3 e0 08 retl <== NOT EXECUTED 4000b550: 90 10 20 00 clr %o0 <== NOT EXECUTED 400043f8 : long fpathconf( int fd, int name ) { 400043f8: 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); 400043fc: 03 10 00 7e sethi %hi(0x4001f800), %g1 40004400: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 4001f824 40004404: 80 a6 00 01 cmp %i0, %g1 40004408: 1a 80 00 0b bcc 40004434 4000440c: 85 2e 20 06 sll %i0, 6, %g2 iop = rtems_libio_iop(fd); 40004410: 03 10 00 80 sethi %hi(0x40020000), %g1 40004414: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 ! 40020144 40004418: b1 2e 20 03 sll %i0, 3, %i0 4000441c: b0 06 00 02 add %i0, %g2, %i0 40004420: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 40004424: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40004428: 80 88 61 00 btst 0x100, %g1 4000442c: 12 80 00 06 bne 40004444 40004430: 80 88 60 02 btst 2, %g1 40004434: 40 00 31 f2 call 40010bfc <__errno> 40004438: 01 00 00 00 nop 4000443c: 10 80 00 07 b 40004458 40004440: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40004444: 12 80 00 08 bne 40004464 40004448: 80 a6 60 0b cmp %i1, 0xb 4000444c: 40 00 31 ec call 40010bfc <__errno> <== NOT EXECUTED 40004450: 01 00 00 00 nop <== NOT EXECUTED 40004454: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40004458: c2 22 00 00 st %g1, [ %o0 ] 4000445c: 81 c7 e0 08 ret 40004460: 91 e8 3f ff restore %g0, -1, %o0 * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 40004464: 18 80 00 2c bgu 40004514 40004468: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 4000446c: b3 2e 60 02 sll %i1, 2, %i1 40004470: 05 10 00 10 sethi %hi(0x40004000), %g2 40004474: 84 10 a3 c8 or %g2, 0x3c8, %g2 ! 400043c8 40004478: c4 00 80 19 ld [ %g2 + %i1 ], %g2 4000447c: 81 c0 80 00 jmp %g2 40004480: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 40004484: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 40004488: 81 c7 e0 08 ret 4000448c: 81 e8 00 00 restore case _PC_MAX_CANON: return_value = the_limits->max_canon; 40004490: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 40004494: 81 c7 e0 08 ret 40004498: 81 e8 00 00 restore case _PC_MAX_INPUT: return_value = the_limits->max_input; 4000449c: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 400044a0: 81 c7 e0 08 ret 400044a4: 81 e8 00 00 restore case _PC_NAME_MAX: return_value = the_limits->name_max; 400044a8: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 400044ac: 81 c7 e0 08 ret 400044b0: 81 e8 00 00 restore case _PC_PATH_MAX: return_value = the_limits->path_max; 400044b4: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 400044b8: 81 c7 e0 08 ret 400044bc: 81 e8 00 00 restore case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 400044c0: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 400044c4: 81 c7 e0 08 ret 400044c8: 81 e8 00 00 restore case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 400044cc: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 400044d0: 81 c7 e0 08 ret 400044d4: 81 e8 00 00 restore case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 400044d8: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 400044dc: 81 c7 e0 08 ret 400044e0: 81 e8 00 00 restore case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 400044e4: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 400044e8: 81 c7 e0 08 ret 400044ec: 81 e8 00 00 restore case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 400044f0: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 400044f4: 81 c7 e0 08 ret 400044f8: 81 e8 00 00 restore case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 400044fc: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 40004500: 81 c7 e0 08 ret 40004504: 81 e8 00 00 restore case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 40004508: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 4000450c: 81 c7 e0 08 ret 40004510: 81 e8 00 00 restore default: rtems_set_errno_and_return_minus_one( EINVAL ); 40004514: 40 00 31 ba call 40010bfc <__errno> 40004518: b0 10 3f ff mov -1, %i0 4000451c: 82 10 20 16 mov 0x16, %g1 40004520: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 40004524: 81 c7 e0 08 ret 40004528: 81 e8 00 00 restore 4000afd8 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000afd8: 9d e3 bf a0 save %sp, -96, %sp 4000afdc: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000afe0: 82 10 61 08 or %g1, 0x108, %g1 ! 4001c108 4000afe4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4000afe8: b2 10 00 18 mov %i0, %i1 4000afec: 84 00 a0 01 inc %g2 if ( !ptr ) 4000aff0: 80 a6 20 00 cmp %i0, 0 4000aff4: 02 80 00 21 be 4000b078 4000aff8: 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()) && 4000affc: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000b000: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 4001c470 <_System_state_Current> 4000b004: 80 a0 60 03 cmp %g1, 3 4000b008: 12 80 00 09 bne 4000b02c 4000b00c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b010: 40 00 01 26 call 4000b4a8 4000b014: 01 00 00 00 nop 4000b018: 80 8a 20 ff btst 0xff, %o0 4000b01c: 12 80 00 04 bne 4000b02c 4000b020: 03 10 00 6f sethi %hi(0x4001bc00), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000b024: 40 00 01 33 call 4000b4f0 <== NOT EXECUTED 4000b028: 81 e8 00 00 restore <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000b02c: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 4000b030: 80 a0 60 00 cmp %g1, 0 4000b034: 02 80 00 06 be 4000b04c 4000b038: 21 10 00 6d sethi %hi(0x4001b400), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000b03c: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000b040: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b044: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4000b048: 21 10 00 6d sethi %hi(0x4001b400), %l0 <== NOT EXECUTED 4000b04c: d0 04 23 f0 ld [ %l0 + 0x3f0 ], %o0 ! 4001b7f0 4000b050: 40 00 04 73 call 4000c21c <_Protected_heap_Free> 4000b054: 92 10 00 19 mov %i1, %o1 4000b058: 80 8a 20 ff btst 0xff, %o0 4000b05c: 12 80 00 07 bne 4000b078 4000b060: c2 04 23 f0 ld [ %l0 + 0x3f0 ], %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000b064: 31 10 00 6b sethi %hi(0x4001ac00), %i0 <== NOT EXECUTED 4000b068: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000b06c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000b070: 7f ff e3 12 call 40003cb8 <== NOT EXECUTED 4000b074: 91 ee 22 48 restore %i0, 0x248, %o0 <== NOT EXECUTED 4000b078: 81 c7 e0 08 ret 4000b07c: 81 e8 00 00 restore 400286e0 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 400286e0: 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 400286e4: 03 10 01 a2 sethi %hi(0x40068800), %g1 <== NOT EXECUTED 400286e8: 82 10 62 00 or %g1, 0x200, %g1 ! 40068a00 <== NOT EXECUTED 400286ec: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 400286f0: 02 80 00 18 be 40028750 <== NOT EXECUTED 400286f4: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 400286f8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 400286fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028700: 22 80 00 09 be,a 40028724 <== NOT EXECUTED 40028704: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40028708: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002870c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028710: 22 80 00 05 be,a 40028724 <== NOT EXECUTED 40028714: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40028718: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002871c: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 40028720: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40028724: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028728: 02 80 00 08 be 40028748 <== NOT EXECUTED 4002872c: 01 00 00 00 nop <== NOT EXECUTED 40028730: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028734: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028738: 02 80 00 04 be 40028748 <== NOT EXECUTED 4002873c: 01 00 00 00 nop <== NOT EXECUTED 40028740: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028744: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 40028748: 7f ff 7d 34 call 40007c18 <== NOT EXECUTED 4002874c: 81 e8 00 00 restore <== NOT EXECUTED 40028750: 81 c7 e0 08 ret <== NOT EXECUTED 40028754: 81 e8 00 00 restore <== NOT EXECUTED 40019adc : int fstat( int fd, struct stat *sbuf ) { 40019adc: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40019ae0: 80 a6 60 00 cmp %i1, 0 40019ae4: 32 80 00 06 bne,a 40019afc 40019ae8: 03 10 00 6d sethi %hi(0x4001b400), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 40019aec: 7f ff d1 9e call 4000e164 <__errno> 40019af0: 01 00 00 00 nop 40019af4: 10 80 00 12 b 40019b3c 40019af8: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 40019afc: c2 00 63 e4 ld [ %g1 + 0x3e4 ], %g1 40019b00: 80 a6 00 01 cmp %i0, %g1 40019b04: 1a 80 00 0b bcc 40019b30 40019b08: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019b0c: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 4001c0fc 40019b10: 85 2e 20 06 sll %i0, 6, %g2 40019b14: b1 2e 20 03 sll %i0, 3, %i0 40019b18: b0 06 00 02 add %i0, %g2, %i0 40019b1c: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 40019b20: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40019b24: 80 88 61 00 btst 0x100, %g1 40019b28: 32 80 00 08 bne,a 40019b48 40019b2c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 40019b30: 7f ff d1 8d call 4000e164 <__errno> 40019b34: 01 00 00 00 nop 40019b38: 82 10 20 09 mov 9, %g1 ! 9 40019b3c: c2 22 00 00 st %g1, [ %o0 ] 40019b40: 10 80 00 15 b 40019b94 40019b44: 90 10 3f ff mov -1, %o0 rtems_libio_check_is_open(iop); if ( !iop->handlers ) 40019b48: 80 a0 60 00 cmp %g1, 0 40019b4c: 02 bf ff f9 be 40019b30 40019b50: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 40019b54: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40019b58: 80 a0 60 00 cmp %g1, 0 40019b5c: 12 80 00 06 bne 40019b74 40019b60: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019b64: 7f ff d1 80 call 4000e164 <__errno> <== NOT EXECUTED 40019b68: 01 00 00 00 nop <== NOT EXECUTED 40019b6c: 10 bf ff f4 b 40019b3c <== NOT EXECUTED 40019b70: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 40019b74: 94 10 20 48 mov 0x48, %o2 40019b78: 7f ff d3 f5 call 4000eb4c 40019b7c: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 40019b80: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 40019b84: 90 06 20 1c add %i0, 0x1c, %o0 40019b88: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40019b8c: 9f c0 40 00 call %g1 40019b90: 92 10 00 19 mov %i1, %o1 } 40019b94: 81 c7 e0 08 ret 40019b98: 91 e8 00 08 restore %g0, %o0, %o0 40027390 : #include int fsync( int fd ) { 40027390: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40027394: 03 10 01 92 sethi %hi(0x40064800), %g1 40027398: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 40064864 4002739c: 80 a6 00 01 cmp %i0, %g1 400273a0: 1a 80 00 15 bcc 400273f4 400273a4: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 400273a8: 03 10 01 a2 sethi %hi(0x40068800), %g1 400273ac: d0 00 61 a0 ld [ %g1 + 0x1a0 ], %o0 ! 400689a0 400273b0: 83 2e 20 06 sll %i0, 6, %g1 400273b4: b1 2e 20 03 sll %i0, 3, %i0 400273b8: b0 06 00 01 add %i0, %g1, %i0 400273bc: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 400273c0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400273c4: 80 88 61 00 btst 0x100, %g1 400273c8: 02 80 00 0b be 400273f4 400273cc: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400273d0: 32 80 00 06 bne,a 400273e8 400273d4: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 400273d8: 40 00 5f 48 call 4003f0f8 <__errno> 400273dc: 01 00 00 00 nop 400273e0: 10 80 00 0f b 4002741c 400273e4: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 400273e8: 80 a0 60 00 cmp %g1, 0 400273ec: 32 80 00 06 bne,a 40027404 400273f0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 400273f4: 40 00 5f 41 call 4003f0f8 <__errno> <== NOT EXECUTED 400273f8: 01 00 00 00 nop <== NOT EXECUTED 400273fc: 10 80 00 08 b 4002741c <== NOT EXECUTED 40027400: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 40027404: 80 a0 60 00 cmp %g1, 0 40027408: 12 80 00 08 bne 40027428 4002740c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40027410: 40 00 5f 3a call 4003f0f8 <__errno> 40027414: 01 00 00 00 nop 40027418: 82 10 20 86 mov 0x86, %g1 ! 86 4002741c: c2 22 00 00 st %g1, [ %o0 ] 40027420: 10 80 00 04 b 40027430 40027424: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 40027428: 9f c0 40 00 call %g1 4002742c: 01 00 00 00 nop } 40027430: 81 c7 e0 08 ret 40027434: 91 e8 00 08 restore %g0, %o0, %o0 4000b080 : int ftruncate( int fd, off_t length ) { 4000b080: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000b084: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000b088: c2 00 63 e4 ld [ %g1 + 0x3e4 ], %g1 ! 4001b7e4 4000b08c: 80 a6 00 01 cmp %i0, %g1 4000b090: 1a 80 00 0b bcc 4000b0bc 4000b094: 85 2e 20 06 sll %i0, 6, %g2 iop = rtems_libio_iop( fd ); 4000b098: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b09c: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 4001c0fc 4000b0a0: b1 2e 20 03 sll %i0, 3, %i0 4000b0a4: b0 06 00 02 add %i0, %g2, %i0 4000b0a8: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 4000b0ac: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000b0b0: 80 88 61 00 btst 0x100, %g1 4000b0b4: 12 80 00 06 bne 4000b0cc 4000b0b8: a0 07 bf ec add %fp, -20, %l0 4000b0bc: 40 00 0c 2a call 4000e164 <__errno> <== NOT EXECUTED 4000b0c0: 01 00 00 00 nop <== NOT EXECUTED 4000b0c4: 10 80 00 22 b 4000b14c <== NOT EXECUTED 4000b0c8: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000b0cc: 92 06 20 1c add %i0, 0x1c, %o1 4000b0d0: 90 10 00 10 mov %l0, %o0 4000b0d4: 40 00 0e 5f call 4000ea50 4000b0d8: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 4000b0dc: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000b0e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000b0e4: 80 a0 60 00 cmp %g1, 0 4000b0e8: 02 80 00 16 be 4000b140 4000b0ec: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000b0f0: 9f c0 40 00 call %g1 4000b0f4: 90 10 00 10 mov %l0, %o0 4000b0f8: 80 a2 20 01 cmp %o0, 1 4000b0fc: 32 80 00 06 bne,a 4000b114 4000b100: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_set_errno_and_return_minus_one( EISDIR ); 4000b104: 40 00 0c 18 call 4000e164 <__errno> 4000b108: 01 00 00 00 nop 4000b10c: 10 80 00 10 b 4000b14c 4000b110: 82 10 20 15 mov 0x15, %g1 ! 15 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000b114: 80 88 60 04 btst 4, %g1 4000b118: 32 80 00 06 bne,a 4000b130 4000b11c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000b120: 40 00 0c 11 call 4000e164 <__errno> <== NOT EXECUTED 4000b124: 01 00 00 00 nop <== NOT EXECUTED 4000b128: 10 80 00 09 b 4000b14c <== NOT EXECUTED 4000b12c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4000b130: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000b134: 80 a0 60 00 cmp %g1, 0 4000b138: 32 80 00 08 bne,a 4000b158 4000b13c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000b140: 40 00 0c 09 call 4000e164 <__errno> <== NOT EXECUTED 4000b144: 01 00 00 00 nop <== NOT EXECUTED 4000b148: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000b14c: c2 22 00 00 st %g1, [ %o0 ] 4000b150: 10 80 00 05 b 4000b164 4000b154: 90 10 3f ff mov -1, %o0 return (*iop->handlers->ftruncate_h)( iop, length ); 4000b158: 92 10 00 19 mov %i1, %o1 4000b15c: 9f c0 40 00 call %g1 4000b160: 94 10 00 1a mov %i2, %o2 } 4000b164: 81 c7 e0 08 ret 4000b168: 91 e8 00 08 restore %g0, %o0, %o0 400593ec : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 400593ec: 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 ); 400593f0: 03 10 01 92 sethi %hi(0x40064800), %g1 400593f4: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 40064864 400593f8: 80 a6 00 01 cmp %i0, %g1 400593fc: 1a 80 00 08 bcc 4005941c 40059400: a0 10 20 00 clr %l0 40059404: 03 10 01 a2 sethi %hi(0x40068800), %g1 40059408: e0 00 61 a0 ld [ %g1 + 0x1a0 ], %l0 ! 400689a0 4005940c: 83 2e 20 06 sll %i0, 6, %g1 40059410: b1 2e 20 03 sll %i0, 3, %i0 40059414: b0 06 00 01 add %i0, %g1, %i0 40059418: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4005941c: a2 07 bf ec add %fp, -20, %l1 40059420: 92 04 20 1c add %l0, 0x1c, %o1 40059424: 90 10 00 11 mov %l1, %o0 40059428: 7f ff a4 07 call 40042444 4005942c: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 40059430: c2 07 bf f8 ld [ %fp + -8 ], %g1 40059434: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40059438: 80 a0 60 00 cmp %g1, 0 4005943c: 02 80 00 11 be 40059480 40059440: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 40059444: 9f c0 40 00 call %g1 40059448: 90 10 00 11 mov %l1, %o0 4005944c: 80 a2 20 01 cmp %o0, 1 40059450: 22 80 00 08 be,a 40059470 40059454: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40059458: 7f ff 97 28 call 4003f0f8 <__errno> 4005945c: 01 00 00 00 nop 40059460: 82 10 20 14 mov 0x14, %g1 ! 14 40059464: c2 22 00 00 st %g1, [ %o0 ] 40059468: 10 80 00 0d b 4005949c 4005946c: 90 10 3f ff mov -1, %o0 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 40059470: c2 00 60 08 ld [ %g1 + 8 ], %g1 40059474: 80 a0 60 00 cmp %g1, 0 40059478: 32 80 00 06 bne,a 40059490 4005947c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40059480: 7f ff 97 1e call 4003f0f8 <__errno> <== NOT EXECUTED 40059484: 01 00 00 00 nop <== NOT EXECUTED 40059488: 10 bf ff f7 b 40059464 <== NOT EXECUTED 4005948c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 40059490: 92 10 00 19 mov %i1, %o1 40059494: 9f c0 40 00 call %g1 40059498: 94 10 00 1a mov %i2, %o2 } 4005949c: 81 c7 e0 08 ret 400594a0: 91 e8 00 08 restore %g0, %o0, %o0 40027544 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40027544: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40027548: c2 00 63 58 ld [ %g1 + 0x358 ], %g1 ! 40064b58 <== NOT EXECUTED return _POSIX_types_Gid; } 4002754c: 81 c3 e0 08 retl <== NOT EXECUTED 40027550: d0 10 60 32 lduh [ %g1 + 0x32 ], %o0 <== NOT EXECUTED 40027bc0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027bc0: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 40027bc4: 7f ff ff b6 call 40027a9c 40027bc8: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 40027bcc: 11 10 01 68 sethi %hi(0x4005a000), %o0 40027bd0: 13 10 01 90 sethi %hi(0x40064000), %o1 40027bd4: 90 12 23 28 or %o0, 0x328, %o0 40027bd8: 40 00 5f ef call 4003fb94 40027bdc: 92 12 63 48 or %o1, 0x348, %o1 40027be0: a0 92 20 00 orcc %o0, 0, %l0 40027be4: 12 80 00 08 bne 40027c04 40027be8: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 40027bec: 40 00 5d 43 call 4003f0f8 <__errno> <== NOT EXECUTED 40027bf0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027bf4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40027bf8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40027bfc: 81 c7 e0 08 ret <== NOT EXECUTED 40027c00: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40027c04: 94 10 00 1b mov %i3, %o2 40027c08: 96 10 00 1c mov %i4, %o3 40027c0c: 7f ff fe ea call 400277b4 40027c10: 90 10 00 10 mov %l0, %o0 40027c14: 80 a2 20 00 cmp %o0, 0 40027c18: 12 80 00 0a bne 40027c40 40027c1c: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 40027c20: 40 00 5d 36 call 4003f0f8 <__errno> <== NOT EXECUTED 40027c24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027c28: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40027c2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40027c30: 40 00 5d 8a call 4003f258 <== NOT EXECUTED 40027c34: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 40027c38: 81 c7 e0 08 ret <== NOT EXECUTED 40027c3c: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 40027c40: 22 80 00 07 be,a 40027c5c 40027c44: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 40027c48: d0 06 80 00 ld [ %i2 ], %o0 40027c4c: 40 00 76 55 call 400455a0 40027c50: 92 10 00 18 mov %i0, %o1 40027c54: 10 80 00 04 b 40027c64 40027c58: 80 a0 00 08 cmp %g0, %o0 } else { match = (grp->gr_gid == gid); 40027c5c: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40027c60: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40027c64: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 40027c68: 80 a0 60 00 cmp %g1, 0 40027c6c: 02 bf ff e6 be 40027c04 40027c70: 92 10 00 1a mov %i2, %o1 fclose(fp); 40027c74: 90 10 00 10 mov %l0, %o0 40027c78: 40 00 5d 78 call 4003f258 40027c7c: b0 10 20 00 clr %i0 *result = grp; 40027c80: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 40027c84: 81 c7 e0 08 ret 40027c88: 81 e8 00 00 restore 400278f0 : return NULL; return p; } struct group *getgrent(void) { 400278f0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 400278f4: 03 10 01 a1 sethi %hi(0x40068400), %g1 <== NOT EXECUTED 400278f8: d0 00 62 5c ld [ %g1 + 0x25c ], %o0 ! 4006865c <== NOT EXECUTED 400278fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027900: 22 80 00 0c be,a 40027930 <== NOT EXECUTED 40027904: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 40027908: 31 10 01 a1 sethi %hi(0x40068400), %i0 <== NOT EXECUTED 4002790c: 15 10 01 a1 sethi %hi(0x40068400), %o2 <== NOT EXECUTED 40027910: 92 16 23 28 or %i0, 0x328, %o1 <== NOT EXECUTED 40027914: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED 40027918: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002791c: 7f ff ff a6 call 400277b4 <== NOT EXECUTED 40027920: b0 16 23 28 or %i0, 0x328, %i0 <== NOT EXECUTED 40027924: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027928: 22 80 00 02 be,a 40027930 <== NOT EXECUTED 4002792c: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &grent; } 40027930: 81 c7 e0 08 ret <== NOT EXECUTED 40027934: 81 e8 00 00 restore <== NOT EXECUTED 40027cc0 : } struct group *getgrgid( gid_t gid ) { 40027cc0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 40027cc4: 13 10 01 a1 sethi %hi(0x40068400), %o1 <== NOT EXECUTED 40027cc8: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40027ccc: 92 12 63 28 or %o1, 0x328, %o1 <== NOT EXECUTED 40027cd0: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40027cd4: 15 10 01 a1 sethi %hi(0x40068400), %o2 <== NOT EXECUTED 40027cd8: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027cdc: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED 40027ce0: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 40027ce4: 7f ff ff ea call 40027c8c <== NOT EXECUTED 40027ce8: b0 10 20 00 clr %i0 <== NOT EXECUTED 40027cec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027cf0: 22 80 00 02 be,a 40027cf8 <== NOT EXECUTED 40027cf4: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 40027cf8: 81 c7 e0 08 ret <== NOT EXECUTED 40027cfc: 81 e8 00 00 restore <== NOT EXECUTED 40027c8c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027c8c: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40027c90: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40027c94: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027c98: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40027c9c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40027ca0: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40027ca4: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 40027ca8: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 40027cac: 90 10 20 00 clr %o0 <== NOT EXECUTED 40027cb0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40027cb4: 7f ff ff c3 call 40027bc0 <== NOT EXECUTED 40027cb8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40027cbc: 01 00 00 00 nop 4002406c : */ pid_t getpid( void ) { return _Objects_Local_node; } 4002406c: 81 c3 e0 08 retl <== NOT EXECUTED 40024070: 90 10 20 01 mov 1, %o0 ! 1 <== NOT EXECUTED 40027db4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40027db4: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 40027db8: 7f ff ff 39 call 40027a9c 40027dbc: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 40027dc0: 11 10 01 68 sethi %hi(0x4005a000), %o0 40027dc4: 13 10 01 90 sethi %hi(0x40064000), %o1 40027dc8: 90 12 22 70 or %o0, 0x270, %o0 40027dcc: 40 00 5f 72 call 4003fb94 40027dd0: 92 12 63 48 or %o1, 0x348, %o1 40027dd4: a0 92 20 00 orcc %o0, 0, %l0 40027dd8: 12 80 00 08 bne 40027df8 40027ddc: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 40027de0: 40 00 5c c6 call 4003f0f8 <__errno> <== NOT EXECUTED 40027de4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027de8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40027dec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40027df0: 81 c7 e0 08 ret <== NOT EXECUTED 40027df4: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 40027df8: 94 10 00 1b mov %i3, %o2 40027dfc: 96 10 00 1c mov %i4, %o3 40027e00: 7f ff fe ce call 40027938 40027e04: 90 10 00 10 mov %l0, %o0 40027e08: 80 a2 20 00 cmp %o0, 0 40027e0c: 12 80 00 0a bne 40027e34 40027e10: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 40027e14: 40 00 5c b9 call 4003f0f8 <__errno> <== NOT EXECUTED 40027e18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027e1c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40027e20: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40027e24: 40 00 5d 0d call 4003f258 <== NOT EXECUTED 40027e28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 40027e2c: 81 c7 e0 08 ret <== NOT EXECUTED 40027e30: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 40027e34: 22 80 00 07 be,a 40027e50 40027e38: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 40027e3c: d0 06 80 00 ld [ %i2 ], %o0 40027e40: 40 00 75 d8 call 400455a0 40027e44: 92 10 00 18 mov %i0, %o1 40027e48: 10 80 00 04 b 40027e58 40027e4c: 80 a0 00 08 cmp %g0, %o0 } else { match = (pwd->pw_uid == uid); 40027e50: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40027e54: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40027e58: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 40027e5c: 80 a0 60 00 cmp %g1, 0 40027e60: 02 bf ff e6 be 40027df8 40027e64: 92 10 00 1a mov %i2, %o1 fclose(fp); 40027e68: 90 10 00 10 mov %l0, %o0 40027e6c: 40 00 5c fb call 4003f258 40027e70: b0 10 20 00 clr %i0 *result = pwd; 40027e74: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 40027e78: 81 c7 e0 08 ret 40027e7c: 81 e8 00 00 restore 40027a54 : return NULL; return p; } struct passwd *getpwent(void) { 40027a54: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 40027a58: 03 10 01 a1 sethi %hi(0x40068400), %g1 <== NOT EXECUTED 40027a5c: d0 00 61 74 ld [ %g1 + 0x174 ], %o0 ! 40068574 <== NOT EXECUTED 40027a60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027a64: 22 80 00 0c be,a 40027a94 <== NOT EXECUTED 40027a68: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 40027a6c: 31 10 01 a1 sethi %hi(0x40068400), %i0 <== NOT EXECUTED 40027a70: 15 10 01 a1 sethi %hi(0x40068400), %o2 <== NOT EXECUTED 40027a74: 92 16 22 40 or %i0, 0x240, %o1 <== NOT EXECUTED 40027a78: 94 12 a1 78 or %o2, 0x178, %o2 <== NOT EXECUTED 40027a7c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027a80: 7f ff ff ae call 40027938 <== NOT EXECUTED 40027a84: b0 16 22 40 or %i0, 0x240, %i0 <== NOT EXECUTED 40027a88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027a8c: 22 80 00 02 be,a 40027a94 <== NOT EXECUTED 40027a90: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &pwent; } 40027a94: 81 c7 e0 08 ret <== NOT EXECUTED 40027a98: 81 e8 00 00 restore <== NOT EXECUTED 40027eb4 : } struct passwd *getpwuid( uid_t uid ) { 40027eb4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 40027eb8: 13 10 01 a1 sethi %hi(0x40068400), %o1 <== NOT EXECUTED 40027ebc: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40027ec0: 92 12 62 40 or %o1, 0x240, %o1 <== NOT EXECUTED 40027ec4: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40027ec8: 15 10 01 a1 sethi %hi(0x40068400), %o2 <== NOT EXECUTED 40027ecc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027ed0: 94 12 a1 78 or %o2, 0x178, %o2 <== NOT EXECUTED 40027ed4: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 40027ed8: 7f ff ff ea call 40027e80 <== NOT EXECUTED 40027edc: b0 10 20 00 clr %i0 <== NOT EXECUTED 40027ee0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027ee4: 22 80 00 02 be,a 40027eec <== NOT EXECUTED 40027ee8: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 40027eec: 81 c7 e0 08 ret <== NOT EXECUTED 40027ef0: 81 e8 00 00 restore <== NOT EXECUTED 40027e80 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40027e80: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40027e84: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40027e88: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40027e8c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40027e90: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40027e94: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40027e98: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 40027e9c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 40027ea0: 90 10 20 00 clr %o0 <== NOT EXECUTED 40027ea4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40027ea8: 7f ff ff c3 call 40027db4 <== NOT EXECUTED 40027eac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40027eb0: 01 00 00 00 nop 4000b16c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4000b16c: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000b170: 80 a6 20 00 cmp %i0, 0 4000b174: 12 80 00 08 bne 4000b194 4000b178: 01 00 00 00 nop errno = EFAULT; 4000b17c: 40 00 0b fa call 4000e164 <__errno> <== NOT EXECUTED 4000b180: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000b184: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000b188: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4000b18c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b190: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4000b194: 7f ff da ee call 40001d4c 4000b198: 01 00 00 00 nop 4000b19c: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000b1a0: 40 00 02 dd call 4000bd14 <_TOD_Get> 4000b1a4: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 4000b1a8: 7f ff da ed call 40001d5c 4000b1ac: 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; 4000b1b0: 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; 4000b1b4: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 4000b1b8: 92 10 23 e8 mov 0x3e8, %o1 4000b1bc: 40 00 31 7d call 400177b0 <.div> 4000b1c0: c2 26 00 00 st %g1, [ %i0 ] 4000b1c4: 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; } 4000b1c8: 81 c7 e0 08 ret 4000b1cc: 91 e8 20 00 restore %g0, 0, %o0 40007d4c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 40007d4c: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40007d50: c2 00 63 58 ld [ %g1 + 0x358 ], %g1 ! 40064b58 <== NOT EXECUTED return _POSIX_types_Uid; } 40007d54: 81 c3 e0 08 retl <== NOT EXECUTED 40007d58: d0 10 60 30 lduh [ %g1 + 0x30 ], %o0 <== NOT EXECUTED 40013628 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40013628: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4001362c: e0 06 40 00 ld [ %i1 ], %l0 40013630: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40013634: 82 04 20 54 add %l0, 0x54, %g1 40013638: 80 a0 80 01 cmp %g2, %g1 4001363c: 22 80 00 06 be,a 40013654 40013640: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 /* * 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 ); 40013644: 40 00 01 ae call 40013cfc <__errno> 40013648: 01 00 00 00 nop 4001364c: 10 80 00 0d b 40013680 40013650: 82 10 20 5a mov 0x5a, %g1 ! 5a /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 40013654: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40013658: 80 a0 40 10 cmp %g1, %l0 4001365c: 02 80 00 06 be 40013674 40013660: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 40013664: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40013668: 80 a0 60 00 cmp %g1, 0 4001366c: 22 80 00 08 be,a 4001368c 40013670: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 40013674: 40 00 01 a2 call 40013cfc <__errno> 40013678: 01 00 00 00 nop 4001367c: 82 10 20 10 mov 0x10, %g1 ! 10 40013680: c2 22 00 00 st %g1, [ %o0 ] 40013684: 81 c7 e0 08 ret 40013688: 91 e8 3f ff restore %g0, -1, %o0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4001368c: 80 a0 60 00 cmp %g1, 0 40013690: 22 80 00 06 be,a 400136a8 40013694: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40013698: 7f ff d5 f1 call 40008e5c <_Chain_Extract> 4001369c: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 400136a0: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400136a4: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 400136a8: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400136ac: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 400136b0: 90 07 bf f8 add %fp, -8, %o0 400136b4: 7f ff c4 93 call 40004900 400136b8: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 400136bc: 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) ) { 400136c0: 90 10 00 10 mov %l0, %o0 400136c4: 7f ff f4 57 call 40010820 400136c8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 400136cc: 80 a2 20 00 cmp %o0, 0 400136d0: 12 80 00 11 bne 40013714 400136d4: 01 00 00 00 nop 400136d8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 400136dc: 80 a0 60 00 cmp %g1, 0 400136e0: 12 80 00 0d bne 40013714 400136e4: 03 10 00 87 sethi %hi(0x40021c00), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 400136e8: c2 00 60 00 ld [ %g1 ], %g1 400136ec: c4 06 40 00 ld [ %i1 ], %g2 400136f0: c6 00 60 04 ld [ %g1 + 4 ], %g3 400136f4: 80 a0 c0 02 cmp %g3, %g2 400136f8: 22 80 00 02 be,a 40013700 400136fc: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 40013700: 90 10 00 10 mov %l0, %o0 40013704: 7f ff c4 55 call 40004858 40013708: b0 10 20 00 clr %i0 4001370c: 81 c7 e0 08 ret 40013710: 81 e8 00 00 restore } return 0; } 40013714: 81 c7 e0 08 ret 40013718: 91 e8 20 00 restore %g0, 0, %o0 40006f8c : int ioctl( int fd, ioctl_command_t command, ... ) { 40006f8c: 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 ); 40006f90: 03 10 00 87 sethi %hi(0x40021c00), %g1 40006f94: c2 00 63 24 ld [ %g1 + 0x324 ], %g1 ! 40021f24 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40006f98: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40006f9c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40006fa0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40006fa4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40006fa8: 80 a6 00 01 cmp %i0, %g1 40006fac: 1a 80 00 11 bcc 40006ff0 40006fb0: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 40006fb4: 03 10 00 8a sethi %hi(0x40022800), %g1 40006fb8: d0 00 61 20 ld [ %g1 + 0x120 ], %o0 ! 40022920 40006fbc: 83 2e 20 06 sll %i0, 6, %g1 40006fc0: b1 2e 20 03 sll %i0, 3, %i0 40006fc4: b0 06 00 01 add %i0, %g1, %i0 40006fc8: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 40006fcc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 40006fd0: 80 88 61 00 btst 0x100, %g1 40006fd4: 02 80 00 07 be 40006ff0 40006fd8: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 40006fdc: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 40006fe0: c4 27 bf fc st %g2, [ %fp + -4 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 40006fe4: 80 a0 60 00 cmp %g1, 0 40006fe8: 12 80 00 06 bne 40007000 40006fec: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EBADF ); 40006ff0: 40 00 34 39 call 400140d4 <__errno> 40006ff4: 01 00 00 00 nop 40006ff8: 10 80 00 09 b 4000701c 40006ffc: 82 10 20 09 mov 9, %g1 ! 9 if ( !iop->handlers->ioctl_h ) 40007000: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40007004: 80 a0 60 00 cmp %g1, 0 40007008: 12 80 00 08 bne 40007028 4000700c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40007010: 40 00 34 31 call 400140d4 <__errno> <== NOT EXECUTED 40007014: 01 00 00 00 nop <== NOT EXECUTED 40007018: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000701c: c2 22 00 00 st %g1, [ %o0 ] 40007020: 10 80 00 04 b 40007030 40007024: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 40007028: 9f c0 40 00 call %g1 4000702c: 01 00 00 00 nop return rc; } 40007030: 81 c7 e0 08 ret 40007034: 91 e8 00 08 restore %g0, %o0, %o0 40004864 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40004864: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40004868: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 4000486c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004870: 02 80 00 03 be 4000487c <== NOT EXECUTED 40004874: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40004878: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 4000487c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004880: 02 80 00 0c be 400048b0 <== NOT EXECUTED 40004884: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED c = tolower (c); 40004888: 05 10 00 6e sethi %hi(0x4001b800), %g2 <== NOT EXECUTED 4000488c: c4 00 a1 54 ld [ %g2 + 0x154 ], %g2 ! 4001b954 <__ctype_ptr__> <== NOT EXECUTED 40004890: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 40004894: 84 00 80 10 add %g2, %l0, %g2 <== NOT EXECUTED 40004898: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 4000489c: 84 08 a0 03 and %g2, 3, %g2 <== NOT EXECUTED 400048a0: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400048a4: 22 80 00 02 be,a 400048ac <== NOT EXECUTED 400048a8: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED if (c == '\r') { 400048ac: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 400048b0: 80 a0 a0 0d cmp %g2, 0xd <== NOT EXECUTED 400048b4: 12 80 00 09 bne 400048d8 <== NOT EXECUTED 400048b8: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 400048bc: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 400048c0: 12 80 00 5d bne 40004a34 <== NOT EXECUTED 400048c4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 400048c8: 32 80 00 0d bne,a 400048fc <== NOT EXECUTED 400048cc: 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)) { 400048d0: 10 80 00 0c b 40004900 <== NOT EXECUTED 400048d4: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== 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)) { 400048d8: 12 80 00 07 bne 400048f4 <== NOT EXECUTED 400048dc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400048e0: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED 400048e4: 32 80 00 06 bne,a 400048fc <== NOT EXECUTED 400048e8: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 400048ec: 10 80 00 05 b 40004900 <== NOT EXECUTED 400048f0: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 400048f4: 02 80 00 3c be 400049e4 <== NOT EXECUTED 400048f8: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED 400048fc: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40004900: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40004904: 02 80 00 38 be 400049e4 <== NOT EXECUTED 40004908: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 4000490c: c6 0e 60 43 ldub [ %i1 + 0x43 ], %g3 <== NOT EXECUTED 40004910: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED erase (tty, 0); 40004914: 90 10 00 19 mov %i1, %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]) { 40004918: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000491c: 02 80 00 08 be 4000493c <== NOT EXECUTED 40004920: 92 10 20 00 clr %o1 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40004924: c6 0e 60 44 ldub [ %i1 + 0x44 ], %g3 <== NOT EXECUTED 40004928: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000492c: 32 80 00 07 bne,a 40004948 <== NOT EXECUTED 40004930: c6 0e 60 45 ldub [ %i1 + 0x45 ], %g3 <== NOT EXECUTED erase (tty, 1); 40004934: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40004938: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000493c: 7f ff ff 3f call 40004638 <== NOT EXECUTED 40004940: b0 10 20 00 clr %i0 <== NOT EXECUTED 40004944: 30 80 00 3d b,a 40004a38 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40004948: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000494c: 02 80 00 3b be 40004a38 <== NOT EXECUTED 40004950: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40004954: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED 40004958: 32 80 00 0f bne,a 40004994 <== NOT EXECUTED 4000495c: c6 0e 60 4c ldub [ %i1 + 0x4c ], %g3 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 40004960: 80 88 a0 48 btst 0x48, %g2 <== NOT EXECUTED 40004964: 22 80 00 06 be,a 4000497c <== NOT EXECUTED 40004968: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 4000496c: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 40004970: 7f ff ff 0e call 400045a8 <== NOT EXECUTED 40004974: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004978: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 4000497c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40004980: 86 10 20 0a mov 0xa, %g3 <== NOT EXECUTED 40004984: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED 40004988: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000498c: 10 80 00 14 b 400049dc <== NOT EXECUTED 40004990: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 40004994: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40004998: 02 80 00 07 be 400049b4 <== NOT EXECUTED 4000499c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 400049a0: c6 0e 60 51 ldub [ %i1 + 0x51 ], %g3 <== NOT EXECUTED 400049a4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400049a8: 12 80 00 0f bne 400049e4 <== NOT EXECUTED 400049ac: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 400049b0: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 400049b4: 22 80 00 06 be,a 400049cc <== NOT EXECUTED 400049b8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 400049bc: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 400049c0: 7f ff fe fa call 400045a8 <== NOT EXECUTED 400049c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 400049c8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 400049cc: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 400049d0: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 400049d4: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 400049d8: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 400049dc: 81 c7 e0 08 ret <== NOT EXECUTED 400049e0: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 400049e4: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 400049e8: c2 00 60 e8 ld [ %g1 + 0xe8 ], %g1 <== NOT EXECUTED 400049ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400049f0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400049f4: 16 80 00 11 bge 40004a38 <== NOT EXECUTED 400049f8: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 400049fc: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004a00: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40004a04: 22 80 00 06 be,a 40004a1c <== NOT EXECUTED 40004a08: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40004a0c: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004a10: 7f ff fe e6 call 400045a8 <== NOT EXECUTED 40004a14: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004a18: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004a1c: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40004a20: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40004a24: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40004a28: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40004a2c: 81 c7 e0 08 ret <== NOT EXECUTED 40004a30: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40004a34: b0 10 20 00 clr %i0 <== NOT EXECUTED } return 0; } 40004a38: 81 c7 e0 08 ret <== NOT EXECUTED 40004a3c: 81 e8 00 00 restore <== NOT EXECUTED 40024090 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 40024090: 81 c3 e0 08 retl <== NOT EXECUTED 40024094: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 40019d18 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 40019d18: 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())) 40019d1c: 03 10 00 71 sethi %hi(0x4001c400), %g1 40019d20: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 4001c470 <_System_state_Current> 40019d24: 80 a0 60 03 cmp %g1, 3 40019d28: 12 80 00 16 bne 40019d80 40019d2c: 03 10 00 6c sethi %hi(0x4001b000), %g1 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 40019d30: 23 10 00 6e sethi %hi(0x4001b800), %l1 40019d34: e0 00 63 b8 ld [ %g1 + 0x3b8 ], %l0 40019d38: c2 04 61 58 ld [ %l1 + 0x158 ], %g1 40019d3c: 80 a0 40 10 cmp %g1, %l0 40019d40: 22 80 00 06 be,a 40019d58 40019d44: 21 10 00 6e sethi %hi(0x4001b800), %l0 _wrapup_reent(_global_impure_ptr); 40019d48: 40 00 01 83 call 4001a354 <_wrapup_reent> 40019d4c: 90 10 00 10 mov %l0, %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; 40019d50: e0 24 61 58 st %l0, [ %l1 + 0x158 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 40019d54: 21 10 00 6e sethi %hi(0x4001b800), %l0 40019d58: c2 04 21 58 ld [ %l0 + 0x158 ], %g1 ! 4001b958 <_impure_ptr> 40019d5c: 7f ff d1 5a call 4000e2c4 40019d60: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 40019d64: c2 04 21 58 ld [ %l0 + 0x158 ], %g1 40019d68: 7f ff d1 57 call 4000e2c4 40019d6c: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40019d70: c2 04 21 58 ld [ %l0 + 0x158 ], %g1 40019d74: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40019d78: 7f ff d1 53 call 4000e2c4 40019d7c: 81 e8 00 00 restore 40019d80: 81 c7 e0 08 ret <== NOT EXECUTED 40019d84: 81 e8 00 00 restore <== NOT EXECUTED 40028008 : int link( const char *existing, const char *new ) { 40028008: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 4002800c: 40 00 77 66 call 40045da4 40028010: 90 10 00 18 mov %i0, %o0 40028014: 94 10 20 00 clr %o2 40028018: 92 10 00 08 mov %o0, %o1 4002801c: 96 07 bf e8 add %fp, -24, %o3 40028020: 90 10 00 18 mov %i0, %o0 40028024: 98 10 20 01 mov 1, %o4 40028028: 7f ff 7e d3 call 40007b74 4002802c: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 40028030: 80 a2 20 00 cmp %o0, 0 40028034: 12 80 00 8e bne 4002826c 40028038: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4002803c: c2 4e 40 00 ldsb [ %i1 ], %g1 40028040: 80 a0 60 5c cmp %g1, 0x5c 40028044: 02 80 00 06 be 4002805c 40028048: 80 a0 60 2f cmp %g1, 0x2f 4002804c: 02 80 00 04 be 4002805c 40028050: 80 a0 60 00 cmp %g1, 0 40028054: 12 80 00 0a bne 4002807c 40028058: 03 10 01 92 sethi %hi(0x40064800), %g1 4002805c: 03 10 01 92 sethi %hi(0x40064800), %g1 40028060: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 ! 40064b58 40028064: 90 07 bf d4 add %fp, -44, %o0 40028068: 92 02 60 18 add %o1, 0x18, %o1 4002806c: 40 00 68 f6 call 40042444 40028070: 94 10 20 14 mov 0x14, %o2 40028074: 10 80 00 08 b 40028094 40028078: 90 10 20 01 mov 1, %o0 4002807c: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 40028080: 90 07 bf d4 add %fp, -44, %o0 40028084: 92 02 60 04 add %o1, 4, %o1 40028088: 40 00 68 ef call 40042444 4002808c: 94 10 20 14 mov 0x14, %o2 40028090: 90 10 20 00 clr %o0 if ( !parent_loc.ops->evalformake_h ) { 40028094: c2 07 bf e0 ld [ %fp + -32 ], %g1 40028098: c2 00 60 04 ld [ %g1 + 4 ], %g1 4002809c: 80 a0 60 00 cmp %g1, 0 400280a0: 32 80 00 0b bne,a 400280cc 400280a4: 90 06 40 08 add %i1, %o0, %o0 rtems_filesystem_freenode( &existing_loc ); 400280a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400280ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400280b0: 02 80 00 51 be 400281f4 <== NOT EXECUTED 400280b4: 01 00 00 00 nop <== NOT EXECUTED 400280b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400280bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400280c0: 12 80 00 4b bne 400281ec <== NOT EXECUTED 400280c4: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 400280c8: 30 80 00 4b b,a 400281f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 400280cc: 94 07 bf fc add %fp, -4, %o2 400280d0: b2 07 bf d4 add %fp, -44, %i1 400280d4: 9f c0 40 00 call %g1 400280d8: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 400280dc: a0 92 20 00 orcc %o0, 0, %l0 400280e0: 02 80 00 11 be 40028124 400280e4: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &existing_loc ); 400280e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400280ec: 80 a0 60 00 cmp %g1, 0 400280f0: 02 80 00 08 be 40028110 400280f4: 01 00 00 00 nop 400280f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400280fc: 80 a0 60 00 cmp %g1, 0 40028100: 02 80 00 04 be 40028110 40028104: 01 00 00 00 nop 40028108: 9f c0 40 00 call %g1 4002810c: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( result ); 40028110: 40 00 5b fa call 4003f0f8 <__errno> 40028114: b0 10 3f ff mov -1, %i0 40028118: e0 22 00 00 st %l0, [ %o0 ] 4002811c: 81 c7 e0 08 ret 40028120: 81 e8 00 00 restore /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 40028124: c4 07 bf e4 ld [ %fp + -28 ], %g2 40028128: 80 a0 80 01 cmp %g2, %g1 4002812c: 02 80 00 1a be 40028194 40028130: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &existing_loc ); 40028134: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028138: 80 a0 60 00 cmp %g1, 0 4002813c: 22 80 00 09 be,a 40028160 40028140: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40028144: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028148: 80 a0 60 00 cmp %g1, 0 4002814c: 22 80 00 05 be,a 40028160 40028150: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40028154: 9f c0 40 00 call %g1 40028158: 90 07 bf e8 add %fp, -24, %o0 rtems_filesystem_freenode( &parent_loc ); 4002815c: c2 07 bf e0 ld [ %fp + -32 ], %g1 40028160: 80 a0 60 00 cmp %g1, 0 40028164: 02 80 00 08 be 40028184 40028168: 01 00 00 00 nop 4002816c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028170: 80 a0 60 00 cmp %g1, 0 40028174: 02 80 00 04 be 40028184 40028178: 01 00 00 00 nop 4002817c: 9f c0 40 00 call %g1 40028180: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 40028184: 40 00 5b dd call 4003f0f8 <__errno> 40028188: b0 10 3f ff mov -1, %i0 4002818c: 10 80 00 1d b 40028200 40028190: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 40028194: c2 00 60 08 ld [ %g1 + 8 ], %g1 40028198: 80 a0 60 00 cmp %g1, 0 4002819c: 12 80 00 1c bne 4002820c 400281a0: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &existing_loc ); 400281a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400281a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400281ac: 22 80 00 09 be,a 400281d0 <== NOT EXECUTED 400281b0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400281b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400281b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400281bc: 22 80 00 05 be,a 400281d0 <== NOT EXECUTED 400281c0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400281c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400281c8: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 400281cc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400281d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400281d4: 02 80 00 08 be 400281f4 <== NOT EXECUTED 400281d8: 01 00 00 00 nop <== NOT EXECUTED 400281dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400281e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400281e4: 02 80 00 04 be 400281f4 <== NOT EXECUTED 400281e8: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 400281ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400281f0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400281f4: 40 00 5b c1 call 4003f0f8 <__errno> <== NOT EXECUTED 400281f8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400281fc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028200: c2 22 00 00 st %g1, [ %o0 ] 40028204: 81 c7 e0 08 ret 40028208: 81 e8 00 00 restore } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 4002820c: 92 10 00 19 mov %i1, %o1 40028210: b2 07 bf e8 add %fp, -24, %i1 40028214: 9f c0 40 00 call %g1 40028218: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 4002821c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028220: 80 a0 60 00 cmp %g1, 0 40028224: 02 80 00 08 be 40028244 40028228: b0 10 00 08 mov %o0, %i0 4002822c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028230: 80 a0 60 00 cmp %g1, 0 40028234: 22 80 00 05 be,a 40028248 40028238: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4002823c: 9f c0 40 00 call %g1 40028240: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 40028244: c2 07 bf e0 ld [ %fp + -32 ], %g1 40028248: 80 a0 60 00 cmp %g1, 0 4002824c: 02 80 00 08 be 4002826c 40028250: 01 00 00 00 nop 40028254: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028258: 80 a0 60 00 cmp %g1, 0 4002825c: 02 80 00 04 be 4002826c 40028260: 01 00 00 00 nop 40028264: 9f c0 40 00 call %g1 40028268: 90 07 bf d4 add %fp, -44, %o0 return result; } 4002826c: 81 c7 e0 08 ret 40028270: 81 e8 00 00 restore 40019bc8 : off_t lseek( int fd, off_t offset, int whence ) { 40019bc8: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40019bcc: 03 10 00 6d sethi %hi(0x4001b400), %g1 40019bd0: c2 00 63 e4 ld [ %g1 + 0x3e4 ], %g1 ! 4001b7e4 off_t lseek( int fd, off_t offset, int whence ) { 40019bd4: 96 10 00 1b mov %i3, %o3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40019bd8: 80 a6 00 01 cmp %i0, %g1 off_t lseek( int fd, off_t offset, int whence ) { 40019bdc: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40019be0: 1a 80 00 0c bcc 40019c10 40019be4: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 40019be8: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019bec: e0 00 60 fc ld [ %g1 + 0xfc ], %l0 ! 4001c0fc 40019bf0: 83 2e 20 06 sll %i0, 6, %g1 40019bf4: b1 2e 20 03 sll %i0, 3, %i0 40019bf8: b0 06 00 01 add %i0, %g1, %i0 40019bfc: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 40019c00: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40019c04: 80 88 61 00 btst 0x100, %g1 40019c08: 32 80 00 06 bne,a 40019c20 40019c0c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40019c10: 7f ff d1 55 call 4000e164 <__errno> <== NOT EXECUTED 40019c14: 01 00 00 00 nop <== NOT EXECUTED 40019c18: 10 80 00 1e b 40019c90 <== NOT EXECUTED 40019c1c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 40019c20: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40019c24: 80 a0 60 00 cmp %g1, 0 40019c28: 12 80 00 06 bne 40019c40 40019c2c: 80 a6 e0 01 cmp %i3, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019c30: 7f ff d1 4d call 4000e164 <__errno> <== NOT EXECUTED 40019c34: 01 00 00 00 nop <== NOT EXECUTED 40019c38: 10 80 00 16 b 40019c90 <== NOT EXECUTED 40019c3c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40019c40: 02 80 00 09 be 40019c64 40019c44: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 40019c48: 80 a6 e0 02 cmp %i3, 2 40019c4c: 02 80 00 09 be 40019c70 40019c50: 80 a6 e0 00 cmp %i3, 0 40019c54: 12 80 00 0c bne 40019c84 40019c58: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; break; 40019c5c: 10 80 00 12 b 40019ca4 40019c60: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] case SEEK_CUR: iop->offset += offset; 40019c64: 9a 86 80 13 addcc %i2, %l3, %o5 40019c68: 10 80 00 05 b 40019c7c 40019c6c: 98 46 40 12 addx %i1, %l2, %o4 break; case SEEK_END: iop->offset = iop->size + offset; 40019c70: d8 1c 20 08 ldd [ %l0 + 8 ], %o4 40019c74: 9a 86 80 0d addcc %i2, %o5, %o5 40019c78: 98 46 40 0c addx %i1, %o4, %o4 break; 40019c7c: 10 80 00 0a b 40019ca4 40019c80: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] default: rtems_set_errno_and_return_minus_one( EINVAL ); 40019c84: 7f ff d1 38 call 4000e164 <__errno> 40019c88: 01 00 00 00 nop 40019c8c: 82 10 20 16 mov 0x16, %g1 ! 16 40019c90: c2 22 00 00 st %g1, [ %o0 ] 40019c94: 11 3f ff ff sethi %hi(0xfffffc00), %o0 40019c98: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 40019c9c: 10 80 00 0e b 40019cd4 40019ca0: 92 10 00 08 mov %o0, %o1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 40019ca4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40019ca8: 92 10 00 02 mov %g2, %o1 40019cac: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40019cb0: 94 10 00 03 mov %g3, %o2 40019cb4: 9f c0 40 00 call %g1 40019cb8: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 40019cbc: 80 a2 3f ff cmp %o0, -1 40019cc0: 12 80 00 06 bne 40019cd8 40019cc4: b2 10 00 09 mov %o1, %i1 40019cc8: 80 a2 7f ff cmp %o1, -1 40019ccc: 22 80 00 03 be,a 40019cd8 40019cd0: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40019cd4: b2 10 00 09 mov %o1, %i1 40019cd8: 81 c7 e0 08 ret 40019cdc: 91 e8 00 08 restore %g0, %o0, %o0 400283c8 : int _STAT_NAME( const char *path, struct stat *buf ) { 400283c8: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 400283cc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400283d0: 12 80 00 06 bne 400283e8 <== NOT EXECUTED 400283d4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 400283d8: 40 00 5b 48 call 4003f0f8 <__errno> <== NOT EXECUTED 400283dc: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400283e0: 10 80 00 20 b 40028460 <== NOT EXECUTED 400283e4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 400283e8: 40 00 76 6f call 40045da4 <== NOT EXECUTED 400283ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400283f0: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 400283f4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 400283f8: 94 10 20 00 clr %o2 <== NOT EXECUTED 400283fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028400: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40028404: 98 10 20 00 clr %o4 <== NOT EXECUTED 40028408: 7f ff 7d db call 40007b74 <== NOT EXECUTED 4002840c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 40028410: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028414: 12 80 00 14 bne 40028464 <== NOT EXECUTED 40028418: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 4002841c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40028420: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028424: 12 80 00 12 bne 4002846c <== NOT EXECUTED 40028428: 92 10 20 00 clr %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002842c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40028430: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028434: 02 80 00 08 be 40028454 <== NOT EXECUTED 40028438: 01 00 00 00 nop <== NOT EXECUTED 4002843c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028440: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028444: 02 80 00 04 be 40028454 <== NOT EXECUTED 40028448: 01 00 00 00 nop <== NOT EXECUTED 4002844c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028450: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028454: 40 00 5b 29 call 4003f0f8 <__errno> <== NOT EXECUTED 40028458: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002845c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028460: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028464: 81 c7 e0 08 ret <== NOT EXECUTED 40028468: 81 e8 00 00 restore <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 4002846c: 94 10 20 48 mov 0x48, %o2 <== NOT EXECUTED 40028470: 40 00 68 88 call 40042690 <== NOT EXECUTED 40028474: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 40028478: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002847c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40028480: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40028484: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028488: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4002848c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40028490: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028494: 02 bf ff f4 be 40028464 <== NOT EXECUTED 40028498: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4002849c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400284a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400284a4: 02 80 00 04 be 400284b4 <== NOT EXECUTED 400284a8: 01 00 00 00 nop <== NOT EXECUTED 400284ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400284b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 400284b4: 81 c7 e0 08 ret <== NOT EXECUTED 400284b8: 81 e8 00 00 restore <== NOT EXECUTED 4000b540 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000b540: 9d e3 bf a0 save %sp, -96, %sp 4000b544: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b548: 82 10 61 08 or %g1, 0x108, %g1 ! 4001c108 4000b54c: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000b550: a0 10 00 18 mov %i0, %l0 4000b554: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000b558: 7f ff ff ed call 4000b50c 4000b55c: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 4000b560: 80 a6 20 00 cmp %i0, 0 4000b564: 02 80 00 36 be 4000b63c 4000b568: 03 10 00 71 sethi %hi(0x4001c400), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000b56c: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 4001c470 <_System_state_Current> 4000b570: 80 a0 60 03 cmp %g1, 3 4000b574: 12 80 00 07 bne 4000b590 4000b578: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000b57c: 7f ff ff cb call 4000b4a8 4000b580: 01 00 00 00 nop 4000b584: 80 8a 20 ff btst 0xff, %o0 4000b588: 02 80 00 2d be 4000b63c 4000b58c: 03 10 00 6d sethi %hi(0x4001b400), %g1 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4000b590: d0 00 63 f0 ld [ %g1 + 0x3f0 ], %o0 ! 4001b7f0 4000b594: 92 10 00 10 mov %l0, %o1 4000b598: 94 10 20 00 clr %o2 4000b59c: 40 00 03 12 call 4000c1e4 <_Protected_heap_Allocate_aligned_with_boundary> 4000b5a0: 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 ) { 4000b5a4: b0 92 20 00 orcc %o0, 0, %i0 4000b5a8: 12 80 00 13 bne 4000b5f4 4000b5ac: a2 10 00 18 mov %i0, %l1 if (rtems_malloc_sbrk_helpers) 4000b5b0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b5b4: c2 00 62 1c ld [ %g1 + 0x21c ], %g1 ! 4001be1c 4000b5b8: 80 a0 60 00 cmp %g1, 0 4000b5bc: 02 80 00 08 be 4000b5dc 4000b5c0: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000b5c4: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b5c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b5cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000b5d0: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000b5d4: 12 80 00 09 bne 4000b5f8 <== NOT EXECUTED 4000b5d8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED errno = ENOMEM; 4000b5dc: 40 00 0a e2 call 4000e164 <__errno> 4000b5e0: 01 00 00 00 nop 4000b5e4: 82 10 20 0c mov 0xc, %g1 ! c 4000b5e8: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4000b5ec: 81 c7 e0 08 ret 4000b5f0: 81 e8 00 00 restore } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4000b5f4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b5f8: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 4001be20 4000b5fc: 80 a0 60 00 cmp %g1, 0 4000b600: 02 80 00 05 be 4000b614 4000b604: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000b608: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000b60c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b610: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000b614: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b618: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 4001be18 4000b61c: 80 a0 60 00 cmp %g1, 0 4000b620: 02 bf ff f3 be 4000b5ec 4000b624: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000b628: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b62c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b630: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b634: 81 c7 e0 08 ret <== NOT EXECUTED 4000b638: 81 e8 00 00 restore <== NOT EXECUTED 4000b63c: b0 10 20 00 clr %i0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000b640: 81 c7 e0 08 ret <== NOT EXECUTED 4000b644: 81 e8 00 00 restore <== NOT EXECUTED 4000b4f0 : 4000b4f0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4000b4f4: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000b4f8: 90 12 21 4c or %o0, 0x14c, %o0 ! 4001c54c <== NOT EXECUTED 4000b4fc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000b500: 7f ff ee 63 call 40006e8c <_Chain_Append> <== NOT EXECUTED 4000b504: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000b508: 01 00 00 00 nop 4000b50c : void malloc_deferred_frees_process(void) { 4000b50c: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4000b510: 21 10 00 71 sethi %hi(0x4001c400), %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) 4000b514: 10 80 00 04 b 4000b524 4000b518: a0 14 21 4c or %l0, 0x14c, %l0 ! 4001c54c free(to_be_freed); 4000b51c: 7f ff fe af call 4000afd8 <== NOT EXECUTED 4000b520: 01 00 00 00 nop <== NOT EXECUTED 4000b524: 40 00 01 91 call 4000bb68 <_Chain_Get> 4000b528: 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) 4000b52c: 80 a2 20 00 cmp %o0, 0 4000b530: 12 bf ff fb bne 4000b51c 4000b534: 01 00 00 00 nop free(to_be_freed); } 4000b538: 81 c7 e0 08 ret 4000b53c: 81 e8 00 00 restore 400126c0 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 400126c0: 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) ) { 400126c4: 7f ff f8 57 call 40010820 400126c8: 90 10 00 18 mov %i0, %o0 400126cc: 80 a2 20 00 cmp %o0, 0 400126d0: 12 80 00 13 bne 4001271c 400126d4: 01 00 00 00 nop 400126d8: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 400126dc: 80 a0 60 00 cmp %g1, 0 400126e0: 12 80 00 0f bne 4001271c 400126e4: 03 10 00 87 sethi %hi(0x40021c00), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 400126e8: c2 00 60 00 ld [ %g1 ], %g1 400126ec: c4 00 60 04 ld [ %g1 + 4 ], %g2 400126f0: 80 a0 80 18 cmp %g2, %i0 400126f4: 22 80 00 02 be,a 400126fc 400126f8: 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) 400126fc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012700: 80 a0 60 06 cmp %g1, 6 40012704: 02 80 00 04 be 40012714 40012708: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 4001270c: 7f ff ff 8c call 4001253c 40012710: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 40012714: 7f ff c8 51 call 40004858 40012718: 90 10 00 18 mov %i0, %o0 } return 0; } 4001271c: 81 c7 e0 08 ret 40012720: 91 e8 20 00 restore %g0, 0, %o0 40012474 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40012474: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 40012478: 80 a6 20 00 cmp %i0, 0 4001247c: 32 80 00 0a bne,a 400124a4 40012480: e0 06 00 00 ld [ %i0 ], %l0 40012484: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40012488: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 4001248c: 17 10 00 84 sethi %hi(0x40021000), %o3 <== NOT EXECUTED 40012490: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40012494: 94 12 a2 b0 or %o2, 0x2b0, %o2 <== NOT EXECUTED 40012498: 96 12 e1 98 or %o3, 0x198, %o3 <== NOT EXECUTED 4001249c: 7f ff c7 f9 call 40004480 <__assert_func> <== NOT EXECUTED 400124a0: 92 10 21 b3 mov 0x1b3, %o1 <== NOT EXECUTED * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 400124a8: a2 10 20 00 clr %l1 if ( b[i] ) { 400124ac: 80 a2 20 00 cmp %o0, 0 400124b0: 02 80 00 05 be 400124c4 400124b4: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 400124b8: 7f ff ff 2a call 40012160 400124bc: 01 00 00 00 nop b[i] = 0; 400124c0: 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 400124d0: d0 04 00 00 ld [ %l0 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 400124d4: 7f ff ff 23 call 40012160 400124d8: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 400124dc: c0 26 00 00 clr [ %i0 ] } 400124e0: 81 c7 e0 08 ret 400124e4: 81 e8 00 00 restore 400129d4 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 400129d4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 400129d8: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 400129dc: 92 10 00 19 mov %i1, %o1 * 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 ) 400129e0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400129e4: 80 a0 40 19 cmp %g1, %i1 400129e8: 06 80 00 09 bl 40012a0c 400129ec: 94 10 00 1a mov %i2, %o2 400129f0: 80 a0 40 19 cmp %g1, %i1 400129f4: 32 80 00 0a bne,a 40012a1c 400129f8: d2 24 20 50 st %o1, [ %l0 + 0x50 ] <== NOT EXECUTED 400129fc: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40012a00: 80 a0 40 1a cmp %g1, %i2 40012a04: 3a 80 00 06 bcc,a 40012a1c 40012a08: d2 24 20 50 st %o1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 40012a0c: 7f ff ff 8f call 40012848 <== NOT EXECUTED 40012a10: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40012a14: 81 c7 e0 08 ret <== NOT EXECUTED 40012a18: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 40012a1c: d4 24 20 54 st %o2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 40012a20: d2 26 20 08 st %o1, [ %i0 + 8 ] 40012a24: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 40012a28: 90 07 bf f8 add %fp, -8, %o0 40012a2c: 7f ff c7 b5 call 40004900 40012a30: 92 10 20 00 clr %o1 40012a34: c2 07 bf f8 ld [ %fp + -8 ], %g1 40012a38: 90 10 20 00 clr %o0 40012a3c: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 40012a40: b0 10 00 08 mov %o0, %i0 40012a44: 81 c7 e0 08 ret 40012a48: 81 e8 00 00 restore 40012a4c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 40012a4c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40012a50: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 40012a54: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40012a58: 80 a0 60 06 cmp %g1, 6 40012a5c: 32 80 00 11 bne,a 40012aa0 40012a60: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 40012a64: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40012a68: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 <== NOT EXECUTED 40012a6c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40012a70: 14 80 00 09 bg 40012a94 <== NOT EXECUTED 40012a74: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 <== NOT EXECUTED 40012a78: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40012a7c: 32 80 00 1a bne,a 40012ae4 <== NOT EXECUTED 40012a80: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40012a84: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 <== NOT EXECUTED 40012a88: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40012a8c: 28 80 00 16 bleu,a 40012ae4 <== NOT EXECUTED 40012a90: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 40012a94: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 40012a98: 10 80 00 12 b 40012ae0 <== NOT EXECUTED 40012a9c: c4 26 20 14 st %g2, [ %i0 + 0x14 ] <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 40012aa0: 90 10 00 10 mov %l0, %o0 40012aa4: 92 10 00 02 mov %g2, %o1 40012aa8: 7f ff ff 68 call 40012848 40012aac: 94 10 00 03 mov %g3, %o2 40012ab0: 80 a2 20 00 cmp %o0, 0 40012ab4: 22 80 00 0a be,a 40012adc 40012ab8: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 40012abc: 40 00 04 90 call 40013cfc <__errno> <== NOT EXECUTED 40012ac0: 01 00 00 00 nop <== NOT EXECUTED 40012ac4: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40012ac8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 40012acc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012ad0: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 40012ad4: 10 80 00 04 b 40012ae4 <== NOT EXECUTED 40012ad8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 40012adc: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 40012ae0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 } 40012ae4: b2 10 00 03 mov %g3, %i1 40012ae8: 81 c7 e0 08 ret 40012aec: 91 e8 00 02 restore %g0, %g2, %o0 40012db8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40012db8: 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)) 40012dbc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40012dc0: a2 10 00 18 mov %i0, %l1 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 40012dc4: 80 88 62 04 btst 0x204, %g1 40012dc8: 02 80 00 19 be 40012e2c 40012dcc: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 && (the_jnode->type == IMFS_LINEAR_FILE)) { 40012dd0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40012dd4: 80 a0 60 06 cmp %g1, 6 40012dd8: 32 80 00 16 bne,a 40012e30 40012ddc: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 40012de0: d8 04 20 54 ld [ %l0 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 40012de4: d6 04 20 58 ld [ %l0 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 40012de8: 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; 40012dec: c0 24 20 5c clr [ %l0 + 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; 40012df0: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 40012df4: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; 40012df8: c0 24 20 60 clr [ %l0 + 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; 40012dfc: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 40012e00: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 40012e04: 02 80 00 0a be 40012e2c <== NOT EXECUTED 40012e08: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 40012e0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40012e10: 92 10 20 00 clr %o1 <== NOT EXECUTED 40012e14: 94 10 20 00 clr %o2 <== NOT EXECUTED 40012e18: 7f ff ff 36 call 40012af0 <== NOT EXECUTED 40012e1c: 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) 40012e20: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40012e24: 02 80 00 0a be 40012e4c <== NOT EXECUTED 40012e28: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 40012e2c: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 40012e30: 80 88 62 00 btst 0x200, %g1 40012e34: 02 80 00 04 be 40012e44 40012e38: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 40012e3c: c4 3c 60 10 std %g2, [ %l1 + 0x10 ] iop->size = the_jnode->info.file.size; 40012e40: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 40012e44: b0 10 20 00 clr %i0 40012e48: c4 3c 60 08 std %g2, [ %l1 + 8 ] return 0; } 40012e4c: 81 c7 e0 08 ret 40012e50: 81 e8 00 00 restore 40012724 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40012724: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40012728: 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 ) { 4001272c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40012730: 80 a0 60 00 cmp %g1, 0 40012734: 22 80 00 06 be,a 4001274c 40012738: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 4001273c: 7f ff d9 c8 call 40008e5c <_Chain_Extract> 40012740: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40012744: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40012748: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4001274c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40012750: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40012754: 90 07 bf f8 add %fp, -8, %o0 40012758: 7f ff c8 6a call 40004900 4001275c: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40012760: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 40012764: 90 10 00 10 mov %l0, %o0 40012768: 7f ff ff d6 call 400126c0 4001276c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } 40012770: 81 c7 e0 08 ret 40012774: 91 e8 00 08 restore %g0, %o0, %o0 40009f64 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 40009f64: 13 10 00 6b sethi %hi(0x4001ac00), %o1 40009f68: 15 10 00 6b sethi %hi(0x4001ac00), %o2 40009f6c: 92 12 60 bc or %o1, 0xbc, %o1 40009f70: 94 12 a2 80 or %o2, 0x280, %o2 40009f74: 96 10 00 0a mov %o2, %o3 40009f78: 82 13 c0 00 mov %o7, %g1 40009f7c: 40 00 03 09 call 4000aba0 40009f80: 9e 10 40 00 mov %g1, %o7 40009f84: 01 00 00 00 nop <== NOT EXECUTED 400032dc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400032dc: 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) ) ) 400032e0: 03 00 00 3c sethi %hi(0xf000), %g1 400032e4: b3 2e 60 10 sll %i1, 0x10, %i1 400032e8: b3 36 60 10 srl %i1, 0x10, %i1 400032ec: 80 8e 40 01 btst %i1, %g1 400032f0: 32 80 00 06 bne,a 40003308 400032f4: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 400032f8: 40 00 2b 9b call 4000e164 <__errno> <== NOT EXECUTED 400032fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003300: 10 80 00 31 b 400033c4 <== NOT EXECUTED 40003304: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40003308: 80 a0 60 5c cmp %g1, 0x5c 4000330c: 02 80 00 06 be 40003324 40003310: 80 a0 60 2f cmp %g1, 0x2f 40003314: 02 80 00 04 be 40003324 40003318: 80 a0 60 00 cmp %g1, 0 4000331c: 12 80 00 0a bne 40003344 40003320: 03 10 00 6e sethi %hi(0x4001b800), %g1 40003324: 03 10 00 6e sethi %hi(0x4001b800), %g1 40003328: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 4001b8f8 4000332c: 90 07 bf e8 add %fp, -24, %o0 40003330: 92 02 60 18 add %o1, 0x18, %o1 40003334: 40 00 2d c7 call 4000ea50 40003338: 94 10 20 14 mov 0x14, %o2 4000333c: 10 80 00 08 b 4000335c 40003340: 90 10 20 01 mov 1, %o0 40003344: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 40003348: 90 07 bf e8 add %fp, -24, %o0 4000334c: 92 02 60 04 add %o1, 4, %o1 40003350: 40 00 2d c0 call 4000ea50 40003354: 94 10 20 14 mov 0x14, %o2 40003358: 90 10 20 00 clr %o0 if ( !temp_loc.ops->evalformake_h ) { 4000335c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40003360: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003364: 80 a0 60 00 cmp %g1, 0 40003368: 02 80 00 14 be 400033b8 4000336c: 90 06 00 08 add %i0, %o0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 40003370: a0 07 bf e8 add %fp, -24, %l0 40003374: 94 07 bf fc add %fp, -4, %o2 40003378: 92 10 00 10 mov %l0, %o1 4000337c: 9f c0 40 00 call %g1 40003380: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 40003384: 80 a2 20 00 cmp %o0, 0 40003388: 12 80 00 10 bne 400033c8 4000338c: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !temp_loc.ops->mknod_h ) { 40003390: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40003394: 80 a0 60 00 cmp %g1, 0 40003398: 12 80 00 0e bne 400033d0 4000339c: d0 07 bf fc ld [ %fp + -4 ], %o0 rtems_filesystem_freenode( &temp_loc ); 400033a0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400033a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400033a8: 02 80 00 04 be 400033b8 <== NOT EXECUTED 400033ac: 01 00 00 00 nop <== NOT EXECUTED 400033b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400033b4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400033b8: 40 00 2b 6b call 4000e164 <__errno> <== NOT EXECUTED 400033bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400033c0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400033c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400033c8: 81 c7 e0 08 ret 400033cc: 81 e8 00 00 restore } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 400033d0: 92 10 00 19 mov %i1, %o1 400033d4: 94 10 00 1a mov %i2, %o2 400033d8: 96 10 00 1b mov %i3, %o3 400033dc: 9f c0 40 00 call %g1 400033e0: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400033e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400033e8: 80 a0 60 00 cmp %g1, 0 400033ec: 02 bf ff f7 be 400033c8 400033f0: b0 10 00 08 mov %o0, %i0 400033f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400033f8: 80 a0 60 00 cmp %g1, 0 400033fc: 02 80 00 04 be 4000340c 40003400: 01 00 00 00 nop 40003404: 9f c0 40 00 call %g1 40003408: 90 10 00 10 mov %l0, %o0 return result; } 4000340c: 81 c7 e0 08 ret 40003410: 81 e8 00 00 restore 40003434 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 40003434: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 40003438: 80 a6 60 00 cmp %i1, 0 4000343c: 02 80 00 05 be 40003450 40003440: a0 10 00 18 mov %i0, %l0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 40003444: 80 a6 a0 01 cmp %i2, 1 40003448: 28 80 00 06 bleu,a 40003460 4000344c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 40003450: 40 00 2b 45 call 4000e164 <__errno> 40003454: 01 00 00 00 nop 40003458: 10 80 00 14 b 400034a8 4000345c: 82 10 20 16 mov 0x16, %g1 ! 16 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 40003460: a4 10 20 00 clr %l2 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 40003464: 80 a0 60 00 cmp %g1, 0 40003468: 02 80 00 4c be 40003598 4000346c: a6 10 20 00 clr %l3 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 40003470: 80 a6 e0 00 cmp %i3, 0 40003474: 02 80 00 05 be 40003488 40003478: 90 10 20 6c mov 0x6c, %o0 size += strlen( device ) + 1; 4000347c: 40 00 2e f1 call 4000f040 <== NOT EXECUTED 40003480: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 40003484: 90 02 20 6d add %o0, 0x6d, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 40003488: 40 00 20 2e call 4000b540 4000348c: 01 00 00 00 nop if ( !temp_mt_entry ) { 40003490: a2 92 20 00 orcc %o0, 0, %l1 40003494: 12 80 00 07 bne 400034b0 40003498: a6 10 00 11 mov %l1, %l3 errno = ENOMEM; 4000349c: 40 00 2b 32 call 4000e164 <__errno> <== NOT EXECUTED 400034a0: 01 00 00 00 nop <== NOT EXECUTED 400034a4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400034a8: 10 80 00 75 b 4000367c 400034ac: c2 22 00 00 st %g1, [ %o0 ] return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 400034b0: f4 24 60 30 st %i2, [ %l1 + 0x30 ] if ( device ) { 400034b4: 80 a6 e0 00 cmp %i3, 0 400034b8: 02 80 00 08 be 400034d8 400034bc: e2 24 60 2c st %l1, [ %l1 + 0x2c ] temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 400034c0: 90 04 60 6c add %l1, 0x6c, %o0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 400034c4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 400034c8: 40 00 2e bb call 4000efb4 <== NOT EXECUTED 400034cc: 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 ) { 400034d0: 10 80 00 04 b 400034e0 <== NOT EXECUTED 400034d4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 400034d8: c0 24 60 68 clr [ %l1 + 0x68 ] /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 400034dc: 80 a7 20 00 cmp %i4, 0 400034e0: 22 80 00 39 be,a 400035c4 400034e4: c0 24 60 1c clr [ %l1 + 0x1c ] if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 400034e8: 40 00 2e d6 call 4000f040 400034ec: 90 10 00 1c mov %i4, %o0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 400034f0: a4 07 bf ec add %fp, -20, %l2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 400034f4: 92 10 00 08 mov %o0, %o1 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 400034f8: 94 10 20 07 mov 7, %o2 400034fc: 90 10 00 1c mov %i4, %o0 40003500: 96 10 00 12 mov %l2, %o3 40003504: 7f ff fe d7 call 40003060 40003508: 98 10 20 01 mov 1, %o4 4000350c: 80 a2 3f ff cmp %o0, -1 40003510: 02 80 00 4b be 4000363c 40003514: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 40003518: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000351c: 80 a0 60 00 cmp %g1, 0 40003520: 02 80 00 1e be 40003598 40003524: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40003528: 9f c0 40 00 call %g1 4000352c: 90 10 00 12 mov %l2, %o0 40003530: 80 a2 20 01 cmp %o0, 1 40003534: 02 80 00 07 be 40003550 40003538: 03 10 00 70 sethi %hi(0x4001c000), %g1 errno = ENOTDIR; 4000353c: 40 00 2b 0a call 4000e164 <__errno> 40003540: 01 00 00 00 nop 40003544: 82 10 20 14 mov 0x14, %g1 ! 14 goto cleanup_and_bail; 40003548: 10 80 00 3e b 40003640 4000354c: c2 22 00 00 st %g1, [ %o0 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40003550: 05 10 00 70 sethi %hi(0x4001c000), %g2 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40003554: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 40003558: 84 10 a1 3c or %g2, 0x13c, %g2 !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 ) 4000355c: 10 80 00 06 b 40003574 40003560: c6 07 bf ec ld [ %fp + -20 ], %g3 40003564: 80 a1 00 03 cmp %g4, %g3 40003568: 02 80 00 08 be 40003588 4000356c: 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 ) { 40003570: c2 00 40 00 ld [ %g1 ], %g1 40003574: 80 a0 40 02 cmp %g1, %g2 40003578: 32 bf ff fb bne,a 40003564 4000357c: c8 00 60 1c ld [ %g1 + 0x1c ], %g4 * 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; 40003580: 10 80 00 42 b 40003688 40003584: c6 24 60 08 st %g3, [ %l1 + 8 ] /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 40003588: 40 00 2a f7 call 4000e164 <__errno> 4000358c: a4 07 bf ec add %fp, -20, %l2 40003590: 10 bf ff ee b 40003548 40003594: 82 10 20 10 mov 0x10, %g1 * 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; 40003598: 40 00 2a f3 call 4000e164 <__errno> <== NOT EXECUTED 4000359c: 01 00 00 00 nop <== NOT EXECUTED 400035a0: 10 bf ff ea b 40003548 <== NOT EXECUTED 400035a4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 400035a8: 90 10 00 11 mov %l1, %o0 400035ac: 9f c0 40 00 call %g1 400035b0: a4 07 bf ec add %fp, -20, %l2 400035b4: 80 a2 20 00 cmp %o0, 0 400035b8: 22 80 00 0b be,a 400035e4 400035bc: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 400035c0: 30 80 00 20 b,a 40003640 <== NOT EXECUTED * 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; 400035c4: c0 24 60 24 clr [ %l1 + 0x24 ] temp_mt_entry->mt_fs_root.ops = NULL; 400035c8: c0 24 60 28 clr [ %l1 + 0x28 ] temp_mt_entry->mt_point_node.node_access = NULL; 400035cc: c0 24 60 08 clr [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 400035d0: c0 24 60 10 clr [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = NULL; 400035d4: c0 24 60 14 clr [ %l1 + 0x14 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 400035d8: c0 24 60 18 clr [ %l1 + 0x18 ] 400035dc: a4 10 20 00 clr %l2 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 400035e0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 400035e4: 9f c0 40 00 call %g1 400035e8: 90 10 00 11 mov %l1, %o0 400035ec: 80 a2 20 00 cmp %o0, 0 400035f0: 02 80 00 0a be 40003618 400035f4: 11 10 00 70 sethi %hi(0x4001c000), %o0 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 400035f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400035fc: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 40003600: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003604: 02 80 00 0f be 40003640 <== NOT EXECUTED 40003608: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000360c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003610: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003614: 30 80 00 0b b,a 40003640 <== 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 ); 40003618: 92 10 00 11 mov %l1, %o1 4000361c: 40 00 0e 1c call 40006e8c <_Chain_Append> 40003620: 90 12 21 38 or %o0, 0x138, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 40003624: 80 a4 20 00 cmp %l0, 0 40003628: 02 80 00 03 be 40003634 4000362c: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 40003630: e2 24 00 00 st %l1, [ %l0 ] 40003634: 81 c7 e0 08 ret 40003638: 81 e8 00 00 restore 4000363c: a4 10 20 00 clr %l2 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 40003640: 40 00 1e 66 call 4000afd8 40003644: 90 10 00 13 mov %l3, %o0 if ( loc_to_free ) 40003648: 80 a4 a0 00 cmp %l2, 0 4000364c: 02 bf ff fa be 40003634 40003650: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( loc_to_free ); 40003654: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 40003658: 80 a0 60 00 cmp %g1, 0 4000365c: 02 80 00 09 be 40003680 40003660: 01 00 00 00 nop 40003664: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003668: 80 a0 60 00 cmp %g1, 0 4000366c: 02 80 00 05 be 40003680 40003670: 01 00 00 00 nop 40003674: 9f c0 40 00 call %g1 40003678: 90 10 00 12 mov %l2, %o0 4000367c: b0 10 3f ff mov -1, %i0 return -1; } 40003680: 81 c7 e0 08 ret 40003684: 81 e8 00 00 restore * 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; 40003688: c6 07 bf f4 ld [ %fp + -12 ], %g3 temp_mt_entry->mt_point_node.ops = loc.ops; 4000368c: 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; 40003690: 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; 40003694: 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 ){ 40003698: 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; 4000369c: 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 ){ 400036a0: 80 a0 60 00 cmp %g1, 0 400036a4: 12 bf ff c1 bne 400035a8 400036a8: c4 24 60 14 st %g2, [ %l1 + 0x14 ] errno = ENOTSUP; 400036ac: 10 bf ff bb b 40003598 <== NOT EXECUTED 400036b0: a4 07 bf ec add %fp, -20, %l2 <== NOT EXECUTED 40003720 : */ int newlib_free_buffers( FILE *fp ) { 40003720: 9d e3 bf a0 save %sp, -96, %sp switch ( fileno(fp) ) { 40003724: 40 00 2b a9 call 4000e5c8 40003728: 90 10 00 18 mov %i0, %o0 4000372c: 80 a2 20 02 cmp %o0, 2 40003730: 18 80 00 0e bgu 40003768 40003734: 01 00 00 00 nop case 0: case 1: case 2: if (fp->_flags & __SMBF) { 40003738: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 4000373c: 80 88 60 80 btst 0x80, %g1 40003740: 02 80 00 0c be 40003770 40003744: 01 00 00 00 nop free( fp->_bf._base ); 40003748: 40 00 1e 24 call 4000afd8 <== NOT EXECUTED 4000374c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 40003750: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 40003754: 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; 40003758: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 4000375c: 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; 40003760: 10 80 00 04 b 40003770 <== NOT EXECUTED 40003764: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 40003768: 40 00 2a d7 call 4000e2c4 <== NOT EXECUTED 4000376c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 40003770: 81 c7 e0 08 ret 40003774: 91 e8 20 00 restore %g0, 0, %o0 400037e0 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 400037e0: 9d e3 bf a0 save %sp, -96, %sp rtems_device_driver status; if ( !initialized ) { 400037e4: 03 10 00 83 sethi %hi(0x40020c00), %g1 400037e8: c4 48 60 e0 ldsb [ %g1 + 0xe0 ], %g2 ! 40020ce0 400037ec: 80 a0 a0 00 cmp %g2, 0 400037f0: 12 80 00 0e bne 40003828 400037f4: 84 10 20 01 mov 1, %g2 initialized = 1; status = rtems_io_register_name( 400037f8: 11 10 00 7b sethi %hi(0x4001ec00), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 400037fc: c4 28 60 e0 stb %g2, [ %g1 + 0xe0 ] status = rtems_io_register_name( 40003800: 90 12 20 c0 or %o0, 0xc0, %o0 40003804: 92 10 00 18 mov %i0, %o1 40003808: 40 00 00 51 call 4000394c 4000380c: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40003810: 80 a2 20 00 cmp %o0, 0 40003814: 02 80 00 04 be 40003824 40003818: 03 10 00 83 sethi %hi(0x40020c00), %g1 rtems_fatal_error_occurred(status); 4000381c: 40 00 10 80 call 40007a1c <== NOT EXECUTED 40003820: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 40003824: f0 20 63 c8 st %i0, [ %g1 + 0x3c8 ] } return RTEMS_SUCCESSFUL; } 40003828: 81 c7 e0 08 ret 4000382c: 91 e8 20 00 restore %g0, 0, %o0 400037bc : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 400037bc: 80 a2 a0 00 cmp %o2, 0 400037c0: 02 80 00 04 be 400037d0 400037c4: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 400037c8: c2 02 a0 14 ld [ %o2 + 0x14 ], %g1 <== NOT EXECUTED 400037cc: c2 22 a0 1c st %g1, [ %o2 + 0x1c ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 400037d0: 81 c3 e0 08 retl 400037d4: 90 10 20 00 clr %o0 40003998 : int open( const char *pathname, int flags, ... ) { 40003998: 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); 4000399c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 400039a0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 400039a4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400039a8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 400039ac: a2 06 60 01 add %i1, 1, %l1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 400039b0: 80 8c 60 02 btst 2, %l1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 400039b4: a2 0c 60 01 and %l1, 1, %l1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 400039b8: 02 80 00 03 be 400039c4 400039bc: a3 2c 60 02 sll %l1, 2, %l1 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 400039c0: a2 14 60 02 or %l1, 2, %l1 va_start(ap, flags); mode = va_arg( ap, int ); 400039c4: 82 07 a0 50 add %fp, 0x50, %g1 400039c8: e4 07 a0 4c ld [ %fp + 0x4c ], %l2 400039cc: 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(); 400039d0: 40 00 1e 75 call 4000b3a4 400039d4: a6 10 20 17 mov 0x17, %l3 if ( iop == 0 ) { 400039d8: a0 92 20 00 orcc %o0, 0, %l0 400039dc: 02 80 00 9a be 40003c44 400039e0: 01 00 00 00 nop /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 400039e4: 40 00 2d 97 call 4000f040 400039e8: 90 10 00 18 mov %i0, %o0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 400039ec: 94 10 00 11 mov %l1, %o2 pathname, strlen( pathname ), eval_flags, &loc, true ); 400039f0: 92 10 00 08 mov %o0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 400039f4: a2 07 bf e8 add %fp, -24, %l1 400039f8: 90 10 00 18 mov %i0, %o0 400039fc: 96 10 00 11 mov %l1, %o3 40003a00: 7f ff fd 98 call 40003060 40003a04: 98 10 20 01 mov 1, %o4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 40003a08: 80 a2 3f ff cmp %o0, -1 40003a0c: 12 80 00 24 bne 40003a9c 40003a10: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( errno != ENOENT ) { 40003a14: 40 00 29 d4 call 4000e164 <__errno> 40003a18: a8 10 20 00 clr %l4 40003a1c: c2 02 00 00 ld [ %o0 ], %g1 40003a20: 80 a0 60 02 cmp %g1, 2 40003a24: 12 80 00 40 bne 40003b24 40003a28: 80 8e 62 00 btst 0x200, %i1 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 40003a2c: a6 10 20 02 mov 2, %l3 40003a30: 02 80 00 73 be 40003bfc 40003a34: 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 ); 40003a38: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40003a3c: 90 10 00 18 mov %i0, %o0 40003a40: 92 14 80 09 or %l2, %o1, %o1 40003a44: 94 10 20 00 clr %o2 40003a48: 93 2a 60 10 sll %o1, 0x10, %o1 40003a4c: 96 10 20 00 clr %o3 40003a50: 7f ff fe 23 call 400032dc 40003a54: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 40003a58: 80 a2 20 00 cmp %o0, 0 40003a5c: 12 80 00 32 bne 40003b24 40003a60: 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 ); 40003a64: 40 00 2d 77 call 4000f040 40003a68: 90 10 00 18 mov %i0, %o0 40003a6c: 96 10 00 11 mov %l1, %o3 40003a70: 92 10 00 08 mov %o0, %o1 40003a74: 94 10 20 00 clr %o2 40003a78: 90 10 00 18 mov %i0, %o0 40003a7c: 98 10 20 01 mov 1, %o4 40003a80: 7f ff fd 78 call 40003060 40003a84: a6 10 20 0d mov 0xd, %l3 if ( status != 0 ) { /* The file did not exist */ 40003a88: 80 a2 20 00 cmp %o0, 0 40003a8c: 12 80 00 5c bne 40003bfc 40003a90: 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; 40003a94: 10 80 00 07 b 40003ab0 40003a98: c2 07 bf f0 ld [ %fp + -16 ], %g1 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 40003a9c: a8 10 00 11 mov %l1, %l4 40003aa0: 80 a0 6a 00 cmp %g1, 0xa00 40003aa4: 02 80 00 56 be 40003bfc 40003aa8: a6 10 20 11 mov 0x11, %l3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003aac: c2 07 bf f0 ld [ %fp + -16 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003ab0: e2 04 20 18 ld [ %l0 + 0x18 ], %l1 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003ab4: c2 24 20 40 st %g1, [ %l0 + 0x40 ] iop->file_info = loc.node_access; 40003ab8: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 40003abc: 90 10 00 19 mov %i1, %o0 40003ac0: 40 00 1e 6d call 4000b474 40003ac4: c2 24 20 3c st %g1, [ %l0 + 0x3c ] 40003ac8: 90 12 00 11 or %o0, %l1, %o0 iop->pathinfo = loc; 40003acc: 94 10 20 14 mov 0x14, %o2 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003ad0: d0 24 20 18 st %o0, [ %l0 + 0x18 ] iop->pathinfo = loc; 40003ad4: a2 07 bf e8 add %fp, -24, %l1 40003ad8: 90 04 20 1c add %l0, 0x1c, %o0 40003adc: 40 00 2b dd call 4000ea50 40003ae0: 92 10 00 11 mov %l1, %o1 if ( !iop->handlers || !iop->handlers->open_h ) { 40003ae4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40003ae8: 80 a0 60 00 cmp %g1, 0 40003aec: 22 80 00 6a be,a 40003c94 40003af0: a6 10 20 86 mov 0x86, %l3 <== NOT EXECUTED 40003af4: c2 00 40 00 ld [ %g1 ], %g1 40003af8: 80 a0 60 00 cmp %g1, 0 40003afc: 02 80 00 65 be 40003c90 40003b00: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40003b04: 96 10 00 12 mov %l2, %o3 40003b08: 90 10 00 10 mov %l0, %o0 40003b0c: 9f c0 40 00 call %g1 40003b10: 94 10 00 19 mov %i1, %o2 if ( rc ) { 40003b14: 80 a2 20 00 cmp %o0, 0 40003b18: 02 80 00 07 be 40003b34 40003b1c: 80 8e 64 00 btst 0x400, %i1 rc = errno; 40003b20: a8 10 00 11 mov %l1, %l4 40003b24: 40 00 29 90 call 4000e164 <__errno> 40003b28: 01 00 00 00 nop goto done; 40003b2c: 10 80 00 31 b 40003bf0 40003b30: e6 02 00 00 ld [ %o0 ], %l3 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40003b34: 02 80 00 49 be 40003c58 40003b38: 03 10 00 70 sethi %hi(0x4001c000), %g1 rc = ftruncate( iop - rtems_libio_iops, 0 ); 40003b3c: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 4001c0fc 40003b40: 92 10 20 00 clr %o1 40003b44: 82 24 00 01 sub %l0, %g1, %g1 40003b48: 83 38 60 03 sra %g1, 3, %g1 40003b4c: 87 28 60 06 sll %g1, 6, %g3 40003b50: 85 28 60 03 sll %g1, 3, %g2 40003b54: 84 20 c0 02 sub %g3, %g2, %g2 40003b58: 87 28 a0 06 sll %g2, 6, %g3 40003b5c: 84 00 80 03 add %g2, %g3, %g2 40003b60: 84 00 80 01 add %g2, %g1, %g2 40003b64: 91 28 a0 0f sll %g2, 0xf, %o0 40003b68: 84 22 00 02 sub %o0, %g2, %g2 40003b6c: 94 10 20 00 clr %o2 40003b70: 91 28 a0 03 sll %g2, 3, %o0 40003b74: 40 00 1d 43 call 4000b080 40003b78: 90 02 00 01 add %o0, %g1, %o0 if ( rc ) { 40003b7c: a6 92 20 00 orcc %o0, 0, %l3 40003b80: 02 80 00 36 be 40003c58 40003b84: 03 10 00 70 sethi %hi(0x4001c000), %g1 if(errno) rc = errno; 40003b88: 40 00 29 77 call 4000e164 <__errno> <== NOT EXECUTED 40003b8c: 01 00 00 00 nop <== NOT EXECUTED 40003b90: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40003b94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003b98: 02 80 00 06 be 40003bb0 <== NOT EXECUTED 40003b9c: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 40003ba0: 40 00 29 71 call 4000e164 <__errno> <== NOT EXECUTED 40003ba4: 01 00 00 00 nop <== NOT EXECUTED 40003ba8: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED close( iop - rtems_libio_iops ); 40003bac: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 40003bb0: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 4001c0fc <== NOT EXECUTED 40003bb4: a8 10 20 00 clr %l4 <== NOT EXECUTED 40003bb8: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 40003bbc: 83 3c 20 03 sra %l0, 3, %g1 <== NOT EXECUTED 40003bc0: 87 28 60 06 sll %g1, 6, %g3 <== NOT EXECUTED 40003bc4: 85 28 60 03 sll %g1, 3, %g2 <== NOT EXECUTED 40003bc8: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 40003bcc: 87 28 a0 06 sll %g2, 6, %g3 <== NOT EXECUTED 40003bd0: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED 40003bd4: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40003bd8: 91 28 a0 0f sll %g2, 0xf, %o0 <== NOT EXECUTED 40003bdc: 84 22 00 02 sub %o0, %g2, %g2 <== NOT EXECUTED 40003be0: a0 10 20 00 clr %l0 <== NOT EXECUTED 40003be4: 91 28 a0 03 sll %g2, 3, %o0 <== NOT EXECUTED 40003be8: 40 00 1c cd call 4000af1c <== NOT EXECUTED 40003bec: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40003bf0: 80 a4 e0 00 cmp %l3, 0 40003bf4: 02 80 00 19 be 40003c58 40003bf8: 03 10 00 70 sethi %hi(0x4001c000), %g1 if ( iop ) 40003bfc: 80 a4 20 00 cmp %l0, 0 40003c00: 02 80 00 05 be 40003c14 40003c04: 80 a5 20 00 cmp %l4, 0 rtems_libio_free( iop ); 40003c08: 40 00 1d cf call 4000b344 40003c0c: 90 10 00 10 mov %l0, %o0 if ( loc_to_free ) 40003c10: 80 a5 20 00 cmp %l4, 0 40003c14: 02 80 00 0c be 40003c44 40003c18: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40003c1c: c2 05 20 0c ld [ %l4 + 0xc ], %g1 40003c20: 80 a0 60 00 cmp %g1, 0 40003c24: 02 80 00 08 be 40003c44 40003c28: 01 00 00 00 nop 40003c2c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003c30: 80 a0 60 00 cmp %g1, 0 40003c34: 02 80 00 04 be 40003c44 40003c38: 01 00 00 00 nop 40003c3c: 9f c0 40 00 call %g1 40003c40: 90 10 00 14 mov %l4, %o0 rtems_set_errno_and_return_minus_one( rc ); 40003c44: 40 00 29 48 call 4000e164 <__errno> 40003c48: b0 10 3f ff mov -1, %i0 40003c4c: e6 22 00 00 st %l3, [ %o0 ] 40003c50: 81 c7 e0 08 ret 40003c54: 81 e8 00 00 restore } return iop - rtems_libio_iops; 40003c58: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 40003c5c: a0 24 00 01 sub %l0, %g1, %l0 40003c60: a1 3c 20 03 sra %l0, 3, %l0 40003c64: 85 2c 20 06 sll %l0, 6, %g2 40003c68: 83 2c 20 03 sll %l0, 3, %g1 40003c6c: 82 20 80 01 sub %g2, %g1, %g1 40003c70: 85 28 60 06 sll %g1, 6, %g2 40003c74: 82 00 40 02 add %g1, %g2, %g1 40003c78: 82 00 40 10 add %g1, %l0, %g1 40003c7c: b1 28 60 0f sll %g1, 0xf, %i0 40003c80: b0 26 00 01 sub %i0, %g1, %i0 40003c84: b1 2e 20 03 sll %i0, 3, %i0 } 40003c88: 81 c7 e0 08 ret 40003c8c: 91 ee 00 10 restore %i0, %l0, %o0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003c90: a6 10 20 86 mov 0x86, %l3 <== NOT EXECUTED 40003c94: 10 bf ff da b 40003bfc <== NOT EXECUTED 40003c98: a8 07 bf e8 add %fp, -24, %l4 <== NOT EXECUTED 40003924 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 40003924: 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) { 40003928: 21 10 00 69 sethi %hi(0x4001a400), %l0 4000392c: 92 10 20 00 clr %o1 40003930: 90 14 23 d0 or %l0, 0x3d0, %o0 40003934: 40 00 00 19 call 40003998 40003938: 94 10 20 00 clr %o2 4000393c: 80 a2 3f ff cmp %o0, -1 40003940: 02 80 00 14 be 40003990 40003944: 90 14 23 d0 or %l0, 0x3d0, %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) 40003948: 92 10 20 01 mov 1, %o1 4000394c: 40 00 00 13 call 40003998 40003950: 94 10 20 00 clr %o2 40003954: 80 a2 3f ff cmp %o0, -1 40003958: 32 80 00 05 bne,a 4000396c 4000395c: 90 14 23 d0 or %l0, 0x3d0, %o0 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 40003960: 11 15 55 11 sethi %hi(0x55544400), %o0 <== NOT EXECUTED 40003964: 10 80 00 09 b 40003988 <== NOT EXECUTED 40003968: 90 12 20 31 or %o0, 0x31, %o0 ! 55544431 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 4000396c: 92 10 20 01 mov 1, %o1 40003970: 40 00 00 0a call 40003998 40003974: 94 10 20 00 clr %o2 40003978: 80 a2 3f ff cmp %o0, -1 4000397c: 12 80 00 05 bne 40003990 40003980: 11 15 55 11 sethi %hi(0x55544400), %o0 rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 40003984: 90 12 20 32 or %o0, 0x32, %o0 ! 55544432 <== NOT EXECUTED 40003988: 40 00 0c 81 call 40006b8c <== NOT EXECUTED 4000398c: 01 00 00 00 nop <== NOT EXECUTED 40003990: 81 c7 e0 08 ret 40003994: 81 e8 00 00 restore 4000441c : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 4000441c: 9d e3 bf a0 save %sp, -96, %sp int i; if (tty->termios.c_oflag & OPOST) { 40004420: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 40004424: 80 88 60 01 btst 1, %g1 40004428: 02 80 00 5a be 40004590 4000442c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 40004430: 84 0e 20 ff and %i0, 0xff, %g2 40004434: 80 a0 a0 09 cmp %g2, 9 40004438: 22 80 00 2b be,a 400044e4 4000443c: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 40004440: 18 80 00 07 bgu 4000445c 40004444: 80 a0 a0 0a cmp %g2, 0xa 40004448: 80 a0 a0 08 cmp %g2, 8 <== NOT EXECUTED 4000444c: 12 80 00 3a bne 40004534 <== NOT EXECUTED 40004450: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 40004454: 10 80 00 33 b 40004520 <== NOT EXECUTED 40004458: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 4000445c: 02 80 00 06 be 40004474 40004460: 80 a0 a0 0d cmp %g2, 0xd 40004464: 32 80 00 34 bne,a 40004534 40004468: 80 88 60 02 btst 2, %g1 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 4000446c: 10 80 00 10 b 400044ac <== NOT EXECUTED 40004470: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 40004474: 80 88 60 20 btst 0x20, %g1 40004478: 32 80 00 02 bne,a 40004480 4000447c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 40004480: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 40004484: 80 88 60 04 btst 4, %g1 40004488: 02 80 00 43 be 40004594 4000448c: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40004490: 11 10 00 6a sethi %hi(0x4001a800), %o0 40004494: 92 10 20 01 mov 1, %o1 40004498: 90 12 22 c8 or %o0, 0x2c8, %o0 4000449c: 7f ff ff 94 call 400042ec 400044a0: 94 10 00 19 mov %i1, %o2 c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 400044a4: 10 80 00 3b b 40004590 400044a8: c0 26 60 28 clr [ %i1 + 0x28 ] tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 400044ac: 02 80 00 06 be 400044c4 <== NOT EXECUTED 400044b0: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 400044b4: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED 400044b8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400044bc: 02 80 00 17 be 40004518 <== NOT EXECUTED 400044c0: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 400044c4: 22 80 00 33 be,a 40004590 <== NOT EXECUTED 400044c8: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 400044cc: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 400044d0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400044d4: 02 80 00 2f be 40004590 <== NOT EXECUTED 400044d8: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; break; 400044dc: 10 80 00 2d b 40004590 <== NOT EXECUTED 400044e0: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 400044e4: 07 00 00 06 sethi %hi(0x1800), %g3 400044e8: 82 08 40 03 and %g1, %g3, %g1 400044ec: 80 a0 40 03 cmp %g1, %g3 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 400044f0: 82 08 a0 07 and %g2, 7, %g1 400044f4: 92 10 20 08 mov 8, %o1 400044f8: 92 22 40 01 sub %o1, %g1, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 400044fc: 12 80 00 24 bne 4000458c 40004500: 82 02 40 02 add %o1, %g2, %g1 tty->column += i; 40004504: c2 26 60 28 st %g1, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 40004508: 94 10 00 19 mov %i1, %o2 4000450c: 11 10 00 6a sethi %hi(0x4001a800), %o0 40004510: 7f ff ff 77 call 400042ec 40004514: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 4001aad0 <__FUNCTION__.5752+0x258> return; 40004518: 81 c7 e0 08 ret 4000451c: 81 e8 00 00 restore } tty->column += i; break; case '\b': if (tty->column > 0) 40004520: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004524: 04 80 00 1b ble 40004590 <== NOT EXECUTED 40004528: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); if (!iscntrl(c)) tty->column++; 4000452c: 10 80 00 19 b 40004590 <== NOT EXECUTED 40004530: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 40004534: 02 80 00 0d be 40004568 40004538: c2 0f a0 44 ldub [ %fp + 0x44 ], %g1 c = toupper(c); 4000453c: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED 40004540: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 4001b954 <__ctype_ptr__> <== NOT EXECUTED 40004544: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 40004548: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4000454c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 40004550: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40004554: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40004558: 22 80 00 02 be,a 40004560 <== NOT EXECUTED 4000455c: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 40004560: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 40004564: c2 0f a0 44 ldub [ %fp + 0x44 ], %g1 <== NOT EXECUTED 40004568: 05 10 00 6e sethi %hi(0x4001b800), %g2 4000456c: c4 00 a1 54 ld [ %g2 + 0x154 ], %g2 ! 4001b954 <__ctype_ptr__> 40004570: 82 00 80 01 add %g2, %g1, %g1 40004574: c2 08 60 01 ldub [ %g1 + 1 ], %g1 40004578: 80 88 60 20 btst 0x20, %g1 4000457c: 12 80 00 06 bne 40004594 40004580: 94 10 00 19 mov %i1, %o2 tty->column++; 40004584: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 40004588: 82 00 60 01 inc %g1 4000458c: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 40004590: 94 10 00 19 mov %i1, %o2 40004594: 90 07 a0 44 add %fp, 0x44, %o0 40004598: 7f ff ff 55 call 400042ec 4000459c: 92 10 20 01 mov 1, %o1 400045a0: 81 c7 e0 08 ret 400045a4: 81 e8 00 00 restore 4000dbf4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4000dbf4: 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) 4000dbf8: 23 10 00 6c sethi %hi(0x4001b000), %l1 4000dbfc: a0 07 bf dc add %fp, -36, %l0 4000dc00: 92 10 20 03 mov 3, %o1 4000dc04: 90 14 60 10 or %l1, 0x10, %o0 4000dc08: 94 10 20 07 mov 7, %o2 4000dc0c: 96 10 00 10 mov %l0, %o3 4000dc10: 7f ff d5 14 call 40003060 4000dc14: 98 10 20 01 mov 1, %o4 4000dc18: 80 a2 20 00 cmp %o0, 0 4000dc1c: 02 80 00 10 be 4000dc5c 4000dc20: c2 07 bf e8 ld [ %fp + -24 ], %g1 != 0) { if (errno != ENOENT) 4000dc24: 40 00 01 50 call 4000e164 <__errno> 4000dc28: 01 00 00 00 nop 4000dc2c: c2 02 00 00 ld [ %o0 ], %g1 4000dc30: 80 a0 60 02 cmp %g1, 2 4000dc34: 32 80 00 59 bne,a 4000dd98 4000dc38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4000dc3c: 90 14 60 10 or %l1, 0x10, %o0 4000dc40: 7f ff d5 9d call 400032b4 4000dc44: 92 10 23 ff mov 0x3ff, %o1 4000dc48: 80 a2 20 00 cmp %o0, 0 4000dc4c: 02 80 00 0e be 4000dc84 4000dc50: 03 10 00 6f sethi %hi(0x4001bc00), %g1 } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4000dc54: 81 c7 e0 08 ret <== NOT EXECUTED 4000dc58: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 4000dc5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dc60: 22 80 00 09 be,a 4000dc84 <== NOT EXECUTED 4000dc64: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000dc68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001bc1c <== NOT EXECUTED 4000dc6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dc70: 22 80 00 05 be,a 4000dc84 <== NOT EXECUTED 4000dc74: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000dc78: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000dc7c: 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 ++); 4000dc80: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000dc84: c4 10 63 4a lduh [ %g1 + 0x34a ], %g2 ! 4001bf4a else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000dc88: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000dc8c: 95 28 a0 10 sll %g2, 0x10, %o2 4000dc90: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000dc94: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000dc98: c4 30 63 4a sth %g2, [ %g1 + 0x34a ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000dc9c: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 4000dca0: 03 00 00 19 sethi %hi(0x6400), %g1 4000dca4: 84 10 a1 70 or %g2, 0x170, %g2 4000dca8: 82 10 62 6f or %g1, 0x26f, %g1 4000dcac: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000dcb0: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000dcb4: c4 3f bf f0 std %g2, [ %fp + -16 ] 4000dcb8: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000dcbc: 90 07 bf fa add %fp, -6, %o0 4000dcc0: 13 10 00 6c sethi %hi(0x4001b000), %o1 4000dcc4: 40 00 04 13 call 4000ed10 4000dcc8: 92 12 60 18 or %o1, 0x18, %o1 ! 4001b018 <__FUNCTION__.5901+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4000dccc: 90 10 00 10 mov %l0, %o0 4000dcd0: 40 00 00 4b call 4000ddfc 4000dcd4: 92 10 21 80 mov 0x180, %o1 4000dcd8: 80 a2 20 00 cmp %o0, 0 4000dcdc: 02 80 00 05 be 4000dcf0 4000dce0: 90 10 00 10 mov %l0, %o0 if (errno != EEXIST){ 4000dce4: 40 00 01 20 call 4000e164 <__errno> <== NOT EXECUTED 4000dce8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000dcec: 30 80 00 2b b,a 4000dd98 <== NOT EXECUTED 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); 4000dcf0: 7f ff d7 2a call 40003998 4000dcf4: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 4000dcf8: 80 a2 20 00 cmp %o0, 0 4000dcfc: 16 80 00 07 bge 4000dd18 4000dd00: d0 26 00 00 st %o0, [ %i0 ] err = errno; 4000dd04: 40 00 01 18 call 4000e164 <__errno> 4000dd08: 01 00 00 00 nop 4000dd0c: 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); 4000dd10: 10 80 00 1d b 4000dd84 4000dd14: 90 10 00 10 mov %l0, %o0 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4000dd18: 03 10 00 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED 4000dd1c: c4 00 63 e4 ld [ %g1 + 0x3e4 ], %g2 ! 4001b7e4 <== NOT EXECUTED 4000dd20: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000dd24: 1a 80 00 08 bcc 4000dd44 <== NOT EXECUTED 4000dd28: 82 10 20 00 clr %g1 <== NOT EXECUTED 4000dd2c: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 4000dd30: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 4001c0fc <== NOT EXECUTED 4000dd34: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4000dd38: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 4000dd3c: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 4000dd40: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000dd44: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000dd48: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000dd4c: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000dd50: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000dd54: 7f ff d7 11 call 40003998 <== NOT EXECUTED 4000dd58: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 4000dd5c: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 4000dd60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dd64: 16 80 00 07 bge 4000dd80 <== NOT EXECUTED 4000dd68: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; 4000dd6c: 40 00 00 fe call 4000e164 <__errno> <== NOT EXECUTED 4000dd70: 01 00 00 00 nop <== NOT EXECUTED 4000dd74: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 4000dd78: 7f ff f4 69 call 4000af1c <== NOT EXECUTED 4000dd7c: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED } unlink(fifopath); 4000dd80: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4000dd84: 40 00 00 28 call 4000de24 4000dd88: b0 10 3f ff mov -1, %i0 } rtems_set_errno_and_return_minus_one(err); 4000dd8c: 40 00 00 f6 call 4000e164 <__errno> 4000dd90: 01 00 00 00 nop 4000dd94: e2 22 00 00 st %l1, [ %o0 ] } 4000dd98: 81 c7 e0 08 ret 4000dd9c: 81 e8 00 00 restore 4000ccd0 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4000ccd0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4000ccd4: 40 00 02 21 call 4000d558 <== NOT EXECUTED 4000ccd8: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000ccdc: 40 00 02 1f call 4000d558 <== NOT EXECUTED 4000cce0: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000cce4: 7f ff e5 d5 call 40006438 <== NOT EXECUTED 4000cce8: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000ccec: 7f ff f8 bb call 4000afd8 <== NOT EXECUTED 4000ccf0: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED free(pipe); 4000ccf4: 7f ff f8 b9 call 4000afd8 <== NOT EXECUTED 4000ccf8: 81 e8 00 00 restore <== NOT EXECUTED 4000ccfc: 01 00 00 00 nop 4000c910 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000c910: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 4000c914: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000c918: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 4000c91c: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000c920: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000c924: 12 80 00 12 bne 4000c96c <== NOT EXECUTED 4000c928: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 4000c92c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000c930: 02 80 00 0f be 4000c96c <== NOT EXECUTED 4000c934: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4000c938: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000c93c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c940: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c944: 7f ff e6 eb call 400064f0 <== NOT EXECUTED 4000c948: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000c94c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c950: 12 80 00 07 bne 4000c96c <== NOT EXECUTED 4000c954: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000c958: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c95c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000c960: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c964: 7f ff e7 2a call 4000660c <== NOT EXECUTED 4000c968: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 4000c96c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c970: 81 e8 00 00 restore <== NOT EXECUTED 4000c89c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4000c89c: 81 c3 e0 08 retl <== NOT EXECUTED 4000c8a0: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED 4000cb34 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000cb34: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000cb38: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000cb3c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000cb40: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cb44: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000cb48: 7f ff e6 6a call 400064f0 <== NOT EXECUTED 4000cb4c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000cb50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cb54: 02 80 00 54 be 4000cca4 <== NOT EXECUTED 4000cb58: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED 4000cb5c: 81 c7 e0 08 ret <== NOT EXECUTED 4000cb60: 91 e8 3f fc restore %g0, -4, %o0 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4000cb64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cb68: 02 80 00 53 be 4000ccb4 <== NOT EXECUTED 4000cb6c: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4000cb70: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000cb74: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000cb78: 22 80 00 04 be,a 4000cb88 <== NOT EXECUTED 4000cb7c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000cb80: 10 80 00 4d b 4000ccb4 <== NOT EXECUTED 4000cb84: a2 10 3f f5 mov -11, %l1 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4000cb88: 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 ++; 4000cb8c: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000cb90: 7f ff e6 9f call 4000660c <== NOT EXECUTED 4000cb94: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000cb98: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000cb9c: 40 00 02 a0 call 4000d61c <== NOT EXECUTED 4000cba0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cba4: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000cba8: 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)) 4000cbac: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000cbb0: 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)) 4000cbb4: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000cbb8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000cbbc: 7f ff e6 4d call 400064f0 <== NOT EXECUTED 4000cbc0: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000cbc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cbc8: 22 80 00 04 be,a 4000cbd8 <== NOT EXECUTED 4000cbcc: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000cbd0: 10 80 00 3b b 4000ccbc <== NOT EXECUTED 4000cbd4: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4000cbd8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4000cbdc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000cbe0: 12 80 00 35 bne 4000ccb4 <== NOT EXECUTED 4000cbe4: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4000cbe8: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000cbec: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000cbf0: 22 bf ff dd be,a 4000cb64 <== NOT EXECUTED 4000cbf4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4000cbf8: 82 26 80 18 sub %i2, %i0, %g1 <== NOT EXECUTED 4000cbfc: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000cc00: 38 80 00 02 bgu,a 4000cc08 <== NOT EXECUTED 4000cc04: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4000cc08: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000cc0c: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000cc10: 90 06 40 18 add %i1, %i0, %o0 <== NOT EXECUTED 4000cc14: a4 24 80 01 sub %l2, %g1, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000cc18: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000cc1c: 04 80 00 0a ble 4000cc44 <== NOT EXECUTED 4000cc20: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4000cc24: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000cc28: 40 00 07 8a call 4000ea50 <== NOT EXECUTED 4000cc2c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4000cc30: 90 06 00 12 add %i0, %l2, %o0 <== NOT EXECUTED 4000cc34: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 4000cc38: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000cc3c: 10 80 00 04 b 4000cc4c <== NOT EXECUTED 4000cc40: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4000cc44: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000cc48: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000cc4c: 40 00 07 81 call 4000ea50 <== NOT EXECUTED 4000cc50: 01 00 00 00 nop <== NOT EXECUTED pipe->Start += chunk; 4000cc54: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000cc58: 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; 4000cc5c: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000cc60: 40 00 2b 7e call 40017a58 <.urem> <== NOT EXECUTED 4000cc64: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000cc68: 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; 4000cc6c: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000cc70: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4000cc74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cc78: 12 80 00 03 bne 4000cc84 <== NOT EXECUTED 4000cc7c: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 4000cc80: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 4000cc84: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000cc88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cc8c: 22 80 00 06 be,a 4000cca4 <== NOT EXECUTED 4000cc90: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000cc94: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000cc98: 40 00 02 4a call 4000d5c0 <== NOT EXECUTED 4000cc9c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 4000cca0: 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) { 4000cca4: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000cca8: 2a bf ff d1 bcs,a 4000cbec <== NOT EXECUTED 4000ccac: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000ccb0: a2 10 20 00 clr %l1 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4000ccb4: 7f ff e6 56 call 4000660c <== NOT EXECUTED 4000ccb8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 4000ccbc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000ccc0: 24 80 00 02 ble,a 4000ccc8 <== NOT EXECUTED 4000ccc4: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return read; return ret; } 4000ccc8: 81 c7 e0 08 ret <== NOT EXECUTED 4000cccc: 81 e8 00 00 restore <== NOT EXECUTED 4000cd00 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000cd00: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 4000cd04: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4000cd08: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cd0c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000cd10: 7f ff e5 f8 call 400064f0 <== NOT EXECUTED 4000cd14: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4000cd18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cd1c: 12 80 00 17 bne 4000cd78 <== NOT EXECUTED 4000cd20: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4000cd24: e2 06 60 18 ld [ %i1 + 0x18 ], %l1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4000cd28: 80 8c 60 02 btst 2, %l1 <== NOT EXECUTED 4000cd2c: 02 80 00 05 be 4000cd40 <== NOT EXECUTED 4000cd30: a2 0c 60 06 and %l1, 6, %l1 <== NOT EXECUTED pipe->Readers --; 4000cd34: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000cd38: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000cd3c: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4000cd40: 80 8c 60 04 btst 4, %l1 <== NOT EXECUTED 4000cd44: 02 80 00 06 be 4000cd5c <== NOT EXECUTED 4000cd48: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED pipe->Writers --; 4000cd4c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000cd50: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000cd54: c2 24 20 14 st %g1, [ %l0 + 0x14 ] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4000cd58: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000cd5c: d0 00 63 44 ld [ %g1 + 0x344 ], %o0 ! 4001bf44 <== NOT EXECUTED 4000cd60: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000cd64: 7f ff e5 e3 call 400064f0 <== NOT EXECUTED 4000cd68: 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) 4000cd6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cd70: 02 80 00 04 be 4000cd80 <== NOT EXECUTED 4000cd74: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); 4000cd78: 7f ff e7 85 call 40006b8c <== NOT EXECUTED 4000cd7c: 01 00 00 00 nop <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000cd80: 7f ff e6 23 call 4000660c <== NOT EXECUTED 4000cd84: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4000cd88: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000cd8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cd90: 12 80 00 0a bne 4000cdb8 <== NOT EXECUTED 4000cd94: 80 a4 60 04 cmp %l1, 4 <== NOT EXECUTED 4000cd98: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 4000cd9c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000cda0: 12 80 00 06 bne 4000cdb8 <== NOT EXECUTED 4000cda4: 80 a4 60 04 cmp %l1, 4 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 4000cda8: 7f ff ff ca call 4000ccd0 <== NOT EXECUTED 4000cdac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4000cdb0: 10 80 00 12 b 4000cdf8 <== NOT EXECUTED 4000cdb4: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4000cdb8: 02 80 00 06 be 4000cdd0 <== NOT EXECUTED 4000cdbc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cdc0: 12 80 00 05 bne 4000cdd4 <== NOT EXECUTED 4000cdc4: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4000cdc8: 10 80 00 0a b 4000cdf0 <== NOT EXECUTED 4000cdcc: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4000cdd0: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED 4000cdd4: 02 80 00 0a be 4000cdfc <== NOT EXECUTED 4000cdd8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000cddc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000cde0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cde4: 12 80 00 06 bne 4000cdfc <== NOT EXECUTED 4000cde8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000cdec: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000cdf0: 40 00 01 f4 call 4000d5c0 <== NOT EXECUTED 4000cdf4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4000cdf8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000cdfc: d0 00 63 44 ld [ %g1 + 0x344 ], %o0 ! 4001bf44 <== NOT EXECUTED 4000ce00: 7f ff e6 03 call 4000660c <== NOT EXECUTED 4000ce04: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000ce08: 81 c7 e0 08 ret <== NOT EXECUTED 4000ce0c: 81 e8 00 00 restore <== NOT EXECUTED 4000c974 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4000c974: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4000c978: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4000c97c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000c980: 02 80 00 6b be 4000cb2c <== NOT EXECUTED 4000c984: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 4000c988: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000c98c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c990: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c994: 7f ff e6 d7 call 400064f0 <== NOT EXECUTED 4000c998: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000c99c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c9a0: 12 80 00 63 bne 4000cb2c <== NOT EXECUTED 4000c9a4: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4000c9a8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000c9ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c9b0: 02 80 00 5a be 4000cb18 <== NOT EXECUTED 4000c9b4: b0 10 20 00 clr %i0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4000c9b8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 4000c9bc: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 4000c9c0: 08 80 00 04 bleu 4000c9d0 <== NOT EXECUTED 4000c9c4: a6 10 00 1a mov %i2, %l3 <== NOT EXECUTED 4000c9c8: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED 4000c9cc: 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); 4000c9d0: 10 80 00 4e b 4000cb08 <== NOT EXECUTED 4000c9d4: 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) { if (LIBIO_NODELAY(iop)) { 4000c9d8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000c9dc: 22 80 00 04 be,a 4000c9ec <== NOT EXECUTED 4000c9e0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000c9e4: 10 80 00 4d b 4000cb18 <== NOT EXECUTED 4000c9e8: a2 10 3f f5 mov -11, %l1 <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4000c9ec: 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 ++; 4000c9f0: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000c9f4: 7f ff e7 06 call 4000660c <== NOT EXECUTED 4000c9f8: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000c9fc: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000ca00: 40 00 03 07 call 4000d61c <== NOT EXECUTED 4000ca04: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ca08: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000ca0c: 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)) 4000ca10: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000ca14: 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)) 4000ca18: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000ca1c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000ca20: 7f ff e6 b4 call 400064f0 <== NOT EXECUTED 4000ca24: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000ca28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ca2c: 22 80 00 04 be,a 4000ca3c <== NOT EXECUTED 4000ca30: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000ca34: 10 80 00 3b b 4000cb20 <== NOT EXECUTED 4000ca38: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) 4000ca3c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4000ca40: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000ca44: 12 80 00 35 bne 4000cb18 <== NOT EXECUTED 4000ca48: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4000ca4c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000ca50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ca54: 32 80 00 04 bne,a 4000ca64 <== NOT EXECUTED 4000ca58: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000ca5c: 10 80 00 2f b 4000cb18 <== NOT EXECUTED 4000ca60: a2 10 3f e0 mov -32, %l1 <== 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) { 4000ca64: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000ca68: a2 24 80 01 sub %l2, %g1, %l1 <== NOT EXECUTED 4000ca6c: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 4000ca70: 2a bf ff da bcs,a 4000c9d8 <== NOT EXECUTED 4000ca74: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4000ca78: 84 26 80 18 sub %i2, %i0, %g2 <== NOT EXECUTED 4000ca7c: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000ca80: 38 80 00 02 bgu,a 4000ca88 <== NOT EXECUTED 4000ca84: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4000ca88: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 4000ca8c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 4000ca90: 40 00 2b f2 call 40017a58 <.urem> <== NOT EXECUTED 4000ca94: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000ca98: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000ca9c: a4 24 80 08 sub %l2, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000caa0: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000caa4: 04 80 00 0a ble 4000cacc <== NOT EXECUTED 4000caa8: 92 06 40 18 add %i1, %i0, %o1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4000caac: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000cab0: 40 00 07 e8 call 4000ea50 <== NOT EXECUTED 4000cab4: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4000cab8: 92 04 80 18 add %l2, %i0, %o1 <== NOT EXECUTED 4000cabc: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4000cac0: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000cac4: 10 80 00 04 b 4000cad4 <== NOT EXECUTED 4000cac8: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4000cacc: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000cad0: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000cad4: 40 00 07 df call 4000ea50 <== NOT EXECUTED 4000cad8: 01 00 00 00 nop <== NOT EXECUTED pipe->Length += chunk; 4000cadc: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000cae0: 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; 4000cae4: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000cae8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000caec: 02 80 00 05 be 4000cb00 <== NOT EXECUTED 4000caf0: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000caf4: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000caf8: 40 00 02 b2 call 4000d5c0 <== NOT EXECUTED 4000cafc: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 4000cb00: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 4000cb04: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4000cb08: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000cb0c: 2a bf ff d6 bcs,a 4000ca64 <== NOT EXECUTED 4000cb10: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000cb14: a2 10 20 00 clr %l1 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4000cb18: 7f ff e6 bd call 4000660c <== NOT EXECUTED 4000cb1c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4000cb20: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000cb24: 24 80 00 02 ble,a 4000cb2c <== NOT EXECUTED 4000cb28: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return written; return ret; } 4000cb2c: 81 c7 e0 08 ret <== NOT EXECUTED 4000cb30: 81 e8 00 00 restore <== NOT EXECUTED 40019da8 : ssize_t read( int fd, void *buffer, size_t count ) { 40019da8: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40019dac: 03 10 00 6d sethi %hi(0x4001b400), %g1 40019db0: c2 00 63 e4 ld [ %g1 + 0x3e4 ], %g1 ! 4001b7e4 ssize_t read( int fd, void *buffer, size_t count ) { 40019db4: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40019db8: 80 a6 00 01 cmp %i0, %g1 40019dbc: 1a 80 00 0c bcc 40019dec 40019dc0: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40019dc4: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019dc8: e0 00 60 fc ld [ %g1 + 0xfc ], %l0 ! 4001c0fc 40019dcc: 83 2e 20 06 sll %i0, 6, %g1 40019dd0: b1 2e 20 03 sll %i0, 3, %i0 40019dd4: b0 06 00 01 add %i0, %g1, %i0 40019dd8: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 40019ddc: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40019de0: 80 88 61 00 btst 0x100, %g1 40019de4: 12 80 00 06 bne 40019dfc 40019de8: 80 a6 60 00 cmp %i1, 0 40019dec: 7f ff d0 de call 4000e164 <__errno> 40019df0: 01 00 00 00 nop 40019df4: 10 80 00 14 b 40019e44 40019df8: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_buffer( buffer ); 40019dfc: 02 80 00 07 be 40019e18 40019e00: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40019e04: 02 80 00 1c be 40019e74 40019e08: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40019e0c: 80 88 60 02 btst 2, %g1 40019e10: 32 80 00 06 bne,a 40019e28 40019e14: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40019e18: 7f ff d0 d3 call 4000e164 <__errno> <== NOT EXECUTED 40019e1c: 01 00 00 00 nop <== NOT EXECUTED 40019e20: 10 80 00 09 b 40019e44 <== NOT EXECUTED 40019e24: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 40019e28: c2 00 60 08 ld [ %g1 + 8 ], %g1 40019e2c: 80 a0 60 00 cmp %g1, 0 40019e30: 12 80 00 08 bne 40019e50 40019e34: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019e38: 7f ff d0 cb call 4000e164 <__errno> <== NOT EXECUTED 40019e3c: 01 00 00 00 nop <== NOT EXECUTED 40019e40: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40019e44: c2 22 00 00 st %g1, [ %o0 ] 40019e48: 10 80 00 0b b 40019e74 40019e4c: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->read_h)( iop, buffer, count ); 40019e50: 9f c0 40 00 call %g1 40019e54: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 40019e58: 80 a2 20 00 cmp %o0, 0 40019e5c: 04 80 00 06 ble 40019e74 40019e60: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 40019e64: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 40019e68: 86 83 40 08 addcc %o5, %o0, %g3 40019e6c: 84 43 00 02 addx %o4, %g2, %g2 40019e70: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 40019e74: 81 c7 e0 08 ret 40019e78: 91 e8 00 08 restore %g0, %o0, %o0 4002893c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 4002893c: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40028940: 80 a6 60 00 cmp %i1, 0 40028944: 12 80 00 06 bne 4002895c 40028948: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 4002894c: 40 00 59 eb call 4003f0f8 <__errno> <== NOT EXECUTED 40028950: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40028954: 10 80 00 32 b 40028a1c <== NOT EXECUTED 40028958: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 4002895c: 40 00 75 12 call 40045da4 40028960: 90 10 00 18 mov %i0, %o0 40028964: a0 07 bf ec add %fp, -20, %l0 40028968: 92 10 00 08 mov %o0, %o1 4002896c: 94 10 20 00 clr %o2 40028970: 90 10 00 18 mov %i0, %o0 40028974: 96 10 00 10 mov %l0, %o3 40028978: 98 10 20 00 clr %o4 4002897c: 7f ff 7c 7e call 40007b74 40028980: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 40028984: 80 a2 20 00 cmp %o0, 0 40028988: 12 80 00 26 bne 40028a20 4002898c: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 40028990: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40028994: 80 a0 60 00 cmp %g1, 0 40028998: 22 80 00 19 be,a 400289fc 4002899c: 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 ){ 400289a0: 9f c0 40 00 call %g1 400289a4: 90 10 00 10 mov %l0, %o0 400289a8: 80 a2 20 04 cmp %o0, 4 400289ac: 02 80 00 0f be 400289e8 400289b0: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_freenode( &loc ); 400289b4: 80 a0 a0 00 cmp %g2, 0 400289b8: 02 80 00 08 be 400289d8 400289bc: 01 00 00 00 nop 400289c0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 400289c4: 80 a0 60 00 cmp %g1, 0 400289c8: 02 80 00 04 be 400289d8 400289cc: 01 00 00 00 nop 400289d0: 9f c0 40 00 call %g1 400289d4: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 400289d8: 40 00 59 c8 call 4003f0f8 <__errno> 400289dc: b0 10 3f ff mov -1, %i0 400289e0: 10 80 00 0f b 40028a1c 400289e4: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 400289e8: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 400289ec: 80 a0 60 00 cmp %g1, 0 400289f0: 12 80 00 0e bne 40028a28 400289f4: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 400289f8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400289fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028a00: 02 80 00 04 be 40028a10 <== NOT EXECUTED 40028a04: 01 00 00 00 nop <== NOT EXECUTED 40028a08: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028a0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028a10: 40 00 59 ba call 4003f0f8 <__errno> <== NOT EXECUTED 40028a14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028a18: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028a1c: c2 22 00 00 st %g1, [ %o0 ] 40028a20: 81 c7 e0 08 ret 40028a24: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 40028a28: 94 10 00 1a mov %i2, %o2 40028a2c: 9f c0 40 00 call %g1 40028a30: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40028a34: c2 07 bf f8 ld [ %fp + -8 ], %g1 40028a38: 80 a0 60 00 cmp %g1, 0 40028a3c: 02 bf ff f9 be 40028a20 40028a40: b0 10 00 08 mov %o0, %i0 40028a44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028a48: 80 a0 60 00 cmp %g1, 0 40028a4c: 02 80 00 04 be 40028a5c 40028a50: 01 00 00 00 nop 40028a54: 9f c0 40 00 call %g1 40028a58: 90 10 00 10 mov %l0, %o0 return result; } 40028a5c: 81 c7 e0 08 ret 40028a60: 81 e8 00 00 restore 400052d0 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 400052d0: 9d e3 bf a0 save %sp, -96, %sp int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 400052d4: 03 10 00 80 sethi %hi(0x40020000), %g1 400052d8: c2 00 63 64 ld [ %g1 + 0x364 ], %g1 ! 40020364 400052dc: 80 a6 00 01 cmp %i0, %g1 400052e0: 1a 80 00 0c bcc 40005310 400052e4: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 400052e8: 03 10 00 85 sethi %hi(0x40021400), %g1 400052ec: e4 00 60 54 ld [ %g1 + 0x54 ], %l2 ! 40021454 400052f0: 83 2e 20 06 sll %i0, 6, %g1 400052f4: b1 2e 20 03 sll %i0, 3, %i0 400052f8: b0 06 00 01 add %i0, %g1, %i0 400052fc: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 40005300: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 40005304: 80 88 61 00 btst 0x100, %g1 40005308: 12 80 00 06 bne 40005320 4000530c: 80 88 60 02 btst 2, %g1 40005310: 40 00 2d 5c call 40010880 <__errno> <== NOT EXECUTED 40005314: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005318: 10 80 00 24 b 400053a8 <== NOT EXECUTED 4000531c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40005320: 02 80 00 1f be 4000539c 40005324: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 40005328: 02 80 00 1d be 4000539c 4000532c: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 40005330: 04 80 00 1b ble 4000539c 40005334: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 40005338: 14 80 00 19 bg 4000539c 4000533c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 40005340: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 40005344: c2 00 60 08 ld [ %g1 + 8 ], %g1 40005348: 80 a0 60 00 cmp %g1, 0 4000534c: 12 80 00 06 bne 40005364 40005350: 86 10 20 00 clr %g3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40005354: 40 00 2d 4b call 40010880 <__errno> <== NOT EXECUTED 40005358: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000535c: 10 80 00 13 b 400053a8 <== NOT EXECUTED 40005360: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40005364: 82 10 00 19 mov %i1, %g1 40005368: 84 10 20 00 clr %g2 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 4000536c: c8 00 40 00 ld [ %g1 ], %g4 40005370: 80 a1 20 00 cmp %g4, 0 40005374: 02 80 00 0a be 4000539c 40005378: 86 00 e0 01 inc %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 4000537c: c8 00 60 04 ld [ %g1 + 4 ], %g4 40005380: 80 a1 20 00 cmp %g4, 0 40005384: 02 80 00 06 be 4000539c 40005388: 82 00 60 08 add %g1, 8, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 4000538c: 88 00 80 04 add %g2, %g4, %g4 if ( total < old ) 40005390: 80 a1 00 02 cmp %g4, %g2 40005394: 16 80 00 08 bge 400053b4 40005398: 80 a0 c0 1a cmp %g3, %i2 rtems_set_errno_and_return_minus_one( EINVAL ); 4000539c: 40 00 2d 39 call 40010880 <__errno> 400053a0: b0 10 3f ff mov -1, %i0 400053a4: 82 10 20 16 mov 0x16, %g1 400053a8: c2 22 00 00 st %g1, [ %o0 ] 400053ac: 81 c7 e0 08 ret 400053b0: 81 e8 00 00 restore * 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++ ) { 400053b4: 06 bf ff ee bl 4000536c 400053b8: 84 10 00 04 mov %g4, %g2 400053bc: a6 10 20 00 clr %l3 400053c0: b0 10 20 00 clr %i0 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 400053c4: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 400053c8: d2 06 40 00 ld [ %i1 ], %o1 400053cc: c2 00 60 08 ld [ %g1 + 8 ], %g1 400053d0: d4 06 60 04 ld [ %i1 + 4 ], %o2 400053d4: 9f c0 40 00 call %g1 400053d8: 90 10 00 12 mov %l2, %o0 if ( bytes < 0 ) 400053dc: 80 a2 20 00 cmp %o0, 0 400053e0: 16 80 00 04 bge 400053f0 400053e4: 01 00 00 00 nop 400053e8: 81 c7 e0 08 ret <== NOT EXECUTED 400053ec: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 400053f0: 02 80 00 07 be 4000540c 400053f4: a1 3a 20 1f sra %o0, 0x1f, %l0 iop->offset += bytes; 400053f8: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 <== NOT EXECUTED 400053fc: 86 80 c0 08 addcc %g3, %o0, %g3 <== NOT EXECUTED total += bytes; 40005400: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 40005404: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 40005408: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 4000540c: c2 06 60 04 ld [ %i1 + 4 ], %g1 40005410: 80 a2 00 01 cmp %o0, %g1 40005414: 12 bf ff e6 bne 400053ac 40005418: a6 04 e0 01 inc %l3 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4000541c: 80 a4 c0 1a cmp %l3, %i2 <== NOT EXECUTED 40005420: 06 bf ff e9 bl 400053c4 <== NOT EXECUTED 40005424: b2 06 60 08 add %i1, 8, %i1 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40005428: 81 c7 e0 08 ret <== NOT EXECUTED 4000542c: 81 e8 00 00 restore <== NOT EXECUTED 40019f00 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 40019f00: 9d e3 bf 98 save %sp, -104, %sp 40019f04: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019f08: 82 10 61 08 or %g1, 0x108, %g1 ! 4001c108 40019f0c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40019f10: 05 10 00 71 sethi %hi(0x4001c400), %g2 40019f14: c4 00 a0 70 ld [ %g2 + 0x70 ], %g2 ! 4001c470 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 40019f18: 86 00 e0 01 inc %g3 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40019f1c: 80 a0 a0 03 cmp %g2, 3 40019f20: 12 80 00 0c bne 40019f50 40019f24: c6 20 60 10 st %g3, [ %g1 + 0x10 ] if (_Thread_Dispatch_disable_level > 0) 40019f28: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019f2c: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 4001c2d0 <_Thread_Dispatch_disable_level> 40019f30: 80 a0 60 00 cmp %g1, 0 40019f34: 32 80 00 13 bne,a 40019f80 40019f38: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 40019f3c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019f40: c2 00 63 68 ld [ %g1 + 0x368 ], %g1 ! 4001c368 <_ISR_Nest_level> 40019f44: 80 a0 60 00 cmp %g1, 0 40019f48: 32 80 00 0e bne,a 40019f80 40019f4c: b0 10 20 00 clr %i0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 40019f50: 80 a6 20 00 cmp %i0, 0 40019f54: 12 80 00 06 bne 40019f6c 40019f58: 80 a6 60 00 cmp %i1, 0 return malloc( size ); 40019f5c: 7f ff c5 79 call 4000b540 40019f60: 90 10 00 19 mov %i1, %o0 40019f64: 81 c7 e0 08 ret 40019f68: 91 e8 00 08 restore %g0, %o0, %o0 if ( !size ) { 40019f6c: 12 80 00 07 bne 40019f88 40019f70: 21 10 00 6d sethi %hi(0x4001b400), %l0 free( ptr ); 40019f74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019f78: 7f ff c4 18 call 4000afd8 <== NOT EXECUTED 40019f7c: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 40019f80: 81 c7 e0 08 ret <== NOT EXECUTED 40019f84: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 40019f88: d0 04 23 f0 ld [ %l0 + 0x3f0 ], %o0 40019f8c: 92 10 00 18 mov %i0, %o1 40019f90: 40 00 00 60 call 4001a110 <_Protected_heap_Get_block_size> 40019f94: 94 07 bf fc add %fp, -4, %o2 40019f98: 80 8a 20 ff btst 0xff, %o0 40019f9c: 12 80 00 08 bne 40019fbc 40019fa0: d0 04 23 f0 ld [ %l0 + 0x3f0 ], %o0 errno = EINVAL; 40019fa4: 7f ff d0 70 call 4000e164 <__errno> 40019fa8: b0 10 20 00 clr %i0 40019fac: 82 10 20 16 mov 0x16, %g1 40019fb0: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 40019fb4: 81 c7 e0 08 ret 40019fb8: 81 e8 00 00 restore #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 ) ) { 40019fbc: 92 10 00 18 mov %i0, %o1 40019fc0: 40 00 00 61 call 4001a144 <_Protected_heap_Resize_block> 40019fc4: 94 10 00 19 mov %i1, %o2 40019fc8: 80 8a 20 ff btst 0xff, %o0 40019fcc: 12 80 00 1a bne 4001a034 40019fd0: 01 00 00 00 nop * 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 ); 40019fd4: 7f ff c5 5b call 4000b540 40019fd8: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 40019fdc: 03 10 00 70 sethi %hi(0x4001c000), %g1 40019fe0: 82 10 61 08 or %g1, 0x108, %g1 ! 4001c108 40019fe4: c4 00 60 04 ld [ %g1 + 4 ], %g2 * 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 ); 40019fe8: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 40019fec: 84 00 bf ff add %g2, -1, %g2 if ( !new_area ) { 40019ff0: 80 a2 20 00 cmp %o0, 0 40019ff4: 02 80 00 0f be 4001a030 40019ff8: c4 20 60 04 st %g2, [ %g1 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 40019ffc: c2 07 bf fc ld [ %fp + -4 ], %g1 4001a000: 80 a6 40 01 cmp %i1, %g1 4001a004: 08 80 00 03 bleu 4001a010 4001a008: 94 10 00 19 mov %i1, %o2 4001a00c: 94 10 00 01 mov %g1, %o2 4001a010: 92 10 00 18 mov %i0, %o1 4001a014: 7f ff d2 8f call 4000ea50 4001a018: 90 10 00 10 mov %l0, %o0 free( ptr ); 4001a01c: 90 10 00 18 mov %i0, %o0 4001a020: 7f ff c3 ee call 4000afd8 4001a024: b0 10 00 10 mov %l0, %i0 return new_area; 4001a028: 81 c7 e0 08 ret 4001a02c: 81 e8 00 00 restore 4001a030: b0 10 20 00 clr %i0 } 4001a034: 81 c7 e0 08 ret 4001a038: 81 e8 00 00 restore 400090e0 : #include int rmdir( const char *pathname ) { 400090e0: 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 ); 400090e4: 7f ff fa 56 call 40007a3c 400090e8: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 400090ec: a6 92 20 00 orcc %o0, 0, %l3 400090f0: 32 80 00 17 bne,a 4000914c 400090f4: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 400090f8: c2 4e 00 00 ldsb [ %i0 ], %g1 400090fc: 80 a0 60 5c cmp %g1, 0x5c 40009100: 02 80 00 06 be 40009118 40009104: 80 a0 60 2f cmp %g1, 0x2f 40009108: 02 80 00 04 be 40009118 4000910c: 80 a0 60 00 cmp %g1, 0 40009110: 12 80 00 07 bne 4000912c <== NOT EXECUTED 40009114: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40009118: 03 10 01 92 sethi %hi(0x40064800), %g1 4000911c: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 ! 40064b58 40009120: 90 07 bf ec add %fp, -20, %o0 40009124: 10 80 00 05 b 40009138 40009128: 92 02 60 18 add %o1, 0x18, %o1 4000912c: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 <== NOT EXECUTED 40009130: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 40009134: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 40009138: 94 10 20 14 mov 0x14, %o2 4000913c: 40 00 e4 c2 call 40042444 40009140: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009144: 10 80 00 0b b 40009170 40009148: 94 10 20 14 mov 0x14, %o2 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 4000914c: 92 10 00 13 mov %l3, %o1 40009150: 94 10 20 02 mov 2, %o2 40009154: 96 07 bf ec add %fp, -20, %o3 40009158: 7f ff fa 87 call 40007b74 4000915c: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 40009160: 80 a2 20 00 cmp %o0, 0 40009164: 12 80 00 89 bne 40009388 40009168: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000916c: 94 10 20 14 mov 0x14, %o2 40009170: a0 07 bf d8 add %fp, -40, %l0 40009174: a4 07 bf ec add %fp, -20, %l2 40009178: 90 10 00 10 mov %l0, %o0 4000917c: 40 00 e4 b2 call 40042444 40009180: 92 10 00 12 mov %l2, %o1 name = pathname + parentpathlen; 40009184: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40009188: 40 00 f3 07 call 40045da4 4000918c: 90 10 00 18 mov %i0, %o0 40009190: 92 10 00 08 mov %o0, %o1 40009194: 7f ff fa 18 call 400079f4 40009198: 90 10 00 18 mov %i0, %o0 4000919c: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 400091a0: 40 00 f3 01 call 40045da4 400091a4: 90 10 00 18 mov %i0, %o0 400091a8: 94 10 20 00 clr %o2 400091ac: 92 10 00 08 mov %o0, %o1 400091b0: 96 10 00 10 mov %l0, %o3 400091b4: 90 10 00 18 mov %i0, %o0 400091b8: 7f ff fa 33 call 40007a84 400091bc: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 400091c0: 80 a2 20 00 cmp %o0, 0 400091c4: 02 80 00 11 be 40009208 400091c8: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 400091cc: 80 8c 60 ff btst 0xff, %l1 400091d0: 02 80 00 0c be 40009200 400091d4: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 400091d8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400091dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400091e0: 02 80 00 6b be 4000938c <== NOT EXECUTED 400091e4: 01 00 00 00 nop <== NOT EXECUTED 400091e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400091ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400091f0: 02 80 00 04 be 40009200 <== NOT EXECUTED 400091f4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400091f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400091fc: 01 00 00 00 nop <== NOT EXECUTED 40009200: 81 c7 e0 08 ret 40009204: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40009208: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000920c: 80 a0 60 00 cmp %g1, 0 40009210: 12 80 00 04 bne 40009220 40009214: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40009218: 10 80 00 2b b 400092c4 <== NOT EXECUTED 4000921c: 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 ){ 40009220: 9f c0 40 00 call %g1 40009224: 90 10 00 10 mov %l0, %o0 40009228: 80 a2 20 01 cmp %o0, 1 4000922c: 02 80 00 1d be 400092a0 40009230: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &loc ); 40009234: c2 07 bf e4 ld [ %fp + -28 ], %g1 40009238: 80 a0 60 00 cmp %g1, 0 4000923c: 02 80 00 09 be 40009260 40009240: 80 8c 60 ff btst 0xff, %l1 40009244: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009248: 80 a0 60 00 cmp %g1, 0 4000924c: 02 80 00 05 be 40009260 40009250: 80 8c 60 ff btst 0xff, %l1 40009254: 9f c0 40 00 call %g1 40009258: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000925c: 80 8c 60 ff btst 0xff, %l1 40009260: 02 80 00 0c be 40009290 40009264: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 40009268: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000926c: 80 a0 60 00 cmp %g1, 0 40009270: 02 80 00 08 be 40009290 40009274: 01 00 00 00 nop 40009278: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000927c: 80 a0 60 00 cmp %g1, 0 40009280: 02 80 00 04 be 40009290 40009284: 01 00 00 00 nop 40009288: 9f c0 40 00 call %g1 4000928c: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40009290: 40 00 d7 9a call 4003f0f8 <__errno> 40009294: b0 10 3f ff mov -1, %i0 40009298: 10 80 00 1f b 40009314 4000929c: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 400092a0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400092a4: 80 a0 60 00 cmp %g1, 0 400092a8: 12 80 00 1e bne 40009320 400092ac: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 400092b0: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 400092b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092b8: 02 80 00 09 be 400092dc <== NOT EXECUTED 400092bc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400092c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092c8: 02 80 00 05 be 400092dc <== NOT EXECUTED 400092cc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400092d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 400092d8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092dc: 02 80 00 0b be 40009308 <== NOT EXECUTED 400092e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 400092e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092e8: 02 80 00 08 be 40009308 <== NOT EXECUTED 400092ec: 01 00 00 00 nop <== NOT EXECUTED 400092f0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400092f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092f8: 02 80 00 04 be 40009308 <== NOT EXECUTED 400092fc: 01 00 00 00 nop <== NOT EXECUTED 40009300: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009304: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009308: 40 00 d7 7c call 4003f0f8 <__errno> <== NOT EXECUTED 4000930c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009310: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009314: c2 22 00 00 st %g1, [ %o0 ] 40009318: 81 c7 e0 08 ret 4000931c: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 40009320: 9f c0 40 00 call %g1 40009324: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 40009328: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000932c: 80 a0 60 00 cmp %g1, 0 40009330: 02 80 00 08 be 40009350 40009334: b0 10 00 08 mov %o0, %i0 40009338: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000933c: 80 a0 60 00 cmp %g1, 0 40009340: 02 80 00 05 be 40009354 40009344: 80 8c 60 ff btst 0xff, %l1 40009348: 9f c0 40 00 call %g1 4000934c: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40009350: 80 8c 60 ff btst 0xff, %l1 40009354: 02 bf ff ab be 40009200 40009358: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000935c: 80 a0 60 00 cmp %g1, 0 40009360: 02 80 00 0b be 4000938c 40009364: 01 00 00 00 nop 40009368: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000936c: 80 a0 60 00 cmp %g1, 0 40009370: 02 80 00 07 be 4000938c 40009374: 01 00 00 00 nop 40009378: 9f c0 40 00 call %g1 4000937c: 90 07 bf ec add %fp, -20, %o0 40009380: 81 c7 e0 08 ret 40009384: 81 e8 00 00 restore 40009388: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 4000938c: 81 c7 e0 08 ret <== NOT EXECUTED 40009390: 81 e8 00 00 restore <== NOT EXECUTED 40014be4 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 40014be4: 11 10 00 9b sethi %hi(0x40026c00), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40014be8: 81 c3 e0 08 retl <== NOT EXECUTED 40014bec: 90 12 23 58 or %o0, 0x358, %o0 ! 40026f58 <== NOT EXECUTED 40011bac : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40011bac: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40011bb0: 90 10 00 18 mov %i0, %o0 40011bb4: 40 00 00 0b call 40011be0 40011bb8: 92 10 00 19 mov %i1, %o1 if (nap) 40011bbc: 80 a2 20 00 cmp %o0, 0 40011bc0: 02 80 00 05 be 40011bd4 40011bc4: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 40011bc8: f0 02 00 00 ld [ %o0 ], %i0 40011bcc: 81 c7 e0 08 ret 40011bd0: 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); 40011bd4: 40 00 0c 04 call 40014be4 <== NOT EXECUTED 40011bd8: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40011bdc: 01 00 00 00 nop 4000ddd4 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000ddd4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000ddd8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000dddc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000dde0: 40 00 00 c1 call 4000e0e4 <== NOT EXECUTED 4000dde4: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000dde8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ddec: 32 80 00 02 bne,a 4000ddf4 <== NOT EXECUTED 4000ddf0: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000ddf4: 81 c7 e0 08 ret <== NOT EXECUTED 4000ddf8: 81 e8 00 00 restore <== NOT EXECUTED 40003160 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 40003160: 9d e3 bf a0 save %sp, -96, %sp const char *p; if ( !name ) 40003164: 90 96 20 00 orcc %i0, 0, %o0 40003168: 22 80 00 26 be,a 40003200 4000316c: b2 10 20 00 clr %i1 return NULL; if ( !value ) 40003170: 80 a6 60 00 cmp %i1, 0 40003174: 22 80 00 24 be,a 40003204 40003178: b0 10 00 19 mov %i1, %i0 return NULL; if ( !length ) 4000317c: 80 a6 a0 00 cmp %i2, 0 40003180: 22 80 00 20 be,a 40003200 40003184: b2 10 20 00 clr %i1 return NULL; value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); 40003188: 40 00 00 21 call 4000320c 4000318c: c0 2e 40 00 clrb [ %i1 ] if ( !p ) 40003190: 80 a2 20 00 cmp %o0, 0 40003194: 02 80 00 1a be 400031fc 40003198: b4 06 bf ff add %i2, -1, %i2 4000319c: 84 10 20 00 clr %g2 400031a0: 10 80 00 0e b 400031d8 400031a4: 82 10 20 00 clr %g1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 400031ac: 80 88 a0 01 btst 1, %g2 quotes++; 400031b0: 10 80 00 07 b 400031cc <== NOT EXECUTED 400031b4: 84 00 a0 01 inc %g2 <== NOT EXECUTED } else if ( ((quotes % 2) == 0) && *p == ' ' ) 400031b8: 32 80 00 06 bne,a 400031d0 400031bc: c8 2e 40 01 stb %g4, [ %i1 + %g1 ] <== NOT EXECUTED 400031c0: 80 a0 e0 20 cmp %g3, 0x20 400031c4: 02 80 00 10 be 40003204 400031c8: b0 10 00 19 mov %i1, %i0 break; value[i++] = *p++; 400031cc: c8 2e 40 01 stb %g4, [ %i1 + %g1 ] 400031d0: 82 00 60 01 inc %g1 value[i] = '\0'; 400031d4: c0 2e 40 01 clrb [ %i1 + %g1 ] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 400031e4: c8 0a 00 01 ldub [ %o0 + %g1 ], %g4 400031e8: 80 a0 40 1a cmp %g1, %i2 400031ec: 0a bf ff ef bcs 400031a8 400031f0: 80 a0 e0 22 cmp %g3, 0x22 return NULL; copy_string( p, value, length ); return value; } 400031f4: 81 c7 e0 08 ret <== NOT EXECUTED 400031f8: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i: const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 4000323c: 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 ); 40003240: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40003244: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003248: 7f ff ff c6 call 40003160 <== NOT EXECUTED 4000324c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if ( !p ) 40003250: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40003254: 22 80 00 1e be,a 400032cc <== NOT EXECUTED 40003258: b2 10 20 00 clr %i1 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 4000325c: 40 00 30 ab call 4000f508 <== NOT EXECUTED 40003260: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( *rhs != '=' ) 40003264: c2 4c 40 08 ldsb [ %l1 + %o0 ], %g1 <== NOT EXECUTED 40003268: 80 a0 60 3d cmp %g1, 0x3d <== NOT EXECUTED 4000326c: 12 80 00 17 bne 400032c8 <== NOT EXECUTED 40003270: a2 04 40 08 add %l1, %o0, %l1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 40003274: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 <== NOT EXECUTED 40003278: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 4000327c: 12 80 00 03 bne 40003288 <== NOT EXECUTED 40003280: 84 04 60 01 add %l1, 1, %g2 <== NOT EXECUTED rhs++; 40003284: 84 04 60 02 add %l1, 2, %g2 <== NOT EXECUTED 40003288: 10 80 00 05 b 4000329c <== NOT EXECUTED 4000328c: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 40003290: c8 28 40 00 stb %g4, [ %g1 ] <== NOT EXECUTED 40003294: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40003298: 82 00 60 01 inc %g1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 4000329c: c6 48 80 00 ldsb [ %g2 ], %g3 <== NOT EXECUTED 400032a0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400032a4: 12 bf ff fb bne 40003290 <== NOT EXECUTED 400032a8: c8 08 80 00 ldub [ %g2 ], %g4 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 400032ac: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 <== NOT EXECUTED 400032b0: 80 a0 e0 22 cmp %g3, 0x22 <== NOT EXECUTED 400032b4: 12 80 00 03 bne 400032c0 <== NOT EXECUTED 400032b8: 84 00 7f ff add %g1, -1, %g2 <== NOT EXECUTED 400032bc: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED d--; *d = '\0'; return value; 400032c0: 10 80 00 03 b 400032cc <== NOT EXECUTED 400032c4: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED 400032c8: b2 10 20 00 clr %i1 <== NOT EXECUTED } 400032cc: 81 c7 e0 08 ret <== NOT EXECUTED 400032d0: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40003b70 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003b70: 9d e3 bf 60 save %sp, -160, %sp Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40003b74: 80 a6 60 00 cmp %i1, 0 40003b78: 02 80 00 69 be 40003d1c 40003b7c: ae 07 bf f0 add %fp, -16, %l7 * 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 ); 40003b80: 40 00 14 61 call 40008d04 <_TOD_Get_uptime> 40003b84: 90 10 00 17 mov %l7, %o0 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40003b88: 92 10 00 17 mov %l7, %o1 40003b8c: ba 07 bf e8 add %fp, -24, %i5 40003b90: 11 10 00 aa sethi %hi(0x4002a800), %o0 40003b94: 94 10 00 1d mov %i5, %o2 40003b98: 40 00 1e 3d call 4000b48c <_Timespec_Subtract> 40003b9c: 90 12 20 6c or %o0, 0x6c, %o0 } } } #endif (*print)( 40003ba0: 90 10 00 18 mov %i0, %o0 40003ba4: 13 10 00 80 sethi %hi(0x40020000), %o1 40003ba8: 21 10 00 a9 sethi %hi(0x4002a400), %l0 40003bac: 92 12 60 00 mov %o1, %o1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003bb0: 39 10 00 80 sethi %hi(0x40020000), %i4 /* * 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 ) { 40003bb4: 2d 10 00 a9 sethi %hi(0x4002a400), %l6 /* * Print the information */ (*print)( context, 40003bb8: 37 10 00 80 sethi %hi(0x40020000), %i3 } } } #endif (*print)( 40003bbc: 9f c6 40 00 call %i1 40003bc0: 35 10 00 a9 sethi %hi(0x4002a400), %i2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003bc4: a8 07 bf c8 add %fp, -56, %l4 } } } #endif (*print)( 40003bc8: a0 14 21 14 or %l0, 0x114, %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003bcc: b8 17 21 78 or %i4, 0x178, %i4 /* * 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 ) { 40003bd0: ac 15 a2 6c or %l6, 0x26c, %l6 /* * Print the information */ (*print)( context, 40003bd4: b6 16 e1 90 or %i3, 0x190, %i3 * 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( 40003bd8: b4 16 a2 74 or %i2, 0x274, %i2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40003bdc: a6 07 bf e0 add %fp, -32, %l3 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40003be0: c2 04 00 00 ld [ %l0 ], %g1 40003be4: 80 a0 60 00 cmp %g1, 0 40003be8: 22 80 00 3f be,a 40003ce4 40003bec: a0 04 20 04 add %l0, 4, %l0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40003bf0: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( information ) { 40003bf4: a2 10 20 01 mov 1, %l1 40003bf8: 80 a4 a0 00 cmp %l2, 0 40003bfc: 12 80 00 33 bne 40003cc8 40003c00: aa 07 bf d8 add %fp, -40, %l5 for ( i=1 ; i <= information->maximum ; i++ ) { 40003c04: 10 80 00 38 b 40003ce4 <== NOT EXECUTED 40003c08: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 40003c0c: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 40003c10: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !the_thread ) 40003c14: 80 a0 60 00 cmp %g1, 0 40003c18: 02 80 00 2c be 40003cc8 40003c1c: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003c20: d0 00 60 08 ld [ %g1 + 8 ], %o0 40003c24: 40 00 0f 67 call 400079c0 40003c28: c2 27 bf c4 st %g1, [ %fp + -60 ] (*print)( 40003c2c: c2 07 bf c4 ld [ %fp + -60 ], %g1 40003c30: 90 10 00 18 mov %i0, %o0 40003c34: d4 00 60 08 ld [ %g1 + 8 ], %o2 40003c38: 92 10 00 1c mov %i4, %o1 40003c3c: 9f c6 40 00 call %i1 40003c40: 96 10 00 14 mov %l4, %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; 40003c44: c2 07 bf c4 ld [ %fp + -60 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003c48: c4 05 80 00 ld [ %l6 ], %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; 40003c4c: c6 00 60 84 ld [ %g1 + 0x84 ], %g3 40003c50: c6 27 bf e0 st %g3, [ %fp + -32 ] 40003c54: c6 00 60 88 ld [ %g1 + 0x88 ], %g3 40003c58: c6 27 bf e4 st %g3, [ %fp + -28 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003c5c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 40003c60: c2 00 60 08 ld [ %g1 + 8 ], %g1 40003c64: 80 a0 80 01 cmp %g2, %g1 40003c68: 12 80 00 0a bne 40003c90 40003c6c: 94 07 bf fc add %fp, -4, %o2 Timestamp_Control used; _Timestamp_Subtract( 40003c70: 90 10 00 1a mov %i2, %o0 40003c74: 92 10 00 17 mov %l7, %o1 40003c78: 40 00 1e 05 call 4000b48c <_Timespec_Subtract> 40003c7c: 94 10 00 15 mov %l5, %o2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 40003c80: 90 10 00 13 mov %l3, %o0 40003c84: 40 00 1d 57 call 4000b1e0 <_Timespec_Add_to> 40003c88: 92 10 00 15 mov %l5, %o1 }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40003c8c: 94 07 bf fc add %fp, -4, %o2 40003c90: 96 07 bf f8 add %fp, -8, %o3 40003c94: 90 10 00 13 mov %l3, %o0 40003c98: 40 00 1d 6b call 4000b244 <_Timespec_Divide> 40003c9c: 92 10 00 1d mov %i5, %o1 /* * Print the information */ (*print)( context, 40003ca0: d0 07 bf e4 ld [ %fp + -28 ], %o0 40003ca4: 40 00 63 b5 call 4001cb78 <.udiv> 40003ca8: 92 10 23 e8 mov 0x3e8, %o1 40003cac: d4 07 bf e0 ld [ %fp + -32 ], %o2 40003cb0: d8 07 bf fc ld [ %fp + -4 ], %o4 40003cb4: da 07 bf f8 ld [ %fp + -8 ], %o5 40003cb8: 96 10 00 08 mov %o0, %o3 40003cbc: 92 10 00 1b mov %i3, %o1 40003cc0: 9f c6 40 00 call %i1 40003cc4: 90 10 00 18 mov %i0, %o0 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++ ) { 40003cc8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003ccc: 94 10 00 14 mov %l4, %o2 40003cd0: 92 10 20 0d mov 0xd, %o1 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++ ) { 40003cd4: 80 a4 40 01 cmp %l1, %g1 40003cd8: 08 bf ff cd bleu 40003c0c 40003cdc: 85 2c 60 02 sll %l1, 2, %g2 40003ce0: a0 04 20 04 add %l0, 4, %l0 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 40003ce4: 03 10 00 a9 sethi %hi(0x4002a400), %g1 40003ce8: 82 10 61 24 or %g1, 0x124, %g1 ! 4002a524 <_Objects_Information_table+0x14> 40003cec: 80 a4 00 01 cmp %l0, %g1 40003cf0: 32 bf ff bd bne,a 40003be4 40003cf4: c2 04 00 00 ld [ %l0 ], %g1 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 40003cf8: d0 07 bf ec ld [ %fp + -20 ], %o0 40003cfc: 40 00 63 9f call 4001cb78 <.udiv> 40003d00: 92 10 23 e8 mov 0x3e8, %o1 40003d04: d4 07 bf e8 ld [ %fp + -24 ], %o2 40003d08: 96 10 00 08 mov %o0, %o3 40003d0c: 13 10 00 80 sethi %hi(0x40020000), %o1 40003d10: 90 10 00 18 mov %i0, %o0 40003d14: 9f c6 40 00 call %i1 40003d18: 92 12 61 a8 or %o1, 0x1a8, %o1 40003d1c: 81 c7 e0 08 ret 40003d20: 81 e8 00 00 restore 4000dda0 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4000dda0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000dda4: 11 10 00 6c sethi %hi(0x4001b000), %o0 <== NOT EXECUTED 4000dda8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ddac: 40 00 00 0a call 4000ddd4 <== NOT EXECUTED 4000ddb0: 90 12 20 ac or %o0, 0xac, %o0 <== NOT EXECUTED 4000ddb4: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000ddb8: 02 80 00 05 be 4000ddcc <== NOT EXECUTED 4000ddbc: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000ddc0: 40 00 00 e9 call 4000e164 <__errno> <== NOT EXECUTED 4000ddc4: 01 00 00 00 nop <== NOT EXECUTED 4000ddc8: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000ddcc: 81 c7 e0 08 ret <== NOT EXECUTED 4000ddd0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40008438 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 40008438: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 4000843c: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 40008440: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008444: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008448: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 4000844c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 40008450: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008454: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008458: 7f ff ff 7d call 4000824c <== NOT EXECUTED 4000845c: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40008460: 81 c7 e0 08 ret <== NOT EXECUTED 40008464: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003060 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 40003060: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 40003064: 80 a6 20 00 cmp %i0, 0 40003068: 12 80 00 06 bne 40003080 4000306c: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); 40003070: 40 00 2c 3d call 4000e164 <__errno> 40003074: 01 00 00 00 nop 40003078: 10 80 00 07 b 40003094 4000307c: 82 10 20 0e mov 0xe, %g1 ! e if ( !pathloc ) 40003080: 32 80 00 08 bne,a 400030a0 40003084: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40003088: 40 00 2c 37 call 4000e164 <__errno> <== NOT EXECUTED 4000308c: 01 00 00 00 nop <== NOT EXECUTED 40003090: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 40003094: c2 22 00 00 st %g1, [ %o0 ] return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 40003098: 81 c7 e0 08 ret 4000309c: 91 e8 3f ff restore %g0, -1, %o0 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 400030a0: 80 a0 60 5c cmp %g1, 0x5c 400030a4: 02 80 00 06 be 400030bc 400030a8: 80 a0 60 2f cmp %g1, 0x2f 400030ac: 02 80 00 04 be 400030bc 400030b0: 80 a0 60 00 cmp %g1, 0 400030b4: 32 80 00 0a bne,a 400030dc 400030b8: 03 10 00 6e sethi %hi(0x4001b800), %g1 400030bc: 03 10 00 6e sethi %hi(0x4001b800), %g1 400030c0: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 4001b8f8 400030c4: 90 10 00 1b mov %i3, %o0 400030c8: 92 02 60 18 add %o1, 0x18, %o1 400030cc: 40 00 2e 61 call 4000ea50 400030d0: 94 10 20 14 mov 0x14, %o2 400030d4: 10 80 00 08 b 400030f4 400030d8: 82 10 20 01 mov 1, %g1 400030dc: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 400030e0: 90 10 00 1b mov %i3, %o0 400030e4: 92 02 60 04 add %o1, 4, %o1 400030e8: 40 00 2e 5a call 4000ea50 400030ec: 94 10 20 14 mov 0x14, %o2 400030f0: 82 10 20 00 clr %g1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 400030f4: b2 26 40 01 sub %i1, %g1, %i1 400030f8: 7f ff ff 9e call 40002f70 400030fc: 91 ee 00 01 restore %i0, %g1, %o0 40003100: 01 00 00 00 nop 40002f70 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 40002f70: 9d e3 bf a0 save %sp, -96, %sp 40002f74: 90 10 00 18 mov %i0, %o0 /* * Verify Input parameters. */ if ( !pathname ) 40002f78: 80 a6 20 00 cmp %i0, 0 40002f7c: 12 80 00 06 bne 40002f94 40002f80: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EFAULT ); 40002f84: 40 00 2c 78 call 4000e164 <__errno> <== NOT EXECUTED 40002f88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002f8c: 10 80 00 2d b 40003040 <== NOT EXECUTED 40002f90: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED if ( !pathloc ) 40002f94: 80 a6 e0 00 cmp %i3, 0 40002f98: 32 80 00 06 bne,a 40002fb0 40002f9c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40002fa0: 40 00 2c 71 call 4000e164 <__errno> <== NOT EXECUTED 40002fa4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002fa8: 10 80 00 26 b 40003040 <== NOT EXECUTED 40002fac: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 40002fb0: c2 00 40 00 ld [ %g1 ], %g1 40002fb4: 80 a0 60 00 cmp %g1, 0 40002fb8: 02 80 00 1f be 40003034 40002fbc: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 40002fc0: 9f c0 40 00 call %g1 40002fc4: 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 ) { 40002fc8: b0 92 20 00 orcc %o0, 0, %i0 40002fcc: 12 80 00 1e bne 40003044 40002fd0: 80 a7 20 00 cmp %i4, 0 40002fd4: 02 80 00 21 be 40003058 40002fd8: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40002fdc: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 40002fe0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40002fe4: 80 a0 60 00 cmp %g1, 0 40002fe8: 22 80 00 0e be,a 40003020 40002fec: 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 ); 40002ff0: 9f c0 40 00 call %g1 40002ff4: 90 10 00 1b mov %i3, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 40002ff8: 90 02 3f fd add %o0, -3, %o0 40002ffc: 80 a2 20 01 cmp %o0, 1 40003000: 18 80 00 16 bgu 40003058 40003004: 01 00 00 00 nop ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 40003008: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 4000300c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40003010: 80 a0 60 00 cmp %g1, 0 40003014: 12 80 00 0e bne 4000304c 40003018: 90 10 00 1b mov %i3, %o0 rtems_filesystem_freenode( pathloc ); 4000301c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40003020: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003024: 02 80 00 04 be 40003034 <== NOT EXECUTED 40003028: 01 00 00 00 nop <== NOT EXECUTED 4000302c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003030: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003034: 40 00 2c 4c call 4000e164 <__errno> <== NOT EXECUTED 40003038: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000303c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003040: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003044: 81 c7 e0 08 ret 40003048: 81 e8 00 00 restore * 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 ); 4000304c: 9f c0 40 00 call %g1 40003050: 92 10 00 1a mov %i2, %o1 40003054: b0 10 00 08 mov %o0, %i0 } } return result; } 40003058: 81 c7 e0 08 ret 4000305c: 81 e8 00 00 restore 40002dd0 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 40002dd0: 9d e3 bf 88 save %sp, -120, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 40002dd4: 23 10 00 6e sethi %hi(0x4001b800), %l1 40002dd8: c2 04 60 f8 ld [ %l1 + 0xf8 ], %g1 ! 4001b8f8 40002ddc: 84 10 20 12 mov 0x12, %g2 init_fs_mount_table(); 40002de0: 40 00 01 8d call 40003414 40002de4: c4 30 60 2c sth %g2, [ %g1 + 0x2c ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 40002de8: 03 10 00 69 sethi %hi(0x4001a400), %g1 40002dec: c2 00 62 ac ld [ %g1 + 0x2ac ], %g1 ! 4001a6ac rtems_fatal_error_occurred( 0xABCD0001 ); 40002df0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 40002df4: 80 a0 60 00 cmp %g1, 0 40002df8: 02 80 00 0f be 40002e34 40002dfc: 90 12 20 01 or %o0, 1, %o0 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 40002e00: 03 10 00 6d sethi %hi(0x4001b400), %g1 40002e04: c2 00 63 ec ld [ %g1 + 0x3ec ], %g1 ! 4001b7ec status = mount( 40002e08: 90 07 bf fc add %fp, -4, %o0 40002e0c: d8 00 60 0c ld [ %g1 + 0xc ], %o4 40002e10: d2 00 40 00 ld [ %g1 ], %o1 40002e14: d4 00 60 04 ld [ %g1 + 4 ], %o2 40002e18: 40 00 01 87 call 40003434 40002e1c: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 40002e20: 80 a2 3f ff cmp %o0, -1 40002e24: 32 80 00 06 bne,a 40002e3c 40002e28: d0 04 60 f8 ld [ %l1 + 0xf8 ], %o0 rtems_fatal_error_occurred( 0xABCD0002 ); 40002e2c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40002e30: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 40002e34: 40 00 0f 56 call 40006b8c <== NOT EXECUTED 40002e38: 01 00 00 00 nop <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40002e3c: d2 07 bf fc ld [ %fp + -4 ], %o1 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 40002e40: c0 32 20 2e clrh [ %o0 + 0x2e ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40002e44: 92 02 60 1c add %o1, 0x1c, %o1 40002e48: 94 10 20 14 mov 0x14, %o2 40002e4c: 40 00 2f 01 call 4000ea50 40002e50: 90 02 20 18 add %o0, 0x18, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40002e54: a0 07 bf e8 add %fp, -24, %l0 40002e58: 98 10 20 00 clr %o4 40002e5c: 96 10 00 10 mov %l0, %o3 40002e60: 25 10 00 6a sethi %hi(0x4001a800), %l2 40002e64: 92 10 20 01 mov 1, %o1 40002e68: 94 10 20 00 clr %o2 40002e6c: 40 00 00 7d call 40003060 40002e70: 90 14 a2 b0 or %l2, 0x2b0, %o0 rtems_filesystem_root = loc; 40002e74: d0 04 60 f8 ld [ %l1 + 0xf8 ], %o0 40002e78: 92 10 00 10 mov %l0, %o1 40002e7c: 94 10 20 14 mov 0x14, %o2 40002e80: 40 00 2e f4 call 4000ea50 40002e84: 90 02 20 18 add %o0, 0x18, %o0 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40002e88: 96 10 00 10 mov %l0, %o3 40002e8c: 98 10 20 00 clr %o4 40002e90: 92 10 20 01 mov 1, %o1 40002e94: 94 10 20 00 clr %o2 40002e98: 40 00 00 72 call 40003060 40002e9c: 90 14 a2 b0 or %l2, 0x2b0, %o0 rtems_filesystem_current = loc; 40002ea0: d0 04 60 f8 ld [ %l1 + 0xf8 ], %o0 40002ea4: 92 10 00 10 mov %l0, %o1 40002ea8: 94 10 20 14 mov 0x14, %o2 40002eac: 40 00 2e e9 call 4000ea50 40002eb0: 90 02 20 04 add %o0, 4, %o0 * * 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); 40002eb4: 92 10 21 ff mov 0x1ff, %o1 40002eb8: 11 10 00 6a sethi %hi(0x4001a800), %o0 40002ebc: 40 00 00 fe call 400032b4 40002ec0: 90 12 22 b8 or %o0, 0x2b8, %o0 ! 4001aab8 <__FUNCTION__.5752+0x240> if ( status != 0 ) 40002ec4: 80 a2 20 00 cmp %o0, 0 40002ec8: 02 80 00 04 be 40002ed8 40002ecc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 40002ed0: 10 bf ff d9 b 40002e34 <== NOT EXECUTED 40002ed4: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 40002ed8: 81 c7 e0 08 ret 40002edc: 81 e8 00 00 restore 4000b4fc : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4000b4fc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000b500: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 4000b504: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 4000b508: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4000b50c: 81 c3 e0 08 retl <== NOT EXECUTED 4000b510: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40002ee0 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 40002ee0: 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 ) ) 40002ee4: 10 80 00 03 b 40002ef0 40002ee8: 90 10 20 00 clr %o0 { pathname++; pathnamelen--; stripped++; 40002eec: 90 02 20 01 inc %o0 <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 40002ef0: 80 a2 40 08 cmp %o1, %o0 40002ef4: 02 80 00 0b be 40002f20 40002ef8: c4 08 40 08 ldub [ %g1 + %o0 ], %g2 40002efc: 85 28 a0 18 sll %g2, 0x18, %g2 40002f00: 85 38 a0 18 sra %g2, 0x18, %g2 40002f04: 80 a0 a0 00 cmp %g2, 0 40002f08: 02 80 00 06 be 40002f20 40002f0c: 80 a0 a0 5c cmp %g2, 0x5c 40002f10: 02 bf ff f7 be 40002eec 40002f14: 80 a0 a0 2f cmp %g2, 0x2f 40002f18: 22 bf ff f6 be,a 40002ef0 40002f1c: 90 02 20 01 inc %o0 pathname++; pathnamelen--; stripped++; } return stripped; } 40002f20: 81 c3 e0 08 retl 40002f24: 01 00 00 00 nop 40002c3c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40002c3c: 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 ); 40002c40: 40 00 31 00 call 4000f040 <== NOT EXECUTED 40002c44: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002c48: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40002c4c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40002c50: 94 10 20 00 clr %o2 <== NOT EXECUTED 40002c54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002c58: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40002c5c: 40 00 01 01 call 40003060 <== NOT EXECUTED 40002c60: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002c64: 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 ); 40002c68: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002c6c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40002c70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002c74: 12 80 00 0e bne 40002cac <== NOT EXECUTED 40002c78: e4 07 bf ec ld [ %fp + -20 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002c7c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002c80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002c84: 02 80 00 04 be 40002c94 <== NOT EXECUTED 40002c88: 01 00 00 00 nop <== NOT EXECUTED 40002c8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002c90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002c94: 40 00 2d 34 call 4000e164 <__errno> <== NOT EXECUTED 40002c98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002c9c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002ca0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002ca4: 81 c7 e0 08 ret <== NOT EXECUTED 40002ca8: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 40002cac: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002cb0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40002cb4: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40002cb8: 12 80 00 06 bne 40002cd0 <== NOT EXECUTED 40002cbc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40002cc0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40002cc4: 22 80 00 0e be,a 40002cfc <== NOT EXECUTED 40002cc8: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002ccc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40002cd0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002cd4: 02 80 00 1c be 40002d44 <== NOT EXECUTED 40002cd8: 01 00 00 00 nop <== NOT EXECUTED 40002cdc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002ce0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002ce4: 02 80 00 18 be 40002d44 <== NOT EXECUTED 40002ce8: 01 00 00 00 nop <== NOT EXECUTED 40002cec: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002cf0: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40002cf4: 81 c7 e0 08 ret <== NOT EXECUTED 40002cf8: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 40002cfc: 40 00 30 d1 call 4000f040 <== NOT EXECUTED 40002d00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002d04: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40002d08: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40002d0c: 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; 40002d10: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40002d14: c4 04 a0 54 ld [ %l2 + 0x54 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002d18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002d1c: 02 80 00 0c be 40002d4c <== NOT EXECUTED 40002d20: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40002d24: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002d28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002d2c: 02 80 00 08 be 40002d4c <== NOT EXECUTED 40002d30: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40002d34: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002d38: b0 10 20 00 clr %i0 <== NOT EXECUTED 40002d3c: 81 c7 e0 08 ret <== NOT EXECUTED 40002d40: 81 e8 00 00 restore <== NOT EXECUTED 40002d44: 81 c7 e0 08 ret <== NOT EXECUTED 40002d48: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED 40002d4c: b0 10 20 00 clr %i0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40002d50: 81 c7 e0 08 ret <== NOT EXECUTED 40002d54: 81 e8 00 00 restore <== NOT EXECUTED 4000b3a4 : * 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 ) { 4000b3a4: 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 ); 4000b3a8: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b3ac: d0 00 61 04 ld [ %g1 + 0x104 ], %o0 ! 4001c104 4000b3b0: 92 10 20 00 clr %o1 4000b3b4: 7f ff ec 4f call 400064f0 4000b3b8: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000b3bc: 21 10 00 70 sethi %hi(0x4001c000), %l0 4000b3c0: c2 04 21 00 ld [ %l0 + 0x100 ], %g1 ! 4001c100 4000b3c4: 80 a0 60 00 cmp %g1, 0 4000b3c8: 02 80 00 26 be 4000b460 4000b3cc: b0 10 20 00 clr %i0 rc = rtems_semaphore_create( 4000b3d0: 05 10 00 70 sethi %hi(0x4001c000), %g2 4000b3d4: c4 00 a0 fc ld [ %g2 + 0xfc ], %g2 ! 4001c0fc 4000b3d8: 92 10 20 01 mov 1, %o1 4000b3dc: 82 20 40 02 sub %g1, %g2, %g1 4000b3e0: 83 38 60 03 sra %g1, 3, %g1 4000b3e4: 87 28 60 06 sll %g1, 6, %g3 4000b3e8: 85 28 60 03 sll %g1, 3, %g2 4000b3ec: 84 20 c0 02 sub %g3, %g2, %g2 4000b3f0: 87 28 a0 06 sll %g2, 6, %g3 4000b3f4: 84 00 80 03 add %g2, %g3, %g2 4000b3f8: 84 00 80 01 add %g2, %g1, %g2 4000b3fc: 87 28 a0 0f sll %g2, 0xf, %g3 4000b400: 84 20 c0 02 sub %g3, %g2, %g2 4000b404: 07 13 10 92 sethi %hi(0x4c424800), %g3 4000b408: 85 28 a0 03 sll %g2, 3, %g2 4000b40c: 86 10 e1 00 or %g3, 0x100, %g3 4000b410: 82 00 80 01 add %g2, %g1, %g1 4000b414: 94 10 20 54 mov 0x54, %o2 4000b418: 96 10 20 00 clr %o3 4000b41c: 90 10 40 03 or %g1, %g3, %o0 4000b420: 7f ff eb 92 call 40006268 4000b424: 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) 4000b428: 80 a2 20 00 cmp %o0, 0 4000b42c: 32 80 00 0d bne,a 4000b460 4000b430: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000b434: f0 04 21 00 ld [ %l0 + 0x100 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000b438: 92 10 20 00 clr %o1 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000b43c: e2 06 20 38 ld [ %i0 + 0x38 ], %l1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000b440: 90 10 00 18 mov %i0, %o0 4000b444: 40 00 0d c2 call 4000eb4c 4000b448: 94 10 20 48 mov 0x48, %o2 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000b44c: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_libio_iop_freelist = next; 4000b450: e2 24 21 00 st %l1, [ %l0 + 0x100 ] goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000b454: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 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; 4000b458: 82 10 21 00 mov 0x100, %g1 4000b45c: c2 26 20 18 st %g1, [ %i0 + 0x18 ] failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000b460: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b464: 7f ff ec 6a call 4000660c 4000b468: d0 00 61 04 ld [ %g1 + 0x104 ], %o0 ! 4001c104 return iop; } 4000b46c: 81 c7 e0 08 ret 4000b470: 81 e8 00 00 restore 40003104 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 40003104: 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) 40003108: 21 10 00 6d sethi %hi(0x4001b400), %l0 4000310c: d0 04 23 e4 ld [ %l0 + 0x3e4 ], %o0 ! 4001b7e4 40003110: 80 a2 20 00 cmp %o0, 0 40003114: 22 80 00 18 be,a 40003174 40003118: 11 13 10 92 sethi %hi(0x4c424800), %o0 <== NOT EXECUTED { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 4000311c: 40 00 1f 69 call 4000aec0 40003120: 92 10 20 48 mov 0x48, %o1 40003124: 03 10 00 70 sethi %hi(0x4001c000), %g1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 40003128: 80 a2 20 00 cmp %o0, 0 4000312c: 12 80 00 04 bne 4000313c 40003130: d0 20 60 fc st %o0, [ %g1 + 0xfc ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 40003134: 10 80 00 1a b 4000319c <== NOT EXECUTED 40003138: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 4000313c: 05 10 00 70 sethi %hi(0x4001c000), %g2 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40003140: c8 04 23 e4 ld [ %l0 + 0x3e4 ], %g4 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 40003144: d0 20 a1 00 st %o0, [ %g2 + 0x100 ] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40003148: 82 10 00 08 mov %o0, %g1 4000314c: 10 80 00 03 b 40003158 40003150: 84 10 20 00 clr %g2 iop->data1 = iop + 1; 40003154: c2 20 7f f0 st %g1, [ %g1 + -16 ] 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++) 40003158: 84 00 a0 01 inc %g2 iop->data1 = iop + 1; 4000315c: 86 10 00 01 mov %g1, %g3 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40003160: 80 a0 80 04 cmp %g2, %g4 40003164: 0a bf ff fc bcs 40003154 40003168: 82 00 60 48 add %g1, 0x48, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 4000316c: c0 20 e0 38 clr [ %g3 + 0x38 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 40003170: 11 13 10 92 sethi %hi(0x4c424800), %o0 40003174: 92 10 20 01 mov 1, %o1 40003178: 90 12 21 4f or %o0, 0x14f, %o0 4000317c: 94 10 20 54 mov 0x54, %o2 40003180: 96 10 20 00 clr %o3 40003184: 19 10 00 70 sethi %hi(0x4001c000), %o4 40003188: 40 00 0c 38 call 40006268 4000318c: 98 13 21 04 or %o4, 0x104, %o4 ! 4001c104 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 40003190: 80 a2 20 00 cmp %o0, 0 40003194: 02 80 00 04 be 400031a4 40003198: 03 10 00 6d sethi %hi(0x4001b400), %g1 rtems_fatal_error_occurred( rc ); 4000319c: 40 00 0e 7c call 40006b8c <== NOT EXECUTED 400031a0: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 400031a4: c2 00 63 e0 ld [ %g1 + 0x3e0 ], %g1 400031a8: 80 a0 60 00 cmp %g1, 0 400031ac: 02 80 00 04 be 400031bc 400031b0: 01 00 00 00 nop (* rtems_fs_init_helper)(); 400031b4: 9f c0 40 00 call %g1 400031b8: 01 00 00 00 nop 400031bc: 81 c7 e0 08 ret 400031c0: 81 e8 00 00 restore 40028814 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 40028814: 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); 40028818: 90 10 20 00 clr %o0 4002881c: 92 10 20 00 clr %o1 40028820: 40 00 04 3d call 40029914 40028824: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 40028828: b0 92 20 00 orcc %o0, 0, %i0 4002882c: 12 80 00 19 bne 40028890 40028830: 21 10 01 92 sethi %hi(0x40064800), %l0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 40028834: c4 04 23 58 ld [ %l0 + 0x358 ], %g2 ! 40064b58 40028838: 03 10 01 a2 sethi %hi(0x40068800), %g1 4002883c: 82 10 62 00 or %g1, 0x200, %g1 ! 40068a00 40028840: 80 a0 80 01 cmp %g2, %g1 40028844: 12 80 00 15 bne 40028898 40028848: a4 14 23 58 or %l0, 0x358, %l2 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 4002884c: 7f ff 7e 8f call 40008288 40028850: 90 10 20 48 mov 0x48, %o0 if (!tmp) 40028854: a2 92 20 00 orcc %o0, 0, %l1 40028858: 12 80 00 04 bne 40028868 4002885c: 92 10 00 12 mov %l2, %o1 40028860: 81 c7 e0 08 ret <== NOT EXECUTED 40028864: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 40028868: 90 10 20 00 clr %o0 4002886c: 15 10 00 a1 sethi %hi(0x40028400), %o2 40028870: 40 00 05 27 call 40029d0c 40028874: 94 12 a2 e0 or %o2, 0x2e0, %o2 ! 400286e0 if (sc != RTEMS_SUCCESSFUL) { 40028878: 82 92 20 00 orcc %o0, 0, %g1 4002887c: 22 80 00 07 be,a 40028898 40028880: e2 24 23 58 st %l1, [ %l0 + 0x358 ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 40028884: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40028888: 7f ff 7c e4 call 40007c18 <== NOT EXECUTED 4002888c: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return sc; 40028890: 81 c7 e0 08 ret <== NOT EXECUTED 40028894: 81 e8 00 00 restore <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 40028898: 23 10 01 92 sethi %hi(0x40064800), %l1 4002889c: e0 04 63 58 ld [ %l1 + 0x358 ], %l0 ! 40064b58 400288a0: 94 10 20 48 mov 0x48, %o2 400288a4: 90 10 00 10 mov %l0, %o0 400288a8: 13 10 01 a2 sethi %hi(0x40068800), %o1 400288ac: 40 00 66 e6 call 40042444 400288b0: 92 12 62 00 or %o1, 0x200, %o1 ! 40068a00 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400288b4: 03 10 01 a2 sethi %hi(0x40068800), %g1 400288b8: d2 00 61 e8 ld [ %g1 + 0x1e8 ], %o1 ! 400689e8 } 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*/ 400288bc: c2 07 bf fc ld [ %fp + -4 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400288c0: 92 02 60 1c add %o1, 0x1c, %o1 } 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*/ 400288c4: c2 24 00 00 st %g1, [ %l0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400288c8: 90 04 20 18 add %l0, 0x18, %o0 400288cc: 40 00 66 de call 40042444 400288d0: 94 10 20 14 mov 0x14, %o2 * 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); 400288d4: a0 07 bf e8 add %fp, -24, %l0 400288d8: 98 10 20 00 clr %o4 400288dc: 96 10 00 10 mov %l0, %o3 400288e0: 25 10 01 6b sethi %hi(0x4005ac00), %l2 400288e4: 92 10 20 01 mov 1, %o1 400288e8: 94 10 20 00 clr %o2 400288ec: 7f ff 7c a2 call 40007b74 400288f0: 90 14 a3 88 or %l2, 0x388, %o0 rtems_filesystem_root = loc; 400288f4: d0 04 63 58 ld [ %l1 + 0x358 ], %o0 400288f8: 92 10 00 10 mov %l0, %o1 400288fc: 94 10 20 14 mov 0x14, %o2 40028900: 40 00 66 d1 call 40042444 40028904: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40028908: 92 10 20 01 mov 1, %o1 4002890c: 94 10 20 00 clr %o2 40028910: 90 14 a3 88 or %l2, 0x388, %o0 40028914: 96 10 00 10 mov %l0, %o3 40028918: 7f ff 7c 97 call 40007b74 4002891c: 98 10 20 00 clr %o4 rtems_filesystem_current = loc; 40028920: d0 04 63 58 ld [ %l1 + 0x358 ], %o0 40028924: 92 10 00 10 mov %l0, %o1 40028928: 90 02 20 04 add %o0, 4, %o0 4002892c: 40 00 66 c6 call 40042444 40028930: 94 10 20 14 mov 0x14, %o2 return RTEMS_SUCCESSFUL; } 40028934: 81 c7 e0 08 ret 40028938: 81 e8 00 00 restore 40028758 : * 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) { 40028758: 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); 4002875c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40028760: 92 10 20 00 clr %o1 <== NOT EXECUTED 40028764: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 40028768: 40 00 04 6b call 40029914 <== NOT EXECUTED 4002876c: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40028770: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028774: 12 80 00 26 bne 4002880c <== NOT EXECUTED 40028778: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 4002877c: 13 10 01 92 sethi %hi(0x40064800), %o1 <== NOT EXECUTED 40028780: e0 02 63 58 ld [ %o1 + 0x358 ], %l0 ! 40064b58 <== NOT EXECUTED 40028784: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40028788: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 4002878c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40028790: 12 80 00 09 bne 400287b4 <== NOT EXECUTED 40028794: 92 12 63 58 or %o1, 0x358, %o1 <== NOT EXECUTED /* 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); 40028798: 40 00 05 89 call 40029dbc <== NOT EXECUTED 4002879c: 01 00 00 00 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400287a0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400287a4: 12 80 00 1a bne 4002880c <== NOT EXECUTED 400287a8: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 400287ac: 7f ff ff cd call 400286e0 <== NOT EXECUTED 400287b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 400287b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400287b8: 21 10 01 92 sethi %hi(0x40064800), %l0 <== NOT EXECUTED 400287bc: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 400287c0: a2 14 23 58 or %l0, 0x358, %l1 <== NOT EXECUTED 400287c4: 40 00 05 a4 call 40029e54 <== NOT EXECUTED 400287c8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 400287cc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400287d0: 12 80 00 0c bne 40028800 <== NOT EXECUTED 400287d4: 07 10 01 a2 sethi %hi(0x40068800), %g3 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 400287d8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 400287dc: 15 10 00 a1 sethi %hi(0x40028400), %o2 <== NOT EXECUTED 400287e0: 40 00 05 4b call 40029d0c <== NOT EXECUTED 400287e4: 94 12 a2 e0 or %o2, 0x2e0, %o2 ! 400286e0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 400287e8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400287ec: 12 80 00 05 bne 40028800 <== NOT EXECUTED 400287f0: 07 10 01 a2 sethi %hi(0x40068800), %g3 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 400287f4: 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; 400287f8: 10 80 00 05 b 4002880c <== NOT EXECUTED 400287fc: c4 24 23 58 st %g2, [ %l0 + 0x358 ] <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 40028800: 05 10 01 92 sethi %hi(0x40064800), %g2 <== NOT EXECUTED 40028804: 86 10 e2 00 or %g3, 0x200, %g3 <== NOT EXECUTED 40028808: c6 20 a3 58 st %g3, [ %g2 + 0x358 ] <== NOT EXECUTED return sc; } 4002880c: 81 c7 e0 08 ret <== NOT EXECUTED 40028810: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED 40008390 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 40008390: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 40008394: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40008398: d0 00 60 70 ld [ %g1 + 0x70 ], %o0 ! 40064870 <== NOT EXECUTED 4000839c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400083a0: 40 00 17 45 call 4000e0b4 <_Protected_heap_Get_block_size> <== NOT EXECUTED 400083a4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 400083a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 400083ac: 02 80 00 08 be 400083cc <== NOT EXECUTED 400083b0: 03 10 01 a2 sethi %hi(0x40068800), %g1 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 400083b4: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 400083b8: 82 10 61 b8 or %g1, 0x1b8, %g1 <== NOT EXECUTED 400083bc: c4 18 60 28 ldd [ %g1 + 0x28 ], %g2 <== NOT EXECUTED 400083c0: 86 80 c0 04 addcc %g3, %g4, %g3 <== NOT EXECUTED 400083c4: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 400083c8: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 400083cc: 81 c7 e0 08 ret <== NOT EXECUTED 400083d0: 81 e8 00 00 restore <== NOT EXECUTED 400083d4 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 400083d4: 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 ) 400083d8: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 400083dc: 02 80 00 13 be 40008428 <== NOT EXECUTED 400083e0: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 400083e4: d0 00 60 70 ld [ %g1 + 0x70 ], %o0 ! 40064870 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 400083e8: 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); 400083ec: 40 00 17 32 call 4000e0b4 <_Protected_heap_Get_block_size> <== NOT EXECUTED 400083f0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 400083f4: 03 10 01 a2 sethi %hi(0x40068800), %g1 <== NOT EXECUTED 400083f8: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 400083fc: 82 10 61 b8 or %g1, 0x1b8, %g1 <== NOT EXECUTED 40008400: d8 18 60 20 ldd [ %g1 + 0x20 ], %o4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008404: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40008408: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 4000840c: 9a 83 40 04 addcc %o5, %g4, %o5 <== NOT EXECUTED 40008410: 98 43 20 00 addx %o4, 0, %o4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008414: 84 23 40 02 sub %o5, %g2, %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40008418: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 4000841c: 08 80 00 03 bleu 40008428 <== NOT EXECUTED 40008420: d8 38 60 20 std %o4, [ %g1 + 0x20 ] <== NOT EXECUTED s->max_depth = current_depth; 40008424: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 40008428: 81 c7 e0 08 ret <== NOT EXECUTED 4000842c: 81 e8 00 00 restore <== NOT EXECUTED 40008430 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40008430: 11 10 01 a2 sethi %hi(0x40068800), %o0 <== NOT EXECUTED 40008434: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008438: 90 12 21 b8 or %o0, 0x1b8, %o0 <== NOT EXECUTED 4000843c: 94 10 20 30 mov 0x30, %o2 <== NOT EXECUTED 40008440: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40008444: 40 00 e8 93 call 40042690 <== NOT EXECUTED 40008448: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000844c: 01 00 00 00 nop 40010a7c : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40010a7c: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40010a80: a0 96 20 00 orcc %i0, 0, %l0 40010a84: 02 80 00 20 be 40010b04 40010a88: 03 10 00 8a sethi %hi(0x40022800), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40010a8c: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40022860 <_System_state_Current> 40010a90: 80 a0 60 03 cmp %g1, 3 40010a94: 12 80 00 07 bne 40010ab0 40010a98: c0 24 00 00 clr [ %l0 ] 40010a9c: 7f ff cf ec call 40004a4c 40010aa0: 01 00 00 00 nop 40010aa4: 80 8a 20 ff btst 0xff, %o0 40010aa8: 02 80 00 18 be 40010b08 40010aac: b0 10 20 16 mov 0x16, %i0 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 40010ab0: 7f ff d0 00 call 40004ab0 40010ab4: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 40010ab8: 03 10 00 86 sethi %hi(0x40021800), %g1 40010abc: d0 00 63 10 ld [ %g1 + 0x310 ], %o0 ! 40021b10 40010ac0: 94 10 00 19 mov %i1, %o2 40010ac4: 92 10 00 1a mov %i2, %o1 40010ac8: 7f ff e5 24 call 40009f58 <_Protected_heap_Allocate_aligned_with_boundary> 40010acc: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40010ad0: b2 92 20 00 orcc %o0, 0, %i1 40010ad4: 02 80 00 0d be 40010b08 40010ad8: 03 10 00 88 sethi %hi(0x40022000), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 40010adc: c2 00 61 58 ld [ %g1 + 0x158 ], %g1 ! 40022158 40010ae0: 80 a0 60 00 cmp %g1, 0 40010ae4: 22 80 00 06 be,a 40010afc 40010ae8: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 40010aec: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40010af0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40010af4: 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; 40010af8: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 40010afc: 81 c7 e0 08 ret 40010b00: 91 e8 20 00 restore %g0, 0, %o0 40010b04: b0 10 20 16 mov 0x16, %i0 } 40010b08: 81 c7 e0 08 ret 40010b0c: 81 e8 00 00 restore 40008404 : void rtems_panic( const char *printf_format, ... ) { 40008404: 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); 40008408: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 4000840c: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40008410: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40008414: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008418: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 4000841c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008420: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40008424: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008428: 7f ff ff 89 call 4000824c <== NOT EXECUTED 4000842c: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 40008430: 81 c7 e0 08 ret <== NOT EXECUTED 40008434: 81 e8 00 00 restore <== NOT EXECUTED 4000c8a4 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4000c8a4: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 4000c8a8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000c8ac: c2 08 62 14 ldub [ %g1 + 0x214 ], %g1 ! 4001be14 4000c8b0: 80 a0 60 00 cmp %g1, 0 4000c8b4: 02 80 00 15 be 4000c908 4000c8b8: 19 10 00 6f sethi %hi(0x4001bc00), %o4 return; if (rtems_pipe_semaphore) 4000c8bc: c2 03 23 44 ld [ %o4 + 0x344 ], %g1 ! 4001bf44 <== NOT EXECUTED 4000c8c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c8c4: 12 80 00 11 bne 4000c908 <== NOT EXECUTED 4000c8c8: 98 13 23 44 or %o4, 0x344, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4000c8cc: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 4000c8d0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000c8d4: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 4000c8d8: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 4000c8dc: 7f ff e6 63 call 40006268 <== NOT EXECUTED 4000c8e0: 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) 4000c8e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c8e8: 02 80 00 04 be 4000c8f8 <== NOT EXECUTED 4000c8ec: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4000c8f0: 7f ff e8 a7 call 40006b8c <== NOT EXECUTED 4000c8f4: 01 00 00 00 nop <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4000c8f8: 7f ff e5 3c call 40005de8 <== NOT EXECUTED 4000c8fc: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 4000c900: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000c904: d0 30 63 4a sth %o0, [ %g1 + 0x34a ] ! 4001bf4a <== NOT EXECUTED 4000c908: 81 c7 e0 08 ret 4000c90c: 81 e8 00 00 restore 400061b0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 400061b0: 9d e3 bf a0 save %sp, -96, %sp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 400061b4: 03 10 01 a3 sethi %hi(0x40068c00), %g1 400061b8: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 40068c3c <_Thread_Executing> ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 400061bc: d0 00 60 c4 ld [ %g1 + 0xc4 ], %o0 400061c0: 80 a7 80 08 cmp %fp, %o0 400061c4: 0a 80 00 06 bcs 400061dc 400061c8: a0 10 20 00 clr %l0 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 400061cc: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 400061d0: 82 02 00 01 add %o0, %g1, %g1 400061d4: 80 a0 40 1e cmp %g1, %fp 400061d8: a0 60 3f ff subx %g0, -1, %l0 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 400061dc: 03 10 01 97 sethi %hi(0x40065c00), %g1 400061e0: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 40065d54 400061e4: 80 a0 60 00 cmp %g1, 0 400061e8: 02 80 00 09 be 4000620c 400061ec: 92 10 20 01 mov 1, %o1 pattern_ok = (!memcmp( 400061f0: 90 02 20 08 add %o0, 8, %o0 400061f4: 13 10 01 a2 sethi %hi(0x40068800), %o1 400061f8: 94 10 20 10 mov 0x10, %o2 400061fc: 40 00 f0 61 call 40042380 40006200: 92 12 61 88 or %o1, 0x188, %o1 40006204: 80 a0 00 08 cmp %g0, %o0 40006208: 92 60 3f ff subx %g0, -1, %o1 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 4000620c: 80 8c 20 ff btst 0xff, %l0 40006210: 02 80 00 04 be 40006220 40006214: 80 8a 60 ff btst 0xff, %o1 40006218: 12 80 00 07 bne 40006234 4000621c: 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 ); 40006220: 03 10 01 a3 sethi %hi(0x40068c00), %g1 <== NOT EXECUTED 40006224: d0 00 60 3c ld [ %g1 + 0x3c ], %o0 ! 40068c3c <_Thread_Executing> <== NOT EXECUTED 40006228: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED 4000622c: 7f ff ff b7 call 40006108 <== NOT EXECUTED 40006230: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 40006234: 81 c7 e0 08 ret 40006238: 81 e8 00 00 restore 400060ec : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 400060ec: 13 10 00 23 sethi %hi(0x40008c00), %o1 <== NOT EXECUTED 400060f0: 90 10 20 00 clr %o0 <== NOT EXECUTED 400060f4: 92 12 62 84 or %o1, 0x284, %o1 <== NOT EXECUTED 400060f8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400060fc: 7f ff ff e6 call 40006094 <== NOT EXECUTED 40006100: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006104: 01 00 00 00 nop 40006094 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40006094: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED print_context = context; 40006098: 23 10 01 97 sethi %hi(0x40065c00), %l1 <== NOT EXECUTED print_handler = print; 4000609c: 21 10 01 97 sethi %hi(0x40065c00), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 400060a0: f0 24 61 58 st %i0, [ %l1 + 0x158 ] <== NOT EXECUTED print_handler = print; 400060a4: f2 24 21 5c st %i1, [ %l0 + 0x15c ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 400060a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400060ac: 13 10 01 6b sethi %hi(0x4005ac00), %o1 <== NOT EXECUTED 400060b0: 9f c6 40 00 call %i1 <== NOT EXECUTED 400060b4: 92 12 61 00 or %o1, 0x100, %o1 ! 4005ad00 <== NOT EXECUTED (*print)( context, 400060b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400060bc: 13 10 01 6b sethi %hi(0x4005ac00), %o1 <== NOT EXECUTED 400060c0: 9f c6 40 00 call %i1 <== NOT EXECUTED 400060c4: 92 12 61 18 or %o1, 0x118, %o1 ! 4005ad18 <== 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 ); 400060c8: 11 10 00 17 sethi %hi(0x40005c00), %o0 <== NOT EXECUTED 400060cc: 40 00 1d b4 call 4000d79c <== NOT EXECUTED 400060d0: 90 12 23 44 or %o0, 0x344, %o0 ! 40005f44 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 400060d4: 7f ff ff 9c call 40005f44 <== NOT EXECUTED 400060d8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 400060dc: c0 24 61 58 clr [ %l1 + 0x158 ] <== NOT EXECUTED print_handler = NULL; 400060e0: c0 24 21 5c clr [ %l0 + 0x15c ] <== NOT EXECUTED } 400060e4: 81 c7 e0 08 ret <== NOT EXECUTED 400060e8: 81 e8 00 00 restore <== NOT EXECUTED 4000623c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 4000623c: 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; 40006240: d0 06 20 c4 ld [ %i0 + 0xc4 ], %o0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 40006244: 80 a7 80 08 cmp %fp, %o0 40006248: 0a 80 00 06 bcs 40006260 4000624c: a0 10 20 00 clr %l0 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 40006250: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 40006254: 82 02 00 01 add %o0, %g1, %g1 40006258: 80 a0 40 1e cmp %g1, %fp 4000625c: a0 60 3f ff subx %g0, -1, %l0 /* * 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, 40006260: 90 02 20 08 add %o0, 8, %o0 40006264: 13 10 01 a2 sethi %hi(0x40068800), %o1 40006268: 94 10 20 10 mov 0x10, %o2 4000626c: 40 00 f0 45 call 40042380 40006270: 92 12 61 88 or %o1, 0x188, %o1 40006274: 80 a0 00 08 cmp %g0, %o0 40006278: b2 60 3f ff subx %g0, -1, %i1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 4000627c: 80 8c 20 ff btst 0xff, %l0 40006280: 02 80 00 04 be 40006290 40006284: 80 a6 60 00 cmp %i1, 0 40006288: 12 80 00 05 bne 4000629c 4000628c: 01 00 00 00 nop Stack_check_report_blown_task( running, pattern_ok ); 40006290: b2 0e 60 01 and %i1, 1, %i1 <== NOT EXECUTED 40006294: 7f ff ff 9d call 40006108 <== NOT EXECUTED 40006298: 81 e8 00 00 restore <== NOT EXECUTED 4000629c: 81 c7 e0 08 ret 400062a0: 81 e8 00 00 restore 4000d260 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d260: 9d e3 bf 98 save %sp, -104, %sp 4000d264: a4 10 00 18 mov %i0, %l2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d268: 80 a6 60 00 cmp %i1, 0 4000d26c: 02 80 00 24 be 4000d2fc 4000d270: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d274: 40 00 08 d4 call 4000f5c4 <__errno> 4000d278: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d27c: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d280: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d284: c0 26 40 00 clr [ %i1 ] 4000d288: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d28c: 40 00 14 46 call 400123a4 4000d290: 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 ) 4000d294: 80 a6 a0 00 cmp %i2, 0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d298: 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 ) 4000d29c: 02 80 00 04 be 4000d2ac 4000d2a0: a2 10 00 09 mov %o1, %l1 *endptr = end; 4000d2a4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d2a8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d2ac: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d2b0: 80 a0 40 12 cmp %g1, %l2 4000d2b4: 02 80 00 12 be 4000d2fc 4000d2b8: 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)) 4000d2bc: 03 10 00 7e sethi %hi(0x4001f800), %g1 4000d2c0: d4 18 61 90 ldd [ %g1 + 0x190 ], %o2 ! 4001f990 <_CPU_Trap_slot_template+0x14> 4000d2c4: 90 10 00 10 mov %l0, %o0 4000d2c8: 40 00 3c a0 call 4001c548 <__gtdf2> 4000d2cc: 92 10 00 11 mov %l1, %o1 4000d2d0: 80 a2 20 00 cmp %o0, 0 4000d2d4: 24 80 00 09 ble,a 4000d2f8 4000d2d8: e0 3e 40 00 std %l0, [ %i1 ] 4000d2dc: 40 00 08 ba call 4000f5c4 <__errno> 4000d2e0: b0 10 20 0a mov 0xa, %i0 4000d2e4: c2 02 00 00 ld [ %o0 ], %g1 4000d2e8: 80 a0 60 22 cmp %g1, 0x22 4000d2ec: 02 80 00 04 be 4000d2fc 4000d2f0: 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; 4000d2f4: e0 3e 40 00 std %l0, [ %i1 ] <== NOT EXECUTED 4000d2f8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d2fc: 81 c7 e0 08 ret 4000d300: 81 e8 00 00 restore 4000d304 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d304: 9d e3 bf 98 save %sp, -104, %sp 4000d308: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d30c: 80 a6 60 00 cmp %i1, 0 4000d310: 02 80 00 21 be 4000d394 4000d314: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d318: 40 00 08 ab call 4000f5c4 <__errno> 4000d31c: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d320: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d324: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d328: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d32c: 40 00 14 0b call 40012358 4000d330: 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 ) 4000d334: 80 a6 a0 00 cmp %i2, 0 4000d338: 02 80 00 04 be 4000d348 4000d33c: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000d340: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d344: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d348: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d34c: 80 a0 40 10 cmp %g1, %l0 4000d350: 02 80 00 11 be 4000d394 4000d354: 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)) 4000d358: 90 10 00 11 mov %l1, %o0 4000d35c: 13 1f df ff sethi %hi(0x7f7ffc00), %o1 4000d360: 40 00 39 c2 call 4001ba68 <__gtsf2> 4000d364: 92 12 63 ff or %o1, 0x3ff, %o1 ! 7f7fffff 4000d368: 80 a2 20 00 cmp %o0, 0 4000d36c: 24 80 00 09 ble,a 4000d390 4000d370: e2 26 40 00 st %l1, [ %i1 ] 4000d374: 40 00 08 94 call 4000f5c4 <__errno> 4000d378: b0 10 20 0a mov 0xa, %i0 4000d37c: c2 02 00 00 ld [ %o0 ], %g1 4000d380: 80 a0 60 22 cmp %g1, 0x22 4000d384: 02 80 00 04 be 4000d394 4000d388: 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; 4000d38c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000d390: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d394: 81 c7 e0 08 ret 4000d398: 81 e8 00 00 restore 4001e518 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e518: 9d e3 bf 98 save %sp, -104, %sp 4001e51c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e520: 80 a6 60 00 cmp %i1, 0 4001e524: 02 80 00 20 be 4001e5a4 4001e528: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e52c: 40 00 82 f3 call 4003f0f8 <__errno> 4001e530: 01 00 00 00 nop 4001e534: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e538: 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 ); 4001e53c: 94 10 00 1b mov %i3, %o2 4001e540: 90 10 00 10 mov %l0, %o0 4001e544: 40 00 a2 8f call 40046f80 4001e548: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4001e54c: 80 a6 a0 00 cmp %i2, 0 4001e550: 02 80 00 04 be 4001e560 4001e554: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e558: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e55c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e560: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e564: 80 a0 40 10 cmp %g1, %l0 4001e568: 02 80 00 0f be 4001e5a4 4001e56c: 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)) 4001e570: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4001e574: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4001e578: 80 a4 40 01 cmp %l1, %g1 4001e57c: 32 80 00 09 bne,a 4001e5a0 4001e580: e2 26 40 00 st %l1, [ %i1 ] 4001e584: 40 00 82 dd call 4003f0f8 <__errno> 4001e588: b0 10 20 0a mov 0xa, %i0 4001e58c: c2 02 00 00 ld [ %o0 ], %g1 4001e590: 80 a0 60 22 cmp %g1, 0x22 4001e594: 02 80 00 04 be 4001e5a4 4001e598: 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; 4001e59c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e5a0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e5a4: 81 c7 e0 08 ret 4001e5a8: 81 e8 00 00 restore 4000d4f4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d4f4: 9d e3 bf 98 save %sp, -104, %sp 4000d4f8: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d4fc: 80 a6 60 00 cmp %i1, 0 4000d500: 02 80 00 23 be 4000d58c 4000d504: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d508: 40 00 08 2f call 4000f5c4 <__errno> 4000d50c: 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 ); 4000d510: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d514: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d518: 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 ); 4000d51c: 90 10 00 10 mov %l0, %o0 4000d520: 40 00 14 2a call 400125c8 4000d524: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d528: 80 a6 a0 00 cmp %i2, 0 4000d52c: 02 80 00 04 be 4000d53c 4000d530: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000d534: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d538: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d53c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d540: 80 a0 40 10 cmp %g1, %l0 4000d544: 02 80 00 12 be 4000d58c 4000d548: 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)) 4000d54c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000d550: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000d554: 80 a4 40 01 cmp %l1, %g1 4000d558: 02 80 00 05 be 4000d56c 4000d55c: 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)) 4000d560: 80 a4 40 01 cmp %l1, %g1 4000d564: 32 80 00 09 bne,a 4000d588 4000d568: e2 26 40 00 st %l1, [ %i1 ] 4000d56c: 40 00 08 16 call 4000f5c4 <__errno> 4000d570: 01 00 00 00 nop 4000d574: c2 02 00 00 ld [ %o0 ], %g1 4000d578: 80 a0 60 22 cmp %g1, 0x22 4000d57c: 22 80 00 04 be,a 4000d58c 4000d580: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000d584: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000d588: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d58c: 81 c7 e0 08 ret 4000d590: 81 e8 00 00 restore 4000d430 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d430: 9d e3 bf 98 save %sp, -104, %sp 4000d434: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d438: 80 a6 60 00 cmp %i1, 0 4000d43c: 02 80 00 2c be 4000d4ec 4000d440: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d444: 40 00 08 60 call 4000f5c4 <__errno> 4000d448: 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 ); 4000d44c: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d450: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d454: c0 26 40 00 clr [ %i1 ] 4000d458: 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 ); 4000d45c: 90 10 00 10 mov %l0, %o0 4000d460: 40 00 14 64 call 400125f0 4000d464: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d468: 80 a6 a0 00 cmp %i2, 0 #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 ); 4000d46c: a2 10 00 08 mov %o0, %l1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d470: 02 80 00 04 be 4000d480 4000d474: a4 10 00 09 mov %o1, %l2 *endptr = end; 4000d478: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d47c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d480: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d484: 80 a0 40 10 cmp %g1, %l0 4000d488: 02 80 00 19 be 4000d4ec 4000d48c: 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)) 4000d490: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000d494: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000d498: 80 a4 40 01 cmp %l1, %g1 4000d49c: 12 80 00 05 bne 4000d4b0 4000d4a0: 03 20 00 00 sethi %hi(0x80000000), %g1 4000d4a4: 80 a4 bf ff cmp %l2, -1 4000d4a8: 02 80 00 08 be 4000d4c8 4000d4ac: 01 00 00 00 nop return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4000d4b0: 80 a4 40 01 cmp %l1, %g1 4000d4b4: 32 80 00 0c bne,a 4000d4e4 4000d4b8: e4 26 60 04 st %l2, [ %i1 + 4 ] 4000d4bc: 80 a4 a0 00 cmp %l2, 0 4000d4c0: 32 80 00 09 bne,a 4000d4e4 4000d4c4: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000d4c8: 40 00 08 3f call 4000f5c4 <__errno> 4000d4cc: 01 00 00 00 nop 4000d4d0: c2 02 00 00 ld [ %o0 ], %g1 4000d4d4: 80 a0 60 22 cmp %g1, 0x22 4000d4d8: 22 80 00 05 be,a 4000d4ec 4000d4dc: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000d4e0: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000d4e4: e2 26 40 00 st %l1, [ %i1 ] 4000d4e8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d4ec: 81 c7 e0 08 ret 4000d4f0: 81 e8 00 00 restore 4001e5ac : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e5ac: 9d e3 bf 98 save %sp, -104, %sp 4001e5b0: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e5b4: 80 a6 60 00 cmp %i1, 0 4001e5b8: 02 80 00 1e be 4001e630 4001e5bc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e5c0: 40 00 82 ce call 4003f0f8 <__errno> 4001e5c4: 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 ); 4001e5c8: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4001e5cc: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e5d0: 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 ); 4001e5d4: 90 10 00 10 mov %l0, %o0 4001e5d8: 40 00 a3 a0 call 40047458 4001e5dc: 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 ) 4001e5e0: 80 a6 a0 00 cmp %i2, 0 4001e5e4: 02 80 00 04 be 4001e5f4 4001e5e8: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e5ec: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e5f0: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e5f4: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e5f8: 80 a0 40 10 cmp %g1, %l0 4001e5fc: 02 80 00 0d be 4001e630 4001e600: 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)) 4001e604: 80 a4 7f ff cmp %l1, -1 4001e608: 32 80 00 09 bne,a 4001e62c 4001e60c: e2 26 40 00 st %l1, [ %i1 ] 4001e610: 40 00 82 ba call 4003f0f8 <__errno> <== NOT EXECUTED 4001e614: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 4001e618: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001e61c: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 4001e620: 02 80 00 04 be 4001e630 <== NOT EXECUTED 4001e624: 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; 4001e628: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e62c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e630: 81 c7 e0 08 ret 4001e634: 81 e8 00 00 restore 4000d684 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d684: 9d e3 bf 98 save %sp, -104, %sp 4000d688: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d68c: 80 a6 60 00 cmp %i1, 0 4000d690: 02 80 00 1e be 4000d708 4000d694: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d698: 40 00 07 cb call 4000f5c4 <__errno> 4000d69c: 01 00 00 00 nop 4000d6a0: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d6a4: 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 ); 4000d6a8: 94 10 00 1b mov %i3, %o2 4000d6ac: 90 10 00 10 mov %l0, %o0 4000d6b0: 40 00 14 fc call 40012aa0 4000d6b4: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d6b8: 80 a6 a0 00 cmp %i2, 0 4000d6bc: 02 80 00 04 be 4000d6cc 4000d6c0: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000d6c4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d6c8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d6cc: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d6d0: 80 a0 40 10 cmp %g1, %l0 4000d6d4: 02 80 00 0d be 4000d708 4000d6d8: 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)) 4000d6dc: 80 a4 7f ff cmp %l1, -1 4000d6e0: 32 80 00 09 bne,a 4000d704 4000d6e4: e2 26 40 00 st %l1, [ %i1 ] 4000d6e8: 40 00 07 b7 call 4000f5c4 <__errno> 4000d6ec: b0 10 20 0a mov 0xa, %i0 4000d6f0: c2 02 00 00 ld [ %o0 ], %g1 4000d6f4: 80 a0 60 22 cmp %g1, 0x22 4000d6f8: 02 80 00 04 be 4000d708 4000d6fc: 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; 4000d700: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000d704: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d708: 81 c7 e0 08 ret 4000d70c: 81 e8 00 00 restore 4001e69c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e69c: 9d e3 bf 98 save %sp, -104, %sp 4001e6a0: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e6a4: 80 a6 60 00 cmp %i1, 0 4001e6a8: 02 80 00 1e be 4001e720 4001e6ac: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e6b0: 40 00 82 92 call 4003f0f8 <__errno> 4001e6b4: 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 ); 4001e6b8: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4001e6bc: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e6c0: 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 ); 4001e6c4: 90 10 00 10 mov %l0, %o0 4001e6c8: 40 00 a3 64 call 40047458 4001e6cc: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4001e6d0: 80 a6 a0 00 cmp %i2, 0 4001e6d4: 02 80 00 04 be 4001e6e4 4001e6d8: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e6dc: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e6e0: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e6e4: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e6e8: 80 a0 40 10 cmp %g1, %l0 4001e6ec: 02 80 00 0d be 4001e720 4001e6f0: 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)) 4001e6f4: 80 a4 7f ff cmp %l1, -1 4001e6f8: 32 80 00 09 bne,a 4001e71c 4001e6fc: e2 26 40 00 st %l1, [ %i1 ] 4001e700: 40 00 82 7e call 4003f0f8 <__errno> 4001e704: b0 10 20 0a mov 0xa, %i0 4001e708: c2 02 00 00 ld [ %o0 ], %g1 4001e70c: 80 a0 60 22 cmp %g1, 0x22 4001e710: 02 80 00 04 be 4001e720 4001e714: 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; 4001e718: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e71c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e720: 81 c7 e0 08 ret 4001e724: 81 e8 00 00 restore 4000d710 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d710: 9d e3 bf 98 save %sp, -104, %sp 4000d714: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d718: 80 a6 60 00 cmp %i1, 0 4000d71c: 02 80 00 24 be 4000d7ac 4000d720: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d724: 40 00 07 a8 call 4000f5c4 <__errno> 4000d728: 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 ); 4000d72c: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d730: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d734: c0 26 40 00 clr [ %i1 ] 4000d738: 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 ); 4000d73c: 90 10 00 10 mov %l0, %o0 4000d740: 40 00 14 e2 call 40012ac8 4000d744: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d748: 80 a6 a0 00 cmp %i2, 0 #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 ); 4000d74c: a2 10 00 08 mov %o0, %l1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d750: 02 80 00 04 be 4000d760 4000d754: a4 10 00 09 mov %o1, %l2 *endptr = end; 4000d758: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d75c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d760: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d764: 80 a0 40 10 cmp %g1, %l0 4000d768: 02 80 00 11 be 4000d7ac 4000d76c: 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)) 4000d770: 80 a4 7f ff cmp %l1, -1 4000d774: 32 80 00 0c bne,a 4000d7a4 4000d778: e4 26 60 04 st %l2, [ %i1 + 4 ] 4000d77c: 80 a4 bf ff cmp %l2, -1 4000d780: 32 80 00 09 bne,a 4000d7a4 4000d784: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000d788: 40 00 07 8f call 4000f5c4 <__errno> 4000d78c: b0 10 20 0a mov 0xa, %i0 4000d790: c2 02 00 00 ld [ %o0 ], %g1 4000d794: 80 a0 60 22 cmp %g1, 0x22 4000d798: 02 80 00 05 be 4000d7ac 4000d79c: 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; 4000d7a0: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000d7a4: e2 26 40 00 st %l1, [ %i1 ] 4000d7a8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d7ac: 81 c7 e0 08 ret 4000d7b0: 81 e8 00 00 restore 40005200 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 40005200: 82 10 00 08 mov %o0, %g1 int baud_index; switch (termios_baud) { 40005204: 80 a2 20 09 cmp %o0, 9 40005208: 02 80 00 19 be 4000526c 4000520c: 90 10 20 09 mov 9, %o0 40005210: 80 a0 60 09 cmp %g1, 9 40005214: 14 80 00 25 bg 400052a8 40005218: 80 a0 60 0e cmp %g1, 0xe 4000521c: 80 a0 60 04 cmp %g1, 4 40005220: 02 80 00 13 be 4000526c 40005224: 90 10 20 04 mov 4, %o0 40005228: 80 a0 60 04 cmp %g1, 4 4000522c: 14 80 00 12 bg 40005274 40005230: 80 a0 60 06 cmp %g1, 6 40005234: 80 a0 60 01 cmp %g1, 1 40005238: 02 80 00 0d be 4000526c 4000523c: 90 10 20 01 mov 1, %o0 40005240: 80 a0 60 01 cmp %g1, 1 40005244: 34 80 00 05 bg,a 40005258 40005248: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000524c: 80 a0 60 00 cmp %g1, 0 40005250: 10 80 00 3f b 4000534c 40005254: 90 10 20 00 clr %o0 40005258: 02 80 00 05 be 4000526c <== NOT EXECUTED 4000525c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40005260: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40005264: 12 80 00 3c bne 40005354 <== NOT EXECUTED 40005268: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED 4000526c: 81 c3 e0 08 retl <== NOT EXECUTED 40005270: 01 00 00 00 nop <== NOT EXECUTED 40005274: 02 bf ff fe be 4000526c <== NOT EXECUTED 40005278: 90 10 20 06 mov 6, %o0 ! 6 <== NOT EXECUTED 4000527c: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 40005280: 06 bf ff fb bl 4000526c <== NOT EXECUTED 40005284: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED 40005288: 80 a0 60 07 cmp %g1, 7 <== NOT EXECUTED 4000528c: 02 bf ff f8 be 4000526c <== NOT EXECUTED 40005290: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED 40005294: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 40005298: 12 80 00 2f bne 40005354 <== NOT EXECUTED 4000529c: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED 400052a0: 81 c3 e0 08 retl <== NOT EXECUTED 400052a4: 01 00 00 00 nop <== NOT EXECUTED 400052a8: 02 bf ff f1 be 4000526c <== NOT EXECUTED 400052ac: 90 10 20 0e mov 0xe, %o0 ! e <== NOT EXECUTED 400052b0: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 400052b4: 14 80 00 10 bg 400052f4 <== NOT EXECUTED 400052b8: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 400052bc: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 400052c0: 02 bf ff eb be 4000526c <== NOT EXECUTED 400052c4: 90 10 20 0b mov 0xb, %o0 <== NOT EXECUTED 400052c8: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 400052cc: 06 bf ff e8 bl 4000526c <== NOT EXECUTED 400052d0: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 400052d4: 80 a0 60 0c cmp %g1, 0xc <== NOT EXECUTED 400052d8: 02 bf ff e5 be 4000526c <== NOT EXECUTED 400052dc: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED 400052e0: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 400052e4: 12 80 00 1c bne 40005354 <== NOT EXECUTED 400052e8: 90 10 20 0d mov 0xd, %o0 <== NOT EXECUTED 400052ec: 81 c3 e0 08 retl <== NOT EXECUTED 400052f0: 01 00 00 00 nop <== NOT EXECUTED 400052f4: 86 10 a0 02 or %g2, 2, %g3 <== NOT EXECUTED 400052f8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400052fc: 02 bf ff dc be 4000526c <== NOT EXECUTED 40005300: 90 10 20 11 mov 0x11, %o0 <== NOT EXECUTED 40005304: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40005308: 34 80 00 0b bg,a 40005334 <== NOT EXECUTED 4000530c: 86 10 a0 03 or %g2, 3, %g3 <== NOT EXECUTED 40005310: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED 40005314: 02 bf ff d6 be 4000526c <== NOT EXECUTED 40005318: 90 10 20 0f mov 0xf, %o0 <== NOT EXECUTED 4000531c: 84 10 a0 01 or %g2, 1, %g2 <== NOT EXECUTED 40005320: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40005324: 12 80 00 0c bne 40005354 <== NOT EXECUTED 40005328: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED 4000532c: 81 c3 e0 08 retl <== NOT EXECUTED 40005330: 01 00 00 00 nop <== NOT EXECUTED 40005334: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40005338: 02 bf ff cd be 4000526c <== NOT EXECUTED 4000533c: 90 10 20 12 mov 0x12, %o0 <== NOT EXECUTED 40005340: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 40005344: 90 10 20 13 mov 0x13, %o0 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 40005348: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000534c: 02 80 00 03 be 40005358 40005350: 01 00 00 00 nop case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 40005354: 90 10 3f ff mov -1, %o0 ! ffffffff default: baud_index = -1; break; } return baud_index; } 40005358: 81 c3 e0 08 retl 4000535c: 01 00 00 00 nop 40003d34 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40003d34: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED 40003d38: d0 20 60 e8 st %o0, [ %g1 + 0xe8 ] ! 4001b8e8 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40003d3c: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 40003d40: 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; 40003d44: d2 20 60 ec st %o1, [ %g1 + 0xec ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40003d48: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40003d4c: 81 c3 e0 08 retl <== NOT EXECUTED 40003d50: d4 20 60 f0 st %o2, [ %g1 + 0xf0 ] ! 4001b8f0 <== NOT EXECUTED 40005390 : } } rtems_status_code rtems_termios_close (void *arg) { 40005390: 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); 40005394: 03 10 00 70 sethi %hi(0x4001c000), %g1 40005398: d0 00 61 44 ld [ %g1 + 0x144 ], %o0 ! 4001c144 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4000539c: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400053a0: 92 10 20 00 clr %o1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400053a4: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400053a8: 40 00 04 52 call 400064f0 400053ac: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 400053b0: 80 a2 20 00 cmp %o0, 0 400053b4: 12 80 00 2c bne 40005464 400053b8: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 400053bc: c2 04 20 08 ld [ %l0 + 8 ], %g1 400053c0: 82 00 7f ff add %g1, -1, %g1 400053c4: 80 a0 60 00 cmp %g1, 0 400053c8: 12 80 00 5e bne 40005540 400053cc: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400053d0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 400053d4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400053d8: 85 28 a0 05 sll %g2, 5, %g2 400053dc: 82 10 62 38 or %g1, 0x238, %g1 400053e0: 82 00 40 02 add %g1, %g2, %g1 400053e4: c2 00 60 04 ld [ %g1 + 4 ], %g1 400053e8: 80 a0 60 00 cmp %g1, 0 400053ec: 22 80 00 06 be,a 40005404 400053f0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400053f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400053f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 400053fc: 10 80 00 0b b 40005428 <== NOT EXECUTED 40005400: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005404: 92 10 20 00 clr %o1 40005408: 40 00 04 3a call 400064f0 4000540c: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40005410: 80 a2 20 00 cmp %o0, 0 40005414: 12 80 00 14 bne 40005464 40005418: 01 00 00 00 nop rtems_fatal_error_occurred (sc); } drainOutput (tty); 4000541c: 7f ff fd d0 call 40004b5c 40005420: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40005424: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005428: 80 a0 60 02 cmp %g1, 2 4000542c: 32 80 00 10 bne,a 4000546c 40005430: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 40005434: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 40005438: 40 00 02 ef call 40005ff4 <== NOT EXECUTED 4000543c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40005440: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005444: 12 80 00 08 bne 40005464 <== NOT EXECUTED 40005448: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 4000544c: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40005450: 40 00 02 e9 call 40005ff4 <== NOT EXECUTED 40005454: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40005458: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000545c: 22 80 00 04 be,a 4000546c <== NOT EXECUTED 40005460: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005464: 40 00 05 ca call 40006b8c <== NOT EXECUTED 40005468: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 4000546c: 80 a0 60 00 cmp %g1, 0 40005470: 22 80 00 07 be,a 4000548c 40005474: c4 04 00 00 ld [ %l0 ], %g2 (*tty->device.lastClose)(tty->major, tty->minor, arg); 40005478: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 4000547c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40005480: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005484: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40005488: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 4000548c: 80 a0 a0 00 cmp %g2, 0 40005490: 12 80 00 08 bne 400054b0 40005494: c2 04 20 04 ld [ %l0 + 4 ], %g1 rtems_termios_ttyTail = tty->back; 40005498: 05 10 00 70 sethi %hi(0x4001c000), %g2 if ( rtems_termios_ttyTail != NULL ) { 4000549c: 80 a0 60 00 cmp %g1, 0 400054a0: 02 80 00 05 be 400054b4 400054a4: c2 20 a1 48 st %g1, [ %g2 + 0x148 ] rtems_termios_ttyTail->forw = NULL; 400054a8: 10 80 00 03 b 400054b4 <== NOT EXECUTED 400054ac: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; 400054b0: c2 20 a0 04 st %g1, [ %g2 + 4 ] } if (tty->back == NULL) { 400054b4: c4 04 20 04 ld [ %l0 + 4 ], %g2 400054b8: 80 a0 a0 00 cmp %g2, 0 400054bc: 12 80 00 08 bne 400054dc 400054c0: c2 04 00 00 ld [ %l0 ], %g1 rtems_termios_ttyHead = tty->forw; 400054c4: 05 10 00 70 sethi %hi(0x4001c000), %g2 if ( rtems_termios_ttyHead != NULL ) { 400054c8: 80 a0 60 00 cmp %g1, 0 400054cc: 02 80 00 05 be 400054e0 400054d0: c2 20 a1 4c st %g1, [ %g2 + 0x14c ] rtems_termios_ttyHead->back = NULL; 400054d4: 10 80 00 03 b 400054e0 400054d8: c0 20 60 04 clr [ %g1 + 4 ] } } else { tty->back->forw = tty->forw; 400054dc: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 400054e0: 40 00 03 d6 call 40006438 400054e4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 400054e8: 40 00 03 d4 call 40006438 400054ec: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 400054f0: 40 00 03 d2 call 40006438 400054f4: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 400054f8: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 400054fc: 80 a0 60 00 cmp %g1, 0 40005500: 02 80 00 06 be 40005518 40005504: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 40005508: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 4000550c: 80 a0 60 02 cmp %g1, 2 40005510: 12 80 00 04 bne 40005520 40005514: 01 00 00 00 nop rtems_semaphore_delete (tty->rawInBuf.Semaphore); 40005518: 40 00 03 c8 call 40006438 <== NOT EXECUTED 4000551c: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 40005520: 40 00 16 ae call 4000afd8 40005524: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40005528: 40 00 16 ac call 4000afd8 4000552c: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40005530: 40 00 16 aa call 4000afd8 40005534: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40005538: 40 00 16 a8 call 4000afd8 4000553c: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 40005540: 03 10 00 70 sethi %hi(0x4001c000), %g1 40005544: d0 00 61 44 ld [ %g1 + 0x144 ], %o0 ! 4001c144 40005548: 40 00 04 31 call 4000660c 4000554c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40005550: 81 c7 e0 08 ret 40005554: 81 e8 00 00 restore 40003f54 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40003f54: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40003f58: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003f5c: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40003f60: 84 00 80 19 add %g2, %i1, %g2 <== NOT EXECUTED 40003f64: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003f68: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003f6c: 12 80 00 0a bne 40003f94 <== NOT EXECUTED 40003f70: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 40003f74: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 40003f78: 40 00 08 1f call 40005ff4 <== NOT EXECUTED 40003f7c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 40003f80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003f84: 02 80 00 11 be 40003fc8 <== NOT EXECUTED 40003f88: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003f8c: 40 00 0b 00 call 40006b8c <== NOT EXECUTED 40003f90: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 40003f94: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003f98: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40003f9c: 12 80 00 09 bne 40003fc0 <== NOT EXECUTED 40003fa0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40003fa4: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 4001beec <== NOT EXECUTED 40003fa8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003fac: 02 80 00 07 be 40003fc8 <== NOT EXECUTED 40003fb0: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40003fb4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003fb8: 01 00 00 00 nop <== NOT EXECUTED 40003fbc: 30 80 00 03 b,a 40003fc8 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 40003fc0: 7f ff ff 6b call 40003d6c <== NOT EXECUTED 40003fc4: 81 e8 00 00 restore <== NOT EXECUTED } } 40003fc8: 81 c7 e0 08 ret <== NOT EXECUTED 40003fcc: 81 e8 00 00 restore <== NOT EXECUTED 40003fd0 : * 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) { 40003fd0: 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) { 40003fd4: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003fd8: 25 10 00 6f sethi %hi(0x4001bc00), %l2 <== NOT EXECUTED 40003fdc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003fe0: a4 14 a2 38 or %l2, 0x238, %l2 <== NOT EXECUTED 40003fe4: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40003fe8: c2 04 80 01 ld [ %l2 + %g1 ], %g1 <== NOT EXECUTED * 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) { 40003fec: a0 10 00 18 mov %i0, %l0 <== 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) { 40003ff0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ff4: 12 80 00 11 bne 40004038 <== NOT EXECUTED 40003ff8: 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, 40003ffc: aa 06 20 4a add %i0, 0x4a, %l5 <== 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); 40004000: a8 06 20 30 add %i0, 0x30, %l4 <== NOT EXECUTED 40004004: a4 10 20 00 clr %l2 <== NOT EXECUTED 40004008: 10 80 00 ad b 400042bc <== NOT EXECUTED 4000400c: b0 10 20 00 clr %i0 <== NOT EXECUTED 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--) { c = *buf++; 40004010: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40004014: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004018: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 4000401c: c2 04 80 01 ld [ %l2 + %g1 ], %g1 <== NOT EXECUTED 40004020: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 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--) { c = *buf++; 40004024: b2 06 60 01 inc %i1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40004028: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED 4000402c: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED 40004030: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004034: 92 10 00 10 mov %l0, %o1 <== 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--) { 40004038: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000403c: 32 bf ff f5 bne,a 40004010 <== NOT EXECUTED 40004040: 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 )) { 40004044: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 40004048: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000404c: 12 80 00 a6 bne 400042e4 <== NOT EXECUTED 40004050: 01 00 00 00 nop <== NOT EXECUTED 40004054: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 40004058: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000405c: 02 80 00 a2 be 400042e4 <== NOT EXECUTED 40004060: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004064: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 40004068: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000406c: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40004070: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004074: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED 40004078: 81 c7 e0 08 ret <== NOT EXECUTED 4000407c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 40004080: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004084: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004088: 02 80 00 1b be 400040f4 <== NOT EXECUTED 4000408c: e6 0e 40 00 ldub [ %i1 ], %l3 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 40004090: c4 0c 20 4a ldub [ %l0 + 0x4a ], %g2 <== NOT EXECUTED 40004094: 83 2c e0 18 sll %l3, 0x18, %g1 <== NOT EXECUTED 40004098: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000409c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400040a0: 12 80 00 0e bne 400040d8 <== NOT EXECUTED 400040a4: c4 0c 20 49 ldub [ %l0 + 0x49 ], %g2 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 400040a8: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 400040ac: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400040b0: 12 80 00 05 bne 400040c4 <== NOT EXECUTED 400040b4: 01 00 00 00 nop <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 400040b8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400040bc: 10 80 00 04 b 400040cc <== NOT EXECUTED 400040c0: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 400040c4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400040c8: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 400040cc: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 400040d0: 10 80 00 0c b 40004100 <== NOT EXECUTED 400040d4: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 400040d8: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 400040dc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400040e0: 12 80 00 06 bne 400040f8 <== NOT EXECUTED 400040e4: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 400040e8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400040ec: 10 bf ff f8 b 400040cc <== NOT EXECUTED 400040f0: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 400040f4: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED 400040f8: 02 80 00 1c be 40004168 <== NOT EXECUTED 400040fc: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 40004100: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004104: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 40004108: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 4000410c: 32 80 00 6b bne,a 400042b8 <== NOT EXECUTED 40004110: b2 06 60 01 inc %i1 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40004114: 7f ff f7 0e call 40001d4c <== NOT EXECUTED 40004118: 01 00 00 00 nop <== NOT EXECUTED 4000411c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40004120: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004124: 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; 40004128: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 4000412c: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004130: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004134: 02 80 00 09 be 40004158 <== NOT EXECUTED 40004138: 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); 4000413c: 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, 40004140: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40004144: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004148: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 4000414c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40004150: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004154: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 40004158: 7f ff f7 01 call 40001d5c <== NOT EXECUTED 4000415c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004160: 10 80 00 56 b 400042b8 <== NOT EXECUTED 40004164: b2 06 60 01 inc %i1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40004168: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 4000416c: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40004170: 40 00 4e 3a call 40017a58 <.urem> <== NOT EXECUTED 40004174: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40004178: 7f ff f6 f5 call 40001d4c <== NOT EXECUTED 4000417c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 40004180: ac 10 00 08 mov %o0, %l6 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 40004184: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 40004188: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 4000418c: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40004190: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 40004194: 40 00 4e 31 call 40017a58 <.urem> <== NOT EXECUTED 40004198: 90 02 00 11 add %o0, %l1, %o0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 4000419c: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 <== NOT EXECUTED 400041a0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400041a4: 08 80 00 2d bleu 40004258 <== NOT EXECUTED 400041a8: 01 00 00 00 nop <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 400041ac: 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) 400041b0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400041b4: 12 80 00 29 bne 40004258 <== NOT EXECUTED 400041b8: 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; 400041bc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400041c0: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 400041c4: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400041c8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400041cc: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 400041d0: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 400041d4: 12 80 00 13 bne 40004220 <== NOT EXECUTED 400041d8: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 400041dc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400041e0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400041e4: 12 80 00 06 bne 400041fc <== NOT EXECUTED 400041e8: 01 00 00 00 nop <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 400041ec: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 400041f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400041f4: 12 80 00 19 bne 40004258 <== NOT EXECUTED 400041f8: 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; 400041fc: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004200: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004204: 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; 40004208: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000420c: 92 10 00 15 mov %l5, %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; 40004210: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004214: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004218: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 4000421c: 30 80 00 0f b,a 40004258 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 40004220: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004224: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 40004228: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 4000422c: 12 80 00 0b bne 40004258 <== NOT EXECUTED 40004230: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40004234: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40004238: 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; 4000423c: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 40004240: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40004244: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004248: 02 80 00 04 be 40004258 <== NOT EXECUTED 4000424c: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40004250: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004254: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 40004258: 7f ff f6 c1 call 40001d5c <== NOT EXECUTED 4000425c: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40004260: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 40004264: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40004268: 32 80 00 04 bne,a 40004278 <== NOT EXECUTED 4000426c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED dropped++; 40004270: 10 80 00 11 b 400042b4 <== NOT EXECUTED 40004274: b0 06 20 01 inc %i0 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 40004278: e6 28 40 11 stb %l3, [ %g1 + %l1 ] <== 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 )) { 4000427c: 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; 40004280: e2 24 20 60 st %l1, [ %l0 + 0x60 ] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40004284: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004288: 32 80 00 0c bne,a 400042b8 <== NOT EXECUTED 4000428c: b2 06 60 01 inc %i1 <== NOT EXECUTED 40004290: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 40004294: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004298: 22 80 00 08 be,a 400042b8 <== NOT EXECUTED 4000429c: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 400042a0: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 400042a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400042a8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 400042ac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400042b0: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 400042b4: b2 06 60 01 inc %i1 <== NOT EXECUTED 400042b8: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400042bc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 400042c0: 12 bf ff 70 bne 40004080 <== NOT EXECUTED 400042c4: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 400042c8: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 400042cc: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 400042d0: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 400042d4: 40 00 08 ce call 4000660c <== NOT EXECUTED 400042d8: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED return dropped; 400042dc: 81 c7 e0 08 ret <== NOT EXECUTED 400042e0: 81 e8 00 00 restore <== NOT EXECUTED } 400042e4: 81 c7 e0 08 ret <== NOT EXECUTED 400042e8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40003ce8 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 40003ce8: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40003cec: 19 10 00 70 sethi %hi(0x4001c000), %o4 40003cf0: c2 03 21 44 ld [ %o4 + 0x144 ], %g1 ! 4001c144 40003cf4: 80 a0 60 00 cmp %g1, 0 40003cf8: 12 80 00 0d bne 40003d2c 40003cfc: 98 13 21 44 or %o4, 0x144, %o4 sc = rtems_semaphore_create ( 40003d00: 11 15 14 9b sethi %hi(0x54526c00), %o0 40003d04: 92 10 20 01 mov 1, %o1 40003d08: 90 12 21 69 or %o0, 0x169, %o0 40003d0c: 94 10 20 54 mov 0x54, %o2 40003d10: 40 00 09 56 call 40006268 40003d14: 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) 40003d18: 80 a2 20 00 cmp %o0, 0 40003d1c: 02 80 00 04 be 40003d2c 40003d20: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40003d24: 40 00 0b 9a call 40006b8c <== NOT EXECUTED 40003d28: 01 00 00 00 nop <== NOT EXECUTED 40003d2c: 81 c7 e0 08 ret 40003d30: 81 e8 00 00 restore 40004f8c : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004f8c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004f90: c2 06 00 00 ld [ %i0 ], %g1 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 40004f94: 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; 40004f98: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40004f9c: 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); 40004fa0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004fa4: a2 10 00 18 mov %i0, %l1 struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004fa8: 92 10 20 00 clr %o1 40004fac: 40 00 05 51 call 400064f0 40004fb0: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40004fb4: b0 92 20 00 orcc %o0, 0, %i0 40004fb8: 22 80 00 05 be,a 40004fcc 40004fbc: c2 04 60 04 ld [ %l1 + 4 ], %g1 args->ioctl_return = sc; 40004fc0: f0 24 60 0c st %i0, [ %l1 + 0xc ] <== NOT EXECUTED return sc; 40004fc4: 81 c7 e0 08 ret <== NOT EXECUTED 40004fc8: 81 e8 00 00 restore <== NOT EXECUTED } switch (args->command) { 40004fcc: 80 a0 60 04 cmp %g1, 4 40004fd0: 22 80 00 bd be,a 400052c4 40004fd4: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 40004fd8: 18 80 00 0b bgu 40005004 40004fdc: 05 10 01 19 sethi %hi(0x40046400), %g2 40004fe0: 80 a0 60 02 cmp %g1, 2 40004fe4: 22 80 00 2c be,a 40005094 40004fe8: d2 04 60 08 ld [ %l1 + 8 ], %o1 40004fec: 18 80 00 af bgu 400052a8 40004ff0: 80 a0 60 01 cmp %g1, 1 40004ff4: 32 80 00 17 bne,a 40005050 40004ff8: 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; 40004ffc: 10 80 00 22 b 40005084 40005000: d0 04 60 08 ld [ %l1 + 8 ], %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) { 40005004: 84 10 a2 7f or %g2, 0x27f, %g2 <== NOT EXECUTED 40005008: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000500c: 02 80 00 cf be 40005348 <== NOT EXECUTED 40005010: 01 00 00 00 nop <== NOT EXECUTED 40005014: 18 80 00 07 bgu 40005030 <== NOT EXECUTED 40005018: 05 10 01 1d sethi %hi(0x40047400), %g2 <== NOT EXECUTED 4000501c: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40005020: 32 80 00 0c bne,a 40005050 <== NOT EXECUTED 40005024: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 40005028: 10 80 00 a3 b 400052b4 <== NOT EXECUTED 4000502c: c2 04 80 00 ld [ %l2 ], %g1 <== 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) { 40005030: 84 10 a0 1a or %g2, 0x1a, %g2 <== NOT EXECUTED 40005034: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40005038: 02 80 00 c0 be 40005338 <== NOT EXECUTED 4000503c: 05 20 01 1d sethi %hi(0x80047400), %g2 <== NOT EXECUTED 40005040: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <== NOT EXECUTED 40005044: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40005048: 02 80 00 a3 be 400052d4 <== NOT EXECUTED 4000504c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40005050: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40005054: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40005058: 82 10 62 38 or %g1, 0x238, %g1 <== NOT EXECUTED 4000505c: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40005060: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40005064: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005068: 02 80 00 c5 be 4000537c <== NOT EXECUTED 4000506c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40005070: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005074: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005078: 92 10 00 11 mov %l1, %o1 <== 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) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); 4000507c: 10 80 00 c0 b 4000537c <== NOT EXECUTED 40005080: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 40005084: 92 04 20 30 add %l0, 0x30, %o1 40005088: 40 00 26 72 call 4000ea50 4000508c: 94 10 20 24 mov 0x24, %o2 break; 40005090: 30 80 00 bb b,a 4000537c case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 40005094: 90 04 20 30 add %l0, 0x30, %o0 40005098: 40 00 26 6e call 4000ea50 4000509c: 94 10 20 24 mov 0x24, %o2 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 400050a0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 400050a4: 80 88 62 00 btst 0x200, %g1 400050a8: 02 80 00 20 be 40005128 400050ac: 01 00 00 00 nop 400050b0: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 400050b4: 80 88 64 00 btst 0x400, %g1 400050b8: 12 80 00 1c bne 40005128 400050bc: 01 00 00 00 nop !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 400050c0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400050c4: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 400050c8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 400050cc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400050d0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400050d4: 02 80 00 15 be 40005128 <== NOT EXECUTED 400050d8: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 400050dc: 7f ff f3 1c call 40001d4c <== NOT EXECUTED 400050e0: 01 00 00 00 nop <== NOT EXECUTED 400050e4: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400050e8: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400050ec: 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; 400050f0: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 400050f4: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400050f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400050fc: 02 80 00 09 be 40005120 <== NOT EXECUTED 40005100: 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); 40005104: 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, 40005108: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 4000510c: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40005110: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40005114: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40005118: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000511c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 40005120: 7f ff f3 0f call 40001d5c <== NOT EXECUTED 40005124: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 40005128: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 4000512c: 80 88 64 00 btst 0x400, %g1 40005130: 02 80 00 0c be 40005160 40005134: 03 00 00 04 sethi %hi(0x1000), %g1 40005138: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 4000513c: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40005140: 12 80 00 08 bne 40005160 <== NOT EXECUTED 40005144: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 40005148: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 4000514c: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 40005150: 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); 40005154: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005158: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 4000515c: 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) && 40005160: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40005164: 80 88 61 00 btst 0x100, %g1 40005168: 02 80 00 16 be 400051c0 4000516c: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 40005170: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005174: 06 80 00 14 bl 400051c4 <== NOT EXECUTED 40005178: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 4000517c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005180: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 40005184: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 40005188: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 4000518c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40005190: 02 80 00 08 be 400051b0 <== NOT EXECUTED 40005194: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 40005198: 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) && 4000519c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400051a0: 02 80 00 04 be 400051b0 <== NOT EXECUTED 400051a4: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400051a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400051ac: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400051b0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400051b4: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400051b8: 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) { 400051bc: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 400051c0: 80 a0 60 00 cmp %g1, 0 400051c4: 36 80 00 06 bge,a 400051dc 400051c8: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 tty->flow_ctrl |= FL_MDRTS; 400051cc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400051d0: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 400051d4: 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) { 400051d8: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 400051dc: 03 00 00 04 sethi %hi(0x1000), %g1 400051e0: 80 88 80 01 btst %g2, %g1 400051e4: 22 80 00 06 be,a 400051fc 400051e8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 tty->flow_ctrl |= FL_MDXOF; 400051ec: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400051f0: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 400051f4: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 400051f8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 400051fc: 80 88 64 00 btst 0x400, %g1 40005200: 22 80 00 06 be,a 40005218 40005204: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40005208: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 4000520c: 82 10 62 00 or %g1, 0x200, %g1 40005210: 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) { 40005214: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 40005218: 80 88 60 02 btst 2, %g1 4000521c: 32 80 00 17 bne,a 40005278 40005220: c0 24 20 6c clr [ %l0 + 0x6c ] 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; 40005224: 40 00 02 e9 call 40005dc8 <== NOT EXECUTED 40005228: e4 0c 20 46 ldub [ %l0 + 0x46 ], %l2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 4000522c: 40 00 49 25 call 400176c0 <.umul> <== NOT EXECUTED 40005230: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40005234: 40 00 49 5d call 400177a8 <.udiv> <== NOT EXECUTED 40005238: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 4000523c: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 40005240: d0 24 20 54 st %o0, [ %l0 + 0x54 ] <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 40005244: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005248: 02 80 00 08 be 40005268 <== NOT EXECUTED 4000524c: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005250: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40005254: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005258: 12 80 00 09 bne 4000527c <== NOT EXECUTED 4000525c: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40005260: 10 80 00 0a b 40005288 <== NOT EXECUTED 40005264: d0 24 20 74 st %o0, [ %l0 + 0x74 ] <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 40005268: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000526c: 02 80 00 06 be 40005284 <== NOT EXECUTED 40005270: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005274: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40005278: c0 24 20 70 clr [ %l0 + 0x70 ] tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 4000527c: 10 80 00 03 b 40005288 40005280: c0 24 20 74 clr [ %l0 + 0x74 ] } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 40005284: c2 24 20 6c st %g1, [ %l0 + 0x6c ] <== NOT EXECUTED } } } if (tty->device.setAttributes) 40005288: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 4000528c: 80 a0 60 00 cmp %g1, 0 40005290: 02 80 00 3b be 4000537c 40005294: 01 00 00 00 nop (*tty->device.setAttributes)(tty->minor, &tty->termios); 40005298: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 4000529c: 9f c0 40 00 call %g1 400052a0: 92 04 20 30 add %l0, 0x30, %o1 400052a4: 30 80 00 36 b,a 4000537c break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 400052a8: 7f ff fe 2d call 40004b5c 400052ac: 90 10 00 10 mov %l0, %o0 break; 400052b0: 30 80 00 33 b,a 4000537c case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 400052b4: c2 24 20 d4 st %g1, [ %l0 + 0xd4 ] <== NOT EXECUTED 400052b8: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 400052bc: 10 80 00 30 b 4000537c <== NOT EXECUTED 400052c0: c2 24 20 d8 st %g1, [ %l0 + 0xd8 ] <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 400052c4: c2 24 20 dc st %g1, [ %l0 + 0xdc ] <== NOT EXECUTED 400052c8: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 400052cc: 10 80 00 2c b 4000537c <== NOT EXECUTED 400052d0: c2 24 20 e0 st %g1, [ %l0 + 0xe0 ] <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400052d4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 400052d8: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 400052dc: 82 10 62 38 or %g1, 0x238, %g1 <== NOT EXECUTED 400052e0: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 400052e4: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400052e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400052ec: 22 80 00 06 be,a 40005304 <== NOT EXECUTED 400052f0: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400052f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400052f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400052fc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 40005300: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== 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) { 40005304: 07 10 00 6f sethi %hi(0x4001bc00), %g3 <== 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); 40005308: 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) { 4000530c: 86 10 e2 38 or %g3, 0x238, %g3 <== NOT EXECUTED 40005310: 83 28 a0 05 sll %g2, 5, %g1 <== NOT EXECUTED 40005314: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 <== 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); 40005318: c4 24 20 cc st %g2, [ %l0 + 0xcc ] <== 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) { 4000531c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005320: 02 80 00 17 be 4000537c <== NOT EXECUTED 40005324: c0 24 20 d0 clr [ %l0 + 0xd0 ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 40005328: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000532c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005330: 10 80 00 13 b 4000537c <== NOT EXECUTED 40005334: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 40005338: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED 4000533c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED break; 40005340: 10 80 00 0f b 4000537c <== NOT EXECUTED 40005344: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40005348: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 4000534c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40005350: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED 40005354: 3c 80 00 05 bpos,a 40005368 <== NOT EXECUTED 40005358: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 4000535c: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40005360: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 40005364: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED 40005368: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED 4000536c: c4 04 60 08 ld [ %l1 + 8 ], %g2 <== NOT EXECUTED 40005370: 86 21 00 03 sub %g4, %g3, %g3 <== NOT EXECUTED 40005374: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 40005378: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 4000537c: 40 00 04 a4 call 4000660c 40005380: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 args->ioctl_return = sc; 40005384: f0 24 60 0c st %i0, [ %l1 + 0xc ] return sc; } 40005388: 81 c7 e0 08 ret 4000538c: 81 e8 00 00 restore 40005524 : #include int rtems_termios_number_to_baud( int32_t baud ) { 40005524: 82 10 00 08 mov %o0, %g1 int termios_baud; switch (baud) { 40005528: 80 a2 24 b0 cmp %o0, 0x4b0 4000552c: 02 80 00 19 be 40005590 40005530: 90 10 20 09 mov 9, %o0 40005534: 80 a0 64 b0 cmp %g1, 0x4b0 40005538: 14 80 00 29 bg 400055dc 4000553c: 05 00 00 12 sethi %hi(0x4800), %g2 40005540: 80 a0 60 86 cmp %g1, 0x86 40005544: 02 80 00 13 be 40005590 40005548: 90 10 20 04 mov 4, %o0 4000554c: 80 a0 60 86 cmp %g1, 0x86 40005550: 14 80 00 12 bg 40005598 40005554: 80 a0 60 c8 cmp %g1, 0xc8 40005558: 80 a0 60 32 cmp %g1, 0x32 4000555c: 02 80 00 0d be 40005590 40005560: 90 10 20 01 mov 1, %o0 40005564: 80 a0 60 32 cmp %g1, 0x32 40005568: 34 80 00 05 bg,a 4000557c 4000556c: 80 a0 60 4b cmp %g1, 0x4b 40005570: 80 a0 60 00 cmp %g1, 0 40005574: 10 80 00 52 b 400056bc 40005578: 90 10 20 00 clr %o0 4000557c: 02 80 00 05 be 40005590 40005580: 90 10 20 02 mov 2, %o0 40005584: 80 a0 60 6e cmp %g1, 0x6e 40005588: 12 80 00 4f bne 400056c4 4000558c: 90 10 20 03 mov 3, %o0 40005590: 81 c3 e0 08 retl 40005594: 01 00 00 00 nop 40005598: 02 bf ff fe be 40005590 4000559c: 90 10 20 06 mov 6, %o0 ! 6 400055a0: 80 a0 60 c8 cmp %g1, 0xc8 400055a4: 14 80 00 07 bg 400055c0 400055a8: 80 a0 61 2c cmp %g1, 0x12c 400055ac: 80 a0 60 96 cmp %g1, 0x96 400055b0: 12 80 00 45 bne 400056c4 400055b4: 90 10 20 05 mov 5, %o0 400055b8: 81 c3 e0 08 retl 400055bc: 01 00 00 00 nop 400055c0: 02 bf ff f4 be 40005590 400055c4: 90 10 20 07 mov 7, %o0 ! 7 400055c8: 80 a0 62 58 cmp %g1, 0x258 400055cc: 12 80 00 3e bne 400056c4 400055d0: 90 10 20 08 mov 8, %o0 400055d4: 81 c3 e0 08 retl 400055d8: 01 00 00 00 nop 400055dc: 84 10 a3 00 or %g2, 0x300, %g2 400055e0: 80 a0 40 02 cmp %g1, %g2 400055e4: 02 bf ff eb be 40005590 400055e8: 90 10 20 0e mov 0xe, %o0 400055ec: 80 a0 40 02 cmp %g1, %g2 400055f0: 14 80 00 18 bg 40005650 400055f4: 07 00 00 70 sethi %hi(0x1c000), %g3 400055f8: 80 a0 69 60 cmp %g1, 0x960 400055fc: 02 bf ff e5 be 40005590 40005600: 90 10 20 0b mov 0xb, %o0 40005604: 80 a0 69 60 cmp %g1, 0x960 40005608: 34 80 00 07 bg,a 40005624 4000560c: 05 00 00 04 sethi %hi(0x1000), %g2 40005610: 80 a0 67 08 cmp %g1, 0x708 40005614: 12 80 00 2c bne 400056c4 40005618: 90 10 20 0a mov 0xa, %o0 4000561c: 81 c3 e0 08 retl 40005620: 01 00 00 00 nop 40005624: 84 10 a2 c0 or %g2, 0x2c0, %g2 40005628: 80 a0 40 02 cmp %g1, %g2 4000562c: 02 bf ff d9 be 40005590 40005630: 90 10 20 0c mov 0xc, %o0 40005634: 05 00 00 09 sethi %hi(0x2400), %g2 40005638: 84 10 a1 80 or %g2, 0x180, %g2 ! 2580 4000563c: 80 a0 40 02 cmp %g1, %g2 40005640: 12 80 00 21 bne 400056c4 40005644: 90 10 20 0d mov 0xd, %o0 40005648: 81 c3 e0 08 retl 4000564c: 01 00 00 00 nop 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; 40005650: 05 00 00 04 sethi %hi(0x1000), %g2 int32_t baud ) { int termios_baud; switch (baud) { 40005654: 86 10 e2 00 or %g3, 0x200, %g3 40005658: 80 a0 40 03 cmp %g1, %g3 4000565c: 02 bf ff cd be 40005590 40005660: 90 10 a0 02 or %g2, 2, %o0 40005664: 80 a0 40 03 cmp %g1, %g3 40005668: 14 80 00 0f bg 400056a4 4000566c: 07 00 00 e1 sethi %hi(0x38400), %g3 40005670: 07 00 00 25 sethi %hi(0x9400), %g3 40005674: 86 10 e2 00 or %g3, 0x200, %g3 ! 9600 40005678: 80 a0 40 03 cmp %g1, %g3 4000567c: 02 bf ff c5 be 40005590 40005680: 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; 40005684: 90 10 a0 01 or %g2, 1, %o0 int32_t baud ) { int termios_baud; switch (baud) { 40005688: 05 00 00 38 sethi %hi(0xe000), %g2 4000568c: 84 10 a1 00 or %g2, 0x100, %g2 ! e100 40005690: 80 a0 40 02 cmp %g1, %g2 40005694: 32 bf ff bf bne,a 40005590 40005698: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4000569c: 81 c3 e0 08 retl 400056a0: 01 00 00 00 nop 400056a4: 80 a0 40 03 cmp %g1, %g3 400056a8: 02 bf ff ba be 40005590 400056ac: 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; 400056b0: 90 10 a0 04 or %g2, 4, %o0 int32_t baud ) { int termios_baud; switch (baud) { 400056b4: 05 00 01 c2 sethi %hi(0x70800), %g2 400056b8: 80 a0 40 02 cmp %g1, %g2 400056bc: 02 80 00 03 be 400056c8 400056c0: 01 00 00 00 nop 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; case 460800: termios_baud = B460800; break; 400056c4: 90 10 3f ff mov -1, %o0 ! ffffffff default: termios_baud = -1; break; } return termios_baud; } 400056c8: 81 c3 e0 08 retl 400056cc: 01 00 00 00 nop 40005558 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 40005558: 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, 4000555c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40005560: d0 00 61 44 ld [ %g1 + 0x144 ], %o0 ! 4001c144 40005564: 92 10 20 00 clr %o1 40005568: 40 00 03 e2 call 400064f0 4000556c: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40005570: a0 92 20 00 orcc %o0, 0, %l0 40005574: 12 80 01 05 bne 40005988 40005578: 03 10 00 70 sethi %hi(0x4001c000), %g1 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4000557c: 10 80 00 0a b 400055a4 40005580: e4 00 61 4c ld [ %g1 + 0x14c ], %l2 ! 4001c14c if ((tty->major == major) && (tty->minor == minor)) 40005584: 80 a0 40 18 cmp %g1, %i0 40005588: 32 80 00 07 bne,a 400055a4 4000558c: e4 04 80 00 ld [ %l2 ], %l2 40005590: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 40005594: 80 a0 40 19 cmp %g1, %i1 40005598: 22 80 00 d6 be,a 400058f0 4000559c: c2 04 a0 08 ld [ %l2 + 8 ], %g1 */ 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) { 400055a0: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED 400055a4: 80 a4 a0 00 cmp %l2, 0 400055a8: 32 bf ff f7 bne,a 40005584 400055ac: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 400055b0: 10 80 00 f8 b 40005990 400055b4: 90 10 20 01 mov 1, %o0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 400055b8: 03 10 00 6e sethi %hi(0x4001b800), %g1 400055bc: c2 00 60 ec ld [ %g1 + 0xec ], %g1 ! 4001b8ec 400055c0: c2 24 a0 64 st %g1, [ %l2 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 400055c4: d0 04 a0 64 ld [ %l2 + 0x64 ], %o0 400055c8: 40 00 17 de call 4000b540 400055cc: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 400055d0: 80 a2 20 00 cmp %o0, 0 400055d4: 12 80 00 08 bne 400055f4 400055d8: d0 24 a0 58 st %o0, [ %l2 + 0x58 ] free(tty); 400055dc: 40 00 16 7f call 4000afd8 <== NOT EXECUTED 400055e0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 400055e4: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 400055e8: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED 400055ec: 10 80 00 e5 b 40005980 <== NOT EXECUTED 400055f0: d0 00 61 44 ld [ %g1 + 0x144 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 400055f4: 03 10 00 6e sethi %hi(0x4001b800), %g1 400055f8: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 ! 4001b8f0 400055fc: c2 24 a0 88 st %g1, [ %l2 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40005600: d0 04 a0 88 ld [ %l2 + 0x88 ], %o0 40005604: 40 00 17 cf call 4000b540 40005608: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 4000560c: 80 a2 20 00 cmp %o0, 0 40005610: 12 80 00 05 bne 40005624 40005614: d0 24 a0 7c st %o0, [ %l2 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 40005618: d0 04 a0 58 ld [ %l2 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 4000561c: 10 80 00 0c b 4000564c <== NOT EXECUTED 40005620: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40005624: 03 10 00 6e sethi %hi(0x4001b800), %g1 40005628: 40 00 17 c6 call 4000b540 4000562c: d0 00 60 e8 ld [ %g1 + 0xe8 ], %o0 ! 4001b8e8 if (tty->cbuf == NULL) { 40005630: 80 a2 20 00 cmp %o0, 0 40005634: 12 80 00 0c bne 40005664 40005638: d0 24 a0 1c st %o0, [ %l2 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 4000563c: d0 04 a0 7c ld [ %l2 + 0x7c ], %o0 <== NOT EXECUTED 40005640: 40 00 16 66 call 4000afd8 <== NOT EXECUTED 40005644: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40005648: d0 04 a0 58 ld [ %l2 + 0x58 ], %o0 <== NOT EXECUTED 4000564c: 40 00 16 63 call 4000afd8 <== NOT EXECUTED 40005650: 01 00 00 00 nop <== NOT EXECUTED free(tty); 40005654: 40 00 16 61 call 4000afd8 <== NOT EXECUTED 40005658: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 4000565c: 10 80 00 c8 b 4000597c <== NOT EXECUTED 40005660: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005664: 03 10 00 70 sethi %hi(0x4001c000), %g1 40005668: c2 00 61 4c ld [ %g1 + 0x14c ], %g1 ! 4001c14c return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 4000566c: c0 24 a0 d4 clr [ %l2 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40005670: c0 24 a0 d8 clr [ %l2 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40005674: c0 24 a0 dc clr [ %l2 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40005678: c0 24 a0 e0 clr [ %l2 + 0xe0 ] tty->tty_rcvwakeup = 0; 4000567c: c0 24 a0 e4 clr [ %l2 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005680: c2 24 80 00 st %g1, [ %l2 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40005684: 80 a0 60 00 cmp %g1, 0 40005688: 02 80 00 03 be 40005694 4000568c: c0 24 a0 04 clr [ %l2 + 4 ] rtems_termios_ttyHead->back = tty; 40005690: e4 20 60 04 st %l2, [ %g1 + 4 ] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40005694: 03 10 00 70 sethi %hi(0x4001c000), %g1 40005698: c4 00 61 48 ld [ %g1 + 0x148 ], %g2 ! 4001c148 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 4000569c: 07 10 00 70 sethi %hi(0x4001c000), %g3 if (rtems_termios_ttyTail == NULL) 400056a0: 80 a0 a0 00 cmp %g2, 0 400056a4: 12 80 00 03 bne 400056b0 400056a8: e2 20 e1 4c st %l1, [ %g3 + 0x14c ] rtems_termios_ttyTail = tty; 400056ac: e2 20 61 48 st %l1, [ %g1 + 0x148 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400056b0: 27 10 00 6e sethi %hi(0x4001b800), %l3 400056b4: d0 4c e0 f4 ldsb [ %l3 + 0xf4 ], %o0 ! 4001b8f4 400056b8: 03 15 14 9a sethi %hi(0x54526800), %g1 400056bc: 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; 400056c0: f2 24 60 10 st %i1, [ %l1 + 0x10 ] tty->major = major; 400056c4: f0 24 60 0c st %i0, [ %l1 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400056c8: 90 12 00 01 or %o0, %g1, %o0 400056cc: 92 10 20 01 mov 1, %o1 400056d0: 94 10 20 54 mov 0x54, %o2 400056d4: 96 10 20 00 clr %o3 400056d8: 40 00 02 e4 call 40006268 400056dc: 98 04 60 14 add %l1, 0x14, %o4 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 400056e0: 80 a2 20 00 cmp %o0, 0 400056e4: 12 80 00 a3 bne 40005970 400056e8: 03 15 14 9b sethi %hi(0x54526c00), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 400056ec: d0 4c e0 f4 ldsb [ %l3 + 0xf4 ], %o0 400056f0: 82 10 63 00 or %g1, 0x300, %g1 400056f4: 92 10 20 01 mov 1, %o1 400056f8: 90 12 00 01 or %o0, %g1, %o0 400056fc: 94 10 20 54 mov 0x54, %o2 40005700: 96 10 20 00 clr %o3 40005704: 40 00 02 d9 call 40006268 40005708: 98 04 60 18 add %l1, 0x18, %o4 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 4000570c: 80 a2 20 00 cmp %o0, 0 40005710: 12 80 00 98 bne 40005970 40005714: 03 15 14 9e sethi %hi(0x54527800), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40005718: d0 4c e0 f4 ldsb [ %l3 + 0xf4 ], %o0 4000571c: 92 10 20 00 clr %o1 40005720: 90 12 00 01 or %o0, %g1, %o0 40005724: 94 10 20 20 mov 0x20, %o2 40005728: 96 10 20 00 clr %o3 4000572c: 40 00 02 cf call 40006268 40005730: 98 04 60 8c add %l1, 0x8c, %o4 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 40005734: 80 a2 20 00 cmp %o0, 0 40005738: 12 80 00 8e bne 40005970 4000573c: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40005740: c0 24 60 94 clr [ %l1 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 40005744: 90 04 60 98 add %l1, 0x98, %o0 40005748: 40 00 24 c2 call 4000ea50 4000574c: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005750: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40005754: 80 a0 60 02 cmp %g1, 2 40005758: 32 80 00 1a bne,a 400057c0 4000575c: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 sc = rtems_task_create ( 40005760: d0 4c e0 f4 ldsb [ %l3 + 0xf4 ], %o0 <== NOT EXECUTED 40005764: 03 15 1e 15 sethi %hi(0x54785400), %g1 <== NOT EXECUTED 40005768: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4000576c: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40005770: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005774: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005778: 98 10 20 00 clr %o4 <== NOT EXECUTED 4000577c: 40 00 03 d0 call 400066bc <== NOT EXECUTED 40005780: 9a 04 60 c8 add %l1, 0xc8, %o5 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 40005784: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005788: 12 80 00 7a bne 40005970 <== NOT EXECUTED 4000578c: 03 14 9e 15 sethi %hi(0x52785400), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 40005790: d0 4c e0 f4 ldsb [ %l3 + 0xf4 ], %o0 <== NOT EXECUTED 40005794: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40005798: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000579c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 400057a0: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 400057a4: 98 10 20 00 clr %o4 <== NOT EXECUTED 400057a8: 40 00 03 c5 call 400066bc <== NOT EXECUTED 400057ac: 9a 04 60 c4 add %l1, 0xc4, %o5 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 400057b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400057b4: 12 80 00 6f bne 40005970 <== NOT EXECUTED 400057b8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 400057bc: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED 400057c0: 80 a0 60 00 cmp %g1, 0 400057c4: 02 80 00 07 be 400057e0 400057c8: 03 10 00 6e sethi %hi(0x4001b800), %g1 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 400057cc: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 400057d0: 80 a0 60 02 cmp %g1, 2 400057d4: 12 80 00 0f bne 40005810 400057d8: 84 10 20 03 mov 3, %g2 sc = rtems_semaphore_create ( 400057dc: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED 400057e0: d0 48 60 f4 ldsb [ %g1 + 0xf4 ], %o0 ! 4001b8f4 <== NOT EXECUTED 400057e4: 03 15 14 9c sethi %hi(0x54527000), %g1 <== NOT EXECUTED 400057e8: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <== NOT EXECUTED 400057ec: 92 10 20 00 clr %o1 <== NOT EXECUTED 400057f0: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 400057f4: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 400057f8: 96 10 20 00 clr %o3 <== NOT EXECUTED 400057fc: 40 00 02 9b call 40006268 <== NOT EXECUTED 40005800: 98 04 60 68 add %l1, 0x68, %o4 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 40005804: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005808: 12 80 00 5a bne 40005970 <== NOT EXECUTED 4000580c: 84 10 20 03 mov 3, %g2 <== NOT EXECUTED tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 40005810: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40005814: 84 10 20 1c mov 0x1c, %g2 40005818: c4 2c 60 42 stb %g2, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 4000581c: 84 10 20 7f mov 0x7f, %g2 40005820: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40005824: 84 10 20 15 mov 0x15, %g2 40005828: c4 2c 60 44 stb %g2, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 4000582c: 84 10 20 04 mov 4, %g2 40005830: c4 2c 60 45 stb %g2, [ %l1 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40005834: 84 10 20 11 mov 0x11, %g2 40005838: c4 2c 60 49 stb %g2, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 4000583c: 84 10 20 13 mov 0x13, %g2 40005840: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40005844: 84 10 20 1a mov 0x1a, %g2 40005848: c4 2c 60 4b stb %g2, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 4000584c: 84 10 20 12 mov 0x12, %g2 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; 40005850: c0 24 60 b8 clr [ %l1 + 0xb8 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 40005854: c4 2c 60 4d stb %g2, [ %l1 + 0x4d ] /* 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; 40005858: c8 04 60 64 ld [ %l1 + 0x64 ], %g4 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'; 4000585c: 84 10 20 0f mov 0xf, %g2 40005860: c4 2c 60 4e stb %g2, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40005864: 84 10 20 17 mov 0x17, %g2 /* 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; 40005868: 89 31 20 01 srl %g4, 1, %g4 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 4000586c: c4 2c 60 4f stb %g2, [ %l1 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40005870: 84 10 20 16 mov 0x16, %g2 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 40005874: c0 2c 60 4c clrb [ %l1 + 0x4c ] tty->termios.c_cc[VEOL2] = '\000'; 40005878: c0 2c 60 51 clrb [ %l1 + 0x51 ] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 4000587c: 03 10 00 6e sethi %hi(0x4001b800), %g1 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 40005880: c4 2c 60 50 stb %g2, [ %l1 + 0x50 ] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40005884: c4 08 60 f4 ldub [ %g1 + 0xf4 ], %g2 /* 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; 40005888: c8 24 60 bc st %g4, [ %l1 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 4000588c: 09 00 00 09 sethi %hi(0x2400), %g4 40005890: 88 11 21 02 or %g4, 0x102, %g4 ! 2502 40005894: c8 24 60 30 st %g4, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40005898: 09 00 00 06 sethi %hi(0x1800), %g4 4000589c: 88 11 20 05 or %g4, 5, %g4 ! 1805 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; 400058a0: c6 04 60 64 ld [ %l1 + 0x64 ], %g3 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 400058a4: c8 24 60 34 st %g4, [ %l1 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 400058a8: 88 10 28 bd mov 0x8bd, %g4 400058ac: c8 24 60 38 st %g4, [ %l1 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 400058b0: 09 00 00 20 sethi %hi(0x8000), %g4 400058b4: 88 11 22 3b or %g4, 0x23b, %g4 ! 823b 400058b8: c8 24 60 3c st %g4, [ %l1 + 0x3c ] 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; 400058bc: 89 28 e0 01 sll %g3, 1, %g4 400058c0: 86 01 00 03 add %g4, %g3, %g3 400058c4: 87 30 e0 02 srl %g3, 2, %g3 400058c8: c6 24 60 c0 st %g3, [ %l1 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 400058cc: 86 00 a0 01 add %g2, 1, %g3 400058d0: 85 28 a0 18 sll %g2, 0x18, %g2 400058d4: 85 38 a0 18 sra %g2, 0x18, %g2 400058d8: 80 a0 a0 7a cmp %g2, 0x7a 400058dc: 12 80 00 04 bne 400058ec 400058e0: c6 28 60 f4 stb %g3, [ %g1 + 0xf4 ] c = 'a'; 400058e4: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 400058e8: c4 28 60 f4 stb %g2, [ %g1 + 0xf4 ] <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 400058ec: c2 04 a0 08 ld [ %l2 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400058f0: c6 06 80 00 ld [ %i2 ], %g3 if (!tty->refcount++) { 400058f4: 84 00 60 01 add %g1, 1, %g2 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400058f8: e4 20 e0 38 st %l2, [ %g3 + 0x38 ] if (!tty->refcount++) { 400058fc: 80 a0 60 00 cmp %g1, 0 40005900: 12 80 00 1e bne 40005978 40005904: c4 24 a0 08 st %g2, [ %l2 + 8 ] if (tty->device.firstOpen) 40005908: c2 04 a0 98 ld [ %l2 + 0x98 ], %g1 4000590c: 80 a0 60 00 cmp %g1, 0 40005910: 02 80 00 05 be 40005924 40005914: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 40005918: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000591c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005920: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005924: c2 04 a0 b4 ld [ %l2 + 0xb4 ], %g1 40005928: 80 a0 60 02 cmp %g1, 2 4000592c: 12 80 00 14 bne 4000597c 40005930: 03 10 00 70 sethi %hi(0x4001c000), %g1 sc = rtems_task_start(tty->rxTaskId, 40005934: d0 04 a0 c4 ld [ %l2 + 0xc4 ], %o0 <== NOT EXECUTED 40005938: 13 10 00 16 sethi %hi(0x40005800), %o1 <== NOT EXECUTED 4000593c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40005940: 40 00 04 05 call 40006954 <== NOT EXECUTED 40005944: 92 12 62 28 or %o1, 0x228, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005948: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000594c: 12 80 00 09 bne 40005970 <== NOT EXECUTED 40005950: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 40005954: d0 04 a0 c8 ld [ %l2 + 0xc8 ], %o0 <== NOT EXECUTED 40005958: 13 10 00 16 sethi %hi(0x40005800), %o1 <== NOT EXECUTED 4000595c: 40 00 03 fe call 40006954 <== NOT EXECUTED 40005960: 92 12 61 ac or %o1, 0x1ac, %o1 ! 400059ac <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005964: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005968: 02 80 00 05 be 4000597c <== NOT EXECUTED 4000596c: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005970: 40 00 04 87 call 40006b8c <== NOT EXECUTED 40005974: 01 00 00 00 nop <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 40005978: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000597c: d0 00 61 44 ld [ %g1 + 0x144 ], %o0 ! 4001c144 40005980: 40 00 03 23 call 4000660c 40005984: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } 40005988: 81 c7 e0 08 ret 4000598c: 91 e8 00 10 restore %g0, %l0, %o0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005990: 40 00 15 4c call 4000aec0 40005994: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 40005998: a4 92 20 00 orcc %o0, 0, %l2 4000599c: 12 bf ff 07 bne 400055b8 400059a0: a2 10 00 12 mov %l2, %l1 */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 400059a4: 10 bf ff 11 b 400055e8 <== NOT EXECUTED 400059a8: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 400042ec : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 400042ec: 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) { 400042f0: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 400042f4: 92 10 00 18 mov %i0, %o1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 400042f8: 80 a0 60 00 cmp %g1, 0 400042fc: 12 80 00 08 bne 4000431c 40004300: a2 10 00 18 mov %i0, %l1 (*tty->device.write)(tty->minor, (void *)buf, len); 40004304: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 40004308: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 4000430c: 9f c0 40 00 call %g1 40004310: 94 10 00 19 mov %i1, %o2 return; 40004314: 81 c7 e0 08 ret 40004318: 81 e8 00 00 restore } newHead = tty->rawOutBuf.Head; 4000431c: e0 06 a0 80 ld [ %i2 + 0x80 ], %l0 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 40004320: a8 10 20 02 mov 2, %l4 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 40004324: 10 80 00 39 b 40004408 <== NOT EXECUTED 40004328: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 4000432c: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 40004330: 40 00 4d ca call 40017a58 <.urem> <== NOT EXECUTED 40004334: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40004338: 7f ff f6 85 call 40001d4c <== NOT EXECUTED 4000433c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40004340: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 40004344: 30 80 00 0f b,a 40004380 <== NOT EXECUTED tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 40004348: 7f ff f6 85 call 40001d5c <== NOT EXECUTED 4000434c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40004350: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 40004354: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004358: 40 00 08 66 call 400064f0 <== NOT EXECUTED 4000435c: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004360: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004364: 02 80 00 04 be 40004374 <== NOT EXECUTED 40004368: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4000436c: 40 00 0a 08 call 40006b8c <== NOT EXECUTED 40004370: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40004374: 7f ff f6 76 call 40001d4c <== NOT EXECUTED 40004378: 01 00 00 00 nop <== NOT EXECUTED 4000437c: a4 10 00 08 mov %o0, %l2 <== 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) { 40004380: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 40004384: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40004388: 22 bf ff f0 be,a 40004348 <== NOT EXECUTED 4000438c: e8 26 a0 94 st %l4, [ %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++; 40004390: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1 <== NOT EXECUTED 40004394: c6 0c 40 00 ldub [ %l1 ], %g3 <== NOT EXECUTED 40004398: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2 <== NOT EXECUTED 4000439c: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 400043a0: 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; 400043a4: e0 26 a0 80 st %l0, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 400043a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400043ac: 32 80 00 14 bne,a 400043fc <== NOT EXECUTED 400043b0: a2 04 60 01 inc %l1 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 400043b4: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400043b8: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 400043bc: 12 80 00 0b bne 400043e8 <== NOT EXECUTED 400043c0: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 400043c4: 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, 400043c8: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1 <== NOT EXECUTED 400043cc: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 <== NOT EXECUTED 400043d0: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 400043d4: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 400043d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400043dc: 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; 400043e0: 10 80 00 06 b 400043f8 <== NOT EXECUTED 400043e4: e6 26 a0 94 st %l3, [ %i2 + 0x94 ] <== 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; 400043e8: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400043ec: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 400043f0: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 400043f4: e6 26 a0 94 st %l3, [ %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++; 400043f8: a2 04 60 01 inc %l1 <== NOT EXECUTED /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 400043fc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40004400: 7f ff f6 57 call 40001d5c <== NOT EXECUTED 40004404: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 40004408: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000440c: 12 bf ff c8 bne 4000432c <== NOT EXECUTED 40004410: 01 00 00 00 nop <== NOT EXECUTED 40004414: 81 c7 e0 08 ret <== NOT EXECUTED 40004418: 81 e8 00 00 restore <== NOT EXECUTED 40004bd8 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40004bd8: 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; 40004bdc: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40004be0: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004be4: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 40004be8: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004bec: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40004bf0: a2 10 00 18 mov %i0, %l1 <== 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); 40004bf4: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004bf8: 40 00 06 3e call 400064f0 <== NOT EXECUTED 40004bfc: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40004c00: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40004c04: 12 80 00 10 bne 40004c44 <== NOT EXECUTED 40004c08: 05 10 00 6f sethi %hi(0x4001bc00), %g2 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 40004c0c: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 40004c10: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004c14: 84 10 a2 38 or %g2, 0x238, %g2 <== NOT EXECUTED 40004c18: 82 00 60 08 add %g1, 8, %g1 <== NOT EXECUTED 40004c1c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40004c20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c24: 02 80 00 0a be 40004c4c <== NOT EXECUTED 40004c28: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40004c2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004c30: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004c34: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40004c38: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 40004c3c: 40 00 06 74 call 4000660c <== NOT EXECUTED 40004c40: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED return sc; 40004c44: 81 c7 e0 08 ret <== NOT EXECUTED 40004c48: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 40004c4c: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40004c50: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004c54: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004c58: 12 80 00 be bne 40004f50 <== NOT EXECUTED 40004c5c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 40004c60: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 <== NOT EXECUTED if (tty->device.pollRead != NULL 40004c64: 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; 40004c68: 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; 40004c6c: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 40004c70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c74: 02 80 00 4c be 40004da4 <== NOT EXECUTED 40004c78: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 40004c7c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40004c80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c84: 12 80 00 49 bne 40004da8 <== NOT EXECUTED 40004c88: 2f 10 00 6e sethi %hi(0x4001b800), %l7 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40004c8c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40004c90: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004c94: 02 80 00 13 be 40004ce0 <== NOT EXECUTED 40004c98: 01 00 00 00 nop <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40004c9c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004ca0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004ca4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40004ca8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004cac: 16 80 00 06 bge 40004cc4 <== NOT EXECUTED 40004cb0: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 40004cb4: 40 00 07 44 call 400069c4 <== NOT EXECUTED 40004cb8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 40004cbc: 10 bf ff f9 b 40004ca0 <== NOT EXECUTED 40004cc0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40004cc4: 7f ff ff 5f call 40004a40 <== NOT EXECUTED 40004cc8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004ccc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004cd0: 22 bf ff f4 be,a 40004ca0 <== NOT EXECUTED 40004cd4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40004cd8: 10 80 00 9e b 40004f50 <== NOT EXECUTED 40004cdc: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 40004ce0: 40 00 04 42 call 40005de8 <== NOT EXECUTED 40004ce4: 01 00 00 00 nop <== NOT EXECUTED 40004ce8: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40004cec: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004cf0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004cf4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40004cf8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004cfc: 36 80 00 1c bge,a 40004d6c <== NOT EXECUTED 40004d00: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 40004d04: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 40004d08: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004d0c: 02 80 00 0a be 40004d34 <== NOT EXECUTED 40004d10: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 40004d14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d18: 02 80 00 11 be 40004d5c <== NOT EXECUTED 40004d1c: 01 00 00 00 nop <== NOT EXECUTED 40004d20: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004d24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d28: 02 80 00 0d be 40004d5c <== NOT EXECUTED 40004d2c: 01 00 00 00 nop <== NOT EXECUTED 40004d30: 30 80 00 04 b,a 40004d40 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40004d34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d38: 02 80 00 86 be 40004f50 <== NOT EXECUTED 40004d3c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 40004d40: 40 00 04 2a call 40005de8 <== NOT EXECUTED 40004d44: 01 00 00 00 nop <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40004d48: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 40004d4c: 90 22 00 13 sub %o0, %l3, %o0 <== NOT EXECUTED 40004d50: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40004d54: 18 80 00 7f bgu 40004f50 <== NOT EXECUTED 40004d58: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 40004d5c: 40 00 07 1a call 400069c4 <== NOT EXECUTED 40004d60: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 40004d64: 10 bf ff e3 b 40004cf0 <== NOT EXECUTED 40004d68: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 40004d6c: 7f ff ff 35 call 40004a40 <== NOT EXECUTED 40004d70: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40004d74: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40004d78: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004d7c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004d80: 16 80 00 73 bge 40004f4c <== NOT EXECUTED 40004d84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 40004d88: 22 bf ff da be,a 40004cf0 <== NOT EXECUTED 40004d8c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004d90: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40004d94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d98: 22 bf ff d6 be,a 40004cf0 <== NOT EXECUTED 40004d9c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004da0: 30 bf ff d0 b,a 40004ce0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40004da4: 2f 10 00 6e sethi %hi(0x4001b800), %l7 <== 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; 40004da8: e8 04 20 74 ld [ %l0 + 0x74 ], %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40004dac: ae 15 e0 e8 or %l7, 0xe8, %l7 <== 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, 40004db0: ac 04 20 49 add %l0, 0x49, %l6 <== NOT EXECUTED 40004db4: 10 80 00 4b b 40004ee0 <== NOT EXECUTED 40004db8: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 40004dbc: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40004dc0: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40004dc4: 40 00 4b 25 call 40017a58 <.urem> <== NOT EXECUTED 40004dc8: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40004dcc: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40004dd0: e8 08 40 08 ldub [ %g1 + %o0 ], %l4 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40004dd4: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 40004dd8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40004ddc: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40004de0: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40004de4: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 40004de8: 40 00 4b 1c call 40017a58 <.urem> <== NOT EXECUTED 40004dec: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 40004df0: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40004df4: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40004df8: 3a 80 00 27 bcc,a 40004e94 <== NOT EXECUTED 40004dfc: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40004e00: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004e04: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40004e08: 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)) 40004e0c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004e10: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 40004e14: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 40004e18: 12 80 00 11 bne 40004e5c <== NOT EXECUTED 40004e1c: 01 00 00 00 nop <== NOT EXECUTED 40004e20: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 40004e24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004e28: 22 80 00 07 be,a 40004e44 <== NOT EXECUTED 40004e2c: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 40004e30: 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)) 40004e34: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004e38: 02 80 00 09 be 40004e5c <== NOT EXECUTED 40004e3c: 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, 40004e40: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004e44: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40004e48: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40004e4c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004e50: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004e54: 10 80 00 10 b 40004e94 <== NOT EXECUTED 40004e58: c2 04 20 3c ld [ %l0 + 0x3c ], %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) { 40004e5c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004e60: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004e64: 22 80 00 0c be,a 40004e94 <== NOT EXECUTED 40004e68: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40004e6c: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004e70: 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; 40004e74: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED 40004e78: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004e7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004e80: 22 80 00 05 be,a 40004e94 <== NOT EXECUTED 40004e84: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40004e88: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004e8c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004e90: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40004e94: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004e98: 02 80 00 09 be 40004ebc <== NOT EXECUTED 40004e9c: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 40004ea0: 7f ff fe e8 call 40004a40 <== NOT EXECUTED 40004ea4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004ea8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004eac: 32 80 00 0c bne,a 40004edc <== NOT EXECUTED 40004eb0: a6 10 20 00 clr %l3 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 40004eb4: 10 80 00 0b b 40004ee0 <== NOT EXECUTED 40004eb8: e8 04 20 70 ld [ %l0 + 0x70 ], %l4 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 40004ebc: 7f ff fe e1 call 40004a40 <== NOT EXECUTED 40004ec0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40004ec4: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40004ec8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004ecc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004ed0: 26 80 00 04 bl,a 40004ee0 <== NOT EXECUTED 40004ed4: e8 04 20 70 ld [ %l0 + 0x70 ], %l4 <== NOT EXECUTED 40004ed8: a6 10 20 00 clr %l3 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 40004edc: e8 04 20 70 ld [ %l0 + 0x70 ], %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40004ee0: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40004ee4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40004ee8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004eec: 02 80 00 08 be 40004f0c <== NOT EXECUTED 40004ef0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40004ef4: c2 05 c0 00 ld [ %l7 ], %g1 <== NOT EXECUTED 40004ef8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004efc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004f00: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004f04: 06 bf ff ae bl 40004dbc <== NOT EXECUTED 40004f08: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 40004f0c: 02 80 00 11 be 40004f50 <== NOT EXECUTED 40004f10: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40004f14: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40004f18: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 40004f1c: 40 00 05 75 call 400064f0 <== NOT EXECUTED 40004f20: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 40004f24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004f28: 02 bf ff ee be 40004ee0 <== NOT EXECUTED 40004f2c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40004f30: 30 80 00 08 b,a 40004f50 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 40004f34: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED count--; 40004f38: a4 04 bf ff add %l2, -1, %l2 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 40004f3c: c2 08 80 01 ldub [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40004f40: c2 2d 40 00 stb %g1, [ %l5 ] <== NOT EXECUTED 40004f44: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED 40004f48: aa 05 60 01 inc %l5 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40004f4c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40004f50: 22 80 00 08 be,a 40004f70 <== NOT EXECUTED 40004f54: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 40004f58: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 40004f5c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004f60: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004f64: 06 bf ff f4 bl 40004f34 <== NOT EXECUTED 40004f68: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40004f6c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 40004f70: 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; 40004f74: a4 20 40 12 sub %g1, %l2, %l2 <== NOT EXECUTED 40004f78: e4 24 60 1c st %l2, [ %l1 + 0x1c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40004f7c: 40 00 05 a4 call 4000660c <== NOT EXECUTED 40004f80: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40004f84: 81 c7 e0 08 ret <== NOT EXECUTED 40004f88: 81 e8 00 00 restore <== NOT EXECUTED 40003d6c : * 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) { 40003d6c: 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)) 40003d70: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003d74: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40003d78: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40003d7c: 12 80 00 10 bne 40003dbc <== NOT EXECUTED 40003d80: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 40003d84: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40003d88: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003d8c: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 40003d90: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003d94: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 40003d98: 7f ff f7 ed call 40001d4c <== NOT EXECUTED 40003d9c: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40003da0: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003da4: 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--; 40003da8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003dac: 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--; 40003db0: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003db4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003db8: 30 80 00 12 b,a 40003e00 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 40003dbc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003dc0: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40003dc4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003dc8: 12 80 00 12 bne 40003e10 <== NOT EXECUTED 40003dcc: 92 06 20 49 add %i0, 0x49, %o1 <== 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, 40003dd0: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40003dd4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003dd8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003ddc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 40003de0: 7f ff f7 db call 40001d4c <== NOT EXECUTED 40003de4: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40003de8: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003dec: 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--; 40003df0: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003df4: 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--; 40003df8: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003dfc: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003e00: 7f ff f7 d7 call 40001d5c <== NOT EXECUTED 40003e04: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40003e08: 81 c7 e0 08 ret <== NOT EXECUTED 40003e0c: 81 e8 00 00 restore <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 40003e10: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 40003e14: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 40003e18: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003e1c: 12 80 00 0a bne 40003e44 <== NOT EXECUTED 40003e20: 01 00 00 00 nop <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40003e24: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40003e28: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003e2c: 12 bf ff f7 bne 40003e08 <== NOT EXECUTED 40003e30: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40003e34: 40 00 09 f6 call 4000660c <== NOT EXECUTED 40003e38: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 40003e3c: 81 c7 e0 08 ret <== NOT EXECUTED 40003e40: 81 e8 00 00 restore <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 40003e44: 7f ff f7 c2 call 40001d4c <== NOT EXECUTED 40003e48: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 40003e4c: e2 06 20 90 ld [ %i0 + 0x90 ], %l1 <== NOT EXECUTED tty->t_dqlen = 0; 40003e50: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003e54: 7f ff f7 c2 call 40001d5c <== NOT EXECUTED 40003e58: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 40003e5c: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 40003e60: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 40003e64: 40 00 4e fd call 40017a58 <.urem> <== NOT EXECUTED 40003e68: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 40003e6c: 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; 40003e70: d0 24 20 84 st %o0, [ %l0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 40003e74: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003e78: 12 80 00 04 bne 40003e88 <== NOT EXECUTED 40003e7c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40003e80: 40 00 09 e3 call 4000660c <== NOT EXECUTED 40003e84: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 40003e88: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40003e8c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40003e90: 12 80 00 0b bne 40003ebc <== NOT EXECUTED 40003e94: 01 00 00 00 nop <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 40003e98: c2 04 20 d4 ld [ %l0 + 0xd4 ], %g1 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40003e9c: 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) { 40003ea0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ea4: 02 80 00 29 be 40003f48 <== NOT EXECUTED 40003ea8: b0 10 20 00 clr %i0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40003eac: d2 04 20 d8 ld [ %l0 + 0xd8 ], %o1 <== NOT EXECUTED 40003eb0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003eb4: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED 40003eb8: 30 80 00 24 b,a 40003f48 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 40003ebc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003ec0: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40003ec4: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 40003ec8: 12 80 00 0c bne 40003ef8 <== NOT EXECUTED 40003ecc: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 40003ed0: 7f ff f7 9f call 40001d4c <== NOT EXECUTED 40003ed4: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 40003ed8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40003edc: 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; 40003ee0: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40003ee4: 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; 40003ee8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40003eec: 7f ff f7 9c call 40001d5c <== NOT EXECUTED 40003ef0: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003ef4: 30 80 00 15 b,a 40003f48 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40003ef8: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40003efc: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40003f00: 08 80 00 04 bleu 40003f10 <== NOT EXECUTED 40003f04: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 40003f08: f0 04 20 88 ld [ %l0 + 0x88 ], %i0 <== NOT EXECUTED 40003f0c: 30 80 00 02 b,a 40003f14 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 40003f10: f0 04 20 80 ld [ %l0 + 0x80 ], %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)) { 40003f14: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003f18: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40003f1c: 02 80 00 03 be 40003f28 <== NOT EXECUTED 40003f20: b0 26 00 11 sub %i0, %l1, %i0 <== NOT EXECUTED 40003f24: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40003f28: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40003f2c: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40003f30: 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*/ 40003f34: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003f38: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40003f3c: c4 24 20 94 st %g2, [ %l0 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003f40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003f44: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40003f48: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40003f4c: 81 c7 e0 08 ret <== NOT EXECUTED 40003f50: 81 e8 00 00 restore <== NOT EXECUTED 40005a28 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40005a28: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005a2c: a2 07 bf f8 add %fp, -8, %l1 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 40005a30: a0 07 bf ff add %fp, -1, %l0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005a34: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40005a38: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005a3c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005a40: 40 00 01 0b call 40005e6c <== NOT EXECUTED 40005a44: 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) { 40005a48: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40005a4c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005a50: 22 80 00 07 be,a 40005a6c <== NOT EXECUTED 40005a54: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40005a58: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40005a5c: 40 00 03 65 call 400067f0 <== NOT EXECUTED 40005a60: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005a64: 10 bf ff f5 b 40005a38 <== NOT EXECUTED 40005a68: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40005a6c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005a70: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40005a74: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40005a78: 02 bf ff ef be 40005a34 <== NOT EXECUTED 40005a7c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40005a80: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40005a84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40005a88: 7f ff f9 52 call 40003fd0 <== NOT EXECUTED 40005a8c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005a90: 10 bf ff ea b 40005a38 <== NOT EXECUTED 40005a94: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40003d54 : 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); 40003d54: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40003d58: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003d5c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003d60: 40 00 08 a5 call 40005ff4 <== NOT EXECUTED 40003d64: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003d68: 01 00 00 00 nop 400059ac : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 400059ac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400059b0: 23 10 00 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400059b4: a0 07 bf fc add %fp, -4, %l0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400059b8: a2 14 62 38 or %l1, 0x238, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400059bc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400059c0: 94 10 20 00 clr %o2 <== NOT EXECUTED 400059c4: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 400059c8: 40 00 01 29 call 40005e6c <== NOT EXECUTED 400059cc: 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) { 400059d0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 400059d4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400059d8: 02 80 00 07 be 400059f4 <== NOT EXECUTED 400059dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 400059e0: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 400059e4: 40 00 03 83 call 400067f0 <== NOT EXECUTED 400059e8: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400059ec: 10 bf ff f5 b 400059c0 <== NOT EXECUTED 400059f0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400059f4: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400059f8: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400059fc: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 40005a00: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40005a04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005a08: 02 80 00 04 be 40005a18 <== NOT EXECUTED 40005a0c: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40005a10: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005a14: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40005a18: 7f ff f8 d5 call 40003d6c <== NOT EXECUTED 40005a1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005a20: 10 bf ff e8 b 400059c0 <== NOT EXECUTED 40005a24: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004a90 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40004a90: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004a94: c2 06 00 00 ld [ %i0 ], %g1 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40004a98: a2 10 00 18 mov %i0, %l1 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004a9c: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004aa0: 92 10 20 00 clr %o1 40004aa4: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 40004aa8: 40 00 06 92 call 400064f0 40004aac: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40004ab0: b0 92 20 00 orcc %o0, 0, %i0 40004ab4: 12 80 00 0f bne 40004af0 40004ab8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40004abc: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 40004ac0: 85 28 a0 05 sll %g2, 5, %g2 40004ac4: 82 10 62 38 or %g1, 0x238, %g1 40004ac8: 82 00 40 02 add %g1, %g2, %g1 40004acc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40004ad0: 80 a0 60 00 cmp %g1, 0 40004ad4: 02 80 00 09 be 40004af8 40004ad8: 92 10 00 11 mov %l1, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40004adc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004ae0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004ae4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40004ae8: 40 00 06 c9 call 4000660c <== NOT EXECUTED 40004aec: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 <== NOT EXECUTED return sc; 40004af0: 81 c7 e0 08 ret <== NOT EXECUTED 40004af4: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->termios.c_oflag & OPOST) { 40004af8: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 40004afc: d2 04 60 14 ld [ %l1 + 0x14 ], %o1 40004b00: 80 88 60 01 btst 1, %g1 40004b04: 02 80 00 0e be 40004b3c 40004b08: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 uint32_t count = args->count; 40004b0c: a6 10 00 09 mov %o1, %l3 char *buffer = args->buffer; while (count--) 40004b10: 10 80 00 06 b 40004b28 40004b14: a4 10 00 08 mov %o0, %l2 oproc (*buffer++, tty); 40004b18: a6 04 ff ff add %l3, -1, %l3 40004b1c: a4 04 a0 01 inc %l2 40004b20: 7f ff fe 3f call 4000441c 40004b24: 92 10 00 10 mov %l0, %o1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 40004b28: 80 a4 e0 00 cmp %l3, 0 40004b2c: 32 bf ff fb bne,a 40004b18 40004b30: d0 0c 80 00 ldub [ %l2 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 40004b34: 10 80 00 05 b 40004b48 40004b38: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 40004b3c: 7f ff fd ec call 400042ec <== NOT EXECUTED 40004b40: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40004b44: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 40004b48: c2 24 60 1c st %g1, [ %l1 + 0x1c ] } rtems_semaphore_release (tty->osem); 40004b4c: 40 00 06 b0 call 4000660c 40004b50: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 return sc; } 40004b54: 81 c7 e0 08 ret 40004b58: 81 e8 00 00 restore 4000824c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 4000824c: 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) 40008250: 2b 08 00 00 sethi %hi(0x20000000), %l5 <== NOT EXECUTED 40008254: aa 8e 00 15 andcc %i0, %l5, %l5 <== NOT EXECUTED 40008258: 02 80 00 11 be 4000829c <== NOT EXECUTED 4000825c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40008260: 05 10 00 9e sethi %hi(0x40027800), %g2 <== NOT EXECUTED 40008264: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 ! 40027838 <== NOT EXECUTED 40008268: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 4000826c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008270: 02 80 00 06 be 40008288 <== NOT EXECUTED 40008274: c6 20 a0 38 st %g3, [ %g2 + 0x38 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008278: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED 4000827c: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40027a20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008280: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40008284: c4 20 62 20 st %g2, [ %g1 + 0x220 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40008288: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED 4000828c: c2 00 60 38 ld [ %g1 + 0x38 ], %g1 ! 40027838 <== NOT EXECUTED 40008290: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008294: 34 80 00 5a bg,a 400083fc <== NOT EXECUTED 40008298: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 4000829c: 03 10 00 9b sethi %hi(0x40026c00), %g1 <== NOT EXECUTED 400082a0: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 40026f98 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 400082a4: 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 */ 400082a8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 400082ac: 40 00 34 5a call 40015414 <== NOT EXECUTED 400082b0: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 400082b4: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 400082b8: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 400082bc: 02 80 00 05 be 400082d0 <== NOT EXECUTED 400082c0: a6 2c 00 13 andn %l0, %l3, %l3 <== NOT EXECUTED local_errno = errno; 400082c4: 40 00 33 4b call 40014ff0 <__errno> <== NOT EXECUTED 400082c8: 01 00 00 00 nop <== NOT EXECUTED 400082cc: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 400082d0: 29 10 00 9b sethi %hi(0x40026c00), %l4 <== NOT EXECUTED 400082d4: c2 05 23 98 ld [ %l4 + 0x398 ], %g1 ! 40026f98 <_impure_ptr> <== NOT EXECUTED 400082d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400082dc: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400082e0: 40 00 4c 0a call 4001b308 <== NOT EXECUTED 400082e4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 400082e8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400082ec: 02 80 00 0c be 4000831c <== NOT EXECUTED 400082f0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 400082f4: c2 05 23 98 ld [ %l4 + 0x398 ], %g1 <== NOT EXECUTED 400082f8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400082fc: 7f ff ff cd call 40008230 <== NOT EXECUTED 40008300: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40008304: 13 10 00 94 sethi %hi(0x40025000), %o1 <== NOT EXECUTED 40008308: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 4000830c: 92 12 62 d0 or %o1, 0x2d0, %o1 <== NOT EXECUTED 40008310: 40 00 35 15 call 40015764 <== NOT EXECUTED 40008314: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008318: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED if (local_errno) 4000831c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008320: 22 80 00 1c be,a 40008390 <== NOT EXECUTED 40008324: 27 10 00 9b sethi %hi(0x40026c00), %l3 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40008328: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000832c: 04 80 00 11 ble 40008370 <== NOT EXECUTED 40008330: 03 10 00 9b sethi %hi(0x40026c00), %g1 <== NOT EXECUTED 40008334: 40 00 38 5f call 400164b0 <== NOT EXECUTED 40008338: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000833c: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40008340: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008344: 02 80 00 0b be 40008370 <== NOT EXECUTED 40008348: 03 10 00 9b sethi %hi(0x40026c00), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 4000834c: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 40026f98 <_impure_ptr> <== NOT EXECUTED 40008350: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008354: 40 00 38 57 call 400164b0 <== NOT EXECUTED 40008358: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 4000835c: 13 10 00 94 sethi %hi(0x40025000), %o1 <== NOT EXECUTED 40008360: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008364: 92 12 62 e0 or %o1, 0x2e0, %o1 <== NOT EXECUTED 40008368: 10 80 00 07 b 40008384 <== NOT EXECUTED 4000836c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40008370: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 <== NOT EXECUTED 40008374: 13 10 00 94 sethi %hi(0x40025000), %o1 <== NOT EXECUTED 40008378: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 4000837c: 92 12 62 f0 or %o1, 0x2f0, %o1 <== NOT EXECUTED 40008380: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40008384: 40 00 34 f8 call 40015764 <== NOT EXECUTED 40008388: 27 10 00 9b sethi %hi(0x40026c00), %l3 <== NOT EXECUTED 4000838c: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40008390: c2 04 e3 98 ld [ %l3 + 0x398 ], %g1 <== NOT EXECUTED 40008394: 13 10 00 94 sethi %hi(0x40025000), %o1 <== NOT EXECUTED 40008398: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 4000839c: 40 00 34 f2 call 40015764 <== NOT EXECUTED 400083a0: 92 12 61 e8 or %o1, 0x1e8, %o1 <== NOT EXECUTED (void) fflush(stderr); 400083a4: c2 04 e3 98 ld [ %l3 + 0x398 ], %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"); 400083a8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED (void) fflush(stderr); 400083ac: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400083b0: 40 00 34 19 call 40015414 <== NOT EXECUTED 400083b4: b0 06 00 12 add %i0, %l2, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 400083b8: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 400083bc: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 400083c0: 02 80 00 0f be 400083fc <== NOT EXECUTED 400083c4: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 400083c8: 22 80 00 08 be,a 400083e8 <== NOT EXECUTED 400083cc: 13 10 00 94 sethi %hi(0x40025000), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 400083d0: 13 10 00 94 sethi %hi(0x40025000), %o1 <== NOT EXECUTED 400083d4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400083d8: 40 00 00 18 call 40008438 <== NOT EXECUTED 400083dc: 92 12 63 08 or %o1, 0x308, %o1 <== NOT EXECUTED _exit(local_errno); 400083e0: 40 00 02 e8 call 40008f80 <_exit> <== NOT EXECUTED 400083e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 400083e8: 90 10 20 00 clr %o0 <== NOT EXECUTED 400083ec: 40 00 00 13 call 40008438 <== NOT EXECUTED 400083f0: 92 12 63 20 or %o1, 0x320, %o1 <== NOT EXECUTED abort(); 400083f4: 40 00 32 f1 call 40014fb8 <== NOT EXECUTED 400083f8: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 400083fc: 81 c7 e0 08 ret <== NOT EXECUTED 40008400: 81 e8 00 00 restore <== NOT EXECUTED 400275b8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400275b8: 9d e3 bf a0 save %sp, -96, %sp 400275bc: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400275c0: 2b 10 01 94 sethi %hi(0x40065000), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 400275c4: 29 10 01 94 sethi %hi(0x40065000), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400275c8: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400275cc: aa 15 63 40 or %l5, 0x340, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 400275d0: a8 15 23 30 or %l4, 0x330, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400275d4: a2 10 20 00 clr %l1 400275d8: a0 10 20 00 clr %l0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400275dc: c2 06 20 04 ld [ %i0 + 4 ], %g1 400275e0: 82 00 7f ff add %g1, -1, %g1 400275e4: 80 a0 60 00 cmp %g1, 0 400275e8: 16 80 00 07 bge 40027604 400275ec: c2 26 20 04 st %g1, [ %i0 + 4 ] 400275f0: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 400275f4: 40 00 74 91 call 40044838 <__srget_r> <== NOT EXECUTED 400275f8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400275fc: 10 80 00 06 b 40027614 <== NOT EXECUTED 40027600: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40027604: c2 06 00 00 ld [ %i0 ], %g1 40027608: 84 00 60 01 add %g1, 1, %g2 4002760c: e4 08 40 00 ldub [ %g1 ], %l2 40027610: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') 40027614: 80 a4 a0 3a cmp %l2, 0x3a 40027618: 02 80 00 22 be 400276a0 4002761c: 80 a4 60 00 cmp %l1, 0 break; if (sign == 0) { 40027620: 32 80 00 09 bne,a 40027644 40027624: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 40027628: 80 a4 a0 2d cmp %l2, 0x2d 4002762c: 12 80 00 05 bne 40027640 40027630: a2 10 20 01 mov 1, %l1 sign = -1; limit++; 40027634: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 40027638: 10 bf ff e9 b 400275dc <== NOT EXECUTED 4002763c: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 40027640: c2 05 00 00 ld [ %l4 ], %g1 40027644: 82 00 40 12 add %g1, %l2, %g1 40027648: c2 08 60 01 ldub [ %g1 + 1 ], %g1 4002764c: 80 88 60 04 btst 4, %g1 40027650: 02 80 00 1c be 400276c0 40027654: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 40027658: 40 00 bf f2 call 40057620 <.udiv> 4002765c: 92 10 20 0a mov 0xa, %o1 40027660: 80 a4 00 08 cmp %l0, %o0 40027664: 18 80 00 17 bgu 400276c0 40027668: 01 00 00 00 nop 4002766c: 12 80 00 08 bne 4002768c 40027670: a4 04 bf d0 add %l2, -48, %l2 40027674: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40027678: 40 00 c0 96 call 400578d0 <.urem> <== NOT EXECUTED 4002767c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40027680: 80 a4 80 08 cmp %l2, %o0 <== NOT EXECUTED 40027684: 18 80 00 0f bgu 400276c0 <== NOT EXECUTED 40027688: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 4002768c: 83 2c 20 03 sll %l0, 3, %g1 40027690: a1 2c 20 01 sll %l0, 1, %l0 40027694: a0 04 00 01 add %l0, %g1, %l0 40027698: 10 bf ff d1 b 400275dc 4002769c: a0 04 80 10 add %l2, %l0, %l0 } if (sign == 0) 400276a0: 02 80 00 08 be 400276c0 400276a4: 90 10 00 11 mov %l1, %o0 return 0; *val = i * sign; 400276a8: 92 10 00 10 mov %l0, %o1 400276ac: 7f ff 6e d1 call 400031f0 <.umul> 400276b0: b0 10 20 01 mov 1, %i0 400276b4: d0 26 40 00 st %o0, [ %i1 ] return 1; 400276b8: 81 c7 e0 08 ret 400276bc: 81 e8 00 00 restore } 400276c0: 81 c7 e0 08 ret <== NOT EXECUTED 400276c4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400276c8 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 400276c8: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 400276cc: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 400276d0: 21 10 01 94 sethi %hi(0x40065000), %l0 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 400276d4: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 400276d8: a0 14 23 40 or %l0, 0x340, %l0 400276dc: c2 06 20 04 ld [ %i0 + 4 ], %g1 400276e0: 82 00 7f ff add %g1, -1, %g1 400276e4: 80 a0 60 00 cmp %g1, 0 400276e8: 16 80 00 07 bge 40027704 400276ec: c2 26 20 04 st %g1, [ %i0 + 4 ] 400276f0: d0 04 00 00 ld [ %l0 ], %o0 400276f4: 40 00 74 51 call 40044838 <__srget_r> 400276f8: 92 10 00 18 mov %i0, %o1 if (c == ':') { 400276fc: 10 80 00 07 b 40027718 40027700: 80 a2 20 3a cmp %o0, 0x3a { int c; *name = *bufp; for (;;) { c = getc(fp); 40027704: c2 06 00 00 ld [ %i0 ], %g1 40027708: 84 00 60 01 add %g1, 1, %g2 4002770c: d0 08 40 00 ldub [ %g1 ], %o0 40027710: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') { 40027714: 80 a2 20 3a cmp %o0, 0x3a 40027718: 12 80 00 07 bne 40027734 4002771c: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 40027720: 80 a7 20 00 cmp %i4, 0 40027724: 22 80 00 1a be,a 4002778c 40027728: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 4002772c: 81 c7 e0 08 ret <== NOT EXECUTED 40027730: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 40027734: 12 80 00 07 bne 40027750 40027738: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) 4002773c: 80 a7 20 00 cmp %i4, 0 40027740: 32 80 00 13 bne,a 4002778c 40027744: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40027748: 81 c7 e0 08 ret <== NOT EXECUTED 4002774c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 40027750: 22 80 00 17 be,a 400277ac 40027754: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 40027758: c2 06 c0 00 ld [ %i3 ], %g1 4002775c: 80 a0 60 01 cmp %g1, 1 40027760: 28 80 00 13 bleu,a 400277ac 40027764: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 40027768: c2 06 80 00 ld [ %i2 ], %g1 4002776c: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 40027770: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 40027774: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40027778: 84 00 a0 01 inc %g2 --(*nleft); 4002777c: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40027780: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); } 40027784: 10 bf ff d6 b 400276dc 40027788: c2 26 c0 00 st %g1, [ %i3 ] **bufp = '\0'; 4002778c: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 40027790: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 40027794: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40027798: 84 00 a0 01 inc %g2 --(*nleft); 4002779c: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 400277a0: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 400277a4: c2 26 c0 00 st %g1, [ %i3 ] 400277a8: b0 10 20 01 mov 1, %i0 return 1; } 400277ac: 81 c7 e0 08 ret 400277b0: 81 e8 00 00 restore 400277b4 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400277b4: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400277b8: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400277bc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 400277c0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400277c4: a2 07 a0 4c add %fp, 0x4c, %l1 400277c8: a0 07 a0 50 add %fp, 0x50, %l0 400277cc: 90 10 00 18 mov %i0, %o0 400277d0: 92 10 00 19 mov %i1, %o1 400277d4: 94 10 00 11 mov %l1, %o2 400277d8: 7f ff ff bc call 400276c8 400277dc: 96 10 00 10 mov %l0, %o3 400277e0: 80 a2 20 00 cmp %o0, 0 400277e4: 02 80 00 41 be 400278e8 400277e8: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 400277ec: 92 06 60 04 add %i1, 4, %o1 400277f0: 94 10 00 11 mov %l1, %o2 400277f4: 96 10 00 10 mov %l0, %o3 400277f8: 7f ff ff b4 call 400276c8 400277fc: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027800: 80 a2 20 00 cmp %o0, 0 40027804: 02 80 00 39 be 400278e8 40027808: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 4002780c: 7f ff ff 6b call 400275b8 40027810: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027814: 80 a2 20 00 cmp %o0, 0 40027818: 02 80 00 34 be 400278e8 4002781c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 40027820: 94 10 00 11 mov %l1, %o2 40027824: 96 10 00 10 mov %l0, %o3 40027828: 92 07 bf f8 add %fp, -8, %o1 4002782c: 7f ff ff a7 call 400276c8 40027830: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027834: 80 a2 20 00 cmp %o0, 0 40027838: 02 80 00 2c be 400278e8 4002783c: c2 07 bf fc ld [ %fp + -4 ], %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027840: c6 07 bf f8 ld [ %fp + -8 ], %g3 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; 40027844: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027848: 84 10 00 03 mov %g3, %g2 4002784c: 10 80 00 05 b 40027860 40027850: 82 10 20 01 mov 1, %g1 if(*cp == ',') memcount++; 40027854: 88 19 20 2c xor %g4, 0x2c, %g4 40027858: 80 a0 00 04 cmp %g0, %g4 4002785c: 82 60 7f ff subx %g1, -1, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027860: c8 48 80 00 ldsb [ %g2 ], %g4 40027864: 80 a1 20 00 cmp %g4, 0 40027868: 12 bf ff fb bne 40027854 4002786c: 84 00 a0 01 inc %g2 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 40027870: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 40027874: 83 28 60 02 sll %g1, 2, %g1 40027878: 82 00 60 13 add %g1, 0x13, %g1 4002787c: 80 a0 80 01 cmp %g2, %g1 40027880: 0a 80 00 1a bcs 400278e8 40027884: c2 07 a0 4c ld [ %fp + 0x4c ], %g1 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40027888: 84 10 20 01 mov 1, %g2 /* * 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); 4002788c: 82 00 60 0f add %g1, 0xf, %g1 40027890: 82 08 7f f0 and %g1, -16, %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40027894: c6 20 40 00 st %g3, [ %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); 40027898: c2 26 60 0c st %g1, [ %i1 + 0xc ] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4002789c: 10 80 00 09 b 400278c0 400278a0: c2 07 bf f8 ld [ %fp + -8 ], %g1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 400278a4: 32 80 00 08 bne,a 400278c4 400278a8: 82 00 60 01 inc %g1 *cp = '\0'; 400278ac: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 400278b0: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 400278b4: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 400278b8: 84 00 a0 01 inc %g2 <== NOT EXECUTED 400278bc: c2 21 00 03 st %g1, [ %g4 + %g3 ] <== NOT EXECUTED 400278c0: 82 00 60 01 inc %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 400278c4: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 400278c8: 80 a0 e0 00 cmp %g3, 0 400278cc: 32 bf ff f6 bne,a 400278a4 400278d0: 80 a0 e0 2c cmp %g3, 0x2c if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 400278d4: c2 06 60 0c ld [ %i1 + 0xc ], %g1 400278d8: 85 28 a0 02 sll %g2, 2, %g2 400278dc: c0 20 40 02 clr [ %g1 + %g2 ] return 1; 400278e0: 81 c7 e0 08 ret 400278e4: 91 e8 20 01 restore %g0, 1, %o0 } 400278e8: 81 c7 e0 08 ret <== NOT EXECUTED 400278ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40027938 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40027938: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4002793c: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40027940: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40027944: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027948: a2 07 a0 4c add %fp, 0x4c, %l1 4002794c: a0 07 a0 50 add %fp, 0x50, %l0 40027950: 90 10 00 18 mov %i0, %o0 40027954: 92 10 00 19 mov %i1, %o1 40027958: 94 10 00 11 mov %l1, %o2 4002795c: 7f ff ff 5b call 400276c8 40027960: 96 10 00 10 mov %l0, %o3 40027964: 80 a2 20 00 cmp %o0, 0 40027968: 02 80 00 39 be 40027a4c 4002796c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 40027970: 92 06 60 04 add %i1, 4, %o1 40027974: 94 10 00 11 mov %l1, %o2 40027978: 96 10 00 10 mov %l0, %o3 4002797c: 7f ff ff 53 call 400276c8 40027980: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027984: 80 a2 20 00 cmp %o0, 0 40027988: 02 80 00 31 be 40027a4c 4002798c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 40027990: 7f ff ff 0a call 400275b8 40027994: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027998: 80 a2 20 00 cmp %o0, 0 4002799c: 02 80 00 2c be 40027a4c 400279a0: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 400279a4: 7f ff ff 05 call 400275b8 400279a8: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 400279ac: 80 a2 20 00 cmp %o0, 0 400279b0: 02 80 00 27 be 40027a4c 400279b4: 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) 400279b8: 92 06 60 0c add %i1, 0xc, %o1 400279bc: 94 10 00 11 mov %l1, %o2 400279c0: 96 10 00 10 mov %l0, %o3 400279c4: 7f ff ff 41 call 400276c8 400279c8: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 400279cc: 80 a2 20 00 cmp %o0, 0 400279d0: 02 80 00 1f be 40027a4c 400279d4: 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) 400279d8: 92 06 60 10 add %i1, 0x10, %o1 400279dc: 94 10 00 11 mov %l1, %o2 400279e0: 96 10 00 10 mov %l0, %o3 400279e4: 7f ff ff 39 call 400276c8 400279e8: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 400279ec: 80 a2 20 00 cmp %o0, 0 400279f0: 02 80 00 17 be 40027a4c 400279f4: 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) 400279f8: 92 06 60 14 add %i1, 0x14, %o1 400279fc: 94 10 00 11 mov %l1, %o2 40027a00: 96 10 00 10 mov %l0, %o3 40027a04: 7f ff ff 31 call 400276c8 40027a08: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027a0c: 80 a2 20 00 cmp %o0, 0 40027a10: 02 80 00 0f be 40027a4c 40027a14: 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)) 40027a18: 94 10 00 11 mov %l1, %o2 40027a1c: 96 10 00 10 mov %l0, %o3 40027a20: 92 06 60 18 add %i1, 0x18, %o1 40027a24: 7f ff ff 29 call 400276c8 40027a28: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027a2c: 80 a2 20 00 cmp %o0, 0 40027a30: 02 80 00 07 be 40027a4c 40027a34: 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; 40027a38: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 40027a3c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40027a40: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 40027a44: 81 c7 e0 08 ret 40027a48: 91 e8 20 01 restore %g0, 1, %o0 } 40027a4c: 81 c7 e0 08 ret <== NOT EXECUTED 40027a50: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40027554 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40027554: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40027558: c2 00 63 58 ld [ %g1 + 0x358 ], %g1 ! 40064b58 <== NOT EXECUTED 4002755c: d0 30 60 32 sth %o0, [ %g1 + 0x32 ] <== NOT EXECUTED return 0; } 40027560: 81 c3 e0 08 retl <== NOT EXECUTED 40027564: 90 10 20 00 clr %o0 <== NOT EXECUTED 40027b74 : return NULL; return &grent; } void setgrent(void) { 40027b74: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 40027b78: 7f ff ff c9 call 40027a9c <== NOT EXECUTED 40027b7c: 01 00 00 00 nop <== NOT EXECUTED if (group_fp != NULL) 40027b80: 03 10 01 a1 sethi %hi(0x40068400), %g1 <== NOT EXECUTED 40027b84: d0 00 62 5c ld [ %g1 + 0x25c ], %o0 ! 4006865c <== NOT EXECUTED 40027b88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027b8c: 22 80 00 05 be,a 40027ba0 <== NOT EXECUTED 40027b90: 11 10 01 68 sethi %hi(0x4005a000), %o0 <== NOT EXECUTED fclose(group_fp); 40027b94: 40 00 5d b1 call 4003f258 <== NOT EXECUTED 40027b98: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 40027b9c: 11 10 01 68 sethi %hi(0x4005a000), %o0 <== NOT EXECUTED 40027ba0: 13 10 01 90 sethi %hi(0x40064000), %o1 <== NOT EXECUTED 40027ba4: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED 40027ba8: 40 00 5f fb call 4003fb94 <== NOT EXECUTED 40027bac: 92 12 63 48 or %o1, 0x348, %o1 <== NOT EXECUTED 40027bb0: 03 10 01 a1 sethi %hi(0x40068400), %g1 <== NOT EXECUTED 40027bb4: d0 20 62 5c st %o0, [ %g1 + 0x25c ] ! 4006865c <== NOT EXECUTED } 40027bb8: 81 c7 e0 08 ret <== NOT EXECUTED 40027bbc: 81 e8 00 00 restore <== NOT EXECUTED 40027d68 : return NULL; return &pwent; } void setpwent(void) { 40027d68: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 40027d6c: 7f ff ff 4c call 40027a9c <== NOT EXECUTED 40027d70: 01 00 00 00 nop <== NOT EXECUTED if (passwd_fp != NULL) 40027d74: 03 10 01 a1 sethi %hi(0x40068400), %g1 <== NOT EXECUTED 40027d78: d0 00 61 74 ld [ %g1 + 0x174 ], %o0 ! 40068574 <== NOT EXECUTED 40027d7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027d80: 22 80 00 05 be,a 40027d94 <== NOT EXECUTED 40027d84: 11 10 01 68 sethi %hi(0x4005a000), %o0 <== NOT EXECUTED fclose(passwd_fp); 40027d88: 40 00 5d 34 call 4003f258 <== NOT EXECUTED 40027d8c: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 40027d90: 11 10 01 68 sethi %hi(0x4005a000), %o0 <== NOT EXECUTED 40027d94: 13 10 01 90 sethi %hi(0x40064000), %o1 <== NOT EXECUTED 40027d98: 90 12 22 70 or %o0, 0x270, %o0 <== NOT EXECUTED 40027d9c: 40 00 5f 7e call 4003fb94 <== NOT EXECUTED 40027da0: 92 12 63 48 or %o1, 0x348, %o1 <== NOT EXECUTED 40027da4: 03 10 01 a1 sethi %hi(0x40068400), %g1 <== NOT EXECUTED 40027da8: d0 20 61 74 st %o0, [ %g1 + 0x174 ] ! 40068574 <== NOT EXECUTED } 40027dac: 81 c7 e0 08 ret <== NOT EXECUTED 40027db0: 81 e8 00 00 restore <== NOT EXECUTED 40007d5c : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40007d5c: 03 10 01 92 sethi %hi(0x40064800), %g1 <== NOT EXECUTED 40007d60: c2 00 63 58 ld [ %g1 + 0x358 ], %g1 ! 40064b58 <== NOT EXECUTED 40007d64: d0 30 60 30 sth %o0, [ %g1 + 0x30 ] <== NOT EXECUTED return 0; } 40007d68: 81 c3 e0 08 retl <== NOT EXECUTED 40007d6c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40004a40 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40004a40: 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)) { 40004a44: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004a48: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40004a4c: 02 80 00 0e be 40004a84 <== NOT EXECUTED 40004a50: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004a54: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED 40004a58: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004a5c: 40 00 06 a5 call 400064f0 <== NOT EXECUTED 40004a60: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40004a64: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40004a68: 7f ff ff 7f call 40004864 <== NOT EXECUTED 40004a6c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004a70: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40004a74: 40 00 06 e6 call 4000660c <== NOT EXECUTED 40004a78: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40004a7c: 81 c7 e0 08 ret <== NOT EXECUTED 40004a80: 81 e8 00 00 restore <== 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); 40004a84: 7f ff ff 78 call 40004864 <== NOT EXECUTED 40004a88: 81 e8 00 00 restore <== NOT EXECUTED 40004a8c: 01 00 00 00 nop 40009394 : int _STAT_NAME( const char *path, struct stat *buf ) { 40009394: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40009398: 80 a6 60 00 cmp %i1, 0 4000939c: 12 80 00 06 bne 400093b4 400093a0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 400093a4: 40 00 d7 55 call 4003f0f8 <__errno> 400093a8: b0 10 3f ff mov -1, %i0 ! ffffffff 400093ac: 10 80 00 20 b 4000942c 400093b0: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, strlen( path ), 400093b4: 40 00 f2 7c call 40045da4 400093b8: 90 10 00 18 mov %i0, %o0 400093bc: a0 07 bf ec add %fp, -20, %l0 400093c0: 92 10 00 08 mov %o0, %o1 400093c4: 94 10 20 00 clr %o2 400093c8: 90 10 00 18 mov %i0, %o0 400093cc: 96 10 00 10 mov %l0, %o3 400093d0: 98 10 20 01 mov 1, %o4 400093d4: 7f ff f9 e8 call 40007b74 400093d8: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 400093dc: 80 a2 20 00 cmp %o0, 0 400093e0: 12 80 00 14 bne 40009430 400093e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 400093e8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 400093ec: 80 a0 60 00 cmp %g1, 0 400093f0: 12 80 00 12 bne 40009438 400093f4: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 400093f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400093fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009400: 02 80 00 08 be 40009420 <== NOT EXECUTED 40009404: 01 00 00 00 nop <== NOT EXECUTED 40009408: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000940c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009410: 02 80 00 04 be 40009420 <== NOT EXECUTED 40009414: 01 00 00 00 nop <== NOT EXECUTED 40009418: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000941c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009420: 40 00 d7 36 call 4003f0f8 <__errno> <== NOT EXECUTED 40009424: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009428: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000942c: c2 22 00 00 st %g1, [ %o0 ] 40009430: 81 c7 e0 08 ret 40009434: 81 e8 00 00 restore /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40009438: 94 10 20 48 mov 0x48, %o2 4000943c: 40 00 e4 95 call 40042690 40009440: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 40009444: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009448: 92 10 00 19 mov %i1, %o1 4000944c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40009450: 9f c0 40 00 call %g1 40009454: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40009458: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000945c: 80 a0 60 00 cmp %g1, 0 40009460: 02 bf ff f4 be 40009430 40009464: b0 10 00 08 mov %o0, %i0 40009468: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000946c: 80 a0 60 00 cmp %g1, 0 40009470: 02 80 00 04 be 40009480 40009474: 01 00 00 00 nop 40009478: 9f c0 40 00 call %g1 4000947c: 90 10 00 10 mov %l0, %o0 return status; } 40009480: 81 c7 e0 08 ret 40009484: 81 e8 00 00 restore 40028af8 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 40028af8: 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 ) ) 40028afc: 40 00 74 aa call 40045da4 <== NOT EXECUTED 40028b00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028b04: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40028b08: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40028b0c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40028b10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028b14: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40028b18: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40028b1c: 7f ff 7c 16 call 40007b74 <== NOT EXECUTED 40028b20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028b24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028b28: 12 80 00 0b bne 40028b54 <== NOT EXECUTED 40028b2c: e2 07 bf fc ld [ %fp + -4 ], %l1 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; 40028b30: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 <== NOT EXECUTED 40028b34: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 40028b38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028b3c: 12 80 00 08 bne 40028b5c <== NOT EXECUTED 40028b40: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028b44: 40 00 59 6d call 4003f0f8 <__errno> <== NOT EXECUTED 40028b48: 01 00 00 00 nop <== NOT EXECUTED 40028b4c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40028b50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028b54: 81 c7 e0 08 ret <== NOT EXECUTED 40028b58: 81 e8 00 00 restore <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 40028b5c: 94 10 20 38 mov 0x38, %o2 <== NOT EXECUTED 40028b60: 40 00 66 cc call 40042690 <== NOT EXECUTED 40028b64: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 40028b68: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 <== NOT EXECUTED 40028b6c: 90 04 60 1c add %l1, 0x1c, %o0 <== NOT EXECUTED 40028b70: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 40028b74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028b78: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40028b7c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40028b80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028b84: 02 bf ff f4 be 40028b54 <== NOT EXECUTED 40028b88: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40028b8c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028b90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028b94: 02 80 00 04 be 40028ba4 <== NOT EXECUTED 40028b98: 01 00 00 00 nop <== NOT EXECUTED 40028b9c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028ba0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 40028ba4: 81 c7 e0 08 ret <== NOT EXECUTED 40028ba8: 81 e8 00 00 restore <== NOT EXECUTED 40028bac : int symlink( const char *actualpath, const char *sympath ) { 40028bac: 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 ); 40028bb0: c2 4e 40 00 ldsb [ %i1 ], %g1 40028bb4: 80 a0 60 5c cmp %g1, 0x5c 40028bb8: 02 80 00 07 be 40028bd4 40028bbc: a0 10 00 18 mov %i0, %l0 40028bc0: 80 a0 60 2f cmp %g1, 0x2f 40028bc4: 02 80 00 04 be 40028bd4 40028bc8: 80 a0 60 00 cmp %g1, 0 40028bcc: 12 80 00 0a bne 40028bf4 40028bd0: 03 10 01 92 sethi %hi(0x40064800), %g1 40028bd4: 03 10 01 92 sethi %hi(0x40064800), %g1 40028bd8: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 ! 40064b58 40028bdc: 90 07 bf e8 add %fp, -24, %o0 40028be0: 92 02 60 18 add %o1, 0x18, %o1 40028be4: 40 00 66 18 call 40042444 40028be8: 94 10 20 14 mov 0x14, %o2 40028bec: 10 80 00 08 b 40028c0c 40028bf0: 90 10 20 01 mov 1, %o0 40028bf4: d2 00 63 58 ld [ %g1 + 0x358 ], %o1 40028bf8: 90 07 bf e8 add %fp, -24, %o0 40028bfc: 92 02 60 04 add %o1, 4, %o1 40028c00: 40 00 66 11 call 40042444 40028c04: 94 10 20 14 mov 0x14, %o2 40028c08: 90 10 20 00 clr %o0 if ( !loc.ops->evalformake_h ) { 40028c0c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028c10: c2 00 60 04 ld [ %g1 + 4 ], %g1 40028c14: 80 a0 60 00 cmp %g1, 0 40028c18: 02 80 00 14 be 40028c68 40028c1c: 90 06 40 08 add %i1, %o0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 40028c20: 94 07 bf fc add %fp, -4, %o2 40028c24: b2 07 bf e8 add %fp, -24, %i1 if ( result != 0 ) 40028c28: b0 10 3f ff mov -1, %i0 if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 40028c2c: 9f c0 40 00 call %g1 40028c30: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) 40028c34: 80 a2 20 00 cmp %o0, 0 40028c38: 12 80 00 10 bne 40028c78 40028c3c: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 40028c40: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 40028c44: 80 a0 60 00 cmp %g1, 0 40028c48: 12 80 00 0e bne 40028c80 40028c4c: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &loc ); 40028c50: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40028c54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028c58: 02 80 00 04 be 40028c68 <== NOT EXECUTED 40028c5c: 01 00 00 00 nop <== NOT EXECUTED 40028c60: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028c64: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028c68: 40 00 59 24 call 4003f0f8 <__errno> <== NOT EXECUTED 40028c6c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028c70: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028c74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028c78: 81 c7 e0 08 ret 40028c7c: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40028c80: 92 10 00 10 mov %l0, %o1 40028c84: 9f c0 40 00 call %g1 40028c88: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 40028c8c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028c90: 80 a0 60 00 cmp %g1, 0 40028c94: 02 bf ff f9 be 40028c78 40028c98: b0 10 00 08 mov %o0, %i0 40028c9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028ca0: 80 a0 60 00 cmp %g1, 0 40028ca4: 02 80 00 04 be 40028cb4 40028ca8: 01 00 00 00 nop 40028cac: 9f c0 40 00 call %g1 40028cb0: 90 10 00 19 mov %i1, %o0 return result; } 40028cb4: 81 c7 e0 08 ret 40028cb8: 81 e8 00 00 restore 40012b80 : int tcsetattr( int fd, int opt, struct termios *tp ) { 40012b80: 9d e3 bf a0 save %sp, -96, %sp switch (opt) { 40012b84: 80 a6 60 00 cmp %i1, 0 40012b88: 02 80 00 10 be 40012bc8 40012b8c: 80 a6 60 01 cmp %i1, 1 40012b90: 02 80 00 08 be 40012bb0 <== NOT EXECUTED 40012b94: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40012b98: 40 00 0f 64 call 40016928 <__errno> <== NOT EXECUTED 40012b9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012ba0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40012ba4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012ba8: 81 c7 e0 08 ret <== NOT EXECUTED 40012bac: 81 e8 00 00 restore <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 40012bb0: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40012bb4: 40 00 0b d3 call 40015b00 <== NOT EXECUTED 40012bb8: 94 10 20 00 clr %o2 <== NOT EXECUTED 40012bbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012bc0: 26 80 00 04 bl,a 40012bd0 <== NOT EXECUTED 40012bc4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40012bc8: 40 00 0b ce call 40015b00 40012bcc: 93 e8 20 02 restore %g0, 2, %o1 } } 40012bd0: 81 c7 e0 08 ret <== NOT EXECUTED 40012bd4: 81 e8 00 00 restore <== NOT EXECUTED 4000de24 : #include int unlink( const char *path ) { 4000de24: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4000de28: 7f ff d4 40 call 40002f28 4000de2c: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 4000de30: a6 92 20 00 orcc %o0, 0, %l3 4000de34: 32 80 00 17 bne,a 4000de90 4000de38: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4000de3c: c2 4e 00 00 ldsb [ %i0 ], %g1 4000de40: 80 a0 60 5c cmp %g1, 0x5c 4000de44: 02 80 00 06 be 4000de5c 4000de48: 80 a0 60 2f cmp %g1, 0x2f 4000de4c: 02 80 00 04 be 4000de5c 4000de50: 80 a0 60 00 cmp %g1, 0 4000de54: 12 80 00 07 bne 4000de70 <== NOT EXECUTED 4000de58: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED 4000de5c: 03 10 00 6e sethi %hi(0x4001b800), %g1 4000de60: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 4001b8f8 4000de64: 90 07 bf ec add %fp, -20, %o0 4000de68: 10 80 00 05 b 4000de7c 4000de6c: 92 02 60 18 add %o1, 0x18, %o1 4000de70: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 <== NOT EXECUTED 4000de74: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 4000de78: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 4000de7c: 94 10 20 14 mov 0x14, %o2 4000de80: 40 00 02 f4 call 4000ea50 4000de84: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000de88: 10 80 00 0b b 4000deb4 4000de8c: 94 10 20 14 mov 0x14, %o2 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4000de90: 92 10 00 13 mov %l3, %o1 4000de94: 94 10 20 02 mov 2, %o2 4000de98: 96 07 bf ec add %fp, -20, %o3 4000de9c: 7f ff d4 71 call 40003060 4000dea0: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4000dea4: 80 a2 20 00 cmp %o0, 0 4000dea8: 12 80 00 82 bne 4000e0b0 4000deac: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000deb0: 94 10 20 14 mov 0x14, %o2 4000deb4: a0 07 bf d8 add %fp, -40, %l0 4000deb8: a4 07 bf ec add %fp, -20, %l2 4000debc: 90 10 00 10 mov %l0, %o0 4000dec0: 40 00 02 e4 call 4000ea50 4000dec4: 92 10 00 12 mov %l2, %o1 name = path + parentpathlen; 4000dec8: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000decc: 40 00 04 5d call 4000f040 4000ded0: 90 10 00 18 mov %i0, %o0 4000ded4: 92 10 00 08 mov %o0, %o1 4000ded8: 7f ff d4 02 call 40002ee0 4000dedc: 90 10 00 18 mov %i0, %o0 4000dee0: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000dee4: 40 00 04 57 call 4000f040 4000dee8: 90 10 00 18 mov %i0, %o0 4000deec: 94 10 20 00 clr %o2 4000def0: 92 10 00 08 mov %o0, %o1 4000def4: 96 10 00 10 mov %l0, %o3 4000def8: 90 10 00 18 mov %i0, %o0 4000defc: 7f ff d4 1d call 40002f70 4000df00: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000df04: 80 a2 20 00 cmp %o0, 0 4000df08: 02 80 00 11 be 4000df4c 4000df0c: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 4000df10: 80 8c 60 ff btst 0xff, %l1 4000df14: 02 80 00 0c be 4000df44 4000df18: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 4000df1c: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000df20: 80 a0 60 00 cmp %g1, 0 4000df24: 02 80 00 64 be 4000e0b4 4000df28: 01 00 00 00 nop 4000df2c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000df30: 80 a0 60 00 cmp %g1, 0 4000df34: 02 80 00 04 be 4000df44 4000df38: 90 10 00 12 mov %l2, %o0 4000df3c: 9f c0 40 00 call %g1 4000df40: 01 00 00 00 nop 4000df44: 81 c7 e0 08 ret 4000df48: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 4000df4c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000df50: 80 a0 60 00 cmp %g1, 0 4000df54: 22 80 00 26 be,a 4000dfec 4000df58: 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 ) { 4000df5c: 9f c0 40 00 call %g1 4000df60: 90 10 00 10 mov %l0, %o0 4000df64: 80 a2 20 01 cmp %o0, 1 4000df68: 12 80 00 1c bne 4000dfd8 4000df6c: c4 07 bf e4 ld [ %fp + -28 ], %g2 rtems_filesystem_freenode( &loc ); 4000df70: 80 a0 a0 00 cmp %g2, 0 4000df74: 02 80 00 09 be 4000df98 4000df78: 80 8c 60 ff btst 0xff, %l1 4000df7c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000df80: 80 a0 60 00 cmp %g1, 0 4000df84: 02 80 00 05 be 4000df98 4000df88: 80 8c 60 ff btst 0xff, %l1 4000df8c: 9f c0 40 00 call %g1 4000df90: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000df94: 80 8c 60 ff btst 0xff, %l1 4000df98: 02 80 00 0c be 4000dfc8 4000df9c: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 4000dfa0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000dfa4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dfa8: 02 80 00 08 be 4000dfc8 <== NOT EXECUTED 4000dfac: 01 00 00 00 nop <== NOT EXECUTED 4000dfb0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000dfb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dfb8: 02 80 00 04 be 4000dfc8 <== NOT EXECUTED 4000dfbc: 01 00 00 00 nop <== NOT EXECUTED 4000dfc0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000dfc4: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4000dfc8: 40 00 00 67 call 4000e164 <__errno> 4000dfcc: b0 10 3f ff mov -1, %i0 4000dfd0: 10 80 00 1b b 4000e03c 4000dfd4: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 4000dfd8: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000dfdc: 80 a0 60 00 cmp %g1, 0 4000dfe0: 12 80 00 1a bne 4000e048 4000dfe4: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 4000dfe8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000dfec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dff0: 02 80 00 05 be 4000e004 <== NOT EXECUTED 4000dff4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000dff8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000dffc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 4000e000: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000e004: 02 80 00 0b be 4000e030 <== NOT EXECUTED 4000e008: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4000e00c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e010: 02 80 00 08 be 4000e030 <== NOT EXECUTED 4000e014: 01 00 00 00 nop <== NOT EXECUTED 4000e018: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000e01c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e020: 02 80 00 04 be 4000e030 <== NOT EXECUTED 4000e024: 01 00 00 00 nop <== NOT EXECUTED 4000e028: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000e02c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000e030: 40 00 00 4d call 4000e164 <__errno> <== NOT EXECUTED 4000e034: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000e038: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000e03c: c2 22 00 00 st %g1, [ %o0 ] 4000e040: 81 c7 e0 08 ret 4000e044: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4000e048: 9f c0 40 00 call %g1 4000e04c: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 4000e050: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000e054: 80 a0 60 00 cmp %g1, 0 4000e058: 02 80 00 08 be 4000e078 4000e05c: b0 10 00 08 mov %o0, %i0 4000e060: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000e064: 80 a0 60 00 cmp %g1, 0 4000e068: 02 80 00 05 be 4000e07c 4000e06c: 80 8c 60 ff btst 0xff, %l1 4000e070: 9f c0 40 00 call %g1 4000e074: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000e078: 80 8c 60 ff btst 0xff, %l1 4000e07c: 02 bf ff b2 be 4000df44 4000e080: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000e084: 80 a0 60 00 cmp %g1, 0 4000e088: 02 80 00 0b be 4000e0b4 4000e08c: 01 00 00 00 nop 4000e090: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000e094: 80 a0 60 00 cmp %g1, 0 4000e098: 02 80 00 07 be 4000e0b4 4000e09c: 01 00 00 00 nop 4000e0a0: 9f c0 40 00 call %g1 4000e0a4: 90 07 bf ec add %fp, -20, %o0 4000e0a8: 81 c7 e0 08 ret 4000e0ac: 81 e8 00 00 restore 4000e0b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 4000e0b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000e0b8: 81 e8 00 00 restore <== NOT EXECUTED 4000b554 : */ int unmount( const char *path ) { 4000b554: 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 ) ) 4000b558: 40 00 ea 13 call 40045da4 4000b55c: 90 10 00 18 mov %i0, %o0 4000b560: a0 07 bf ec add %fp, -20, %l0 4000b564: 92 10 00 08 mov %o0, %o1 4000b568: 94 10 20 00 clr %o2 4000b56c: 90 10 00 18 mov %i0, %o0 4000b570: 96 10 00 10 mov %l0, %o3 4000b574: 7f ff f1 80 call 40007b74 4000b578: 98 10 20 01 mov 1, %o4 4000b57c: 80 a2 20 00 cmp %o0, 0 4000b580: 12 80 00 6a bne 4000b728 4000b584: 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; 4000b588: c4 07 bf ec ld [ %fp + -20 ], %g2 4000b58c: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 4000b590: 80 a0 c0 02 cmp %g3, %g2 4000b594: 02 80 00 0f be 4000b5d0 4000b598: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * 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 ); 4000b59c: 80 a0 60 00 cmp %g1, 0 4000b5a0: 02 80 00 08 be 4000b5c0 4000b5a4: 01 00 00 00 nop 4000b5a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b5ac: 80 a0 60 00 cmp %g1, 0 4000b5b0: 02 80 00 04 be 4000b5c0 4000b5b4: 01 00 00 00 nop 4000b5b8: 9f c0 40 00 call %g1 4000b5bc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4000b5c0: 40 00 ce ce call 4003f0f8 <__errno> 4000b5c4: 01 00 00 00 nop 4000b5c8: 10 80 00 21 b 4000b64c 4000b5cc: 82 10 20 0d mov 0xd, %g1 ! d /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4000b5d0: 80 a0 60 00 cmp %g1, 0 4000b5d4: 22 80 00 09 be,a 4000b5f8 4000b5d8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b5dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b5e0: 80 a0 60 00 cmp %g1, 0 4000b5e4: 22 80 00 05 be,a 4000b5f8 4000b5e8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b5ec: 9f c0 40 00 call %g1 4000b5f0: 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; 4000b5f4: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b5f8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b5fc: 80 a0 60 00 cmp %g1, 0 4000b600: 02 80 00 07 be 4000b61c 4000b604: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 4000b608: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000b60c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000b610: 80 a0 60 00 cmp %g1, 0 4000b614: 32 80 00 06 bne,a 4000b62c 4000b618: 03 10 01 92 sethi %hi(0x40064800), %g1 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 ); 4000b61c: 40 00 ce b7 call 4003f0f8 <__errno> <== NOT EXECUTED 4000b620: 01 00 00 00 nop <== NOT EXECUTED 4000b624: 10 80 00 0a b 4000b64c <== NOT EXECUTED 4000b628: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 4000b62c: c2 00 63 58 ld [ %g1 + 0x358 ], %g1 4000b630: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000b634: 80 a0 40 11 cmp %g1, %l1 4000b638: 12 80 00 08 bne 4000b658 4000b63c: 03 10 01 a2 sethi %hi(0x40068800), %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 4000b640: 40 00 ce ae call 4003f0f8 <__errno> 4000b644: 01 00 00 00 nop 4000b648: 82 10 20 10 mov 0x10, %g1 ! 10 4000b64c: c2 22 00 00 st %g1, [ %o0 ] 4000b650: 81 c7 e0 08 ret 4000b654: 91 e8 3f ff restore %g0, -1, %o0 4000b658: 05 10 01 a2 sethi %hi(0x40068800), %g2 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000b65c: c2 00 61 e8 ld [ %g1 + 0x1e8 ], %g1 4000b660: 10 80 00 07 b 4000b67c 4000b664: 84 10 a1 ec or %g2, 0x1ec, %g2 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; fs_root_loc = &mt_entry->mt_fs_root; 4000b668: c6 04 60 2c ld [ %l1 + 0x2c ], %g3 4000b66c: 80 a1 00 03 cmp %g4, %g3 4000b670: 02 bf ff f4 be 4000b640 4000b674: 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 ) { 4000b678: c2 00 40 00 ld [ %g1 ], %g1 4000b67c: 80 a0 40 02 cmp %g1, %g2 4000b680: 32 bf ff fa bne,a 4000b668 4000b684: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 4000b688: 30 80 00 2a b,a 4000b730 * 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 ) 4000b68c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b690: 9f c0 40 00 call %g1 4000b694: 90 10 00 11 mov %l1, %o0 4000b698: 80 a2 20 00 cmp %o0, 0 4000b69c: 12 80 00 23 bne 4000b728 4000b6a0: 01 00 00 00 nop * 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){ 4000b6a4: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000b6a8: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000b6ac: 9f c0 40 00 call %g1 4000b6b0: 90 10 00 11 mov %l1, %o0 4000b6b4: 80 a2 20 00 cmp %o0, 0 4000b6b8: 02 80 00 0b be 4000b6e4 4000b6bc: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 4000b6c0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b6c4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 4000b6c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b6cc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b6d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b6d4: 02 80 00 15 be 4000b728 <== NOT EXECUTED 4000b6d8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4000b6dc: 40 00 04 f0 call 4000ca9c <== NOT EXECUTED 4000b6e0: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4000b6e4: 40 00 05 ba call 4000cdcc <_Chain_Extract> 4000b6e8: 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 ); 4000b6ec: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b6f0: 80 a0 60 00 cmp %g1, 0 4000b6f4: 02 80 00 09 be 4000b718 4000b6f8: 90 10 00 11 mov %l1, %o0 4000b6fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b700: 80 a0 60 00 cmp %g1, 0 4000b704: 02 80 00 05 be 4000b718 4000b708: 01 00 00 00 nop 4000b70c: 9f c0 40 00 call %g1 4000b710: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 4000b714: 90 10 00 11 mov %l1, %o0 4000b718: 7f ff f1 40 call 40007c18 4000b71c: b0 10 20 00 clr %i0 return 0; 4000b720: 81 c7 e0 08 ret 4000b724: 81 e8 00 00 restore } 4000b728: 81 c7 e0 08 ret 4000b72c: 91 e8 3f ff restore %g0, -1, %o0 * 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 ) 4000b730: 7f ff f1 f4 call 40007f00 4000b734: 90 10 00 11 mov %l1, %o0 4000b738: 80 a2 20 01 cmp %o0, 1 4000b73c: 32 bf ff d4 bne,a 4000b68c 4000b740: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b744: 30 bf ff bf b,a 4000b640 40028d5c : int utime( const char *path, const struct utimbuf *times ) { 40028d5c: 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 ) ) 40028d60: 40 00 74 11 call 40045da4 40028d64: 90 10 00 18 mov %i0, %o0 40028d68: a0 07 bf ec add %fp, -20, %l0 40028d6c: 92 10 00 08 mov %o0, %o1 40028d70: 94 10 20 00 clr %o2 40028d74: 90 10 00 18 mov %i0, %o0 40028d78: 96 10 00 10 mov %l0, %o3 40028d7c: 98 10 20 01 mov 1, %o4 40028d80: 7f ff 7b 7d call 40007b74 40028d84: b0 10 3f ff mov -1, %i0 40028d88: 80 a2 20 00 cmp %o0, 0 40028d8c: 12 80 00 10 bne 40028dcc 40028d90: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 40028d94: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40028d98: 80 a0 60 00 cmp %g1, 0 40028d9c: 32 80 00 0e bne,a 40028dd4 40028da0: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 40028da4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40028da8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028dac: 02 80 00 04 be 40028dbc <== NOT EXECUTED 40028db0: 01 00 00 00 nop <== NOT EXECUTED 40028db4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028db8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028dbc: 40 00 58 cf call 4003f0f8 <__errno> <== NOT EXECUTED 40028dc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028dc4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028dc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028dcc: 81 c7 e0 08 ret 40028dd0: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40028dd4: d2 06 40 00 ld [ %i1 ], %o1 40028dd8: 9f c0 40 00 call %g1 40028ddc: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 40028de0: c2 07 bf f8 ld [ %fp + -8 ], %g1 40028de4: 80 a0 60 00 cmp %g1, 0 40028de8: 02 bf ff f9 be 40028dcc 40028dec: b0 10 00 08 mov %o0, %i0 40028df0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028df4: 80 a0 60 00 cmp %g1, 0 40028df8: 02 80 00 04 be 40028e08 40028dfc: 01 00 00 00 nop 40028e00: 9f c0 40 00 call %g1 40028e04: 90 10 00 10 mov %l0, %o0 return result; } 40028e08: 81 c7 e0 08 ret 40028e0c: 81 e8 00 00 restore 4001a03c : ssize_t write( int fd, const void *buffer, size_t count ) { 4001a03c: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001a040: 03 10 00 6d sethi %hi(0x4001b400), %g1 4001a044: c2 00 63 e4 ld [ %g1 + 0x3e4 ], %g1 ! 4001b7e4 ssize_t write( int fd, const void *buffer, size_t count ) { 4001a048: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001a04c: 80 a6 00 01 cmp %i0, %g1 4001a050: 1a 80 00 0c bcc 4001a080 4001a054: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001a058: 03 10 00 70 sethi %hi(0x4001c000), %g1 4001a05c: e0 00 60 fc ld [ %g1 + 0xfc ], %l0 ! 4001c0fc 4001a060: 83 2e 20 06 sll %i0, 6, %g1 4001a064: b1 2e 20 03 sll %i0, 3, %i0 4001a068: b0 06 00 01 add %i0, %g1, %i0 4001a06c: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001a070: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001a074: 80 88 61 00 btst 0x100, %g1 4001a078: 12 80 00 06 bne 4001a090 4001a07c: 80 a6 60 00 cmp %i1, 0 4001a080: 7f ff d0 39 call 4000e164 <__errno> <== NOT EXECUTED 4001a084: 01 00 00 00 nop <== NOT EXECUTED 4001a088: 10 80 00 14 b 4001a0d8 <== NOT EXECUTED 4001a08c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 4001a090: 02 80 00 07 be 4001a0ac 4001a094: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001a098: 02 80 00 1c be 4001a108 4001a09c: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001a0a0: 80 88 60 04 btst 4, %g1 4001a0a4: 32 80 00 06 bne,a 4001a0bc 4001a0a8: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001a0ac: 7f ff d0 2e call 4000e164 <__errno> <== NOT EXECUTED 4001a0b0: 01 00 00 00 nop <== NOT EXECUTED 4001a0b4: 10 80 00 09 b 4001a0d8 <== NOT EXECUTED 4001a0b8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 4001a0bc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4001a0c0: 80 a0 60 00 cmp %g1, 0 4001a0c4: 12 80 00 08 bne 4001a0e4 4001a0c8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001a0cc: 7f ff d0 26 call 4000e164 <__errno> <== NOT EXECUTED 4001a0d0: 01 00 00 00 nop <== NOT EXECUTED 4001a0d4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001a0d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001a0dc: 10 80 00 0b b 4001a108 <== NOT EXECUTED 4001a0e0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 4001a0e4: 9f c0 40 00 call %g1 4001a0e8: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001a0ec: 80 a2 20 00 cmp %o0, 0 4001a0f0: 04 80 00 06 ble 4001a108 4001a0f4: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 4001a0f8: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001a0fc: 86 83 40 08 addcc %o5, %o0, %g3 4001a100: 84 43 00 02 addx %o4, %g2, %g2 4001a104: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001a108: 81 c7 e0 08 ret 4001a10c: 91 e8 00 08 restore %g0, %o0, %o0 400077bc : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 400077bc: 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 ); 400077c0: 03 10 00 80 sethi %hi(0x40020000), %g1 400077c4: c2 00 63 64 ld [ %g1 + 0x364 ], %g1 ! 40020364 400077c8: 80 a6 00 01 cmp %i0, %g1 400077cc: 1a 80 00 0c bcc 400077fc 400077d0: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 400077d4: 03 10 00 85 sethi %hi(0x40021400), %g1 400077d8: e4 00 60 54 ld [ %g1 + 0x54 ], %l2 ! 40021454 400077dc: 83 2e 20 06 sll %i0, 6, %g1 400077e0: b1 2e 20 03 sll %i0, 3, %i0 400077e4: b0 06 00 01 add %i0, %g1, %i0 400077e8: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 400077ec: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 400077f0: 80 88 61 00 btst 0x100, %g1 400077f4: 12 80 00 06 bne 4000780c 400077f8: 80 88 60 04 btst 4, %g1 400077fc: 40 00 24 21 call 40010880 <__errno> 40007800: b0 10 3f ff mov -1, %i0 40007804: 10 80 00 1f b 40007880 40007808: 82 10 20 09 mov 9, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000780c: 02 80 00 1a be 40007874 40007810: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 40007814: 02 80 00 18 be 40007874 40007818: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 4000781c: 04 80 00 16 ble 40007874 40007820: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 40007824: 14 80 00 14 bg 40007874 40007828: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 4000782c: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 40007830: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40007834: 80 a0 60 00 cmp %g1, 0 40007838: 12 80 00 06 bne 40007850 4000783c: 19 00 00 1f sethi %hi(0x7c00), %o4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40007840: 40 00 24 10 call 40010880 <__errno> <== NOT EXECUTED 40007844: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007848: 10 80 00 0e b 40007880 <== NOT EXECUTED 4000784c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007850: 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 ) 40007854: 98 13 23 ff or %o4, 0x3ff, %o4 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 ); 40007858: 84 10 20 01 mov 1, %g2 4000785c: 88 10 20 00 clr %g4 40007860: 86 10 20 00 clr %g3 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 40007864: da 00 40 00 ld [ %g1 ], %o5 40007868: 80 a3 60 00 cmp %o5, 0 4000786c: 32 80 00 08 bne,a 4000788c 40007870: da 00 60 04 ld [ %g1 + 4 ], %o5 rtems_set_errno_and_return_minus_one( EINVAL ); 40007874: 40 00 24 03 call 40010880 <__errno> 40007878: b0 10 3f ff mov -1, %i0 4000787c: 82 10 20 16 mov 0x16, %g1 40007880: c2 22 00 00 st %g1, [ %o0 ] 40007884: 81 c7 e0 08 ret 40007888: 81 e8 00 00 restore if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 4000788c: 80 a0 00 0d cmp %g0, %o5 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 40007890: 9a 00 c0 0d add %g3, %o5, %o5 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 ) 40007894: 96 40 3f ff addx %g0, -1, %o3 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 40007898: 80 a3 40 0c cmp %o5, %o4 4000789c: 14 bf ff f6 bg 40007874 400078a0: 84 08 80 0b and %g2, %o3, %g2 400078a4: 80 a3 40 03 cmp %o5, %g3 400078a8: 06 bf ff f3 bl 40007874 400078ac: 88 01 20 01 inc %g4 * 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++ ) { 400078b0: 80 a1 00 1a cmp %g4, %i2 400078b4: 16 80 00 04 bge 400078c4 400078b8: 82 00 60 08 add %g1, 8, %g1 400078bc: 10 bf ff ea b 40007864 400078c0: 86 10 00 0d mov %o5, %g3 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 400078c4: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED 400078c8: a6 10 20 00 clr %l3 <== NOT EXECUTED 400078cc: 12 bf ff ee bne 40007884 <== NOT EXECUTED 400078d0: 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 ) 400078d4: d4 06 60 04 ld [ %i1 + 4 ], %o2 <== NOT EXECUTED 400078d8: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 400078dc: 02 80 00 17 be 40007938 <== NOT EXECUTED 400078e0: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 400078e4: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 <== NOT EXECUTED 400078e8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 400078ec: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 400078f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400078f4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( bytes < 0 ) 400078f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400078fc: 16 80 00 04 bge 4000790c <== NOT EXECUTED 40007900: 01 00 00 00 nop <== NOT EXECUTED 40007904: 81 c7 e0 08 ret <== NOT EXECUTED 40007908: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 4000790c: 02 80 00 07 be 40007928 <== NOT EXECUTED 40007910: a1 3a 20 1f sra %o0, 0x1f, %l0 <== NOT EXECUTED iop->offset += bytes; 40007914: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 <== NOT EXECUTED 40007918: 86 80 c0 08 addcc %g3, %o0, %g3 <== NOT EXECUTED total += bytes; 4000791c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 40007920: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 40007924: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 40007928: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED 4000792c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40007930: 12 80 00 05 bne 40007944 <== NOT EXECUTED 40007934: 01 00 00 00 nop <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40007938: 80 a4 c0 1a cmp %l3, %i2 <== NOT EXECUTED 4000793c: 06 bf ff e6 bl 400078d4 <== NOT EXECUTED 40007940: b2 06 60 08 add %i1, 8, %i1 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 40007944: 81 c7 e0 08 ret <== NOT EXECUTED 40007948: 81 e8 00 00 restore <== NOT EXECUTED