4000f6bc : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4000f6bc: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000f6c0: 40 00 04 a2 call 40010948 4000f6c4: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000f6c8: 91 2a 20 10 sll %o0, 0x10, %o0 4000f6cc: 91 32 20 10 srl %o0, 0x10, %o0 4000f6d0: 80 a2 20 00 cmp %o0, 0 4000f6d4: 22 80 00 0c be,a 4000f704 4000f6d8: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] 4000f6dc: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 4000f6e0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000f6e4: 22 80 00 08 be,a 4000f704 <== NOT EXECUTED 4000f6e8: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4000f6ec: 40 00 16 cf call 40015228 <__errno> <== NOT EXECUTED 4000f6f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000f6f4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000f6f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000f6fc: 81 c7 e0 08 ret <== NOT EXECUTED 4000f700: 81 e8 00 00 restore <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; 4000f704: f4 34 20 3a sth %i2, [ %l0 + 0x3a ] IMFS_update_ctime( jnode ); 4000f708: 90 07 bf f8 add %fp, -8, %o0 4000f70c: 7f ff d4 7c call 400048fc 4000f710: 92 10 20 00 clr %o1 4000f714: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000f718: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000f71c: 81 c7 e0 08 ret 4000f720: 91 e8 20 00 restore %g0, 0, %o0 4000dd5c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000dd5c: 9d e3 bf a0 save %sp, -96, %sp 4000dd60: 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 ) 4000dd64: 80 a6 20 00 cmp %i0, 0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000dd68: 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 ) 4000dd6c: 02 80 00 40 be 4000de6c 4000dd70: 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 ); 4000dd74: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000dd78: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 4001d028 4000dd7c: 90 10 00 19 mov %i1, %o0 4000dd80: d4 10 60 2c lduh [ %g1 + 0x2c ], %o2 4000dd84: b6 2e c0 0a andn %i3, %o2, %i3 4000dd88: 95 2e e0 10 sll %i3, 0x10, %o2 4000dd8c: 7f ff ff c8 call 4000dcac 4000dd90: 95 32 a0 10 srl %o2, 0x10, %o2 if ( !node ) 4000dd94: b0 92 20 00 orcc %o0, 0, %i0 4000dd98: 02 80 00 35 be 4000de6c 4000dd9c: b2 06 7f ff add %i1, -1, %i1 return NULL; /* * Set the type specific information */ switch (type) { 4000dda0: 80 a6 60 06 cmp %i1, 6 4000dda4: 38 80 00 20 bgu,a 4000de24 4000dda8: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000ddac: b3 2e 60 02 sll %i1, 2, %i1 4000ddb0: 03 10 00 37 sethi %hi(0x4000dc00), %g1 4000ddb4: 82 10 60 90 or %g1, 0x90, %g1 ! 4000dc90 4000ddb8: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000ddbc: 81 c0 40 00 jmp %g1 4000ddc0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000ddc4: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 4000ddc8: 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); 4000ddcc: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ddd0: 82 06 20 50 add %i0, 0x50, %g1 4000ddd4: 10 80 00 1b b 4000de40 4000ddd8: 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; 4000dddc: 10 80 00 05 b 4000ddf0 4000dde0: 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; 4000dde4: 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; 4000dde8: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 4000ddec: c4 26 20 54 st %g2, [ %i0 + 0x54 ] break; 4000ddf0: 10 80 00 14 b 4000de40 4000ddf4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000ddf8: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED 4000ddfc: c0 26 20 54 clr [ %i0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000de00: c0 26 20 58 clr [ %i0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000de04: c0 26 20 50 clr [ %i0 + 0x50 ] 4000de08: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 4000de0c: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 4000de10: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; break; 4000de14: 10 80 00 0b b 4000de40 4000de18: c0 26 20 60 clr [ %i0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 4000de1c: 10 80 00 09 b 4000de40 4000de20: c0 26 20 50 clr [ %i0 + 0x50 ] default: assert(0); 4000de24: 15 10 00 71 sethi %hi(0x4001c400), %o2 <== NOT EXECUTED 4000de28: 17 10 00 6f sethi %hi(0x4001bc00), %o3 <== NOT EXECUTED 4000de2c: 90 12 22 c8 or %o0, 0x2c8, %o0 <== NOT EXECUTED 4000de30: 94 12 a3 18 or %o2, 0x318, %o2 <== NOT EXECUTED 4000de34: 96 12 e1 e0 or %o3, 0x1e0, %o3 <== NOT EXECUTED 4000de38: 7f ff d3 d4 call 40002d88 <__assert_func> <== NOT EXECUTED 4000de3c: 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; 4000de40: 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; 4000de44: d0 04 00 00 ld [ %l0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 4000de48: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 4000de4c: d0 26 20 08 st %o0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 4000de50: 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 ); 4000de54: 90 02 20 50 add %o0, 0x50, %o0 4000de58: 82 00 60 01 inc %g1 4000de5c: c2 20 80 00 st %g1, [ %g2 ] 4000de60: c2 26 20 34 st %g1, [ %i0 + 0x34 ] 4000de64: 7f ff e4 27 call 40006f00 <_Chain_Append> 4000de68: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000de6c: 81 c7 e0 08 ret 4000de70: 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 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004a6c: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 40004a70: 17 10 00 95 sethi %hi(0x40025400), %o3 <== NOT EXECUTED 40004a74: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 40004a78: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 40004a7c: 96 12 e0 88 or %o3, 0x88, %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 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004a94: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 40004a98: 17 10 00 95 sethi %hi(0x40025400), %o3 <== NOT EXECUTED 40004a9c: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 40004aa0: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 40004aa4: 96 12 e0 98 or %o3, 0x98, %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 9c sethi %hi(0x40027000), %l4 40004ac0: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40004ac4: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 40004ac8: 17 10 00 95 sethi %hi(0x40025400), %o3 <== NOT EXECUTED 40004acc: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 40004ad0: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 40004ad4: 96 12 e0 a8 or %o3, 0xa8, %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 95 sethi %hi(0x40025400), %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 20 or %l4, 0x120, %l4 40004aec: a6 14 e0 d0 or %l3, 0xd0, %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 3e 89 call 4001452c 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 4000a2cc : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a2cc: 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 ) 4000a2d0: 2b 10 00 74 sethi %hi(0x4001d000), %l5 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a2d4: 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 ) 4000a2d8: aa 15 60 28 or %l5, 0x28, %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000a2dc: e2 06 c0 00 ld [ %i3 ], %l1 4000a2e0: ac 10 20 01 mov 1, %l6 4000a2e4: 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 ); 4000a2e8: 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) ) { 4000a2ec: 10 80 00 6a b 4000a494 4000a2f0: a8 07 bf fc add %fp, -4, %l4 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 4000a2f4: 90 04 00 12 add %l0, %l2, %o0 4000a2f8: 92 10 00 19 mov %i1, %o1 4000a2fc: 94 10 00 13 mov %l3, %o2 4000a300: 40 00 02 3e call 4000abf8 4000a304: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000a308: 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 ); 4000a30c: ac 10 00 08 mov %o0, %l6 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000a310: 80 a0 60 00 cmp %g1, 0 4000a314: 02 80 00 56 be 4000a46c 4000a318: f0 07 bf fc ld [ %fp + -4 ], %i0 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000a31c: 80 a2 20 00 cmp %o0, 0 4000a320: 22 80 00 10 be,a 4000a360 4000a324: a4 04 80 18 add %l2, %i0, %l2 if ( node->type == IMFS_DIRECTORY ) 4000a328: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a32c: 80 a0 60 01 cmp %g1, 1 4000a330: 32 80 00 0c bne,a 4000a360 4000a334: a4 04 80 18 add %l2, %i0, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000a338: 90 10 00 1b mov %i3, %o0 4000a33c: 7f ff ff 7e call 4000a134 4000a340: 92 10 20 01 mov 1, %o1 4000a344: 80 a2 20 00 cmp %o0, 0 4000a348: 32 80 00 06 bne,a 4000a360 4000a34c: a4 04 80 18 add %l2, %i0, %l2 rtems_set_errno_and_return_minus_one( EACCES ); 4000a350: 40 00 14 e3 call 4000f6dc <__errno> 4000a354: b0 10 3f ff mov -1, %i0 4000a358: 10 80 00 4c b 4000a488 4000a35c: 82 10 20 0d mov 0xd, %g1 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4000a360: b2 26 40 18 sub %i1, %i0, %i1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000a364: 80 a5 a0 03 cmp %l6, 3 4000a368: 02 80 00 1b be 4000a3d4 4000a36c: e2 06 c0 00 ld [ %i3 ], %l1 4000a370: 80 a5 a0 04 cmp %l6, 4 4000a374: 02 80 00 42 be 4000a47c 4000a378: 80 a5 a0 02 cmp %l6, 2 4000a37c: 12 80 00 47 bne 4000a498 4000a380: 80 a5 a0 04 cmp %l6, 4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000a384: c2 05 40 00 ld [ %l5 ], %g1 4000a388: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4000a38c: 80 a4 40 01 cmp %l1, %g1 4000a390: 02 bf ff da be 4000a2f8 4000a394: 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) { 4000a398: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000a39c: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 4000a3a0: 80 a4 40 01 cmp %l1, %g1 4000a3a4: 32 80 00 04 bne,a 4000a3b4 4000a3a8: e2 04 60 08 ld [ %l1 + 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; 4000a3ac: 10 80 00 47 b 4000a4c8 4000a3b0: 92 02 60 08 add %o1, 8, %o1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4000a3b4: 80 a4 60 00 cmp %l1, 0 4000a3b8: 32 bf ff cf bne,a 4000a2f4 4000a3bc: e2 26 c0 00 st %l1, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a3c0: 40 00 14 c7 call 4000f6dc <__errno> 4000a3c4: b0 10 3f ff mov -1, %i0 4000a3c8: ec 22 00 00 st %l6, [ %o0 ] 4000a3cc: 81 c7 e0 08 ret 4000a3d0: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4000a3d4: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a3d8: 80 a0 60 03 cmp %g1, 3 4000a3dc: 12 80 00 0a bne 4000a404 4000a3e0: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 4000a3e4: 90 10 00 1b mov %i3, %o0 4000a3e8: 7f ff ff 6b call 4000a194 4000a3ec: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000a3f0: e2 06 c0 00 ld [ %i3 ], %l1 if ( !node ) 4000a3f4: 80 a4 60 00 cmp %l1, 0 4000a3f8: 32 80 00 0d bne,a 4000a42c 4000a3fc: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a400: 30 80 00 0e b,a 4000a438 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4000a404: 32 80 00 0a bne,a 4000a42c 4000a408: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 4000a40c: 90 10 00 1b mov %i3, %o0 4000a410: 7f ff ff 79 call 4000a1f4 4000a414: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000a418: e2 06 c0 00 ld [ %i3 ], %l1 if ( result == -1 ) 4000a41c: 80 a2 3f ff cmp %o0, -1 4000a420: 02 bf ff eb be 4000a3cc 4000a424: b0 10 00 08 mov %o0, %i0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000a428: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a42c: 80 a0 60 01 cmp %g1, 1 4000a430: 22 80 00 06 be,a 4000a448 4000a434: d2 04 60 5c ld [ %l1 + 0x5c ], %o1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000a438: 40 00 14 a9 call 4000f6dc <__errno> 4000a43c: b0 10 3f ff mov -1, %i0 4000a440: 10 80 00 12 b 4000a488 4000a444: 82 10 20 14 mov 0x14, %g1 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 4000a448: 80 a2 60 00 cmp %o1, 0 4000a44c: 12 80 00 1f bne 4000a4c8 4000a450: 92 02 60 1c add %o1, 0x1c, %o1 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000a454: 90 10 00 11 mov %l1, %o0 4000a458: 40 00 01 bd call 4000ab4c 4000a45c: 92 10 00 13 mov %l3, %o1 if ( !node ) 4000a460: a2 92 20 00 orcc %o0, 0, %l1 4000a464: 32 bf ff a4 bne,a 4000a2f4 4000a468: e2 26 c0 00 st %l1, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a46c: 40 00 14 9c call 4000f6dc <__errno> 4000a470: b0 10 3f ff mov -1, %i0 4000a474: 10 80 00 05 b 4000a488 4000a478: 82 10 20 02 mov 2, %g1 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000a47c: 40 00 14 98 call 4000f6dc <__errno> 4000a480: b0 10 3f ff mov -1, %i0 4000a484: 82 10 20 5b mov 0x5b, %g1 4000a488: c2 22 00 00 st %g1, [ %o0 ] 4000a48c: 81 c7 e0 08 ret 4000a490: 81 e8 00 00 restore /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4000a494: 80 a5 a0 04 cmp %l6, 4 4000a498: 02 80 00 04 be 4000a4a8 4000a49c: 80 a5 a0 00 cmp %l6, 0 4000a4a0: 12 bf ff 96 bne 4000a2f8 4000a4a4: 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 ) { 4000a4a8: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a4ac: 80 a0 60 01 cmp %g1, 1 4000a4b0: 12 80 00 19 bne 4000a514 4000a4b4: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 4000a4b8: d2 04 60 5c ld [ %l1 + 0x5c ], %o1 4000a4bc: 80 a2 60 00 cmp %o1, 0 4000a4c0: 02 80 00 15 be 4000a514 4000a4c4: 92 02 60 1c add %o1, 0x1c, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 4000a4c8: a2 07 bf e8 add %fp, -24, %l1 4000a4cc: 94 10 20 14 mov 0x14, %o2 4000a4d0: 40 00 16 be call 4000ffc8 4000a4d4: 90 10 00 11 mov %l1, %o0 *pathloc = newloc; 4000a4d8: 92 10 00 11 mov %l1, %o1 4000a4dc: 94 10 20 14 mov 0x14, %o2 4000a4e0: 40 00 16 ba call 4000ffc8 4000a4e4: 90 10 00 1b mov %i3, %o0 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4000a4e8: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 4000a4ec: d0 07 bf fc ld [ %fp + -4 ], %o0 4000a4f0: c2 00 40 00 ld [ %g1 ], %g1 4000a4f4: 92 06 40 08 add %i1, %o0, %o1 4000a4f8: 94 10 00 1a mov %i2, %o2 4000a4fc: 90 24 80 08 sub %l2, %o0, %o0 4000a500: 96 10 00 1b mov %i3, %o3 4000a504: 9f c0 40 00 call %g1 4000a508: 90 04 00 08 add %l0, %o0, %o0 4000a50c: 81 c7 e0 08 ret 4000a510: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000a514: 7f ff fe ec call 4000a0c4 4000a518: 90 10 00 1b mov %i3, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000a51c: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000a520: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000a524: 7f ff ff 04 call 4000a134 4000a528: 90 10 00 1b mov %i3, %o0 4000a52c: 80 a2 20 00 cmp %o0, 0 4000a530: 12 80 00 06 bne 4000a548 4000a534: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a538: 40 00 14 69 call 4000f6dc <__errno> 4000a53c: b0 10 3f ff mov -1, %i0 ! ffffffff 4000a540: 82 10 20 0d mov 0xd, %g1 4000a544: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000a548: 81 c7 e0 08 ret 4000a54c: 81 e8 00 00 restore 4000a60c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000a60c: 9d e3 bf 60 save %sp, -160, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000a610: e0 06 40 00 ld [ %i1 ], %l0 /* * Get the path length. */ pathlen = strlen( path ); 4000a614: 90 10 00 18 mov %i0, %o0 4000a618: 40 00 17 e8 call 400105b8 4000a61c: 2b 10 00 74 sethi %hi(0x4001d000), %l5 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000a620: a2 10 00 18 mov %i0, %l1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4000a624: a4 10 20 00 clr %l2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4000a628: a8 07 bf c0 add %fp, -64, %l4 4000a62c: ac 07 bf fc add %fp, -4, %l6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4000a630: a6 10 00 08 mov %o0, %l3 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000a634: aa 15 60 28 or %l5, 0x28, %l5 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4000a638: 92 10 00 13 mov %l3, %o1 4000a63c: 90 04 40 12 add %l1, %l2, %o0 4000a640: 94 10 00 14 mov %l4, %o2 4000a644: 40 00 01 6d call 4000abf8 4000a648: 96 10 00 16 mov %l6, %o3 pathlen -= len; i += len; if ( !pathloc->node_access ) 4000a64c: c2 06 40 00 ld [ %i1 ], %g1 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 4000a650: f0 07 bf fc ld [ %fp + -4 ], %i0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4000a654: ae 10 00 08 mov %o0, %l7 pathlen -= len; i += len; if ( !pathloc->node_access ) 4000a658: 80 a0 60 00 cmp %g1, 0 4000a65c: 02 80 00 82 be 4000a864 4000a660: a6 24 c0 18 sub %l3, %i0, %l3 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000a664: 80 a2 20 00 cmp %o0, 0 4000a668: 22 80 00 10 be,a 4000a6a8 4000a66c: a4 04 80 18 add %l2, %i0, %l2 if ( node->type == IMFS_DIRECTORY ) 4000a670: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a674: 80 a0 60 01 cmp %g1, 1 4000a678: 32 80 00 0c bne,a 4000a6a8 4000a67c: a4 04 80 18 add %l2, %i0, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000a680: 90 10 00 19 mov %i1, %o0 4000a684: 7f ff fe ac call 4000a134 4000a688: 92 10 20 01 mov 1, %o1 4000a68c: 80 a2 20 00 cmp %o0, 0 4000a690: 32 80 00 06 bne,a 4000a6a8 4000a694: a4 04 80 18 add %l2, %i0, %l2 rtems_set_errno_and_return_minus_one( EACCES ); 4000a698: 40 00 14 11 call 4000f6dc <__errno> 4000a69c: b0 10 3f ff mov -1, %i0 4000a6a0: 10 80 00 83 b 4000a8ac 4000a6a4: 82 10 20 0d mov 0xd, %g1 node = pathloc->node_access; switch( type ) { 4000a6a8: 80 a5 e0 02 cmp %l7, 2 4000a6ac: 02 80 00 0f be 4000a6e8 4000a6b0: e0 06 40 00 ld [ %i1 ], %l0 4000a6b4: 80 a5 e0 02 cmp %l7, 2 4000a6b8: 18 80 00 07 bgu 4000a6d4 4000a6bc: 80 a5 e0 03 cmp %l7, 3 4000a6c0: 80 a5 e0 00 cmp %l7, 0 4000a6c4: 02 80 00 56 be 4000a81c 4000a6c8: 92 10 00 13 mov %l3, %o1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4000a6cc: 10 bf ff dd b 4000a640 4000a6d0: 90 04 40 12 add %l1, %l2, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000a6d4: 02 80 00 19 be 4000a738 4000a6d8: 80 a5 e0 04 cmp %l7, 4 4000a6dc: 12 bf ff d8 bne 4000a63c 4000a6e0: 92 10 00 13 mov %l3, %o1 4000a6e4: 30 80 00 52 b,a 4000a82c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000a6e8: c2 05 40 00 ld [ %l5 ], %g1 4000a6ec: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4000a6f0: 80 a4 00 01 cmp %l0, %g1 4000a6f4: 02 bf ff d2 be 4000a63c 4000a6f8: 92 10 00 13 mov %l3, %o1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 4000a6fc: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 4000a700: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 4000a704: 80 a4 00 01 cmp %l0, %g1 4000a708: 32 80 00 04 bne,a 4000a718 4000a70c: e0 04 20 08 ld [ %l0 + 8 ], %l0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4000a710: 10 80 00 2a b 4000a7b8 4000a714: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4000a718: 80 a4 20 00 cmp %l0, 0 4000a71c: 32 bf ff c7 bne,a 4000a638 4000a720: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a724: 40 00 13 ee call 4000f6dc <__errno> 4000a728: b0 10 3f ff mov -1, %i0 4000a72c: ee 22 00 00 st %l7, [ %o0 ] 4000a730: 81 c7 e0 08 ret 4000a734: 81 e8 00 00 restore pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4000a738: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a73c: 80 a0 60 03 cmp %g1, 3 4000a740: 12 80 00 0a bne 4000a768 4000a744: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); 4000a748: 90 10 00 19 mov %i1, %o0 4000a74c: 7f ff ff 81 call 4000a550 4000a750: 92 10 20 00 clr %o1 if ( result == -1 ) 4000a754: 80 a2 3f ff cmp %o0, -1 4000a758: 12 80 00 0c bne 4000a788 4000a75c: b0 10 00 08 mov %o0, %i0 4000a760: 81 c7 e0 08 ret <== NOT EXECUTED 4000a764: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 4000a768: 32 80 00 09 bne,a 4000a78c 4000a76c: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 4000a770: 90 10 00 19 mov %i1, %o0 4000a774: 7f ff ff 77 call 4000a550 4000a778: 92 10 20 00 clr %o1 if ( result == -1 ) 4000a77c: 80 a2 3f ff cmp %o0, -1 4000a780: 02 bf ff ec be 4000a730 4000a784: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 4000a788: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 4000a78c: 80 a2 20 00 cmp %o0, 0 4000a790: 02 80 00 44 be 4000a8a0 4000a794: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000a798: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 4000a79c: 80 a0 60 01 cmp %g1, 1 4000a7a0: 12 80 00 40 bne 4000a8a0 4000a7a4: 01 00 00 00 nop /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 4000a7a8: d2 02 20 5c ld [ %o0 + 0x5c ], %o1 4000a7ac: 80 a2 60 00 cmp %o1, 0 4000a7b0: 02 80 00 14 be 4000a800 4000a7b4: 92 02 60 1c add %o1, 0x1c, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 4000a7b8: a0 07 bf e8 add %fp, -24, %l0 4000a7bc: 94 10 20 14 mov 0x14, %o2 4000a7c0: 40 00 16 02 call 4000ffc8 4000a7c4: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 4000a7c8: 92 10 00 10 mov %l0, %o1 4000a7cc: 94 10 20 14 mov 0x14, %o2 4000a7d0: 40 00 15 fe call 4000ffc8 4000a7d4: 90 10 00 19 mov %i1, %o0 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a7d8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4000a7dc: c4 07 bf fc ld [ %fp + -4 ], %g2 4000a7e0: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000a7e4: a4 24 80 02 sub %l2, %g2, %l2 4000a7e8: 92 10 00 19 mov %i1, %o1 4000a7ec: 90 04 40 12 add %l1, %l2, %o0 4000a7f0: 9f c0 40 00 call %g1 4000a7f4: 94 10 00 1a mov %i2, %o2 4000a7f8: 81 c7 e0 08 ret 4000a7fc: 91 e8 00 08 restore %g0, %o0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000a800: 40 00 00 d3 call 4000ab4c 4000a804: 92 10 00 14 mov %l4, %o1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4000a808: a0 92 20 00 orcc %o0, 0, %l0 4000a80c: 02 80 00 0c be 4000a83c 4000a810: c4 07 bf fc ld [ %fp + -4 ], %g2 done = true; else pathloc->node_access = node; 4000a814: 10 bf ff 89 b 4000a638 4000a818: e0 26 40 00 st %l0, [ %i1 ] break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4000a81c: 40 00 13 b0 call 4000f6dc <__errno> 4000a820: b0 10 3f ff mov -1, %i0 4000a824: 10 80 00 22 b 4000a8ac 4000a828: 82 10 20 11 mov 0x11, %g1 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000a82c: 40 00 13 ac call 4000f6dc <__errno> 4000a830: b0 10 3f ff mov -1, %i0 4000a834: 10 80 00 1e b 4000a8ac 4000a838: 82 10 20 5b mov 0x5b, %g1 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4000a83c: 82 04 40 12 add %l1, %l2, %g1 4000a840: a4 24 80 02 sub %l2, %g2, %l2 4000a844: a2 04 40 12 add %l1, %l2, %l1 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 4000a848: 10 80 00 0b b 4000a874 4000a84c: e2 26 80 00 st %l1, [ %i2 ] if ( !IMFS_is_separator( path[ i ] ) ) 4000a850: 80 a0 a0 5c cmp %g2, 0x5c 4000a854: 02 80 00 08 be 4000a874 4000a858: 80 a0 a0 2f cmp %g2, 0x2f 4000a85c: 22 80 00 07 be,a 4000a878 4000a860: c4 48 40 00 ldsb [ %g1 ], %g2 rtems_set_errno_and_return_minus_one( ENOENT ); 4000a864: 40 00 13 9e call 4000f6dc <__errno> 4000a868: b0 10 3f ff mov -1, %i0 4000a86c: 10 80 00 10 b 4000a8ac 4000a870: 82 10 20 02 mov 2, %g1 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 4000a874: c4 48 40 00 ldsb [ %g1 ], %g2 4000a878: 80 a0 a0 00 cmp %g2, 0 4000a87c: 12 bf ff f5 bne 4000a850 4000a880: 82 00 60 01 inc %g1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4000a884: 7f ff fe 10 call 4000a0c4 4000a888: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 4000a88c: c2 06 40 00 ld [ %i1 ], %g1 4000a890: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000a894: 80 a0 60 01 cmp %g1, 1 4000a898: 02 80 00 08 be 4000a8b8 4000a89c: b0 10 00 08 mov %o0, %i0 if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000a8a0: 40 00 13 8f call 4000f6dc <__errno> 4000a8a4: b0 10 3f ff mov -1, %i0 4000a8a8: 82 10 20 14 mov 0x14, %g1 4000a8ac: c2 22 00 00 st %g1, [ %o0 ] 4000a8b0: 81 c7 e0 08 ret 4000a8b4: 81 e8 00 00 restore /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 4000a8b8: 90 10 00 19 mov %i1, %o0 4000a8bc: 7f ff fe 1e call 4000a134 4000a8c0: 92 10 20 03 mov 3, %o1 4000a8c4: 80 a2 20 00 cmp %o0, 0 4000a8c8: 12 80 00 06 bne 4000a8e0 4000a8cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a8d0: 40 00 13 83 call 4000f6dc <__errno> 4000a8d4: b0 10 3f ff mov -1, %i0 ! ffffffff 4000a8d8: 82 10 20 0d mov 0xd, %g1 4000a8dc: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000a8e0: 81 c7 e0 08 ret 4000a8e4: 81 e8 00 00 restore 4000a194 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a194: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 4000a198: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000a19c: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000a1a0: 80 a0 a0 03 cmp %g2, 3 4000a1a4: 22 80 00 04 be,a 4000a1b4 4000a1a8: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 rtems_fatal_error_occurred (0xABCD0000); 4000a1ac: 7f ff f2 7a call 40006b94 <== NOT EXECUTED 4000a1b0: 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 ); 4000a1b4: 90 10 00 18 mov %i0, %o0 4000a1b8: 7f ff ff c3 call 4000a0c4 4000a1bc: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000a1c0: 90 10 00 18 mov %i0, %o0 4000a1c4: 92 10 00 19 mov %i1, %o1 4000a1c8: 7f ff ff db call 4000a134 4000a1cc: b0 10 20 00 clr %i0 4000a1d0: 80 a2 20 00 cmp %o0, 0 4000a1d4: 12 80 00 06 bne 4000a1ec 4000a1d8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a1dc: 40 00 15 40 call 4000f6dc <__errno> <== NOT EXECUTED 4000a1e0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000a1e4: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000a1e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000a1ec: 81 c7 e0 08 ret 4000a1f0: 81 e8 00 00 restore 4000a134 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4000a134: 9d e3 bf a0 save %sp, -96, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000a138: 40 00 04 64 call 4000b2c8 4000a13c: e0 06 00 00 ld [ %i0 ], %l0 st_gid = getegid(); 4000a140: 40 00 04 5e call 4000b2b8 4000a144: a2 10 00 08 mov %o0, %l1 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 4000a148: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 4000a14c: a3 2c 60 10 sll %l1, 0x10, %l1 4000a150: a3 34 60 10 srl %l1, 0x10, %l1 4000a154: 80 a4 40 01 cmp %l1, %g1 4000a158: 02 80 00 09 be 4000a17c 4000a15c: 83 2e 60 06 sll %i1, 6, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 4000a160: c2 14 20 3a lduh [ %l0 + 0x3a ], %g1 4000a164: 91 2a 20 10 sll %o0, 0x10, %o0 4000a168: 91 32 20 10 srl %o0, 0x10, %o0 4000a16c: 80 a2 00 01 cmp %o0, %g1 4000a170: 02 80 00 03 be 4000a17c 4000a174: 83 2e 60 03 sll %i1, 3, %g1 4000a178: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED flags_to_test <<= 3; 4000a17c: c4 14 20 2e lduh [ %l0 + 0x2e ], %g2 4000a180: 82 28 40 02 andn %g1, %g2, %g1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4000a184: 80 a0 00 01 cmp %g0, %g1 4000a188: b0 60 3f ff subx %g0, -1, %i0 4000a18c: 81 c7 e0 08 ret 4000a190: 81 e8 00 00 restore 4000a1f4 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a1f4: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 4000a1f8: e2 06 00 00 ld [ %i0 ], %l1 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a1fc: a0 10 00 18 mov %i0, %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000a200: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000a204: 80 a0 60 04 cmp %g1, 4 4000a208: 12 80 00 07 bne 4000a224 4000a20c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4000a210: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000a214: 80 a0 60 00 cmp %g1, 0 4000a218: 32 80 00 05 bne,a 4000a22c 4000a21c: c2 26 00 00 st %g1, [ %i0 ] rtems_fatal_error_occurred( 0xBAD00000 ); 4000a220: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 4000a224: 7f ff f2 5c call 40006b94 <== NOT EXECUTED 4000a228: 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( 4000a22c: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 4000a230: c2 48 40 00 ldsb [ %g1 ], %g1 4000a234: 80 a0 60 5c cmp %g1, 0x5c 4000a238: 02 80 00 06 be 4000a250 4000a23c: 80 a0 60 2f cmp %g1, 0x2f 4000a240: 02 80 00 04 be 4000a250 4000a244: 80 a0 60 00 cmp %g1, 0 4000a248: 12 80 00 09 bne 4000a26c 4000a24c: 82 10 20 00 clr %g1 4000a250: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000a254: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 4001d028 4000a258: 90 10 00 10 mov %l0, %o0 4000a25c: 92 02 60 18 add %o1, 0x18, %o1 4000a260: 40 00 17 5a call 4000ffc8 4000a264: 94 10 20 14 mov 0x14, %o2 4000a268: 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] ), 4000a26c: e2 04 60 50 ld [ %l1 + 0x50 ], %l1 4000a270: a2 04 40 01 add %l1, %g1, %l1 4000a274: 40 00 18 d1 call 400105b8 4000a278: 90 10 00 11 mov %l1, %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000a27c: 94 10 00 19 mov %i1, %o2 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 4000a280: 92 10 00 08 mov %o0, %o1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000a284: 96 10 00 10 mov %l0, %o3 4000a288: 40 00 00 11 call 4000a2cc 4000a28c: 90 10 00 11 mov %l1, %o0 4000a290: b0 10 00 08 mov %o0, %i0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 4000a294: 7f ff ff 8c call 4000a0c4 4000a298: 90 10 00 10 mov %l0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000a29c: 90 10 00 10 mov %l0, %o0 4000a2a0: 7f ff ff a5 call 4000a134 4000a2a4: 92 10 00 19 mov %i1, %o1 4000a2a8: 80 a2 20 00 cmp %o0, 0 4000a2ac: 12 80 00 06 bne 4000a2c4 4000a2b0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a2b4: 40 00 15 0a call 4000f6dc <__errno> <== NOT EXECUTED 4000a2b8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000a2bc: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000a2c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000a2c4: 81 c7 e0 08 ret 4000a2c8: 81 e8 00 00 restore 4000de74 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000de74: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000de78: 7f ff f5 14 call 4000b2c8 4000de7c: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000de80: 91 2a 20 10 sll %o0, 0x10, %o0 4000de84: 91 32 20 10 srl %o0, 0x10, %o0 4000de88: 80 a2 20 00 cmp %o0, 0 4000de8c: 22 80 00 0c be,a 4000debc 4000de90: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 4000de94: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 4000de98: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000de9c: 22 80 00 08 be,a 4000debc <== NOT EXECUTED 4000dea0: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4000dea4: 40 00 06 0e call 4000f6dc <__errno> <== NOT EXECUTED 4000dea8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000deac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000deb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000deb4: 81 c7 e0 08 ret <== NOT EXECUTED 4000deb8: 81 e8 00 00 restore <== NOT EXECUTED */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 4000debc: 90 07 bf f8 add %fp, -8, %o0 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4000dec0: 82 08 70 00 and %g1, -4096, %g1 IMFS_update_ctime( jnode ); 4000dec4: 92 10 20 00 clr %o1 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4000dec8: b2 0e 6f ff and %i1, 0xfff, %i1 4000decc: b2 16 40 01 or %i1, %g1, %i1 IMFS_update_ctime( jnode ); 4000ded0: 7f ff f5 02 call 4000b2d8 4000ded4: f2 34 20 2e sth %i1, [ %l0 + 0x2e ] 4000ded8: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000dedc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000dee0: 81 c7 e0 08 ret 4000dee4: 91 e8 20 00 restore %g0, 0, %o0 4000aa90 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000aa90: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000aa94: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000aa98: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 4000aa9c: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 4000aaa0: 40 00 0b 3d call 4000d794 <== NOT EXECUTED 4000aaa4: 90 04 20 50 add %l0, 0x50, %o0 <== NOT EXECUTED if (! err) { 4000aaa8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000aaac: 12 80 00 12 bne 4000aaf4 <== NOT EXECUTED 4000aab0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 4000aab4: 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) 4000aab8: 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; 4000aabc: 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) 4000aac0: 40 00 02 3e call 4000b3b8 <== NOT EXECUTED 4000aac4: c2 24 60 18 st %g1, [ %l1 + 0x18 ] <== NOT EXECUTED 4000aac8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000aacc: 12 80 00 10 bne 4000ab0c <== NOT EXECUTED 4000aad0: 01 00 00 00 nop <== NOT EXECUTED 4000aad4: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 4000aad8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000aadc: 12 80 00 0c bne 4000ab0c <== NOT EXECUTED 4000aae0: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 4000aae4: 40 00 01 90 call 4000b124 <== NOT EXECUTED 4000aae8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000aaec: 81 c7 e0 08 ret <== NOT EXECUTED 4000aaf0: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000aaf4: 16 80 00 06 bge 4000ab0c <== NOT EXECUTED 4000aaf8: 01 00 00 00 nop <== NOT EXECUTED 4000aafc: 40 00 12 f8 call 4000f6dc <__errno> <== NOT EXECUTED 4000ab00: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000ab04: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000ab08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 4000ab0c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ab10: 81 e8 00 00 restore <== NOT EXECUTED 4000a940 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000a940: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 4000a944: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000a948: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED int err; if (command == FIONBIO) { 4000a94c: 82 10 62 7e or %g1, 0x27e, %g1 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000a950: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED int err; if (command == FIONBIO) { 4000a954: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000a958: 12 80 00 0f bne 4000a994 <== NOT EXECUTED 4000a95c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (buffer == NULL) 4000a960: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000a964: 02 80 00 12 be 4000a9ac <== NOT EXECUTED 4000a968: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 4000a96c: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 4000a970: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000a974: 02 80 00 04 be 4000a984 <== NOT EXECUTED 4000a978: c2 02 e0 18 ld [ %o3 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 4000a97c: 10 80 00 03 b 4000a988 <== NOT EXECUTED 4000a980: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000a984: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000a988: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 4000a98c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a990: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 4000a994: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 4000a998: 40 00 0a 7c call 4000d388 <== NOT EXECUTED 4000a99c: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a9a0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a9a4: 16 80 00 06 bge 4000a9bc <== NOT EXECUTED 4000a9a8: 01 00 00 00 nop <== NOT EXECUTED 4000a9ac: 40 00 13 4c call 4000f6dc <__errno> <== NOT EXECUTED 4000a9b0: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000a9b4: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000a9b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 4000a9bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000a9c0: 81 e8 00 00 restore <== NOT EXECUTED 4000a8e8 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4000a8e8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000a8ec: 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 ) { 4000a8f0: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4000a8f4: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000a8f8: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 4000a8fc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a900: 40 00 0a 85 call 4000d314 <== NOT EXECUTED 4000a904: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000a908: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 4000a90c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000a910: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000a914: 16 80 00 08 bge 4000a934 <== NOT EXECUTED 4000a918: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED 4000a91c: 40 00 13 70 call 4000f6dc <__errno> <== NOT EXECUTED 4000a920: a0 20 00 10 neg %l0 <== NOT EXECUTED 4000a924: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 4000a928: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 4000a92c: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 4000a930: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED } 4000a934: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 4000a938: 81 c7 e0 08 ret <== NOT EXECUTED 4000a93c: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED 4000aa2c : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000aa2c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000aa30: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000aa34: 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); 4000aa38: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000aa3c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000aa40: 40 00 0a 6b call 4000d3ec <== NOT EXECUTED 4000aa44: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 4000aa48: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000aa4c: 04 80 00 08 ble 4000aa6c <== NOT EXECUTED 4000aa50: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 4000aa54: 40 00 02 21 call 4000b2d8 <== NOT EXECUTED 4000aa58: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000aa5c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000aa60: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED 4000aa64: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa68: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000aa6c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000aa70: 02 80 00 06 be 4000aa88 <== NOT EXECUTED 4000aa74: 01 00 00 00 nop <== NOT EXECUTED 4000aa78: 40 00 13 19 call 4000f6dc <__errno> <== NOT EXECUTED 4000aa7c: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000aa80: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000aa84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 4000aa88: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa8c: 81 e8 00 00 restore <== NOT EXECUTED 4000a9c4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000a9c4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000a9c8: 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 ) { 4000a9cc: 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); 4000a9d0: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 4000a9d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a9d8: 40 00 0a ec call 4000d588 <== NOT EXECUTED 4000a9dc: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 4000a9e0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000a9e4: 04 80 00 09 ble 4000aa08 <== NOT EXECUTED 4000a9e8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 4000a9ec: 40 00 02 3b call 4000b2d8 <== NOT EXECUTED 4000a9f0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a9f4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000a9f8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4000a9fc: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 4000aa00: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa04: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4000aa08: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000aa0c: 02 80 00 06 be 4000aa24 <== NOT EXECUTED 4000aa10: 01 00 00 00 nop <== NOT EXECUTED 4000aa14: 40 00 13 32 call 4000f6dc <__errno> <== NOT EXECUTED 4000aa18: b0 20 00 18 neg %i0 <== NOT EXECUTED 4000aa1c: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000aa20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 4000aa24: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa28: 81 e8 00 00 restore <== NOT EXECUTED 4000ab4c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000ab4c: 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 ); 4000ab50: 80 a6 20 00 cmp %i0, 0 4000ab54: 12 80 00 0a bne 4000ab7c 4000ab58: 80 a6 60 00 cmp %i1, 0 4000ab5c: 11 10 00 70 sethi %hi(0x4001c000), %o0 <== NOT EXECUTED 4000ab60: 15 10 00 70 sethi %hi(0x4001c000), %o2 <== NOT EXECUTED 4000ab64: 17 10 00 70 sethi %hi(0x4001c000), %o3 <== NOT EXECUTED 4000ab68: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4000ab6c: 94 12 a3 20 or %o2, 0x320, %o2 <== NOT EXECUTED 4000ab70: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 4000ab74: 7f ff e0 85 call 40002d88 <__assert_func> <== NOT EXECUTED 4000ab78: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 4000ab7c: 02 80 00 1c be 4000abec 4000ab80: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000ab84: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000ab88: 40 00 16 3b call 40010474 4000ab8c: 92 12 63 10 or %o1, 0x310, %o1 ! 4001c310 4000ab90: 80 a2 20 00 cmp %o0, 0 4000ab94: 02 80 00 09 be 4000abb8 4000ab98: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000ab9c: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000aba0: 40 00 16 35 call 40010474 4000aba4: 92 12 63 18 or %o1, 0x318, %o1 ! 4001c318 4000aba8: 80 a2 20 00 cmp %o0, 0 4000abac: 12 80 00 05 bne 4000abc0 4000abb0: a0 06 20 54 add %i0, 0x54, %l0 return directory->Parent; 4000abb4: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000abb8: 81 c7 e0 08 ret <== NOT EXECUTED 4000abbc: 81 e8 00 00 restore <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 4000abc0: 10 80 00 08 b 4000abe0 4000abc4: 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 ) ) 4000abc8: 40 00 16 2b call 40010474 4000abcc: 92 06 20 0c add %i0, 0xc, %o1 4000abd0: 80 a2 20 00 cmp %o0, 0 4000abd4: 02 80 00 07 be 4000abf0 4000abd8: 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 ) { 4000abdc: 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; 4000abe0: 80 a6 00 10 cmp %i0, %l0 4000abe4: 12 bf ff f9 bne 4000abc8 4000abe8: 90 10 00 19 mov %i1, %o0 4000abec: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000abf0: 81 c7 e0 08 ret 4000abf4: 81 e8 00 00 restore 400103b4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 400103b4: 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; 400103b8: 94 10 20 14 mov 0x14, %o2 400103bc: 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; 400103c0: 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 ); 400103c4: 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; 400103c8: 40 00 15 d3 call 40015b14 400103cc: 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; 400103d0: c0 26 20 1c clr [ %i0 + 0x1c ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 400103d4: e0 27 bf ec st %l0, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 400103d8: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 400103dc: 7f ff fd 52 call 4000f924 400103e0: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 400103e4: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 400103e8: 80 a0 a0 01 cmp %g2, 1 400103ec: 12 80 00 06 bne 40010404 400103f0: 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; 400103f4: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 400103f8: 80 a0 80 01 cmp %g2, %g1 400103fc: 12 80 00 09 bne 40010420 40010400: 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 ); 40010404: 90 10 20 00 clr %o0 40010408: 7f ff cf 7b call 400041f4 4001040c: 92 10 00 11 mov %l1, %o1 if (result != 0) 40010410: 80 a2 20 00 cmp %o0, 0 40010414: 12 80 00 13 bne 40010460 40010418: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 4001041c: 80 a4 20 00 cmp %l0, 0 40010420: 22 80 00 11 be,a 40010464 40010424: b0 10 20 00 clr %i0 if ( jnode->type == IMFS_DIRECTORY ) { 40010428: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001042c: 80 a0 60 01 cmp %g1, 1 40010430: 32 bf ff ea bne,a 400103d8 40010434: e0 27 bf ec st %l0, [ %fp + -20 ] <== NOT EXECUTED 40010438: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 4001043c: 84 04 20 54 add %l0, 0x54, %g2 40010440: 80 a0 40 02 cmp %g1, %g2 40010444: 22 bf ff e5 be,a 400103d8 40010448: e0 27 bf ec st %l0, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4001044c: a0 90 60 00 orcc %g1, 0, %l0 40010450: 32 bf ff e2 bne,a 400103d8 40010454: e0 27 bf ec st %l0, [ %fp + -20 ] 40010458: 81 c7 e0 08 ret <== NOT EXECUTED 4001045c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40010460: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return 0; } 40010464: 81 c7 e0 08 ret 40010468: 81 e8 00 00 restore 4000acec : 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 ) { 4000acec: 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, 4000acf0: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000acf4: c2 00 63 18 ld [ %g1 + 0x318 ], %g1 ! 4001cf18 4000acf8: 86 10 20 00 clr %g3 4000acfc: 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) { 4000ad00: 80 a0 80 01 cmp %g2, %g1 4000ad04: 02 80 00 06 be 4000ad1c 4000ad08: 86 00 e0 01 inc %g3 4000ad0c: 80 a0 e0 06 cmp %g3, 6 4000ad10: 12 bf ff fc bne 4000ad00 4000ad14: 85 28 a0 01 sll %g2, 1, %g2 4000ad18: 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) 4000ad1c: 03 10 00 75 sethi %hi(0x4001d400), %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(); 4000ad20: 40 00 0b ff call 4000dd1c 4000ad24: c4 20 62 ec st %g2, [ %g1 + 0x2ec ] ! 4001d6ec 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; 4000ad28: 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(); 4000ad2c: 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; 4000ad30: 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; 4000ad34: 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; 4000ad38: 13 10 00 71 sethi %hi(0x4001c400), %o1 4000ad3c: 90 06 20 38 add %i0, 0x38, %o0 4000ad40: 40 00 14 a2 call 4000ffc8 4000ad44: 92 12 62 94 or %o1, 0x294, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000ad48: 90 10 20 01 mov 1, %o0 4000ad4c: 40 00 00 b0 call 4000b00c 4000ad50: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ) { 4000ad54: 82 92 20 00 orcc %o0, 0, %g1 4000ad58: 12 80 00 0a bne 4000ad80 4000ad5c: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 free(temp_mt_entry->mt_fs_root.node_access); 4000ad60: 40 00 00 f1 call 4000b124 <== NOT EXECUTED 4000ad64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000ad68: 40 00 12 5d call 4000f6dc <__errno> <== NOT EXECUTED 4000ad6c: 01 00 00 00 nop <== NOT EXECUTED 4000ad70: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000ad74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ad78: 81 c7 e0 08 ret <== NOT EXECUTED 4000ad7c: 81 e8 00 00 restore <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000ad80: 84 10 20 01 mov 1, %g2 4000ad84: 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; 4000ad88: 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; 4000ad8c: f6 20 60 08 st %i3, [ %g1 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000ad90: 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; 4000ad94: 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(); 4000ad98: 40 00 09 61 call 4000d31c 4000ad9c: b0 10 20 00 clr %i0 return 0; } 4000ada0: 81 c7 e0 08 ret 4000ada4: 81 e8 00 00 restore 40003ec8 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40003ec8: 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; 40003ecc: c2 06 00 00 ld [ %i0 ], %g1 40003ed0: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40003ed4: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 40003ed8: 80 a0 60 07 cmp %g1, 7 40003edc: 08 80 00 06 bleu 40003ef4 40003ee0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMLINK ); 40003ee4: 40 00 44 d1 call 40015228 <__errno> 40003ee8: 01 00 00 00 nop 40003eec: 10 80 00 17 b 40003f48 40003ef0: 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 ); 40003ef4: 40 00 48 6b call 400160a0 40003ef8: 90 10 00 1a mov %i2, %o0 40003efc: a0 07 bf b0 add %fp, -80, %l0 40003f00: 92 10 00 08 mov %o0, %o1 40003f04: 96 07 bf fc add %fp, -4, %o3 40003f08: 94 10 00 10 mov %l0, %o2 40003f0c: 40 00 31 83 call 40010518 40003f10: 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( 40003f14: 90 10 00 19 mov %i1, %o0 40003f18: 94 10 00 10 mov %l0, %o2 40003f1c: 92 10 20 03 mov 3, %o1 40003f20: 17 00 00 28 sethi %hi(0xa000), %o3 40003f24: 98 07 bf d8 add %fp, -40, %o4 40003f28: 40 00 2e 32 call 4000f7f0 40003f2c: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40003f30: 80 a2 20 00 cmp %o0, 0 40003f34: 12 80 00 08 bne 40003f54 40003f38: c2 07 bf d8 ld [ %fp + -40 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40003f3c: 40 00 44 bb call 40015228 <__errno> <== NOT EXECUTED 40003f40: 01 00 00 00 nop <== NOT EXECUTED 40003f44: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40003f48: c2 22 00 00 st %g1, [ %o0 ] 40003f4c: 81 c7 e0 08 ret 40003f50: 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 ); 40003f54: 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++; 40003f58: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 40003f5c: 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++; 40003f60: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 40003f64: 40 00 02 66 call 400048fc 40003f68: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] 40003f6c: c4 07 bf f4 ld [ %fp + -12 ], %g2 40003f70: c2 07 bf d8 ld [ %fp + -40 ], %g1 40003f74: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40003f78: 81 c7 e0 08 ret 40003f7c: 91 e8 20 00 restore %g0, 0, %o0 40013260 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40013260: 9d e3 bf a0 save %sp, -96, %sp 40013264: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 40013268: 80 a6 20 00 cmp %i0, 0 4001326c: 12 80 00 0a bne 40013294 40013270: 92 10 00 19 mov %i1, %o1 40013274: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013278: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001327c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013280: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013284: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 40013288: 96 12 e0 40 or %o3, 0x40, %o3 <== NOT EXECUTED 4001328c: 10 80 00 0c b 400132bc <== NOT EXECUTED 40013290: 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 ); 40013294: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013298: 80 a0 60 05 cmp %g1, 5 4001329c: 02 80 00 0a be 400132c4 400132a0: 15 10 00 8a sethi %hi(0x40022800), %o2 400132a4: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400132a8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400132ac: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 400132b0: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 400132b4: 96 12 e0 50 or %o3, 0x50, %o3 <== NOT EXECUTED 400132b8: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 400132bc: 7f ff c4 70 call 4000447c <__assert_func> <== NOT EXECUTED 400132c0: 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 ); 400132c4: 7f ff fe 6c call 40012c74 400132c8: 94 10 20 01 mov 1, %o2 ! 1 if ( *block_entry_ptr ) 400132cc: 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 ); 400132d0: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 400132d4: 80 a0 60 00 cmp %g1, 0 400132d8: 12 80 00 09 bne 400132fc 400132dc: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 400132e0: 7f ff fe 58 call 40012c40 400132e4: b0 10 20 01 mov 1, %i0 if ( !memory ) 400132e8: 80 a2 20 00 cmp %o0, 0 400132ec: 02 80 00 04 be 400132fc 400132f0: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 400132f4: d0 24 00 00 st %o0, [ %l0 ] 400132f8: b0 10 20 00 clr %i0 return 0; } 400132fc: 81 c7 e0 08 ret 40013300: 81 e8 00 00 restore 40013304 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40013304: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013308: 80 a6 20 00 cmp %i0, 0 4001330c: 32 80 00 0a bne,a 40013334 40013310: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013314: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013318: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001331c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013320: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013324: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 40013328: 96 12 e0 40 or %o3, 0x40, %o3 <== NOT EXECUTED 4001332c: 10 80 00 0c b 4001335c <== NOT EXECUTED 40013330: 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 ); 40013334: 80 a0 60 05 cmp %g1, 5 40013338: 02 80 00 0b be 40013364 4001333c: 03 10 00 8e sethi %hi(0x40023800), %g1 40013340: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013344: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013348: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 4001334c: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013350: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 40013354: 96 12 e0 50 or %o3, 0x50, %o3 <== NOT EXECUTED 40013358: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 4001335c: 7f ff c4 48 call 4000447c <__assert_func> <== NOT EXECUTED 40013360: 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 ) 40013364: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 40013368: a3 34 20 02 srl %l0, 2, %l1 4001336c: 92 10 00 11 mov %l1, %o1 40013370: 40 00 2c ec call 4001e720 <.umul> 40013374: 90 04 60 01 add %l1, 1, %o0 40013378: 92 10 00 11 mov %l1, %o1 4001337c: 40 00 2c e9 call 4001e720 <.umul> 40013380: 90 02 20 01 inc %o0 40013384: 92 10 00 10 mov %l0, %o1 40013388: 40 00 2c e6 call 4001e720 <.umul> 4001338c: 90 02 3f ff add %o0, -1, %o0 40013390: 82 10 20 00 clr %g1 40013394: 80 a0 40 19 cmp %g1, %i1 40013398: 34 80 00 0b bg,a 400133c4 4001339c: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 <== NOT EXECUTED 400133a0: 80 a0 40 19 cmp %g1, %i1 400133a4: 12 80 00 04 bne 400133b4 400133a8: 80 a2 00 1a cmp %o0, %i2 400133ac: 38 80 00 06 bgu,a 400133c4 400133b0: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 400133b4: 40 00 07 9d call 40015228 <__errno> <== NOT EXECUTED 400133b8: 01 00 00 00 nop <== NOT EXECUTED 400133bc: 10 80 00 2b b 40013468 <== NOT EXECUTED 400133c0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 400133c4: 80 a6 40 11 cmp %i1, %l1 400133c8: 14 80 00 09 bg 400133ec 400133cc: e6 06 20 54 ld [ %i0 + 0x54 ], %l3 400133d0: 80 a6 40 11 cmp %i1, %l1 400133d4: 12 80 00 04 bne 400133e4 400133d8: 80 a6 80 13 cmp %i2, %l3 400133dc: 18 80 00 05 bgu 400133f0 400133e0: a5 3c 20 1f sra %l0, 0x1f, %l2 400133e4: 81 c7 e0 08 ret 400133e8: 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; 400133ec: a5 3c 20 1f sra %l0, 0x1f, %l2 <== NOT EXECUTED 400133f0: 96 10 00 10 mov %l0, %o3 400133f4: 94 10 00 12 mov %l2, %o2 400133f8: 90 10 00 19 mov %i1, %o0 400133fc: 40 00 2e 8e call 4001ee34 <__divdi3> 40013400: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013404: 90 10 00 11 mov %l1, %o0 40013408: 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; 4001340c: a8 10 00 09 mov %o1, %l4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013410: 94 10 00 12 mov %l2, %o2 40013414: 40 00 2e 88 call 4001ee34 <__divdi3> 40013418: 92 10 00 13 mov %l3, %o1 4001341c: a2 10 00 09 mov %o1, %l1 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 40013420: 10 80 00 15 b 40013474 40013424: a0 10 00 09 mov %o1, %l0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 40013428: 7f ff ff 8e call 40013260 4001342c: 92 10 00 10 mov %l0, %o1 40013430: 80 a2 20 00 cmp %o0, 0 40013434: 22 80 00 10 be,a 40013474 40013438: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 4001343c: 10 80 00 06 b 40013454 <== NOT EXECUTED 40013440: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 40013444: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40013448: 7f ff fe d7 call 40012fa4 <== NOT EXECUTED 4001344c: 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-- ) { 40013450: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 40013454: 1a bf ff fc bcc 40013444 <== NOT EXECUTED 40013458: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4001345c: 40 00 07 73 call 40015228 <__errno> <== NOT EXECUTED 40013460: 01 00 00 00 nop <== NOT EXECUTED 40013464: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40013468: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001346c: 81 c7 e0 08 ret <== NOT EXECUTED 40013470: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 40013474: 80 a4 00 14 cmp %l0, %l4 40013478: 08 bf ff ec bleu 40013428 4001347c: 90 10 00 18 mov %i0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 40013480: f4 26 20 54 st %i2, [ %i0 + 0x54 ] 40013484: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 40013488: 81 c7 e0 08 ret 4001348c: 91 e8 20 00 restore %g0, 0, %o0 40012c74 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40012c74: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012c78: 80 a6 20 00 cmp %i0, 0 40012c7c: 32 80 00 0a bne,a 40012ca4 40012c80: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012c84: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40012c88: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012c8c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40012c90: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40012c94: 94 12 a1 28 or %o2, 0x128, %o2 <== NOT EXECUTED 40012c98: 96 12 e0 40 or %o3, 0x40, %o3 <== NOT EXECUTED 40012c9c: 10 80 00 0c b 40012ccc <== NOT EXECUTED 40012ca0: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012ca4: 80 a0 60 05 cmp %g1, 5 40012ca8: 02 80 00 0b be 40012cd4 40012cac: 03 10 00 8e sethi %hi(0x40023800), %g1 40012cb0: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40012cb4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012cb8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40012cbc: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40012cc0: 94 12 a1 28 or %o2, 0x128, %o2 <== NOT EXECUTED 40012cc4: 96 12 e0 50 or %o3, 0x50, %o3 <== NOT EXECUTED 40012cc8: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED 40012ccc: 7f ff c5 ec call 4000447c <__assert_func> <== NOT EXECUTED 40012cd0: 01 00 00 00 nop <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40012cd4: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 40012cd8: a1 34 20 02 srl %l0, 2, %l0 40012cdc: 82 04 3f ff add %l0, -1, %g1 40012ce0: 80 a6 40 01 cmp %i1, %g1 40012ce4: 18 80 00 16 bgu 40012d3c 40012ce8: 90 04 20 01 add %l0, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40012cec: 80 a6 a0 00 cmp %i2, 0 40012cf0: 02 80 00 0f be 40012d2c 40012cf4: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 40012cf8: 80 a0 60 00 cmp %g1, 0 40012cfc: 32 80 00 09 bne,a 40012d20 40012d00: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 p = memfile_alloc_block(); 40012d04: 7f ff ff cf call 40012c40 40012d08: 01 00 00 00 nop if ( !p ) 40012d0c: 80 a2 20 00 cmp %o0, 0 40012d10: 22 80 00 86 be,a 40012f28 40012d14: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 40012d18: d0 26 20 58 st %o0, [ %i0 + 0x58 ] } return &info->indirect[ my_block ]; 40012d1c: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 40012d20: b3 2e 60 02 sll %i1, 2, %i1 40012d24: 81 c7 e0 08 ret 40012d28: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) return 0; return &info->indirect[ my_block ]; 40012d2c: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40012d30: 80 a0 60 00 cmp %g1, 0 return 0; return &info->indirect[ my_block ]; 40012d34: 10 80 00 32 b 40012dfc 40012d38: b0 00 40 19 add %g1, %i1, %i0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40012d3c: 40 00 2e 79 call 4001e720 <.umul> <== NOT EXECUTED 40012d40: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012d44: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 40012d48: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40012d4c: 18 80 00 30 bgu 40012e0c <== NOT EXECUTED 40012d50: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40012d54: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40012d58: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012d5c: 40 00 2f 57 call 4001eab8 <.urem> <== NOT EXECUTED 40012d60: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012d64: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40012d68: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012d6c: 40 00 2e a7 call 4001e808 <.udiv> <== NOT EXECUTED 40012d70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40012d74: 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; 40012d78: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40012d7c: 02 80 00 18 be 40012ddc <== NOT EXECUTED 40012d80: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 40012d84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012d88: 12 80 00 08 bne 40012da8 <== NOT EXECUTED 40012d8c: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED p = memfile_alloc_block(); 40012d90: 7f ff ff ac call 40012c40 <== NOT EXECUTED 40012d94: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40012d98: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40012d9c: 22 80 00 63 be,a 40012f28 <== NOT EXECUTED 40012da0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40012da4: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 40012da8: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 40012dac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012db0: 12 80 00 08 bne 40012dd0 <== NOT EXECUTED 40012db4: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 40012db8: 7f ff ff a2 call 40012c40 <== NOT EXECUTED 40012dbc: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40012dc0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012dc4: 22 80 00 59 be,a 40012f28 <== NOT EXECUTED 40012dc8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40012dcc: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 40012dd0: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012dd4: 81 c7 e0 08 ret <== NOT EXECUTED 40012dd8: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED } if ( !p ) 40012ddc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012de0: 02 80 00 52 be 40012f28 <== NOT EXECUTED 40012de4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40012de8: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 40012dec: 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 ]; 40012df0: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40012df4: 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 ]; 40012df8: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40012dfc: 12 80 00 4b bne 40012f28 40012e00: 01 00 00 00 nop p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40012e04: 81 c7 e0 08 ret <== NOT EXECUTED 40012e08: 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 ) { 40012e0c: 90 02 20 01 inc %o0 <== NOT EXECUTED 40012e10: 40 00 2e 44 call 4001e720 <.umul> <== NOT EXECUTED 40012e14: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012e18: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40012e1c: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40012e20: 18 80 00 41 bgu 40012f24 <== NOT EXECUTED 40012e24: b2 26 40 11 sub %i1, %l1, %i1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40012e28: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012e2c: 40 00 2f 23 call 4001eab8 <.urem> <== NOT EXECUTED 40012e30: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012e34: 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; 40012e38: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012e3c: 40 00 2e 73 call 4001e808 <.udiv> <== NOT EXECUTED 40012e40: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40012e44: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012e48: 40 00 2e 70 call 4001e808 <.udiv> <== NOT EXECUTED 40012e4c: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40012e50: 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; 40012e54: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40012e58: 40 00 2f 18 call 4001eab8 <.urem> <== NOT EXECUTED 40012e5c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40012e60: 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; 40012e64: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40012e68: 02 80 00 23 be 40012ef4 <== NOT EXECUTED 40012e6c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 40012e70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012e74: 12 80 00 08 bne 40012e94 <== NOT EXECUTED 40012e78: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED p = memfile_alloc_block(); 40012e7c: 7f ff ff 71 call 40012c40 <== NOT EXECUTED 40012e80: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40012e84: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40012e88: 22 80 00 28 be,a 40012f28 <== NOT EXECUTED 40012e8c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 40012e90: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 40012e94: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 40012e98: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40012e9c: 12 80 00 08 bne 40012ebc <== NOT EXECUTED 40012ea0: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED p1 = memfile_alloc_block(); 40012ea4: 7f ff ff 67 call 40012c40 <== NOT EXECUTED 40012ea8: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40012eac: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40012eb0: 02 80 00 1e be 40012f28 <== NOT EXECUTED 40012eb4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40012eb8: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 40012ebc: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40012ec0: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 40012ec4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012ec8: 12 80 00 08 bne 40012ee8 <== NOT EXECUTED 40012ecc: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40012ed0: 7f ff ff 5c call 40012c40 <== NOT EXECUTED 40012ed4: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40012ed8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012edc: 22 80 00 13 be,a 40012f28 <== NOT EXECUTED 40012ee0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40012ee4: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 40012ee8: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 40012eec: 81 c7 e0 08 ret <== NOT EXECUTED 40012ef0: 91 ea 00 12 restore %o0, %l2, %o0 <== NOT EXECUTED } if ( !p ) 40012ef4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012ef8: 02 80 00 0c be 40012f28 <== NOT EXECUTED 40012efc: 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 ]; 40012f00: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012f04: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 40012f08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012f0c: 02 80 00 07 be 40012f28 <== NOT EXECUTED 40012f10: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40012f14: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 40012f18: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 40012f1c: 81 c7 e0 08 ret <== NOT EXECUTED 40012f20: 91 ee 00 12 restore %i0, %l2, %o0 <== NOT EXECUTED 40012f24: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40012f28: 81 c7 e0 08 ret 40012f2c: 81 e8 00 00 restore 40013910 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40013910: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013914: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40013918: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 4001391c: 12 80 00 0a bne 40013944 40013920: a6 10 00 1a mov %i2, %l3 40013924: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013928: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001392c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013930: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013934: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 40013938: 96 12 e0 40 or %o3, 0x40, %o3 <== NOT EXECUTED 4001393c: 10 80 00 0e b 40013974 <== NOT EXECUTED 40013940: 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 || 40013944: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013948: 84 00 7f fb add %g1, -5, %g2 4001394c: 80 a0 a0 01 cmp %g2, 1 40013950: 08 80 00 0b bleu 4001397c 40013954: 80 a6 e0 00 cmp %i3, 0 40013958: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 4001395c: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013960: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013964: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013968: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 4001396c: 96 12 e0 d0 or %o3, 0xd0, %o3 <== NOT EXECUTED 40013970: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED 40013974: 7f ff c2 c2 call 4000447c <__assert_func> <== NOT EXECUTED 40013978: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4001397c: 32 80 00 0a bne,a 400139a4 40013980: 80 a7 20 00 cmp %i4, 0 40013984: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013988: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001398c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013990: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013994: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 40013998: 96 12 e1 20 or %o3, 0x120, %o3 <== NOT EXECUTED 4001399c: 10 bf ff f6 b 40013974 <== NOT EXECUTED 400139a0: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 400139a4: 12 80 00 08 bne 400139c4 400139a8: 80 a0 60 06 cmp %g1, 6 rtems_set_errno_and_return_minus_one( EINVAL ); 400139ac: 40 00 06 1f call 40015228 <__errno> <== NOT EXECUTED 400139b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400139b4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400139b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400139bc: 81 c7 e0 08 ret <== NOT EXECUTED 400139c0: 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) { 400139c4: 32 80 00 1d bne,a 40013a38 400139c8: 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)) 400139cc: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 400139d0: 82 10 20 00 clr %g1 <== NOT EXECUTED 400139d4: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 400139d8: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 400139dc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400139e0: 14 80 00 0a bg 40013a08 <== NOT EXECUTED 400139e4: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED 400139e8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400139ec: 12 80 00 08 bne 40013a0c <== NOT EXECUTED 400139f0: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED 400139f4: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 400139f8: 38 80 00 05 bgu,a 40013a0c <== NOT EXECUTED 400139fc: 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); 40013a00: 10 80 00 04 b 40013a10 <== NOT EXECUTED 40013a04: 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; 40013a08: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 40013a0c: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40013a10: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40013a14: 40 00 08 40 call 40015b14 <== NOT EXECUTED 40013a18: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40013a1c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40013a20: 7f ff c3 b7 call 400048fc <== NOT EXECUTED 40013a24: 92 10 20 00 clr %o1 <== NOT EXECUTED 40013a28: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40013a2c: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 40013a30: 81 c7 e0 08 ret <== NOT EXECUTED 40013a34: 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 ) 40013a38: 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; 40013a3c: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 40013a40: 80 a1 00 03 cmp %g4, %g3 40013a44: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 40013a48: 14 80 00 08 bg 40013a68 40013a4c: 9a 07 00 1a add %i4, %i2, %o5 40013a50: 80 a1 00 03 cmp %g4, %g3 40013a54: 32 80 00 07 bne,a 40013a70 40013a58: 03 10 00 8e sethi %hi(0x40023800), %g1 <== NOT EXECUTED 40013a5c: 80 a3 40 02 cmp %o5, %g2 40013a60: 28 80 00 04 bleu,a 40013a70 40013a64: 03 10 00 8e sethi %hi(0x40023800), %g1 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 40013a68: 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; 40013a6c: 03 10 00 8e sethi %hi(0x40023800), %g1 40013a70: e2 00 60 e4 ld [ %g1 + 0xe4 ], %l1 ! 400238e4 40013a74: 90 10 00 12 mov %l2, %o0 40013a78: 92 10 00 13 mov %l3, %o1 40013a7c: ab 3c 60 1f sra %l1, 0x1f, %l5 40013a80: 96 10 00 11 mov %l1, %o3 40013a84: 40 00 2d d3 call 4001f1d0 <__moddi3> 40013a88: 94 10 00 15 mov %l5, %o2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013a8c: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40013a90: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013a94: 94 10 00 15 mov %l5, %o2 40013a98: 92 10 00 13 mov %l3, %o1 40013a9c: 40 00 2c e6 call 4001ee34 <__divdi3> 40013aa0: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40013aa4: 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; 40013aa8: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 40013aac: a6 10 00 1b mov %i3, %l3 40013ab0: 02 80 00 1c be 40013b20 40013ab4: 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 ); 40013ab8: 90 10 00 10 mov %l0, %o0 40013abc: 7f ff fc 6e call 40012c74 40013ac0: 94 10 20 00 clr %o2 assert( block_ptr ); 40013ac4: 80 a2 20 00 cmp %o0, 0 40013ac8: 32 80 00 0a bne,a 40013af0 40013acc: a2 24 40 14 sub %l1, %l4, %l1 40013ad0: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013ad4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013ad8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013adc: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013ae0: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 40013ae4: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED 40013ae8: 10 bf ff a3 b 40013974 <== NOT EXECUTED 40013aec: 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; 40013af0: 80 a7 00 11 cmp %i4, %l1 40013af4: 08 80 00 03 bleu 40013b00 40013af8: 94 10 00 1c mov %i4, %o2 40013afc: 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 ); 40013b00: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 40013b04: 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 ); 40013b08: 92 02 40 14 add %o1, %l4, %o1 dest += to_copy; block++; 40013b0c: a4 04 a0 01 inc %l2 my_length -= to_copy; 40013b10: b8 27 00 0a sub %i4, %o2, %i4 40013b14: 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 ); 40013b18: 40 00 07 ff call 40015b14 40013b1c: 90 10 00 1b mov %i3, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40013b20: 03 10 00 8e sethi %hi(0x40023800), %g1 40013b24: a2 10 20 00 clr %l1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40013b28: b6 10 60 e4 or %g1, 0xe4, %i3 40013b2c: 10 80 00 17 b 40013b88 40013b30: e8 00 60 e4 ld [ %g1 + 0xe4 ], %l4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013b34: 90 10 00 10 mov %l0, %o0 40013b38: 92 10 00 12 mov %l2, %o1 40013b3c: 94 10 20 00 clr %o2 40013b40: 7f ff fc 4d call 40012c74 40013b44: a2 04 40 14 add %l1, %l4, %l1 assert( block_ptr ); 40013b48: 80 a2 20 00 cmp %o0, 0 40013b4c: 32 80 00 0a bne,a 40013b74 40013b50: d2 02 00 00 ld [ %o0 ], %o1 40013b54: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013b58: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013b5c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013b60: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013b64: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 40013b68: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED 40013b6c: 10 bf ff 82 b 40013974 <== NOT EXECUTED 40013b70: 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++; 40013b74: 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 ); 40013b78: 90 10 00 15 mov %l5, %o0 dest += to_copy; block++; my_length -= to_copy; 40013b7c: 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 ); 40013b80: 40 00 07 e5 call 40015b14 40013b84: 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 ) { 40013b88: 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; 40013b8c: 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 ) { 40013b90: 80 a7 00 01 cmp %i4, %g1 40013b94: 1a bf ff e8 bcc 40013b34 40013b98: 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 ) { 40013b9c: 80 a7 20 00 cmp %i4, 0 40013ba0: 02 80 00 16 be 40013bf8 40013ba4: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013ba8: 92 10 00 12 mov %l2, %o1 40013bac: 90 10 00 10 mov %l0, %o0 40013bb0: 7f ff fc 31 call 40012c74 40013bb4: 94 10 20 00 clr %o2 assert( block_ptr ); 40013bb8: 80 a2 20 00 cmp %o0, 0 40013bbc: 32 80 00 0a bne,a 40013be4 40013bc0: d2 02 00 00 ld [ %o0 ], %o1 40013bc4: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013bc8: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013bcc: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013bd0: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013bd4: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 40013bd8: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED 40013bdc: 10 bf ff 66 b 40013974 <== NOT EXECUTED 40013be0: 92 10 22 b9 mov 0x2b9, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 40013be4: 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 ); 40013be8: 90 10 00 15 mov %l5, %o0 40013bec: 40 00 07 ca call 40015b14 40013bf0: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 40013bf4: 90 07 bf f8 add %fp, -8, %o0 40013bf8: 7f ff c3 41 call 400048fc 40013bfc: 92 10 20 00 clr %o1 40013c00: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013c04: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return copied; } 40013c08: 81 c7 e0 08 ret 40013c0c: 81 e8 00 00 restore 40012ff8 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 40012ff8: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012ffc: 80 a6 20 00 cmp %i0, 0 40013000: 32 80 00 0a bne,a 40013028 40013004: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013008: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 4001300c: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013010: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013014: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013018: 94 12 a1 78 or %o2, 0x178, %o2 <== NOT EXECUTED 4001301c: 96 12 e0 40 or %o3, 0x40, %o3 <== NOT EXECUTED 40013020: 10 80 00 0c b 40013050 <== NOT EXECUTED 40013024: 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 ); 40013028: 80 a0 60 05 cmp %g1, 5 4001302c: 02 80 00 0b be 40013058 40013030: 03 10 00 8e sethi %hi(0x40023800), %g1 40013034: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013038: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001303c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013040: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013044: 94 12 a1 78 or %o2, 0x178, %o2 <== NOT EXECUTED 40013048: 96 12 e0 50 or %o3, 0x50, %o3 <== NOT EXECUTED 4001304c: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 40013050: 7f ff c5 0b call 4000447c <__assert_func> <== NOT EXECUTED 40013054: 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; 40013058: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4001305c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 40013060: 80 a0 60 00 cmp %g1, 0 40013064: 02 80 00 05 be 40013078 40013068: a1 34 20 02 srl %l0, 2, %l0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 4001306c: 90 06 20 58 add %i0, 0x58, %o0 40013070: 7f ff ff b0 call 40012f30 40013074: 92 10 00 10 mov %l0, %o1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40013078: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 4001307c: 80 a0 60 00 cmp %g1, 0 40013080: 22 80 00 17 be,a 400130dc 40013084: 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; 4001308c: 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 40013094: a4 14 a0 e4 or %l2, 0xe4, %l2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 40013098: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 4001309c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 400130a0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400130a4: 02 80 00 04 be 400130b4 <== NOT EXECUTED 400130a8: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 400130ac: 7f ff ff a1 call 40012f30 <== NOT EXECUTED 400130b0: 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 400130c8: 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 ); 400130cc: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 400130d0: 7f ff ff 98 call 40012f30 <== NOT EXECUTED 400130d4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400130d8: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED 400130dc: 80 a0 60 00 cmp %g1, 0 400130e0: 02 80 00 25 be 40013174 400130e4: 29 10 00 8e sethi %hi(0x40023800), %l4 400130e8: 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 400130f0: a8 15 20 e4 or %l4, 0xe4, %l4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400130f4: ab 2c 60 02 sll %l1, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 400130f8: e4 00 40 15 ld [ %g1 + %l5 ], %l2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 400130fc: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40013100: 02 80 00 1b be 4001316c <== NOT EXECUTED 40013104: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 40013108: 10 80 00 09 b 4001312c <== NOT EXECUTED 4001310c: a6 10 20 00 clr %l3 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 40013118: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4001311c: 7f ff ff 85 call 40012f30 <== NOT EXECUTED 40013120: 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 4001313c: 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( 40013140: 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 40013150: 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 40013164: 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( 40013168: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 4001316c: 7f ff ff 71 call 40012f30 <== NOT EXECUTED 40013170: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 40013174: 81 c7 e0 08 ret 40013178: 91 e8 20 00 restore %g0, 0, %o0 40012fa4 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40012fa4: 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 ); 40012fa8: 94 10 20 00 clr %o2 <== NOT EXECUTED 40012fac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40012fb0: 7f ff ff 31 call 40012c74 <== NOT EXECUTED 40012fb4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 40012fb8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40012fbc: 32 80 00 0a bne,a 40012fe4 <== NOT EXECUTED 40012fc0: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED 40012fc4: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40012fc8: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012fcc: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40012fd0: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40012fd4: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40012fd8: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED 40012fdc: 7f ff c5 28 call 4000447c <__assert_func> <== NOT EXECUTED 40012fe0: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED *block_ptr = 0; memfile_free_block( ptr ); } return 1; } 40012fe4: 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 ); 40012fe8: 7f ff ff 0d call 40012c1c <== NOT EXECUTED 40012fec: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } return 1; } 40012ff0: 81 c7 e0 08 ret <== NOT EXECUTED 40012ff4: 81 e8 00 00 restore <== NOT EXECUTED 400135ac : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 400135ac: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400135b0: a0 96 20 00 orcc %i0, 0, %l0 400135b4: 32 80 00 0a bne,a 400135dc 400135b8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400135bc: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400135c0: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400135c4: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400135c8: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 400135cc: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 400135d0: 96 12 e0 40 or %o3, 0x40, %o3 <== NOT EXECUTED 400135d4: 10 80 00 8c b 40013804 <== NOT EXECUTED 400135d8: 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 ); 400135dc: 80 a0 60 05 cmp %g1, 5 400135e0: 02 80 00 0a be 40013608 400135e4: 80 a6 e0 00 cmp %i3, 0 400135e8: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400135ec: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400135f0: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400135f4: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 400135f8: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 400135fc: 96 12 e0 50 or %o3, 0x50, %o3 <== NOT EXECUTED 40013600: 10 80 00 81 b 40013804 <== NOT EXECUTED 40013604: 92 10 22 e7 mov 0x2e7, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 40013608: 12 80 00 0a bne 40013630 4001360c: 80 a7 20 00 cmp %i4, 0 40013610: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013614: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013618: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 4001361c: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013620: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 40013624: 96 12 e0 98 or %o3, 0x98, %o3 <== NOT EXECUTED 40013628: 10 80 00 77 b 40013804 <== NOT EXECUTED 4001362c: 92 10 22 ef mov 0x2ef, %o1 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 40013630: 32 80 00 06 bne,a 40013648 40013634: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 40013638: 40 00 06 fc call 40015228 <__errno> <== NOT EXECUTED 4001363c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013640: 10 80 00 15 b 40013694 <== NOT EXECUTED 40013644: 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 ) { 40013648: 80 a0 60 00 cmp %g1, 0 4001364c: 06 80 00 09 bl 40013670 40013650: 94 07 00 1a add %i4, %i2, %o2 40013654: 80 a0 60 00 cmp %g1, 0 40013658: 12 80 00 12 bne 400136a0 4001365c: 03 10 00 8e sethi %hi(0x40023800), %g1 40013660: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40013664: 80 a0 40 0a cmp %g1, %o2 40013668: 1a 80 00 0e bcc 400136a0 4001366c: 03 10 00 8e sethi %hi(0x40023800), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 40013670: 90 10 00 10 mov %l0, %o0 40013674: 7f ff ff 24 call 40013304 40013678: 92 10 20 00 clr %o1 if ( status ) 4001367c: 80 a2 20 00 cmp %o0, 0 40013680: 02 80 00 08 be 400136a0 40013684: 03 10 00 8e sethi %hi(0x40023800), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 40013688: 40 00 06 e8 call 40015228 <__errno> <== NOT EXECUTED 4001368c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013690: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40013694: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013698: 81 c7 e0 08 ret <== NOT EXECUTED 4001369c: 81 e8 00 00 restore <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 400136a0: e2 00 60 e4 ld [ %g1 + 0xe4 ], %l1 400136a4: 92 10 00 1a mov %i2, %o1 400136a8: a7 3c 60 1f sra %l1, 0x1f, %l3 400136ac: 96 10 00 11 mov %l1, %o3 400136b0: 94 10 00 13 mov %l3, %o2 400136b4: 40 00 2e c7 call 4001f1d0 <__moddi3> 400136b8: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 400136bc: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 400136c0: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 400136c4: 90 10 00 19 mov %i1, %o0 400136c8: 92 10 00 1a mov %i2, %o1 400136cc: 40 00 2d da call 4001ee34 <__divdi3> 400136d0: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 400136d4: 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; 400136d8: a6 10 00 09 mov %o1, %l3 if ( start_offset ) { 400136dc: 80 a4 a0 00 cmp %l2, 0 400136e0: 02 80 00 1b be 4001374c 400136e4: 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 ); 400136e8: 90 10 00 10 mov %l0, %o0 400136ec: 7f ff fd 62 call 40012c74 400136f0: 94 10 20 00 clr %o2 assert( block_ptr ); 400136f4: 80 a2 20 00 cmp %o0, 0 400136f8: 32 80 00 0a bne,a 40013720 400136fc: 94 24 40 12 sub %l1, %l2, %o2 40013700: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013704: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013708: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 4001370c: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013710: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 40013714: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED 40013718: 10 80 00 3b b 40013804 <== NOT EXECUTED 4001371c: 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; 40013720: 80 a2 80 1c cmp %o2, %i4 40013724: 38 80 00 02 bgu,a 4001372c 40013728: 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 ); 4001372c: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 40013730: 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 ); 40013734: 90 02 00 12 add %o0, %l2, %o0 src += to_copy; block++; 40013738: a6 04 e0 01 inc %l3 my_length -= to_copy; 4001373c: b8 27 00 0a sub %i4, %o2, %i4 copied += to_copy; 40013740: 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 ); 40013744: 40 00 08 f4 call 40015b14 40013748: 92 10 00 1b mov %i3, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001374c: 03 10 00 8e sethi %hi(0x40023800), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40013750: a4 10 60 e4 or %g1, 0xe4, %l2 ! 400238e4 40013754: 10 80 00 17 b 400137b0 40013758: e2 00 60 e4 ld [ %g1 + 0xe4 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001375c: 92 10 00 13 mov %l3, %o1 40013760: 7f ff fd 45 call 40012c74 40013764: 94 10 20 00 clr %o2 assert( block_ptr ); 40013768: 80 a2 20 00 cmp %o0, 0 4001376c: 32 80 00 0a bne,a 40013794 40013770: d0 02 00 00 ld [ %o0 ], %o0 40013774: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40013778: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001377c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013780: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40013784: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 40013788: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED 4001378c: 10 80 00 1e b 40013804 <== NOT EXECUTED 40013790: 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 ); 40013794: 92 10 00 1a mov %i2, %o1 src += to_copy; block++; 40013798: a6 04 e0 01 inc %l3 my_length -= to_copy; 4001379c: 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( 400137a0: 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; 400137a4: 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 ); 400137a8: 40 00 08 db call 40015b14 400137ac: 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 ) { 400137b0: c2 04 80 00 ld [ %l2 ], %g1 400137b4: 80 a7 00 01 cmp %i4, %g1 400137b8: 1a bf ff e9 bcc 4001375c 400137bc: 90 10 00 10 mov %l0, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 400137c0: 80 a7 20 00 cmp %i4, 0 400137c4: 02 80 00 17 be 40013820 400137c8: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400137cc: 92 10 00 13 mov %l3, %o1 400137d0: 90 10 00 10 mov %l0, %o0 400137d4: 7f ff fd 28 call 40012c74 400137d8: 94 10 20 00 clr %o2 assert( block_ptr ); 400137dc: 80 a2 20 00 cmp %o0, 0 400137e0: 32 80 00 0b bne,a 4001380c 400137e4: d0 02 00 00 ld [ %o0 ], %o0 400137e8: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 400137ec: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400137f0: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400137f4: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 400137f8: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 400137fc: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED 40013800: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED 40013804: 7f ff c3 1e call 4000447c <__assert_func> <== NOT EXECUTED 40013808: 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; 4001380c: 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 ); 40013810: 92 10 00 1a mov %i2, %o1 40013814: 40 00 08 c0 call 40015b14 40013818: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4001381c: 90 07 bf f8 add %fp, -8, %o0 40013820: 7f ff c4 37 call 400048fc 40013824: 92 10 20 00 clr %o1 40013828: c2 07 bf f8 ld [ %fp + -8 ], %g1 4001382c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40013830: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 40013834: 81 c7 e0 08 ret 40013838: 81 e8 00 00 restore 4000ada8 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000ada8: 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 ); 4000adac: 40 00 16 03 call 400105b8 4000adb0: 90 10 00 18 mov %i0, %o0 4000adb4: 96 07 bf fc add %fp, -4, %o3 4000adb8: 92 10 00 08 mov %o0, %o1 4000adbc: 94 07 bf b8 add %fp, -72, %o2 4000adc0: 7f ff ff 8e call 4000abf8 4000adc4: 90 10 00 18 mov %i0, %o0 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000adc8: 97 2e 60 10 sll %i1, 0x10, %o3 4000adcc: 03 00 00 3c sethi %hi(0xf000), %g1 4000add0: 97 32 e0 10 srl %o3, 0x10, %o3 4000add4: 05 00 00 10 sethi %hi(0x4000), %g2 4000add8: 82 0a c0 01 and %o3, %g1, %g1 4000addc: 80 a0 40 02 cmp %g1, %g2 4000ade0: 02 80 00 19 be 4000ae44 4000ade4: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000ade8: 05 00 00 20 sethi %hi(0x8000), %g2 4000adec: 80 a0 40 02 cmp %g1, %g2 4000adf0: 02 80 00 16 be 4000ae48 4000adf4: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000adf8: 05 00 00 08 sethi %hi(0x2000), %g2 4000adfc: 80 a0 40 02 cmp %g1, %g2 4000ae00: 02 80 00 05 be 4000ae14 4000ae04: 05 00 00 18 sethi %hi(0x6000), %g2 4000ae08: 80 a0 40 02 cmp %g1, %g2 4000ae0c: 12 80 00 05 bne 4000ae20 4000ae10: 05 00 00 04 sethi %hi(0x1000), %g2 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4000ae14: f4 3f bf e0 std %i2, [ %fp + -32 ] 4000ae18: 10 80 00 0c b 4000ae48 4000ae1c: 92 10 20 02 mov 2, %o1 } else if (S_ISFIFO(mode)) 4000ae20: 80 a0 40 02 cmp %g1, %g2 4000ae24: 02 80 00 09 be 4000ae48 4000ae28: 92 10 20 07 mov 7, %o1 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000ae2c: 40 00 12 2c call 4000f6dc <__errno> <== NOT EXECUTED 4000ae30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ae34: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000ae38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ae3c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae40: 81 e8 00 00 restore <== NOT EXECUTED 4000ae44: 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( 4000ae48: 94 07 bf b8 add %fp, -72, %o2 4000ae4c: 98 07 bf e0 add %fp, -32, %o4 4000ae50: 40 00 0b c3 call 4000dd5c 4000ae54: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000ae58: 80 a2 20 00 cmp %o0, 0 4000ae5c: 12 80 00 06 bne 4000ae74 4000ae60: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 4000ae64: 40 00 12 1e call 4000f6dc <__errno> <== NOT EXECUTED 4000ae68: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000ae6c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000ae70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000ae74: 81 c7 e0 08 ret 4000ae78: 81 e8 00 00 restore 40004054 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004054: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004058: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4000405c: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40004060: 80 a0 a0 01 cmp %g2, 1 40004064: 22 80 00 08 be,a 40004084 40004068: f0 20 60 5c st %i0, [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000406c: 40 00 44 6f call 40015228 <__errno> <== NOT EXECUTED 40004070: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004074: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40004078: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000407c: 81 c7 e0 08 ret <== NOT EXECUTED 40004080: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 40004084: 81 c7 e0 08 ret 40004088: 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 9c sethi %hi(0x40027000), %l0 400048f0: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 400048f4: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 400048f8: 17 10 00 95 sethi %hi(0x40025400), %o3 <== NOT EXECUTED 400048fc: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 40004900: 94 12 a1 98 or %o2, 0x198, %o2 <== NOT EXECUTED 40004904: 96 12 e0 00 mov %o3, %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 20 ld [ %l0 + 0x120 ], %g1 40004914: 90 06 20 0c add %i0, 0xc, %o0 40004918: 40 00 3f 05 call 4001452c 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 20 ld [ %l0 + 0x120 ], %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 20 ld [ %l0 + 0x120 ], %g1 40004950: 90 10 20 2f mov 0x2f, %o0 40004954: 40 00 3e b2 call 4001441c 40004958: d2 00 60 08 ld [ %g1 + 8 ], %o1 break; 4000495c: 10 80 00 3c b 40004a4c 40004960: 31 10 00 94 sethi %hi(0x40025000), %i0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40004964: c2 04 21 20 ld [ %l0 + 0x120 ], %g1 40004968: 13 10 00 95 sethi %hi(0x40025400), %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 60 10 or %o1, 0x10, %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 20 ld [ %l0 + 0x120 ], %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 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED 40004994: 92 12 60 28 or %o1, 0x28, %o1 ! 40025428 <__FUNCTION__.5769+0x270> <== NOT EXECUTED 40004998: 40 00 3e 87 call 400143b4 4000499c: 31 10 00 94 sethi %hi(0x40025000), %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 20 ld [ %l0 + 0x120 ], %g1 400049a8: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 400049ac: d0 00 60 08 ld [ %g1 + 8 ], %o0 400049b0: 13 10 00 95 sethi %hi(0x40025400), %o1 400049b4: 40 00 3e 80 call 400143b4 400049b8: 92 12 60 38 or %o1, 0x38, %o1 ! 40025438 <__FUNCTION__.5769+0x280> (uint32_t)the_jnode->info.file.size ); #endif break; 400049bc: 10 80 00 24 b 40004a4c 400049c0: 31 10 00 94 sethi %hi(0x40025000), %i0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 400049c4: c2 04 21 20 ld [ %l0 + 0x120 ], %g1 <== NOT EXECUTED 400049c8: 11 10 00 95 sethi %hi(0x40025400), %o0 <== NOT EXECUTED 400049cc: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 400049d0: 40 00 3e d7 call 4001452c <== NOT EXECUTED 400049d4: 90 12 20 48 or %o0, 0x48, %o0 <== NOT EXECUTED assert(0); 400049d8: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED 400049dc: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 400049e0: 15 10 00 95 sethi %hi(0x40025400), %o2 <== NOT EXECUTED 400049e4: 17 10 00 94 sethi %hi(0x40025000), %o3 <== NOT EXECUTED 400049e8: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 400049ec: 94 12 a1 98 or %o2, 0x198, %o2 <== NOT EXECUTED 400049f0: 96 12 e1 b0 or %o3, 0x1b0, %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 20 ld [ %l0 + 0x120 ], %g1 <== NOT EXECUTED 40004a00: 11 10 00 95 sethi %hi(0x40025400), %o0 <== NOT EXECUTED 40004a04: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 40004a08: 40 00 3e c9 call 4001452c <== NOT EXECUTED 40004a0c: 90 12 20 48 or %o0, 0x48, %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 20 ld [ %l0 + 0x120 ], %g1 <== NOT EXECUTED 40004a1c: 11 10 00 95 sethi %hi(0x40025400), %o0 <== NOT EXECUTED 40004a20: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 40004a24: 40 00 3e c2 call 4001452c <== NOT EXECUTED 40004a28: 90 12 20 60 or %o0, 0x60, %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 95 sethi %hi(0x40025400), %o1 <== NOT EXECUTED 40004a38: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004a3c: 40 00 3e 5e call 400143b4 <== NOT EXECUTED 40004a40: 92 12 60 78 or %o1, 0x78, %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 45 a9 call 400160f0 40004a50: 91 ee 23 80 restore %i0, 0x380, %o0 40004a54: 01 00 00 00 nop 40004098 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 40004098: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 4000409c: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 400040a0: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400040a4: 80 a0 a0 04 cmp %g2, 4 400040a8: 02 80 00 0a be 400040d0 400040ac: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 400040b0: 40 00 44 5e call 40015228 <__errno> <== NOT EXECUTED 400040b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400040b8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400040bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400040c0: 81 c7 e0 08 ret <== NOT EXECUTED 400040c4: 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]; 400040c8: 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++ ) 400040cc: b0 06 20 01 inc %i0 400040d0: 80 a6 00 1a cmp %i0, %i2 400040d4: 1a 80 00 07 bcc 400040f0 400040d8: 01 00 00 00 nop 400040dc: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 400040e0: c6 48 80 18 ldsb [ %g2 + %i0 ], %g3 400040e4: 80 a0 e0 00 cmp %g3, 0 400040e8: 12 bf ff f8 bne 400040c8 400040ec: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; return i; } 400040f0: 81 c7 e0 08 ret 400040f4: 81 e8 00 00 restore 400040f8 : 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 */ ) { 400040f8: 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; 400040fc: e0 06 40 00 ld [ %i1 ], %l0 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 40004100: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 40004104: 90 04 20 0c add %l0, 0xc, %o0 <== NOT EXECUTED 40004108: 40 00 48 1b call 40016174 <== NOT EXECUTED 4000410c: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 40004110: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40004114: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004118: 22 80 00 05 be,a 4000412c <== NOT EXECUTED 4000411c: 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 ); 40004120: 40 00 13 6b call 40008ecc <_Chain_Extract> <== NOT EXECUTED 40004124: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 40004128: 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 ); 4000412c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004130: 90 00 60 50 add %g1, 0x50, %o0 <== NOT EXECUTED 40004134: 40 00 13 5a call 40008e9c <_Chain_Append> <== NOT EXECUTED 40004138: 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 ); 4000413c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40004140: 40 00 01 ef call 400048fc <== NOT EXECUTED 40004144: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004148: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000414c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED return 0; } 40004150: 81 c7 e0 08 ret <== NOT EXECUTED 40004154: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ae88 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000ae88: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000ae8c: 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 ) { 4000ae90: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000ae94: 80 a0 60 00 cmp %g1, 0 4000ae98: 22 80 00 06 be,a 4000aeb0 4000ae9c: 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 ); 4000aea0: 40 00 05 95 call 4000c4f4 <_Chain_Extract> 4000aea4: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000aea8: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000aeac: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000aeb0: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000aeb4: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000aeb8: 90 07 bf f8 add %fp, -8, %o0 4000aebc: 40 00 01 07 call 4000b2d8 4000aec0: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000aec4: 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) ) { 4000aec8: 90 10 00 10 mov %l0, %o0 4000aecc: 40 00 01 3b call 4000b3b8 4000aed0: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000aed4: 80 a2 20 00 cmp %o0, 0 4000aed8: 12 80 00 18 bne 4000af38 4000aedc: 01 00 00 00 nop 4000aee0: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000aee4: 80 a0 60 00 cmp %g1, 0 4000aee8: 12 80 00 14 bne 4000af38 4000aeec: 03 10 00 74 sethi %hi(0x4001d000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000aef0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 4001d028 4000aef4: c4 06 40 00 ld [ %i1 ], %g2 4000aef8: c6 00 60 04 ld [ %g1 + 4 ], %g3 4000aefc: 80 a0 c0 02 cmp %g3, %g2 4000af00: 22 80 00 02 be,a 4000af08 4000af04: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000af08: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000af0c: 80 a0 60 04 cmp %g1, 4 4000af10: 12 80 00 08 bne 4000af30 4000af14: 01 00 00 00 nop if ( the_jnode->info.sym_link.name ) 4000af18: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 4000af1c: 80 a2 20 00 cmp %o0, 0 4000af20: 02 80 00 04 be 4000af30 4000af24: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 4000af28: 40 00 00 7f call 4000b124 4000af2c: 01 00 00 00 nop } free( the_jnode ); 4000af30: 40 00 00 7d call 4000b124 4000af34: 90 10 00 10 mov %l0, %o0 } return 0; } 4000af38: 81 c7 e0 08 ret 4000af3c: 91 e8 20 00 restore %g0, 0, %o0 4000af58 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000af58: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000af5c: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 4000af60: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 4000af64: 84 00 bf fe add %g2, -2, %g2 4000af68: 80 a0 a0 05 cmp %g2, 5 4000af6c: 18 80 00 10 bgu 4000afac 4000af70: 85 28 a0 02 sll %g2, 2, %g2 4000af74: 07 10 00 2b sethi %hi(0x4000ac00), %g3 4000af78: 86 10 e3 40 or %g3, 0x340, %g3 ! 4000af40 4000af7c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 4000af80: 81 c0 80 00 jmp %g2 4000af84: 01 00 00 00 nop rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000af88: 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; 4000af8c: 10 80 00 0e b 4000afc4 4000af90: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000af94: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 4000af98: 10 80 00 0b b 4000afc4 4000af9c: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4000afa0: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED break; 4000afa4: 10 80 00 08 b 4000afc4 <== NOT EXECUTED 4000afa8: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000afac: 40 00 11 cc call 4000f6dc <__errno> <== NOT EXECUTED 4000afb0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000afb4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000afb8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000afbc: 81 c7 e0 08 ret <== NOT EXECUTED 4000afc0: 81 e8 00 00 restore <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; 4000afc4: c6 10 60 2e lduh [ %g1 + 0x2e ], %g3 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000afc8: 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; 4000afcc: c6 36 60 0c sth %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000afd0: 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; 4000afd4: 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; 4000afd8: 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; 4000afdc: 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; 4000afe0: 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; 4000afe4: 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; 4000afe8: 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; 4000afec: 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; 4000aff0: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 4000aff4: 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; 4000aff8: 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; 4000affc: 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; 4000b000: 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; } 4000b004: 81 c7 e0 08 ret 4000b008: 91 e8 20 00 restore %g0, 0, %o0 40004158 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40004158: 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 ); 4000415c: 40 00 47 d1 call 400160a0 40004160: 90 10 00 1a mov %i2, %o0 40004164: 96 07 bf fc add %fp, -4, %o3 40004168: 92 10 00 08 mov %o0, %o1 4000416c: a0 07 bf b8 add %fp, -72, %l0 40004170: 90 10 00 1a mov %i2, %o0 40004174: 40 00 30 e9 call 40010518 40004178: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 4000417c: 40 00 47 b4 call 4001604c 40004180: 90 10 00 19 mov %i1, %o0 40004184: d0 27 bf e0 st %o0, [ %fp + -32 ] if (info.sym_link.name == NULL) { 40004188: 80 a2 20 00 cmp %o0, 0 4000418c: 12 80 00 08 bne 400041ac 40004190: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one(ENOMEM); 40004194: 40 00 44 25 call 40015228 <__errno> <== NOT EXECUTED 40004198: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000419c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 400041a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400041a4: 81 c7 e0 08 ret 400041a8: 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( 400041ac: 94 10 00 10 mov %l0, %o2 400041b0: 92 10 20 04 mov 4, %o1 400041b4: 17 00 00 28 sethi %hi(0xa000), %o3 400041b8: 98 07 bf e0 add %fp, -32, %o4 400041bc: 96 12 e1 ff or %o3, 0x1ff, %o3 400041c0: 40 00 2d 8c call 4000f7f0 400041c4: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 400041c8: 80 a2 20 00 cmp %o0, 0 400041cc: 12 bf ff f6 bne 400041a4 400041d0: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 400041d4: 40 00 01 a0 call 40004854 <== NOT EXECUTED 400041d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 400041dc: 40 00 44 13 call 40015228 <__errno> <== NOT EXECUTED 400041e0: 01 00 00 00 nop <== NOT EXECUTED 400041e4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400041e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 400041ec: 81 c7 e0 08 ret <== NOT EXECUTED 400041f0: 81 e8 00 00 restore <== NOT EXECUTED 400041f4 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 400041f4: 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; 400041f8: 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 ) { 400041fc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004200: 80 a0 60 03 cmp %g1, 3 40004204: 12 80 00 29 bne 400042a8 40004208: a4 10 00 18 mov %i0, %l2 if ( !node->info.hard_link.link_node ) 4000420c: e6 04 20 50 ld [ %l0 + 0x50 ], %l3 40004210: 80 a4 e0 00 cmp %l3, 0 40004214: 12 80 00 08 bne 40004234 40004218: a2 07 bf e4 add %fp, -28, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 4000421c: 40 00 44 03 call 40015228 <__errno> <== NOT EXECUTED 40004220: 01 00 00 00 nop <== NOT EXECUTED 40004224: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40004228: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000422c: 10 80 00 24 b 400042bc <== NOT EXECUTED 40004230: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 40004234: 92 10 00 19 mov %i1, %o1 40004238: 94 10 20 14 mov 0x14, %o2 4000423c: 40 00 46 36 call 40015b14 40004240: 90 10 00 11 mov %l1, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 40004244: 90 10 00 11 mov %l1, %o0 40004248: 40 00 2d b7 call 4000f924 4000424c: 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) 40004250: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40004254: c6 10 60 30 lduh [ %g1 + 0x30 ], %g3 40004258: 80 a0 e0 01 cmp %g3, 1 4000425c: 12 80 00 0c bne 4000428c 40004260: 84 00 ff ff add %g3, -1, %g2 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 40004264: c2 07 bf ec ld [ %fp + -20 ], %g1 40004268: 92 10 00 11 mov %l1, %o1 4000426c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40004270: 9f c0 40 00 call %g1 40004274: 90 10 00 18 mov %i0, %o0 if ( result != 0 ) 40004278: 80 a2 20 00 cmp %o0, 0 4000427c: 02 80 00 0b be 400042a8 40004280: 90 10 3f ff mov -1, %o0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 40004284: 81 c7 e0 08 ret 40004288: 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 ); 4000428c: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40004290: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40004294: 40 00 01 9a call 400048fc 40004298: 92 10 20 00 clr %o1 4000429c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400042a0: c4 07 bf f8 ld [ %fp + -8 ], %g2 400042a4: 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 ); 400042a8: c2 06 60 08 ld [ %i1 + 8 ], %g1 400042ac: 90 10 00 12 mov %l2, %o0 400042b0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400042b4: 9f c0 40 00 call %g1 400042b8: 92 10 00 19 mov %i1, %o1 return result; } 400042bc: b0 10 00 08 mov %o0, %i0 400042c0: 81 c7 e0 08 ret 400042c4: 81 e8 00 00 restore 400042c8 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 400042c8: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 400042cc: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 400042d0: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400042d4: 80 a0 a0 01 cmp %g2, 1 400042d8: 22 80 00 06 be,a 400042f0 400042dc: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400042e0: 40 00 43 d2 call 40015228 <__errno> <== NOT EXECUTED 400042e4: 01 00 00 00 nop <== NOT EXECUTED 400042e8: 10 80 00 08 b 40004308 <== NOT EXECUTED 400042ec: 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 ) 400042f0: 80 a0 a0 00 cmp %g2, 0 400042f4: 32 80 00 08 bne,a 40004314 400042f8: c0 20 60 5c clr [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 400042fc: 40 00 43 cb call 40015228 <__errno> <== NOT EXECUTED 40004300: 01 00 00 00 nop <== NOT EXECUTED 40004304: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40004308: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000430c: 81 c7 e0 08 ret <== NOT EXECUTED 40004310: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 40004314: 81 c7 e0 08 ret 40004318: 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 75 sethi %hi(0x4001d400), %g1 400031cc: c2 00 61 88 ld [ %g1 + 0x188 ], %g1 ! 4001d588 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 21 16 call 4000b640 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 75 sethi %hi(0x4001d400), %g1 400031f4: c2 00 61 8c ld [ %g1 + 0x18c ], %g1 ! 4001d58c 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 75 sethi %hi(0x4001d400), %g1 40003220: c2 08 61 85 ldub [ %g1 + 0x185 ], %g1 ! 4001d585 40003224: 80 a0 60 00 cmp %g1, 0 40003228: 12 80 00 0c bne 40003258 4000322c: 03 10 00 75 sethi %hi(0x4001d400), %g1 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 40003230: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40003234: c2 08 63 f0 ldub [ %g1 + 0x3f0 ], %g1 ! 4001cff0 40003238: 80 a0 60 00 cmp %g1, 0 4000323c: 02 80 00 07 be 40003258 40003240: 03 10 00 75 sethi %hi(0x4001d400), %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 33 9e call 400100c4 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 75 sethi %hi(0x4001d400), %g1 40003258: c2 08 61 85 ldub [ %g1 + 0x185 ], %g1 ! 4001d585 4000325c: 80 a0 60 00 cmp %g1, 0 40003260: 12 80 00 0c bne 40003290 40003264: 03 10 00 73 sethi %hi(0x4001cc00), %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 20 ld [ %g1 + 0x320 ], %o0 ! 4001cf20 4000326c: 92 10 00 18 mov %i0, %o1 40003270: 94 10 00 19 mov %i1, %o2 40003274: 40 00 10 57 call 400073d0 <_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 76 sethi %hi(0x4001d800), %i1 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 40003288: 40 00 0e 43 call 40006b94 <== 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 76 sethi %hi(0x4001d800), %i1 40003294: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40003298: f0 06 60 b8 ld [ %i1 + 0xb8 ], %i0 4000329c: 40 00 13 66 call 40008034 <_Protected_heap_Get_size> 400032a0: d0 00 63 20 ld [ %g1 + 0x320 ], %o0 400032a4: 90 02 00 18 add %o0, %i0, %o0 400032a8: d0 26 60 b8 st %o0, [ %i1 + 0xb8 ] 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 9d sethi %hi(0x40067400), %g1 <== NOT EXECUTED return; if ( !print_handler ) 40005f54: e4 00 63 78 ld [ %g1 + 0x378 ], %l2 ! 40067778 <== 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 a8 sethi %hi(0x4006a000), %l1 <== NOT EXECUTED 40005f70: a2 14 63 b0 or %l1, 0x3b0, %l1 ! 4006a3b0 <== 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 c4 add %i0, 0xc4, %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 9d sethi %hi(0x40067400), %g1 <== NOT EXECUTED (*print_handler)( 40005fcc: ea 06 20 08 ld [ %i0 + 8 ], %l5 <== NOT EXECUTED 40005fd0: ec 00 63 74 ld [ %g1 + 0x374 ], %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 7a call 4000c1c4 <== 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 70 sethi %hi(0x4005c000), %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 63 78 or %o1, 0x378, %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 63 74 ld [ %g1 + 0x374 ], %o0 <== NOT EXECUTED 40006008: 13 10 01 70 sethi %hi(0x4005c000), %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 63 88 or %o1, 0x388, %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 9d sethi %hi(0x40067400), %l2 <== NOT EXECUTED 40006024: 23 10 01 9d sethi %hi(0x40067400), %l1 <== NOT EXECUTED 40006028: c2 04 a3 78 ld [ %l2 + 0x378 ], %g1 <== NOT EXECUTED 4000602c: d0 04 63 74 ld [ %l1 + 0x374 ], %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 70 sethi %hi(0x4005c000), %o1 <== NOT EXECUTED 40006044: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006048: 92 12 63 98 or %o1, 0x398, %o1 ! 4005c398 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 4000604c: 03 10 01 9d sethi %hi(0x40067400), %g1 <== NOT EXECUTED 40006050: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 ! 40067770 <== NOT EXECUTED 40006054: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006058: 12 80 00 08 bne 40006078 <== NOT EXECUTED 4000605c: c2 04 a3 78 ld [ %l2 + 0x378 ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 40006060: d0 04 63 74 ld [ %l1 + 0x374 ], %o0 <== NOT EXECUTED 40006064: 13 10 01 70 sethi %hi(0x4005c000), %o1 <== NOT EXECUTED 40006068: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000606c: 92 12 63 b8 or %o1, 0x3b8, %o1 ! 4005c3b8 <== 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 63 74 ld [ %l1 + 0x374 ], %o0 <== NOT EXECUTED 4000607c: 13 10 01 70 sethi %hi(0x4005c000), %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 63 c8 or %o1, 0x3c8, %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 71 sethi %hi(0x4005c400), %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 c8 ld [ %i0 + 0xc8 ], %l0 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 40006114: 40 00 0b 4f call 40008e50 <== NOT EXECUTED 40006118: 90 12 20 38 or %o0, 0x38, %o0 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 4000611c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40006120: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED 40006124: 40 00 0b 4b call 40008e50 <== NOT EXECUTED 40006128: 90 12 20 48 or %o0, 0x48, %o0 ! 4005c448 <== 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 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED 40006134: 40 00 0b 47 call 40008e50 <== NOT EXECUTED 40006138: 90 12 20 68 or %o0, 0x68, %o0 ! 4005c468 <== NOT EXECUTED printk( 4000613c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 40006140: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED 40006144: 40 00 0b 43 call 40008e50 <== NOT EXECUTED 40006148: 90 12 20 80 or %o0, 0x80, %o0 ! 4005c480 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", 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 1c call 4000c1c4 <== 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 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED 40006164: 40 00 0b 3b call 40008e50 <== NOT EXECUTED 40006168: 90 12 20 98 or %o0, 0x98, %o0 ! 4005c498 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 4000616c: d2 06 20 c4 ld [ %i0 + 0xc4 ], %o1 <== NOT EXECUTED 40006170: d4 06 20 c8 ld [ %i0 + 0xc8 ], %o2 <== NOT EXECUTED 40006174: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED 40006178: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED 4000617c: 40 00 0b 35 call 40008e50 <== NOT EXECUTED 40006180: 90 12 20 b0 or %o0, 0xb0, %o0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 40006184: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 40006188: 12 80 00 07 bne 400061a4 <== NOT EXECUTED 4000618c: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED printk( 40006190: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED 40006194: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 40006198: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 4000619c: 40 00 0b 2d call 40008e50 <== 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 3f call 4000caa0 <== NOT EXECUTED 400061a8: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED 400061ac: 01 00 00 00 nop 4000bd5c <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000bd5c: c4 02 21 60 ld [ %o0 + 0x160 ], %g2 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4000bd60: c6 00 a0 88 ld [ %g2 + 0x88 ], %g3 4000bd64: 05 10 00 73 sethi %hi(0x4001cc00), %g2 4000bd68: d2 08 a3 c4 ldub [ %g2 + 0x3c4 ], %o1 ! 4001cfc4 */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4000bd6c: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 4000bd70: 92 22 40 03 sub %o1, %g3, %o1 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4000bd74: 86 10 3f ff mov -1, %g3 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4000bd78: d2 22 20 18 st %o1, [ %o0 + 0x18 ] */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4000bd7c: 80 a0 a0 00 cmp %g2, 0 4000bd80: 12 80 00 09 bne 4000bda4 <_POSIX_Threads_Sporadic_budget_callout+0x48> 4000bd84: c6 22 20 78 st %g3, [ %o0 + 0x78 ] /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4000bd88: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000bd8c: 80 a0 40 09 cmp %g1, %o1 4000bd90: 1a 80 00 05 bcc 4000bda4 <_POSIX_Threads_Sporadic_budget_callout+0x48> 4000bd94: 94 10 20 01 mov 1, %o2 _Thread_Change_priority( the_thread, new_priority, true ); 4000bd98: 82 13 c0 00 mov %o7, %g1 4000bd9c: 7f ff f0 bd call 40008090 <_Thread_Change_priority> 4000bda0: 9e 10 40 00 mov %g1, %o7 4000bda4: 81 c3 e0 08 retl <== NOT EXECUTED 4000bda8: 01 00 00 00 nop 40008c10 <_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 ) { 40008c10: 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; 40008c14: 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); 40008c18: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40008c1c: 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); 40008c20: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40008c24: 82 06 60 38 add %i1, 0x38, %g1 40008c28: 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; 40008c2c: 2d 10 00 73 sethi %hi(0x4001cc00), %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 ]; 40008c30: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008c34: 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 ]; 40008c38: 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; 40008c3c: ac 15 a3 c4 or %l6, 0x3c4, %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 ]; 40008c40: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 40008c44: 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 ]; 40008c48: a6 24 c0 01 sub %l3, %g1, %l3 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008c4c: 12 80 00 28 bne 40008cec <_Thread_queue_Enqueue_priority+0xdc> 40008c50: 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; 40008c54: ac 04 e0 04 add %l3, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40008c58: 7f ff e4 3d call 40001d4c 40008c5c: 01 00 00 00 nop 40008c60: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 40008c64: a8 10 3f ff mov -1, %l4 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40008c68: 10 80 00 10 b 40008ca8 <_Thread_queue_Enqueue_priority+0x98> 40008c6c: e2 04 c0 00 ld [ %l3 ], %l1 search_priority = search_thread->current_priority; if ( priority <= search_priority ) 40008c70: 80 a4 00 14 cmp %l0, %l4 40008c74: 28 80 00 11 bleu,a 40008cb8 <_Thread_queue_Enqueue_priority+0xa8> 40008c78: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 40008c7c: 7f ff e4 38 call 40001d5c 40008c80: 90 10 00 12 mov %l2, %o0 40008c84: 7f ff e4 32 call 40001d4c 40008c88: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008c8c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40008c90: 80 8d 40 01 btst %l5, %g1 40008c94: 32 80 00 05 bne,a 40008ca8 <_Thread_queue_Enqueue_priority+0x98> 40008c98: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40008c9c: 7f ff e4 30 call 40001d5c <== NOT EXECUTED 40008ca0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40008ca4: 30 bf ff ed b,a 40008c58 <_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 ) ) { 40008ca8: 80 a4 40 16 cmp %l1, %l6 40008cac: 32 bf ff f1 bne,a 40008c70 <_Thread_queue_Enqueue_priority+0x60> 40008cb0: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40008cb4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008cb8: 80 a0 60 01 cmp %g1, 1 40008cbc: 12 80 00 3c bne 40008dac <_Thread_queue_Enqueue_priority+0x19c> 40008cc0: 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 ) 40008cc4: 80 a4 00 14 cmp %l0, %l4 40008cc8: 02 80 00 2e be 40008d80 <_Thread_queue_Enqueue_priority+0x170> 40008ccc: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40008cd0: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008cd4: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40008cd8: 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; 40008cdc: 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; 40008ce0: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008ce4: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008ce8: 30 80 00 2d b,a 40008d9c <_Thread_queue_Enqueue_priority+0x18c> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40008cec: 7f ff e4 18 call 40001d4c 40008cf0: 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; 40008cf4: a8 05 20 01 inc %l4 _ISR_Disable( level ); 40008cf8: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40008cfc: 10 80 00 10 b 40008d3c <_Thread_queue_Enqueue_priority+0x12c> 40008d00: e2 04 e0 08 ld [ %l3 + 8 ], %l1 search_priority = search_thread->current_priority; if ( priority >= search_priority ) 40008d04: 80 a4 00 14 cmp %l0, %l4 40008d08: 3a 80 00 11 bcc,a 40008d4c <_Thread_queue_Enqueue_priority+0x13c> 40008d0c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40008d10: 7f ff e4 13 call 40001d5c 40008d14: 90 10 00 12 mov %l2, %o0 40008d18: 7f ff e4 0d call 40001d4c 40008d1c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008d20: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40008d24: 80 8d 40 01 btst %l5, %g1 40008d28: 32 80 00 05 bne,a 40008d3c <_Thread_queue_Enqueue_priority+0x12c> 40008d2c: e2 04 60 04 ld [ %l1 + 4 ], %l1 _ISR_Enable( level ); 40008d30: 7f ff e4 0b call 40001d5c 40008d34: 90 10 00 12 mov %l2, %o0 goto restart_reverse_search; 40008d38: 30 bf ff ed b,a 40008cec <_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 ) ) { 40008d3c: 80 a4 40 13 cmp %l1, %l3 40008d40: 32 bf ff f1 bne,a 40008d04 <_Thread_queue_Enqueue_priority+0xf4> 40008d44: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40008d48: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008d4c: 80 a0 60 01 cmp %g1, 1 40008d50: 12 80 00 17 bne 40008dac <_Thread_queue_Enqueue_priority+0x19c> 40008d54: 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 ) 40008d58: 80 a4 00 14 cmp %l0, %l4 40008d5c: 02 80 00 09 be 40008d80 <_Thread_queue_Enqueue_priority+0x170> 40008d60: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40008d64: c2 04 40 00 ld [ %l1 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40008d68: 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; 40008d6c: 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; 40008d70: 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; 40008d74: f2 24 40 00 st %i1, [ %l1 ] next_node->previous = the_node; 40008d78: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008d7c: 30 80 00 08 b,a 40008d9c <_Thread_queue_Enqueue_priority+0x18c> 40008d80: 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; 40008d84: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008d88: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40008d8c: 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; 40008d90: 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; 40008d94: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008d98: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008d9c: 7f ff e3 f0 call 40001d5c 40008da0: b0 10 20 01 mov 1, %i0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008da4: 81 c7 e0 08 ret 40008da8: 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; 40008dac: 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; 40008db0: d0 26 80 00 st %o0, [ %i2 ] return the_thread_queue->sync_state; } 40008db4: 81 c7 e0 08 ret 40008db8: 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 f5 sethi %hi(0x4003d400), %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 f5 sethi %hi(0x4003d400), %i3 40015b08: 2b 10 00 f5 sethi %hi(0x4003d400), %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 a2 b4 or %i2, 0x2b4, %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 e1 f0 or %i3, 0x1f0, %i3 40015b2c: aa 15 61 60 or %l5, 0x160, %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 11 5f call 4001a0d8 <_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 11 57 call 4001a0d8 <_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 11 2a call 4001a03c <_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 7e call 4001659c <_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 11 73 call 4001a1ac <_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 0e 4c call 400195cc <_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 93 call 40018b00 <_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 97 call 4001a320 <_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 95 call 4001a320 <_Watchdog_Remove> 40015cd0: 90 10 00 1d mov %i5, %o0 40015cd4: 30 bf ff 9c b,a 40015b44 <_Timer_server_Body+0x58> 4001b300 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 4001b300: 9d e3 bf a0 save %sp, -96, %sp 4001b304: 40 00 06 f8 call 4001cee4 <_fini> 4001b308: 01 00 00 00 nop * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 4001b30c: 7f ff ff e1 call 4001b290 4001b310: 01 00 00 00 nop rtems_shutdown_executive(status); 4001b314: 40 00 00 4c call 4001b444 4001b318: 90 10 00 18 mov %i0, %o0 4001b31c: 30 80 00 00 b,a 4001b31c <_exit+0x1c> <== NOT EXECUTED 4003a800 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4003a800: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4003a804: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4003a808: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4003a80c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4003a810: 7f ff ff 7f call 4003a60c <== NOT EXECUTED 4003a814: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4003a818: 01 00 00 00 nop 4000dfc8 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4000dfc8: 81 c3 e0 08 retl <== NOT EXECUTED 4000dfcc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000b33c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000b33c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000b340: 7f ff ff e6 call 4000b2d8 <== NOT EXECUTED 4000b344: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000b348: 01 00 00 00 nop 40028490 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 40028490: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40028494: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40028498: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002849c: 7f ff ff 62 call 40028224 <== NOT EXECUTED 400284a0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400284a4: 01 00 00 00 nop 400286d8 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 400286d8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400286dc: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400286e0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400286e4: 7f ff ff c0 call 400285e4 <== NOT EXECUTED 400286e8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400286ec: 01 00 00 00 nop 4001b410 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 4001b410: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4001b414: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4001b418: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001b41c: 40 00 00 17 call 4001b478 <== NOT EXECUTED 4001b420: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001b424: 01 00 00 00 nop 4005abc0 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 4005abc0: 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 ); 4005abc4: 7f fe b3 9d call 40007a38 <== NOT EXECUTED 4005abc8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 4005abcc: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4005abd0: 32 80 00 17 bne,a 4005ac2c <_rename_r+0x6c> <== NOT EXECUTED 4005abd4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 4005abd8: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 4005abdc: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005abe0: 02 80 00 06 be 4005abf8 <_rename_r+0x38> <== NOT EXECUTED 4005abe4: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005abe8: 02 80 00 04 be 4005abf8 <_rename_r+0x38> <== NOT EXECUTED 4005abec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005abf0: 12 80 00 07 bne 4005ac0c <_rename_r+0x4c> <== NOT EXECUTED 4005abf4: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4005abf8: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4005abfc: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 400664f8 <== NOT EXECUTED 4005ac00: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 4005ac04: 10 80 00 05 b 4005ac18 <_rename_r+0x58> <== NOT EXECUTED 4005ac08: 92 02 60 18 add %o1, 0x18, %o1 <== NOT EXECUTED 4005ac0c: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 <== NOT EXECUTED 4005ac10: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 4005ac14: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 4005ac18: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005ac1c: 7f ff a3 a4 call 40043aac <== NOT EXECUTED 4005ac20: 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; 4005ac24: 10 80 00 0c b 4005ac54 <_rename_r+0x94> <== NOT EXECUTED 4005ac28: 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, 4005ac2c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005ac30: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 4005ac34: 96 07 bf d4 add %fp, -44, %o3 <== NOT EXECUTED 4005ac38: 98 10 20 00 clr %o4 <== NOT EXECUTED 4005ac3c: 7f fe b3 cd call 40007b70 <== NOT EXECUTED 4005ac40: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 4005ac44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4005ac48: 12 80 00 2b bne 4005acf4 <_rename_r+0x134> <== NOT EXECUTED 4005ac4c: 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; 4005ac50: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005ac54: a6 07 bf e8 add %fp, -24, %l3 <== NOT EXECUTED 4005ac58: a4 07 bf d4 add %fp, -44, %l2 <== NOT EXECUTED 4005ac5c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4005ac60: 7f ff a3 93 call 40043aac <== NOT EXECUTED 4005ac64: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED name = old + old_parent_pathlen; 4005ac68: b2 06 40 10 add %i1, %l0, %i1 <== NOT EXECUTED 4005ac6c: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4005ac70: 7f ff b1 fb call 4004745c <== NOT EXECUTED 4005ac74: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005ac78: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005ac7c: 7f fe b3 5d call 400079f0 <== NOT EXECUTED 4005ac80: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005ac84: b2 06 40 08 add %i1, %o0, %i1 <== NOT EXECUTED 4005ac88: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4005ac8c: 7f ff b1 f4 call 4004745c <== NOT EXECUTED 4005ac90: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005ac94: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED 4005ac98: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005ac9c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4005aca0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005aca4: 7f fe b3 77 call 40007a80 <== NOT EXECUTED 4005aca8: 98 10 20 00 clr %o4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 4005acac: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4005acb0: 22 80 00 13 be,a 4005acfc <_rename_r+0x13c> <== NOT EXECUTED 4005acb4: c2 4e 80 00 ldsb [ %i2 ], %g1 <== NOT EXECUTED if ( free_old_parentloc ) 4005acb8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005acbc: 02 80 00 0b be 4005ace8 <_rename_r+0x128> <== NOT EXECUTED 4005acc0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005acc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005acc8: 02 80 00 08 be 4005ace8 <_rename_r+0x128> <== NOT EXECUTED 4005accc: 01 00 00 00 nop <== NOT EXECUTED 4005acd0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005acd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005acd8: 02 80 00 04 be 4005ace8 <_rename_r+0x128> <== NOT EXECUTED 4005acdc: 01 00 00 00 nop <== NOT EXECUTED 4005ace0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ace4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 4005ace8: 7f ff 96 9e call 40040760 <__errno> <== NOT EXECUTED 4005acec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005acf0: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 4005acf4: 81 c7 e0 08 ret <== NOT EXECUTED 4005acf8: 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 ); 4005acfc: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005ad00: 02 80 00 06 be 4005ad18 <_rename_r+0x158> <== NOT EXECUTED 4005ad04: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005ad08: 02 80 00 04 be 4005ad18 <_rename_r+0x158> <== NOT EXECUTED 4005ad0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ad10: 12 80 00 0a bne 4005ad38 <_rename_r+0x178> <== NOT EXECUTED 4005ad14: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4005ad18: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4005ad1c: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 400664f8 <== NOT EXECUTED 4005ad20: 90 07 bf c0 add %fp, -64, %o0 <== NOT EXECUTED 4005ad24: 92 02 60 18 add %o1, 0x18, %o1 <== NOT EXECUTED 4005ad28: 7f ff a3 61 call 40043aac <== NOT EXECUTED 4005ad2c: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005ad30: 10 80 00 08 b 4005ad50 <_rename_r+0x190> <== NOT EXECUTED 4005ad34: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4005ad38: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 <== NOT EXECUTED 4005ad3c: 90 07 bf c0 add %fp, -64, %o0 <== NOT EXECUTED 4005ad40: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 4005ad44: 7f ff a3 5a call 40043aac <== NOT EXECUTED 4005ad48: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005ad4c: 90 10 20 00 clr %o0 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 4005ad50: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005ad54: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4005ad58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ad5c: 02 80 00 61 be 4005aee0 <_rename_r+0x320> <== NOT EXECUTED 4005ad60: 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 ); 4005ad64: 90 06 80 08 add %i2, %o0, %o0 <== NOT EXECUTED 4005ad68: a0 07 bf c0 add %fp, -64, %l0 <== NOT EXECUTED 4005ad6c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ad70: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if ( result != 0 ) { 4005ad74: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 4005ad78: 02 80 00 28 be 4005ae18 <_rename_r+0x258> <== NOT EXECUTED 4005ad7c: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005ad80: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005ad84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ad88: 02 80 00 09 be 4005adac <_rename_r+0x1ec> <== NOT EXECUTED 4005ad8c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ad90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005ad94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ad98: 02 80 00 05 be 4005adac <_rename_r+0x1ec> <== NOT EXECUTED 4005ad9c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ada0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ada4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005ada8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005adac: 02 80 00 0d be 4005ade0 <_rename_r+0x220> <== NOT EXECUTED 4005adb0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005adb4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005adb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005adbc: 22 80 00 09 be,a 4005ade0 <_rename_r+0x220> <== NOT EXECUTED 4005adc0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005adc4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005adc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005adcc: 22 80 00 05 be,a 4005ade0 <_rename_r+0x220> <== NOT EXECUTED 4005add0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005add4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005add8: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005addc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ade0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ade4: 02 80 00 08 be 4005ae04 <_rename_r+0x244> <== NOT EXECUTED 4005ade8: 01 00 00 00 nop <== NOT EXECUTED 4005adec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005adf0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005adf4: 02 80 00 04 be 4005ae04 <_rename_r+0x244> <== NOT EXECUTED 4005adf8: 01 00 00 00 nop <== NOT EXECUTED 4005adfc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ae00: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 4005ae04: 7f ff 96 57 call 40040760 <__errno> <== NOT EXECUTED 4005ae08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005ae0c: e4 22 00 00 st %l2, [ %o0 ] <== NOT EXECUTED 4005ae10: 81 c7 e0 08 ret <== NOT EXECUTED 4005ae14: 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 ) { 4005ae18: c6 07 bf e4 ld [ %fp + -28 ], %g3 <== NOT EXECUTED 4005ae1c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 4005ae20: 02 80 00 26 be 4005aeb8 <_rename_r+0x2f8> <== NOT EXECUTED 4005ae24: c4 07 bf cc ld [ %fp + -52 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005ae28: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4005ae2c: 02 80 00 09 be 4005ae50 <_rename_r+0x290> <== NOT EXECUTED 4005ae30: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ae34: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4005ae38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae3c: 02 80 00 05 be 4005ae50 <_rename_r+0x290> <== NOT EXECUTED 4005ae40: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ae44: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ae48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005ae4c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ae50: 02 80 00 0d be 4005ae84 <_rename_r+0x2c4> <== NOT EXECUTED 4005ae54: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005ae58: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005ae5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae60: 22 80 00 09 be,a 4005ae84 <_rename_r+0x2c4> <== NOT EXECUTED 4005ae64: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ae68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005ae6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae70: 22 80 00 05 be,a 4005ae84 <_rename_r+0x2c4> <== NOT EXECUTED 4005ae74: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ae78: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ae7c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005ae80: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ae84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae88: 02 80 00 08 be 4005aea8 <_rename_r+0x2e8> <== NOT EXECUTED 4005ae8c: 01 00 00 00 nop <== NOT EXECUTED 4005ae90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005ae94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae98: 02 80 00 04 be 4005aea8 <_rename_r+0x2e8> <== NOT EXECUTED 4005ae9c: 01 00 00 00 nop <== NOT EXECUTED 4005aea0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005aea4: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 4005aea8: 7f ff 96 2e call 40040760 <__errno> <== NOT EXECUTED 4005aeac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005aeb0: 10 80 00 26 b 4005af48 <_rename_r+0x388> <== NOT EXECUTED 4005aeb4: 82 10 20 12 mov 0x12, %g1 <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 4005aeb8: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 <== NOT EXECUTED 4005aebc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005aec0: 12 80 00 25 bne 4005af54 <_rename_r+0x394> <== NOT EXECUTED 4005aec4: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005aec8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4005aecc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005aed0: 02 80 00 05 be 4005aee4 <_rename_r+0x324> <== NOT EXECUTED 4005aed4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005aed8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005aedc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005aee0: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005aee4: 02 80 00 0d be 4005af18 <_rename_r+0x358> <== NOT EXECUTED 4005aee8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005aeec: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005aef0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005aef4: 22 80 00 09 be,a 4005af18 <_rename_r+0x358> <== NOT EXECUTED 4005aef8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005aefc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005af00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af04: 22 80 00 05 be,a 4005af18 <_rename_r+0x358> <== NOT EXECUTED 4005af08: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005af0c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005af10: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005af14: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005af18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af1c: 02 80 00 08 be 4005af3c <_rename_r+0x37c> <== NOT EXECUTED 4005af20: 01 00 00 00 nop <== NOT EXECUTED 4005af24: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005af28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af2c: 02 80 00 04 be 4005af3c <_rename_r+0x37c> <== NOT EXECUTED 4005af30: 01 00 00 00 nop <== NOT EXECUTED 4005af34: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005af38: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4005af3c: 7f ff 96 09 call 40040760 <__errno> <== NOT EXECUTED 4005af40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005af44: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4005af48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005af4c: 81 c7 e0 08 ret <== NOT EXECUTED 4005af50: 81 e8 00 00 restore <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 4005af54: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 4005af58: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED 4005af5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005af60: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005af64: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005af68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af6c: 02 80 00 08 be 4005af8c <_rename_r+0x3cc> <== NOT EXECUTED 4005af70: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4005af74: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005af78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af7c: 02 80 00 05 be 4005af90 <_rename_r+0x3d0> <== NOT EXECUTED 4005af80: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005af84: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005af88: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005af8c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005af90: 02 80 00 0d be 4005afc4 <_rename_r+0x404> <== NOT EXECUTED 4005af94: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005af98: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005af9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005afa0: 22 80 00 09 be,a 4005afc4 <_rename_r+0x404> <== NOT EXECUTED 4005afa4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005afa8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005afac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005afb0: 22 80 00 05 be,a 4005afc4 <_rename_r+0x404> <== NOT EXECUTED 4005afb4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005afb8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005afbc: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005afc0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005afc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005afc8: 02 80 00 08 be 4005afe8 <_rename_r+0x428> <== NOT EXECUTED 4005afcc: 01 00 00 00 nop <== NOT EXECUTED 4005afd0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005afd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005afd8: 02 80 00 04 be 4005afe8 <_rename_r+0x428> <== NOT EXECUTED 4005afdc: 01 00 00 00 nop <== NOT EXECUTED 4005afe0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005afe4: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED return result; } 4005afe8: 81 c7 e0 08 ret <== NOT EXECUTED 4005afec: 81 e8 00 00 restore <== NOT EXECUTED 40009484 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40009484: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40009488: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4000948c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40009490: 7f ff ff c0 call 40009390 <== NOT EXECUTED 40009494: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40009498: 01 00 00 00 nop 4000f054 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4000f054: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000f058: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000f05c: 7f ff ff 58 call 4000edbc <== NOT EXECUTED 4000f060: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000f064: 01 00 00 00 nop 40026e6c : #include int chdir( const char *pathname ) { 40026e6c: 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 ); 40026e70: 40 00 81 7b call 4004745c 40026e74: 90 10 00 18 mov %i0, %o0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40026e78: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 40026e7c: 92 10 00 08 mov %o0, %o1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40026e80: 94 10 20 01 mov 1, %o2 40026e84: 90 10 00 18 mov %i0, %o0 40026e88: 96 10 00 10 mov %l0, %o3 40026e8c: 98 10 20 01 mov 1, %o4 40026e90: 7f ff 83 38 call 40007b70 40026e94: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 40026e98: 80 a2 20 00 cmp %o0, 0 40026e9c: 12 80 00 37 bne 40026f78 40026ea0: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 40026ea4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40026ea8: 80 a0 60 00 cmp %g1, 0 40026eac: 12 80 00 0c bne 40026edc 40026eb0: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40026eb4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40026eb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40026ebc: 02 80 00 04 be 40026ecc <== NOT EXECUTED 40026ec0: 01 00 00 00 nop <== NOT EXECUTED 40026ec4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40026ec8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40026ecc: 40 00 66 25 call 40040760 <__errno> <== NOT EXECUTED 40026ed0: 01 00 00 00 nop <== NOT EXECUTED 40026ed4: 10 80 00 14 b 40026f24 <== NOT EXECUTED 40026ed8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40026edc: 9f c0 40 00 call %g1 40026ee0: 90 10 00 10 mov %l0, %o0 40026ee4: 80 a2 20 01 cmp %o0, 1 40026ee8: 02 80 00 12 be 40026f30 40026eec: 03 10 01 99 sethi %hi(0x40066400), %g1 rtems_filesystem_freenode( &loc ); 40026ef0: c2 07 bf f8 ld [ %fp + -8 ], %g1 40026ef4: 80 a0 60 00 cmp %g1, 0 40026ef8: 02 80 00 08 be 40026f18 40026efc: 01 00 00 00 nop 40026f00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40026f04: 80 a0 60 00 cmp %g1, 0 40026f08: 02 80 00 04 be 40026f18 40026f0c: 01 00 00 00 nop 40026f10: 9f c0 40 00 call %g1 40026f14: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40026f18: 40 00 66 12 call 40040760 <__errno> 40026f1c: 01 00 00 00 nop 40026f20: 82 10 20 14 mov 0x14, %g1 ! 14 40026f24: c2 22 00 00 st %g1, [ %o0 ] 40026f28: 81 c7 e0 08 ret 40026f2c: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 40026f30: d0 00 60 f8 ld [ %g1 + 0xf8 ], %o0 40026f34: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40026f38: 80 a0 60 00 cmp %g1, 0 40026f3c: 22 80 00 09 be,a 40026f60 40026f40: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40026f44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006641c 40026f48: 80 a0 60 00 cmp %g1, 0 40026f4c: 22 80 00 05 be,a 40026f60 40026f50: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40026f54: 9f c0 40 00 call %g1 40026f58: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 40026f5c: 03 10 01 99 sethi %hi(0x40066400), %g1 40026f60: d0 00 60 f8 ld [ %g1 + 0xf8 ], %o0 ! 400664f8 40026f64: 92 07 bf ec add %fp, -20, %o1 40026f68: 90 02 20 04 add %o0, 4, %o0 40026f6c: 94 10 20 14 mov 0x14, %o2 40026f70: 40 00 72 cf call 40043aac 40026f74: b0 10 20 00 clr %i0 return 0; } 40026f78: 81 c7 e0 08 ret 40026f7c: 81 e8 00 00 restore 40007830 : int chmod( const char *path, mode_t mode ) { 40007830: 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 ); 40007834: 40 00 ff 0a call 4004745c 40007838: 90 10 00 18 mov %i0, %o0 4000783c: a0 07 bf ec add %fp, -20, %l0 40007840: 92 10 00 08 mov %o0, %o1 40007844: 94 10 20 00 clr %o2 40007848: 90 10 00 18 mov %i0, %o0 4000784c: 96 10 00 10 mov %l0, %o3 40007850: 98 10 20 01 mov 1, %o4 40007854: 40 00 00 c7 call 40007b70 40007858: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 4000785c: 80 a2 20 00 cmp %o0, 0 40007860: 12 80 00 24 bne 400078f0 40007864: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 40007868: 80 a0 60 00 cmp %g1, 0 4000786c: 32 80 00 10 bne,a 400078ac 40007870: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 40007874: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40007878: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000787c: 02 80 00 08 be 4000789c <== NOT EXECUTED 40007880: 01 00 00 00 nop <== NOT EXECUTED 40007884: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40007888: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000788c: 02 80 00 04 be 4000789c <== NOT EXECUTED 40007890: 01 00 00 00 nop <== NOT EXECUTED 40007894: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007898: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4000789c: 40 00 e3 b1 call 40040760 <__errno> <== NOT EXECUTED 400078a0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400078a4: 10 80 00 12 b 400078ec <== NOT EXECUTED 400078a8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 400078ac: 80 a0 60 00 cmp %g1, 0 400078b0: 12 80 00 12 bne 400078f8 400078b4: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 400078b8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400078bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400078c0: 02 80 00 08 be 400078e0 <== NOT EXECUTED 400078c4: 01 00 00 00 nop <== NOT EXECUTED 400078c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400078cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400078d0: 02 80 00 04 be 400078e0 <== NOT EXECUTED 400078d4: 01 00 00 00 nop <== NOT EXECUTED 400078d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400078dc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400078e0: 40 00 e3 a0 call 40040760 <__errno> <== NOT EXECUTED 400078e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400078e8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400078ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400078f0: 81 c7 e0 08 ret 400078f4: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 400078f8: 90 10 00 10 mov %l0, %o0 400078fc: 9f c0 40 00 call %g1 40007900: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40007904: c2 07 bf f8 ld [ %fp + -8 ], %g1 40007908: 80 a0 60 00 cmp %g1, 0 4000790c: 02 bf ff f9 be 400078f0 40007910: b0 10 00 08 mov %o0, %i0 40007914: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007918: 80 a0 60 00 cmp %g1, 0 4000791c: 02 80 00 04 be 4000792c 40007920: 01 00 00 00 nop 40007924: 9f c0 40 00 call %g1 40007928: 90 10 00 10 mov %l0, %o0 return result; } 4000792c: 81 c7 e0 08 ret 40007930: 81 e8 00 00 restore 40026f80 : int chown( const char *path, uid_t owner, gid_t group ) { 40026f80: 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 ) ) 40026f84: 40 00 81 36 call 4004745c 40026f88: 90 10 00 18 mov %i0, %o0 40026f8c: a0 07 bf ec add %fp, -20, %l0 40026f90: 92 10 00 08 mov %o0, %o1 40026f94: 94 10 20 00 clr %o2 40026f98: 90 10 00 18 mov %i0, %o0 40026f9c: 96 10 00 10 mov %l0, %o3 40026fa0: 98 10 20 01 mov 1, %o4 40026fa4: 7f ff 82 f3 call 40007b70 40026fa8: b0 10 3f ff mov -1, %i0 40026fac: 80 a2 20 00 cmp %o0, 0 40026fb0: 12 80 00 10 bne 40026ff0 40026fb4: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 40026fb8: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 40026fbc: 80 a0 60 00 cmp %g1, 0 40026fc0: 12 80 00 0e bne 40026ff8 40026fc4: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40026fc8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40026fcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40026fd0: 02 80 00 04 be 40026fe0 <== NOT EXECUTED 40026fd4: 01 00 00 00 nop <== NOT EXECUTED 40026fd8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40026fdc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40026fe0: 40 00 65 e0 call 40040760 <__errno> <== NOT EXECUTED 40026fe4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40026fe8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40026fec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40026ff0: 81 c7 e0 08 ret 40026ff4: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 40026ff8: 95 2e a0 10 sll %i2, 0x10, %o2 40026ffc: 93 32 60 10 srl %o1, 0x10, %o1 40027000: 95 32 a0 10 srl %o2, 0x10, %o2 40027004: 9f c0 40 00 call %g1 40027008: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4002700c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40027010: 80 a0 60 00 cmp %g1, 0 40027014: 02 bf ff f7 be 40026ff0 40027018: b0 10 00 08 mov %o0, %i0 4002701c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40027020: 80 a0 60 00 cmp %g1, 0 40027024: 02 80 00 04 be 40027034 40027028: 01 00 00 00 nop 4002702c: 9f c0 40 00 call %g1 40027030: 90 10 00 10 mov %l0, %o0 return result; } 40027034: 81 c7 e0 08 ret 40027038: 81 e8 00 00 restore 4002703c : #include int chroot( const char *pathname ) { 4002703c: 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) { 40027040: 23 10 01 99 sethi %hi(0x40066400), %l1 40027044: e0 04 60 f8 ld [ %l1 + 0xf8 ], %l0 ! 400664f8 40027048: 03 10 01 a9 sethi %hi(0x4006a400), %g1 4002704c: 82 10 60 18 or %g1, 0x18, %g1 ! 4006a418 40027050: 80 a4 00 01 cmp %l0, %g1 40027054: 12 80 00 0e bne 4002708c 40027058: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 4002705c: 40 00 06 75 call 40028a30 40027060: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 40027064: c2 04 60 f8 ld [ %l1 + 0xf8 ], %g1 40027068: 80 a0 40 10 cmp %g1, %l0 4002706c: 12 80 00 08 bne 4002708c 40027070: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40027074: 40 00 65 bb call 40040760 <__errno> <== NOT EXECUTED 40027078: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4002707c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40027080: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40027084: 81 c7 e0 08 ret <== NOT EXECUTED 40027088: 81 e8 00 00 restore <== NOT EXECUTED } result = chdir(pathname); 4002708c: 7f ff ff 78 call 40026e6c 40027090: 90 10 00 18 mov %i0, %o0 if (result) { 40027094: 80 a2 20 00 cmp %o0, 0 40027098: 12 80 00 0b bne 400270c4 4002709c: 11 10 01 76 sethi %hi(0x4005d800), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 400270a0: 92 10 20 01 mov 1, %o1 400270a4: 90 12 20 88 or %o0, 0x88, %o0 400270a8: 94 10 20 00 clr %o2 400270ac: 96 07 bf ec add %fp, -20, %o3 400270b0: 7f ff 82 b0 call 40007b70 400270b4: 98 10 20 00 clr %o4 400270b8: 80 a2 20 00 cmp %o0, 0 400270bc: 02 80 00 0a be 400270e4 400270c0: 03 10 01 99 sethi %hi(0x40066400), %g1 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 400270c4: 40 00 65 a7 call 40040760 <__errno> <== NOT EXECUTED 400270c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400270cc: 40 00 65 a5 call 40040760 <__errno> <== NOT EXECUTED 400270d0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400270d4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400270d8: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 400270dc: 81 c7 e0 08 ret <== NOT EXECUTED 400270e0: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 400270e4: d0 00 60 f8 ld [ %g1 + 0xf8 ], %o0 400270e8: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 400270ec: 80 a0 60 00 cmp %g1, 0 400270f0: 22 80 00 09 be,a 40027114 400270f4: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 400270f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006641c 400270fc: 80 a0 60 00 cmp %g1, 0 40027100: 22 80 00 05 be,a 40027114 40027104: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40027108: 9f c0 40 00 call %g1 4002710c: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_root = loc; 40027110: 03 10 01 99 sethi %hi(0x40066400), %g1 40027114: d0 00 60 f8 ld [ %g1 + 0xf8 ], %o0 ! 400664f8 40027118: 92 07 bf ec add %fp, -20, %o1 4002711c: 94 10 20 14 mov 0x14, %o2 40027120: 90 02 20 18 add %o0, 0x18, %o0 40027124: 40 00 72 62 call 40043aac 40027128: b0 10 20 00 clr %i0 return 0; } 4002712c: 81 c7 e0 08 ret 40027130: 81 e8 00 00 restore 4000a3dc : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 4000a3dc: 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; 4000a3e0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 4000a3e4: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000a3e8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000a3ec: d2 00 60 0c ld [ %g1 + 0xc ], %o1 4000a3f0: 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; 4000a3f4: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 4000a3f8: 94 07 bf f4 add %fp, -12, %o2 4000a3fc: 40 00 05 52 call 4000b944 4000a400: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 4000a404: 80 a2 20 00 cmp %o0, 0 4000a408: 02 80 00 05 be 4000a41c 4000a40c: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000a410: 40 00 00 3c call 4000a500 <== NOT EXECUTED 4000a414: 01 00 00 00 nop <== NOT EXECUTED 4000a418: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000a41c: 81 c7 e0 08 ret 4000a420: 81 e8 00 00 restore 4000a430 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4000a430: 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; 4000a434: e0 06 c0 00 ld [ %i3 ], %l0 if (!device_name_table) 4000a438: 80 a4 20 00 cmp %l0, 0 4000a43c: 02 80 00 05 be 4000a450 4000a440: 27 10 00 43 sethi %hi(0x40010c00), %l3 4000a444: a2 10 20 00 clr %l1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4000a448: 10 80 00 24 b 4000a4d8 4000a44c: a6 14 e3 d8 or %l3, 0x3d8, %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 ); 4000a450: 40 00 0c 07 call 4000d46c <__errno> <== NOT EXECUTED 4000a454: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a458: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000a45c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a460: 81 c7 e0 08 ret <== NOT EXECUTED 4000a464: 81 e8 00 00 restore <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4000a468: e4 04 00 00 ld [ %l0 ], %l2 4000a46c: 80 a4 a0 00 cmp %l2, 0 4000a470: 02 80 00 19 be 4000a4d4 4000a474: a2 04 60 01 inc %l1 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4000a478: 92 10 00 12 mov %l2, %o1 4000a47c: 40 00 0f 9c call 4000e2ec 4000a480: 94 10 00 19 mov %i1, %o2 4000a484: 80 a2 20 00 cmp %o0, 0 4000a488: 32 80 00 14 bne,a 4000a4d8 4000a48c: a0 04 20 14 add %l0, 0x14, %l0 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4000a490: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1 4000a494: 80 a0 60 00 cmp %g1, 0 4000a498: 32 80 00 10 bne,a 4000a4d8 4000a49c: 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; 4000a4a0: 03 10 00 44 sethi %hi(0x40011000), %g1 4000a4a4: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 40011154 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 4000a4a8: e0 26 c0 00 st %l0, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4000a4ac: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000a4b0: 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; 4000a4b4: 03 10 00 44 sethi %hi(0x40011000), %g1 4000a4b8: 82 10 61 08 or %g1, 0x108, %g1 ! 40011108 4000a4bc: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 4000a4c0: 03 10 00 44 sethi %hi(0x40011000), %g1 4000a4c4: 82 10 60 c0 or %g1, 0xc0, %g1 ! 400110c0 4000a4c8: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4000a4cc: 81 c7 e0 08 ret 4000a4d0: 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++) { 4000a4d4: a0 04 20 14 add %l0, 0x14, %l0 4000a4d8: c2 04 c0 00 ld [ %l3 ], %g1 4000a4dc: 80 a4 40 01 cmp %l1, %g1 4000a4e0: 0a bf ff e2 bcs 4000a468 4000a4e4: 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 ); 4000a4e8: 40 00 0b e1 call 4000d46c <__errno> 4000a4ec: b0 10 3f ff mov -1, %i0 4000a4f0: 82 10 20 02 mov 2, %g1 4000a4f4: c2 22 00 00 st %g1, [ %o0 ] } 4000a4f8: 81 c7 e0 08 ret 4000a4fc: 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 43 sethi %hi(0x40010c00), %l1 40002bc4: c2 04 63 d8 ld [ %l1 + 0x3d8 ], %g1 ! 40010fd8 40002bc8: 85 28 60 04 sll %g1, 4, %g2 40002bcc: 83 28 60 02 sll %g1, 2, %g1 40002bd0: 40 00 1c 84 call 40009de0 <_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 63 d8 ld [ %l1 + 0x3d8 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40002be4: 40 00 2a 22 call 4000d46c <__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 2c 79 call 4000ddec 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 44 sethi %hi(0x40011000), %g1 40002c14: 82 10 61 08 or %g1, 0x108, %g1 ! 40011108 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 44 sethi %hi(0x40011000), %g1 40002c24: 82 10 60 c0 or %g1, 0xc0, %g1 ! 400110c0 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 28 call 40006e68 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 c9 call 4000a500 <== 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 29 f3 call 4000d46c <__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 43 sethi %hi(0x40010c00), %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 63 d8 or %i1, 0x3d8, %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 29 e5 call 4000d46c <__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 2c f7 call 4000e0d4 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 29 d8 call 4000d46c <__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 29 cb call 4000d46c <__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 2d 28 call 4000e218 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 5e call 40006f94 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 b4 call 4000a500 <== 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 5e call 40006fec <== 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 9e call 4000a500 <== 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 29 6d call 4000d46c <__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 4a call 40007044 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 74 call 4000a500 <== 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 4000d288 : */ int device_close( rtems_libio_t *iop ) { 4000d288: 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; 4000d28c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000d290: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 4000d294: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000d298: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000d29c: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d2a0: 94 07 bf f4 add %fp, -12, %o2 4000d2a4: 40 00 05 28 call 4000e744 4000d2a8: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000d2ac: 80 a2 20 00 cmp %o0, 0 4000d2b0: 02 80 00 05 be 4000d2c4 4000d2b4: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000d2b8: 40 00 06 a0 call 4000ed38 <== NOT EXECUTED 4000d2bc: 01 00 00 00 nop <== NOT EXECUTED 4000d2c0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000d2c4: 81 c7 e0 08 ret 4000d2c8: 81 e8 00 00 restore 4000d188 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000d188: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000d18c: 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; 4000d190: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 4000d194: 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; 4000d198: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000d19c: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d1a0: 40 00 05 7f call 4000e79c 4000d1a4: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d1a8: 80 a2 20 00 cmp %o0, 0 4000d1ac: 22 80 00 06 be,a 4000d1c4 4000d1b0: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 4000d1b4: 40 00 06 e1 call 4000ed38 <== NOT EXECUTED 4000d1b8: 01 00 00 00 nop <== NOT EXECUTED 4000d1bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000d1c0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return args.ioctl_return; } 4000d1c4: b0 10 00 08 mov %o0, %i0 4000d1c8: 81 c7 e0 08 ret 4000d1cc: 81 e8 00 00 restore 4000d2cc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000d2cc: 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; 4000d2d0: 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; 4000d2d4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000d2d8: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 4000d2dc: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 4000d2e0: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 4000d2e4: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d2e8: 94 07 bf f4 add %fp, -12, %o2 4000d2ec: 40 00 05 42 call 4000e7f4 4000d2f0: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d2f4: 80 a2 20 00 cmp %o0, 0 4000d2f8: 02 80 00 05 be 4000d30c 4000d2fc: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000d300: 40 00 06 8e call 4000ed38 <== NOT EXECUTED 4000d304: 01 00 00 00 nop <== NOT EXECUTED 4000d308: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 4000d30c: 81 c7 e0 08 ret 4000d310: 81 e8 00 00 restore 4000d22c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000d22c: 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; 4000d230: 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; 4000d234: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4000d238: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 4000d23c: 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; 4000d240: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000d244: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 4000d248: 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; 4000d24c: 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; 4000d250: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 4000d254: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000d258: 40 00 05 7d call 4000e84c <== NOT EXECUTED 4000d25c: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d260: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d264: 22 80 00 06 be,a 4000d27c <== NOT EXECUTED 4000d268: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000d26c: 40 00 06 b3 call 4000ed38 <== NOT EXECUTED 4000d270: 01 00 00 00 nop <== NOT EXECUTED 4000d274: 81 c7 e0 08 ret <== NOT EXECUTED 4000d278: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000d27c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000d280: 81 c7 e0 08 ret <== NOT EXECUTED 4000d284: 81 e8 00 00 restore <== NOT EXECUTED 4000d1d0 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000d1d0: 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; 4000d1d4: 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; 4000d1d8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 4000d1dc: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 4000d1e0: 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; 4000d1e4: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 4000d1e8: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 4000d1ec: 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; 4000d1f0: 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; 4000d1f4: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 4000d1f8: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d1fc: 40 00 05 aa call 4000e8a4 4000d200: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d204: 80 a2 20 00 cmp %o0, 0 4000d208: 22 80 00 06 be,a 4000d220 4000d20c: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 4000d210: 40 00 06 ca call 4000ed38 <== NOT EXECUTED 4000d214: 01 00 00 00 nop <== NOT EXECUTED 4000d218: 81 c7 e0 08 ret <== NOT EXECUTED 4000d21c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000d220: b0 10 00 08 mov %o0, %i0 4000d224: 81 c7 e0 08 ret 4000d228: 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 fc call 40006b94 <== 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 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 400045c0: c4 00 60 c8 ld [ %g1 + 0xc8 ], %g2 ! 4001d0c8 <__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 40027784 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40027784: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 40027788: d0 00 60 74 ld [ %g1 + 0x74 ], %o0 ! 4006a074 <== NOT EXECUTED 4002778c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027790: 02 80 00 05 be 400277a4 <== NOT EXECUTED 40027794: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40027798: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002779c: 40 00 64 49 call 400408c0 <== NOT EXECUTED 400277a0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400277a4: 81 c3 e0 08 retl <== NOT EXECUTED 400277a8: 01 00 00 00 nop 400277ac : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 400277ac: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 400277b0: d0 00 63 8c ld [ %g1 + 0x38c ], %o0 ! 40069f8c <== NOT EXECUTED 400277b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400277b8: 02 80 00 05 be 400277cc <== NOT EXECUTED 400277bc: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 400277c0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400277c4: 40 00 64 3f call 400408c0 <== NOT EXECUTED 400277c8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400277cc: 81 c3 e0 08 retl <== NOT EXECUTED 400277d0: 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 74 sethi %hi(0x4001d000), %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 74 sethi %hi(0x4001d000), %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 70 sethi %hi(0x4001c000), %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 4000483c: 29 10 00 70 sethi %hi(0x4001c000), %l4 <== NOT EXECUTED 40004840: a4 14 a0 c8 or %l2, 0xc8, %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 e0 58 or %l3, 0x58, %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 40004848: a8 15 20 50 or %l4, 0x50, %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 4003a470 : #include int fchdir( int fd ) { 4003a470: 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 ); 4003a474: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED 4003a478: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 40066204 <== NOT EXECUTED 4003a47c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4003a480: 1a 80 00 0c bcc 4003a4b0 <== NOT EXECUTED 4003a484: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4003a488: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 4003a48c: e4 00 63 b8 ld [ %g1 + 0x3b8 ], %l2 ! 4006a3b8 <== NOT EXECUTED 4003a490: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 4003a494: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4003a498: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 4003a49c: a4 04 80 18 add %l2, %i0, %l2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4003a4a0: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 <== NOT EXECUTED 4003a4a4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4003a4a8: 12 80 00 06 bne 4003a4c0 <== NOT EXECUTED 4003a4ac: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 4003a4b0: 40 00 18 ac call 40040760 <__errno> <== NOT EXECUTED 4003a4b4: 01 00 00 00 nop <== NOT EXECUTED 4003a4b8: 10 80 00 1b b 4003a524 <== NOT EXECUTED 4003a4bc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003a4c0: 32 80 00 06 bne,a 4003a4d8 <== NOT EXECUTED 4003a4c4: c2 04 a0 28 ld [ %l2 + 0x28 ], %g1 <== NOT EXECUTED 4003a4c8: 40 00 18 a6 call 40040760 <__errno> <== NOT EXECUTED 4003a4cc: 01 00 00 00 nop <== NOT EXECUTED 4003a4d0: 10 80 00 15 b 4003a524 <== NOT EXECUTED 4003a4d4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4003a4d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003a4dc: 02 80 00 06 be 4003a4f4 <== NOT EXECUTED 4003a4e0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4003a4e4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4003a4e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003a4ec: 32 80 00 06 bne,a 4003a504 <== NOT EXECUTED 4003a4f0: a4 04 a0 1c add %l2, 0x1c, %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4003a4f4: 40 00 18 9b call 40040760 <__errno> <== NOT EXECUTED 4003a4f8: 01 00 00 00 nop <== NOT EXECUTED 4003a4fc: 10 80 00 0a b 4003a524 <== NOT EXECUTED 4003a500: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4003a504: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003a508: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4003a50c: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4003a510: 02 80 00 07 be 4003a52c <== NOT EXECUTED 4003a514: 23 10 01 99 sethi %hi(0x40066400), %l1 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 4003a518: 40 00 18 92 call 40040760 <__errno> <== NOT EXECUTED 4003a51c: 01 00 00 00 nop <== NOT EXECUTED 4003a520: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 4003a524: 10 80 00 1c b 4003a594 <== NOT EXECUTED 4003a528: 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; 4003a52c: e6 04 60 f8 ld [ %l1 + 0xf8 ], %l3 <== NOT EXECUTED 4003a530: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4003a534: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED 4003a538: a0 07 bf d8 add %fp, -40, %l0 <== NOT EXECUTED 4003a53c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4003a540: 40 00 25 5b call 40043aac <== NOT EXECUTED 4003a544: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4003a548: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 4003a54c: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4003a550: 40 00 25 57 call 40043aac <== NOT EXECUTED 4003a554: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003a558: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4003a55c: 11 10 01 76 sethi %hi(0x4005d800), %o0 <== NOT EXECUTED 4003a560: 94 10 20 00 clr %o2 <== NOT EXECUTED 4003a564: 90 12 20 88 or %o0, 0x88, %o0 <== NOT EXECUTED 4003a568: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED 4003a56c: 7f ff 35 81 call 40007b70 <== NOT EXECUTED 4003a570: 98 10 20 00 clr %o4 <== NOT EXECUTED 4003a574: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4003a578: 02 80 00 09 be 4003a59c <== NOT EXECUTED 4003a57c: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 4003a580: d0 04 60 f8 ld [ %l1 + 0xf8 ], %o0 <== NOT EXECUTED 4003a584: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4003a588: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4003a58c: 40 00 25 48 call 40043aac <== NOT EXECUTED 4003a590: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED return -1; 4003a594: 81 c7 e0 08 ret <== NOT EXECUTED 4003a598: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 4003a59c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003a5a0: 22 80 00 09 be,a 4003a5c4 <== NOT EXECUTED 4003a5a4: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4003a5a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006641c <== NOT EXECUTED 4003a5ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003a5b0: 22 80 00 05 be,a 4003a5c4 <== NOT EXECUTED 4003a5b4: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4003a5b8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003a5bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4003a5c0: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4003a5c4: d0 00 60 f8 ld [ %g1 + 0xf8 ], %o0 ! 400664f8 <== NOT EXECUTED 4003a5c8: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED 4003a5cc: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4003a5d0: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4003a5d4: 40 00 25 36 call 40043aac <== NOT EXECUTED 4003a5d8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 4003a5dc: 81 c7 e0 08 ret <== NOT EXECUTED 4003a5e0: 81 e8 00 00 restore <== NOT EXECUTED 4002736c : int fchmod( int fd, mode_t mode ) { 4002736c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40027370: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED 40027374: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 40066204 <== NOT EXECUTED 40027378: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002737c: 1a 80 00 0c bcc 400273ac <== NOT EXECUTED 40027380: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40027384: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 40027388: d0 00 63 b8 ld [ %g1 + 0x3b8 ], %o0 ! 4006a3b8 <== NOT EXECUTED 4002738c: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40027390: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 40027394: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 40027398: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002739c: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 400273a0: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 400273a4: 12 80 00 06 bne 400273bc <== NOT EXECUTED 400273a8: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 400273ac: 40 00 64 ed call 40040760 <__errno> <== NOT EXECUTED 400273b0: 01 00 00 00 nop <== NOT EXECUTED 400273b4: 10 80 00 0f b 400273f0 <== NOT EXECUTED 400273b8: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400273bc: 32 80 00 06 bne,a 400273d4 <== NOT EXECUTED 400273c0: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 <== NOT EXECUTED 400273c4: 40 00 64 e7 call 40040760 <__errno> <== NOT EXECUTED 400273c8: 01 00 00 00 nop <== NOT EXECUTED 400273cc: 10 80 00 09 b 400273f0 <== NOT EXECUTED 400273d0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 400273d4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400273d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400273dc: 32 80 00 08 bne,a 400273fc <== NOT EXECUTED 400273e0: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400273e4: 40 00 64 df call 40040760 <__errno> <== NOT EXECUTED 400273e8: 01 00 00 00 nop <== NOT EXECUTED 400273ec: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400273f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400273f4: 10 80 00 07 b 40027410 <== NOT EXECUTED 400273f8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 400273fc: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED 40027400: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40027404: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED 40027408: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002740c: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 40027410: 81 c7 e0 08 ret <== NOT EXECUTED 40027414: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40027418 : int fchown( int fd, uid_t owner, gid_t group ) { 40027418: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4002741c: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED 40027420: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 40066204 <== NOT EXECUTED 40027424: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40027428: 1a 80 00 0c bcc 40027458 <== NOT EXECUTED 4002742c: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40027430: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 40027434: d0 00 63 b8 ld [ %g1 + 0x3b8 ], %o0 ! 4006a3b8 <== NOT EXECUTED 40027438: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 4002743c: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 40027440: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 40027444: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40027448: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 4002744c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40027450: 12 80 00 06 bne 40027468 <== NOT EXECUTED 40027454: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40027458: 40 00 64 c2 call 40040760 <__errno> <== NOT EXECUTED 4002745c: 01 00 00 00 nop <== NOT EXECUTED 40027460: 10 80 00 0f b 4002749c <== NOT EXECUTED 40027464: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40027468: 32 80 00 06 bne,a 40027480 <== NOT EXECUTED 4002746c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 40027470: 40 00 64 bc call 40040760 <__errno> <== NOT EXECUTED 40027474: 01 00 00 00 nop <== NOT EXECUTED 40027478: 10 80 00 09 b 4002749c <== NOT EXECUTED 4002747c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 40027480: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40027484: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40027488: 12 80 00 08 bne 400274a8 <== NOT EXECUTED 4002748c: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40027490: 40 00 64 b4 call 40040760 <__errno> <== NOT EXECUTED 40027494: 01 00 00 00 nop <== NOT EXECUTED 40027498: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4002749c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400274a0: 10 80 00 07 b 400274bc <== NOT EXECUTED 400274a4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 400274a8: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 400274ac: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED 400274b0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 400274b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400274b8: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 400274bc: 81 c7 e0 08 ret <== NOT EXECUTED 400274c0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4003a60c : int fcntl( int fd, int cmd, ... ) { 4003a60c: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003a610: 03 10 01 98 sethi %hi(0x40066000), %g1 4003a614: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 40066204 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4003a618: 84 07 a0 4c add %fp, 0x4c, %g2 4003a61c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4003a620: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4003a624: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4003a628: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003a62c: 80 a6 00 01 cmp %i0, %g1 4003a630: 1a 80 00 0c bcc 4003a660 4003a634: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 4003a638: 07 10 01 a8 sethi %hi(0x4006a000), %g3 4003a63c: c6 00 e3 b8 ld [ %g3 + 0x3b8 ], %g3 ! 4006a3b8 4003a640: 89 2e 20 06 sll %i0, 6, %g4 4003a644: a1 2e 20 03 sll %i0, 3, %l0 4003a648: a0 04 00 04 add %l0, %g4, %l0 4003a64c: a0 00 c0 10 add %g3, %l0, %l0 rtems_libio_check_is_open(iop); 4003a650: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 4003a654: 80 8a 21 00 btst 0x100, %o0 4003a658: 12 80 00 06 bne 4003a670 4003a65c: 80 a6 60 09 cmp %i1, 9 4003a660: 40 00 18 40 call 40040760 <__errno> <== NOT EXECUTED 4003a664: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003a668: 10 80 00 51 b 4003a7ac <== NOT EXECUTED 4003a66c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003a670: 18 80 00 4c bgu 4003a7a0 4003a674: 89 2e 60 02 sll %i1, 2, %g4 4003a678: 1b 10 00 e9 sethi %hi(0x4003a400), %o5 4003a67c: 9a 13 61 e4 or %o5, 0x1e4, %o5 ! 4003a5e4 4003a680: c8 03 40 04 ld [ %o5 + %g4 ], %g4 4003a684: 81 c1 00 00 jmp %g4 4003a688: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 4003a68c: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 4003a690: 80 a0 a0 00 cmp %g2, 0 4003a694: 02 80 00 09 be 4003a6b8 4003a698: 80 a0 80 01 cmp %g2, %g1 diop = rtems_libio_iop( fd2 ); 4003a69c: 1a 80 00 0c bcc 4003a6cc <== NOT EXECUTED 4003a6a0: a2 10 20 00 clr %l1 <== NOT EXECUTED 4003a6a4: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 4003a6a8: a3 28 a0 03 sll %g2, 3, %l1 <== NOT EXECUTED 4003a6ac: a2 04 40 01 add %l1, %g1, %l1 <== NOT EXECUTED 4003a6b0: 10 80 00 07 b 4003a6cc <== NOT EXECUTED 4003a6b4: a2 00 c0 11 add %g3, %l1, %l1 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 4003a6b8: 7f ff 36 48 call 40007fd8 4003a6bc: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 4003a6c0: a2 92 20 00 orcc %o0, 0, %l1 4003a6c4: 02 80 00 4d be 4003a7f8 4003a6c8: 01 00 00 00 nop break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003a6cc: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 diop->flags = iop->flags; 4003a6d0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 4003a6d4: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 diop->file_info = iop->file_info; 4003a6d8: c4 24 60 3c st %g2, [ %l1 + 0x3c ] diop->flags = iop->flags; 4003a6dc: c2 24 60 18 st %g1, [ %l1 + 0x18 ] ret = -1; break; } } diop->handlers = iop->handlers; 4003a6e0: c6 24 60 40 st %g3, [ %l1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003a6e4: 90 04 60 1c add %l1, 0x1c, %o0 4003a6e8: 92 04 20 1c add %l0, 0x1c, %o1 4003a6ec: 40 00 24 f0 call 40043aac 4003a6f0: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 4003a6f4: 03 10 01 a8 sethi %hi(0x4006a000), %g1 4003a6f8: f0 00 63 b8 ld [ %g1 + 0x3b8 ], %i0 ! 4006a3b8 4003a6fc: a2 24 40 18 sub %l1, %i0, %l1 4003a700: a3 3c 60 03 sra %l1, 3, %l1 4003a704: 85 2c 60 06 sll %l1, 6, %g2 4003a708: 83 2c 60 03 sll %l1, 3, %g1 4003a70c: 82 20 80 01 sub %g2, %g1, %g1 4003a710: 85 28 60 06 sll %g1, 6, %g2 4003a714: 82 00 40 02 add %g1, %g2, %g1 4003a718: 82 00 40 11 add %g1, %l1, %g1 4003a71c: b1 28 60 0f sll %g1, 0xf, %i0 4003a720: b0 26 00 01 sub %i0, %g1, %i0 4003a724: b1 2e 20 03 sll %i0, 3, %i0 4003a728: 10 80 00 24 b 4003a7b8 4003a72c: b0 06 00 11 add %i0, %l1, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 4003a730: b1 32 20 0b srl %o0, 0xb, %i0 4003a734: 10 80 00 24 b 4003a7c4 4003a738: 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 ) ) 4003a73c: c2 00 80 00 ld [ %g2 ], %g1 4003a740: 80 a0 60 00 cmp %g1, 0 4003a744: 22 80 00 03 be,a 4003a750 4003a748: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED 4003a74c: 90 12 28 00 or %o0, 0x800, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 4003a750: d0 24 20 18 st %o0, [ %l0 + 0x18 ] 4003a754: 10 80 00 1c b 4003a7c4 4003a758: b0 10 20 00 clr %i0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 4003a75c: 7f ff 35 b4 call 40007e2c 4003a760: 01 00 00 00 nop 4003a764: 10 80 00 15 b 4003a7b8 4003a768: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 4003a76c: d0 00 80 00 ld [ %g2 ], %o0 4003a770: 7f ff 36 4e call 400080a8 4003a774: 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); 4003a778: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4003a77c: 90 0a 22 01 and %o0, 0x201, %o0 4003a780: 82 08 7d fe and %g1, -514, %g1 4003a784: 82 12 00 01 or %o0, %g1, %g1 4003a788: 10 80 00 0f b 4003a7c4 4003a78c: c2 24 20 18 st %g1, [ %l0 + 0x18 ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4003a790: 40 00 17 f4 call 40040760 <__errno> 4003a794: b0 10 3f ff mov -1, %i0 4003a798: 10 80 00 05 b 4003a7ac 4003a79c: 82 10 20 86 mov 0x86, %g1 ret = -1; break; default: errno = EINVAL; 4003a7a0: 40 00 17 f0 call 40040760 <__errno> 4003a7a4: b0 10 3f ff mov -1, %i0 4003a7a8: 82 10 20 16 mov 0x16, %g1 4003a7ac: c2 22 00 00 st %g1, [ %o0 ] 4003a7b0: 81 c7 e0 08 ret 4003a7b4: 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) { 4003a7b8: 80 a6 20 00 cmp %i0, 0 4003a7bc: 06 80 00 0f bl 4003a7f8 4003a7c0: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 4003a7c4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4003a7c8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4003a7cc: 80 a0 60 00 cmp %g1, 0 4003a7d0: 02 bf ff f8 be 4003a7b0 4003a7d4: 92 10 00 10 mov %l0, %o1 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4003a7d8: 9f c0 40 00 call %g1 4003a7dc: 90 10 00 19 mov %i1, %o0 if (err) { 4003a7e0: a0 92 20 00 orcc %o0, 0, %l0 4003a7e4: 02 80 00 05 be 4003a7f8 4003a7e8: 01 00 00 00 nop errno = err; 4003a7ec: 40 00 17 dd call 40040760 <__errno> <== NOT EXECUTED 4003a7f0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4003a7f4: 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; } 4003a7f8: 81 c7 e0 08 ret 4003a7fc: 81 e8 00 00 restore 4000d8a4 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d8a4: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d8a8: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000d8ac: d0 00 62 f0 ld [ %g1 + 0x2f0 ], %o0 ! 4001d6f0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d8b0: a0 10 00 18 mov %i0, %l0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d8b4: 92 10 20 00 clr %o1 4000d8b8: 94 10 20 00 clr %o2 4000d8bc: 7f ff e3 0d call 400064f0 4000d8c0: b0 10 3f fc mov -4, %i0 4000d8c4: 80 a2 20 00 cmp %o0, 0 4000d8c8: 12 80 00 f0 bne 4000dc88 4000d8cc: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4000d8d0: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (pipe == NULL) { 4000d8d4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000d8d8: 32 80 00 5b bne,a 4000da44 <== NOT EXECUTED 4000d8dc: 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)); 4000d8e0: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED 4000d8e4: 7f ff f7 72 call 4000b6ac <== NOT EXECUTED 4000d8e8: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 4000d8ec: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 4000d8f0: 02 80 00 66 be 4000da88 <== NOT EXECUTED 4000d8f4: a2 10 00 12 mov %l2, %l1 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4000d8f8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d8fc: 40 00 09 f2 call 400100c4 <== NOT EXECUTED 4000d900: 94 10 20 34 mov 0x34, %o2 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4000d904: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4000d908: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED 4000d90c: 7f ff f7 68 call 4000b6ac <== NOT EXECUTED 4000d910: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED if (! pipe->Buffer) 4000d914: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d918: 02 80 00 46 be 4000da30 <== NOT EXECUTED 4000d91c: d0 24 80 00 st %o0, [ %l2 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4000d920: 27 10 00 74 sethi %hi(0x4001d000), %l3 <== NOT EXECUTED 4000d924: d0 4c e0 b4 ldsb [ %l3 + 0xb4 ], %o0 ! 4001d0b4 <== NOT EXECUTED 4000d928: 29 14 12 5c sethi %hi(0x50497000), %l4 <== NOT EXECUTED 4000d92c: 82 15 22 00 or %l4, 0x200, %g1 ! 50497200 <== NOT EXECUTED 4000d930: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d934: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000d938: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d93c: 40 00 02 b1 call 4000e400 <== NOT EXECUTED 4000d940: 96 04 a0 2c add %l2, 0x2c, %o3 <== NOT EXECUTED 4000d944: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d948: 32 80 00 38 bne,a 4000da28 <== NOT EXECUTED 4000d94c: 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( 4000d950: d0 4c e0 b4 ldsb [ %l3 + 0xb4 ], %o0 <== NOT EXECUTED 4000d954: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 4000d958: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 4000d95c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d960: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000d964: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d968: 40 00 02 a6 call 4000e400 <== NOT EXECUTED 4000d96c: 96 04 a0 30 add %l2, 0x30, %o3 <== NOT EXECUTED 4000d970: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d974: 12 80 00 2a bne 4000da1c <== NOT EXECUTED 4000d978: 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( 4000d97c: d0 4c e0 b4 ldsb [ %l3 + 0xb4 ], %o0 <== NOT EXECUTED 4000d980: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000d984: 90 12 00 14 or %o0, %l4, %o0 <== NOT EXECUTED 4000d988: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000d98c: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000d990: 7f ff e2 36 call 40006268 <== NOT EXECUTED 4000d994: 98 04 a0 28 add %l2, 0x28, %o4 <== NOT EXECUTED 4000d998: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d99c: 12 80 00 1e bne 4000da14 <== NOT EXECUTED 4000d9a0: 29 10 00 79 sethi %hi(0x4001e400), %l4 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4000d9a4: d2 04 a0 2c ld [ %l2 + 0x2c ], %o1 <== NOT EXECUTED 4000d9a8: b0 07 bf f8 add %fp, -8, %i0 <== NOT EXECUTED 4000d9ac: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 4000d9b0: 7f ff e8 da call 40007d18 <_Objects_Get> <== NOT EXECUTED 4000d9b4: 90 15 20 00 mov %l4, %o0 <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 4000d9b8: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 4000d9bc: 25 04 00 00 sethi %hi(0x10000000), %l2 <== NOT EXECUTED 4000d9c0: 82 10 40 12 or %g1, %l2, %g1 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4000d9c4: 7f ff eb 23 call 40008650 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000d9c8: c2 22 20 4c st %g1, [ %o0 + 0x4c ] <== NOT EXECUTED 4000d9cc: d2 04 60 30 ld [ %l1 + 0x30 ], %o1 <== NOT EXECUTED 4000d9d0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 4000d9d4: 7f ff e8 d1 call 40007d18 <_Objects_Get> <== NOT EXECUTED 4000d9d8: 90 15 20 00 mov %l4, %o0 <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4000d9dc: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 4000d9e0: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4000d9e4: 7f ff eb 1b call 40008650 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000d9e8: e4 22 20 4c st %l2, [ %o0 + 0x4c ] <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4000d9ec: c2 0c e0 b4 ldub [ %l3 + 0xb4 ], %g1 <== NOT EXECUTED 4000d9f0: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4000d9f4: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4000d9f8: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000d9fc: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 4000da00: 12 80 00 10 bne 4000da40 <== NOT EXECUTED 4000da04: c4 2c e0 b4 stb %g2, [ %l3 + 0xb4 ] <== NOT EXECUTED c = 'a'; 4000da08: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 4000da0c: 10 80 00 0d b 4000da40 <== NOT EXECUTED 4000da10: c2 2c e0 b4 stb %g1, [ %l3 + 0xb4 ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4000da14: 40 00 02 a9 call 4000e4b8 <== NOT EXECUTED 4000da18: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4000da1c: 40 00 02 a7 call 4000e4b8 <== NOT EXECUTED 4000da20: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4000da24: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED 4000da28: 7f ff f5 bf call 4000b124 <== NOT EXECUTED 4000da2c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 4000da30: 7f ff f5 bd call 4000b124 <== NOT EXECUTED 4000da34: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000da38: 10 80 00 15 b 4000da8c <== NOT EXECUTED 4000da3c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000da40: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000da44: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000da48: 7f ff e2 aa call 400064f0 <== NOT EXECUTED 4000da4c: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000da50: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000da54: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000da58: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000da5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000da60: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000da64: 12 80 00 09 bne 4000da88 <== NOT EXECUTED 4000da68: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED if (err) 4000da6c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000da70: 22 80 00 06 be,a 4000da88 <== NOT EXECUTED 4000da74: e2 24 00 00 st %l1, [ %l0 ] <== NOT EXECUTED pipe_free(pipe); 4000da78: 7f ff ff 3b call 4000d764 <== NOT EXECUTED 4000da7c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000da80: 10 80 00 03 b 4000da8c <== NOT EXECUTED 4000da84: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000da88: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000da8c: 7f ff e2 e0 call 4000660c <== NOT EXECUTED 4000da90: d0 00 62 f0 ld [ %g1 + 0x2f0 ], %o0 ! 4001d6f0 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4000da94: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000da98: 12 80 00 7c bne 4000dc88 <== NOT EXECUTED 4000da9c: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000daa0: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 4000daa4: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000daa8: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000daac: 02 80 00 2e be 4000db64 <== NOT EXECUTED 4000dab0: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED 4000dab4: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000dab8: 02 80 00 56 be 4000dc10 <== NOT EXECUTED 4000dabc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000dac0: 12 80 00 6a bne 4000dc68 <== NOT EXECUTED 4000dac4: 01 00 00 00 nop <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000dac8: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000dacc: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dad0: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000dad4: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dad8: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 4000dadc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dae0: 12 80 00 05 bne 4000daf4 <== NOT EXECUTED 4000dae4: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000dae8: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000daec: 40 00 02 8d call 4000e520 <== NOT EXECUTED 4000daf0: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 4000daf4: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000daf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dafc: 12 80 00 5b bne 4000dc68 <== NOT EXECUTED 4000db00: 01 00 00 00 nop <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4000db04: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 4000db08: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000db0c: 12 80 00 57 bne 4000dc68 <== NOT EXECUTED 4000db10: 01 00 00 00 nop <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4000db14: e4 04 60 24 ld [ %l1 + 0x24 ], %l2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4000db18: 7f ff e2 bd call 4000660c <== NOT EXECUTED 4000db1c: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000db20: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000db24: 40 00 02 96 call 4000e57c <== NOT EXECUTED 4000db28: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000db2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000db30: 12 80 00 52 bne 4000dc78 <== NOT EXECUTED 4000db34: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4000db38: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000db3c: 7f ff e2 6d call 400064f0 <== NOT EXECUTED 4000db40: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000db44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000db48: 32 80 00 4d bne,a 4000dc7c <== NOT EXECUTED 4000db4c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4000db50: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 <== NOT EXECUTED 4000db54: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000db58: 02 bf ff f0 be 4000db18 <== NOT EXECUTED 4000db5c: 01 00 00 00 nop <== NOT EXECUTED 4000db60: 30 80 00 42 b,a 4000dc68 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4000db64: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 4000db68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db6c: 32 80 00 07 bne,a 4000db88 <== NOT EXECUTED 4000db70: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000db74: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000db78: 22 80 00 04 be,a 4000db88 <== NOT EXECUTED 4000db7c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000db80: 10 80 00 3f b 4000dc7c <== NOT EXECUTED 4000db84: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000db88: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000db8c: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000db90: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000db94: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 4000db98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db9c: 12 80 00 05 bne 4000dbb0 <== NOT EXECUTED 4000dba0: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000dba4: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000dba8: 40 00 02 5e call 4000e520 <== NOT EXECUTED 4000dbac: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Readers == 0) { 4000dbb0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 4000dbb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dbb8: 12 80 00 2c bne 4000dc68 <== NOT EXECUTED 4000dbbc: 01 00 00 00 nop <== NOT EXECUTED prevCounter = pipe->readerCounter; 4000dbc0: e4 04 60 20 ld [ %l1 + 0x20 ], %l2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4000dbc4: 7f ff e2 92 call 4000660c <== NOT EXECUTED 4000dbc8: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000dbcc: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000dbd0: 40 00 02 6b call 4000e57c <== NOT EXECUTED 4000dbd4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000dbd8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dbdc: 12 80 00 27 bne 4000dc78 <== NOT EXECUTED 4000dbe0: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4000dbe4: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000dbe8: 7f ff e2 42 call 400064f0 <== NOT EXECUTED 4000dbec: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000dbf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dbf4: 32 80 00 22 bne,a 4000dc7c <== NOT EXECUTED 4000dbf8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4000dbfc: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 4000dc00: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000dc04: 02 bf ff f0 be 4000dbc4 <== NOT EXECUTED 4000dc08: 01 00 00 00 nop <== NOT EXECUTED 4000dc0c: 30 80 00 17 b,a 4000dc68 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000dc10: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000dc14: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dc18: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000dc1c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dc20: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 4000dc24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dc28: 12 80 00 05 bne 4000dc3c <== NOT EXECUTED 4000dc2c: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000dc30: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000dc34: 40 00 02 3b call 4000e520 <== NOT EXECUTED 4000dc38: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000dc3c: 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 ++; 4000dc40: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000dc44: 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 ++; 4000dc48: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000dc4c: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 4000dc50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dc54: 12 80 00 05 bne 4000dc68 <== NOT EXECUTED 4000dc58: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000dc5c: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000dc60: 40 00 02 30 call 4000e520 <== NOT EXECUTED 4000dc64: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4000dc68: 7f ff e2 69 call 4000660c <== NOT EXECUTED 4000dc6c: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED return 0; 4000dc70: 81 c7 e0 08 ret <== NOT EXECUTED 4000dc74: 81 e8 00 00 restore <== NOT EXECUTED 4000dc78: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4000dc7c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000dc80: 7f ff fe c5 call 4000d794 <== NOT EXECUTED 4000dc84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 4000dc88: 81 c7 e0 08 ret 4000dc8c: 81 e8 00 00 restore 4000b510 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000b510: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 4000b514: 05 10 01 a9 sethi %hi(0x4006a400), %g2 <== NOT EXECUTED 4000b518: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000b51c: 10 80 00 08 b 4000b53c <== NOT EXECUTED 4000b520: 84 10 a0 04 or %g2, 4, %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 ) { 4000b524: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 <== NOT EXECUTED 4000b528: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 4000b52c: 32 80 00 04 bne,a 4000b53c <== NOT EXECUTED 4000b530: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000b534: 81 c3 e0 08 retl <== NOT EXECUTED 4000b538: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000b53c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000b540: 32 bf ff f9 bne,a 4000b524 <== NOT EXECUTED 4000b544: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED return true; } } return false; } 4000b548: 81 c3 e0 08 retl <== NOT EXECUTED 4000b54c: 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 83 sethi %hi(0x40020c00), %g1 40004400: c2 00 63 94 ld [ %g1 + 0x394 ], %g1 ! 40020f94 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 86 sethi %hi(0x40021800), %g1 40004414: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 ! 40021930 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 37 5f call 400121b0 <__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 37 59 call 400121b0 <__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 37 27 call 400121b0 <__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 4000b124 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000b124: 9d e3 bf a0 save %sp, -96, %sp 4000b128: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000b12c: 82 10 60 b8 or %g1, 0xb8, %g1 ! 4001d8b8 4000b130: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4000b134: b2 10 00 18 mov %i0, %i1 4000b138: 84 00 a0 01 inc %g2 if ( !ptr ) 4000b13c: 80 a6 20 00 cmp %i0, 0 4000b140: 02 80 00 21 be 4000b1c4 4000b144: 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()) && 4000b148: 03 10 00 77 sethi %hi(0x4001dc00), %g1 4000b14c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 4001dc20 <_System_state_Current> 4000b150: 80 a0 60 03 cmp %g1, 3 4000b154: 12 80 00 09 bne 4000b178 4000b158: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000b15c: 40 00 01 2e call 4000b614 4000b160: 01 00 00 00 nop 4000b164: 80 8a 20 ff btst 0xff, %o0 4000b168: 12 80 00 04 bne 4000b178 4000b16c: 03 10 00 75 sethi %hi(0x4001d400), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000b170: 40 00 01 3b call 4000b65c <== NOT EXECUTED 4000b174: 81 e8 00 00 restore <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000b178: c2 00 61 88 ld [ %g1 + 0x188 ], %g1 4000b17c: 80 a0 60 00 cmp %g1, 0 4000b180: 02 80 00 06 be 4000b198 4000b184: 21 10 00 73 sethi %hi(0x4001cc00), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000b188: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000b18c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b190: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4000b194: 21 10 00 73 sethi %hi(0x4001cc00), %l0 <== NOT EXECUTED 4000b198: d0 04 23 20 ld [ %l0 + 0x320 ], %o0 ! 4001cf20 4000b19c: 40 00 06 8d call 4000cbd0 <_Protected_heap_Free> 4000b1a0: 92 10 00 19 mov %i1, %o1 4000b1a4: 80 8a 20 ff btst 0xff, %o0 4000b1a8: 12 80 00 07 bne 4000b1c4 4000b1ac: c2 04 23 20 ld [ %l0 + 0x320 ], %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000b1b0: 31 10 00 70 sethi %hi(0x4001c000), %i0 <== NOT EXECUTED 4000b1b4: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000b1b8: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000b1bc: 7f ff e2 bf call 40003cb8 <== NOT EXECUTED 4000b1c0: 91 ee 23 b8 restore %i0, 0x3b8, %o0 <== NOT EXECUTED 4000b1c4: 81 c7 e0 08 ret 4000b1c8: 81 e8 00 00 restore 400288fc : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 400288fc: 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 40028900: 03 10 01 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 40028904: 82 10 60 18 or %g1, 0x18, %g1 ! 4006a418 <== NOT EXECUTED 40028908: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002890c: 02 80 00 18 be 4002896c <== NOT EXECUTED 40028910: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 40028914: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40028918: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002891c: 22 80 00 09 be,a 40028940 <== NOT EXECUTED 40028920: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40028924: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028928: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002892c: 22 80 00 05 be,a 40028940 <== NOT EXECUTED 40028930: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40028934: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028938: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 4002893c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40028940: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028944: 02 80 00 08 be 40028964 <== NOT EXECUTED 40028948: 01 00 00 00 nop <== NOT EXECUTED 4002894c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028950: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028954: 02 80 00 04 be 40028964 <== NOT EXECUTED 40028958: 01 00 00 00 nop <== NOT EXECUTED 4002895c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028960: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 40028964: 7f ff 7c ac call 40007c14 <== NOT EXECUTED 40028968: 81 e8 00 00 restore <== NOT EXECUTED 4002896c: 81 c7 e0 08 ret <== NOT EXECUTED 40028970: 81 e8 00 00 restore <== NOT EXECUTED 4001b054 : int fstat( int fd, struct stat *sbuf ) { 4001b054: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 4001b058: 80 a6 60 00 cmp %i1, 0 4001b05c: 32 80 00 06 bne,a 4001b074 4001b060: 03 10 00 73 sethi %hi(0x4001cc00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 4001b064: 7f ff d1 9e call 4000f6dc <__errno> 4001b068: 01 00 00 00 nop 4001b06c: 10 80 00 12 b 4001b0b4 4001b070: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 4001b074: c2 00 63 14 ld [ %g1 + 0x314 ], %g1 4001b078: 80 a6 00 01 cmp %i0, %g1 4001b07c: 1a 80 00 0b bcc 4001b0a8 4001b080: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b084: c2 00 60 a8 ld [ %g1 + 0xa8 ], %g1 ! 4001d8a8 4001b088: 85 2e 20 06 sll %i0, 6, %g2 4001b08c: b1 2e 20 03 sll %i0, 3, %i0 4001b090: b0 06 00 02 add %i0, %g2, %i0 4001b094: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 4001b098: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4001b09c: 80 88 61 00 btst 0x100, %g1 4001b0a0: 32 80 00 08 bne,a 4001b0c0 4001b0a4: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 4001b0a8: 7f ff d1 8d call 4000f6dc <__errno> 4001b0ac: 01 00 00 00 nop 4001b0b0: 82 10 20 09 mov 9, %g1 ! 9 4001b0b4: c2 22 00 00 st %g1, [ %o0 ] 4001b0b8: 10 80 00 15 b 4001b10c 4001b0bc: 90 10 3f ff mov -1, %o0 rtems_libio_check_is_open(iop); if ( !iop->handlers ) 4001b0c0: 80 a0 60 00 cmp %g1, 0 4001b0c4: 02 bf ff f9 be 4001b0a8 4001b0c8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 4001b0cc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001b0d0: 80 a0 60 00 cmp %g1, 0 4001b0d4: 12 80 00 06 bne 4001b0ec 4001b0d8: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b0dc: 7f ff d1 80 call 4000f6dc <__errno> <== NOT EXECUTED 4001b0e0: 01 00 00 00 nop <== NOT EXECUTED 4001b0e4: 10 bf ff f4 b 4001b0b4 <== NOT EXECUTED 4001b0e8: 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) ); 4001b0ec: 94 10 20 48 mov 0x48, %o2 4001b0f0: 7f ff d3 f5 call 400100c4 4001b0f4: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 4001b0f8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4001b0fc: 90 06 20 1c add %i0, 0x1c, %o0 4001b100: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001b104: 9f c0 40 00 call %g1 4001b108: 92 10 00 19 mov %i1, %o1 } 4001b10c: 81 c7 e0 08 ret 4001b110: 91 e8 00 08 restore %g0, %o0, %o0 4002759c : #include int fsync( int fd ) { 4002759c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400275a0: 03 10 01 98 sethi %hi(0x40066000), %g1 400275a4: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 40066204 400275a8: 80 a6 00 01 cmp %i0, %g1 400275ac: 1a 80 00 15 bcc 40027600 400275b0: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 400275b4: 03 10 01 a8 sethi %hi(0x4006a000), %g1 400275b8: d0 00 63 b8 ld [ %g1 + 0x3b8 ], %o0 ! 4006a3b8 400275bc: 83 2e 20 06 sll %i0, 6, %g1 400275c0: b1 2e 20 03 sll %i0, 3, %i0 400275c4: b0 06 00 01 add %i0, %g1, %i0 400275c8: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 400275cc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400275d0: 80 88 61 00 btst 0x100, %g1 400275d4: 02 80 00 0b be 40027600 400275d8: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400275dc: 32 80 00 06 bne,a 400275f4 400275e0: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 400275e4: 40 00 64 5f call 40040760 <__errno> 400275e8: 01 00 00 00 nop 400275ec: 10 80 00 0f b 40027628 400275f0: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 400275f4: 80 a0 60 00 cmp %g1, 0 400275f8: 32 80 00 06 bne,a 40027610 400275fc: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 40027600: 40 00 64 58 call 40040760 <__errno> <== NOT EXECUTED 40027604: 01 00 00 00 nop <== NOT EXECUTED 40027608: 10 80 00 08 b 40027628 <== NOT EXECUTED 4002760c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 40027610: 80 a0 60 00 cmp %g1, 0 40027614: 12 80 00 08 bne 40027634 40027618: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002761c: 40 00 64 51 call 40040760 <__errno> 40027620: 01 00 00 00 nop 40027624: 82 10 20 86 mov 0x86, %g1 ! 86 40027628: c2 22 00 00 st %g1, [ %o0 ] 4002762c: 10 80 00 04 b 4002763c 40027630: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 40027634: 9f c0 40 00 call %g1 40027638: 01 00 00 00 nop } 4002763c: 81 c7 e0 08 ret 40027640: 91 e8 00 08 restore %g0, %o0, %o0 4000b1cc : int ftruncate( int fd, off_t length ) { 4000b1cc: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000b1d0: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000b1d4: c2 00 63 14 ld [ %g1 + 0x314 ], %g1 ! 4001cf14 4000b1d8: 80 a6 00 01 cmp %i0, %g1 4000b1dc: 1a 80 00 0b bcc 4000b208 4000b1e0: 85 2e 20 06 sll %i0, 6, %g2 iop = rtems_libio_iop( fd ); 4000b1e4: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000b1e8: c2 00 60 a8 ld [ %g1 + 0xa8 ], %g1 ! 4001d8a8 4000b1ec: b1 2e 20 03 sll %i0, 3, %i0 4000b1f0: b0 06 00 02 add %i0, %g2, %i0 4000b1f4: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 4000b1f8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000b1fc: 80 88 61 00 btst 0x100, %g1 4000b200: 12 80 00 06 bne 4000b218 4000b204: a0 07 bf ec add %fp, -20, %l0 4000b208: 40 00 11 35 call 4000f6dc <__errno> <== NOT EXECUTED 4000b20c: 01 00 00 00 nop <== NOT EXECUTED 4000b210: 10 80 00 22 b 4000b298 <== NOT EXECUTED 4000b214: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000b218: 92 06 20 1c add %i0, 0x1c, %o1 4000b21c: 90 10 00 10 mov %l0, %o0 4000b220: 40 00 13 6a call 4000ffc8 4000b224: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 4000b228: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000b22c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000b230: 80 a0 60 00 cmp %g1, 0 4000b234: 02 80 00 16 be 4000b28c 4000b238: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000b23c: 9f c0 40 00 call %g1 4000b240: 90 10 00 10 mov %l0, %o0 4000b244: 80 a2 20 01 cmp %o0, 1 4000b248: 32 80 00 06 bne,a 4000b260 4000b24c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_set_errno_and_return_minus_one( EISDIR ); 4000b250: 40 00 11 23 call 4000f6dc <__errno> 4000b254: 01 00 00 00 nop 4000b258: 10 80 00 10 b 4000b298 4000b25c: 82 10 20 15 mov 0x15, %g1 ! 15 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000b260: 80 88 60 04 btst 4, %g1 4000b264: 32 80 00 06 bne,a 4000b27c 4000b268: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000b26c: 40 00 11 1c call 4000f6dc <__errno> <== NOT EXECUTED 4000b270: 01 00 00 00 nop <== NOT EXECUTED 4000b274: 10 80 00 09 b 4000b298 <== NOT EXECUTED 4000b278: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4000b27c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000b280: 80 a0 60 00 cmp %g1, 0 4000b284: 32 80 00 08 bne,a 4000b2a4 4000b288: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000b28c: 40 00 11 14 call 4000f6dc <__errno> <== NOT EXECUTED 4000b290: 01 00 00 00 nop <== NOT EXECUTED 4000b294: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000b298: c2 22 00 00 st %g1, [ %o0 ] 4000b29c: 10 80 00 05 b 4000b2b0 4000b2a0: 90 10 3f ff mov -1, %o0 return (*iop->handlers->ftruncate_h)( iop, length ); 4000b2a4: 92 10 00 19 mov %i1, %o1 4000b2a8: 9f c0 40 00 call %g1 4000b2ac: 94 10 00 1a mov %i2, %o2 } 4000b2b0: 81 c7 e0 08 ret 4000b2b4: 91 e8 00 08 restore %g0, %o0, %o0 4005aac8 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4005aac8: 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 ); 4005aacc: 03 10 01 98 sethi %hi(0x40066000), %g1 4005aad0: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 40066204 4005aad4: 80 a6 00 01 cmp %i0, %g1 4005aad8: 1a 80 00 08 bcc 4005aaf8 4005aadc: a0 10 20 00 clr %l0 4005aae0: 03 10 01 a8 sethi %hi(0x4006a000), %g1 4005aae4: e0 00 63 b8 ld [ %g1 + 0x3b8 ], %l0 ! 4006a3b8 4005aae8: 83 2e 20 06 sll %i0, 6, %g1 4005aaec: b1 2e 20 03 sll %i0, 3, %i0 4005aaf0: b0 06 00 01 add %i0, %g1, %i0 4005aaf4: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4005aaf8: a2 07 bf ec add %fp, -20, %l1 4005aafc: 92 04 20 1c add %l0, 0x1c, %o1 4005ab00: 90 10 00 11 mov %l1, %o0 4005ab04: 7f ff a3 ea call 40043aac 4005ab08: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 4005ab0c: c2 07 bf f8 ld [ %fp + -8 ], %g1 4005ab10: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4005ab14: 80 a0 60 00 cmp %g1, 0 4005ab18: 02 80 00 11 be 4005ab5c 4005ab1c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 4005ab20: 9f c0 40 00 call %g1 4005ab24: 90 10 00 11 mov %l1, %o0 4005ab28: 80 a2 20 01 cmp %o0, 1 4005ab2c: 22 80 00 08 be,a 4005ab4c 4005ab30: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4005ab34: 7f ff 97 0b call 40040760 <__errno> 4005ab38: 01 00 00 00 nop 4005ab3c: 82 10 20 14 mov 0x14, %g1 ! 14 4005ab40: c2 22 00 00 st %g1, [ %o0 ] 4005ab44: 10 80 00 0d b 4005ab78 4005ab48: 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 ) 4005ab4c: c2 00 60 08 ld [ %g1 + 8 ], %g1 4005ab50: 80 a0 60 00 cmp %g1, 0 4005ab54: 32 80 00 06 bne,a 4005ab6c 4005ab58: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4005ab5c: 7f ff 97 01 call 40040760 <__errno> <== NOT EXECUTED 4005ab60: 01 00 00 00 nop <== NOT EXECUTED 4005ab64: 10 bf ff f7 b 4005ab40 <== NOT EXECUTED 4005ab68: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 4005ab6c: 92 10 00 19 mov %i1, %o1 4005ab70: 9f c0 40 00 call %g1 4005ab74: 94 10 00 1a mov %i2, %o2 } 4005ab78: 81 c7 e0 08 ret 4005ab7c: 91 e8 00 08 restore %g0, %o0, %o0 40027750 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40027750: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40027754: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 400664f8 <== NOT EXECUTED return _POSIX_types_Gid; } 40027758: 81 c3 e0 08 retl <== NOT EXECUTED 4002775c: d0 10 60 32 lduh [ %g1 + 0x32 ], %o0 <== NOT EXECUTED 40027ddc : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027ddc: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 40027de0: 7f ff ff b6 call 40027cb8 40027de4: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 40027de8: 11 10 01 6e sethi %hi(0x4005b800), %o0 40027dec: 13 10 01 97 sethi %hi(0x40065c00), %o1 40027df0: 90 12 21 f8 or %o0, 0x1f8, %o0 40027df4: 40 00 65 02 call 400411fc 40027df8: 92 12 60 e8 or %o1, 0xe8, %o1 40027dfc: a0 92 20 00 orcc %o0, 0, %l0 40027e00: 12 80 00 08 bne 40027e20 40027e04: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 40027e08: 40 00 62 56 call 40040760 <__errno> <== NOT EXECUTED 40027e0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027e10: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40027e14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40027e18: 81 c7 e0 08 ret <== NOT EXECUTED 40027e1c: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40027e20: 94 10 00 1b mov %i3, %o2 40027e24: 96 10 00 1c mov %i4, %o3 40027e28: 7f ff fe ea call 400279d0 40027e2c: 90 10 00 10 mov %l0, %o0 40027e30: 80 a2 20 00 cmp %o0, 0 40027e34: 12 80 00 0a bne 40027e5c 40027e38: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 40027e3c: 40 00 62 49 call 40040760 <__errno> <== NOT EXECUTED 40027e40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027e44: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40027e48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40027e4c: 40 00 62 9d call 400408c0 <== NOT EXECUTED 40027e50: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 40027e54: 81 c7 e0 08 ret <== NOT EXECUTED 40027e58: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 40027e5c: 22 80 00 07 be,a 40027e78 40027e60: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 40027e64: d0 06 80 00 ld [ %i2 ], %o0 40027e68: 40 00 7b 7c call 40046c58 40027e6c: 92 10 00 18 mov %i0, %o1 40027e70: 10 80 00 04 b 40027e80 40027e74: 80 a0 00 08 cmp %g0, %o0 } else { match = (grp->gr_gid == gid); 40027e78: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40027e7c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40027e80: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 40027e84: 80 a0 60 00 cmp %g1, 0 40027e88: 02 bf ff e6 be 40027e20 40027e8c: 92 10 00 1a mov %i2, %o1 fclose(fp); 40027e90: 90 10 00 10 mov %l0, %o0 40027e94: 40 00 62 8b call 400408c0 40027e98: b0 10 20 00 clr %i0 *result = grp; 40027e9c: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 40027ea0: 81 c7 e0 08 ret 40027ea4: 81 e8 00 00 restore 40027b0c : return NULL; return p; } struct group *getgrent(void) { 40027b0c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 40027b10: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 40027b14: d0 00 60 74 ld [ %g1 + 0x74 ], %o0 ! 4006a074 <== NOT EXECUTED 40027b18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027b1c: 22 80 00 0c be,a 40027b4c <== NOT EXECUTED 40027b20: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 40027b24: 31 10 01 a8 sethi %hi(0x4006a000), %i0 <== NOT EXECUTED 40027b28: 15 10 01 a8 sethi %hi(0x4006a000), %o2 <== NOT EXECUTED 40027b2c: 92 16 21 40 or %i0, 0x140, %o1 <== NOT EXECUTED 40027b30: 94 12 a0 78 or %o2, 0x78, %o2 <== NOT EXECUTED 40027b34: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027b38: 7f ff ff a6 call 400279d0 <== NOT EXECUTED 40027b3c: b0 16 21 40 or %i0, 0x140, %i0 <== NOT EXECUTED 40027b40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027b44: 22 80 00 02 be,a 40027b4c <== NOT EXECUTED 40027b48: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &grent; } 40027b4c: 81 c7 e0 08 ret <== NOT EXECUTED 40027b50: 81 e8 00 00 restore <== NOT EXECUTED 40027edc : } struct group *getgrgid( gid_t gid ) { 40027edc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 40027ee0: 13 10 01 a8 sethi %hi(0x4006a000), %o1 <== NOT EXECUTED 40027ee4: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40027ee8: 92 12 61 40 or %o1, 0x140, %o1 <== NOT EXECUTED 40027eec: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40027ef0: 15 10 01 a8 sethi %hi(0x4006a000), %o2 <== NOT EXECUTED 40027ef4: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027ef8: 94 12 a0 78 or %o2, 0x78, %o2 <== NOT EXECUTED 40027efc: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 40027f00: 7f ff ff ea call 40027ea8 <== NOT EXECUTED 40027f04: b0 10 20 00 clr %i0 <== NOT EXECUTED 40027f08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027f0c: 22 80 00 02 be,a 40027f14 <== NOT EXECUTED 40027f10: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 40027f14: 81 c7 e0 08 ret <== NOT EXECUTED 40027f18: 81 e8 00 00 restore <== NOT EXECUTED 40027ea8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027ea8: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40027eac: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40027eb0: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027eb4: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40027eb8: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40027ebc: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40027ec0: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 40027ec4: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 40027ec8: 90 10 20 00 clr %o0 <== NOT EXECUTED 40027ecc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40027ed0: 7f ff ff c3 call 40027ddc <== NOT EXECUTED 40027ed4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40027ed8: 01 00 00 00 nop 40027fd0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40027fd0: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 40027fd4: 7f ff ff 39 call 40027cb8 40027fd8: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 40027fdc: 11 10 01 6e sethi %hi(0x4005b800), %o0 40027fe0: 13 10 01 97 sethi %hi(0x40065c00), %o1 40027fe4: 90 12 21 40 or %o0, 0x140, %o0 40027fe8: 40 00 64 85 call 400411fc 40027fec: 92 12 60 e8 or %o1, 0xe8, %o1 40027ff0: a0 92 20 00 orcc %o0, 0, %l0 40027ff4: 12 80 00 08 bne 40028014 40027ff8: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 40027ffc: 40 00 61 d9 call 40040760 <__errno> <== NOT EXECUTED 40028000: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028004: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40028008: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002800c: 81 c7 e0 08 ret <== NOT EXECUTED 40028010: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 40028014: 94 10 00 1b mov %i3, %o2 40028018: 96 10 00 1c mov %i4, %o3 4002801c: 7f ff fe ce call 40027b54 40028020: 90 10 00 10 mov %l0, %o0 40028024: 80 a2 20 00 cmp %o0, 0 40028028: 12 80 00 0a bne 40028050 4002802c: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 40028030: 40 00 61 cc call 40040760 <__errno> <== NOT EXECUTED 40028034: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028038: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002803c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40028040: 40 00 62 20 call 400408c0 <== NOT EXECUTED 40028044: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 40028048: 81 c7 e0 08 ret <== NOT EXECUTED 4002804c: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 40028050: 22 80 00 07 be,a 4002806c 40028054: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 40028058: d0 06 80 00 ld [ %i2 ], %o0 4002805c: 40 00 7a ff call 40046c58 40028060: 92 10 00 18 mov %i0, %o1 40028064: 10 80 00 04 b 40028074 40028068: 80 a0 00 08 cmp %g0, %o0 } else { match = (pwd->pw_uid == uid); 4002806c: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40028070: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40028074: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 40028078: 80 a0 60 00 cmp %g1, 0 4002807c: 02 bf ff e6 be 40028014 40028080: 92 10 00 1a mov %i2, %o1 fclose(fp); 40028084: 90 10 00 10 mov %l0, %o0 40028088: 40 00 62 0e call 400408c0 4002808c: b0 10 20 00 clr %i0 *result = pwd; 40028090: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 40028094: 81 c7 e0 08 ret 40028098: 81 e8 00 00 restore 40027c70 : return NULL; return p; } struct passwd *getpwent(void) { 40027c70: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 40027c74: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027c78: d0 00 63 8c ld [ %g1 + 0x38c ], %o0 ! 40069f8c <== NOT EXECUTED 40027c7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027c80: 22 80 00 0c be,a 40027cb0 <== NOT EXECUTED 40027c84: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 40027c88: 31 10 01 a8 sethi %hi(0x4006a000), %i0 <== NOT EXECUTED 40027c8c: 15 10 01 a7 sethi %hi(0x40069c00), %o2 <== NOT EXECUTED 40027c90: 92 16 20 58 or %i0, 0x58, %o1 <== NOT EXECUTED 40027c94: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED 40027c98: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027c9c: 7f ff ff ae call 40027b54 <== NOT EXECUTED 40027ca0: b0 16 20 58 or %i0, 0x58, %i0 <== NOT EXECUTED 40027ca4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027ca8: 22 80 00 02 be,a 40027cb0 <== NOT EXECUTED 40027cac: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &pwent; } 40027cb0: 81 c7 e0 08 ret <== NOT EXECUTED 40027cb4: 81 e8 00 00 restore <== NOT EXECUTED 400280d0 : } struct passwd *getpwuid( uid_t uid ) { 400280d0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 400280d4: 13 10 01 a8 sethi %hi(0x4006a000), %o1 <== NOT EXECUTED 400280d8: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 400280dc: 92 12 60 58 or %o1, 0x58, %o1 <== NOT EXECUTED 400280e0: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 400280e4: 15 10 01 a7 sethi %hi(0x40069c00), %o2 <== NOT EXECUTED 400280e8: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400280ec: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED 400280f0: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 400280f4: 7f ff ff ea call 4002809c <== NOT EXECUTED 400280f8: b0 10 20 00 clr %i0 <== NOT EXECUTED 400280fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028100: 22 80 00 02 be,a 40028108 <== NOT EXECUTED 40028104: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 40028108: 81 c7 e0 08 ret <== NOT EXECUTED 4002810c: 81 e8 00 00 restore <== NOT EXECUTED 4002809c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002809c: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 400280a0: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 400280a4: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 400280a8: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 400280ac: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 400280b0: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 400280b4: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 400280b8: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 400280bc: 90 10 20 00 clr %o0 <== NOT EXECUTED 400280c0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400280c4: 7f ff ff c3 call 40027fd0 <== NOT EXECUTED 400280c8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400280cc: 01 00 00 00 nop 4000b2d8 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4000b2d8: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000b2dc: 80 a6 20 00 cmp %i0, 0 4000b2e0: 12 80 00 08 bne 4000b300 4000b2e4: 01 00 00 00 nop errno = EFAULT; 4000b2e8: 40 00 10 fd call 4000f6dc <__errno> <== NOT EXECUTED 4000b2ec: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000b2f0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000b2f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4000b2f8: 81 c7 e0 08 ret <== NOT EXECUTED 4000b2fc: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4000b300: 7f ff da 93 call 40001d4c 4000b304: 01 00 00 00 nop 4000b308: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000b30c: 40 00 04 ef call 4000c6c8 <_TOD_Get> 4000b310: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 4000b314: 7f ff da 92 call 40001d5c 4000b318: 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; 4000b31c: 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; 4000b320: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 4000b324: 92 10 23 e8 mov 0x3e8, %o1 4000b328: 40 00 36 80 call 40018d28 <.div> 4000b32c: c2 26 00 00 st %g1, [ %i0 ] 4000b330: 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; } 4000b334: 81 c7 e0 08 ret 4000b338: 91 e8 20 00 restore %g0, 0, %o0 40007d48 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 40007d48: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40007d4c: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 400664f8 <== NOT EXECUTED return _POSIX_types_Uid; } 40007d50: 81 c3 e0 08 retl <== NOT EXECUTED 40007d54: d0 10 60 30 lduh [ %g1 + 0x30 ], %o0 <== NOT EXECUTED 400140e4 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 400140e4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 400140e8: e0 06 40 00 ld [ %i1 ], %l0 400140ec: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 400140f0: 82 04 20 54 add %l0, 0x54, %g1 400140f4: 80 a0 80 01 cmp %g2, %g1 400140f8: 22 80 00 06 be,a 40014110 400140fc: 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 ); 40014100: 40 00 04 4a call 40015228 <__errno> 40014104: 01 00 00 00 nop 40014108: 10 80 00 0d b 4001413c 4001410c: 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 ) 40014110: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40014114: 80 a0 40 10 cmp %g1, %l0 40014118: 02 80 00 06 be 40014130 4001411c: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 40014120: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40014124: 80 a0 60 00 cmp %g1, 0 40014128: 22 80 00 08 be,a 40014148 4001412c: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 40014130: 40 00 04 3e call 40015228 <__errno> 40014134: 01 00 00 00 nop 40014138: 82 10 20 10 mov 0x10, %g1 ! 10 4001413c: c2 22 00 00 st %g1, [ %o0 ] 40014140: 81 c7 e0 08 ret 40014144: 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 ) { 40014148: 80 a0 60 00 cmp %g1, 0 4001414c: 22 80 00 06 be,a 40014164 40014150: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40014154: 7f ff d3 5e call 40008ecc <_Chain_Extract> 40014158: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4001415c: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40014160: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40014164: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40014168: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4001416c: 90 07 bf f8 add %fp, -8, %o0 40014170: 7f ff c1 e3 call 400048fc 40014174: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40014178: 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) ) { 4001417c: 90 10 00 10 mov %l0, %o0 40014180: 7f ff f2 0f call 400109bc 40014184: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40014188: 80 a2 20 00 cmp %o0, 0 4001418c: 12 80 00 11 bne 400141d0 40014190: 01 00 00 00 nop 40014194: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40014198: 80 a0 60 00 cmp %g1, 0 4001419c: 12 80 00 0d bne 400141d0 400141a0: 03 10 00 8c sethi %hi(0x40023000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 400141a4: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 ! 400232e0 400141a8: c4 06 40 00 ld [ %i1 ], %g2 400141ac: c6 00 60 04 ld [ %g1 + 4 ], %g3 400141b0: 80 a0 c0 02 cmp %g3, %g2 400141b4: 22 80 00 02 be,a 400141bc 400141b8: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 400141bc: 90 10 00 10 mov %l0, %o0 400141c0: 7f ff c1 a5 call 40004854 400141c4: b0 10 20 00 clr %i0 400141c8: 81 c7 e0 08 ret 400141cc: 81 e8 00 00 restore } return 0; } 400141d0: 81 c7 e0 08 ret 400141d4: 91 e8 20 00 restore %g0, 0, %o0 40006f88 : int ioctl( int fd, ioctl_command_t command, ... ) { 40006f88: 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 ); 40006f8c: 03 10 00 8d sethi %hi(0x40023400), %g1 40006f90: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 40023614 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40006f94: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40006f98: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40006f9c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40006fa0: 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 ); 40006fa4: 80 a6 00 01 cmp %i0, %g1 40006fa8: 1a 80 00 11 bcc 40006fec 40006fac: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 40006fb0: 03 10 00 90 sethi %hi(0x40024000), %g1 40006fb4: d0 00 60 88 ld [ %g1 + 0x88 ], %o0 ! 40024088 40006fb8: 83 2e 20 06 sll %i0, 6, %g1 40006fbc: b1 2e 20 03 sll %i0, 3, %i0 40006fc0: b0 06 00 01 add %i0, %g1, %i0 40006fc4: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 40006fc8: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 40006fcc: 80 88 61 00 btst 0x100, %g1 40006fd0: 02 80 00 07 be 40006fec 40006fd4: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 40006fd8: 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 *); 40006fdc: c4 27 bf fc st %g2, [ %fp + -4 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 40006fe0: 80 a0 60 00 cmp %g1, 0 40006fe4: 12 80 00 06 bne 40006ffc 40006fe8: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EBADF ); 40006fec: 40 00 39 85 call 40015600 <__errno> 40006ff0: 01 00 00 00 nop 40006ff4: 10 80 00 09 b 40007018 40006ff8: 82 10 20 09 mov 9, %g1 ! 9 if ( !iop->handlers->ioctl_h ) 40006ffc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40007000: 80 a0 60 00 cmp %g1, 0 40007004: 12 80 00 08 bne 40007024 40007008: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000700c: 40 00 39 7d call 40015600 <__errno> <== NOT EXECUTED 40007010: 01 00 00 00 nop <== NOT EXECUTED 40007014: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40007018: c2 22 00 00 st %g1, [ %o0 ] 4000701c: 10 80 00 04 b 4000702c 40007020: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 40007024: 9f c0 40 00 call %g1 40007028: 01 00 00 00 nop return rc; } 4000702c: 81 c7 e0 08 ret 40007030: 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 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED 4000488c: c4 00 a0 c8 ld [ %g2 + 0xc8 ], %g2 ! 4001d0c8 <__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 74 sethi %hi(0x4001d000), %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 74 sethi %hi(0x4001d000), %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 74 sethi %hi(0x4001d000), %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 18 ld [ %g1 + 0x18 ], %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 4000f068 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4000f068: 9d e3 bf 90 save %sp, -112, %sp POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 4000f06c: 7f ff fb d5 call 4000dfc0 4000f070: 01 00 00 00 nop 4000f074: 80 a6 00 08 cmp %i0, %o0 4000f078: 02 80 00 06 be 4000f090 4000f07c: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 4000f080: 40 00 01 97 call 4000f6dc <__errno> 4000f084: 01 00 00 00 nop 4000f088: 10 80 00 07 b 4000f0a4 4000f08c: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 4000f090: 12 80 00 08 bne 4000f0b0 4000f094: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 4000f098: 40 00 01 91 call 4000f6dc <__errno> 4000f09c: 01 00 00 00 nop 4000f0a0: 82 10 20 16 mov 0x16, %g1 ! 16 4000f0a4: c2 22 00 00 st %g1, [ %o0 ] 4000f0a8: 10 80 00 a5 b 4000f33c 4000f0ac: 90 10 3f ff mov -1, %o0 if ( !is_valid_signo(sig) ) 4000f0b0: 80 a0 60 1f cmp %g1, 0x1f 4000f0b4: 18 bf ff f9 bgu 4000f098 4000f0b8: 85 2e 60 02 sll %i1, 2, %g2 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 4000f0bc: 87 2e 60 04 sll %i1, 4, %g3 4000f0c0: 86 20 c0 02 sub %g3, %g2, %g3 4000f0c4: 05 10 00 78 sethi %hi(0x4001e000), %g2 4000f0c8: 84 10 a0 14 or %g2, 0x14, %g2 ! 4001e014 <_POSIX_signals_Vectors> 4000f0cc: 84 00 80 03 add %g2, %g3, %g2 4000f0d0: c4 00 a0 08 ld [ %g2 + 8 ], %g2 4000f0d4: 80 a0 a0 01 cmp %g2, 1 4000f0d8: 02 80 00 99 be 4000f33c 4000f0dc: 90 10 20 00 clr %o0 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 4000f0e0: 80 a6 60 04 cmp %i1, 4 4000f0e4: 02 80 00 06 be 4000f0fc 4000f0e8: 80 a6 60 08 cmp %i1, 8 4000f0ec: 02 80 00 04 be 4000f0fc 4000f0f0: 80 a6 60 0b cmp %i1, 0xb 4000f0f4: 12 80 00 08 bne 4000f114 4000f0f8: a0 10 20 01 mov 1, %l0 return pthread_kill( pthread_self(), sig ); 4000f0fc: 40 00 01 4f call 4000f638 4000f100: 01 00 00 00 nop 4000f104: 40 00 01 11 call 4000f548 4000f108: 92 10 00 19 mov %i1, %o1 4000f10c: 81 c7 e0 08 ret 4000f110: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4000f114: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 4000f118: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 4000f11c: 80 a6 a0 00 cmp %i2, 0 4000f120: 12 80 00 04 bne 4000f130 4000f124: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; 4000f128: 10 80 00 04 b 4000f138 4000f12c: c0 27 bf fc clr [ %fp + -4 ] } else { siginfo->si_value = *value; 4000f130: c2 06 80 00 ld [ %i2 ], %g1 4000f134: c2 27 bf fc st %g1, [ %fp + -4 ] 4000f138: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000f13c: c4 00 62 80 ld [ %g1 + 0x280 ], %g2 ! 4001da80 <_Thread_Dispatch_disable_level> 4000f140: 84 00 a0 01 inc %g2 4000f144: c4 20 62 80 st %g2, [ %g1 + 0x280 ] /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 4000f148: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000f14c: c2 00 63 3c ld [ %g1 + 0x33c ], %g1 ! 4001db3c <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000f150: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 4000f154: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 4000f158: 80 ac 00 02 andncc %l0, %g2, %g0 4000f15c: 12 80 00 4e bne 4000f294 4000f160: 07 10 00 78 sethi %hi(0x4001e000), %g3 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4000f164: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000f168: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 ! 4001e1a0 <_POSIX_signals_Wait_queue> 4000f16c: 10 80 00 0b b 4000f198 4000f170: 86 10 e1 a4 or %g3, 0x1a4, %g3 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000f174: c8 00 a1 60 ld [ %g2 + 0x160 ], %g4 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4000f178: 80 8c 00 01 btst %l0, %g1 4000f17c: 12 80 00 46 bne 4000f294 4000f180: 82 10 00 02 mov %g2, %g1 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 4000f184: c8 01 20 cc ld [ %g4 + 0xcc ], %g4 4000f188: 80 ac 00 04 andncc %l0, %g4, %g0 4000f18c: 32 80 00 43 bne,a 4000f298 4000f190: 84 10 20 01 mov 1, %g2 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 4000f194: c4 00 80 00 ld [ %g2 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000f198: 80 a0 80 03 cmp %g2, %g3 4000f19c: 32 bf ff f6 bne,a 4000f174 4000f1a0: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4000f1a4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000f1a8: c8 08 63 c4 ldub [ %g1 + 0x3c4 ], %g4 ! 4001cfc4 4000f1ac: 05 10 00 76 sethi %hi(0x4001d800), %g2 4000f1b0: 88 01 20 01 inc %g4 4000f1b4: 84 10 a1 e8 or %g2, 0x1e8, %g2 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4000f1b8: 82 10 20 00 clr %g1 4000f1bc: 90 00 a0 0c add %g2, 0xc, %o0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4000f1c0: 17 04 00 00 sethi %hi(0x10000000), %o3 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 4000f1c4: c6 00 80 00 ld [ %g2 ], %g3 4000f1c8: 80 a0 e0 00 cmp %g3, 0 4000f1cc: 22 80 00 2c be,a 4000f27c 4000f1d0: 84 00 a0 04 add %g2, 4, %g2 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4000f1d4: c6 00 e0 04 ld [ %g3 + 4 ], %g3 if ( !the_info ) continue; #endif maximum = the_info->maximum; object_table = the_info->local_table; 4000f1d8: 9a 10 20 01 mov 1, %o5 4000f1dc: f4 00 e0 1c ld [ %g3 + 0x1c ], %i2 for ( index = 1 ; index <= maximum ; index++ ) { 4000f1e0: 10 80 00 23 b 4000f26c 4000f1e4: de 10 e0 10 lduh [ %g3 + 0x10 ], %o7 the_thread = (Thread_Control *) object_table[ index ]; 4000f1e8: c6 06 80 03 ld [ %i2 + %g3 ], %g3 if ( !the_thread ) 4000f1ec: 80 a0 e0 00 cmp %g3, 0 4000f1f0: 02 80 00 1d be 4000f264 4000f1f4: 98 10 00 04 mov %g4, %o4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4000f1f8: d8 00 e0 14 ld [ %g3 + 0x14 ], %o4 4000f1fc: 80 a3 00 04 cmp %o4, %g4 4000f200: 38 80 00 19 bgu,a 4000f264 4000f204: 98 10 00 04 mov %g4, %o4 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000f208: d4 00 e1 60 ld [ %g3 + 0x160 ], %o2 4000f20c: d4 02 a0 cc ld [ %o2 + 0xcc ], %o2 4000f210: 80 ac 00 0a andncc %l0, %o2, %g0 4000f214: 22 80 00 14 be,a 4000f264 4000f218: 98 10 00 04 mov %g4, %o4 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 4000f21c: 80 a3 00 04 cmp %o4, %g4 4000f220: 2a 80 00 11 bcs,a 4000f264 4000f224: 82 10 00 03 mov %g3, %g1 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 4000f228: d2 00 60 10 ld [ %g1 + 0x10 ], %o1 4000f22c: 80 a2 60 00 cmp %o1, 0 4000f230: 22 80 00 0d be,a 4000f264 4000f234: 98 10 00 04 mov %g4, %o4 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4000f238: d4 00 e0 10 ld [ %g3 + 0x10 ], %o2 4000f23c: 80 a2 a0 00 cmp %o2, 0 4000f240: 22 80 00 09 be,a 4000f264 4000f244: 82 10 00 03 mov %g3, %g1 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4000f248: 80 8a 40 0b btst %o1, %o3 4000f24c: 32 80 00 06 bne,a 4000f264 4000f250: 98 10 00 04 mov %g4, %o4 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4000f254: 80 8a 80 0b btst %o2, %o3 4000f258: 32 80 00 03 bne,a 4000f264 4000f25c: 82 10 00 03 mov %g3, %g1 4000f260: 98 10 00 04 mov %g4, %o4 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4000f264: 9a 03 60 01 inc %o5 4000f268: 88 10 00 0c mov %o4, %g4 4000f26c: 80 a3 40 0f cmp %o5, %o7 4000f270: 28 bf ff de bleu,a 4000f1e8 4000f274: 87 2b 60 02 sll %o5, 2, %g3 4000f278: 84 00 a0 04 add %g2, 4, %g2 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 4000f27c: 80 a0 80 08 cmp %g2, %o0 4000f280: 32 bf ff d2 bne,a 4000f1c8 4000f284: c6 00 80 00 ld [ %g2 ], %g3 } } } } if ( interested ) { 4000f288: 80 a0 60 00 cmp %g1, 0 4000f28c: 02 80 00 0b be 4000f2b8 4000f290: 01 00 00 00 nop * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4000f294: 84 10 20 01 mov 1, %g2 ! 1 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 4000f298: 90 10 00 01 mov %g1, %o0 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4000f29c: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 4000f2a0: 92 10 00 19 mov %i1, %o1 4000f2a4: 40 00 00 5d call 4000f418 <_POSIX_signals_Unblock_thread> 4000f2a8: 94 07 bf f4 add %fp, -12, %o2 4000f2ac: 80 8a 20 ff btst 0xff, %o0 4000f2b0: 12 80 00 20 bne 4000f330 4000f2b4: 01 00 00 00 nop /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 4000f2b8: 40 00 00 47 call 4000f3d4 <_POSIX_signals_Set_process_signals> 4000f2bc: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4000f2c0: 83 2e 60 04 sll %i1, 4, %g1 4000f2c4: b3 2e 60 02 sll %i1, 2, %i1 4000f2c8: b2 20 40 19 sub %g1, %i1, %i1 4000f2cc: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000f2d0: 82 10 60 14 or %g1, 0x14, %g1 ! 4001e014 <_POSIX_signals_Vectors> 4000f2d4: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000f2d8: 80 a0 60 02 cmp %g1, 2 4000f2dc: 12 80 00 15 bne 4000f330 4000f2e0: 11 10 00 78 sethi %hi(0x4001e000), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 4000f2e4: 7f ff f4 8e call 4000c51c <_Chain_Get> 4000f2e8: 90 12 21 94 or %o0, 0x194, %o0 ! 4001e194 <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4000f2ec: a0 92 20 00 orcc %o0, 0, %l0 4000f2f0: 12 80 00 08 bne 4000f310 4000f2f4: 92 07 bf f4 add %fp, -12, %o1 _Thread_Enable_dispatch(); 4000f2f8: 7f ff e4 d6 call 40008650 <_Thread_Enable_dispatch> 4000f2fc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EAGAIN ); 4000f300: 40 00 00 f7 call 4000f6dc <__errno> 4000f304: 01 00 00 00 nop 4000f308: 10 bf ff 67 b 4000f0a4 4000f30c: 82 10 20 0b mov 0xb, %g1 ! b } psiginfo->Info = *siginfo; 4000f310: 90 04 20 08 add %l0, 8, %o0 4000f314: 40 00 03 2d call 4000ffc8 4000f318: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4000f31c: 11 10 00 78 sethi %hi(0x4001e000), %o0 4000f320: 92 10 00 10 mov %l0, %o1 4000f324: 90 12 21 e4 or %o0, 0x1e4, %o0 4000f328: 7f ff de f6 call 40006f00 <_Chain_Append> 4000f32c: 90 02 00 19 add %o0, %i1, %o0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4000f330: 7f ff e4 c8 call 40008650 <_Thread_Enable_dispatch> 4000f334: 01 00 00 00 nop 4000f338: 90 10 20 00 clr %o0 ! 0 return 0; } 4000f33c: b0 10 00 08 mov %o0, %i0 4000f340: 81 c7 e0 08 ret 4000f344: 81 e8 00 00 restore 4001b290 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 4001b290: 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())) 4001b294: 03 10 00 77 sethi %hi(0x4001dc00), %g1 4001b298: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 4001dc20 <_System_state_Current> 4001b29c: 80 a0 60 03 cmp %g1, 3 4001b2a0: 12 80 00 16 bne 4001b2f8 4001b2a4: 03 10 00 72 sethi %hi(0x4001c800), %g1 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 4001b2a8: 23 10 00 74 sethi %hi(0x4001d000), %l1 4001b2ac: e0 00 62 e8 ld [ %g1 + 0x2e8 ], %l0 4001b2b0: c2 04 60 d0 ld [ %l1 + 0xd0 ], %g1 4001b2b4: 80 a0 40 10 cmp %g1, %l0 4001b2b8: 22 80 00 06 be,a 4001b2d0 4001b2bc: 21 10 00 74 sethi %hi(0x4001d000), %l0 _wrapup_reent(_global_impure_ptr); 4001b2c0: 40 00 01 83 call 4001b8cc <_wrapup_reent> 4001b2c4: 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; 4001b2c8: e0 24 60 d0 st %l0, [ %l1 + 0xd0 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 4001b2cc: 21 10 00 74 sethi %hi(0x4001d000), %l0 4001b2d0: c2 04 20 d0 ld [ %l0 + 0xd0 ], %g1 ! 4001d0d0 <_impure_ptr> 4001b2d4: 7f ff d1 5a call 4000f83c 4001b2d8: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 4001b2dc: c2 04 20 d0 ld [ %l0 + 0xd0 ], %g1 4001b2e0: 7f ff d1 57 call 4000f83c 4001b2e4: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 4001b2e8: c2 04 20 d0 ld [ %l0 + 0xd0 ], %g1 4001b2ec: f0 00 60 0c ld [ %g1 + 0xc ], %i0 4001b2f0: 7f ff d1 53 call 4000f83c 4001b2f4: 81 e8 00 00 restore 4001b2f8: 81 c7 e0 08 ret <== NOT EXECUTED 4001b2fc: 81 e8 00 00 restore <== NOT EXECUTED 40028224 : int link( const char *existing, const char *new ) { 40028224: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 40028228: 40 00 7c 8d call 4004745c 4002822c: 90 10 00 18 mov %i0, %o0 40028230: 94 10 20 00 clr %o2 40028234: 92 10 00 08 mov %o0, %o1 40028238: 96 07 bf e8 add %fp, -24, %o3 4002823c: 90 10 00 18 mov %i0, %o0 40028240: 98 10 20 01 mov 1, %o4 40028244: 7f ff 7e 4b call 40007b70 40028248: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 4002824c: 80 a2 20 00 cmp %o0, 0 40028250: 12 80 00 8e bne 40028488 40028254: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40028258: c2 4e 40 00 ldsb [ %i1 ], %g1 4002825c: 80 a0 60 5c cmp %g1, 0x5c 40028260: 02 80 00 06 be 40028278 40028264: 80 a0 60 2f cmp %g1, 0x2f 40028268: 02 80 00 04 be 40028278 4002826c: 80 a0 60 00 cmp %g1, 0 40028270: 12 80 00 0a bne 40028298 40028274: 03 10 01 99 sethi %hi(0x40066400), %g1 40028278: 03 10 01 99 sethi %hi(0x40066400), %g1 4002827c: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 400664f8 40028280: 90 07 bf d4 add %fp, -44, %o0 40028284: 92 02 60 18 add %o1, 0x18, %o1 40028288: 40 00 6e 09 call 40043aac 4002828c: 94 10 20 14 mov 0x14, %o2 40028290: 10 80 00 08 b 400282b0 40028294: 90 10 20 01 mov 1, %o0 40028298: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 4002829c: 90 07 bf d4 add %fp, -44, %o0 400282a0: 92 02 60 04 add %o1, 4, %o1 400282a4: 40 00 6e 02 call 40043aac 400282a8: 94 10 20 14 mov 0x14, %o2 400282ac: 90 10 20 00 clr %o0 if ( !parent_loc.ops->evalformake_h ) { 400282b0: c2 07 bf e0 ld [ %fp + -32 ], %g1 400282b4: c2 00 60 04 ld [ %g1 + 4 ], %g1 400282b8: 80 a0 60 00 cmp %g1, 0 400282bc: 32 80 00 0b bne,a 400282e8 400282c0: 90 06 40 08 add %i1, %o0, %o0 rtems_filesystem_freenode( &existing_loc ); 400282c4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400282c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400282cc: 02 80 00 51 be 40028410 <== NOT EXECUTED 400282d0: 01 00 00 00 nop <== NOT EXECUTED 400282d4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400282d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400282dc: 12 80 00 4b bne 40028408 <== NOT EXECUTED 400282e0: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 400282e4: 30 80 00 4b b,a 40028410 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 400282e8: 94 07 bf fc add %fp, -4, %o2 400282ec: b2 07 bf d4 add %fp, -44, %i1 400282f0: 9f c0 40 00 call %g1 400282f4: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 400282f8: a0 92 20 00 orcc %o0, 0, %l0 400282fc: 02 80 00 11 be 40028340 40028300: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &existing_loc ); 40028304: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028308: 80 a0 60 00 cmp %g1, 0 4002830c: 02 80 00 08 be 4002832c 40028310: 01 00 00 00 nop 40028314: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028318: 80 a0 60 00 cmp %g1, 0 4002831c: 02 80 00 04 be 4002832c 40028320: 01 00 00 00 nop 40028324: 9f c0 40 00 call %g1 40028328: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( result ); 4002832c: 40 00 61 0d call 40040760 <__errno> 40028330: b0 10 3f ff mov -1, %i0 40028334: e0 22 00 00 st %l0, [ %o0 ] 40028338: 81 c7 e0 08 ret 4002833c: 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 ) { 40028340: c4 07 bf e4 ld [ %fp + -28 ], %g2 40028344: 80 a0 80 01 cmp %g2, %g1 40028348: 02 80 00 1a be 400283b0 4002834c: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &existing_loc ); 40028350: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028354: 80 a0 60 00 cmp %g1, 0 40028358: 22 80 00 09 be,a 4002837c 4002835c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40028360: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028364: 80 a0 60 00 cmp %g1, 0 40028368: 22 80 00 05 be,a 4002837c 4002836c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40028370: 9f c0 40 00 call %g1 40028374: 90 07 bf e8 add %fp, -24, %o0 rtems_filesystem_freenode( &parent_loc ); 40028378: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002837c: 80 a0 60 00 cmp %g1, 0 40028380: 02 80 00 08 be 400283a0 40028384: 01 00 00 00 nop 40028388: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002838c: 80 a0 60 00 cmp %g1, 0 40028390: 02 80 00 04 be 400283a0 40028394: 01 00 00 00 nop 40028398: 9f c0 40 00 call %g1 4002839c: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 400283a0: 40 00 60 f0 call 40040760 <__errno> 400283a4: b0 10 3f ff mov -1, %i0 400283a8: 10 80 00 1d b 4002841c 400283ac: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 400283b0: c2 00 60 08 ld [ %g1 + 8 ], %g1 400283b4: 80 a0 60 00 cmp %g1, 0 400283b8: 12 80 00 1c bne 40028428 400283bc: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &existing_loc ); 400283c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400283c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400283c8: 22 80 00 09 be,a 400283ec <== NOT EXECUTED 400283cc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400283d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400283d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400283d8: 22 80 00 05 be,a 400283ec <== NOT EXECUTED 400283dc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400283e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400283e4: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 400283e8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400283ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400283f0: 02 80 00 08 be 40028410 <== NOT EXECUTED 400283f4: 01 00 00 00 nop <== NOT EXECUTED 400283f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400283fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028400: 02 80 00 04 be 40028410 <== NOT EXECUTED 40028404: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 40028408: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002840c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028410: 40 00 60 d4 call 40040760 <__errno> <== NOT EXECUTED 40028414: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40028418: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002841c: c2 22 00 00 st %g1, [ %o0 ] 40028420: 81 c7 e0 08 ret 40028424: 81 e8 00 00 restore } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 40028428: 92 10 00 19 mov %i1, %o1 4002842c: b2 07 bf e8 add %fp, -24, %i1 40028430: 9f c0 40 00 call %g1 40028434: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 40028438: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002843c: 80 a0 60 00 cmp %g1, 0 40028440: 02 80 00 08 be 40028460 40028444: b0 10 00 08 mov %o0, %i0 40028448: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002844c: 80 a0 60 00 cmp %g1, 0 40028450: 22 80 00 05 be,a 40028464 40028454: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40028458: 9f c0 40 00 call %g1 4002845c: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 40028460: c2 07 bf e0 ld [ %fp + -32 ], %g1 40028464: 80 a0 60 00 cmp %g1, 0 40028468: 02 80 00 08 be 40028488 4002846c: 01 00 00 00 nop 40028470: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028474: 80 a0 60 00 cmp %g1, 0 40028478: 02 80 00 04 be 40028488 4002847c: 01 00 00 00 nop 40028480: 9f c0 40 00 call %g1 40028484: 90 07 bf d4 add %fp, -44, %o0 return result; } 40028488: 81 c7 e0 08 ret 4002848c: 81 e8 00 00 restore 4001b140 : off_t lseek( int fd, off_t offset, int whence ) { 4001b140: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001b144: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b148: c2 00 63 14 ld [ %g1 + 0x314 ], %g1 ! 4001cf14 off_t lseek( int fd, off_t offset, int whence ) { 4001b14c: 96 10 00 1b mov %i3, %o3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001b150: 80 a6 00 01 cmp %i0, %g1 off_t lseek( int fd, off_t offset, int whence ) { 4001b154: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001b158: 1a 80 00 0c bcc 4001b188 4001b15c: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 4001b160: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b164: e0 00 60 a8 ld [ %g1 + 0xa8 ], %l0 ! 4001d8a8 4001b168: 83 2e 20 06 sll %i0, 6, %g1 4001b16c: b1 2e 20 03 sll %i0, 3, %i0 4001b170: b0 06 00 01 add %i0, %g1, %i0 4001b174: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 4001b178: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b17c: 80 88 61 00 btst 0x100, %g1 4001b180: 32 80 00 06 bne,a 4001b198 4001b184: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b188: 7f ff d1 55 call 4000f6dc <__errno> <== NOT EXECUTED 4001b18c: 01 00 00 00 nop <== NOT EXECUTED 4001b190: 10 80 00 1e b 4001b208 <== NOT EXECUTED 4001b194: 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 ) 4001b198: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001b19c: 80 a0 60 00 cmp %g1, 0 4001b1a0: 12 80 00 06 bne 4001b1b8 4001b1a4: 80 a6 e0 01 cmp %i3, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b1a8: 7f ff d1 4d call 4000f6dc <__errno> <== NOT EXECUTED 4001b1ac: 01 00 00 00 nop <== NOT EXECUTED 4001b1b0: 10 80 00 16 b 4001b208 <== NOT EXECUTED 4001b1b4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 4001b1b8: 02 80 00 09 be 4001b1dc 4001b1bc: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 4001b1c0: 80 a6 e0 02 cmp %i3, 2 4001b1c4: 02 80 00 09 be 4001b1e8 4001b1c8: 80 a6 e0 00 cmp %i3, 0 4001b1cc: 12 80 00 0c bne 4001b1fc 4001b1d0: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; break; 4001b1d4: 10 80 00 12 b 4001b21c 4001b1d8: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] case SEEK_CUR: iop->offset += offset; 4001b1dc: 9a 86 80 13 addcc %i2, %l3, %o5 4001b1e0: 10 80 00 05 b 4001b1f4 4001b1e4: 98 46 40 12 addx %i1, %l2, %o4 break; case SEEK_END: iop->offset = iop->size + offset; 4001b1e8: d8 1c 20 08 ldd [ %l0 + 8 ], %o4 4001b1ec: 9a 86 80 0d addcc %i2, %o5, %o5 4001b1f0: 98 46 40 0c addx %i1, %o4, %o4 break; 4001b1f4: 10 80 00 0a b 4001b21c 4001b1f8: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] default: rtems_set_errno_and_return_minus_one( EINVAL ); 4001b1fc: 7f ff d1 38 call 4000f6dc <__errno> 4001b200: 01 00 00 00 nop 4001b204: 82 10 20 16 mov 0x16, %g1 ! 16 4001b208: c2 22 00 00 st %g1, [ %o0 ] 4001b20c: 11 3f ff ff sethi %hi(0xfffffc00), %o0 4001b210: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 4001b214: 10 80 00 0e b 4001b24c 4001b218: 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 ); 4001b21c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b220: 92 10 00 02 mov %g2, %o1 4001b224: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001b228: 94 10 00 03 mov %g3, %o2 4001b22c: 9f c0 40 00 call %g1 4001b230: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 4001b234: 80 a2 3f ff cmp %o0, -1 4001b238: 12 80 00 06 bne 4001b250 4001b23c: b2 10 00 09 mov %o1, %i1 4001b240: 80 a2 7f ff cmp %o1, -1 4001b244: 22 80 00 03 be,a 4001b250 4001b248: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001b24c: b2 10 00 09 mov %o1, %i1 4001b250: 81 c7 e0 08 ret 4001b254: 91 e8 00 08 restore %g0, %o0, %o0 400285e4 : int _STAT_NAME( const char *path, struct stat *buf ) { 400285e4: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 400285e8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400285ec: 12 80 00 06 bne 40028604 <== NOT EXECUTED 400285f0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 400285f4: 40 00 60 5b call 40040760 <__errno> <== NOT EXECUTED 400285f8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400285fc: 10 80 00 20 b 4002867c <== NOT EXECUTED 40028600: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 40028604: 40 00 7b 96 call 4004745c <== NOT EXECUTED 40028608: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002860c: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40028610: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40028614: 94 10 20 00 clr %o2 <== NOT EXECUTED 40028618: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002861c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40028620: 98 10 20 00 clr %o4 <== NOT EXECUTED 40028624: 7f ff 7d 53 call 40007b70 <== NOT EXECUTED 40028628: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 4002862c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028630: 12 80 00 14 bne 40028680 <== NOT EXECUTED 40028634: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 40028638: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002863c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028640: 12 80 00 12 bne 40028688 <== NOT EXECUTED 40028644: 92 10 20 00 clr %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40028648: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4002864c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028650: 02 80 00 08 be 40028670 <== NOT EXECUTED 40028654: 01 00 00 00 nop <== NOT EXECUTED 40028658: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002865c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028660: 02 80 00 04 be 40028670 <== NOT EXECUTED 40028664: 01 00 00 00 nop <== NOT EXECUTED 40028668: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002866c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028670: 40 00 60 3c call 40040760 <__errno> <== NOT EXECUTED 40028674: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028678: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002867c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028680: 81 c7 e0 08 ret <== NOT EXECUTED 40028684: 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) ); 40028688: 94 10 20 48 mov 0x48, %o2 <== NOT EXECUTED 4002868c: 40 00 6d 9b call 40043cf8 <== NOT EXECUTED 40028690: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 40028694: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40028698: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4002869c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 400286a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400286a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 400286a8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400286ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400286b0: 02 bf ff f4 be 40028680 <== NOT EXECUTED 400286b4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400286b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400286bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400286c0: 02 80 00 04 be 400286d0 <== NOT EXECUTED 400286c4: 01 00 00 00 nop <== NOT EXECUTED 400286c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400286cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 400286d0: 81 c7 e0 08 ret <== NOT EXECUTED 400286d4: 81 e8 00 00 restore <== NOT EXECUTED 4000b6ac : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000b6ac: 9d e3 bf a0 save %sp, -96, %sp 4000b6b0: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000b6b4: 82 10 60 b8 or %g1, 0xb8, %g1 ! 4001d8b8 4000b6b8: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000b6bc: a0 10 00 18 mov %i0, %l0 4000b6c0: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000b6c4: 7f ff ff ed call 4000b678 4000b6c8: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 4000b6cc: 80 a6 20 00 cmp %i0, 0 4000b6d0: 02 80 00 36 be 4000b7a8 4000b6d4: 03 10 00 77 sethi %hi(0x4001dc00), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000b6d8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 4001dc20 <_System_state_Current> 4000b6dc: 80 a0 60 03 cmp %g1, 3 4000b6e0: 12 80 00 07 bne 4000b6fc 4000b6e4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000b6e8: 7f ff ff cb call 4000b614 4000b6ec: 01 00 00 00 nop 4000b6f0: 80 8a 20 ff btst 0xff, %o0 4000b6f4: 02 80 00 2d be 4000b7a8 4000b6f8: 03 10 00 73 sethi %hi(0x4001cc00), %g1 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4000b6fc: d0 00 63 20 ld [ %g1 + 0x320 ], %o0 ! 4001cf20 4000b700: 92 10 00 10 mov %l0, %o1 4000b704: 94 10 20 00 clr %o2 4000b708: 40 00 05 24 call 4000cb98 <_Protected_heap_Allocate_aligned_with_boundary> 4000b70c: 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 ) { 4000b710: b0 92 20 00 orcc %o0, 0, %i0 4000b714: 12 80 00 13 bne 4000b760 4000b718: a2 10 00 18 mov %i0, %l1 if (rtems_malloc_sbrk_helpers) 4000b71c: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000b720: c2 00 61 8c ld [ %g1 + 0x18c ], %g1 ! 4001d58c 4000b724: 80 a0 60 00 cmp %g1, 0 4000b728: 02 80 00 08 be 4000b748 4000b72c: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000b730: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b734: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b738: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000b73c: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000b740: 12 80 00 09 bne 4000b764 <== NOT EXECUTED 4000b744: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED errno = ENOMEM; 4000b748: 40 00 0f e5 call 4000f6dc <__errno> 4000b74c: 01 00 00 00 nop 4000b750: 82 10 20 0c mov 0xc, %g1 ! c 4000b754: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4000b758: 81 c7 e0 08 ret 4000b75c: 81 e8 00 00 restore } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4000b760: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000b764: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 4001d590 4000b768: 80 a0 60 00 cmp %g1, 0 4000b76c: 02 80 00 05 be 4000b780 4000b770: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000b774: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000b778: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b77c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000b780: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000b784: c2 00 61 88 ld [ %g1 + 0x188 ], %g1 ! 4001d588 4000b788: 80 a0 60 00 cmp %g1, 0 4000b78c: 02 bf ff f3 be 4000b758 4000b790: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000b794: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b798: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b79c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b7a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b7a4: 81 e8 00 00 restore <== NOT EXECUTED 4000b7a8: 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; } 4000b7ac: 81 c7 e0 08 ret <== NOT EXECUTED 4000b7b0: 81 e8 00 00 restore <== NOT EXECUTED 4000b65c : 4000b65c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4000b660: 11 10 00 78 sethi %hi(0x4001e000), %o0 <== NOT EXECUTED 4000b664: 90 12 20 08 or %o0, 8, %o0 ! 4001e008 <== NOT EXECUTED 4000b668: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000b66c: 7f ff ee 25 call 40006f00 <_Chain_Append> <== NOT EXECUTED 4000b670: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000b674: 01 00 00 00 nop 4000b678 : void malloc_deferred_frees_process(void) { 4000b678: 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 ); 4000b67c: 21 10 00 78 sethi %hi(0x4001e000), %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) 4000b680: 10 80 00 04 b 4000b690 4000b684: a0 14 20 08 or %l0, 8, %l0 ! 4001e008 free(to_be_freed); 4000b688: 7f ff fe a7 call 4000b124 <== NOT EXECUTED 4000b68c: 01 00 00 00 nop <== NOT EXECUTED 4000b690: 40 00 03 a3 call 4000c51c <_Chain_Get> 4000b694: 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) 4000b698: 80 a2 20 00 cmp %o0, 0 4000b69c: 12 bf ff fb bne 4000b688 4000b6a0: 01 00 00 00 nop free(to_be_freed); } 4000b6a4: 81 c7 e0 08 ret 4000b6a8: 81 e8 00 00 restore 4001317c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4001317c: 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) ) { 40013180: 7f ff f6 0f call 400109bc 40013184: 90 10 00 18 mov %i0, %o0 40013188: 80 a2 20 00 cmp %o0, 0 4001318c: 12 80 00 13 bne 400131d8 40013190: 01 00 00 00 nop 40013194: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 40013198: 80 a0 60 00 cmp %g1, 0 4001319c: 12 80 00 0f bne 400131d8 400131a0: 03 10 00 8c sethi %hi(0x40023000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 400131a4: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 ! 400232e0 400131a8: c4 00 60 04 ld [ %g1 + 4 ], %g2 400131ac: 80 a0 80 18 cmp %g2, %i0 400131b0: 22 80 00 02 be,a 400131b8 400131b4: 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) 400131b8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400131bc: 80 a0 60 06 cmp %g1, 6 400131c0: 02 80 00 04 be 400131d0 400131c4: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 400131c8: 7f ff ff 8c call 40012ff8 400131cc: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 400131d0: 7f ff c5 a1 call 40004854 400131d4: 90 10 00 18 mov %i0, %o0 } return 0; } 400131d8: 81 c7 e0 08 ret 400131dc: 91 e8 20 00 restore %g0, 0, %o0 40012f30 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40012f30: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 40012f34: 80 a6 20 00 cmp %i0, 0 40012f38: 32 80 00 0a bne,a 40012f60 40012f3c: e0 06 00 00 ld [ %i0 ], %l0 40012f40: 11 10 00 89 sethi %hi(0x40022400), %o0 <== NOT EXECUTED 40012f44: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012f48: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40012f4c: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40012f50: 94 12 a1 90 or %o2, 0x190, %o2 <== NOT EXECUTED 40012f54: 96 12 e0 78 or %o3, 0x78, %o3 <== NOT EXECUTED 40012f58: 7f ff c5 49 call 4000447c <__assert_func> <== NOT EXECUTED 40012f5c: 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 40012f64: a2 10 20 00 clr %l1 if ( b[i] ) { 40012f68: 80 a2 20 00 cmp %o0, 0 40012f6c: 02 80 00 05 be 40012f80 40012f70: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40012f74: 7f ff ff 2a call 40012c1c 40012f78: 01 00 00 00 nop b[i] = 0; 40012f7c: 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 40012f8c: 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 ); 40012f90: 7f ff ff 23 call 40012c1c 40012f94: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 40012f98: c0 26 00 00 clr [ %i0 ] } 40012f9c: 81 c7 e0 08 ret 40012fa0: 81 e8 00 00 restore 40013490 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 40013490: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40013494: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 40013498: 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 ) 4001349c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400134a0: 80 a0 40 19 cmp %g1, %i1 400134a4: 06 80 00 09 bl 400134c8 400134a8: 94 10 00 1a mov %i2, %o2 400134ac: 80 a0 40 19 cmp %g1, %i1 400134b0: 32 80 00 0a bne,a 400134d8 400134b4: d2 24 20 50 st %o1, [ %l0 + 0x50 ] <== NOT EXECUTED 400134b8: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400134bc: 80 a0 40 1a cmp %g1, %i2 400134c0: 3a 80 00 06 bcc,a 400134d8 400134c4: d2 24 20 50 st %o1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 400134c8: 7f ff ff 8f call 40013304 <== NOT EXECUTED 400134cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400134d0: 81 c7 e0 08 ret <== NOT EXECUTED 400134d4: 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; 400134d8: d4 24 20 54 st %o2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 400134dc: d2 26 20 08 st %o1, [ %i0 + 8 ] 400134e0: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 400134e4: 90 07 bf f8 add %fp, -8, %o0 400134e8: 7f ff c5 05 call 400048fc 400134ec: 92 10 20 00 clr %o1 400134f0: c2 07 bf f8 ld [ %fp + -8 ], %g1 400134f4: 90 10 20 00 clr %o0 400134f8: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 400134fc: b0 10 00 08 mov %o0, %i0 40013500: 81 c7 e0 08 ret 40013504: 81 e8 00 00 restore 40013508 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 40013508: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001350c: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 40013510: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013514: 80 a0 60 06 cmp %g1, 6 40013518: 32 80 00 11 bne,a 4001355c 4001351c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 40013520: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40013524: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 <== NOT EXECUTED 40013528: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 4001352c: 14 80 00 09 bg 40013550 <== NOT EXECUTED 40013530: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 <== NOT EXECUTED 40013534: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40013538: 32 80 00 1a bne,a 400135a0 <== NOT EXECUTED 4001353c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40013540: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 <== NOT EXECUTED 40013544: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40013548: 28 80 00 16 bleu,a 400135a0 <== NOT EXECUTED 4001354c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 40013550: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 40013554: 10 80 00 12 b 4001359c <== NOT EXECUTED 40013558: 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 )) 4001355c: 90 10 00 10 mov %l0, %o0 40013560: 92 10 00 02 mov %g2, %o1 40013564: 7f ff ff 68 call 40013304 40013568: 94 10 00 03 mov %g3, %o2 4001356c: 80 a2 20 00 cmp %o0, 0 40013570: 22 80 00 0a be,a 40013598 40013574: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 40013578: 40 00 07 2c call 40015228 <__errno> <== NOT EXECUTED 4001357c: 01 00 00 00 nop <== NOT EXECUTED 40013580: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40013584: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 40013588: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001358c: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 40013590: 10 80 00 04 b 400135a0 <== NOT EXECUTED 40013594: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 40013598: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 4001359c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 } 400135a0: b2 10 00 03 mov %g3, %i1 400135a4: 81 c7 e0 08 ret 400135a8: 91 e8 00 02 restore %g0, %g2, %o0 40013874 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40013874: 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)) 40013878: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4001387c: 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)) 40013880: 80 88 62 04 btst 0x204, %g1 40013884: 02 80 00 19 be 400138e8 40013888: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 && (the_jnode->type == IMFS_LINEAR_FILE)) { 4001388c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013890: 80 a0 60 06 cmp %g1, 6 40013894: 32 80 00 16 bne,a 400138ec 40013898: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 4001389c: d8 04 20 54 ld [ %l0 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 400138a0: d6 04 20 58 ld [ %l0 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 400138a4: 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; 400138a8: 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; 400138ac: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 400138b0: 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; 400138b4: 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; 400138b8: 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) 400138bc: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 400138c0: 02 80 00 0a be 400138e8 <== NOT EXECUTED 400138c4: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 400138c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400138cc: 92 10 20 00 clr %o1 <== NOT EXECUTED 400138d0: 94 10 20 00 clr %o2 <== NOT EXECUTED 400138d4: 7f ff ff 36 call 400135ac <== NOT EXECUTED 400138d8: 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) 400138dc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 400138e0: 02 80 00 0a be 40013908 <== NOT EXECUTED 400138e4: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 400138e8: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 400138ec: 80 88 62 00 btst 0x200, %g1 400138f0: 02 80 00 04 be 40013900 400138f4: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 400138f8: c4 3c 60 10 std %g2, [ %l1 + 0x10 ] iop->size = the_jnode->info.file.size; 400138fc: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 40013900: b0 10 20 00 clr %i0 40013904: c4 3c 60 08 std %g2, [ %l1 + 8 ] return 0; } 40013908: 81 c7 e0 08 ret 4001390c: 81 e8 00 00 restore 400131e0 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 400131e0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 400131e4: 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 ) { 400131e8: c2 04 20 08 ld [ %l0 + 8 ], %g1 400131ec: 80 a0 60 00 cmp %g1, 0 400131f0: 22 80 00 06 be,a 40013208 400131f4: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 400131f8: 7f ff d7 35 call 40008ecc <_Chain_Extract> 400131fc: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40013200: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40013204: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40013208: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4001320c: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40013210: 90 07 bf f8 add %fp, -8, %o0 40013214: 7f ff c5 ba call 400048fc 40013218: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4001321c: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 40013220: 90 10 00 10 mov %l0, %o0 40013224: 7f ff ff d6 call 4001317c 40013228: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } 4001322c: 81 c7 e0 08 ret 40013230: 91 e8 00 08 restore %g0, %o0, %o0 4000a084 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000a084: 13 10 00 70 sethi %hi(0x4001c000), %o1 4000a088: 15 10 00 70 sethi %hi(0x4001c000), %o2 4000a08c: 92 12 62 2c or %o1, 0x22c, %o1 4000a090: 94 12 a3 f0 or %o2, 0x3f0, %o2 4000a094: 96 10 00 0a mov %o2, %o3 4000a098: 82 13 c0 00 mov %o7, %g1 4000a09c: 40 00 03 14 call 4000acec 4000a0a0: 9e 10 40 00 mov %g1, %o7 4000a0a4: 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 30 f9 call 4000f6dc <__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 74 sethi %hi(0x4001d000), %g1 40003324: 03 10 00 74 sethi %hi(0x4001d000), %g1 40003328: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 4001d028 4000332c: 90 07 bf e8 add %fp, -24, %o0 40003330: 92 02 60 18 add %o1, 0x18, %o1 40003334: 40 00 33 25 call 4000ffc8 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 28 ld [ %g1 + 0x28 ], %o1 40003348: 90 07 bf e8 add %fp, -24, %o0 4000334c: 92 02 60 04 add %o1, 4, %o1 40003350: 40 00 33 1e call 4000ffc8 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 30 c9 call 4000f6dc <__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 30 a3 call 4000f6dc <__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 34 4f call 400105b8 <== 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 89 call 4000b6ac 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 30 90 call 4000f6dc <__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 34 19 call 4001052c <== 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 34 34 call 400105b8 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 76 sethi %hi(0x4001d800), %g1 errno = ENOTDIR; 4000353c: 40 00 30 68 call 4000f6dc <__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 76 sethi %hi(0x4001d800), %g2 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 40003554: c2 00 60 e8 ld [ %g1 + 0xe8 ], %g1 40003558: 84 10 a0 ec or %g2, 0xec, %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 30 55 call 4000f6dc <__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 30 51 call 4000f6dc <__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 76 sethi %hi(0x4001d800), %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 39 call 40006f00 <_Chain_Append> 40003620: 90 12 20 e8 or %o0, 0xe8, %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 b9 call 4000b124 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 31 07 call 4000fb40 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 77 call 4000b124 <== 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 30 35 call 4000f83c <== 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 89 sethi %hi(0x40022400), %g1 400037e8: c4 48 60 8c ldsb [ %g1 + 0x8c ], %g2 ! 4002248c 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 80 sethi %hi(0x40020000), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 400037fc: c4 28 60 8c stb %g2, [ %g1 + 0x8c ] status = rtems_io_register_name( 40003800: 90 12 22 30 or %o0, 0x230, %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 89 sethi %hi(0x40022400), %g1 rtems_fatal_error_occurred(status); 4000381c: 40 00 10 82 call 40007a24 <== NOT EXECUTED 40003820: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 40003824: f0 20 63 74 st %i0, [ %g1 + 0x374 ] } 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 d0 call 4000b510 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 32 f5 call 400105b8 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 2f 32 call 4000f6dc <__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: a8 10 20 00 clr %l4 40003a30: 02 80 00 73 be 40003bfc 40003a34: a6 10 20 02 mov 2, %l3 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 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 32 d5 call 400105b8 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: a8 10 20 00 clr %l4 if ( status != 0 ) { /* The file did not exist */ 40003a88: 80 a2 20 00 cmp %o0, 0 40003a8c: 12 80 00 5c bne 40003bfc 40003a90: a6 10 20 0d mov 0xd, %l3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 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 c8 call 4000b5e0 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 31 3b call 4000ffc8 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: a8 07 bf e8 add %fp, -24, %l4 <== 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 2e ee call 4000f6dc <__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 76 sethi %hi(0x4001d800), %g1 rc = ftruncate( iop - rtems_libio_iops, 0 ); 40003b3c: c2 00 60 a8 ld [ %g1 + 0xa8 ], %g1 ! 4001d8a8 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 96 call 4000b1cc 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 76 sethi %hi(0x4001d800), %g1 if(errno) rc = errno; 40003b88: 40 00 2e d5 call 4000f6dc <__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 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 40003ba0: 40 00 2e cf call 4000f6dc <__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 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 40003bb0: c2 00 60 a8 ld [ %g1 + 0xa8 ], %g1 ! 4001d8a8 <== 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 1d 20 call 4000b068 <== 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 76 sethi %hi(0x4001d800), %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 1e 2a call 4000b4b0 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 2e a6 call 4000f6dc <__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 a8 ld [ %g1 + 0xa8 ], %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: a8 07 bf e8 add %fp, -24, %l4 <== NOT EXECUTED 40003c94: 10 bf ff da b 40003bfc <== NOT EXECUTED 40003c98: a6 10 20 86 mov 0x86, %l3 <== 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 6f sethi %hi(0x4001bc00), %l0 4000392c: 92 10 20 00 clr %o1 40003930: 90 14 21 40 or %l0, 0x140, %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 21 40 or %l0, 0x140, %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 21 40 or %l0, 0x140, %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 83 call 40006b94 <== 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 70 sethi %hi(0x4001c000), %o0 40004494: 92 10 20 01 mov 1, %o1 40004498: 90 12 20 38 or %o0, 0x38, %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 70 sethi %hi(0x4001c000), %o0 40004510: 7f ff ff 77 call 400042ec 40004514: 90 12 20 40 or %o0, 0x40, %o0 ! 4001c040 <__FUNCTION__.5769+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 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 40004540: c2 00 60 c8 ld [ %g1 + 0xc8 ], %g1 ! 4001d0c8 <__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 74 sethi %hi(0x4001d000), %g2 4000456c: c4 00 a0 c8 ld [ %g2 + 0xc8 ], %g2 ! 4001d0c8 <__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 4000eb8c : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4000eb8c: 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) 4000eb90: 23 10 00 71 sethi %hi(0x4001c400), %l1 4000eb94: a0 07 bf dc add %fp, -36, %l0 4000eb98: 92 10 20 03 mov 3, %o1 4000eb9c: 90 14 63 40 or %l1, 0x340, %o0 4000eba0: 94 10 20 07 mov 7, %o2 4000eba4: 96 10 00 10 mov %l0, %o3 4000eba8: 7f ff d1 2e call 40003060 4000ebac: 98 10 20 01 mov 1, %o4 4000ebb0: 80 a2 20 00 cmp %o0, 0 4000ebb4: 02 80 00 10 be 4000ebf4 4000ebb8: c2 07 bf e8 ld [ %fp + -24 ], %g1 != 0) { if (errno != ENOENT) 4000ebbc: 40 00 02 c8 call 4000f6dc <__errno> 4000ebc0: 01 00 00 00 nop 4000ebc4: c2 02 00 00 ld [ %o0 ], %g1 4000ebc8: 80 a0 60 02 cmp %g1, 2 4000ebcc: 32 80 00 59 bne,a 4000ed30 4000ebd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4000ebd4: 90 14 63 40 or %l1, 0x340, %o0 4000ebd8: 7f ff d1 b7 call 400032b4 4000ebdc: 92 10 23 ff mov 0x3ff, %o1 4000ebe0: 80 a2 20 00 cmp %o0, 0 4000ebe4: 02 80 00 0e be 4000ec1c 4000ebe8: 03 10 00 75 sethi %hi(0x4001d400), %g1 } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4000ebec: 81 c7 e0 08 ret <== NOT EXECUTED 4000ebf0: 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); 4000ebf4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ebf8: 22 80 00 09 be,a 4000ec1c <== NOT EXECUTED 4000ebfc: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ec00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001d41c <== NOT EXECUTED 4000ec04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ec08: 22 80 00 05 be,a 4000ec1c <== NOT EXECUTED 4000ec0c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ec10: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ec14: 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 ++); 4000ec18: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ec1c: c4 10 62 f6 lduh [ %g1 + 0x2f6 ], %g2 ! 4001d6f6 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ec20: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ec24: 95 28 a0 10 sll %g2, 0x10, %o2 4000ec28: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ec2c: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ec30: c4 30 62 f6 sth %g2, [ %g1 + 0x2f6 ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ec34: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 4000ec38: 03 00 00 19 sethi %hi(0x6400), %g1 4000ec3c: 84 10 a1 70 or %g2, 0x170, %g2 4000ec40: 82 10 62 6f or %g1, 0x26f, %g1 4000ec44: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ec48: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ec4c: c4 3f bf f0 std %g2, [ %fp + -16 ] 4000ec50: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ec54: 90 07 bf fa add %fp, -6, %o0 4000ec58: 13 10 00 71 sethi %hi(0x4001c400), %o1 4000ec5c: 40 00 05 8b call 40010288 4000ec60: 92 12 63 48 or %o1, 0x348, %o1 ! 4001c748 <__FUNCTION__.5918+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4000ec64: 90 10 00 10 mov %l0, %o0 4000ec68: 40 00 00 4b call 4000ed94 4000ec6c: 92 10 21 80 mov 0x180, %o1 4000ec70: 80 a2 20 00 cmp %o0, 0 4000ec74: 02 80 00 05 be 4000ec88 4000ec78: 90 10 00 10 mov %l0, %o0 if (errno != EEXIST){ 4000ec7c: 40 00 02 98 call 4000f6dc <__errno> <== NOT EXECUTED 4000ec80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ec84: 30 80 00 2b b,a 4000ed30 <== 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); 4000ec88: 7f ff d3 44 call 40003998 4000ec8c: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 4000ec90: 80 a2 20 00 cmp %o0, 0 4000ec94: 16 80 00 07 bge 4000ecb0 4000ec98: d0 26 00 00 st %o0, [ %i0 ] err = errno; 4000ec9c: 40 00 02 90 call 4000f6dc <__errno> 4000eca0: 01 00 00 00 nop 4000eca4: 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); 4000eca8: 10 80 00 1d b 4000ed1c 4000ecac: 90 10 00 10 mov %l0, %o0 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4000ecb0: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 4000ecb4: c4 00 63 14 ld [ %g1 + 0x314 ], %g2 ! 4001cf14 <== NOT EXECUTED 4000ecb8: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000ecbc: 1a 80 00 08 bcc 4000ecdc <== NOT EXECUTED 4000ecc0: 82 10 20 00 clr %g1 <== NOT EXECUTED 4000ecc4: 03 10 00 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 4000ecc8: c2 00 60 a8 ld [ %g1 + 0xa8 ], %g1 ! 4001d8a8 <== NOT EXECUTED 4000eccc: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4000ecd0: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 4000ecd4: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 4000ecd8: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000ecdc: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000ece0: 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; 4000ece4: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000ece8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000ecec: 7f ff d3 2b call 40003998 <== NOT EXECUTED 4000ecf0: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 4000ecf4: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 4000ecf8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ecfc: 16 80 00 07 bge 4000ed18 <== NOT EXECUTED 4000ed00: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; 4000ed04: 40 00 02 76 call 4000f6dc <__errno> <== NOT EXECUTED 4000ed08: 01 00 00 00 nop <== NOT EXECUTED 4000ed0c: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 4000ed10: 7f ff f0 d6 call 4000b068 <== NOT EXECUTED 4000ed14: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED } unlink(fifopath); 4000ed18: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4000ed1c: 40 00 00 28 call 4000edbc 4000ed20: b0 10 3f ff mov -1, %i0 } rtems_set_errno_and_return_minus_one(err); 4000ed24: 40 00 02 6e call 4000f6dc <__errno> 4000ed28: 01 00 00 00 nop 4000ed2c: e2 22 00 00 st %l1, [ %o0 ] } 4000ed30: 81 c7 e0 08 ret 4000ed34: 81 e8 00 00 restore 4000d764 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4000d764: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4000d768: 40 00 03 54 call 4000e4b8 <== NOT EXECUTED 4000d76c: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000d770: 40 00 03 52 call 4000e4b8 <== NOT EXECUTED 4000d774: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000d778: 7f ff e3 30 call 40006438 <== NOT EXECUTED 4000d77c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000d780: 7f ff f6 69 call 4000b124 <== NOT EXECUTED 4000d784: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED free(pipe); 4000d788: 7f ff f6 67 call 4000b124 <== NOT EXECUTED 4000d78c: 81 e8 00 00 restore <== NOT EXECUTED 4000d790: 01 00 00 00 nop 4000d388 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000d388: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 4000d38c: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000d390: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 4000d394: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000d398: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000d39c: 12 80 00 12 bne 4000d3e4 <== NOT EXECUTED 4000d3a0: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 4000d3a4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000d3a8: 02 80 00 0f be 4000d3e4 <== NOT EXECUTED 4000d3ac: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4000d3b0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d3b4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d3b8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d3bc: 7f ff e4 4d call 400064f0 <== NOT EXECUTED 4000d3c0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d3c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d3c8: 12 80 00 07 bne 4000d3e4 <== NOT EXECUTED 4000d3cc: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000d3d0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d3d4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000d3d8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d3dc: 7f ff e4 8c call 4000660c <== NOT EXECUTED 4000d3e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 4000d3e4: 81 c7 e0 08 ret <== NOT EXECUTED 4000d3e8: 81 e8 00 00 restore <== NOT EXECUTED 4000d314 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4000d314: 81 c3 e0 08 retl <== NOT EXECUTED 4000d318: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED 4000d3ec : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000d3ec: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000d3f0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000d3f4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000d3f8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d3fc: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d400: 7f ff e4 3c call 400064f0 <== NOT EXECUTED 4000d404: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000d408: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d40c: 02 80 00 54 be 4000d55c <== NOT EXECUTED 4000d410: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED 4000d414: 81 c7 e0 08 ret <== NOT EXECUTED 4000d418: 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) 4000d41c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d420: 02 80 00 53 be 4000d56c <== NOT EXECUTED 4000d424: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4000d428: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000d42c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d430: 22 80 00 04 be,a 4000d440 <== NOT EXECUTED 4000d434: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000d438: 10 80 00 4d b 4000d56c <== NOT EXECUTED 4000d43c: 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); 4000d440: 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 ++; 4000d444: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d448: 7f ff e4 71 call 4000660c <== NOT EXECUTED 4000d44c: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000d450: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d454: 40 00 04 4a call 4000e57c <== NOT EXECUTED 4000d458: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d45c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d460: 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)) 4000d464: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d468: 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)) 4000d46c: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d470: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d474: 7f ff e4 1f call 400064f0 <== NOT EXECUTED 4000d478: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000d47c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d480: 22 80 00 04 be,a 4000d490 <== NOT EXECUTED 4000d484: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000d488: 10 80 00 3b b 4000d574 <== NOT EXECUTED 4000d48c: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4000d490: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4000d494: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000d498: 12 80 00 35 bne 4000d56c <== NOT EXECUTED 4000d49c: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4000d4a0: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000d4a4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000d4a8: 22 bf ff dd be,a 4000d41c <== NOT EXECUTED 4000d4ac: 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); 4000d4b0: 82 26 80 18 sub %i2, %i0, %g1 <== NOT EXECUTED 4000d4b4: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000d4b8: 38 80 00 02 bgu,a 4000d4c0 <== NOT EXECUTED 4000d4bc: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4000d4c0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000d4c4: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000d4c8: 90 06 40 18 add %i1, %i0, %o0 <== NOT EXECUTED 4000d4cc: a4 24 80 01 sub %l2, %g1, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000d4d0: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d4d4: 04 80 00 0a ble 4000d4fc <== NOT EXECUTED 4000d4d8: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4000d4dc: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000d4e0: 40 00 0a ba call 4000ffc8 <== NOT EXECUTED 4000d4e4: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4000d4e8: 90 06 00 12 add %i0, %l2, %o0 <== NOT EXECUTED 4000d4ec: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 4000d4f0: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000d4f4: 10 80 00 04 b 4000d504 <== NOT EXECUTED 4000d4f8: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4000d4fc: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000d500: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000d504: 40 00 0a b1 call 4000ffc8 <== NOT EXECUTED 4000d508: 01 00 00 00 nop <== NOT EXECUTED pipe->Start += chunk; 4000d50c: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000d510: 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; 4000d514: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000d518: 40 00 2e ae call 40018fd0 <.urem> <== NOT EXECUTED 4000d51c: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000d520: 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; 4000d524: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000d528: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4000d52c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d530: 12 80 00 03 bne 4000d53c <== NOT EXECUTED 4000d534: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 4000d538: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 4000d53c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d540: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d544: 22 80 00 06 be,a 4000d55c <== NOT EXECUTED 4000d548: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000d54c: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d550: 40 00 03 f4 call 4000e520 <== NOT EXECUTED 4000d554: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 4000d558: 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) { 4000d55c: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000d560: 2a bf ff d1 bcs,a 4000d4a4 <== NOT EXECUTED 4000d564: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000d568: a2 10 20 00 clr %l1 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4000d56c: 7f ff e4 28 call 4000660c <== NOT EXECUTED 4000d570: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 4000d574: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d578: 24 80 00 02 ble,a 4000d580 <== NOT EXECUTED 4000d57c: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return read; return ret; } 4000d580: 81 c7 e0 08 ret <== NOT EXECUTED 4000d584: 81 e8 00 00 restore <== NOT EXECUTED 4000d794 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d794: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 4000d798: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4000d79c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d7a0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d7a4: 7f ff e3 53 call 400064f0 <== NOT EXECUTED 4000d7a8: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4000d7ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d7b0: 12 80 00 17 bne 4000d80c <== NOT EXECUTED 4000d7b4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4000d7b8: e2 06 60 18 ld [ %i1 + 0x18 ], %l1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4000d7bc: 80 8c 60 02 btst 2, %l1 <== NOT EXECUTED 4000d7c0: 02 80 00 05 be 4000d7d4 <== NOT EXECUTED 4000d7c4: a2 0c 60 06 and %l1, 6, %l1 <== NOT EXECUTED pipe->Readers --; 4000d7c8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d7cc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d7d0: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4000d7d4: 80 8c 60 04 btst 4, %l1 <== NOT EXECUTED 4000d7d8: 02 80 00 06 be 4000d7f0 <== NOT EXECUTED 4000d7dc: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED pipe->Writers --; 4000d7e0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000d7e4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d7e8: c2 24 20 14 st %g1, [ %l0 + 0x14 ] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d7ec: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d7f0: d0 00 62 f0 ld [ %g1 + 0x2f0 ], %o0 ! 4001d6f0 <== NOT EXECUTED 4000d7f4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d7f8: 7f ff e3 3e call 400064f0 <== NOT EXECUTED 4000d7fc: 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) 4000d800: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d804: 02 80 00 04 be 4000d814 <== NOT EXECUTED 4000d808: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); 4000d80c: 7f ff e4 e2 call 40006b94 <== NOT EXECUTED 4000d810: 01 00 00 00 nop <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d814: 7f ff e3 7e call 4000660c <== NOT EXECUTED 4000d818: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4000d81c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d820: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d824: 12 80 00 0a bne 4000d84c <== NOT EXECUTED 4000d828: 80 a4 60 04 cmp %l1, 4 <== NOT EXECUTED 4000d82c: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 4000d830: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d834: 12 80 00 06 bne 4000d84c <== NOT EXECUTED 4000d838: 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); 4000d83c: 7f ff ff ca call 4000d764 <== NOT EXECUTED 4000d840: 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) { 4000d844: 10 80 00 12 b 4000d88c <== NOT EXECUTED 4000d848: 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) 4000d84c: 02 80 00 06 be 4000d864 <== NOT EXECUTED 4000d850: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d854: 12 80 00 05 bne 4000d868 <== NOT EXECUTED 4000d858: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4000d85c: 10 80 00 0a b 4000d884 <== NOT EXECUTED 4000d860: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4000d864: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED 4000d868: 02 80 00 0a be 4000d890 <== NOT EXECUTED 4000d86c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d870: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000d874: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d878: 12 80 00 06 bne 4000d890 <== NOT EXECUTED 4000d87c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000d880: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d884: 40 00 03 27 call 4000e520 <== NOT EXECUTED 4000d888: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4000d88c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d890: d0 00 62 f0 ld [ %g1 + 0x2f0 ], %o0 ! 4001d6f0 <== NOT EXECUTED 4000d894: 7f ff e3 5e call 4000660c <== NOT EXECUTED 4000d898: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000d89c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d8a0: 81 e8 00 00 restore <== NOT EXECUTED 4000d588 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4000d588: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4000d58c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4000d590: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000d594: 02 80 00 72 be 4000d75c <== NOT EXECUTED 4000d598: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 4000d59c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d5a0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d5a4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d5a8: 7f ff e3 d2 call 400064f0 <== NOT EXECUTED 4000d5ac: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d5b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d5b4: 12 80 00 6a bne 4000d75c <== NOT EXECUTED 4000d5b8: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4000d5bc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d5c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d5c4: 02 80 00 5a be 4000d72c <== NOT EXECUTED 4000d5c8: 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; 4000d5cc: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 4000d5d0: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 4000d5d4: 08 80 00 04 bleu 4000d5e4 <== NOT EXECUTED 4000d5d8: a6 10 00 1a mov %i2, %l3 <== NOT EXECUTED 4000d5dc: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED 4000d5e0: 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); 4000d5e4: 10 80 00 4e b 4000d71c <== NOT EXECUTED 4000d5e8: 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)) { 4000d5ec: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d5f0: 22 80 00 04 be,a 4000d600 <== NOT EXECUTED 4000d5f4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d5f8: 10 80 00 4d b 4000d72c <== NOT EXECUTED 4000d5fc: 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); 4000d600: 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 ++; 4000d604: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d608: 7f ff e4 01 call 4000660c <== NOT EXECUTED 4000d60c: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000d610: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d614: 40 00 03 da call 4000e57c <== NOT EXECUTED 4000d618: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d61c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d620: 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)) 4000d624: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d628: 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)) 4000d62c: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d630: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d634: 7f ff e3 af call 400064f0 <== NOT EXECUTED 4000d638: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000d63c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d640: 22 80 00 04 be,a 4000d650 <== NOT EXECUTED 4000d644: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d648: 10 80 00 42 b 4000d750 <== NOT EXECUTED 4000d64c: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) 4000d650: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4000d654: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000d658: 12 80 00 35 bne 4000d72c <== NOT EXECUTED 4000d65c: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4000d660: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d668: 32 80 00 04 bne,a 4000d678 <== NOT EXECUTED 4000d66c: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000d670: 10 80 00 2f b 4000d72c <== NOT EXECUTED 4000d674: 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) { 4000d678: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000d67c: a2 24 80 01 sub %l2, %g1, %l1 <== NOT EXECUTED 4000d680: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 4000d684: 2a bf ff da bcs,a 4000d5ec <== NOT EXECUTED 4000d688: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4000d68c: 84 26 80 18 sub %i2, %i0, %g2 <== NOT EXECUTED 4000d690: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000d694: 38 80 00 02 bgu,a 4000d69c <== NOT EXECUTED 4000d698: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4000d69c: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 4000d6a0: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 4000d6a4: 40 00 2e 4b call 40018fd0 <.urem> <== NOT EXECUTED 4000d6a8: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000d6ac: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000d6b0: a4 24 80 08 sub %l2, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000d6b4: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d6b8: 04 80 00 0a ble 4000d6e0 <== NOT EXECUTED 4000d6bc: 92 06 40 18 add %i1, %i0, %o1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4000d6c0: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000d6c4: 40 00 0a 41 call 4000ffc8 <== NOT EXECUTED 4000d6c8: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4000d6cc: 92 04 80 18 add %l2, %i0, %o1 <== NOT EXECUTED 4000d6d0: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4000d6d4: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000d6d8: 10 80 00 04 b 4000d6e8 <== NOT EXECUTED 4000d6dc: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4000d6e0: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000d6e4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000d6e8: 40 00 0a 38 call 4000ffc8 <== NOT EXECUTED 4000d6ec: 01 00 00 00 nop <== NOT EXECUTED pipe->Length += chunk; 4000d6f0: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000d6f4: 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; 4000d6f8: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000d6fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d700: 02 80 00 05 be 4000d714 <== NOT EXECUTED 4000d704: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000d708: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d70c: 40 00 03 85 call 4000e520 <== NOT EXECUTED 4000d710: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 4000d714: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 4000d718: 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) { 4000d71c: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000d720: 2a bf ff d6 bcs,a 4000d678 <== NOT EXECUTED 4000d724: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000d728: 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); 4000d72c: 7f ff e3 b8 call 4000660c <== NOT EXECUTED 4000d730: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4000d734: 80 a4 7f e0 cmp %l1, -32 <== NOT EXECUTED 4000d738: 12 80 00 07 bne 4000d754 <== NOT EXECUTED 4000d73c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED kill(getpid(), SIGPIPE); 4000d740: 40 00 02 20 call 4000dfc0 <== NOT EXECUTED 4000d744: 01 00 00 00 nop <== NOT EXECUTED 4000d748: 40 00 02 9a call 4000e1b0 <== NOT EXECUTED 4000d74c: 92 10 20 0d mov 0xd, %o1 ! d <== NOT EXECUTED #endif if (written > 0) 4000d750: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d754: 24 80 00 02 ble,a 4000d75c <== NOT EXECUTED 4000d758: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return written; return ret; } 4000d75c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d760: 81 e8 00 00 restore <== NOT EXECUTED 4001b320 : ssize_t read( int fd, void *buffer, size_t count ) { 4001b320: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b324: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b328: c2 00 63 14 ld [ %g1 + 0x314 ], %g1 ! 4001cf14 ssize_t read( int fd, void *buffer, size_t count ) { 4001b32c: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b330: 80 a6 00 01 cmp %i0, %g1 4001b334: 1a 80 00 0c bcc 4001b364 4001b338: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001b33c: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b340: e0 00 60 a8 ld [ %g1 + 0xa8 ], %l0 ! 4001d8a8 4001b344: 83 2e 20 06 sll %i0, 6, %g1 4001b348: b1 2e 20 03 sll %i0, 3, %i0 4001b34c: b0 06 00 01 add %i0, %g1, %i0 4001b350: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001b354: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b358: 80 88 61 00 btst 0x100, %g1 4001b35c: 12 80 00 06 bne 4001b374 4001b360: 80 a6 60 00 cmp %i1, 0 4001b364: 7f ff d0 de call 4000f6dc <__errno> 4001b368: 01 00 00 00 nop 4001b36c: 10 80 00 14 b 4001b3bc 4001b370: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_buffer( buffer ); 4001b374: 02 80 00 07 be 4001b390 4001b378: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001b37c: 02 80 00 1c be 4001b3ec 4001b380: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001b384: 80 88 60 02 btst 2, %g1 4001b388: 32 80 00 06 bne,a 4001b3a0 4001b38c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b390: 7f ff d0 d3 call 4000f6dc <__errno> <== NOT EXECUTED 4001b394: 01 00 00 00 nop <== NOT EXECUTED 4001b398: 10 80 00 09 b 4001b3bc <== NOT EXECUTED 4001b39c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 4001b3a0: c2 00 60 08 ld [ %g1 + 8 ], %g1 4001b3a4: 80 a0 60 00 cmp %g1, 0 4001b3a8: 12 80 00 08 bne 4001b3c8 4001b3ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b3b0: 7f ff d0 cb call 4000f6dc <__errno> <== NOT EXECUTED 4001b3b4: 01 00 00 00 nop <== NOT EXECUTED 4001b3b8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001b3bc: c2 22 00 00 st %g1, [ %o0 ] 4001b3c0: 10 80 00 0b b 4001b3ec 4001b3c4: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->read_h)( iop, buffer, count ); 4001b3c8: 9f c0 40 00 call %g1 4001b3cc: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001b3d0: 80 a2 20 00 cmp %o0, 0 4001b3d4: 04 80 00 06 ble 4001b3ec 4001b3d8: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 4001b3dc: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001b3e0: 86 83 40 08 addcc %o5, %o0, %g3 4001b3e4: 84 43 00 02 addx %o4, %g2, %g2 4001b3e8: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001b3ec: 81 c7 e0 08 ret 4001b3f0: 91 e8 00 08 restore %g0, %o0, %o0 40028b58 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 40028b58: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40028b5c: 80 a6 60 00 cmp %i1, 0 40028b60: 12 80 00 06 bne 40028b78 40028b64: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 40028b68: 40 00 5e fe call 40040760 <__errno> <== NOT EXECUTED 40028b6c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40028b70: 10 80 00 32 b 40028c38 <== NOT EXECUTED 40028b74: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 40028b78: 40 00 7a 39 call 4004745c 40028b7c: 90 10 00 18 mov %i0, %o0 40028b80: a0 07 bf ec add %fp, -20, %l0 40028b84: 92 10 00 08 mov %o0, %o1 40028b88: 94 10 20 00 clr %o2 40028b8c: 90 10 00 18 mov %i0, %o0 40028b90: 96 10 00 10 mov %l0, %o3 40028b94: 98 10 20 00 clr %o4 40028b98: 7f ff 7b f6 call 40007b70 40028b9c: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 40028ba0: 80 a2 20 00 cmp %o0, 0 40028ba4: 12 80 00 26 bne 40028c3c 40028ba8: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 40028bac: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40028bb0: 80 a0 60 00 cmp %g1, 0 40028bb4: 22 80 00 19 be,a 40028c18 40028bb8: 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 ){ 40028bbc: 9f c0 40 00 call %g1 40028bc0: 90 10 00 10 mov %l0, %o0 40028bc4: 80 a2 20 04 cmp %o0, 4 40028bc8: 02 80 00 0f be 40028c04 40028bcc: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_freenode( &loc ); 40028bd0: 80 a0 a0 00 cmp %g2, 0 40028bd4: 02 80 00 08 be 40028bf4 40028bd8: 01 00 00 00 nop 40028bdc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40028be0: 80 a0 60 00 cmp %g1, 0 40028be4: 02 80 00 04 be 40028bf4 40028be8: 01 00 00 00 nop 40028bec: 9f c0 40 00 call %g1 40028bf0: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40028bf4: 40 00 5e db call 40040760 <__errno> 40028bf8: b0 10 3f ff mov -1, %i0 40028bfc: 10 80 00 0f b 40028c38 40028c00: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 40028c04: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 40028c08: 80 a0 60 00 cmp %g1, 0 40028c0c: 12 80 00 0e bne 40028c44 40028c10: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 40028c14: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40028c18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028c1c: 02 80 00 04 be 40028c2c <== NOT EXECUTED 40028c20: 01 00 00 00 nop <== NOT EXECUTED 40028c24: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028c28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028c2c: 40 00 5e cd call 40040760 <__errno> <== NOT EXECUTED 40028c30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028c34: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028c38: c2 22 00 00 st %g1, [ %o0 ] 40028c3c: 81 c7 e0 08 ret 40028c40: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 40028c44: 94 10 00 1a mov %i2, %o2 40028c48: 9f c0 40 00 call %g1 40028c4c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40028c50: c2 07 bf f8 ld [ %fp + -8 ], %g1 40028c54: 80 a0 60 00 cmp %g1, 0 40028c58: 02 bf ff f9 be 40028c3c 40028c5c: b0 10 00 08 mov %o0, %i0 40028c60: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028c64: 80 a0 60 00 cmp %g1, 0 40028c68: 02 80 00 04 be 40028c78 40028c6c: 01 00 00 00 nop 40028c70: 9f c0 40 00 call %g1 40028c74: 90 10 00 10 mov %l0, %o0 return result; } 40028c78: 81 c7 e0 08 ret 40028c7c: 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 86 sethi %hi(0x40021800), %g1 400052d8: c2 00 62 d4 ld [ %g1 + 0x2d4 ], %g1 ! 40021ad4 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 8b sethi %hi(0x40022c00), %g1 400052ec: e4 00 60 3c ld [ %g1 + 0x3c ], %l2 ! 40022c3c 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 32 c9 call 40011e34 <__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 32 b8 call 40011e34 <__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 32 a6 call 40011e34 <__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 4001b478 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001b478: 9d e3 bf 98 save %sp, -104, %sp 4001b47c: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b480: 82 10 60 b8 or %g1, 0xb8, %g1 ! 4001d8b8 4001b484: 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())) { 4001b488: 05 10 00 77 sethi %hi(0x4001dc00), %g2 4001b48c: c4 00 a0 20 ld [ %g2 + 0x20 ], %g2 ! 4001dc20 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001b490: 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())) { 4001b494: 80 a0 a0 03 cmp %g2, 3 4001b498: 12 80 00 0c bne 4001b4c8 4001b49c: c6 20 60 10 st %g3, [ %g1 + 0x10 ] if (_Thread_Dispatch_disable_level > 0) 4001b4a0: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b4a4: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 ! 4001da80 <_Thread_Dispatch_disable_level> 4001b4a8: 80 a0 60 00 cmp %g1, 0 4001b4ac: 32 80 00 13 bne,a 4001b4f8 4001b4b0: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 4001b4b4: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b4b8: c2 00 63 18 ld [ %g1 + 0x318 ], %g1 ! 4001db18 <_ISR_Nest_level> 4001b4bc: 80 a0 60 00 cmp %g1, 0 4001b4c0: 32 80 00 0e bne,a 4001b4f8 4001b4c4: b0 10 20 00 clr %i0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 4001b4c8: 80 a6 20 00 cmp %i0, 0 4001b4cc: 12 80 00 06 bne 4001b4e4 4001b4d0: 80 a6 60 00 cmp %i1, 0 return malloc( size ); 4001b4d4: 7f ff c0 76 call 4000b6ac 4001b4d8: 90 10 00 19 mov %i1, %o0 4001b4dc: 81 c7 e0 08 ret 4001b4e0: 91 e8 00 08 restore %g0, %o0, %o0 if ( !size ) { 4001b4e4: 12 80 00 07 bne 4001b500 4001b4e8: 21 10 00 73 sethi %hi(0x4001cc00), %l0 free( ptr ); 4001b4ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001b4f0: 7f ff bf 0d call 4000b124 <== NOT EXECUTED 4001b4f4: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 4001b4f8: 81 c7 e0 08 ret <== NOT EXECUTED 4001b4fc: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 4001b500: d0 04 23 20 ld [ %l0 + 0x320 ], %o0 4001b504: 92 10 00 18 mov %i0, %o1 4001b508: 40 00 00 60 call 4001b688 <_Protected_heap_Get_block_size> 4001b50c: 94 07 bf fc add %fp, -4, %o2 4001b510: 80 8a 20 ff btst 0xff, %o0 4001b514: 12 80 00 08 bne 4001b534 4001b518: d0 04 23 20 ld [ %l0 + 0x320 ], %o0 errno = EINVAL; 4001b51c: 7f ff d0 70 call 4000f6dc <__errno> 4001b520: b0 10 20 00 clr %i0 4001b524: 82 10 20 16 mov 0x16, %g1 4001b528: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4001b52c: 81 c7 e0 08 ret 4001b530: 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 ) ) { 4001b534: 92 10 00 18 mov %i0, %o1 4001b538: 40 00 00 61 call 4001b6bc <_Protected_heap_Resize_block> 4001b53c: 94 10 00 19 mov %i1, %o2 4001b540: 80 8a 20 ff btst 0xff, %o0 4001b544: 12 80 00 1a bne 4001b5ac 4001b548: 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 ); 4001b54c: 7f ff c0 58 call 4000b6ac 4001b550: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001b554: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b558: 82 10 60 b8 or %g1, 0xb8, %g1 ! 4001d8b8 4001b55c: 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 ); 4001b560: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001b564: 84 00 bf ff add %g2, -1, %g2 if ( !new_area ) { 4001b568: 80 a2 20 00 cmp %o0, 0 4001b56c: 02 80 00 0f be 4001b5a8 4001b570: c4 20 60 04 st %g2, [ %g1 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4001b574: c2 07 bf fc ld [ %fp + -4 ], %g1 4001b578: 80 a6 40 01 cmp %i1, %g1 4001b57c: 08 80 00 03 bleu 4001b588 4001b580: 94 10 00 19 mov %i1, %o2 4001b584: 94 10 00 01 mov %g1, %o2 4001b588: 92 10 00 18 mov %i0, %o1 4001b58c: 7f ff d2 8f call 4000ffc8 4001b590: 90 10 00 10 mov %l0, %o0 free( ptr ); 4001b594: 90 10 00 18 mov %i0, %o0 4001b598: 7f ff be e3 call 4000b124 4001b59c: b0 10 00 10 mov %l0, %i0 return new_area; 4001b5a0: 81 c7 e0 08 ret 4001b5a4: 81 e8 00 00 restore 4001b5a8: b0 10 20 00 clr %i0 } 4001b5ac: 81 c7 e0 08 ret 4001b5b0: 81 e8 00 00 restore 400090dc : #include int rmdir( const char *pathname ) { 400090dc: 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 ); 400090e0: 7f ff fa 56 call 40007a38 400090e4: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 400090e8: a6 92 20 00 orcc %o0, 0, %l3 400090ec: 32 80 00 17 bne,a 40009148 400090f0: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 400090f4: c2 4e 00 00 ldsb [ %i0 ], %g1 400090f8: 80 a0 60 5c cmp %g1, 0x5c 400090fc: 02 80 00 06 be 40009114 40009100: 80 a0 60 2f cmp %g1, 0x2f 40009104: 02 80 00 04 be 40009114 40009108: 80 a0 60 00 cmp %g1, 0 4000910c: 12 80 00 07 bne 40009128 <== NOT EXECUTED 40009110: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40009114: 03 10 01 99 sethi %hi(0x40066400), %g1 40009118: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 400664f8 4000911c: 90 07 bf ec add %fp, -20, %o0 40009120: 10 80 00 05 b 40009134 40009124: 92 02 60 18 add %o1, 0x18, %o1 40009128: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 <== NOT EXECUTED 4000912c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 40009130: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 40009134: 94 10 20 14 mov 0x14, %o2 40009138: 40 00 ea 5d call 40043aac 4000913c: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009140: 10 80 00 0b b 4000916c 40009144: 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, 40009148: 92 10 00 13 mov %l3, %o1 4000914c: 94 10 20 02 mov 2, %o2 40009150: 96 07 bf ec add %fp, -20, %o3 40009154: 7f ff fa 87 call 40007b70 40009158: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4000915c: 80 a2 20 00 cmp %o0, 0 40009160: 12 80 00 89 bne 40009384 40009164: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009168: 94 10 20 14 mov 0x14, %o2 4000916c: a0 07 bf d8 add %fp, -40, %l0 40009170: a4 07 bf ec add %fp, -20, %l2 40009174: 90 10 00 10 mov %l0, %o0 40009178: 40 00 ea 4d call 40043aac 4000917c: 92 10 00 12 mov %l2, %o1 name = pathname + parentpathlen; 40009180: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40009184: 40 00 f8 b6 call 4004745c 40009188: 90 10 00 18 mov %i0, %o0 4000918c: 92 10 00 08 mov %o0, %o1 40009190: 7f ff fa 18 call 400079f0 40009194: 90 10 00 18 mov %i0, %o0 40009198: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000919c: 40 00 f8 b0 call 4004745c 400091a0: 90 10 00 18 mov %i0, %o0 400091a4: 94 10 20 00 clr %o2 400091a8: 92 10 00 08 mov %o0, %o1 400091ac: 96 10 00 10 mov %l0, %o3 400091b0: 90 10 00 18 mov %i0, %o0 400091b4: 7f ff fa 33 call 40007a80 400091b8: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 400091bc: 80 a2 20 00 cmp %o0, 0 400091c0: 02 80 00 11 be 40009204 400091c4: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 400091c8: 80 8c 60 ff btst 0xff, %l1 400091cc: 02 80 00 0c be 400091fc 400091d0: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 400091d4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400091d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400091dc: 02 80 00 6b be 40009388 <== NOT EXECUTED 400091e0: 01 00 00 00 nop <== NOT EXECUTED 400091e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400091e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400091ec: 02 80 00 04 be 400091fc <== NOT EXECUTED 400091f0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400091f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400091f8: 01 00 00 00 nop <== NOT EXECUTED 400091fc: 81 c7 e0 08 ret 40009200: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40009204: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40009208: 80 a0 60 00 cmp %g1, 0 4000920c: 12 80 00 04 bne 4000921c 40009210: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40009214: 10 80 00 2b b 400092c0 <== NOT EXECUTED 40009218: 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 ){ 4000921c: 9f c0 40 00 call %g1 40009220: 90 10 00 10 mov %l0, %o0 40009224: 80 a2 20 01 cmp %o0, 1 40009228: 02 80 00 1d be 4000929c 4000922c: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &loc ); 40009230: c2 07 bf e4 ld [ %fp + -28 ], %g1 40009234: 80 a0 60 00 cmp %g1, 0 40009238: 02 80 00 09 be 4000925c 4000923c: 80 8c 60 ff btst 0xff, %l1 40009240: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009244: 80 a0 60 00 cmp %g1, 0 40009248: 02 80 00 05 be 4000925c 4000924c: 80 8c 60 ff btst 0xff, %l1 40009250: 9f c0 40 00 call %g1 40009254: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40009258: 80 8c 60 ff btst 0xff, %l1 4000925c: 02 80 00 0c be 4000928c 40009260: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 40009264: c2 07 bf f8 ld [ %fp + -8 ], %g1 40009268: 80 a0 60 00 cmp %g1, 0 4000926c: 02 80 00 08 be 4000928c 40009270: 01 00 00 00 nop 40009274: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009278: 80 a0 60 00 cmp %g1, 0 4000927c: 02 80 00 04 be 4000928c 40009280: 01 00 00 00 nop 40009284: 9f c0 40 00 call %g1 40009288: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000928c: 40 00 dd 35 call 40040760 <__errno> 40009290: b0 10 3f ff mov -1, %i0 40009294: 10 80 00 1f b 40009310 40009298: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 4000929c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400092a0: 80 a0 60 00 cmp %g1, 0 400092a4: 12 80 00 1e bne 4000931c 400092a8: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 400092ac: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 400092b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092b4: 02 80 00 09 be 400092d8 <== NOT EXECUTED 400092b8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400092c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092c4: 02 80 00 05 be 400092d8 <== NOT EXECUTED 400092c8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400092d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 400092d4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092d8: 02 80 00 0b be 40009304 <== NOT EXECUTED 400092dc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 400092e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092e4: 02 80 00 08 be 40009304 <== NOT EXECUTED 400092e8: 01 00 00 00 nop <== NOT EXECUTED 400092ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400092f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092f4: 02 80 00 04 be 40009304 <== NOT EXECUTED 400092f8: 01 00 00 00 nop <== NOT EXECUTED 400092fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009300: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009304: 40 00 dd 17 call 40040760 <__errno> <== NOT EXECUTED 40009308: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000930c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009310: c2 22 00 00 st %g1, [ %o0 ] 40009314: 81 c7 e0 08 ret 40009318: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 4000931c: 9f c0 40 00 call %g1 40009320: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 40009324: c2 07 bf e4 ld [ %fp + -28 ], %g1 40009328: 80 a0 60 00 cmp %g1, 0 4000932c: 02 80 00 08 be 4000934c 40009330: b0 10 00 08 mov %o0, %i0 40009334: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009338: 80 a0 60 00 cmp %g1, 0 4000933c: 02 80 00 05 be 40009350 40009340: 80 8c 60 ff btst 0xff, %l1 40009344: 9f c0 40 00 call %g1 40009348: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000934c: 80 8c 60 ff btst 0xff, %l1 40009350: 02 bf ff ab be 400091fc 40009354: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40009358: 80 a0 60 00 cmp %g1, 0 4000935c: 02 80 00 0b be 40009388 40009360: 01 00 00 00 nop 40009364: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009368: 80 a0 60 00 cmp %g1, 0 4000936c: 02 80 00 07 be 40009388 40009370: 01 00 00 00 nop 40009374: 9f c0 40 00 call %g1 40009378: 90 07 bf ec add %fp, -20, %o0 4000937c: 81 c7 e0 08 ret 40009380: 81 e8 00 00 restore 40009384: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 40009388: 81 c7 e0 08 ret <== NOT EXECUTED 4000938c: 81 e8 00 00 restore <== NOT EXECUTED 400156dc : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 400156dc: 11 10 00 a1 sethi %hi(0x40028400), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 400156e0: 81 c3 e0 08 retl <== NOT EXECUTED 400156e4: 90 12 22 80 or %o0, 0x280, %o0 ! 40028680 <== NOT EXECUTED 40011d18 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40011d18: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40011d1c: 90 10 00 18 mov %i0, %o0 40011d20: 40 00 00 0b call 40011d4c 40011d24: 92 10 00 19 mov %i1, %o1 if (nap) 40011d28: 80 a2 20 00 cmp %o0, 0 40011d2c: 02 80 00 05 be 40011d40 40011d30: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 40011d34: f0 02 00 00 ld [ %o0 ], %i0 40011d38: 81 c7 e0 08 ret 40011d3c: 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); 40011d40: 40 00 0e 67 call 400156dc <== NOT EXECUTED 40011d44: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40011d48: 01 00 00 00 nop 4000ed6c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000ed6c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000ed70: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ed74: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ed78: 40 00 02 39 call 4000f65c <== NOT EXECUTED 4000ed7c: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000ed80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ed84: 32 80 00 02 bne,a 4000ed8c <== NOT EXECUTED 4000ed88: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000ed8c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed90: 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 36 09 call 40010a80 <== 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 7e call 40008d78 <_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 b0 sethi %hi(0x4002c000), %o0 40003b94: 94 10 00 1d mov %i5, %o2 40003b98: 40 00 1e 8d call 4000b5cc <_Timespec_Subtract> 40003b9c: 90 12 23 38 or %o0, 0x338, %o0 } } } #endif (*print)( 40003ba0: 90 10 00 18 mov %i0, %o0 40003ba4: 13 10 00 85 sethi %hi(0x40021400), %o1 40003ba8: 21 10 00 af sethi %hi(0x4002bc00), %l0 40003bac: 92 12 61 80 or %o1, 0x180, %o1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003bb0: 39 10 00 85 sethi %hi(0x40021400), %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 af sethi %hi(0x4002bc00), %l6 /* * Print the information */ (*print)( context, 40003bb8: 37 10 00 85 sethi %hi(0x40021400), %i3 } } } #endif (*print)( 40003bbc: 9f c6 40 00 call %i1 40003bc0: 35 10 00 af sethi %hi(0x4002bc00), %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 20 d4 or %l0, 0xd4, %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003bcc: b8 17 22 f8 or %i4, 0x2f8, %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 2c or %l6, 0x22c, %l6 /* * Print the information */ (*print)( context, 40003bd4: b6 16 e3 10 or %i3, 0x310, %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 34 or %i2, 0x234, %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 55 call 4000b5cc <_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 a7 call 4000b320 <_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 bb call 4000b384 <_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 69 1b call 4001e110 <.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 af sethi %hi(0x4002bc00), %g1 40003ce8: 82 10 60 e4 or %g1, 0xe4, %g1 ! 4002bce4 <_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 69 05 call 4001e110 <.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 85 sethi %hi(0x40021400), %o1 40003d10: 90 10 00 18 mov %i0, %o0 40003d14: 9f c6 40 00 call %i1 40003d18: 92 12 63 28 or %o1, 0x328, %o1 40003d1c: 81 c7 e0 08 ret 40003d20: 81 e8 00 00 restore 4000ed38 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4000ed38: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000ed3c: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000ed40: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ed44: 40 00 00 0a call 4000ed6c <== NOT EXECUTED 4000ed48: 90 12 23 dc or %o0, 0x3dc, %o0 <== NOT EXECUTED 4000ed4c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000ed50: 02 80 00 05 be 4000ed64 <== NOT EXECUTED 4000ed54: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000ed58: 40 00 02 61 call 4000f6dc <__errno> <== NOT EXECUTED 4000ed5c: 01 00 00 00 nop <== NOT EXECUTED 4000ed60: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000ed64: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed68: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 400083b0 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 400083b0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 400083b4: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 400083b8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 400083bc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 400083c0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 400083c4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 400083c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400083cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400083d0: 7f ff ff 7d call 400081c4 <== NOT EXECUTED 400083d4: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 400083d8: 81 c7 e0 08 ret <== NOT EXECUTED 400083dc: 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 31 9b call 4000f6dc <__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 31 95 call 4000f6dc <__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 74 sethi %hi(0x4001d000), %g1 400030bc: 03 10 00 74 sethi %hi(0x4001d000), %g1 400030c0: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 4001d028 400030c4: 90 10 00 1b mov %i3, %o0 400030c8: 92 02 60 18 add %o1, 0x18, %o1 400030cc: 40 00 33 bf call 4000ffc8 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 28 ld [ %g1 + 0x28 ], %o1 400030e0: 90 10 00 1b mov %i3, %o0 400030e4: 92 02 60 04 add %o1, 4, %o1 400030e8: 40 00 33 b8 call 4000ffc8 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 31 d6 call 4000f6dc <__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 31 cf call 4000f6dc <__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 31 aa call 4000f6dc <__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 74 sethi %hi(0x4001d000), %l1 40002dd8: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 ! 4001d028 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 6f sethi %hi(0x4001bc00), %g1 40002dec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001bc1c 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 73 sethi %hi(0x4001cc00), %g1 40002e04: c2 00 63 1c ld [ %g1 + 0x31c ], %g1 ! 4001cf1c 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 28 ld [ %l1 + 0x28 ], %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 58 call 40006b94 <== 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 34 5f call 4000ffc8 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 70 sethi %hi(0x4001c000), %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 a0 20 or %l2, 0x20, %o0 rtems_filesystem_root = loc; 40002e74: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 40002e78: 92 10 00 10 mov %l0, %o1 40002e7c: 94 10 20 14 mov 0x14, %o2 40002e80: 40 00 34 52 call 4000ffc8 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 a0 20 or %l2, 0x20, %o0 rtems_filesystem_current = loc; 40002ea0: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 40002ea4: 92 10 00 10 mov %l0, %o1 40002ea8: 94 10 20 14 mov 0x14, %o2 40002eac: 40 00 34 47 call 4000ffc8 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 70 sethi %hi(0x4001c000), %o0 40002ebc: 40 00 00 fe call 400032b4 40002ec0: 90 12 20 28 or %o0, 0x28, %o0 ! 4001c028 <__FUNCTION__.5769+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 4000b4f8 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4000b4f8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000b4fc: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 4000b500: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 4000b504: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4000b508: 81 c3 e0 08 retl <== NOT EXECUTED 4000b50c: 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 36 5e call 400105b8 <== 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 32 92 call 4000f6dc <__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 36 2f call 400105b8 <== 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 4000b510 : * 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 ) { 4000b510: 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 ); 4000b514: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000b518: d0 00 60 b0 ld [ %g1 + 0xb0 ], %o0 ! 4001d8b0 4000b51c: 92 10 20 00 clr %o1 4000b520: 7f ff eb f4 call 400064f0 4000b524: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000b528: 21 10 00 76 sethi %hi(0x4001d800), %l0 4000b52c: c2 04 20 ac ld [ %l0 + 0xac ], %g1 ! 4001d8ac 4000b530: 80 a0 60 00 cmp %g1, 0 4000b534: 02 80 00 26 be 4000b5cc 4000b538: b0 10 20 00 clr %i0 rc = rtems_semaphore_create( 4000b53c: 05 10 00 76 sethi %hi(0x4001d800), %g2 4000b540: c4 00 a0 a8 ld [ %g2 + 0xa8 ], %g2 ! 4001d8a8 4000b544: 92 10 20 01 mov 1, %o1 4000b548: 82 20 40 02 sub %g1, %g2, %g1 4000b54c: 83 38 60 03 sra %g1, 3, %g1 4000b550: 87 28 60 06 sll %g1, 6, %g3 4000b554: 85 28 60 03 sll %g1, 3, %g2 4000b558: 84 20 c0 02 sub %g3, %g2, %g2 4000b55c: 87 28 a0 06 sll %g2, 6, %g3 4000b560: 84 00 80 03 add %g2, %g3, %g2 4000b564: 84 00 80 01 add %g2, %g1, %g2 4000b568: 87 28 a0 0f sll %g2, 0xf, %g3 4000b56c: 84 20 c0 02 sub %g3, %g2, %g2 4000b570: 07 13 10 92 sethi %hi(0x4c424800), %g3 4000b574: 85 28 a0 03 sll %g2, 3, %g2 4000b578: 86 10 e1 00 or %g3, 0x100, %g3 4000b57c: 82 00 80 01 add %g2, %g1, %g1 4000b580: 94 10 20 54 mov 0x54, %o2 4000b584: 96 10 20 00 clr %o3 4000b588: 90 10 40 03 or %g1, %g3, %o0 4000b58c: 7f ff eb 37 call 40006268 4000b590: 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) 4000b594: 80 a2 20 00 cmp %o0, 0 4000b598: 32 80 00 0d bne,a 4000b5cc 4000b59c: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000b5a0: f0 04 20 ac ld [ %l0 + 0xac ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000b5a4: 92 10 20 00 clr %o1 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000b5a8: e2 06 20 38 ld [ %i0 + 0x38 ], %l1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000b5ac: 90 10 00 18 mov %i0, %o0 4000b5b0: 40 00 12 c5 call 400100c4 4000b5b4: 94 10 20 48 mov 0x48, %o2 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000b5b8: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_libio_iop_freelist = next; 4000b5bc: e2 24 20 ac st %l1, [ %l0 + 0xac ] 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; 4000b5c0: 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; 4000b5c4: 82 10 21 00 mov 0x100, %g1 4000b5c8: c2 26 20 18 st %g1, [ %i0 + 0x18 ] failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000b5cc: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000b5d0: 7f ff ec 0f call 4000660c 4000b5d4: d0 00 60 b0 ld [ %g1 + 0xb0 ], %o0 ! 4001d8b0 return iop; } 4000b5d8: 81 c7 e0 08 ret 4000b5dc: 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 73 sethi %hi(0x4001cc00), %l0 4000310c: d0 04 23 14 ld [ %l0 + 0x314 ], %o0 ! 4001cf14 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 bc call 4000b00c 40003120: 92 10 20 48 mov 0x48, %o1 40003124: 03 10 00 76 sethi %hi(0x4001d800), %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 a8 st %o0, [ %g1 + 0xa8 ] 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 76 sethi %hi(0x4001d800), %g2 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 40003140: c8 04 23 14 ld [ %l0 + 0x314 ], %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 a0 ac st %o0, [ %g2 + 0xac ] 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 76 sethi %hi(0x4001d800), %o4 40003188: 40 00 0c 38 call 40006268 4000318c: 98 13 20 b0 or %o4, 0xb0, %o4 ! 4001d8b0 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 73 sethi %hi(0x4001cc00), %g1 rtems_fatal_error_occurred( rc ); 4000319c: 40 00 0e 7e call 40006b94 <== 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 10 ld [ %g1 + 0x310 ], %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 40028a30 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 40028a30: 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); 40028a34: 90 10 20 00 clr %o0 40028a38: 92 10 20 00 clr %o1 40028a3c: 40 00 06 59 call 4002a3a0 40028a40: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 40028a44: b0 92 20 00 orcc %o0, 0, %i0 40028a48: 12 80 00 19 bne 40028aac 40028a4c: 21 10 01 99 sethi %hi(0x40066400), %l0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 40028a50: c4 04 20 f8 ld [ %l0 + 0xf8 ], %g2 ! 400664f8 40028a54: 03 10 01 a9 sethi %hi(0x4006a400), %g1 40028a58: 82 10 60 18 or %g1, 0x18, %g1 ! 4006a418 40028a5c: 80 a0 80 01 cmp %g2, %g1 40028a60: 12 80 00 15 bne 40028ab4 40028a64: a4 14 20 f8 or %l0, 0xf8, %l2 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 40028a68: 7f ff 7e 07 call 40008284 40028a6c: 90 10 20 48 mov 0x48, %o0 if (!tmp) 40028a70: a2 92 20 00 orcc %o0, 0, %l1 40028a74: 12 80 00 04 bne 40028a84 40028a78: 92 10 00 12 mov %l2, %o1 40028a7c: 81 c7 e0 08 ret <== NOT EXECUTED 40028a80: 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); 40028a84: 90 10 20 00 clr %o0 40028a88: 15 10 00 a2 sethi %hi(0x40028800), %o2 40028a8c: 40 00 07 43 call 4002a798 40028a90: 94 12 a0 fc or %o2, 0xfc, %o2 ! 400288fc if (sc != RTEMS_SUCCESSFUL) { 40028a94: 82 92 20 00 orcc %o0, 0, %g1 40028a98: 22 80 00 07 be,a 40028ab4 40028a9c: e2 24 20 f8 st %l1, [ %l0 + 0xf8 ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 40028aa0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40028aa4: 7f ff 7c 5c call 40007c14 <== NOT EXECUTED 40028aa8: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return sc; 40028aac: 81 c7 e0 08 ret <== NOT EXECUTED 40028ab0: 81 e8 00 00 restore <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 40028ab4: 23 10 01 99 sethi %hi(0x40066400), %l1 40028ab8: e0 04 60 f8 ld [ %l1 + 0xf8 ], %l0 ! 400664f8 40028abc: 94 10 20 48 mov 0x48, %o2 40028ac0: 90 10 00 10 mov %l0, %o0 40028ac4: 13 10 01 a9 sethi %hi(0x4006a400), %o1 40028ac8: 40 00 6b f9 call 40043aac 40028acc: 92 12 60 18 or %o1, 0x18, %o1 ! 4006a418 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40028ad0: 03 10 01 a9 sethi %hi(0x4006a400), %g1 40028ad4: d2 00 60 00 ld [ %g1 ], %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*/ 40028ad8: c2 07 bf fc ld [ %fp + -4 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40028adc: 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*/ 40028ae0: c2 24 00 00 st %g1, [ %l0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40028ae4: 90 04 20 18 add %l0, 0x18, %o0 40028ae8: 40 00 6b f1 call 40043aac 40028aec: 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); 40028af0: a0 07 bf e8 add %fp, -24, %l0 40028af4: 98 10 20 00 clr %o4 40028af8: 96 10 00 10 mov %l0, %o3 40028afc: 25 10 01 71 sethi %hi(0x4005c400), %l2 40028b00: 92 10 20 01 mov 1, %o1 40028b04: 94 10 20 00 clr %o2 40028b08: 7f ff 7c 1a call 40007b70 40028b0c: 90 14 a2 58 or %l2, 0x258, %o0 rtems_filesystem_root = loc; 40028b10: d0 04 60 f8 ld [ %l1 + 0xf8 ], %o0 40028b14: 92 10 00 10 mov %l0, %o1 40028b18: 94 10 20 14 mov 0x14, %o2 40028b1c: 40 00 6b e4 call 40043aac 40028b20: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40028b24: 92 10 20 01 mov 1, %o1 40028b28: 94 10 20 00 clr %o2 40028b2c: 90 14 a2 58 or %l2, 0x258, %o0 40028b30: 96 10 00 10 mov %l0, %o3 40028b34: 7f ff 7c 0f call 40007b70 40028b38: 98 10 20 00 clr %o4 rtems_filesystem_current = loc; 40028b3c: d0 04 60 f8 ld [ %l1 + 0xf8 ], %o0 40028b40: 92 10 00 10 mov %l0, %o1 40028b44: 90 02 20 04 add %o0, 4, %o0 40028b48: 40 00 6b d9 call 40043aac 40028b4c: 94 10 20 14 mov 0x14, %o2 return RTEMS_SUCCESSFUL; } 40028b50: 81 c7 e0 08 ret 40028b54: 81 e8 00 00 restore 40028974 : * 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) { 40028974: 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); 40028978: 90 10 20 00 clr %o0 <== NOT EXECUTED 4002897c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40028980: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 40028984: 40 00 06 87 call 4002a3a0 <== NOT EXECUTED 40028988: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002898c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028990: 12 80 00 26 bne 40028a28 <== NOT EXECUTED 40028994: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 40028998: 13 10 01 99 sethi %hi(0x40066400), %o1 <== NOT EXECUTED 4002899c: e0 02 60 f8 ld [ %o1 + 0xf8 ], %l0 ! 400664f8 <== NOT EXECUTED 400289a0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400289a4: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 400289a8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400289ac: 12 80 00 09 bne 400289d0 <== NOT EXECUTED 400289b0: 92 12 60 f8 or %o1, 0xf8, %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); 400289b4: 40 00 07 a5 call 4002a848 <== NOT EXECUTED 400289b8: 01 00 00 00 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400289bc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400289c0: 12 80 00 1a bne 40028a28 <== NOT EXECUTED 400289c4: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 400289c8: 7f ff ff cd call 400288fc <== NOT EXECUTED 400289cc: 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, 400289d0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400289d4: 21 10 01 99 sethi %hi(0x40066400), %l0 <== NOT EXECUTED 400289d8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 400289dc: a2 14 20 f8 or %l0, 0xf8, %l1 <== NOT EXECUTED 400289e0: 40 00 07 c0 call 4002a8e0 <== NOT EXECUTED 400289e4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 400289e8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400289ec: 12 80 00 0c bne 40028a1c <== NOT EXECUTED 400289f0: 07 10 01 a9 sethi %hi(0x4006a400), %g3 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 400289f4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 400289f8: 15 10 00 a2 sethi %hi(0x40028800), %o2 <== NOT EXECUTED 400289fc: 40 00 07 67 call 4002a798 <== NOT EXECUTED 40028a00: 94 12 a0 fc or %o2, 0xfc, %o2 ! 400288fc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40028a04: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40028a08: 12 80 00 05 bne 40028a1c <== NOT EXECUTED 40028a0c: 07 10 01 a9 sethi %hi(0x4006a400), %g3 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40028a10: 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; 40028a14: 10 80 00 05 b 40028a28 <== NOT EXECUTED 40028a18: c4 24 20 f8 st %g2, [ %l0 + 0xf8 ] <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 40028a1c: 05 10 01 99 sethi %hi(0x40066400), %g2 <== NOT EXECUTED 40028a20: 86 10 e0 18 or %g3, 0x18, %g3 <== NOT EXECUTED 40028a24: c6 20 a0 f8 st %g3, [ %g2 + 0xf8 ] <== NOT EXECUTED return sc; } 40028a28: 81 c7 e0 08 ret <== NOT EXECUTED 40028a2c: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED 4000838c : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 4000838c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 40008390: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED 40008394: d0 00 62 10 ld [ %g1 + 0x210 ], %o0 ! 40066210 <== NOT EXECUTED 40008398: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000839c: 40 00 17 77 call 4000e178 <_Protected_heap_Get_block_size> <== NOT EXECUTED 400083a0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 400083a4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 400083a8: 02 80 00 08 be 400083c8 <== NOT EXECUTED 400083ac: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 400083b0: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 400083b4: 82 10 63 d0 or %g1, 0x3d0, %g1 <== NOT EXECUTED 400083b8: c4 18 60 28 ldd [ %g1 + 0x28 ], %g2 <== NOT EXECUTED 400083bc: 86 80 c0 04 addcc %g3, %g4, %g3 <== NOT EXECUTED 400083c0: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 400083c4: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 400083c8: 81 c7 e0 08 ret <== NOT EXECUTED 400083cc: 81 e8 00 00 restore <== NOT EXECUTED 400083d0 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 400083d0: 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 ) 400083d4: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 400083d8: 02 80 00 13 be 40008424 <== NOT EXECUTED 400083dc: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 400083e0: d0 00 62 10 ld [ %g1 + 0x210 ], %o0 ! 40066210 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 400083e4: 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); 400083e8: 40 00 17 64 call 4000e178 <_Protected_heap_Get_block_size> <== NOT EXECUTED 400083ec: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 400083f0: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 400083f4: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 400083f8: 82 10 63 d0 or %g1, 0x3d0, %g1 <== NOT EXECUTED 400083fc: d8 18 60 20 ldd [ %g1 + 0x20 ], %o4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008400: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40008404: 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); 40008408: 9a 83 40 04 addcc %o5, %g4, %o5 <== NOT EXECUTED 4000840c: 98 43 20 00 addx %o4, 0, %o4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008410: 84 23 40 02 sub %o5, %g2, %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40008414: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 40008418: 08 80 00 03 bleu 40008424 <== NOT EXECUTED 4000841c: d8 38 60 20 std %o4, [ %g1 + 0x20 ] <== NOT EXECUTED s->max_depth = current_depth; 40008420: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 40008424: 81 c7 e0 08 ret <== NOT EXECUTED 40008428: 81 e8 00 00 restore <== NOT EXECUTED 4000842c : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 4000842c: 11 10 01 a8 sethi %hi(0x4006a000), %o0 <== NOT EXECUTED 40008430: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008434: 90 12 23 d0 or %o0, 0x3d0, %o0 <== NOT EXECUTED 40008438: 94 10 20 30 mov 0x30, %o2 <== NOT EXECUTED 4000843c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40008440: 40 00 ee 2e call 40043cf8 <== NOT EXECUTED 40008444: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40008448: 01 00 00 00 nop 40010c18 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40010c18: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40010c1c: a0 96 20 00 orcc %i0, 0, %l0 40010c20: 02 80 00 20 be 40010ca0 40010c24: 03 10 00 8f sethi %hi(0x40023c00), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40010c28: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 40023fc0 <_System_state_Current> 40010c2c: 80 a0 60 03 cmp %g1, 3 40010c30: 12 80 00 07 bne 40010c4c 40010c34: c0 24 00 00 clr [ %l0 ] 40010c38: 7f ff cf 84 call 40004a48 40010c3c: 01 00 00 00 nop 40010c40: 80 8a 20 ff btst 0xff, %o0 40010c44: 02 80 00 18 be 40010ca4 40010c48: b0 10 20 16 mov 0x16, %i0 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 40010c4c: 7f ff cf 98 call 40004aac 40010c50: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 40010c54: 03 10 00 8c sethi %hi(0x40023000), %g1 40010c58: d0 00 61 f0 ld [ %g1 + 0x1f0 ], %o0 ! 400231f0 40010c5c: 94 10 00 19 mov %i1, %o2 40010c60: 92 10 00 1a mov %i2, %o1 40010c64: 7f ff e4 e6 call 40009ffc <_Protected_heap_Allocate_aligned_with_boundary> 40010c68: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40010c6c: b2 92 20 00 orcc %o0, 0, %i1 40010c70: 02 80 00 0d be 40010ca4 40010c74: 03 10 00 8e sethi %hi(0x40023800), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 40010c78: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 40023878 40010c7c: 80 a0 60 00 cmp %g1, 0 40010c80: 22 80 00 06 be,a 40010c98 40010c84: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 40010c88: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40010c8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40010c90: 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; 40010c94: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 40010c98: 81 c7 e0 08 ret 40010c9c: 91 e8 20 00 restore %g0, 0, %o0 40010ca0: b0 10 20 16 mov 0x16, %i0 } 40010ca4: 81 c7 e0 08 ret 40010ca8: 81 e8 00 00 restore 4000837c : void rtems_panic( const char *printf_format, ... ) { 4000837c: 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); 40008380: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40008384: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40008388: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 4000838c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008390: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008394: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008398: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 4000839c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400083a0: 7f ff ff 89 call 400081c4 <== NOT EXECUTED 400083a4: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 400083a8: 81 c7 e0 08 ret <== NOT EXECUTED 400083ac: 81 e8 00 00 restore <== NOT EXECUTED 4000d31c : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4000d31c: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 4000d320: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000d324: c2 08 61 84 ldub [ %g1 + 0x184 ], %g1 ! 4001d584 4000d328: 80 a0 60 00 cmp %g1, 0 4000d32c: 02 80 00 15 be 4000d380 4000d330: 19 10 00 75 sethi %hi(0x4001d400), %o4 return; if (rtems_pipe_semaphore) 4000d334: c2 03 22 f0 ld [ %o4 + 0x2f0 ], %g1 ! 4001d6f0 <== NOT EXECUTED 4000d338: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d33c: 12 80 00 11 bne 4000d380 <== NOT EXECUTED 4000d340: 98 13 22 f0 or %o4, 0x2f0, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4000d344: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 4000d348: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000d34c: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 4000d350: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 4000d354: 7f ff e3 c5 call 40006268 <== NOT EXECUTED 4000d358: 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) 4000d35c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d360: 02 80 00 04 be 4000d370 <== NOT EXECUTED 4000d364: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4000d368: 7f ff e6 0b call 40006b94 <== NOT EXECUTED 4000d36c: 01 00 00 00 nop <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4000d370: 7f ff e2 9e call 40005de8 <== NOT EXECUTED 4000d374: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 4000d378: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d37c: d0 30 62 f6 sth %o0, [ %g1 + 0x2f6 ] ! 4001d6f6 <== NOT EXECUTED 4000d380: 81 c7 e0 08 ret 4000d384: 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 a9 sethi %hi(0x4006a400), %g1 400061b8: c2 00 62 4c ld [ %g1 + 0x24c ], %g1 ! 4006a64c <_Thread_Executing> ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 400061bc: d0 00 60 c8 ld [ %g1 + 0xc8 ], %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 c4 ld [ %g1 + 0xc4 ], %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 9d sethi %hi(0x40067400), %g1 400061e0: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 ! 40067770 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 a8 sethi %hi(0x4006a000), %o1 400061f8: 94 10 20 10 mov 0x10, %o2 400061fc: 40 00 f5 fb call 400439e8 40006200: 92 12 63 a0 or %o1, 0x3a0, %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 a9 sethi %hi(0x4006a400), %g1 <== NOT EXECUTED 40006224: d0 00 62 4c ld [ %g1 + 0x24c ], %o0 ! 4006a64c <_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 80 or %o1, 0x280, %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 9d sethi %hi(0x40067400), %l1 <== NOT EXECUTED print_handler = print; 4000609c: 21 10 01 9d sethi %hi(0x40067400), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 400060a0: f0 24 63 74 st %i0, [ %l1 + 0x374 ] <== NOT EXECUTED print_handler = print; 400060a4: f2 24 23 78 st %i1, [ %l0 + 0x378 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 400060a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400060ac: 13 10 01 70 sethi %hi(0x4005c000), %o1 <== NOT EXECUTED 400060b0: 9f c6 40 00 call %i1 <== NOT EXECUTED 400060b4: 92 12 63 d0 or %o1, 0x3d0, %o1 ! 4005c3d0 <== NOT EXECUTED (*print)( context, 400060b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400060bc: 13 10 01 70 sethi %hi(0x4005c000), %o1 <== NOT EXECUTED 400060c0: 9f c6 40 00 call %i1 <== NOT EXECUTED 400060c4: 92 12 63 e8 or %o1, 0x3e8, %o1 ! 4005c3e8 <== 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 d0 call 4000d80c <== 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 63 74 clr [ %l1 + 0x374 ] <== NOT EXECUTED print_handler = NULL; 400060e0: c0 24 23 78 clr [ %l0 + 0x378 ] <== 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 c8 ld [ %i0 + 0xc8 ], %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 c4 ld [ %i0 + 0xc4 ], %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 a8 sethi %hi(0x4006a000), %o1 40006268: 94 10 20 10 mov 0x10, %o2 4000626c: 40 00 f5 df call 400439e8 40006270: 92 12 63 a0 or %o1, 0x3a0, %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 4000d380 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d380: 9d e3 bf 98 save %sp, -104, %sp 4000d384: a4 10 00 18 mov %i0, %l2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d388: 80 a6 60 00 cmp %i1, 0 4000d38c: 02 80 00 24 be 4000d41c 4000d390: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d394: 40 00 0d ad call 40010a48 <__errno> 4000d398: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d39c: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d3a0: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d3a4: c0 26 40 00 clr [ %i1 ] 4000d3a8: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d3ac: 40 00 19 1f call 40013828 4000d3b0: 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 ) 4000d3b4: 80 a6 a0 00 cmp %i2, 0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d3b8: 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 ) 4000d3bc: 02 80 00 04 be 4000d3cc 4000d3c0: a2 10 00 09 mov %o1, %l1 *endptr = end; 4000d3c4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d3c8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d3cc: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d3d0: 80 a0 40 12 cmp %g1, %l2 4000d3d4: 02 80 00 12 be 4000d41c 4000d3d8: 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)) 4000d3dc: 03 10 00 83 sethi %hi(0x40020c00), %g1 4000d3e0: d4 18 62 10 ldd [ %g1 + 0x210 ], %o2 ! 40020e10 <_CPU_Trap_slot_template+0x14> 4000d3e4: 90 10 00 10 mov %l0, %o0 4000d3e8: 40 00 41 79 call 4001d9cc <__gtdf2> 4000d3ec: 92 10 00 11 mov %l1, %o1 4000d3f0: 80 a2 20 00 cmp %o0, 0 4000d3f4: 24 80 00 09 ble,a 4000d418 4000d3f8: e0 3e 40 00 std %l0, [ %i1 ] 4000d3fc: 40 00 0d 93 call 40010a48 <__errno> 4000d400: b0 10 20 0a mov 0xa, %i0 4000d404: c2 02 00 00 ld [ %o0 ], %g1 4000d408: 80 a0 60 22 cmp %g1, 0x22 4000d40c: 02 80 00 04 be 4000d41c 4000d410: 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; 4000d414: e0 3e 40 00 std %l0, [ %i1 ] <== NOT EXECUTED 4000d418: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d41c: 81 c7 e0 08 ret 4000d420: 81 e8 00 00 restore 4000d424 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d424: 9d e3 bf 98 save %sp, -104, %sp 4000d428: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d42c: 80 a6 60 00 cmp %i1, 0 4000d430: 02 80 00 21 be 4000d4b4 4000d434: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d438: 40 00 0d 84 call 40010a48 <__errno> 4000d43c: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d440: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d444: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d448: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000d44c: 40 00 18 e4 call 400137dc 4000d450: 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 ) 4000d454: 80 a6 a0 00 cmp %i2, 0 4000d458: 02 80 00 04 be 4000d468 4000d45c: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000d460: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d464: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d468: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d46c: 80 a0 40 10 cmp %g1, %l0 4000d470: 02 80 00 11 be 4000d4b4 4000d474: 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)) 4000d478: 90 10 00 11 mov %l1, %o0 4000d47c: 13 1f df ff sethi %hi(0x7f7ffc00), %o1 4000d480: 40 00 3e 9b call 4001ceec <__gtsf2> 4000d484: 92 12 63 ff or %o1, 0x3ff, %o1 ! 7f7fffff 4000d488: 80 a2 20 00 cmp %o0, 0 4000d48c: 24 80 00 09 ble,a 4000d4b0 4000d490: e2 26 40 00 st %l1, [ %i1 ] 4000d494: 40 00 0d 6d call 40010a48 <__errno> 4000d498: b0 10 20 0a mov 0xa, %i0 4000d49c: c2 02 00 00 ld [ %o0 ], %g1 4000d4a0: 80 a0 60 22 cmp %g1, 0x22 4000d4a4: 02 80 00 04 be 4000d4b4 4000d4a8: 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; 4000d4ac: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000d4b0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d4b4: 81 c7 e0 08 ret 4000d4b8: 81 e8 00 00 restore 4001e650 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e650: 9d e3 bf 98 save %sp, -104, %sp 4001e654: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e658: 80 a6 60 00 cmp %i1, 0 4001e65c: 02 80 00 20 be 4001e6dc 4001e660: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e664: 40 00 88 3f call 40040760 <__errno> 4001e668: 01 00 00 00 nop 4001e66c: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e670: 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 ); 4001e674: 94 10 00 1b mov %i3, %o2 4001e678: 90 10 00 10 mov %l0, %o0 4001e67c: 40 00 a7 ef call 40048638 4001e680: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4001e684: 80 a6 a0 00 cmp %i2, 0 4001e688: 02 80 00 04 be 4001e698 4001e68c: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e690: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e694: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e698: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e69c: 80 a0 40 10 cmp %g1, %l0 4001e6a0: 02 80 00 0f be 4001e6dc 4001e6a4: 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)) 4001e6a8: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4001e6ac: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4001e6b0: 80 a4 40 01 cmp %l1, %g1 4001e6b4: 32 80 00 09 bne,a 4001e6d8 4001e6b8: e2 26 40 00 st %l1, [ %i1 ] 4001e6bc: 40 00 88 29 call 40040760 <__errno> 4001e6c0: b0 10 20 0a mov 0xa, %i0 4001e6c4: c2 02 00 00 ld [ %o0 ], %g1 4001e6c8: 80 a0 60 22 cmp %g1, 0x22 4001e6cc: 02 80 00 04 be 4001e6dc 4001e6d0: 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; 4001e6d4: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e6d8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e6dc: 81 c7 e0 08 ret 4001e6e0: 81 e8 00 00 restore 4000d614 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d614: 9d e3 bf 98 save %sp, -104, %sp 4000d618: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d61c: 80 a6 60 00 cmp %i1, 0 4000d620: 02 80 00 23 be 4000d6ac 4000d624: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d628: 40 00 0d 08 call 40010a48 <__errno> 4000d62c: 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 ); 4000d630: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d634: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d638: 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 ); 4000d63c: 90 10 00 10 mov %l0, %o0 4000d640: 40 00 19 03 call 40013a4c 4000d644: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d648: 80 a6 a0 00 cmp %i2, 0 4000d64c: 02 80 00 04 be 4000d65c 4000d650: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000d654: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d658: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d65c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d660: 80 a0 40 10 cmp %g1, %l0 4000d664: 02 80 00 12 be 4000d6ac 4000d668: 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)) 4000d66c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000d670: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000d674: 80 a4 40 01 cmp %l1, %g1 4000d678: 02 80 00 05 be 4000d68c 4000d67c: 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)) 4000d680: 80 a4 40 01 cmp %l1, %g1 4000d684: 32 80 00 09 bne,a 4000d6a8 4000d688: e2 26 40 00 st %l1, [ %i1 ] 4000d68c: 40 00 0c ef call 40010a48 <__errno> 4000d690: 01 00 00 00 nop 4000d694: c2 02 00 00 ld [ %o0 ], %g1 4000d698: 80 a0 60 22 cmp %g1, 0x22 4000d69c: 22 80 00 04 be,a 4000d6ac 4000d6a0: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000d6a4: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000d6a8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d6ac: 81 c7 e0 08 ret 4000d6b0: 81 e8 00 00 restore 4000d550 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d550: 9d e3 bf 98 save %sp, -104, %sp 4000d554: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d558: 80 a6 60 00 cmp %i1, 0 4000d55c: 02 80 00 2c be 4000d60c 4000d560: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d564: 40 00 0d 39 call 40010a48 <__errno> 4000d568: 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 ); 4000d56c: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d570: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d574: c0 26 40 00 clr [ %i1 ] 4000d578: 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 ); 4000d57c: 90 10 00 10 mov %l0, %o0 4000d580: 40 00 19 3d call 40013a74 4000d584: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d588: 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 ); 4000d58c: a2 10 00 08 mov %o0, %l1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d590: 02 80 00 04 be 4000d5a0 4000d594: a4 10 00 09 mov %o1, %l2 *endptr = end; 4000d598: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d59c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d5a0: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d5a4: 80 a0 40 10 cmp %g1, %l0 4000d5a8: 02 80 00 19 be 4000d60c 4000d5ac: 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)) 4000d5b0: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000d5b4: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000d5b8: 80 a4 40 01 cmp %l1, %g1 4000d5bc: 12 80 00 05 bne 4000d5d0 4000d5c0: 03 20 00 00 sethi %hi(0x80000000), %g1 4000d5c4: 80 a4 bf ff cmp %l2, -1 4000d5c8: 02 80 00 08 be 4000d5e8 4000d5cc: 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)) 4000d5d0: 80 a4 40 01 cmp %l1, %g1 4000d5d4: 32 80 00 0c bne,a 4000d604 4000d5d8: e4 26 60 04 st %l2, [ %i1 + 4 ] 4000d5dc: 80 a4 a0 00 cmp %l2, 0 4000d5e0: 32 80 00 09 bne,a 4000d604 4000d5e4: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000d5e8: 40 00 0d 18 call 40010a48 <__errno> 4000d5ec: 01 00 00 00 nop 4000d5f0: c2 02 00 00 ld [ %o0 ], %g1 4000d5f4: 80 a0 60 22 cmp %g1, 0x22 4000d5f8: 22 80 00 05 be,a 4000d60c 4000d5fc: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4000d600: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000d604: e2 26 40 00 st %l1, [ %i1 ] 4000d608: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d60c: 81 c7 e0 08 ret 4000d610: 81 e8 00 00 restore 4001e6e4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e6e4: 9d e3 bf 98 save %sp, -104, %sp 4001e6e8: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e6ec: 80 a6 60 00 cmp %i1, 0 4001e6f0: 02 80 00 1e be 4001e768 4001e6f4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e6f8: 40 00 88 1a call 40040760 <__errno> 4001e6fc: 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 ); 4001e700: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4001e704: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e708: 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 ); 4001e70c: 90 10 00 10 mov %l0, %o0 4001e710: 40 00 a9 00 call 40048b10 4001e714: 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 ) 4001e718: 80 a6 a0 00 cmp %i2, 0 4001e71c: 02 80 00 04 be 4001e72c 4001e720: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e724: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e728: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e72c: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e730: 80 a0 40 10 cmp %g1, %l0 4001e734: 02 80 00 0d be 4001e768 4001e738: 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)) 4001e73c: 80 a4 7f ff cmp %l1, -1 4001e740: 32 80 00 09 bne,a 4001e764 4001e744: e2 26 40 00 st %l1, [ %i1 ] 4001e748: 40 00 88 06 call 40040760 <__errno> <== NOT EXECUTED 4001e74c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 4001e750: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001e754: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 4001e758: 02 80 00 04 be 4001e768 <== NOT EXECUTED 4001e75c: 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; 4001e760: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e764: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e768: 81 c7 e0 08 ret 4001e76c: 81 e8 00 00 restore 4000d7a4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d7a4: 9d e3 bf 98 save %sp, -104, %sp 4000d7a8: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d7ac: 80 a6 60 00 cmp %i1, 0 4000d7b0: 02 80 00 1e be 4000d828 4000d7b4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d7b8: 40 00 0c a4 call 40010a48 <__errno> 4000d7bc: 01 00 00 00 nop 4000d7c0: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d7c4: 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 ); 4000d7c8: 94 10 00 1b mov %i3, %o2 4000d7cc: 90 10 00 10 mov %l0, %o0 4000d7d0: 40 00 19 d5 call 40013f24 4000d7d4: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d7d8: 80 a6 a0 00 cmp %i2, 0 4000d7dc: 02 80 00 04 be 4000d7ec 4000d7e0: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000d7e4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d7e8: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d7ec: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d7f0: 80 a0 40 10 cmp %g1, %l0 4000d7f4: 02 80 00 0d be 4000d828 4000d7f8: 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)) 4000d7fc: 80 a4 7f ff cmp %l1, -1 4000d800: 32 80 00 09 bne,a 4000d824 4000d804: e2 26 40 00 st %l1, [ %i1 ] 4000d808: 40 00 0c 90 call 40010a48 <__errno> 4000d80c: b0 10 20 0a mov 0xa, %i0 4000d810: c2 02 00 00 ld [ %o0 ], %g1 4000d814: 80 a0 60 22 cmp %g1, 0x22 4000d818: 02 80 00 04 be 4000d828 4000d81c: 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; 4000d820: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000d824: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d828: 81 c7 e0 08 ret 4000d82c: 81 e8 00 00 restore 4001e7d4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e7d4: 9d e3 bf 98 save %sp, -104, %sp 4001e7d8: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e7dc: 80 a6 60 00 cmp %i1, 0 4001e7e0: 02 80 00 1e be 4001e858 4001e7e4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e7e8: 40 00 87 de call 40040760 <__errno> 4001e7ec: 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 ); 4001e7f0: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4001e7f4: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e7f8: 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 ); 4001e7fc: 90 10 00 10 mov %l0, %o0 4001e800: 40 00 a8 c4 call 40048b10 4001e804: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4001e808: 80 a6 a0 00 cmp %i2, 0 4001e80c: 02 80 00 04 be 4001e81c 4001e810: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e814: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e818: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e81c: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e820: 80 a0 40 10 cmp %g1, %l0 4001e824: 02 80 00 0d be 4001e858 4001e828: 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)) 4001e82c: 80 a4 7f ff cmp %l1, -1 4001e830: 32 80 00 09 bne,a 4001e854 4001e834: e2 26 40 00 st %l1, [ %i1 ] 4001e838: 40 00 87 ca call 40040760 <__errno> 4001e83c: b0 10 20 0a mov 0xa, %i0 4001e840: c2 02 00 00 ld [ %o0 ], %g1 4001e844: 80 a0 60 22 cmp %g1, 0x22 4001e848: 02 80 00 04 be 4001e858 4001e84c: 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; 4001e850: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e854: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e858: 81 c7 e0 08 ret 4001e85c: 81 e8 00 00 restore 4000d830 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000d830: 9d e3 bf 98 save %sp, -104, %sp 4000d834: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000d838: 80 a6 60 00 cmp %i1, 0 4000d83c: 02 80 00 24 be 4000d8cc 4000d840: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000d844: 40 00 0c 81 call 40010a48 <__errno> 4000d848: 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 ); 4000d84c: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000d850: c0 22 00 00 clr [ %o0 ] *n = 0; 4000d854: c0 26 40 00 clr [ %i1 ] 4000d858: 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 ); 4000d85c: 90 10 00 10 mov %l0, %o0 4000d860: 40 00 19 bb call 40013f4c 4000d864: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d868: 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 ); 4000d86c: a2 10 00 08 mov %o0, %l1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000d870: 02 80 00 04 be 4000d880 4000d874: a4 10 00 09 mov %o1, %l2 *endptr = end; 4000d878: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d87c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000d880: c2 07 bf fc ld [ %fp + -4 ], %g1 4000d884: 80 a0 40 10 cmp %g1, %l0 4000d888: 02 80 00 11 be 4000d8cc 4000d88c: 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)) 4000d890: 80 a4 7f ff cmp %l1, -1 4000d894: 32 80 00 0c bne,a 4000d8c4 4000d898: e4 26 60 04 st %l2, [ %i1 + 4 ] 4000d89c: 80 a4 bf ff cmp %l2, -1 4000d8a0: 32 80 00 09 bne,a 4000d8c4 4000d8a4: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000d8a8: 40 00 0c 68 call 40010a48 <__errno> 4000d8ac: b0 10 20 0a mov 0xa, %i0 4000d8b0: c2 02 00 00 ld [ %o0 ], %g1 4000d8b4: 80 a0 60 22 cmp %g1, 0x22 4000d8b8: 02 80 00 05 be 4000d8cc 4000d8bc: 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; 4000d8c0: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000d8c4: e2 26 40 00 st %l1, [ %i1 ] 4000d8c8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000d8cc: 81 c7 e0 08 ret 4000d8d0: 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 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 40003d38: d0 20 60 18 st %o0, [ %g1 + 0x18 ] ! 4001d018 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40003d3c: 03 10 00 74 sethi %hi(0x4001d000), %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 1c st %o1, [ %g1 + 0x1c ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40003d48: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40003d4c: 81 c3 e0 08 retl <== NOT EXECUTED 40003d50: d4 20 60 20 st %o2, [ %g1 + 0x20 ] ! 4001d020 <== 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 76 sethi %hi(0x4001d800), %g1 40005398: d0 00 60 f4 ld [ %g1 + 0xf4 ], %o0 ! 4001d8f4 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 75 sethi %hi(0x4001d400), %g1 400053d8: 85 28 a0 05 sll %g2, 5, %g2 400053dc: 82 10 61 e4 or %g1, 0x1e4, %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 cc call 40006b94 <== 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 76 sethi %hi(0x4001d800), %g2 if ( rtems_termios_ttyTail != NULL ) { 4000549c: 80 a0 60 00 cmp %g1, 0 400054a0: 02 80 00 05 be 400054b4 400054a4: c2 20 a0 f8 st %g1, [ %g2 + 0xf8 ] 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 76 sethi %hi(0x4001d800), %g2 if ( rtems_termios_ttyHead != NULL ) { 400054c8: 80 a0 60 00 cmp %g1, 0 400054cc: 02 80 00 05 be 400054e0 400054d0: c2 20 a0 fc st %g1, [ %g2 + 0xfc ] 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 17 01 call 4000b124 40005524: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40005528: 40 00 16 ff call 4000b124 4000552c: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40005530: 40 00 16 fd call 4000b124 40005534: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40005538: 40 00 16 fb call 4000b124 4000553c: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 40005540: 03 10 00 76 sethi %hi(0x4001d800), %g1 40005544: d0 00 60 f4 ld [ %g1 + 0xf4 ], %o0 ! 4001d8f4 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 02 call 40006b94 <== 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 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40003fa4: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 4001d698 <== 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 75 sethi %hi(0x4001d400), %l2 <== NOT EXECUTED 40003fdc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003fe0: a4 14 a1 e4 or %l2, 0x1e4, %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 53 98 call 40018fd0 <.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 53 8f call 40018fd0 <.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 76 sethi %hi(0x4001d800), %o4 40003cf0: c2 03 20 f4 ld [ %o4 + 0xf4 ], %g1 ! 4001d8f4 40003cf4: 80 a0 60 00 cmp %g1, 0 40003cf8: 12 80 00 0d bne 40003d2c 40003cfc: 98 13 20 f4 or %o4, 0xf4, %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 9c call 40006b94 <== 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 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40005054: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40005058: 82 10 61 e4 or %g1, 0x1e4, %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 2b d0 call 4000ffc8 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 2b cc call 4000ffc8 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 4e 83 call 40018c38 <.umul> <== NOT EXECUTED 40005230: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40005234: 40 00 4e bb call 40018d20 <.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 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 400052d8: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 400052dc: 82 10 61 e4 or %g1, 0x1e4, %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 75 sethi %hi(0x4001d400), %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 e1 e4 or %g3, 0x1e4, %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 76 sethi %hi(0x4001d800), %g1 40005560: d0 00 60 f4 ld [ %g1 + 0xf4 ], %o0 ! 4001d8f4 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 76 sethi %hi(0x4001d800), %g1 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4000557c: 10 80 00 0a b 400055a4 40005580: e4 00 60 fc ld [ %g1 + 0xfc ], %l2 ! 4001d8fc 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 74 sethi %hi(0x4001d000), %g1 400055bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001d01c 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 18 39 call 4000b6ac 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 d2 call 4000b124 <== NOT EXECUTED 400055e0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 400055e4: 03 10 00 76 sethi %hi(0x4001d800), %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 60 f4 ld [ %g1 + 0xf4 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 400055f4: 03 10 00 74 sethi %hi(0x4001d000), %g1 400055f8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 4001d020 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 18 2a call 4000b6ac 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 74 sethi %hi(0x4001d000), %g1 40005628: 40 00 18 21 call 4000b6ac 4000562c: d0 00 60 18 ld [ %g1 + 0x18 ], %o0 ! 4001d018 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 b9 call 4000b124 <== 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 b6 call 4000b124 <== NOT EXECUTED 40005650: 01 00 00 00 nop <== NOT EXECUTED free(tty); 40005654: 40 00 16 b4 call 4000b124 <== 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 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005664: 03 10 00 76 sethi %hi(0x4001d800), %g1 40005668: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 4001d8fc 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 76 sethi %hi(0x4001d800), %g1 40005698: c4 00 60 f8 ld [ %g1 + 0xf8 ], %g2 ! 4001d8f8 */ 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 76 sethi %hi(0x4001d800), %g3 if (rtems_termios_ttyTail == NULL) 400056a0: 80 a0 a0 00 cmp %g2, 0 400056a4: 12 80 00 03 bne 400056b0 400056a8: e2 20 e0 fc st %l1, [ %g3 + 0xfc ] rtems_termios_ttyTail = tty; 400056ac: e2 20 60 f8 st %l1, [ %g1 + 0xf8 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400056b0: 27 10 00 74 sethi %hi(0x4001d000), %l3 400056b4: d0 4c e0 24 ldsb [ %l3 + 0x24 ], %o0 ! 4001d024 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 24 ldsb [ %l3 + 0x24 ], %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 24 ldsb [ %l3 + 0x24 ], %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 2a 20 call 4000ffc8 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 24 ldsb [ %l3 + 0x24 ], %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 24 ldsb [ %l3 + 0x24 ], %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 74 sethi %hi(0x4001d000), %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 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 400057e0: d0 48 60 24 ldsb [ %g1 + 0x24 ], %o0 ! 4001d024 <== 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 74 sethi %hi(0x4001d000), %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 24 ldub [ %g1 + 0x24 ], %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 24 stb %g3, [ %g1 + 0x24 ] c = 'a'; 400058e4: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 400058e8: c4 28 60 24 stb %g2, [ %g1 + 0x24 ] <== 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 76 sethi %hi(0x4001d800), %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 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005970: 40 00 04 89 call 40006b94 <== NOT EXECUTED 40005974: 01 00 00 00 nop <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 40005978: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000597c: d0 00 60 f4 ld [ %g1 + 0xf4 ], %o0 ! 4001d8f4 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 9f call 4000b00c 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 76 sethi %hi(0x4001d800), %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 53 28 call 40018fd0 <.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 0a call 40006b94 <== 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 75 sethi %hi(0x4001d400), %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 a1 e4 or %g2, 0x1e4, %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 74 sethi %hi(0x4001d000), %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 74 sethi %hi(0x4001d000), %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 18 or %l7, 0x18, %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 50 83 call 40018fd0 <.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 50 7a call 40018fd0 <.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 54 5b call 40018fd0 <.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 75 sethi %hi(0x4001d400), %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 61 e4 or %l1, 0x1e4, %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 75 sethi %hi(0x4001d400), %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 61 e4 or %g1, 0x1e4, %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 400081c4 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 400081c4: 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) 400081c8: 2b 08 00 00 sethi %hi(0x20000000), %l5 <== NOT EXECUTED 400081cc: aa 8e 00 15 andcc %i0, %l5, %l5 <== NOT EXECUTED 400081d0: 02 80 00 11 be 40008214 <== NOT EXECUTED 400081d4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED { if (rtems_panic_in_progress++) 400081d8: 05 10 00 a3 sethi %hi(0x40028c00), %g2 <== NOT EXECUTED 400081dc: c2 00 a3 98 ld [ %g2 + 0x398 ], %g1 ! 40028f98 <== NOT EXECUTED 400081e0: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 400081e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400081e8: 02 80 00 06 be 40008200 <== NOT EXECUTED 400081ec: c6 20 a3 98 st %g3, [ %g2 + 0x398 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400081f0: 03 10 00 a4 sethi %hi(0x40029000), %g1 <== NOT EXECUTED 400081f4: c4 00 61 80 ld [ %g1 + 0x180 ], %g2 ! 40029180 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400081f8: 84 00 a0 01 inc %g2 <== NOT EXECUTED 400081fc: c4 20 61 80 st %g2, [ %g1 + 0x180 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40008200: 03 10 00 a3 sethi %hi(0x40028c00), %g1 <== NOT EXECUTED 40008204: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 40028f98 <== NOT EXECUTED 40008208: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000820c: 34 80 00 5a bg,a 40008374 <== NOT EXECUTED 40008210: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40008214: 03 10 00 a1 sethi %hi(0x40028400), %g1 <== NOT EXECUTED 40008218: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 400286c0 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 4000821c: 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 */ 40008220: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40008224: 40 00 39 c7 call 40016940 <== NOT EXECUTED 40008228: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 4000822c: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 40008230: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 40008234: 02 80 00 05 be 40008248 <== NOT EXECUTED 40008238: a6 2c 00 13 andn %l0, %l3, %l3 <== NOT EXECUTED local_errno = errno; 4000823c: 40 00 38 b8 call 4001651c <__errno> <== NOT EXECUTED 40008240: 01 00 00 00 nop <== NOT EXECUTED 40008244: 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); 40008248: 29 10 00 a1 sethi %hi(0x40028400), %l4 <== NOT EXECUTED 4000824c: c2 05 22 c0 ld [ %l4 + 0x2c0 ], %g1 ! 400286c0 <_impure_ptr> <== NOT EXECUTED 40008250: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008254: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008258: 40 00 51 77 call 4001c834 <== NOT EXECUTED 4000825c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 40008260: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40008264: 02 80 00 0c be 40008294 <== NOT EXECUTED 40008268: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 4000826c: c2 05 22 c0 ld [ %l4 + 0x2c0 ], %g1 <== NOT EXECUTED 40008270: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008274: 7f ff ff cd call 400081a8 <== NOT EXECUTED 40008278: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 4000827c: 13 10 00 99 sethi %hi(0x40026400), %o1 <== NOT EXECUTED 40008280: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008284: 92 12 63 f0 or %o1, 0x3f0, %o1 <== NOT EXECUTED 40008288: 40 00 3a 82 call 40016c90 <== NOT EXECUTED 4000828c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008290: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED if (local_errno) 40008294: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008298: 22 80 00 1c be,a 40008308 <== NOT EXECUTED 4000829c: 27 10 00 a1 sethi %hi(0x40028400), %l3 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 400082a0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400082a4: 04 80 00 11 ble 400082e8 <== NOT EXECUTED 400082a8: 03 10 00 a1 sethi %hi(0x40028400), %g1 <== NOT EXECUTED 400082ac: 40 00 3d cc call 400179dc <== NOT EXECUTED 400082b0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400082b4: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 400082b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400082bc: 02 80 00 0b be 400082e8 <== NOT EXECUTED 400082c0: 03 10 00 a1 sethi %hi(0x40028400), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 400082c4: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 400286c0 <_impure_ptr> <== NOT EXECUTED 400082c8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400082cc: 40 00 3d c4 call 400179dc <== NOT EXECUTED 400082d0: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 400082d4: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 400082d8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400082dc: 92 12 60 00 mov %o1, %o1 <== NOT EXECUTED 400082e0: 10 80 00 07 b 400082fc <== NOT EXECUTED 400082e4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 400082e8: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 <== NOT EXECUTED 400082ec: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 400082f0: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400082f4: 92 12 60 10 or %o1, 0x10, %o1 <== NOT EXECUTED 400082f8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 400082fc: 40 00 3a 65 call 40016c90 <== NOT EXECUTED 40008300: 27 10 00 a1 sethi %hi(0x40028400), %l3 <== NOT EXECUTED 40008304: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40008308: c2 04 e2 c0 ld [ %l3 + 0x2c0 ], %g1 <== NOT EXECUTED 4000830c: 13 10 00 99 sethi %hi(0x40026400), %o1 <== NOT EXECUTED 40008310: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008314: 40 00 3a 5f call 40016c90 <== NOT EXECUTED 40008318: 92 12 63 08 or %o1, 0x308, %o1 <== NOT EXECUTED (void) fflush(stderr); 4000831c: c2 04 e2 c0 ld [ %l3 + 0x2c0 ], %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"); 40008320: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED (void) fflush(stderr); 40008324: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008328: 40 00 39 86 call 40016940 <== NOT EXECUTED 4000832c: b0 06 00 12 add %i0, %l2, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40008330: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40008334: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 40008338: 02 80 00 0f be 40008374 <== NOT EXECUTED 4000833c: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40008340: 22 80 00 08 be,a 40008360 <== NOT EXECUTED 40008344: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40008348: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 4000834c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008350: 40 00 00 18 call 400083b0 <== NOT EXECUTED 40008354: 92 12 60 28 or %o1, 0x28, %o1 <== NOT EXECUTED _exit(local_errno); 40008358: 40 00 02 e8 call 40008ef8 <_exit> <== NOT EXECUTED 4000835c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 40008360: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008364: 40 00 00 13 call 400083b0 <== NOT EXECUTED 40008368: 92 12 60 40 or %o1, 0x40, %o1 <== NOT EXECUTED abort(); 4000836c: 40 00 38 5e call 400164e4 <== NOT EXECUTED 40008370: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 40008374: 81 c7 e0 08 ret <== NOT EXECUTED 40008378: 81 e8 00 00 restore <== NOT EXECUTED 400277d4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400277d4: 9d e3 bf a0 save %sp, -96, %sp 400277d8: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400277dc: 2b 10 01 9b sethi %hi(0x40066c00), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 400277e0: 29 10 01 9b sethi %hi(0x40066c00), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400277e4: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400277e8: aa 15 61 28 or %l5, 0x128, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 400277ec: a8 15 21 18 or %l4, 0x118, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400277f0: a2 10 20 00 clr %l1 400277f4: a0 10 20 00 clr %l0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400277f8: c2 06 20 04 ld [ %i0 + 4 ], %g1 400277fc: 82 00 7f ff add %g1, -1, %g1 40027800: 80 a0 60 00 cmp %g1, 0 40027804: 16 80 00 07 bge 40027820 40027808: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002780c: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 40027810: 40 00 79 a4 call 40045ea0 <__srget_r> <== NOT EXECUTED 40027814: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40027818: 10 80 00 06 b 40027830 <== NOT EXECUTED 4002781c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40027820: c2 06 00 00 ld [ %i0 ], %g1 40027824: 84 00 60 01 add %g1, 1, %g2 40027828: e4 08 40 00 ldub [ %g1 ], %l2 4002782c: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') 40027830: 80 a4 a0 3a cmp %l2, 0x3a 40027834: 02 80 00 22 be 400278bc 40027838: 80 a4 60 00 cmp %l1, 0 break; if (sign == 0) { 4002783c: 32 80 00 09 bne,a 40027860 40027840: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 40027844: 80 a4 a0 2d cmp %l2, 0x2d 40027848: 12 80 00 05 bne 4002785c 4002784c: a2 10 20 01 mov 1, %l1 sign = -1; limit++; 40027850: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 40027854: 10 bf ff e9 b 400277f8 <== NOT EXECUTED 40027858: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 4002785c: c2 05 00 00 ld [ %l4 ], %g1 40027860: 82 00 40 12 add %g1, %l2, %g1 40027864: c2 08 60 01 ldub [ %g1 + 1 ], %g1 40027868: 80 88 60 04 btst 4, %g1 4002786c: 02 80 00 1c be 400278dc 40027870: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 40027874: 40 00 c5 22 call 40058cfc <.udiv> 40027878: 92 10 20 0a mov 0xa, %o1 4002787c: 80 a4 00 08 cmp %l0, %o0 40027880: 18 80 00 17 bgu 400278dc 40027884: 01 00 00 00 nop 40027888: 12 80 00 08 bne 400278a8 4002788c: a4 04 bf d0 add %l2, -48, %l2 40027890: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40027894: 40 00 c5 c6 call 40058fac <.urem> <== NOT EXECUTED 40027898: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4002789c: 80 a4 80 08 cmp %l2, %o0 <== NOT EXECUTED 400278a0: 18 80 00 0f bgu 400278dc <== NOT EXECUTED 400278a4: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 400278a8: 83 2c 20 03 sll %l0, 3, %g1 400278ac: a1 2c 20 01 sll %l0, 1, %l0 400278b0: a0 04 00 01 add %l0, %g1, %l0 400278b4: 10 bf ff d1 b 400277f8 400278b8: a0 04 80 10 add %l2, %l0, %l0 } if (sign == 0) 400278bc: 02 80 00 08 be 400278dc 400278c0: 90 10 00 11 mov %l1, %o0 return 0; *val = i * sign; 400278c4: 92 10 00 10 mov %l0, %o1 400278c8: 7f ff 6e 4a call 400031f0 <.umul> 400278cc: b0 10 20 01 mov 1, %i0 400278d0: d0 26 40 00 st %o0, [ %i1 ] return 1; 400278d4: 81 c7 e0 08 ret 400278d8: 81 e8 00 00 restore } 400278dc: 81 c7 e0 08 ret <== NOT EXECUTED 400278e0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400278e4 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 400278e4: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 400278e8: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 400278ec: 21 10 01 9b sethi %hi(0x40066c00), %l0 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 400278f0: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 400278f4: a0 14 21 28 or %l0, 0x128, %l0 400278f8: c2 06 20 04 ld [ %i0 + 4 ], %g1 400278fc: 82 00 7f ff add %g1, -1, %g1 40027900: 80 a0 60 00 cmp %g1, 0 40027904: 16 80 00 07 bge 40027920 40027908: c2 26 20 04 st %g1, [ %i0 + 4 ] 4002790c: d0 04 00 00 ld [ %l0 ], %o0 40027910: 40 00 79 64 call 40045ea0 <__srget_r> 40027914: 92 10 00 18 mov %i0, %o1 if (c == ':') { 40027918: 10 80 00 07 b 40027934 4002791c: 80 a2 20 3a cmp %o0, 0x3a { int c; *name = *bufp; for (;;) { c = getc(fp); 40027920: c2 06 00 00 ld [ %i0 ], %g1 40027924: 84 00 60 01 add %g1, 1, %g2 40027928: d0 08 40 00 ldub [ %g1 ], %o0 4002792c: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') { 40027930: 80 a2 20 3a cmp %o0, 0x3a 40027934: 12 80 00 07 bne 40027950 40027938: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 4002793c: 80 a7 20 00 cmp %i4, 0 40027940: 22 80 00 1a be,a 400279a8 40027944: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40027948: 81 c7 e0 08 ret <== NOT EXECUTED 4002794c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 40027950: 12 80 00 07 bne 4002796c 40027954: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) 40027958: 80 a7 20 00 cmp %i4, 0 4002795c: 32 80 00 13 bne,a 400279a8 40027960: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40027964: 81 c7 e0 08 ret <== NOT EXECUTED 40027968: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 4002796c: 22 80 00 17 be,a 400279c8 40027970: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 40027974: c2 06 c0 00 ld [ %i3 ], %g1 40027978: 80 a0 60 01 cmp %g1, 1 4002797c: 28 80 00 13 bleu,a 400279c8 40027980: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 40027984: c2 06 80 00 ld [ %i2 ], %g1 40027988: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 4002798c: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 40027990: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40027994: 84 00 a0 01 inc %g2 --(*nleft); 40027998: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002799c: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); } 400279a0: 10 bf ff d6 b 400278f8 400279a4: c2 26 c0 00 st %g1, [ %i3 ] **bufp = '\0'; 400279a8: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 400279ac: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 400279b0: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 400279b4: 84 00 a0 01 inc %g2 --(*nleft); 400279b8: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 400279bc: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 400279c0: c2 26 c0 00 st %g1, [ %i3 ] 400279c4: b0 10 20 01 mov 1, %i0 return 1; } 400279c8: 81 c7 e0 08 ret 400279cc: 81 e8 00 00 restore 400279d0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400279d0: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400279d4: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400279d8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 400279dc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400279e0: a2 07 a0 4c add %fp, 0x4c, %l1 400279e4: a0 07 a0 50 add %fp, 0x50, %l0 400279e8: 90 10 00 18 mov %i0, %o0 400279ec: 92 10 00 19 mov %i1, %o1 400279f0: 94 10 00 11 mov %l1, %o2 400279f4: 7f ff ff bc call 400278e4 400279f8: 96 10 00 10 mov %l0, %o3 400279fc: 80 a2 20 00 cmp %o0, 0 40027a00: 02 80 00 41 be 40027b04 40027a04: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 40027a08: 92 06 60 04 add %i1, 4, %o1 40027a0c: 94 10 00 11 mov %l1, %o2 40027a10: 96 10 00 10 mov %l0, %o3 40027a14: 7f ff ff b4 call 400278e4 40027a18: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027a1c: 80 a2 20 00 cmp %o0, 0 40027a20: 02 80 00 39 be 40027b04 40027a24: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 40027a28: 7f ff ff 6b call 400277d4 40027a2c: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027a30: 80 a2 20 00 cmp %o0, 0 40027a34: 02 80 00 34 be 40027b04 40027a38: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 40027a3c: 94 10 00 11 mov %l1, %o2 40027a40: 96 10 00 10 mov %l0, %o3 40027a44: 92 07 bf f8 add %fp, -8, %o1 40027a48: 7f ff ff a7 call 400278e4 40027a4c: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027a50: 80 a2 20 00 cmp %o0, 0 40027a54: 02 80 00 2c be 40027b04 40027a58: c2 07 bf fc ld [ %fp + -4 ], %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027a5c: 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; 40027a60: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027a64: 84 10 00 03 mov %g3, %g2 40027a68: 10 80 00 05 b 40027a7c 40027a6c: 82 10 20 01 mov 1, %g1 if(*cp == ',') memcount++; 40027a70: 88 19 20 2c xor %g4, 0x2c, %g4 40027a74: 80 a0 00 04 cmp %g0, %g4 40027a78: 82 60 7f ff subx %g1, -1, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027a7c: c8 48 80 00 ldsb [ %g2 ], %g4 40027a80: 80 a1 20 00 cmp %g4, 0 40027a84: 12 bf ff fb bne 40027a70 40027a88: 84 00 a0 01 inc %g2 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 40027a8c: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 40027a90: 83 28 60 02 sll %g1, 2, %g1 40027a94: 82 00 60 13 add %g1, 0x13, %g1 40027a98: 80 a0 80 01 cmp %g2, %g1 40027a9c: 0a 80 00 1a bcs 40027b04 40027aa0: 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; 40027aa4: 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); 40027aa8: 82 00 60 0f add %g1, 0xf, %g1 40027aac: 82 08 7f f0 and %g1, -16, %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40027ab0: 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); 40027ab4: c2 26 60 0c st %g1, [ %i1 + 0xc ] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40027ab8: 10 80 00 09 b 40027adc 40027abc: c2 07 bf f8 ld [ %fp + -8 ], %g1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 40027ac0: 32 80 00 08 bne,a 40027ae0 40027ac4: 82 00 60 01 inc %g1 *cp = '\0'; 40027ac8: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 40027acc: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 40027ad0: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 40027ad4: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40027ad8: c2 21 00 03 st %g1, [ %g4 + %g3 ] <== NOT EXECUTED 40027adc: 82 00 60 01 inc %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027ae0: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 40027ae4: 80 a0 e0 00 cmp %g3, 0 40027ae8: 32 bf ff f6 bne,a 40027ac0 40027aec: 80 a0 e0 2c cmp %g3, 0x2c if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40027af0: c2 06 60 0c ld [ %i1 + 0xc ], %g1 40027af4: 85 28 a0 02 sll %g2, 2, %g2 40027af8: c0 20 40 02 clr [ %g1 + %g2 ] return 1; 40027afc: 81 c7 e0 08 ret 40027b00: 91 e8 20 01 restore %g0, 1, %o0 } 40027b04: 81 c7 e0 08 ret <== NOT EXECUTED 40027b08: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40027b54 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40027b54: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027b58: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40027b5c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40027b60: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027b64: a2 07 a0 4c add %fp, 0x4c, %l1 40027b68: a0 07 a0 50 add %fp, 0x50, %l0 40027b6c: 90 10 00 18 mov %i0, %o0 40027b70: 92 10 00 19 mov %i1, %o1 40027b74: 94 10 00 11 mov %l1, %o2 40027b78: 7f ff ff 5b call 400278e4 40027b7c: 96 10 00 10 mov %l0, %o3 40027b80: 80 a2 20 00 cmp %o0, 0 40027b84: 02 80 00 39 be 40027c68 40027b88: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 40027b8c: 92 06 60 04 add %i1, 4, %o1 40027b90: 94 10 00 11 mov %l1, %o2 40027b94: 96 10 00 10 mov %l0, %o3 40027b98: 7f ff ff 53 call 400278e4 40027b9c: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027ba0: 80 a2 20 00 cmp %o0, 0 40027ba4: 02 80 00 31 be 40027c68 40027ba8: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 40027bac: 7f ff ff 0a call 400277d4 40027bb0: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027bb4: 80 a2 20 00 cmp %o0, 0 40027bb8: 02 80 00 2c be 40027c68 40027bbc: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 40027bc0: 7f ff ff 05 call 400277d4 40027bc4: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027bc8: 80 a2 20 00 cmp %o0, 0 40027bcc: 02 80 00 27 be 40027c68 40027bd0: 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) 40027bd4: 92 06 60 0c add %i1, 0xc, %o1 40027bd8: 94 10 00 11 mov %l1, %o2 40027bdc: 96 10 00 10 mov %l0, %o3 40027be0: 7f ff ff 41 call 400278e4 40027be4: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027be8: 80 a2 20 00 cmp %o0, 0 40027bec: 02 80 00 1f be 40027c68 40027bf0: 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) 40027bf4: 92 06 60 10 add %i1, 0x10, %o1 40027bf8: 94 10 00 11 mov %l1, %o2 40027bfc: 96 10 00 10 mov %l0, %o3 40027c00: 7f ff ff 39 call 400278e4 40027c04: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027c08: 80 a2 20 00 cmp %o0, 0 40027c0c: 02 80 00 17 be 40027c68 40027c10: 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) 40027c14: 92 06 60 14 add %i1, 0x14, %o1 40027c18: 94 10 00 11 mov %l1, %o2 40027c1c: 96 10 00 10 mov %l0, %o3 40027c20: 7f ff ff 31 call 400278e4 40027c24: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027c28: 80 a2 20 00 cmp %o0, 0 40027c2c: 02 80 00 0f be 40027c68 40027c30: 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)) 40027c34: 94 10 00 11 mov %l1, %o2 40027c38: 96 10 00 10 mov %l0, %o3 40027c3c: 92 06 60 18 add %i1, 0x18, %o1 40027c40: 7f ff ff 29 call 400278e4 40027c44: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027c48: 80 a2 20 00 cmp %o0, 0 40027c4c: 02 80 00 07 be 40027c68 40027c50: 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; 40027c54: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 40027c58: c2 07 bf f8 ld [ %fp + -8 ], %g1 40027c5c: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 40027c60: 81 c7 e0 08 ret 40027c64: 91 e8 20 01 restore %g0, 1, %o0 } 40027c68: 81 c7 e0 08 ret <== NOT EXECUTED 40027c6c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40027760 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40027760: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40027764: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 400664f8 <== NOT EXECUTED 40027768: d0 30 60 32 sth %o0, [ %g1 + 0x32 ] <== NOT EXECUTED return 0; } 4002776c: 81 c3 e0 08 retl <== NOT EXECUTED 40027770: 90 10 20 00 clr %o0 <== NOT EXECUTED 40027d90 : return NULL; return &grent; } void setgrent(void) { 40027d90: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 40027d94: 7f ff ff c9 call 40027cb8 <== NOT EXECUTED 40027d98: 01 00 00 00 nop <== NOT EXECUTED if (group_fp != NULL) 40027d9c: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 40027da0: d0 00 60 74 ld [ %g1 + 0x74 ], %o0 ! 4006a074 <== NOT EXECUTED 40027da4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027da8: 22 80 00 05 be,a 40027dbc <== NOT EXECUTED 40027dac: 11 10 01 6e sethi %hi(0x4005b800), %o0 <== NOT EXECUTED fclose(group_fp); 40027db0: 40 00 62 c4 call 400408c0 <== NOT EXECUTED 40027db4: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 40027db8: 11 10 01 6e sethi %hi(0x4005b800), %o0 <== NOT EXECUTED 40027dbc: 13 10 01 97 sethi %hi(0x40065c00), %o1 <== NOT EXECUTED 40027dc0: 90 12 21 f8 or %o0, 0x1f8, %o0 <== NOT EXECUTED 40027dc4: 40 00 65 0e call 400411fc <== NOT EXECUTED 40027dc8: 92 12 60 e8 or %o1, 0xe8, %o1 <== NOT EXECUTED 40027dcc: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 40027dd0: d0 20 60 74 st %o0, [ %g1 + 0x74 ] ! 4006a074 <== NOT EXECUTED } 40027dd4: 81 c7 e0 08 ret <== NOT EXECUTED 40027dd8: 81 e8 00 00 restore <== NOT EXECUTED 40027f84 : return NULL; return &pwent; } void setpwent(void) { 40027f84: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 40027f88: 7f ff ff 4c call 40027cb8 <== NOT EXECUTED 40027f8c: 01 00 00 00 nop <== NOT EXECUTED if (passwd_fp != NULL) 40027f90: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027f94: d0 00 63 8c ld [ %g1 + 0x38c ], %o0 ! 40069f8c <== NOT EXECUTED 40027f98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027f9c: 22 80 00 05 be,a 40027fb0 <== NOT EXECUTED 40027fa0: 11 10 01 6e sethi %hi(0x4005b800), %o0 <== NOT EXECUTED fclose(passwd_fp); 40027fa4: 40 00 62 47 call 400408c0 <== NOT EXECUTED 40027fa8: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 40027fac: 11 10 01 6e sethi %hi(0x4005b800), %o0 <== NOT EXECUTED 40027fb0: 13 10 01 97 sethi %hi(0x40065c00), %o1 <== NOT EXECUTED 40027fb4: 90 12 21 40 or %o0, 0x140, %o0 <== NOT EXECUTED 40027fb8: 40 00 64 91 call 400411fc <== NOT EXECUTED 40027fbc: 92 12 60 e8 or %o1, 0xe8, %o1 <== NOT EXECUTED 40027fc0: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027fc4: d0 20 63 8c st %o0, [ %g1 + 0x38c ] ! 40069f8c <== NOT EXECUTED } 40027fc8: 81 c7 e0 08 ret <== NOT EXECUTED 40027fcc: 81 e8 00 00 restore <== NOT EXECUTED 40007d58 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40007d58: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40007d5c: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 400664f8 <== NOT EXECUTED 40007d60: d0 30 60 30 sth %o0, [ %g1 + 0x30 ] <== NOT EXECUTED return 0; } 40007d64: 81 c3 e0 08 retl <== NOT EXECUTED 40007d68: 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 40009390 : int _STAT_NAME( const char *path, struct stat *buf ) { 40009390: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40009394: 80 a6 60 00 cmp %i1, 0 40009398: 12 80 00 06 bne 400093b0 4000939c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 400093a0: 40 00 dc f0 call 40040760 <__errno> 400093a4: b0 10 3f ff mov -1, %i0 ! ffffffff 400093a8: 10 80 00 20 b 40009428 400093ac: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, strlen( path ), 400093b0: 40 00 f8 2b call 4004745c 400093b4: 90 10 00 18 mov %i0, %o0 400093b8: a0 07 bf ec add %fp, -20, %l0 400093bc: 92 10 00 08 mov %o0, %o1 400093c0: 94 10 20 00 clr %o2 400093c4: 90 10 00 18 mov %i0, %o0 400093c8: 96 10 00 10 mov %l0, %o3 400093cc: 98 10 20 01 mov 1, %o4 400093d0: 7f ff f9 e8 call 40007b70 400093d4: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 400093d8: 80 a2 20 00 cmp %o0, 0 400093dc: 12 80 00 14 bne 4000942c 400093e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 400093e4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 400093e8: 80 a0 60 00 cmp %g1, 0 400093ec: 12 80 00 12 bne 40009434 400093f0: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 400093f4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400093f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400093fc: 02 80 00 08 be 4000941c <== NOT EXECUTED 40009400: 01 00 00 00 nop <== NOT EXECUTED 40009404: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40009408: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000940c: 02 80 00 04 be 4000941c <== NOT EXECUTED 40009410: 01 00 00 00 nop <== NOT EXECUTED 40009414: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009418: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000941c: 40 00 dc d1 call 40040760 <__errno> <== NOT EXECUTED 40009420: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009424: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009428: c2 22 00 00 st %g1, [ %o0 ] 4000942c: 81 c7 e0 08 ret 40009430: 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) ); 40009434: 94 10 20 48 mov 0x48, %o2 40009438: 40 00 ea 30 call 40043cf8 4000943c: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 40009440: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009444: 92 10 00 19 mov %i1, %o1 40009448: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4000944c: 9f c0 40 00 call %g1 40009450: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40009454: c2 07 bf f8 ld [ %fp + -8 ], %g1 40009458: 80 a0 60 00 cmp %g1, 0 4000945c: 02 bf ff f4 be 4000942c 40009460: b0 10 00 08 mov %o0, %i0 40009464: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009468: 80 a0 60 00 cmp %g1, 0 4000946c: 02 80 00 04 be 4000947c 40009470: 01 00 00 00 nop 40009474: 9f c0 40 00 call %g1 40009478: 90 10 00 10 mov %l0, %o0 return status; } 4000947c: 81 c7 e0 08 ret 40009480: 81 e8 00 00 restore 40028d14 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 40028d14: 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 ) ) 40028d18: 40 00 79 d1 call 4004745c <== NOT EXECUTED 40028d1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028d20: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40028d24: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40028d28: 94 10 20 00 clr %o2 <== NOT EXECUTED 40028d2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028d30: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40028d34: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40028d38: 7f ff 7b 8e call 40007b70 <== NOT EXECUTED 40028d3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028d40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028d44: 12 80 00 0b bne 40028d70 <== NOT EXECUTED 40028d48: 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; 40028d4c: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 <== NOT EXECUTED 40028d50: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 40028d54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028d58: 12 80 00 08 bne 40028d78 <== NOT EXECUTED 40028d5c: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028d60: 40 00 5e 80 call 40040760 <__errno> <== NOT EXECUTED 40028d64: 01 00 00 00 nop <== NOT EXECUTED 40028d68: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40028d6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028d70: 81 c7 e0 08 ret <== NOT EXECUTED 40028d74: 81 e8 00 00 restore <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 40028d78: 94 10 20 38 mov 0x38, %o2 <== NOT EXECUTED 40028d7c: 40 00 6b df call 40043cf8 <== NOT EXECUTED 40028d80: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 40028d84: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 <== NOT EXECUTED 40028d88: 90 04 60 1c add %l1, 0x1c, %o0 <== NOT EXECUTED 40028d8c: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 40028d90: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028d94: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40028d98: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40028d9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028da0: 02 bf ff f4 be 40028d70 <== NOT EXECUTED 40028da4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40028da8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028dac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028db0: 02 80 00 04 be 40028dc0 <== NOT EXECUTED 40028db4: 01 00 00 00 nop <== NOT EXECUTED 40028db8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028dbc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 40028dc0: 81 c7 e0 08 ret <== NOT EXECUTED 40028dc4: 81 e8 00 00 restore <== NOT EXECUTED 40028dc8 : int symlink( const char *actualpath, const char *sympath ) { 40028dc8: 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 ); 40028dcc: c2 4e 40 00 ldsb [ %i1 ], %g1 40028dd0: 80 a0 60 5c cmp %g1, 0x5c 40028dd4: 02 80 00 07 be 40028df0 40028dd8: a0 10 00 18 mov %i0, %l0 40028ddc: 80 a0 60 2f cmp %g1, 0x2f 40028de0: 02 80 00 04 be 40028df0 40028de4: 80 a0 60 00 cmp %g1, 0 40028de8: 12 80 00 0a bne 40028e10 40028dec: 03 10 01 99 sethi %hi(0x40066400), %g1 40028df0: 03 10 01 99 sethi %hi(0x40066400), %g1 40028df4: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 ! 400664f8 40028df8: 90 07 bf e8 add %fp, -24, %o0 40028dfc: 92 02 60 18 add %o1, 0x18, %o1 40028e00: 40 00 6b 2b call 40043aac 40028e04: 94 10 20 14 mov 0x14, %o2 40028e08: 10 80 00 08 b 40028e28 40028e0c: 90 10 20 01 mov 1, %o0 40028e10: d2 00 60 f8 ld [ %g1 + 0xf8 ], %o1 40028e14: 90 07 bf e8 add %fp, -24, %o0 40028e18: 92 02 60 04 add %o1, 4, %o1 40028e1c: 40 00 6b 24 call 40043aac 40028e20: 94 10 20 14 mov 0x14, %o2 40028e24: 90 10 20 00 clr %o0 if ( !loc.ops->evalformake_h ) { 40028e28: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028e2c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40028e30: 80 a0 60 00 cmp %g1, 0 40028e34: 02 80 00 14 be 40028e84 40028e38: 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 ); 40028e3c: 94 07 bf fc add %fp, -4, %o2 40028e40: b2 07 bf e8 add %fp, -24, %i1 if ( result != 0 ) 40028e44: 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 ); 40028e48: 9f c0 40 00 call %g1 40028e4c: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) 40028e50: 80 a2 20 00 cmp %o0, 0 40028e54: 12 80 00 10 bne 40028e94 40028e58: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 40028e5c: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 40028e60: 80 a0 60 00 cmp %g1, 0 40028e64: 12 80 00 0e bne 40028e9c 40028e68: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &loc ); 40028e6c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40028e70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028e74: 02 80 00 04 be 40028e84 <== NOT EXECUTED 40028e78: 01 00 00 00 nop <== NOT EXECUTED 40028e7c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028e80: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028e84: 40 00 5e 37 call 40040760 <__errno> <== NOT EXECUTED 40028e88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028e8c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028e90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028e94: 81 c7 e0 08 ret 40028e98: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40028e9c: 92 10 00 10 mov %l0, %o1 40028ea0: 9f c0 40 00 call %g1 40028ea4: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 40028ea8: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028eac: 80 a0 60 00 cmp %g1, 0 40028eb0: 02 bf ff f9 be 40028e94 40028eb4: b0 10 00 08 mov %o0, %i0 40028eb8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028ebc: 80 a0 60 00 cmp %g1, 0 40028ec0: 02 80 00 04 be 40028ed0 40028ec4: 01 00 00 00 nop 40028ec8: 9f c0 40 00 call %g1 40028ecc: 90 10 00 19 mov %i1, %o0 return result; } 40028ed0: 81 c7 e0 08 ret 40028ed4: 81 e8 00 00 restore 40012d04 : int tcsetattr( int fd, int opt, struct termios *tp ) { 40012d04: 9d e3 bf a0 save %sp, -96, %sp switch (opt) { 40012d08: 80 a6 60 00 cmp %i1, 0 40012d0c: 02 80 00 10 be 40012d4c 40012d10: 80 a6 60 01 cmp %i1, 1 40012d14: 02 80 00 08 be 40012d34 <== NOT EXECUTED 40012d18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40012d1c: 40 00 14 c0 call 4001801c <__errno> <== NOT EXECUTED 40012d20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40012d24: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40012d28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012d2c: 81 c7 e0 08 ret <== NOT EXECUTED 40012d30: 81 e8 00 00 restore <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 40012d34: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40012d38: 40 00 0e 77 call 40016714 <== NOT EXECUTED 40012d3c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40012d40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012d44: 26 80 00 04 bl,a 40012d54 <== NOT EXECUTED 40012d48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40012d4c: 40 00 0e 72 call 40016714 40012d50: 93 e8 20 02 restore %g0, 2, %o1 } } 40012d54: 81 c7 e0 08 ret <== NOT EXECUTED 40012d58: 81 e8 00 00 restore <== NOT EXECUTED 4000edbc : #include int unlink( const char *path ) { 4000edbc: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4000edc0: 7f ff d0 5a call 40002f28 4000edc4: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 4000edc8: a6 92 20 00 orcc %o0, 0, %l3 4000edcc: 32 80 00 17 bne,a 4000ee28 4000edd0: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4000edd4: c2 4e 00 00 ldsb [ %i0 ], %g1 4000edd8: 80 a0 60 5c cmp %g1, 0x5c 4000eddc: 02 80 00 06 be 4000edf4 4000ede0: 80 a0 60 2f cmp %g1, 0x2f 4000ede4: 02 80 00 04 be 4000edf4 4000ede8: 80 a0 60 00 cmp %g1, 0 4000edec: 12 80 00 07 bne 4000ee08 <== NOT EXECUTED 4000edf0: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 4000edf4: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000edf8: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 4001d028 4000edfc: 90 07 bf ec add %fp, -20, %o0 4000ee00: 10 80 00 05 b 4000ee14 4000ee04: 92 02 60 18 add %o1, 0x18, %o1 4000ee08: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 <== NOT EXECUTED 4000ee0c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 4000ee10: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 4000ee14: 94 10 20 14 mov 0x14, %o2 4000ee18: 40 00 04 6c call 4000ffc8 4000ee1c: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ee20: 10 80 00 0b b 4000ee4c 4000ee24: 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, 4000ee28: 92 10 00 13 mov %l3, %o1 4000ee2c: 94 10 20 02 mov 2, %o2 4000ee30: 96 07 bf ec add %fp, -20, %o3 4000ee34: 7f ff d0 8b call 40003060 4000ee38: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4000ee3c: 80 a2 20 00 cmp %o0, 0 4000ee40: 12 80 00 82 bne 4000f048 4000ee44: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ee48: 94 10 20 14 mov 0x14, %o2 4000ee4c: a0 07 bf d8 add %fp, -40, %l0 4000ee50: a4 07 bf ec add %fp, -20, %l2 4000ee54: 90 10 00 10 mov %l0, %o0 4000ee58: 40 00 04 5c call 4000ffc8 4000ee5c: 92 10 00 12 mov %l2, %o1 name = path + parentpathlen; 4000ee60: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000ee64: 40 00 05 d5 call 400105b8 4000ee68: 90 10 00 18 mov %i0, %o0 4000ee6c: 92 10 00 08 mov %o0, %o1 4000ee70: 7f ff d0 1c call 40002ee0 4000ee74: 90 10 00 18 mov %i0, %o0 4000ee78: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000ee7c: 40 00 05 cf call 400105b8 4000ee80: 90 10 00 18 mov %i0, %o0 4000ee84: 94 10 20 00 clr %o2 4000ee88: 92 10 00 08 mov %o0, %o1 4000ee8c: 96 10 00 10 mov %l0, %o3 4000ee90: 90 10 00 18 mov %i0, %o0 4000ee94: 7f ff d0 37 call 40002f70 4000ee98: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000ee9c: 80 a2 20 00 cmp %o0, 0 4000eea0: 02 80 00 11 be 4000eee4 4000eea4: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 4000eea8: 80 8c 60 ff btst 0xff, %l1 4000eeac: 02 80 00 0c be 4000eedc 4000eeb0: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 4000eeb4: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000eeb8: 80 a0 60 00 cmp %g1, 0 4000eebc: 02 80 00 64 be 4000f04c 4000eec0: 01 00 00 00 nop 4000eec4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000eec8: 80 a0 60 00 cmp %g1, 0 4000eecc: 02 80 00 04 be 4000eedc 4000eed0: 90 10 00 12 mov %l2, %o0 4000eed4: 9f c0 40 00 call %g1 4000eed8: 01 00 00 00 nop 4000eedc: 81 c7 e0 08 ret 4000eee0: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 4000eee4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000eee8: 80 a0 60 00 cmp %g1, 0 4000eeec: 22 80 00 26 be,a 4000ef84 4000eef0: 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 ) { 4000eef4: 9f c0 40 00 call %g1 4000eef8: 90 10 00 10 mov %l0, %o0 4000eefc: 80 a2 20 01 cmp %o0, 1 4000ef00: 12 80 00 1c bne 4000ef70 4000ef04: c4 07 bf e4 ld [ %fp + -28 ], %g2 rtems_filesystem_freenode( &loc ); 4000ef08: 80 a0 a0 00 cmp %g2, 0 4000ef0c: 02 80 00 09 be 4000ef30 4000ef10: 80 8c 60 ff btst 0xff, %l1 4000ef14: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000ef18: 80 a0 60 00 cmp %g1, 0 4000ef1c: 02 80 00 05 be 4000ef30 4000ef20: 80 8c 60 ff btst 0xff, %l1 4000ef24: 9f c0 40 00 call %g1 4000ef28: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000ef2c: 80 8c 60 ff btst 0xff, %l1 4000ef30: 02 80 00 0c be 4000ef60 4000ef34: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 4000ef38: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000ef3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef40: 02 80 00 08 be 4000ef60 <== NOT EXECUTED 4000ef44: 01 00 00 00 nop <== NOT EXECUTED 4000ef48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000ef4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef50: 02 80 00 04 be 4000ef60 <== NOT EXECUTED 4000ef54: 01 00 00 00 nop <== NOT EXECUTED 4000ef58: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ef5c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4000ef60: 40 00 01 df call 4000f6dc <__errno> 4000ef64: b0 10 3f ff mov -1, %i0 4000ef68: 10 80 00 1b b 4000efd4 4000ef6c: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 4000ef70: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000ef74: 80 a0 60 00 cmp %g1, 0 4000ef78: 12 80 00 1a bne 4000efe0 4000ef7c: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 4000ef80: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000ef84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef88: 02 80 00 05 be 4000ef9c <== NOT EXECUTED 4000ef8c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000ef90: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ef94: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 4000ef98: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000ef9c: 02 80 00 0b be 4000efc8 <== NOT EXECUTED 4000efa0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4000efa4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000efa8: 02 80 00 08 be 4000efc8 <== NOT EXECUTED 4000efac: 01 00 00 00 nop <== NOT EXECUTED 4000efb0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000efb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000efb8: 02 80 00 04 be 4000efc8 <== NOT EXECUTED 4000efbc: 01 00 00 00 nop <== NOT EXECUTED 4000efc0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000efc4: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000efc8: 40 00 01 c5 call 4000f6dc <__errno> <== NOT EXECUTED 4000efcc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000efd0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000efd4: c2 22 00 00 st %g1, [ %o0 ] 4000efd8: 81 c7 e0 08 ret 4000efdc: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4000efe0: 9f c0 40 00 call %g1 4000efe4: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 4000efe8: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000efec: 80 a0 60 00 cmp %g1, 0 4000eff0: 02 80 00 08 be 4000f010 4000eff4: b0 10 00 08 mov %o0, %i0 4000eff8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000effc: 80 a0 60 00 cmp %g1, 0 4000f000: 02 80 00 05 be 4000f014 4000f004: 80 8c 60 ff btst 0xff, %l1 4000f008: 9f c0 40 00 call %g1 4000f00c: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000f010: 80 8c 60 ff btst 0xff, %l1 4000f014: 02 bf ff b2 be 4000eedc 4000f018: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000f01c: 80 a0 60 00 cmp %g1, 0 4000f020: 02 80 00 0b be 4000f04c 4000f024: 01 00 00 00 nop 4000f028: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000f02c: 80 a0 60 00 cmp %g1, 0 4000f030: 02 80 00 07 be 4000f04c 4000f034: 01 00 00 00 nop 4000f038: 9f c0 40 00 call %g1 4000f03c: 90 07 bf ec add %fp, -20, %o0 4000f040: 81 c7 e0 08 ret 4000f044: 81 e8 00 00 restore 4000f048: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 4000f04c: 81 c7 e0 08 ret <== NOT EXECUTED 4000f050: 81 e8 00 00 restore <== NOT EXECUTED 4000b550 : */ int unmount( const char *path ) { 4000b550: 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 ) ) 4000b554: 40 00 ef c2 call 4004745c 4000b558: 90 10 00 18 mov %i0, %o0 4000b55c: a0 07 bf ec add %fp, -20, %l0 4000b560: 92 10 00 08 mov %o0, %o1 4000b564: 94 10 20 00 clr %o2 4000b568: 90 10 00 18 mov %i0, %o0 4000b56c: 96 10 00 10 mov %l0, %o3 4000b570: 7f ff f1 80 call 40007b70 4000b574: 98 10 20 01 mov 1, %o4 4000b578: 80 a2 20 00 cmp %o0, 0 4000b57c: 12 80 00 6a bne 4000b724 4000b580: 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; 4000b584: c4 07 bf ec ld [ %fp + -20 ], %g2 4000b588: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 4000b58c: 80 a0 c0 02 cmp %g3, %g2 4000b590: 02 80 00 0f be 4000b5cc 4000b594: 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 ); 4000b598: 80 a0 60 00 cmp %g1, 0 4000b59c: 02 80 00 08 be 4000b5bc 4000b5a0: 01 00 00 00 nop 4000b5a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b5a8: 80 a0 60 00 cmp %g1, 0 4000b5ac: 02 80 00 04 be 4000b5bc 4000b5b0: 01 00 00 00 nop 4000b5b4: 9f c0 40 00 call %g1 4000b5b8: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4000b5bc: 40 00 d4 69 call 40040760 <__errno> 4000b5c0: 01 00 00 00 nop 4000b5c4: 10 80 00 21 b 4000b648 4000b5c8: 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 ); 4000b5cc: 80 a0 60 00 cmp %g1, 0 4000b5d0: 22 80 00 09 be,a 4000b5f4 4000b5d4: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b5d8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b5dc: 80 a0 60 00 cmp %g1, 0 4000b5e0: 22 80 00 05 be,a 4000b5f4 4000b5e4: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b5e8: 9f c0 40 00 call %g1 4000b5ec: 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; 4000b5f0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b5f4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b5f8: 80 a0 60 00 cmp %g1, 0 4000b5fc: 02 80 00 07 be 4000b618 4000b600: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 4000b604: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000b608: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000b60c: 80 a0 60 00 cmp %g1, 0 4000b610: 32 80 00 06 bne,a 4000b628 4000b614: 03 10 01 99 sethi %hi(0x40066400), %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 ); 4000b618: 40 00 d4 52 call 40040760 <__errno> <== NOT EXECUTED 4000b61c: 01 00 00 00 nop <== NOT EXECUTED 4000b620: 10 80 00 0a b 4000b648 <== NOT EXECUTED 4000b624: 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 ) 4000b628: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 4000b62c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000b630: 80 a0 40 11 cmp %g1, %l1 4000b634: 12 80 00 08 bne 4000b654 4000b638: 03 10 01 a9 sethi %hi(0x4006a400), %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 4000b63c: 40 00 d4 49 call 40040760 <__errno> 4000b640: 01 00 00 00 nop 4000b644: 82 10 20 10 mov 0x10, %g1 ! 10 4000b648: c2 22 00 00 st %g1, [ %o0 ] 4000b64c: 81 c7 e0 08 ret 4000b650: 91 e8 3f ff restore %g0, -1, %o0 4000b654: 05 10 01 a9 sethi %hi(0x4006a400), %g2 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000b658: c2 00 60 00 ld [ %g1 ], %g1 4000b65c: 10 80 00 07 b 4000b678 4000b660: 84 10 a0 04 or %g2, 4, %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; 4000b664: c6 04 60 2c ld [ %l1 + 0x2c ], %g3 4000b668: 80 a1 00 03 cmp %g4, %g3 4000b66c: 02 bf ff f4 be 4000b63c 4000b670: 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 ) { 4000b674: c2 00 40 00 ld [ %g1 ], %g1 4000b678: 80 a0 40 02 cmp %g1, %g2 4000b67c: 32 bf ff fa bne,a 4000b664 4000b680: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 4000b684: 30 80 00 2a b,a 4000b72c * 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 ) 4000b688: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b68c: 9f c0 40 00 call %g1 4000b690: 90 10 00 11 mov %l1, %o0 4000b694: 80 a2 20 00 cmp %o0, 0 4000b698: 12 80 00 23 bne 4000b724 4000b69c: 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){ 4000b6a0: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000b6a4: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000b6a8: 9f c0 40 00 call %g1 4000b6ac: 90 10 00 11 mov %l1, %o0 4000b6b0: 80 a2 20 00 cmp %o0, 0 4000b6b4: 02 80 00 0b be 4000b6e0 4000b6b8: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 4000b6bc: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b6c0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 4000b6c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b6c8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b6cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b6d0: 02 80 00 15 be 4000b724 <== NOT EXECUTED 4000b6d4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4000b6d8: 40 00 04 f2 call 4000caa0 <== NOT EXECUTED 4000b6dc: 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 ); 4000b6e0: 40 00 05 d7 call 4000ce3c <_Chain_Extract> 4000b6e4: 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 ); 4000b6e8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b6ec: 80 a0 60 00 cmp %g1, 0 4000b6f0: 02 80 00 09 be 4000b714 4000b6f4: 90 10 00 11 mov %l1, %o0 4000b6f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b6fc: 80 a0 60 00 cmp %g1, 0 4000b700: 02 80 00 05 be 4000b714 4000b704: 01 00 00 00 nop 4000b708: 9f c0 40 00 call %g1 4000b70c: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 4000b710: 90 10 00 11 mov %l1, %o0 4000b714: 7f ff f1 40 call 40007c14 4000b718: b0 10 20 00 clr %i0 return 0; 4000b71c: 81 c7 e0 08 ret 4000b720: 81 e8 00 00 restore } 4000b724: 81 c7 e0 08 ret 4000b728: 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 ) 4000b72c: 7f ff f1 f4 call 40007efc 4000b730: 90 10 00 11 mov %l1, %o0 4000b734: 80 a2 20 01 cmp %o0, 1 4000b738: 32 bf ff d4 bne,a 4000b688 4000b73c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b740: 30 bf ff bf b,a 4000b63c 40028f78 : int utime( const char *path, const struct utimbuf *times ) { 40028f78: 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 ) ) 40028f7c: 40 00 79 38 call 4004745c 40028f80: 90 10 00 18 mov %i0, %o0 40028f84: a0 07 bf ec add %fp, -20, %l0 40028f88: 92 10 00 08 mov %o0, %o1 40028f8c: 94 10 20 00 clr %o2 40028f90: 90 10 00 18 mov %i0, %o0 40028f94: 96 10 00 10 mov %l0, %o3 40028f98: 98 10 20 01 mov 1, %o4 40028f9c: 7f ff 7a f5 call 40007b70 40028fa0: b0 10 3f ff mov -1, %i0 40028fa4: 80 a2 20 00 cmp %o0, 0 40028fa8: 12 80 00 10 bne 40028fe8 40028fac: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 40028fb0: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40028fb4: 80 a0 60 00 cmp %g1, 0 40028fb8: 32 80 00 0e bne,a 40028ff0 40028fbc: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 40028fc0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40028fc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028fc8: 02 80 00 04 be 40028fd8 <== NOT EXECUTED 40028fcc: 01 00 00 00 nop <== NOT EXECUTED 40028fd0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028fd4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028fd8: 40 00 5d e2 call 40040760 <__errno> <== NOT EXECUTED 40028fdc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028fe0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028fe4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028fe8: 81 c7 e0 08 ret 40028fec: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40028ff0: d2 06 40 00 ld [ %i1 ], %o1 40028ff4: 9f c0 40 00 call %g1 40028ff8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 40028ffc: c2 07 bf f8 ld [ %fp + -8 ], %g1 40029000: 80 a0 60 00 cmp %g1, 0 40029004: 02 bf ff f9 be 40028fe8 40029008: b0 10 00 08 mov %o0, %i0 4002900c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40029010: 80 a0 60 00 cmp %g1, 0 40029014: 02 80 00 04 be 40029024 40029018: 01 00 00 00 nop 4002901c: 9f c0 40 00 call %g1 40029020: 90 10 00 10 mov %l0, %o0 return result; } 40029024: 81 c7 e0 08 ret 40029028: 81 e8 00 00 restore 4001b5b4 : ssize_t write( int fd, const void *buffer, size_t count ) { 4001b5b4: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b5b8: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b5bc: c2 00 63 14 ld [ %g1 + 0x314 ], %g1 ! 4001cf14 ssize_t write( int fd, const void *buffer, size_t count ) { 4001b5c0: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b5c4: 80 a6 00 01 cmp %i0, %g1 4001b5c8: 1a 80 00 0c bcc 4001b5f8 4001b5cc: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001b5d0: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b5d4: e0 00 60 a8 ld [ %g1 + 0xa8 ], %l0 ! 4001d8a8 4001b5d8: 83 2e 20 06 sll %i0, 6, %g1 4001b5dc: b1 2e 20 03 sll %i0, 3, %i0 4001b5e0: b0 06 00 01 add %i0, %g1, %i0 4001b5e4: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001b5e8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b5ec: 80 88 61 00 btst 0x100, %g1 4001b5f0: 12 80 00 06 bne 4001b608 4001b5f4: 80 a6 60 00 cmp %i1, 0 4001b5f8: 7f ff d0 39 call 4000f6dc <__errno> <== NOT EXECUTED 4001b5fc: 01 00 00 00 nop <== NOT EXECUTED 4001b600: 10 80 00 14 b 4001b650 <== NOT EXECUTED 4001b604: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 4001b608: 02 80 00 07 be 4001b624 4001b60c: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001b610: 02 80 00 1c be 4001b680 4001b614: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001b618: 80 88 60 04 btst 4, %g1 4001b61c: 32 80 00 06 bne,a 4001b634 4001b620: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b624: 7f ff d0 2e call 4000f6dc <__errno> <== NOT EXECUTED 4001b628: 01 00 00 00 nop <== NOT EXECUTED 4001b62c: 10 80 00 09 b 4001b650 <== NOT EXECUTED 4001b630: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 4001b634: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4001b638: 80 a0 60 00 cmp %g1, 0 4001b63c: 12 80 00 08 bne 4001b65c 4001b640: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b644: 7f ff d0 26 call 4000f6dc <__errno> <== NOT EXECUTED 4001b648: 01 00 00 00 nop <== NOT EXECUTED 4001b64c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001b650: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b654: 10 80 00 0b b 4001b680 <== NOT EXECUTED 4001b658: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 4001b65c: 9f c0 40 00 call %g1 4001b660: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001b664: 80 a2 20 00 cmp %o0, 0 4001b668: 04 80 00 06 ble 4001b680 4001b66c: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 4001b670: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001b674: 86 83 40 08 addcc %o5, %o0, %g3 4001b678: 84 43 00 02 addx %o4, %g2, %g2 4001b67c: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001b680: 81 c7 e0 08 ret 4001b684: 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 86 sethi %hi(0x40021800), %g1 400077c4: c2 00 62 d4 ld [ %g1 + 0x2d4 ], %g1 ! 40021ad4 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 8b sethi %hi(0x40022c00), %g1 400077d8: e4 00 60 3c ld [ %g1 + 0x3c ], %l2 ! 40022c3c 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 29 8e call 40011e34 <__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 29 7d call 40011e34 <__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 29 70 call 40011e34 <__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