4000f744 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4000f744: 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(); 4000f748: 40 00 04 a2 call 400109d0 4000f74c: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000f750: 91 2a 20 10 sll %o0, 0x10, %o0 4000f754: 91 32 20 10 srl %o0, 0x10, %o0 4000f758: 80 a2 20 00 cmp %o0, 0 4000f75c: 22 80 00 0c be,a 4000f78c 4000f760: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] 4000f764: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 4000f768: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000f76c: 22 80 00 08 be,a 4000f78c <== NOT EXECUTED 4000f770: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4000f774: 40 00 16 c8 call 40015294 <__errno> <== NOT EXECUTED 4000f778: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000f77c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000f780: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000f784: 81 c7 e0 08 ret <== NOT EXECUTED 4000f788: 81 e8 00 00 restore <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; 4000f78c: f4 34 20 3a sth %i2, [ %l0 + 0x3a ] IMFS_update_ctime( jnode ); 4000f790: 90 07 bf f8 add %fp, -8, %o0 4000f794: 7f ff d4 5b call 40004900 4000f798: 92 10 20 00 clr %o1 4000f79c: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000f7a0: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000f7a4: 81 c7 e0 08 ret 4000f7a8: 91 e8 20 00 restore %g0, 0, %o0 4000dd40 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000dd40: 9d e3 bf a0 save %sp, -96, %sp 4000dd44: 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 ) 4000dd48: 80 a6 20 00 cmp %i0, 0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000dd4c: 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 ) 4000dd50: 02 80 00 40 be 4000de50 4000dd54: 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 ); 4000dd58: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000dd5c: c2 00 63 f8 ld [ %g1 + 0x3f8 ], %g1 ! 4001cff8 4000dd60: 90 10 00 19 mov %i1, %o0 4000dd64: d4 10 60 2c lduh [ %g1 + 0x2c ], %o2 4000dd68: b6 2e c0 0a andn %i3, %o2, %i3 4000dd6c: 95 2e e0 10 sll %i3, 0x10, %o2 4000dd70: 7f ff ff c8 call 4000dc90 4000dd74: 95 32 a0 10 srl %o2, 0x10, %o2 if ( !node ) 4000dd78: b0 92 20 00 orcc %o0, 0, %i0 4000dd7c: 02 80 00 35 be 4000de50 4000dd80: b2 06 7f ff add %i1, -1, %i1 return NULL; /* * Set the type specific information */ switch (type) { 4000dd84: 80 a6 60 06 cmp %i1, 6 4000dd88: 38 80 00 20 bgu,a 4000de08 4000dd8c: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000dd90: b3 2e 60 02 sll %i1, 2, %i1 4000dd94: 03 10 00 37 sethi %hi(0x4000dc00), %g1 4000dd98: 82 10 60 74 or %g1, 0x74, %g1 ! 4000dc74 4000dd9c: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000dda0: 81 c0 40 00 jmp %g1 4000dda4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000dda8: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 4000ddac: 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); 4000ddb0: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ddb4: 82 06 20 50 add %i0, 0x50, %g1 4000ddb8: 10 80 00 1b b 4000de24 4000ddbc: 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; 4000ddc0: 10 80 00 05 b 4000ddd4 4000ddc4: 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; 4000ddc8: 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; 4000ddcc: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 4000ddd0: c4 26 20 54 st %g2, [ %i0 + 0x54 ] break; 4000ddd4: 10 80 00 14 b 4000de24 4000ddd8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000dddc: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED 4000dde0: c0 26 20 54 clr [ %i0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000dde4: c0 26 20 58 clr [ %i0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000dde8: c0 26 20 50 clr [ %i0 + 0x50 ] 4000ddec: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 4000ddf0: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 4000ddf4: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; break; 4000ddf8: 10 80 00 0b b 4000de24 4000ddfc: c0 26 20 60 clr [ %i0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 4000de00: 10 80 00 09 b 4000de24 4000de04: c0 26 20 50 clr [ %i0 + 0x50 ] default: assert(0); 4000de08: 15 10 00 71 sethi %hi(0x4001c400), %o2 <== NOT EXECUTED 4000de0c: 17 10 00 6f sethi %hi(0x4001bc00), %o3 <== NOT EXECUTED 4000de10: 90 12 22 a0 or %o0, 0x2a0, %o0 <== NOT EXECUTED 4000de14: 94 12 a2 f0 or %o2, 0x2f0, %o2 <== NOT EXECUTED 4000de18: 96 12 e1 c0 or %o3, 0x1c0, %o3 <== NOT EXECUTED 4000de1c: 7f ff d3 db call 40002d88 <__assert_func> <== NOT EXECUTED 4000de20: 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; 4000de24: 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; 4000de28: d0 04 00 00 ld [ %l0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 4000de2c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 4000de30: d0 26 20 08 st %o0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 4000de34: 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 ); 4000de38: 90 02 20 50 add %o0, 0x50, %o0 4000de3c: 82 00 60 01 inc %g1 4000de40: c2 20 80 00 st %g1, [ %g2 ] 4000de44: c2 26 20 34 st %g1, [ %i0 + 0x34 ] 4000de48: 7f ff e4 2e call 40006f00 <_Chain_Append> 4000de4c: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000de50: 81 c7 e0 08 ret 4000de54: 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 a0 or %o0, 0x3a0, %o0 <== NOT EXECUTED 40004a78: 94 12 a1 70 or %o2, 0x170, %o2 <== NOT EXECUTED 40004a7c: 96 12 e0 78 or %o3, 0x78, %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 a0 or %o0, 0x3a0, %o0 <== NOT EXECUTED 40004aa0: 94 12 a1 70 or %o2, 0x170, %o2 <== NOT EXECUTED 40004aa4: 96 12 e0 88 or %o3, 0x88, %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 a0 or %o0, 0x3a0, %o0 <== NOT EXECUTED 40004ad0: 94 12 a1 70 or %o2, 0x170, %o2 <== NOT EXECUTED 40004ad4: 96 12 e0 98 or %o3, 0x98, %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 10 or %l4, 0x110, %l4 40004aec: a6 14 e0 c0 or %l3, 0xc0, %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 82 call 40014510 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 73 sethi %hi(0x4001cc00), %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 63 f8 or %l5, 0x3f8, %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 dc call 4000f6c0 <__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 c0 call 4000f6c0 <__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 a2 call 4000f6c0 <__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 95 call 4000f6c0 <__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 91 call 4000f6c0 <__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 b7 call 4000ffac 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 b3 call 4000ffac 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 62 call 4000f6c0 <__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 e1 call 4001059c 4000a61c: 2b 10 00 73 sethi %hi(0x4001cc00), %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 63 f8 or %l5, 0x3f8, %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 0a call 4000f6c0 <__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 e7 call 4000f6c0 <__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 15 fb call 4000ffac 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 f7 call 4000ffac 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 a9 call 4000f6c0 <__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 a5 call 4000f6c0 <__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 97 call 4000f6c0 <__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 88 call 4000f6c0 <__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 7c call 4000f6c0 <__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 39 call 4000f6c0 <__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 73 sethi %hi(0x4001cc00), %g1 4000a254: d2 00 63 f8 ld [ %g1 + 0x3f8 ], %o1 ! 4001cff8 4000a258: 90 10 00 10 mov %l0, %o0 4000a25c: 92 02 60 18 add %o1, 0x18, %o1 4000a260: 40 00 17 53 call 4000ffac 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 ca call 4001059c 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 03 call 4000f6c0 <__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 4000de58 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000de58: 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(); 4000de5c: 7f ff f5 1b call 4000b2c8 4000de60: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000de64: 91 2a 20 10 sll %o0, 0x10, %o0 4000de68: 91 32 20 10 srl %o0, 0x10, %o0 4000de6c: 80 a2 20 00 cmp %o0, 0 4000de70: 22 80 00 0c be,a 4000dea0 4000de74: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 4000de78: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 4000de7c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000de80: 22 80 00 08 be,a 4000dea0 <== NOT EXECUTED 4000de84: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4000de88: 40 00 06 0e call 4000f6c0 <__errno> <== NOT EXECUTED 4000de8c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000de90: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000de94: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000de98: 81 c7 e0 08 ret <== NOT EXECUTED 4000de9c: 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 ); 4000dea0: 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); 4000dea4: 82 08 70 00 and %g1, -4096, %g1 IMFS_update_ctime( jnode ); 4000dea8: 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); 4000deac: b2 0e 6f ff and %i1, 0xfff, %i1 4000deb0: b2 16 40 01 or %i1, %g1, %i1 IMFS_update_ctime( jnode ); 4000deb4: 7f ff f5 09 call 4000b2d8 4000deb8: f2 34 20 2e sth %i1, [ %l0 + 0x2e ] 4000debc: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000dec0: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000dec4: 81 c7 e0 08 ret 4000dec8: 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 36 call 4000d778 <== 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 f1 call 4000f6c0 <__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 75 call 4000d36c <== 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 45 call 4000f6c0 <__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 7e call 4000d2f8 <== 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 69 call 4000f6c0 <__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 64 call 4000d3d0 <== 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 12 call 4000f6c0 <__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 e5 call 4000d56c <== 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 2b call 4000f6c0 <__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 90 or %o0, 0x290, %o0 <== NOT EXECUTED 4000ab6c: 94 12 a3 00 or %o2, 0x300, %o2 <== NOT EXECUTED 4000ab70: 96 12 e2 e0 or %o3, 0x2e0, %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 34 call 40010458 4000ab8c: 92 12 62 f0 or %o1, 0x2f0, %o1 ! 4001c2f0 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 2e call 40010458 4000aba4: 92 12 62 f8 or %o1, 0x2f8, %o1 ! 4001c2f8 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 24 call 40010458 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 4001043c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4001043c: 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; 40010440: 94 10 20 14 mov 0x14, %o2 40010444: 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; 40010448: 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 ); 4001044c: 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; 40010450: 40 00 15 cc call 40015b80 40010454: 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; 40010458: c0 26 20 1c clr [ %i0 + 0x1c ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 4001045c: e0 27 bf ec st %l0, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 40010460: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40010464: 7f ff fd 52 call 4000f9ac 40010468: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 4001046c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 40010470: 80 a0 a0 01 cmp %g2, 1 40010474: 12 80 00 06 bne 4001048c 40010478: 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; 4001047c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40010480: 80 a0 80 01 cmp %g2, %g1 40010484: 12 80 00 09 bne 400104a8 40010488: 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 ); 4001048c: 90 10 20 00 clr %o0 40010490: 7f ff cf 5a call 400041f8 40010494: 92 10 00 11 mov %l1, %o1 if (result != 0) 40010498: 80 a2 20 00 cmp %o0, 0 4001049c: 12 80 00 13 bne 400104e8 400104a0: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 400104a4: 80 a4 20 00 cmp %l0, 0 400104a8: 22 80 00 11 be,a 400104ec 400104ac: b0 10 20 00 clr %i0 if ( jnode->type == IMFS_DIRECTORY ) { 400104b0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400104b4: 80 a0 60 01 cmp %g1, 1 400104b8: 32 bf ff ea bne,a 40010460 400104bc: e0 27 bf ec st %l0, [ %fp + -20 ] <== NOT EXECUTED 400104c0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400104c4: 84 04 20 54 add %l0, 0x54, %g2 400104c8: 80 a0 40 02 cmp %g1, %g2 400104cc: 22 bf ff e5 be,a 40010460 400104d0: e0 27 bf ec st %l0, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 400104d4: a0 90 60 00 orcc %g1, 0, %l0 400104d8: 32 bf ff e2 bne,a 40010460 400104dc: e0 27 bf ec st %l0, [ %fp + -20 ] 400104e0: 81 c7 e0 08 ret <== NOT EXECUTED 400104e4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400104e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return 0; } 400104ec: 81 c7 e0 08 ret 400104f0: 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 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 4001cee8 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 f8 call 4000dd00 4000ad24: c4 20 62 bc st %g2, [ %g1 + 0x2bc ] ! 4001d6bc 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 9b call 4000ffac 4000ad44: 92 12 62 70 or %o1, 0x270, %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 56 call 4000f6c0 <__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 5a call 4000d300 4000ad9c: b0 10 20 00 clr %i0 return 0; } 4000ada0: 81 c7 e0 08 ret 4000ada4: 81 e8 00 00 restore 40003ecc : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40003ecc: 9d e3 bf 50 save %sp, -176, %sp int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 40003ed0: c2 06 00 00 ld [ %i0 ], %g1 40003ed4: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40003ed8: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 40003edc: 80 a0 60 07 cmp %g1, 7 40003ee0: 08 80 00 06 bleu 40003ef8 40003ee4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMLINK ); 40003ee8: 40 00 44 eb call 40015294 <__errno> 40003eec: 01 00 00 00 nop 40003ef0: 10 80 00 17 b 40003f4c 40003ef4: 82 10 20 1f mov 0x1f, %g1 ! 1f /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 40003ef8: 40 00 48 85 call 4001610c 40003efc: 90 10 00 1a mov %i2, %o0 40003f00: a0 07 bf b0 add %fp, -80, %l0 40003f04: 92 10 00 08 mov %o0, %o1 40003f08: 96 07 bf fc add %fp, -4, %o3 40003f0c: 94 10 00 10 mov %l0, %o2 40003f10: 40 00 31 a4 call 400105a0 40003f14: 90 10 00 1a mov %i2, %o0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 40003f18: 90 10 00 19 mov %i1, %o0 40003f1c: 94 10 00 10 mov %l0, %o2 40003f20: 92 10 20 03 mov 3, %o1 40003f24: 17 00 00 28 sethi %hi(0xa000), %o3 40003f28: 98 07 bf d8 add %fp, -40, %o4 40003f2c: 40 00 2e 53 call 4000f878 40003f30: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40003f34: 80 a2 20 00 cmp %o0, 0 40003f38: 12 80 00 08 bne 40003f58 40003f3c: c2 07 bf d8 ld [ %fp + -40 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40003f40: 40 00 44 d5 call 40015294 <__errno> <== NOT EXECUTED 40003f44: 01 00 00 00 nop <== NOT EXECUTED 40003f48: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40003f4c: c2 22 00 00 st %g1, [ %o0 ] 40003f50: 81 c7 e0 08 ret 40003f54: 91 e8 3f ff restore %g0, -1, %o0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 40003f58: 90 07 bf f4 add %fp, -12, %o0 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40003f5c: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 40003f60: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40003f64: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 40003f68: 40 00 02 66 call 40004900 40003f6c: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] 40003f70: c4 07 bf f4 ld [ %fp + -12 ], %g2 40003f74: c2 07 bf d8 ld [ %fp + -40 ], %g1 40003f78: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40003f7c: 81 c7 e0 08 ret 40003f80: 91 e8 20 00 restore %g0, 0, %o0 400132cc : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 400132cc: 9d e3 bf a0 save %sp, -96, %sp 400132d0: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 400132d4: 80 a6 20 00 cmp %i0, 0 400132d8: 12 80 00 0a bne 40013300 400132dc: 92 10 00 19 mov %i1, %o1 400132e0: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 400132e4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400132e8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400132ec: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 400132f0: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 400132f4: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 400132f8: 10 80 00 0c b 40013328 <== NOT EXECUTED 400132fc: 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 ); 40013300: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013304: 80 a0 60 05 cmp %g1, 5 40013308: 02 80 00 0a be 40013330 4001330c: 15 10 00 8a sethi %hi(0x40022800), %o2 40013310: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013314: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013318: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 4001331c: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 40013320: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 40013324: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 40013328: 7f ff c4 56 call 40004480 <__assert_func> <== NOT EXECUTED 4001332c: 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 ); 40013330: 7f ff fe 6c call 40012ce0 40013334: 94 10 20 01 mov 1, %o2 ! 1 if ( *block_entry_ptr ) 40013338: 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 ); 4001333c: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 40013340: 80 a0 60 00 cmp %g1, 0 40013344: 12 80 00 09 bne 40013368 40013348: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4001334c: 7f ff fe 58 call 40012cac 40013350: b0 10 20 01 mov 1, %i0 if ( !memory ) 40013354: 80 a2 20 00 cmp %o0, 0 40013358: 02 80 00 04 be 40013368 4001335c: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 40013360: d0 24 00 00 st %o0, [ %l0 ] 40013364: b0 10 20 00 clr %i0 return 0; } 40013368: 81 c7 e0 08 ret 4001336c: 81 e8 00 00 restore 40013370 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40013370: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013374: 80 a6 20 00 cmp %i0, 0 40013378: 32 80 00 0a bne,a 400133a0 4001337c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013380: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013384: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013388: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 4001338c: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013390: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 40013394: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40013398: 10 80 00 0c b 400133c8 <== NOT EXECUTED 4001339c: 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 ); 400133a0: 80 a0 60 05 cmp %g1, 5 400133a4: 02 80 00 0b be 400133d0 400133a8: 03 10 00 8e sethi %hi(0x40023800), %g1 400133ac: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 400133b0: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400133b4: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400133b8: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 400133bc: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 400133c0: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 400133c4: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 400133c8: 7f ff c4 2e call 40004480 <__assert_func> <== NOT EXECUTED 400133cc: 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 ) 400133d0: e0 00 61 44 ld [ %g1 + 0x144 ], %l0 400133d4: a3 34 20 02 srl %l0, 2, %l1 400133d8: 92 10 00 11 mov %l1, %o1 400133dc: 40 00 2c ec call 4001e78c <.umul> 400133e0: 90 04 60 01 add %l1, 1, %o0 400133e4: 92 10 00 11 mov %l1, %o1 400133e8: 40 00 2c e9 call 4001e78c <.umul> 400133ec: 90 02 20 01 inc %o0 400133f0: 92 10 00 10 mov %l0, %o1 400133f4: 40 00 2c e6 call 4001e78c <.umul> 400133f8: 90 02 3f ff add %o0, -1, %o0 400133fc: 82 10 20 00 clr %g1 40013400: 80 a0 40 19 cmp %g1, %i1 40013404: 34 80 00 0b bg,a 40013430 40013408: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 <== NOT EXECUTED 4001340c: 80 a0 40 19 cmp %g1, %i1 40013410: 12 80 00 04 bne 40013420 40013414: 80 a2 00 1a cmp %o0, %i2 40013418: 38 80 00 06 bgu,a 40013430 4001341c: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 40013420: 40 00 07 9d call 40015294 <__errno> <== NOT EXECUTED 40013424: 01 00 00 00 nop <== NOT EXECUTED 40013428: 10 80 00 2b b 400134d4 <== NOT EXECUTED 4001342c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 40013430: 80 a6 40 11 cmp %i1, %l1 40013434: 14 80 00 09 bg 40013458 40013438: e6 06 20 54 ld [ %i0 + 0x54 ], %l3 4001343c: 80 a6 40 11 cmp %i1, %l1 40013440: 12 80 00 04 bne 40013450 40013444: 80 a6 80 13 cmp %i2, %l3 40013448: 18 80 00 05 bgu 4001345c 4001344c: a5 3c 20 1f sra %l0, 0x1f, %l2 40013450: 81 c7 e0 08 ret 40013454: 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; 40013458: a5 3c 20 1f sra %l0, 0x1f, %l2 <== NOT EXECUTED 4001345c: 96 10 00 10 mov %l0, %o3 40013460: 94 10 00 12 mov %l2, %o2 40013464: 90 10 00 19 mov %i1, %o0 40013468: 40 00 2e 8e call 4001eea0 <__divdi3> 4001346c: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013470: 90 10 00 11 mov %l1, %o0 40013474: 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; 40013478: a8 10 00 09 mov %o1, %l4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001347c: 94 10 00 12 mov %l2, %o2 40013480: 40 00 2e 88 call 4001eea0 <__divdi3> 40013484: 92 10 00 13 mov %l3, %o1 40013488: a2 10 00 09 mov %o1, %l1 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4001348c: 10 80 00 15 b 400134e0 40013490: a0 10 00 09 mov %o1, %l0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 40013494: 7f ff ff 8e call 400132cc 40013498: 92 10 00 10 mov %l0, %o1 4001349c: 80 a2 20 00 cmp %o0, 0 400134a0: 22 80 00 10 be,a 400134e0 400134a4: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 400134a8: 10 80 00 06 b 400134c0 <== NOT EXECUTED 400134ac: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 400134b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400134b4: 7f ff fe d7 call 40013010 <== NOT EXECUTED 400134b8: 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-- ) { 400134bc: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 400134c0: 1a bf ff fc bcc 400134b0 <== NOT EXECUTED 400134c4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 400134c8: 40 00 07 73 call 40015294 <__errno> <== NOT EXECUTED 400134cc: 01 00 00 00 nop <== NOT EXECUTED 400134d0: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 400134d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400134d8: 81 c7 e0 08 ret <== NOT EXECUTED 400134dc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 400134e0: 80 a4 00 14 cmp %l0, %l4 400134e4: 08 bf ff ec bleu 40013494 400134e8: 90 10 00 18 mov %i0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 400134ec: f4 26 20 54 st %i2, [ %i0 + 0x54 ] 400134f0: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 400134f4: 81 c7 e0 08 ret 400134f8: 91 e8 20 00 restore %g0, 0, %o0 40012ce0 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40012ce0: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40012ce4: 80 a6 20 00 cmp %i0, 0 40012ce8: 32 80 00 0a bne,a 40012d10 40012cec: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40012cf0: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40012cf4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012cf8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40012cfc: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40012d00: 94 12 a1 90 or %o2, 0x190, %o2 <== NOT EXECUTED 40012d04: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40012d08: 10 80 00 0c b 40012d38 <== NOT EXECUTED 40012d0c: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40012d10: 80 a0 60 05 cmp %g1, 5 40012d14: 02 80 00 0b be 40012d40 40012d18: 03 10 00 8e sethi %hi(0x40023800), %g1 40012d1c: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40012d20: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012d24: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40012d28: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40012d2c: 94 12 a1 90 or %o2, 0x190, %o2 <== NOT EXECUTED 40012d30: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 40012d34: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED 40012d38: 7f ff c5 d2 call 40004480 <__assert_func> <== NOT EXECUTED 40012d3c: 01 00 00 00 nop <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40012d40: e0 00 61 44 ld [ %g1 + 0x144 ], %l0 40012d44: a1 34 20 02 srl %l0, 2, %l0 40012d48: 82 04 3f ff add %l0, -1, %g1 40012d4c: 80 a6 40 01 cmp %i1, %g1 40012d50: 18 80 00 16 bgu 40012da8 40012d54: 90 04 20 01 add %l0, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40012d58: 80 a6 a0 00 cmp %i2, 0 40012d5c: 02 80 00 0f be 40012d98 40012d60: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 40012d64: 80 a0 60 00 cmp %g1, 0 40012d68: 32 80 00 09 bne,a 40012d8c 40012d6c: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 p = memfile_alloc_block(); 40012d70: 7f ff ff cf call 40012cac 40012d74: 01 00 00 00 nop if ( !p ) 40012d78: 80 a2 20 00 cmp %o0, 0 40012d7c: 22 80 00 86 be,a 40012f94 40012d80: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 40012d84: d0 26 20 58 st %o0, [ %i0 + 0x58 ] } return &info->indirect[ my_block ]; 40012d88: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 40012d8c: b3 2e 60 02 sll %i1, 2, %i1 40012d90: 81 c7 e0 08 ret 40012d94: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) return 0; return &info->indirect[ my_block ]; 40012d98: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40012d9c: 80 a0 60 00 cmp %g1, 0 return 0; return &info->indirect[ my_block ]; 40012da0: 10 80 00 32 b 40012e68 40012da4: b0 00 40 19 add %g1, %i1, %i0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40012da8: 40 00 2e 79 call 4001e78c <.umul> <== NOT EXECUTED 40012dac: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012db0: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 40012db4: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40012db8: 18 80 00 30 bgu 40012e78 <== NOT EXECUTED 40012dbc: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40012dc0: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40012dc4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012dc8: 40 00 2f 57 call 4001eb24 <.urem> <== NOT EXECUTED 40012dcc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012dd0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40012dd4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012dd8: 40 00 2e a7 call 4001e874 <.udiv> <== NOT EXECUTED 40012ddc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40012de0: 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; 40012de4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40012de8: 02 80 00 18 be 40012e48 <== NOT EXECUTED 40012dec: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 40012df0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012df4: 12 80 00 08 bne 40012e14 <== NOT EXECUTED 40012df8: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED p = memfile_alloc_block(); 40012dfc: 7f ff ff ac call 40012cac <== NOT EXECUTED 40012e00: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40012e04: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40012e08: 22 80 00 63 be,a 40012f94 <== NOT EXECUTED 40012e0c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40012e10: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 40012e14: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 40012e18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012e1c: 12 80 00 08 bne 40012e3c <== NOT EXECUTED 40012e20: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 40012e24: 7f ff ff a2 call 40012cac <== NOT EXECUTED 40012e28: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40012e2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012e30: 22 80 00 59 be,a 40012f94 <== NOT EXECUTED 40012e34: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40012e38: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 40012e3c: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012e40: 81 c7 e0 08 ret <== NOT EXECUTED 40012e44: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED } if ( !p ) 40012e48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012e4c: 02 80 00 52 be 40012f94 <== NOT EXECUTED 40012e50: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40012e54: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 40012e58: 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 ]; 40012e5c: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40012e60: 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 ]; 40012e64: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40012e68: 12 80 00 4b bne 40012f94 40012e6c: 01 00 00 00 nop p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40012e70: 81 c7 e0 08 ret <== NOT EXECUTED 40012e74: 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 ) { 40012e78: 90 02 20 01 inc %o0 <== NOT EXECUTED 40012e7c: 40 00 2e 44 call 4001e78c <.umul> <== NOT EXECUTED 40012e80: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012e84: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40012e88: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40012e8c: 18 80 00 41 bgu 40012f90 <== NOT EXECUTED 40012e90: b2 26 40 11 sub %i1, %l1, %i1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40012e94: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012e98: 40 00 2f 23 call 4001eb24 <.urem> <== NOT EXECUTED 40012e9c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012ea0: 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; 40012ea4: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40012ea8: 40 00 2e 73 call 4001e874 <.udiv> <== NOT EXECUTED 40012eac: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40012eb0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40012eb4: 40 00 2e 70 call 4001e874 <.udiv> <== NOT EXECUTED 40012eb8: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40012ebc: 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; 40012ec0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40012ec4: 40 00 2f 18 call 4001eb24 <.urem> <== NOT EXECUTED 40012ec8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40012ecc: 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; 40012ed0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40012ed4: 02 80 00 23 be 40012f60 <== NOT EXECUTED 40012ed8: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 40012edc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012ee0: 12 80 00 08 bne 40012f00 <== NOT EXECUTED 40012ee4: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED p = memfile_alloc_block(); 40012ee8: 7f ff ff 71 call 40012cac <== NOT EXECUTED 40012eec: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40012ef0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40012ef4: 22 80 00 28 be,a 40012f94 <== NOT EXECUTED 40012ef8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 40012efc: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 40012f00: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 40012f04: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40012f08: 12 80 00 08 bne 40012f28 <== NOT EXECUTED 40012f0c: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED p1 = memfile_alloc_block(); 40012f10: 7f ff ff 67 call 40012cac <== NOT EXECUTED 40012f14: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40012f18: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40012f1c: 02 80 00 1e be 40012f94 <== NOT EXECUTED 40012f20: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40012f24: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 40012f28: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 40012f2c: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 40012f30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012f34: 12 80 00 08 bne 40012f54 <== NOT EXECUTED 40012f38: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40012f3c: 7f ff ff 5c call 40012cac <== NOT EXECUTED 40012f40: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40012f44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40012f48: 22 80 00 13 be,a 40012f94 <== NOT EXECUTED 40012f4c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40012f50: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 40012f54: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 40012f58: 81 c7 e0 08 ret <== NOT EXECUTED 40012f5c: 91 ea 00 12 restore %o0, %l2, %o0 <== NOT EXECUTED } if ( !p ) 40012f60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012f64: 02 80 00 0c be 40012f94 <== NOT EXECUTED 40012f68: 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 ]; 40012f6c: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40012f70: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 40012f74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012f78: 02 80 00 07 be 40012f94 <== NOT EXECUTED 40012f7c: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40012f80: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 40012f84: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 40012f88: 81 c7 e0 08 ret <== NOT EXECUTED 40012f8c: 91 ee 00 12 restore %i0, %l2, %o0 <== NOT EXECUTED 40012f90: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40012f94: 81 c7 e0 08 ret 40012f98: 81 e8 00 00 restore 4001397c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4001397c: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013980: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40013984: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 40013988: 12 80 00 0a bne 400139b0 4001398c: a6 10 00 1a mov %i2, %l3 40013990: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013994: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013998: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 4001399c: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 400139a0: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 400139a4: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 400139a8: 10 80 00 0e b 400139e0 <== NOT EXECUTED 400139ac: 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 || 400139b0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400139b4: 84 00 7f fb add %g1, -5, %g2 400139b8: 80 a0 a0 01 cmp %g2, 1 400139bc: 08 80 00 0b bleu 400139e8 400139c0: 80 a6 e0 00 cmp %i3, 0 400139c4: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 400139c8: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400139cc: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400139d0: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 400139d4: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 400139d8: 96 12 e1 38 or %o3, 0x138, %o3 <== NOT EXECUTED 400139dc: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED 400139e0: 7f ff c2 a8 call 40004480 <__assert_func> <== NOT EXECUTED 400139e4: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 400139e8: 32 80 00 0a bne,a 40013a10 400139ec: 80 a7 20 00 cmp %i4, 0 400139f0: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 400139f4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400139f8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400139fc: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013a00: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 40013a04: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED 40013a08: 10 bf ff f6 b 400139e0 <== NOT EXECUTED 40013a0c: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 40013a10: 12 80 00 08 bne 40013a30 40013a14: 80 a0 60 06 cmp %g1, 6 rtems_set_errno_and_return_minus_one( EINVAL ); 40013a18: 40 00 06 1f call 40015294 <__errno> <== NOT EXECUTED 40013a1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40013a20: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40013a24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013a28: 81 c7 e0 08 ret <== NOT EXECUTED 40013a2c: 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) { 40013a30: 32 80 00 1d bne,a 40013aa4 40013a34: 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)) 40013a38: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 40013a3c: 82 10 20 00 clr %g1 <== NOT EXECUTED 40013a40: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 40013a44: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 40013a48: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40013a4c: 14 80 00 0a bg 40013a74 <== NOT EXECUTED 40013a50: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED 40013a54: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40013a58: 12 80 00 08 bne 40013a78 <== NOT EXECUTED 40013a5c: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED 40013a60: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 40013a64: 38 80 00 05 bgu,a 40013a78 <== NOT EXECUTED 40013a68: 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); 40013a6c: 10 80 00 04 b 40013a7c <== NOT EXECUTED 40013a70: 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; 40013a74: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 40013a78: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40013a7c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40013a80: 40 00 08 40 call 40015b80 <== NOT EXECUTED 40013a84: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40013a88: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40013a8c: 7f ff c3 9d call 40004900 <== NOT EXECUTED 40013a90: 92 10 20 00 clr %o1 <== NOT EXECUTED 40013a94: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40013a98: c2 24 20 3c st %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return my_length; 40013a9c: 81 c7 e0 08 ret <== NOT EXECUTED 40013aa0: 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 ) 40013aa4: 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; 40013aa8: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 40013aac: 80 a1 00 03 cmp %g4, %g3 40013ab0: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 40013ab4: 14 80 00 08 bg 40013ad4 40013ab8: 9a 07 00 1a add %i4, %i2, %o5 40013abc: 80 a1 00 03 cmp %g4, %g3 40013ac0: 32 80 00 07 bne,a 40013adc 40013ac4: 03 10 00 8e sethi %hi(0x40023800), %g1 <== NOT EXECUTED 40013ac8: 80 a3 40 02 cmp %o5, %g2 40013acc: 28 80 00 04 bleu,a 40013adc 40013ad0: 03 10 00 8e sethi %hi(0x40023800), %g1 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 40013ad4: 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; 40013ad8: 03 10 00 8e sethi %hi(0x40023800), %g1 40013adc: e2 00 61 44 ld [ %g1 + 0x144 ], %l1 ! 40023944 40013ae0: 90 10 00 12 mov %l2, %o0 40013ae4: 92 10 00 13 mov %l3, %o1 40013ae8: ab 3c 60 1f sra %l1, 0x1f, %l5 40013aec: 96 10 00 11 mov %l1, %o3 40013af0: 40 00 2d d3 call 4001f23c <__moddi3> 40013af4: 94 10 00 15 mov %l5, %o2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013af8: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40013afc: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013b00: 94 10 00 15 mov %l5, %o2 40013b04: 92 10 00 13 mov %l3, %o1 40013b08: 40 00 2c e6 call 4001eea0 <__divdi3> 40013b0c: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40013b10: 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; 40013b14: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 40013b18: a6 10 00 1b mov %i3, %l3 40013b1c: 02 80 00 1c be 40013b8c 40013b20: 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 ); 40013b24: 90 10 00 10 mov %l0, %o0 40013b28: 7f ff fc 6e call 40012ce0 40013b2c: 94 10 20 00 clr %o2 assert( block_ptr ); 40013b30: 80 a2 20 00 cmp %o0, 0 40013b34: 32 80 00 0a bne,a 40013b5c 40013b38: a2 24 40 14 sub %l1, %l4, %l1 40013b3c: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013b40: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013b44: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013b48: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013b4c: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 40013b50: 96 12 e0 f0 or %o3, 0xf0, %o3 <== NOT EXECUTED 40013b54: 10 bf ff a3 b 400139e0 <== NOT EXECUTED 40013b58: 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; 40013b5c: 80 a7 00 11 cmp %i4, %l1 40013b60: 08 80 00 03 bleu 40013b6c 40013b64: 94 10 00 1c mov %i4, %o2 40013b68: 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 ); 40013b6c: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 40013b70: 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 ); 40013b74: 92 02 40 14 add %o1, %l4, %o1 dest += to_copy; block++; 40013b78: a4 04 a0 01 inc %l2 my_length -= to_copy; 40013b7c: b8 27 00 0a sub %i4, %o2, %i4 40013b80: 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 ); 40013b84: 40 00 07 ff call 40015b80 40013b88: 90 10 00 1b mov %i3, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40013b8c: 03 10 00 8e sethi %hi(0x40023800), %g1 40013b90: a2 10 20 00 clr %l1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40013b94: b6 10 61 44 or %g1, 0x144, %i3 40013b98: 10 80 00 17 b 40013bf4 40013b9c: e8 00 61 44 ld [ %g1 + 0x144 ], %l4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013ba0: 90 10 00 10 mov %l0, %o0 40013ba4: 92 10 00 12 mov %l2, %o1 40013ba8: 94 10 20 00 clr %o2 40013bac: 7f ff fc 4d call 40012ce0 40013bb0: a2 04 40 14 add %l1, %l4, %l1 assert( block_ptr ); 40013bb4: 80 a2 20 00 cmp %o0, 0 40013bb8: 32 80 00 0a bne,a 40013be0 40013bbc: d2 02 00 00 ld [ %o0 ], %o1 40013bc0: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013bc4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013bc8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013bcc: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013bd0: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 40013bd4: 96 12 e0 f0 or %o3, 0xf0, %o3 <== NOT EXECUTED 40013bd8: 10 bf ff 82 b 400139e0 <== NOT EXECUTED 40013bdc: 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++; 40013be0: 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 ); 40013be4: 90 10 00 15 mov %l5, %o0 dest += to_copy; block++; my_length -= to_copy; 40013be8: 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 ); 40013bec: 40 00 07 e5 call 40015b80 40013bf0: 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 ) { 40013bf4: 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; 40013bf8: 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 ) { 40013bfc: 80 a7 00 01 cmp %i4, %g1 40013c00: 1a bf ff e8 bcc 40013ba0 40013c04: 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 ) { 40013c08: 80 a7 20 00 cmp %i4, 0 40013c0c: 02 80 00 16 be 40013c64 40013c10: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013c14: 92 10 00 12 mov %l2, %o1 40013c18: 90 10 00 10 mov %l0, %o0 40013c1c: 7f ff fc 31 call 40012ce0 40013c20: 94 10 20 00 clr %o2 assert( block_ptr ); 40013c24: 80 a2 20 00 cmp %o0, 0 40013c28: 32 80 00 0a bne,a 40013c50 40013c2c: d2 02 00 00 ld [ %o0 ], %o1 40013c30: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013c34: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013c38: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013c3c: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013c40: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 40013c44: 96 12 e0 f0 or %o3, 0xf0, %o3 <== NOT EXECUTED 40013c48: 10 bf ff 66 b 400139e0 <== NOT EXECUTED 40013c4c: 92 10 22 b9 mov 0x2b9, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 40013c50: 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 ); 40013c54: 90 10 00 15 mov %l5, %o0 40013c58: 40 00 07 ca call 40015b80 40013c5c: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 40013c60: 90 07 bf f8 add %fp, -8, %o0 40013c64: 7f ff c3 27 call 40004900 40013c68: 92 10 20 00 clr %o1 40013c6c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013c70: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return copied; } 40013c74: 81 c7 e0 08 ret 40013c78: 81 e8 00 00 restore 40013064 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 40013064: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40013068: 80 a6 20 00 cmp %i0, 0 4001306c: 32 80 00 0a bne,a 40013094 40013070: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013074: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013078: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001307c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013080: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013084: 94 12 a1 e0 or %o2, 0x1e0, %o2 <== NOT EXECUTED 40013088: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 4001308c: 10 80 00 0c b 400130bc <== NOT EXECUTED 40013090: 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 ); 40013094: 80 a0 60 05 cmp %g1, 5 40013098: 02 80 00 0b be 400130c4 4001309c: 03 10 00 8e sethi %hi(0x40023800), %g1 400130a0: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 400130a4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400130a8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400130ac: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 400130b0: 94 12 a1 e0 or %o2, 0x1e0, %o2 <== NOT EXECUTED 400130b4: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 400130b8: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 400130bc: 7f ff c4 f1 call 40004480 <__assert_func> <== NOT EXECUTED 400130c0: 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; 400130c4: e0 00 61 44 ld [ %g1 + 0x144 ], %l0 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400130c8: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 400130cc: 80 a0 60 00 cmp %g1, 0 400130d0: 02 80 00 05 be 400130e4 400130d4: a1 34 20 02 srl %l0, 2, %l0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 400130d8: 90 06 20 58 add %i0, 0x58, %o0 400130dc: 7f ff ff b0 call 40012f9c 400130e0: 92 10 00 10 mov %l0, %o1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400130e4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 400130e8: 80 a0 60 00 cmp %g1, 0 400130ec: 22 80 00 17 be,a 40013148 400130f0: 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; 400130f8: 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 40013100: a4 14 a1 44 or %l2, 0x144, %l2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 40013104: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 40013108: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 4001310c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013110: 02 80 00 04 be 40013120 <== NOT EXECUTED 40013114: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40013118: 7f ff ff a1 call 40012f9c <== NOT EXECUTED 4001311c: 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 40013134: 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 ); 40013138: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 4001313c: 7f ff ff 98 call 40012f9c <== NOT EXECUTED 40013140: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40013144: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED 40013148: 80 a0 60 00 cmp %g1, 0 4001314c: 02 80 00 25 be 400131e0 40013150: 29 10 00 8e sethi %hi(0x40023800), %l4 40013154: 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 4001315c: a8 15 21 44 or %l4, 0x144, %l4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40013160: ab 2c 60 02 sll %l1, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 40013164: e4 00 40 15 ld [ %g1 + %l5 ], %l2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40013168: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4001316c: 02 80 00 1b be 400131d8 <== NOT EXECUTED 40013170: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 40013174: 10 80 00 09 b 40013198 <== NOT EXECUTED 40013178: a6 10 20 00 clr %l3 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 40013184: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 40013188: 7f ff ff 85 call 40012f9c <== NOT EXECUTED 4001318c: 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 400131a8: 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( 400131ac: 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 400131bc: 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 400131d0: 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( 400131d4: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 400131d8: 7f ff ff 71 call 40012f9c <== NOT EXECUTED 400131dc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 400131e0: 81 c7 e0 08 ret 400131e4: 91 e8 20 00 restore %g0, 0, %o0 40013010 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40013010: 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 ); 40013014: 94 10 20 00 clr %o2 <== NOT EXECUTED 40013018: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001301c: 7f ff ff 31 call 40012ce0 <== NOT EXECUTED 40013020: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 40013024: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40013028: 32 80 00 0a bne,a 40013050 <== NOT EXECUTED 4001302c: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED 40013030: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013034: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013038: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 4001303c: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013040: 94 12 a2 18 or %o2, 0x218, %o2 <== NOT EXECUTED 40013044: 96 12 e0 f0 or %o3, 0xf0, %o3 <== NOT EXECUTED 40013048: 7f ff c5 0e call 40004480 <__assert_func> <== NOT EXECUTED 4001304c: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED *block_ptr = 0; memfile_free_block( ptr ); } return 1; } 40013050: 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 ); 40013054: 7f ff ff 0d call 40012c88 <== NOT EXECUTED 40013058: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } return 1; } 4001305c: 81 c7 e0 08 ret <== NOT EXECUTED 40013060: 81 e8 00 00 restore <== NOT EXECUTED 40013618 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 40013618: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001361c: a0 96 20 00 orcc %i0, 0, %l0 40013620: 32 80 00 0a bne,a 40013648 40013624: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013628: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 4001362c: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013630: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013634: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013638: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 4001363c: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40013640: 10 80 00 8c b 40013870 <== NOT EXECUTED 40013644: 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 ); 40013648: 80 a0 60 05 cmp %g1, 5 4001364c: 02 80 00 0a be 40013674 40013650: 80 a6 e0 00 cmp %i3, 0 40013654: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013658: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001365c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013660: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013664: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40013668: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 4001366c: 10 80 00 81 b 40013870 <== NOT EXECUTED 40013670: 92 10 22 e7 mov 0x2e7, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 40013674: 12 80 00 0a bne 4001369c 40013678: 80 a7 20 00 cmp %i4, 0 4001367c: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013680: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013684: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013688: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 4001368c: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40013690: 96 12 e1 00 or %o3, 0x100, %o3 <== NOT EXECUTED 40013694: 10 80 00 77 b 40013870 <== NOT EXECUTED 40013698: 92 10 22 ef mov 0x2ef, %o1 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4001369c: 32 80 00 06 bne,a 400136b4 400136a0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 400136a4: 40 00 06 fc call 40015294 <__errno> <== NOT EXECUTED 400136a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400136ac: 10 80 00 15 b 40013700 <== NOT EXECUTED 400136b0: 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 ) { 400136b4: 80 a0 60 00 cmp %g1, 0 400136b8: 06 80 00 09 bl 400136dc 400136bc: 94 07 00 1a add %i4, %i2, %o2 400136c0: 80 a0 60 00 cmp %g1, 0 400136c4: 12 80 00 12 bne 4001370c 400136c8: 03 10 00 8e sethi %hi(0x40023800), %g1 400136cc: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400136d0: 80 a0 40 0a cmp %g1, %o2 400136d4: 1a 80 00 0e bcc 4001370c 400136d8: 03 10 00 8e sethi %hi(0x40023800), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 400136dc: 90 10 00 10 mov %l0, %o0 400136e0: 7f ff ff 24 call 40013370 400136e4: 92 10 20 00 clr %o1 if ( status ) 400136e8: 80 a2 20 00 cmp %o0, 0 400136ec: 02 80 00 08 be 4001370c 400136f0: 03 10 00 8e sethi %hi(0x40023800), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 400136f4: 40 00 06 e8 call 40015294 <__errno> <== NOT EXECUTED 400136f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400136fc: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40013700: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013704: 81 c7 e0 08 ret <== NOT EXECUTED 40013708: 81 e8 00 00 restore <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001370c: e2 00 61 44 ld [ %g1 + 0x144 ], %l1 40013710: 92 10 00 1a mov %i2, %o1 40013714: a7 3c 60 1f sra %l1, 0x1f, %l3 40013718: 96 10 00 11 mov %l1, %o3 4001371c: 94 10 00 13 mov %l3, %o2 40013720: 40 00 2e c7 call 4001f23c <__moddi3> 40013724: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013728: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001372c: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40013730: 90 10 00 19 mov %i1, %o0 40013734: 92 10 00 1a mov %i2, %o1 40013738: 40 00 2d da call 4001eea0 <__divdi3> 4001373c: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40013740: 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; 40013744: a6 10 00 09 mov %o1, %l3 if ( start_offset ) { 40013748: 80 a4 a0 00 cmp %l2, 0 4001374c: 02 80 00 1b be 400137b8 40013750: 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 ); 40013754: 90 10 00 10 mov %l0, %o0 40013758: 7f ff fd 62 call 40012ce0 4001375c: 94 10 20 00 clr %o2 assert( block_ptr ); 40013760: 80 a2 20 00 cmp %o0, 0 40013764: 32 80 00 0a bne,a 4001378c 40013768: 94 24 40 12 sub %l1, %l2, %o2 4001376c: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013770: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40013774: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013778: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 4001377c: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40013780: 96 12 e0 f0 or %o3, 0xf0, %o3 <== NOT EXECUTED 40013784: 10 80 00 3b b 40013870 <== NOT EXECUTED 40013788: 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; 4001378c: 80 a2 80 1c cmp %o2, %i4 40013790: 38 80 00 02 bgu,a 40013798 40013794: 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 ); 40013798: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 4001379c: 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 ); 400137a0: 90 02 00 12 add %o0, %l2, %o0 src += to_copy; block++; 400137a4: a6 04 e0 01 inc %l3 my_length -= to_copy; 400137a8: b8 27 00 0a sub %i4, %o2, %i4 copied += to_copy; 400137ac: 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 ); 400137b0: 40 00 08 f4 call 40015b80 400137b4: 92 10 00 1b mov %i3, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 400137b8: 03 10 00 8e sethi %hi(0x40023800), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400137bc: a4 10 61 44 or %g1, 0x144, %l2 ! 40023944 400137c0: 10 80 00 17 b 4001381c 400137c4: e2 00 61 44 ld [ %g1 + 0x144 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400137c8: 92 10 00 13 mov %l3, %o1 400137cc: 7f ff fd 45 call 40012ce0 400137d0: 94 10 20 00 clr %o2 assert( block_ptr ); 400137d4: 80 a2 20 00 cmp %o0, 0 400137d8: 32 80 00 0a bne,a 40013800 400137dc: d0 02 00 00 ld [ %o0 ], %o0 400137e0: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 400137e4: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 400137e8: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 400137ec: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 400137f0: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 400137f4: 96 12 e0 f0 or %o3, 0xf0, %o3 <== NOT EXECUTED 400137f8: 10 80 00 1e b 40013870 <== NOT EXECUTED 400137fc: 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 ); 40013800: 92 10 00 1a mov %i2, %o1 src += to_copy; block++; 40013804: a6 04 e0 01 inc %l3 my_length -= to_copy; 40013808: 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( 4001380c: 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; 40013810: 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 ); 40013814: 40 00 08 db call 40015b80 40013818: 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 ) { 4001381c: c2 04 80 00 ld [ %l2 ], %g1 40013820: 80 a7 00 01 cmp %i4, %g1 40013824: 1a bf ff e9 bcc 400137c8 40013828: 90 10 00 10 mov %l0, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4001382c: 80 a7 20 00 cmp %i4, 0 40013830: 02 80 00 17 be 4001388c 40013834: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40013838: 92 10 00 13 mov %l3, %o1 4001383c: 90 10 00 10 mov %l0, %o0 40013840: 7f ff fd 28 call 40012ce0 40013844: 94 10 20 00 clr %o2 assert( block_ptr ); 40013848: 80 a2 20 00 cmp %o0, 0 4001384c: 32 80 00 0b bne,a 40013878 40013850: d0 02 00 00 ld [ %o0 ], %o0 40013854: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40013858: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 4001385c: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40013860: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40013864: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40013868: 96 12 e0 f0 or %o3, 0xf0, %o3 <== NOT EXECUTED 4001386c: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED 40013870: 7f ff c3 04 call 40004480 <__assert_func> <== NOT EXECUTED 40013874: 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; 40013878: 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 ); 4001387c: 92 10 00 1a mov %i2, %o1 40013880: 40 00 08 c0 call 40015b80 40013884: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 40013888: 90 07 bf f8 add %fp, -8, %o0 4001388c: 7f ff c4 1d call 40004900 40013890: 92 10 20 00 clr %o1 40013894: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013898: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4001389c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 400138a0: 81 c7 e0 08 ret 400138a4: 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 15 fc call 4001059c 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 25 call 4000f6c0 <__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 bc call 4000dd40 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 17 call 4000f6c0 <__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 40004058 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004058: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4000405c: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004060: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 40004064: 80 a0 a0 01 cmp %g2, 1 40004068: 22 80 00 08 be,a 40004088 4000406c: f0 20 60 5c st %i0, [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004070: 40 00 44 89 call 40015294 <__errno> <== NOT EXECUTED 40004074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004078: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 4000407c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004080: 81 c7 e0 08 ret <== NOT EXECUTED 40004084: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 40004088: 81 c7 e0 08 ret 4000408c: 91 e8 20 00 restore %g0, 0, %o0 400048e0 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 400048e0: 9d e3 bf a0 save %sp, -96, %sp assert( the_jnode ); 400048e4: 80 a6 20 00 cmp %i0, 0 400048e8: 12 80 00 0a bne 40004910 400048ec: 21 10 00 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 94 sethi %hi(0x40025000), %o3 <== NOT EXECUTED 400048fc: 90 12 23 a0 or %o0, 0x3a0, %o0 <== NOT EXECUTED 40004900: 94 12 a1 88 or %o2, 0x188, %o2 <== NOT EXECUTED 40004904: 96 12 e3 f0 or %o3, 0x3f0, %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 10 ld [ %l0 + 0x110 ], %g1 40004914: 90 06 20 0c add %i0, 0xc, %o0 40004918: 40 00 3e fe call 40014510 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 10 ld [ %l0 + 0x110 ], %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 10 ld [ %l0 + 0x110 ], %g1 40004950: 90 10 20 2f mov 0x2f, %o0 40004954: 40 00 3e ab call 40014400 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 10 ld [ %l0 + 0x110 ], %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 00 mov %o1, %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 10 ld [ %l0 + 0x110 ], %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 18 or %o1, 0x18, %o1 ! 40025418 <__FUNCTION__.5794+0x270> <== NOT EXECUTED 40004998: 40 00 3e 80 call 40014398 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 10 ld [ %l0 + 0x110 ], %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 79 call 40014398 400049b8: 92 12 60 28 or %o1, 0x28, %o1 ! 40025428 <__FUNCTION__.5794+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 10 ld [ %l0 + 0x110 ], %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 d0 call 40014510 <== NOT EXECUTED 400049d4: 90 12 20 38 or %o0, 0x38, %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 a0 or %o0, 0x3a0, %o0 <== NOT EXECUTED 400049ec: 94 12 a1 88 or %o2, 0x188, %o2 <== NOT EXECUTED 400049f0: 96 12 e1 a0 or %o3, 0x1a0, %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 10 ld [ %l0 + 0x110 ], %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 c2 call 40014510 <== NOT EXECUTED 40004a0c: 90 12 20 38 or %o0, 0x38, %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 10 ld [ %l0 + 0x110 ], %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 bb call 40014510 <== NOT EXECUTED 40004a28: 90 12 20 50 or %o0, 0x50, %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 57 call 40014398 <== NOT EXECUTED 40004a40: 92 12 60 68 or %o1, 0x68, %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 a2 call 400160d4 40004a50: 91 ee 23 70 restore %i0, 0x370, %o0 40004a54: 01 00 00 00 nop 4000409c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4000409c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 400040a0: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 400040a4: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400040a8: 80 a0 a0 04 cmp %g2, 4 400040ac: 02 80 00 0a be 400040d4 400040b0: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 400040b4: 40 00 44 78 call 40015294 <__errno> <== NOT EXECUTED 400040b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400040bc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400040c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400040c4: 81 c7 e0 08 ret <== NOT EXECUTED 400040c8: 81 e8 00 00 restore <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 400040cc: c4 2e 40 18 stb %g2, [ %i1 + %i0 ] node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 400040d0: b0 06 20 01 inc %i0 400040d4: 80 a6 00 1a cmp %i0, %i2 400040d8: 1a 80 00 07 bcc 400040f4 400040dc: 01 00 00 00 nop 400040e0: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 400040e4: c6 48 80 18 ldsb [ %g2 + %i0 ], %g3 400040e8: 80 a0 e0 00 cmp %g3, 0 400040ec: 12 bf ff f8 bne 400040cc 400040f0: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; return i; } 400040f4: 81 c7 e0 08 ret 400040f8: 81 e8 00 00 restore 400040fc : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 400040fc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 40004100: e0 06 40 00 ld [ %i1 ], %l0 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 40004104: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 40004108: 90 04 20 0c add %l0, 0xc, %o0 <== NOT EXECUTED 4000410c: 40 00 48 35 call 400161e0 <== NOT EXECUTED 40004110: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 40004114: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40004118: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000411c: 22 80 00 05 be,a 40004130 <== NOT EXECUTED 40004120: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 40004124: 40 00 13 6b call 40008ed0 <_Chain_Extract> <== NOT EXECUTED 40004128: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 4000412c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 40004130: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004134: 90 00 60 50 add %g1, 0x50, %o0 <== NOT EXECUTED 40004138: 40 00 13 5a call 40008ea0 <_Chain_Append> <== NOT EXECUTED 4000413c: c2 24 20 08 st %g1, [ %l0 + 8 ] <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 40004140: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40004144: 40 00 01 ef call 40004900 <== NOT EXECUTED 40004148: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000414c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40004150: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED return 0; } 40004154: 81 c7 e0 08 ret <== NOT EXECUTED 40004158: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 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 8e call 4000c4d8 <_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 73 sethi %hi(0x4001cc00), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000aef0: c2 00 63 f8 ld [ %g1 + 0x3f8 ], %g1 ! 4001cff8 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 c5 call 4000f6c0 <__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 4000415c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4000415c: 9d e3 bf 58 save %sp, -168, %sp int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 40004160: 40 00 47 eb call 4001610c 40004164: 90 10 00 1a mov %i2, %o0 40004168: 96 07 bf fc add %fp, -4, %o3 4000416c: 92 10 00 08 mov %o0, %o1 40004170: a0 07 bf b8 add %fp, -72, %l0 40004174: 90 10 00 1a mov %i2, %o0 40004178: 40 00 31 0a call 400105a0 4000417c: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 40004180: 40 00 47 ce call 400160b8 40004184: 90 10 00 19 mov %i1, %o0 40004188: d0 27 bf e0 st %o0, [ %fp + -32 ] if (info.sym_link.name == NULL) { 4000418c: 80 a2 20 00 cmp %o0, 0 40004190: 12 80 00 08 bne 400041b0 40004194: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one(ENOMEM); 40004198: 40 00 44 3f call 40015294 <__errno> <== NOT EXECUTED 4000419c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400041a0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 400041a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400041a8: 81 c7 e0 08 ret 400041ac: 81 e8 00 00 restore * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 400041b0: 94 10 00 10 mov %l0, %o2 400041b4: 92 10 20 04 mov 4, %o1 400041b8: 17 00 00 28 sethi %hi(0xa000), %o3 400041bc: 98 07 bf e0 add %fp, -32, %o4 400041c0: 96 12 e1 ff or %o3, 0x1ff, %o3 400041c4: 40 00 2d ad call 4000f878 400041c8: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 400041cc: 80 a2 20 00 cmp %o0, 0 400041d0: 12 bf ff f6 bne 400041a8 400041d4: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 400041d8: 40 00 01 a0 call 40004858 <== NOT EXECUTED 400041dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 400041e0: 40 00 44 2d call 40015294 <__errno> <== NOT EXECUTED 400041e4: 01 00 00 00 nop <== NOT EXECUTED 400041e8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400041ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 400041f0: 81 c7 e0 08 ret <== NOT EXECUTED 400041f4: 81 e8 00 00 restore <== NOT EXECUTED 400041f8 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 400041f8: 9d e3 bf 80 save %sp, -128, %sp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 400041fc: e0 06 40 00 ld [ %i1 ], %l0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 40004200: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004204: 80 a0 60 03 cmp %g1, 3 40004208: 12 80 00 29 bne 400042ac 4000420c: a4 10 00 18 mov %i0, %l2 if ( !node->info.hard_link.link_node ) 40004210: e6 04 20 50 ld [ %l0 + 0x50 ], %l3 40004214: 80 a4 e0 00 cmp %l3, 0 40004218: 12 80 00 08 bne 40004238 4000421c: a2 07 bf e4 add %fp, -28, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 40004220: 40 00 44 1d call 40015294 <__errno> <== NOT EXECUTED 40004224: 01 00 00 00 nop <== NOT EXECUTED 40004228: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000422c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004230: 10 80 00 24 b 400042c0 <== NOT EXECUTED 40004234: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 40004238: 92 10 00 19 mov %i1, %o1 4000423c: 94 10 20 14 mov 0x14, %o2 40004240: 40 00 46 50 call 40015b80 40004244: 90 10 00 11 mov %l1, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 40004248: 90 10 00 11 mov %l1, %o0 4000424c: 40 00 2d d8 call 4000f9ac 40004250: e6 27 bf e4 st %l3, [ %fp + -28 ] /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 40004254: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40004258: c6 10 60 30 lduh [ %g1 + 0x30 ], %g3 4000425c: 80 a0 e0 01 cmp %g3, 1 40004260: 12 80 00 0c bne 40004290 40004264: 84 00 ff ff add %g3, -1, %g2 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 40004268: c2 07 bf ec ld [ %fp + -20 ], %g1 4000426c: 92 10 00 11 mov %l1, %o1 40004270: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40004274: 9f c0 40 00 call %g1 40004278: 90 10 00 18 mov %i0, %o0 if ( result != 0 ) 4000427c: 80 a2 20 00 cmp %o0, 0 40004280: 02 80 00 0b be 400042ac 40004284: 90 10 3f ff mov -1, %o0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 40004288: 81 c7 e0 08 ret 4000428c: 91 e8 00 08 restore %g0, %o0, %o0 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 40004290: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40004294: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40004298: 40 00 01 9a call 40004900 4000429c: 92 10 20 00 clr %o1 400042a0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400042a4: c4 07 bf f8 ld [ %fp + -8 ], %g2 400042a8: c4 20 60 44 st %g2, [ %g1 + 0x44 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 400042ac: c2 06 60 08 ld [ %i1 + 8 ], %g1 400042b0: 90 10 00 12 mov %l2, %o0 400042b4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400042b8: 9f c0 40 00 call %g1 400042bc: 92 10 00 19 mov %i1, %o1 return result; } 400042c0: b0 10 00 08 mov %o0, %i0 400042c4: 81 c7 e0 08 ret 400042c8: 81 e8 00 00 restore 400042cc : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 400042cc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 400042d0: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 400042d4: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 400042d8: 80 a0 a0 01 cmp %g2, 1 400042dc: 22 80 00 06 be,a 400042f4 400042e0: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400042e4: 40 00 43 ec call 40015294 <__errno> <== NOT EXECUTED 400042e8: 01 00 00 00 nop <== NOT EXECUTED 400042ec: 10 80 00 08 b 4000430c <== NOT EXECUTED 400042f0: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 400042f4: 80 a0 a0 00 cmp %g2, 0 400042f8: 32 80 00 08 bne,a 40004318 400042fc: c0 20 60 5c clr [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 40004300: 40 00 43 e5 call 40015294 <__errno> <== NOT EXECUTED 40004304: 01 00 00 00 nop <== NOT EXECUTED 40004308: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000430c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004310: 81 c7 e0 08 ret <== NOT EXECUTED 40004314: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 40004318: 81 c7 e0 08 ret 4000431c: 91 e8 20 00 restore %g0, 0, %o0 400031c4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 400031c4: 9d e3 bf a0 save %sp, -96, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 400031c8: 03 10 00 75 sethi %hi(0x4001d400), %g1 400031cc: c2 00 61 58 ld [ %g1 + 0x158 ], %g1 ! 4001d558 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 5c ld [ %g1 + 0x15c ], %g1 ! 4001d55c 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 55 ldub [ %g1 + 0x155 ], %g1 ! 4001d555 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 c0 ldub [ %g1 + 0x3c0 ], %g1 ! 4001cfc0 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 97 call 400100a8 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 55 ldub [ %g1 + 0x155 ], %g1 ! 4001d555 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 62 f0 ld [ %g1 + 0x2f0 ], %o0 ! 4001cef0 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 88 ld [ %i1 + 0x88 ], %i0 4000329c: 40 00 13 66 call 40008034 <_Protected_heap_Get_size> 400032a0: d0 00 62 f0 ld [ %g1 + 0x2f0 ], %o0 400032a4: 90 02 00 18 add %o0, %i0, %o0 400032a8: d0 26 60 88 st %o0, [ %i1 + 0x88 ] 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 62 a8 ld [ %g1 + 0x2a8 ], %l2 ! 400676a8 <== 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 62 e0 or %l1, 0x2e0, %l1 ! 4006a2e0 <== 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 62 a4 ld [ %g1 + 0x2a4 ], %l6 <== NOT EXECUTED 40005fd4: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 40005fd8: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40005fdc: 40 00 18 7b call 4000c1c8 <== NOT EXECUTED 40005fe0: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 40005fe4: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 40005fe8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 40005fec: 13 10 01 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 62 e8 or %o1, 0x2e8, %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 62 a4 ld [ %g1 + 0x2a4 ], %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 62 f8 or %o1, 0x2f8, %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 a2 a8 ld [ %l2 + 0x2a8 ], %g1 <== NOT EXECUTED 4000602c: d0 04 62 a4 ld [ %l1 + 0x2a4 ], %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 08 or %o1, 0x308, %o1 ! 4005c308 <== 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 62 a0 ld [ %g1 + 0x2a0 ], %g1 ! 400676a0 <== NOT EXECUTED 40006054: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006058: 12 80 00 08 bne 40006078 <== NOT EXECUTED 4000605c: c2 04 a2 a8 ld [ %l2 + 0x2a8 ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 40006060: d0 04 62 a4 ld [ %l1 + 0x2a4 ], %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 28 or %o1, 0x328, %o1 ! 4005c328 <== 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 62 a4 ld [ %l1 + 0x2a4 ], %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 38 or %o1, 0x338, %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 70 sethi %hi(0x4005c000), %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 50 call 40008e54 <== NOT EXECUTED 40006118: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 4000611c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40006120: 11 10 01 70 sethi %hi(0x4005c000), %o0 <== NOT EXECUTED 40006124: 40 00 0b 4c call 40008e54 <== NOT EXECUTED 40006128: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 4005c3b8 <== 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 70 sethi %hi(0x4005c000), %o0 <== NOT EXECUTED 40006134: 40 00 0b 48 call 40008e54 <== NOT EXECUTED 40006138: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 4005c3d8 <== NOT EXECUTED printk( 4000613c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 40006140: 11 10 01 70 sethi %hi(0x4005c000), %o0 <== NOT EXECUTED 40006144: 40 00 0b 44 call 40008e54 <== NOT EXECUTED 40006148: 90 12 23 f0 or %o0, 0x3f0, %o0 ! 4005c3f0 <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 4000614c: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 40006150: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED 40006154: 40 00 18 1d call 4000c1c8 <== NOT EXECUTED 40006158: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED 4000615c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40006160: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED 40006164: 40 00 0b 3c call 40008e54 <== NOT EXECUTED 40006168: 90 12 20 08 or %o0, 8, %o0 ! 4005c408 <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) 4000616c: d2 06 20 c4 ld [ %i0 + 0xc4 ], %o1 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 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 36 call 40008e54 <== NOT EXECUTED 40006180: 90 12 20 20 or %o0, 0x20, %o0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { 40006184: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 40006188: 12 80 00 07 bne 400061a4 <== NOT EXECUTED 4000618c: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED printk( 40006190: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED 40006194: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40006198: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 4000619c: 40 00 0b 2e call 40008e54 <== NOT EXECUTED 400061a0: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 400061a4: 40 00 1a 40 call 4000caa4 <== NOT EXECUTED 400061a8: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED 400061ac: 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 94 or %l6, 0x394, %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 94 or %i2, 0x294, %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 d0 or %i3, 0x1d0, %i3 40015b2c: aa 15 61 40 or %l5, 0x140, %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> 4001b2e4 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 4001b2e4: 9d e3 bf a0 save %sp, -96, %sp 4001b2e8: 40 00 06 f5 call 4001cebc <_fini> 4001b2ec: 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(); 4001b2f0: 7f ff ff e1 call 4001b274 4001b2f4: 01 00 00 00 nop rtems_shutdown_executive(status); 4001b2f8: 40 00 00 4c call 4001b428 4001b2fc: 90 10 00 18 mov %i0, %o0 4001b300: 30 80 00 00 b,a 4001b300 <_exit+0x1c> <== NOT EXECUTED 4003a788 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4003a788: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4003a78c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4003a790: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4003a794: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4003a798: 7f ff ff 7f call 4003a594 <== NOT EXECUTED 4003a79c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4003a7a0: 01 00 00 00 nop 4000dfac <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4000dfac: 81 c3 e0 08 retl <== NOT EXECUTED 4000dfb0: 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 40028498 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 40028498: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002849c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400284a0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400284a4: 7f ff ff 62 call 4002822c <== NOT EXECUTED 400284a8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400284ac: 01 00 00 00 nop 400286e0 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 400286e0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400286e4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400286e8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400286ec: 7f ff ff c0 call 400285ec <== NOT EXECUTED 400286f0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400286f4: 01 00 00 00 nop 4001b3f4 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 4001b3f4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4001b3f8: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4001b3fc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001b400: 40 00 00 17 call 4001b45c <== NOT EXECUTED 4001b404: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001b408: 01 00 00 00 nop 4005ab24 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 4005ab24: 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 ); 4005ab28: 7f fe b3 c5 call 40007a3c <== NOT EXECUTED 4005ab2c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 4005ab30: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4005ab34: 32 80 00 17 bne,a 4005ab90 <_rename_r+0x6c> <== NOT EXECUTED 4005ab38: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 4005ab3c: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED 4005ab40: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005ab44: 02 80 00 06 be 4005ab5c <_rename_r+0x38> <== NOT EXECUTED 4005ab48: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005ab4c: 02 80 00 04 be 4005ab5c <_rename_r+0x38> <== NOT EXECUTED 4005ab50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ab54: 12 80 00 07 bne 4005ab70 <_rename_r+0x4c> <== NOT EXECUTED 4005ab58: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4005ab5c: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4005ab60: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 40066428 <== NOT EXECUTED 4005ab64: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 4005ab68: 10 80 00 05 b 4005ab7c <_rename_r+0x58> <== NOT EXECUTED 4005ab6c: 92 02 60 18 add %o1, 0x18, %o1 <== NOT EXECUTED 4005ab70: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 <== NOT EXECUTED 4005ab74: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 4005ab78: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 4005ab7c: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005ab80: 7f ff a3 ad call 40043a34 <== NOT EXECUTED 4005ab84: 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; 4005ab88: 10 80 00 0c b 4005abb8 <_rename_r+0x94> <== NOT EXECUTED 4005ab8c: 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, 4005ab90: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4005ab94: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 4005ab98: 96 07 bf d4 add %fp, -44, %o3 <== NOT EXECUTED 4005ab9c: 98 10 20 00 clr %o4 <== NOT EXECUTED 4005aba0: 7f fe b3 f5 call 40007b74 <== NOT EXECUTED 4005aba4: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 4005aba8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4005abac: 12 80 00 2b bne 4005ac58 <_rename_r+0x134> <== NOT EXECUTED 4005abb0: 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; 4005abb4: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005abb8: a6 07 bf e8 add %fp, -24, %l3 <== NOT EXECUTED 4005abbc: a4 07 bf d4 add %fp, -44, %l2 <== NOT EXECUTED 4005abc0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4005abc4: 7f ff a3 9c call 40043a34 <== NOT EXECUTED 4005abc8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED name = old + old_parent_pathlen; 4005abcc: b2 06 40 10 add %i1, %l0, %i1 <== NOT EXECUTED 4005abd0: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4005abd4: 7f ff b2 04 call 400473e4 <== NOT EXECUTED 4005abd8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005abdc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005abe0: 7f fe b3 85 call 400079f4 <== NOT EXECUTED 4005abe4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005abe8: b2 06 40 08 add %i1, %o0, %i1 <== NOT EXECUTED 4005abec: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4005abf0: 7f ff b1 fd call 400473e4 <== NOT EXECUTED 4005abf4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005abf8: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED 4005abfc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4005ac00: 94 10 20 00 clr %o2 <== NOT EXECUTED 4005ac04: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4005ac08: 7f fe b3 9f call 40007a84 <== NOT EXECUTED 4005ac0c: 98 10 20 00 clr %o4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 4005ac10: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4005ac14: 22 80 00 13 be,a 4005ac60 <_rename_r+0x13c> <== NOT EXECUTED 4005ac18: c2 4e 80 00 ldsb [ %i2 ], %g1 <== NOT EXECUTED if ( free_old_parentloc ) 4005ac1c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ac20: 02 80 00 0b be 4005ac4c <_rename_r+0x128> <== NOT EXECUTED 4005ac24: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005ac28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ac2c: 02 80 00 08 be 4005ac4c <_rename_r+0x128> <== NOT EXECUTED 4005ac30: 01 00 00 00 nop <== NOT EXECUTED 4005ac34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005ac38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ac3c: 02 80 00 04 be 4005ac4c <_rename_r+0x128> <== NOT EXECUTED 4005ac40: 01 00 00 00 nop <== NOT EXECUTED 4005ac44: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ac48: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 4005ac4c: 7f ff 96 a7 call 400406e8 <__errno> <== NOT EXECUTED 4005ac50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005ac54: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 4005ac58: 81 c7 e0 08 ret <== NOT EXECUTED 4005ac5c: 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 ); 4005ac60: 80 a0 60 5c cmp %g1, 0x5c <== NOT EXECUTED 4005ac64: 02 80 00 06 be 4005ac7c <_rename_r+0x158> <== NOT EXECUTED 4005ac68: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4005ac6c: 02 80 00 04 be 4005ac7c <_rename_r+0x158> <== NOT EXECUTED 4005ac70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ac74: 12 80 00 0a bne 4005ac9c <_rename_r+0x178> <== NOT EXECUTED 4005ac78: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4005ac7c: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4005ac80: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 40066428 <== NOT EXECUTED 4005ac84: 90 07 bf c0 add %fp, -64, %o0 <== NOT EXECUTED 4005ac88: 92 02 60 18 add %o1, 0x18, %o1 <== NOT EXECUTED 4005ac8c: 7f ff a3 6a call 40043a34 <== NOT EXECUTED 4005ac90: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005ac94: 10 80 00 08 b 4005acb4 <_rename_r+0x190> <== NOT EXECUTED 4005ac98: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4005ac9c: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 <== NOT EXECUTED 4005aca0: 90 07 bf c0 add %fp, -64, %o0 <== NOT EXECUTED 4005aca4: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 4005aca8: 7f ff a3 63 call 40043a34 <== NOT EXECUTED 4005acac: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4005acb0: 90 10 20 00 clr %o0 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 4005acb4: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005acb8: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4005acbc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005acc0: 02 80 00 61 be 4005ae44 <_rename_r+0x320> <== NOT EXECUTED 4005acc4: 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 ); 4005acc8: 90 06 80 08 add %i2, %o0, %o0 <== NOT EXECUTED 4005accc: a0 07 bf c0 add %fp, -64, %l0 <== NOT EXECUTED 4005acd0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005acd4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if ( result != 0 ) { 4005acd8: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 4005acdc: 02 80 00 28 be 4005ad7c <_rename_r+0x258> <== NOT EXECUTED 4005ace0: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005ace4: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005ace8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005acec: 02 80 00 09 be 4005ad10 <_rename_r+0x1ec> <== NOT EXECUTED 4005acf0: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005acf4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005acf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005acfc: 02 80 00 05 be 4005ad10 <_rename_r+0x1ec> <== NOT EXECUTED 4005ad00: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ad04: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ad08: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005ad0c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ad10: 02 80 00 0d be 4005ad44 <_rename_r+0x220> <== NOT EXECUTED 4005ad14: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005ad18: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005ad1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ad20: 22 80 00 09 be,a 4005ad44 <_rename_r+0x220> <== NOT EXECUTED 4005ad24: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ad28: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005ad2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ad30: 22 80 00 05 be,a 4005ad44 <_rename_r+0x220> <== NOT EXECUTED 4005ad34: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ad38: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ad3c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005ad40: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ad44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ad48: 02 80 00 08 be 4005ad68 <_rename_r+0x244> <== NOT EXECUTED 4005ad4c: 01 00 00 00 nop <== NOT EXECUTED 4005ad50: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005ad54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ad58: 02 80 00 04 be 4005ad68 <_rename_r+0x244> <== NOT EXECUTED 4005ad5c: 01 00 00 00 nop <== NOT EXECUTED 4005ad60: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ad64: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 4005ad68: 7f ff 96 60 call 400406e8 <__errno> <== NOT EXECUTED 4005ad6c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005ad70: e4 22 00 00 st %l2, [ %o0 ] <== NOT EXECUTED 4005ad74: 81 c7 e0 08 ret <== NOT EXECUTED 4005ad78: 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 ) { 4005ad7c: c6 07 bf e4 ld [ %fp + -28 ], %g3 <== NOT EXECUTED 4005ad80: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 4005ad84: 02 80 00 26 be 4005ae1c <_rename_r+0x2f8> <== NOT EXECUTED 4005ad88: c4 07 bf cc ld [ %fp + -52 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005ad8c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4005ad90: 02 80 00 09 be 4005adb4 <_rename_r+0x290> <== NOT EXECUTED 4005ad94: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ad98: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4005ad9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ada0: 02 80 00 05 be 4005adb4 <_rename_r+0x290> <== NOT EXECUTED 4005ada4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ada8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005adac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005adb0: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005adb4: 02 80 00 0d be 4005ade8 <_rename_r+0x2c4> <== NOT EXECUTED 4005adb8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005adbc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005adc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005adc4: 22 80 00 09 be,a 4005ade8 <_rename_r+0x2c4> <== NOT EXECUTED 4005adc8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005adcc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005add0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005add4: 22 80 00 05 be,a 4005ade8 <_rename_r+0x2c4> <== NOT EXECUTED 4005add8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005addc: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ade0: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005ade4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ade8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005adec: 02 80 00 08 be 4005ae0c <_rename_r+0x2e8> <== NOT EXECUTED 4005adf0: 01 00 00 00 nop <== NOT EXECUTED 4005adf4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005adf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005adfc: 02 80 00 04 be 4005ae0c <_rename_r+0x2e8> <== NOT EXECUTED 4005ae00: 01 00 00 00 nop <== NOT EXECUTED 4005ae04: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ae08: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 4005ae0c: 7f ff 96 37 call 400406e8 <__errno> <== NOT EXECUTED 4005ae10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005ae14: 10 80 00 26 b 4005aeac <_rename_r+0x388> <== NOT EXECUTED 4005ae18: 82 10 20 12 mov 0x12, %g1 <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 4005ae1c: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 <== NOT EXECUTED 4005ae20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae24: 12 80 00 25 bne 4005aeb8 <_rename_r+0x394> <== NOT EXECUTED 4005ae28: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005ae2c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4005ae30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae34: 02 80 00 05 be 4005ae48 <_rename_r+0x324> <== NOT EXECUTED 4005ae38: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ae3c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ae40: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005ae44: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005ae48: 02 80 00 0d be 4005ae7c <_rename_r+0x358> <== NOT EXECUTED 4005ae4c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005ae50: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005ae54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae58: 22 80 00 09 be,a 4005ae7c <_rename_r+0x358> <== NOT EXECUTED 4005ae5c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ae60: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005ae64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae68: 22 80 00 05 be,a 4005ae7c <_rename_r+0x358> <== NOT EXECUTED 4005ae6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ae70: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ae74: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005ae78: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005ae7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae80: 02 80 00 08 be 4005aea0 <_rename_r+0x37c> <== NOT EXECUTED 4005ae84: 01 00 00 00 nop <== NOT EXECUTED 4005ae88: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005ae8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005ae90: 02 80 00 04 be 4005aea0 <_rename_r+0x37c> <== NOT EXECUTED 4005ae94: 01 00 00 00 nop <== NOT EXECUTED 4005ae98: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005ae9c: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4005aea0: 7f ff 96 12 call 400406e8 <__errno> <== NOT EXECUTED 4005aea4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4005aea8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4005aeac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4005aeb0: 81 c7 e0 08 ret <== NOT EXECUTED 4005aeb4: 81 e8 00 00 restore <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 4005aeb8: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 4005aebc: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED 4005aec0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005aec4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 4005aec8: c2 07 bf cc ld [ %fp + -52 ], %g1 <== NOT EXECUTED 4005aecc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005aed0: 02 80 00 08 be 4005aef0 <_rename_r+0x3cc> <== NOT EXECUTED 4005aed4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4005aed8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005aedc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005aee0: 02 80 00 05 be 4005aef4 <_rename_r+0x3d0> <== NOT EXECUTED 4005aee4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005aee8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005aeec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_old_parentloc ) 4005aef0: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4005aef4: 02 80 00 0d be 4005af28 <_rename_r+0x404> <== NOT EXECUTED 4005aef8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 4005aefc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 4005af00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af04: 22 80 00 09 be,a 4005af28 <_rename_r+0x404> <== NOT EXECUTED 4005af08: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005af0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005af10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af14: 22 80 00 05 be,a 4005af28 <_rename_r+0x404> <== NOT EXECUTED 4005af18: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005af1c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005af20: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 4005af24: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4005af28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af2c: 02 80 00 08 be 4005af4c <_rename_r+0x428> <== NOT EXECUTED 4005af30: 01 00 00 00 nop <== NOT EXECUTED 4005af34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4005af38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4005af3c: 02 80 00 04 be 4005af4c <_rename_r+0x428> <== NOT EXECUTED 4005af40: 01 00 00 00 nop <== NOT EXECUTED 4005af44: 9f c0 40 00 call %g1 <== NOT EXECUTED 4005af48: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED return result; } 4005af4c: 81 c7 e0 08 ret <== NOT EXECUTED 4005af50: 81 e8 00 00 restore <== NOT EXECUTED 40009488 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40009488: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000948c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40009490: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40009494: 7f ff ff c0 call 40009394 <== NOT EXECUTED 40009498: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000949c: 01 00 00 00 nop 4000f038 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4000f038: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000f03c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000f040: 7f ff ff 58 call 4000eda0 <== NOT EXECUTED 4000f044: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000f048: 01 00 00 00 nop 40026e74 : #include int chdir( const char *pathname ) { 40026e74: 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 ); 40026e78: 40 00 81 5b call 400473e4 40026e7c: 90 10 00 18 mov %i0, %o0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40026e80: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 40026e84: 92 10 00 08 mov %o0, %o1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40026e88: 94 10 20 01 mov 1, %o2 40026e8c: 90 10 00 18 mov %i0, %o0 40026e90: 96 10 00 10 mov %l0, %o3 40026e94: 98 10 20 01 mov 1, %o4 40026e98: 7f ff 83 37 call 40007b74 40026e9c: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 40026ea0: 80 a2 20 00 cmp %o0, 0 40026ea4: 12 80 00 37 bne 40026f80 40026ea8: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 40026eac: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40026eb0: 80 a0 60 00 cmp %g1, 0 40026eb4: 12 80 00 0c bne 40026ee4 40026eb8: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40026ebc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40026ec0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40026ec4: 02 80 00 04 be 40026ed4 <== NOT EXECUTED 40026ec8: 01 00 00 00 nop <== NOT EXECUTED 40026ecc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40026ed0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40026ed4: 40 00 66 05 call 400406e8 <__errno> <== NOT EXECUTED 40026ed8: 01 00 00 00 nop <== NOT EXECUTED 40026edc: 10 80 00 14 b 40026f2c <== NOT EXECUTED 40026ee0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40026ee4: 9f c0 40 00 call %g1 40026ee8: 90 10 00 10 mov %l0, %o0 40026eec: 80 a2 20 01 cmp %o0, 1 40026ef0: 02 80 00 12 be 40026f38 40026ef4: 03 10 01 99 sethi %hi(0x40066400), %g1 rtems_filesystem_freenode( &loc ); 40026ef8: c2 07 bf f8 ld [ %fp + -8 ], %g1 40026efc: 80 a0 60 00 cmp %g1, 0 40026f00: 02 80 00 08 be 40026f20 40026f04: 01 00 00 00 nop 40026f08: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40026f0c: 80 a0 60 00 cmp %g1, 0 40026f10: 02 80 00 04 be 40026f20 40026f14: 01 00 00 00 nop 40026f18: 9f c0 40 00 call %g1 40026f1c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40026f20: 40 00 65 f2 call 400406e8 <__errno> 40026f24: 01 00 00 00 nop 40026f28: 82 10 20 14 mov 0x14, %g1 ! 14 40026f2c: c2 22 00 00 st %g1, [ %o0 ] 40026f30: 81 c7 e0 08 ret 40026f34: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 40026f38: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 40026f3c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40026f40: 80 a0 60 00 cmp %g1, 0 40026f44: 22 80 00 09 be,a 40026f68 40026f48: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40026f4c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006641c 40026f50: 80 a0 60 00 cmp %g1, 0 40026f54: 22 80 00 05 be,a 40026f68 40026f58: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40026f5c: 9f c0 40 00 call %g1 40026f60: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 40026f64: 03 10 01 99 sethi %hi(0x40066400), %g1 40026f68: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 ! 40066428 40026f6c: 92 07 bf ec add %fp, -20, %o1 40026f70: 90 02 20 04 add %o0, 4, %o0 40026f74: 94 10 20 14 mov 0x14, %o2 40026f78: 40 00 72 af call 40043a34 40026f7c: b0 10 20 00 clr %i0 return 0; } 40026f80: 81 c7 e0 08 ret 40026f84: 81 e8 00 00 restore 40007834 : int chmod( const char *path, mode_t mode ) { 40007834: 9d e3 bf 88 save %sp, -120, %sp int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 40007838: 40 00 fe eb call 400473e4 4000783c: 90 10 00 18 mov %i0, %o0 40007840: a0 07 bf ec add %fp, -20, %l0 40007844: 92 10 00 08 mov %o0, %o1 40007848: 94 10 20 00 clr %o2 4000784c: 90 10 00 18 mov %i0, %o0 40007850: 96 10 00 10 mov %l0, %o3 40007854: 98 10 20 01 mov 1, %o4 40007858: 40 00 00 c7 call 40007b74 4000785c: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40007860: 80 a2 20 00 cmp %o0, 0 40007864: 12 80 00 24 bne 400078f4 40007868: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 4000786c: 80 a0 60 00 cmp %g1, 0 40007870: 32 80 00 10 bne,a 400078b0 40007874: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 40007878: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000787c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007880: 02 80 00 08 be 400078a0 <== NOT EXECUTED 40007884: 01 00 00 00 nop <== NOT EXECUTED 40007888: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000788c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007890: 02 80 00 04 be 400078a0 <== NOT EXECUTED 40007894: 01 00 00 00 nop <== NOT EXECUTED 40007898: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000789c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 400078a0: 40 00 e3 92 call 400406e8 <__errno> <== NOT EXECUTED 400078a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400078a8: 10 80 00 12 b 400078f0 <== NOT EXECUTED 400078ac: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 400078b0: 80 a0 60 00 cmp %g1, 0 400078b4: 12 80 00 12 bne 400078fc 400078b8: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 400078bc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400078c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400078c4: 02 80 00 08 be 400078e4 <== NOT EXECUTED 400078c8: 01 00 00 00 nop <== NOT EXECUTED 400078cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400078d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400078d4: 02 80 00 04 be 400078e4 <== NOT EXECUTED 400078d8: 01 00 00 00 nop <== NOT EXECUTED 400078dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400078e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400078e4: 40 00 e3 81 call 400406e8 <__errno> <== NOT EXECUTED 400078e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400078ec: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400078f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400078f4: 81 c7 e0 08 ret 400078f8: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 400078fc: 90 10 00 10 mov %l0, %o0 40007900: 9f c0 40 00 call %g1 40007904: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40007908: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000790c: 80 a0 60 00 cmp %g1, 0 40007910: 02 bf ff f9 be 400078f4 40007914: b0 10 00 08 mov %o0, %i0 40007918: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000791c: 80 a0 60 00 cmp %g1, 0 40007920: 02 80 00 04 be 40007930 40007924: 01 00 00 00 nop 40007928: 9f c0 40 00 call %g1 4000792c: 90 10 00 10 mov %l0, %o0 return result; } 40007930: 81 c7 e0 08 ret 40007934: 81 e8 00 00 restore 40026f88 : int chown( const char *path, uid_t owner, gid_t group ) { 40026f88: 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 ) ) 40026f8c: 40 00 81 16 call 400473e4 40026f90: 90 10 00 18 mov %i0, %o0 40026f94: a0 07 bf ec add %fp, -20, %l0 40026f98: 92 10 00 08 mov %o0, %o1 40026f9c: 94 10 20 00 clr %o2 40026fa0: 90 10 00 18 mov %i0, %o0 40026fa4: 96 10 00 10 mov %l0, %o3 40026fa8: 98 10 20 01 mov 1, %o4 40026fac: 7f ff 82 f2 call 40007b74 40026fb0: b0 10 3f ff mov -1, %i0 40026fb4: 80 a2 20 00 cmp %o0, 0 40026fb8: 12 80 00 10 bne 40026ff8 40026fbc: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 40026fc0: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 40026fc4: 80 a0 60 00 cmp %g1, 0 40026fc8: 12 80 00 0e bne 40027000 40026fcc: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40026fd0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40026fd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40026fd8: 02 80 00 04 be 40026fe8 <== NOT EXECUTED 40026fdc: 01 00 00 00 nop <== NOT EXECUTED 40026fe0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40026fe4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40026fe8: 40 00 65 c0 call 400406e8 <__errno> <== NOT EXECUTED 40026fec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40026ff0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40026ff4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40026ff8: 81 c7 e0 08 ret 40026ffc: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 40027000: 95 2e a0 10 sll %i2, 0x10, %o2 40027004: 93 32 60 10 srl %o1, 0x10, %o1 40027008: 95 32 a0 10 srl %o2, 0x10, %o2 4002700c: 9f c0 40 00 call %g1 40027010: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40027014: c2 07 bf f8 ld [ %fp + -8 ], %g1 40027018: 80 a0 60 00 cmp %g1, 0 4002701c: 02 bf ff f7 be 40026ff8 40027020: b0 10 00 08 mov %o0, %i0 40027024: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40027028: 80 a0 60 00 cmp %g1, 0 4002702c: 02 80 00 04 be 4002703c 40027030: 01 00 00 00 nop 40027034: 9f c0 40 00 call %g1 40027038: 90 10 00 10 mov %l0, %o0 return result; } 4002703c: 81 c7 e0 08 ret 40027040: 81 e8 00 00 restore 40027044 : #include int chroot( const char *pathname ) { 40027044: 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) { 40027048: 23 10 01 99 sethi %hi(0x40066400), %l1 4002704c: e0 04 60 28 ld [ %l1 + 0x28 ], %l0 ! 40066428 40027050: 03 10 01 a8 sethi %hi(0x4006a000), %g1 40027054: 82 10 63 48 or %g1, 0x348, %g1 ! 4006a348 40027058: 80 a4 00 01 cmp %l0, %g1 4002705c: 12 80 00 0e bne 40027094 40027060: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 40027064: 40 00 06 75 call 40028a38 40027068: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4002706c: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 40027070: 80 a0 40 10 cmp %g1, %l0 40027074: 12 80 00 08 bne 40027094 40027078: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002707c: 40 00 65 9b call 400406e8 <__errno> <== NOT EXECUTED 40027080: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40027084: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40027088: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002708c: 81 c7 e0 08 ret <== NOT EXECUTED 40027090: 81 e8 00 00 restore <== NOT EXECUTED } result = chdir(pathname); 40027094: 7f ff ff 78 call 40026e74 40027098: 90 10 00 18 mov %i0, %o0 if (result) { 4002709c: 80 a2 20 00 cmp %o0, 0 400270a0: 12 80 00 0b bne 400270cc 400270a4: 11 10 01 75 sethi %hi(0x4005d400), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 400270a8: 92 10 20 01 mov 1, %o1 400270ac: 90 12 23 f8 or %o0, 0x3f8, %o0 400270b0: 94 10 20 00 clr %o2 400270b4: 96 07 bf ec add %fp, -20, %o3 400270b8: 7f ff 82 af call 40007b74 400270bc: 98 10 20 00 clr %o4 400270c0: 80 a2 20 00 cmp %o0, 0 400270c4: 02 80 00 0a be 400270ec 400270c8: 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 ); 400270cc: 40 00 65 87 call 400406e8 <__errno> <== NOT EXECUTED 400270d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400270d4: 40 00 65 85 call 400406e8 <__errno> <== NOT EXECUTED 400270d8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400270dc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400270e0: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 400270e4: 81 c7 e0 08 ret <== NOT EXECUTED 400270e8: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 400270ec: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 400270f0: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 400270f4: 80 a0 60 00 cmp %g1, 0 400270f8: 22 80 00 09 be,a 4002711c 400270fc: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40027100: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006641c 40027104: 80 a0 60 00 cmp %g1, 0 40027108: 22 80 00 05 be,a 4002711c 4002710c: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40027110: 9f c0 40 00 call %g1 40027114: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_root = loc; 40027118: 03 10 01 99 sethi %hi(0x40066400), %g1 4002711c: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 ! 40066428 40027120: 92 07 bf ec add %fp, -20, %o1 40027124: 94 10 20 14 mov 0x14, %o2 40027128: 90 02 20 18 add %o0, 0x18, %o0 4002712c: 40 00 72 42 call 40043a34 40027130: b0 10 20 00 clr %i0 return 0; } 40027134: 81 c7 e0 08 ret 40027138: 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 4b call 4000b928 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 b8 or %l3, 0x3b8, %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 00 call 4000d450 <__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 95 call 4000e2d0 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 34 ld [ %g1 + 0x134 ], %g1 ! 40011134 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 60 e8 or %g1, 0xe8, %g1 ! 400110e8 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 a0 or %g1, 0xa0, %g1 ! 400110a0 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 da call 4000d450 <__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 b8 ld [ %l1 + 0x3b8 ], %g1 ! 40010fb8 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 b8 ld [ %l1 + 0x3b8 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40002be4: 40 00 2a 1b call 4000d450 <__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 72 call 4000ddd0 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 60 e8 or %g1, 0xe8, %g1 ! 400110e8 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 a0 or %g1, 0xa0, %g1 ! 400110a0 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 ec call 4000d450 <__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 b8 or %i1, 0x3b8, %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 de call 4000d450 <__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 f0 call 4000e0b8 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 d1 call 4000d450 <__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 c4 call 4000d450 <__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 21 call 4000e1fc 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 66 call 4000d450 <__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 4000d26c : */ int device_close( rtems_libio_t *iop ) { 4000d26c: 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; 4000d270: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000d274: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 4000d278: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000d27c: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000d280: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d284: 94 07 bf f4 add %fp, -12, %o2 4000d288: 40 00 05 28 call 4000e728 4000d28c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000d290: 80 a2 20 00 cmp %o0, 0 4000d294: 02 80 00 05 be 4000d2a8 4000d298: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000d29c: 40 00 06 a0 call 4000ed1c <== NOT EXECUTED 4000d2a0: 01 00 00 00 nop <== NOT EXECUTED 4000d2a4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000d2a8: 81 c7 e0 08 ret 4000d2ac: 81 e8 00 00 restore 4000d16c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000d16c: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000d170: 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; 4000d174: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 4000d178: 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; 4000d17c: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000d180: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d184: 40 00 05 7f call 4000e780 4000d188: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d18c: 80 a2 20 00 cmp %o0, 0 4000d190: 22 80 00 06 be,a 4000d1a8 4000d194: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 4000d198: 40 00 06 e1 call 4000ed1c <== NOT EXECUTED 4000d19c: 01 00 00 00 nop <== NOT EXECUTED 4000d1a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000d1a4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return args.ioctl_return; } 4000d1a8: b0 10 00 08 mov %o0, %i0 4000d1ac: 81 c7 e0 08 ret 4000d1b0: 81 e8 00 00 restore 4000d2b0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000d2b0: 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; 4000d2b4: 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; 4000d2b8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000d2bc: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 4000d2c0: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 4000d2c4: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 4000d2c8: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d2cc: 94 07 bf f4 add %fp, -12, %o2 4000d2d0: 40 00 05 42 call 4000e7d8 4000d2d4: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d2d8: 80 a2 20 00 cmp %o0, 0 4000d2dc: 02 80 00 05 be 4000d2f0 4000d2e0: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000d2e4: 40 00 06 8e call 4000ed1c <== NOT EXECUTED 4000d2e8: 01 00 00 00 nop <== NOT EXECUTED 4000d2ec: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 4000d2f0: 81 c7 e0 08 ret 4000d2f4: 81 e8 00 00 restore 4000d210 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000d210: 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; 4000d214: 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; 4000d218: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4000d21c: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 4000d220: 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; 4000d224: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000d228: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 4000d22c: 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; 4000d230: 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; 4000d234: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 4000d238: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000d23c: 40 00 05 7d call 4000e830 <== NOT EXECUTED 4000d240: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d244: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d248: 22 80 00 06 be,a 4000d260 <== NOT EXECUTED 4000d24c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000d250: 40 00 06 b3 call 4000ed1c <== NOT EXECUTED 4000d254: 01 00 00 00 nop <== NOT EXECUTED 4000d258: 81 c7 e0 08 ret <== NOT EXECUTED 4000d25c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000d260: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000d264: 81 c7 e0 08 ret <== NOT EXECUTED 4000d268: 81 e8 00 00 restore <== NOT EXECUTED 4000d1b4 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000d1b4: 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; 4000d1b8: 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; 4000d1bc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 4000d1c0: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 4000d1c4: 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; 4000d1c8: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 4000d1cc: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 4000d1d0: 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; 4000d1d4: 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; 4000d1d8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 4000d1dc: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000d1e0: 40 00 05 aa call 4000e888 4000d1e4: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d1e8: 80 a2 20 00 cmp %o0, 0 4000d1ec: 22 80 00 06 be,a 4000d204 4000d1f0: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 4000d1f4: 40 00 06 ca call 4000ed1c <== NOT EXECUTED 4000d1f8: 01 00 00 00 nop <== NOT EXECUTED 4000d1fc: 81 c7 e0 08 ret <== NOT EXECUTED 4000d200: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000d204: b0 10 00 08 mov %o0, %i0 4000d208: 81 c7 e0 08 ret 4000d20c: 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 98 ld [ %g1 + 0x98 ], %g2 ! 4001d098 <__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 4002778c : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 4002778c: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027790: d0 00 63 a4 ld [ %g1 + 0x3a4 ], %o0 ! 40069fa4 <== NOT EXECUTED 40027794: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027798: 02 80 00 05 be 400277ac <== NOT EXECUTED 4002779c: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 400277a0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400277a4: 40 00 64 29 call 40040848 <== NOT EXECUTED 400277a8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400277ac: 81 c3 e0 08 retl <== NOT EXECUTED 400277b0: 01 00 00 00 nop 400277b4 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 400277b4: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 400277b8: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 40069ebc <== NOT EXECUTED 400277bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400277c0: 02 80 00 05 be 400277d4 <== NOT EXECUTED 400277c4: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 400277c8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400277cc: 40 00 64 1f call 40040848 <== NOT EXECUTED 400277d0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400277d4: 81 c3 e0 08 retl <== NOT EXECUTED 400277d8: 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 98 or %l2, 0x98, %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 38 or %l3, 0x38, %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 40004848: a8 15 20 30 or %l4, 0x30, %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 4003a3f8 : #include int fchdir( int fd ) { 4003a3f8: 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 ); 4003a3fc: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED 4003a400: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 40066134 <== NOT EXECUTED 4003a404: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4003a408: 1a 80 00 0c bcc 4003a438 <== NOT EXECUTED 4003a40c: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4003a410: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 4003a414: e4 00 62 e8 ld [ %g1 + 0x2e8 ], %l2 ! 4006a2e8 <== NOT EXECUTED 4003a418: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 4003a41c: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4003a420: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 4003a424: a4 04 80 18 add %l2, %i0, %l2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4003a428: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 <== NOT EXECUTED 4003a42c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4003a430: 12 80 00 06 bne 4003a448 <== NOT EXECUTED 4003a434: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 4003a438: 40 00 18 ac call 400406e8 <__errno> <== NOT EXECUTED 4003a43c: 01 00 00 00 nop <== NOT EXECUTED 4003a440: 10 80 00 1b b 4003a4ac <== NOT EXECUTED 4003a444: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4003a448: 32 80 00 06 bne,a 4003a460 <== NOT EXECUTED 4003a44c: c2 04 a0 28 ld [ %l2 + 0x28 ], %g1 <== NOT EXECUTED 4003a450: 40 00 18 a6 call 400406e8 <__errno> <== NOT EXECUTED 4003a454: 01 00 00 00 nop <== NOT EXECUTED 4003a458: 10 80 00 15 b 4003a4ac <== NOT EXECUTED 4003a45c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4003a460: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003a464: 02 80 00 06 be 4003a47c <== NOT EXECUTED 4003a468: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4003a46c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 4003a470: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003a474: 32 80 00 06 bne,a 4003a48c <== NOT EXECUTED 4003a478: a4 04 a0 1c add %l2, 0x1c, %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4003a47c: 40 00 18 9b call 400406e8 <__errno> <== NOT EXECUTED 4003a480: 01 00 00 00 nop <== NOT EXECUTED 4003a484: 10 80 00 0a b 4003a4ac <== NOT EXECUTED 4003a488: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4003a48c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003a490: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4003a494: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4003a498: 02 80 00 07 be 4003a4b4 <== NOT EXECUTED 4003a49c: 23 10 01 99 sethi %hi(0x40066400), %l1 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 4003a4a0: 40 00 18 92 call 400406e8 <__errno> <== NOT EXECUTED 4003a4a4: 01 00 00 00 nop <== NOT EXECUTED 4003a4a8: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 4003a4ac: 10 80 00 1c b 4003a51c <== NOT EXECUTED 4003a4b0: 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; 4003a4b4: e6 04 60 28 ld [ %l1 + 0x28 ], %l3 <== NOT EXECUTED 4003a4b8: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4003a4bc: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED 4003a4c0: a0 07 bf d8 add %fp, -40, %l0 <== NOT EXECUTED 4003a4c4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4003a4c8: 40 00 25 5b call 40043a34 <== NOT EXECUTED 4003a4cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4003a4d0: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 4003a4d4: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4003a4d8: 40 00 25 57 call 40043a34 <== NOT EXECUTED 4003a4dc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4003a4e0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4003a4e4: 11 10 01 75 sethi %hi(0x4005d400), %o0 <== NOT EXECUTED 4003a4e8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4003a4ec: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 4003a4f0: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED 4003a4f4: 7f ff 35 a0 call 40007b74 <== NOT EXECUTED 4003a4f8: 98 10 20 00 clr %o4 <== NOT EXECUTED 4003a4fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4003a500: 02 80 00 09 be 4003a524 <== NOT EXECUTED 4003a504: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 4003a508: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4003a50c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4003a510: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4003a514: 40 00 25 48 call 40043a34 <== NOT EXECUTED 4003a518: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED return -1; 4003a51c: 81 c7 e0 08 ret <== NOT EXECUTED 4003a520: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 4003a524: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003a528: 22 80 00 09 be,a 4003a54c <== NOT EXECUTED 4003a52c: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4003a530: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4006641c <== NOT EXECUTED 4003a534: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4003a538: 22 80 00 05 be,a 4003a54c <== NOT EXECUTED 4003a53c: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4003a540: 9f c0 40 00 call %g1 <== NOT EXECUTED 4003a544: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4003a548: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4003a54c: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 ! 40066428 <== NOT EXECUTED 4003a550: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED 4003a554: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED 4003a558: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4003a55c: 40 00 25 36 call 40043a34 <== NOT EXECUTED 4003a560: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 4003a564: 81 c7 e0 08 ret <== NOT EXECUTED 4003a568: 81 e8 00 00 restore <== NOT EXECUTED 40027374 : int fchmod( int fd, mode_t mode ) { 40027374: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40027378: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED 4002737c: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 40066134 <== NOT EXECUTED 40027380: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40027384: 1a 80 00 0c bcc 400273b4 <== NOT EXECUTED 40027388: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002738c: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 40027390: d0 00 62 e8 ld [ %g1 + 0x2e8 ], %o0 ! 4006a2e8 <== NOT EXECUTED 40027394: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40027398: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 4002739c: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 400273a0: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 400273a4: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 400273a8: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 400273ac: 12 80 00 06 bne 400273c4 <== NOT EXECUTED 400273b0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 400273b4: 40 00 64 cd call 400406e8 <__errno> <== NOT EXECUTED 400273b8: 01 00 00 00 nop <== NOT EXECUTED 400273bc: 10 80 00 0f b 400273f8 <== NOT EXECUTED 400273c0: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400273c4: 32 80 00 06 bne,a 400273dc <== NOT EXECUTED 400273c8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 <== NOT EXECUTED 400273cc: 40 00 64 c7 call 400406e8 <__errno> <== NOT EXECUTED 400273d0: 01 00 00 00 nop <== NOT EXECUTED 400273d4: 10 80 00 09 b 400273f8 <== NOT EXECUTED 400273d8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 400273dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400273e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400273e4: 32 80 00 08 bne,a 40027404 <== NOT EXECUTED 400273e8: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400273ec: 40 00 64 bf call 400406e8 <__errno> <== NOT EXECUTED 400273f0: 01 00 00 00 nop <== NOT EXECUTED 400273f4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400273f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400273fc: 10 80 00 07 b 40027418 <== NOT EXECUTED 40027400: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 40027404: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED 40027408: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002740c: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED 40027410: 9f c0 40 00 call %g1 <== NOT EXECUTED 40027414: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 40027418: 81 c7 e0 08 ret <== NOT EXECUTED 4002741c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40027420 : int fchown( int fd, uid_t owner, gid_t group ) { 40027420: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40027424: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED 40027428: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 40066134 <== NOT EXECUTED 4002742c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40027430: 1a 80 00 0c bcc 40027460 <== NOT EXECUTED 40027434: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40027438: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 4002743c: d0 00 62 e8 ld [ %g1 + 0x2e8 ], %o0 ! 4006a2e8 <== NOT EXECUTED 40027440: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 40027444: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 40027448: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 4002744c: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40027450: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 40027454: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40027458: 12 80 00 06 bne 40027470 <== NOT EXECUTED 4002745c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40027460: 40 00 64 a2 call 400406e8 <__errno> <== NOT EXECUTED 40027464: 01 00 00 00 nop <== NOT EXECUTED 40027468: 10 80 00 0f b 400274a4 <== NOT EXECUTED 4002746c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40027470: 32 80 00 06 bne,a 40027488 <== NOT EXECUTED 40027474: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 40027478: 40 00 64 9c call 400406e8 <__errno> <== NOT EXECUTED 4002747c: 01 00 00 00 nop <== NOT EXECUTED 40027480: 10 80 00 09 b 400274a4 <== NOT EXECUTED 40027484: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 40027488: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002748c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40027490: 12 80 00 08 bne 400274b0 <== NOT EXECUTED 40027494: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40027498: 40 00 64 94 call 400406e8 <__errno> <== NOT EXECUTED 4002749c: 01 00 00 00 nop <== NOT EXECUTED 400274a0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400274a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400274a8: 10 80 00 07 b 400274c4 <== NOT EXECUTED 400274ac: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 400274b0: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 400274b4: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED 400274b8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 400274bc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400274c0: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 400274c4: 81 c7 e0 08 ret <== NOT EXECUTED 400274c8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4003a594 : int fcntl( int fd, int cmd, ... ) { 4003a594: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003a598: 03 10 01 98 sethi %hi(0x40066000), %g1 4003a59c: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 40066134 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4003a5a0: 84 07 a0 4c add %fp, 0x4c, %g2 4003a5a4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4003a5a8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4003a5ac: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4003a5b0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4003a5b4: 80 a6 00 01 cmp %i0, %g1 4003a5b8: 1a 80 00 0c bcc 4003a5e8 4003a5bc: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 4003a5c0: 07 10 01 a8 sethi %hi(0x4006a000), %g3 4003a5c4: c6 00 e2 e8 ld [ %g3 + 0x2e8 ], %g3 ! 4006a2e8 4003a5c8: 89 2e 20 06 sll %i0, 6, %g4 4003a5cc: a1 2e 20 03 sll %i0, 3, %l0 4003a5d0: a0 04 00 04 add %l0, %g4, %l0 4003a5d4: a0 00 c0 10 add %g3, %l0, %l0 rtems_libio_check_is_open(iop); 4003a5d8: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 4003a5dc: 80 8a 21 00 btst 0x100, %o0 4003a5e0: 12 80 00 06 bne 4003a5f8 4003a5e4: 80 a6 60 09 cmp %i1, 9 4003a5e8: 40 00 18 40 call 400406e8 <__errno> <== NOT EXECUTED 4003a5ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4003a5f0: 10 80 00 51 b 4003a734 <== NOT EXECUTED 4003a5f4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4003a5f8: 18 80 00 4c bgu 4003a728 4003a5fc: 89 2e 60 02 sll %i1, 2, %g4 4003a600: 1b 10 00 e9 sethi %hi(0x4003a400), %o5 4003a604: 9a 13 61 6c or %o5, 0x16c, %o5 ! 4003a56c 4003a608: c8 03 40 04 ld [ %o5 + %g4 ], %g4 4003a60c: 81 c1 00 00 jmp %g4 4003a610: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 4003a614: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 4003a618: 80 a0 a0 00 cmp %g2, 0 4003a61c: 02 80 00 09 be 4003a640 4003a620: 80 a0 80 01 cmp %g2, %g1 diop = rtems_libio_iop( fd2 ); 4003a624: 1a 80 00 0c bcc 4003a654 <== NOT EXECUTED 4003a628: a2 10 20 00 clr %l1 <== NOT EXECUTED 4003a62c: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 4003a630: a3 28 a0 03 sll %g2, 3, %l1 <== NOT EXECUTED 4003a634: a2 04 40 01 add %l1, %g1, %l1 <== NOT EXECUTED 4003a638: 10 80 00 07 b 4003a654 <== NOT EXECUTED 4003a63c: a2 00 c0 11 add %g3, %l1, %l1 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 4003a640: 7f ff 36 67 call 40007fdc 4003a644: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 4003a648: a2 92 20 00 orcc %o0, 0, %l1 4003a64c: 02 80 00 4d be 4003a780 4003a650: 01 00 00 00 nop break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4003a654: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 diop->flags = iop->flags; 4003a658: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 4003a65c: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 diop->file_info = iop->file_info; 4003a660: c4 24 60 3c st %g2, [ %l1 + 0x3c ] diop->flags = iop->flags; 4003a664: c2 24 60 18 st %g1, [ %l1 + 0x18 ] ret = -1; break; } } diop->handlers = iop->handlers; 4003a668: c6 24 60 40 st %g3, [ %l1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 4003a66c: 90 04 60 1c add %l1, 0x1c, %o0 4003a670: 92 04 20 1c add %l0, 0x1c, %o1 4003a674: 40 00 24 f0 call 40043a34 4003a678: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 4003a67c: 03 10 01 a8 sethi %hi(0x4006a000), %g1 4003a680: f0 00 62 e8 ld [ %g1 + 0x2e8 ], %i0 ! 4006a2e8 4003a684: a2 24 40 18 sub %l1, %i0, %l1 4003a688: a3 3c 60 03 sra %l1, 3, %l1 4003a68c: 85 2c 60 06 sll %l1, 6, %g2 4003a690: 83 2c 60 03 sll %l1, 3, %g1 4003a694: 82 20 80 01 sub %g2, %g1, %g1 4003a698: 85 28 60 06 sll %g1, 6, %g2 4003a69c: 82 00 40 02 add %g1, %g2, %g1 4003a6a0: 82 00 40 11 add %g1, %l1, %g1 4003a6a4: b1 28 60 0f sll %g1, 0xf, %i0 4003a6a8: b0 26 00 01 sub %i0, %g1, %i0 4003a6ac: b1 2e 20 03 sll %i0, 3, %i0 4003a6b0: 10 80 00 24 b 4003a740 4003a6b4: b0 06 00 11 add %i0, %l1, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 4003a6b8: b1 32 20 0b srl %o0, 0xb, %i0 4003a6bc: 10 80 00 24 b 4003a74c 4003a6c0: 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 ) ) 4003a6c4: c2 00 80 00 ld [ %g2 ], %g1 4003a6c8: 80 a0 60 00 cmp %g1, 0 4003a6cc: 22 80 00 03 be,a 4003a6d8 4003a6d0: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED 4003a6d4: 90 12 28 00 or %o0, 0x800, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 4003a6d8: d0 24 20 18 st %o0, [ %l0 + 0x18 ] 4003a6dc: 10 80 00 1c b 4003a74c 4003a6e0: b0 10 20 00 clr %i0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 4003a6e4: 7f ff 35 d3 call 40007e30 4003a6e8: 01 00 00 00 nop 4003a6ec: 10 80 00 15 b 4003a740 4003a6f0: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 4003a6f4: d0 00 80 00 ld [ %g2 ], %o0 4003a6f8: 7f ff 36 6d call 400080ac 4003a6fc: 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); 4003a700: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4003a704: 90 0a 22 01 and %o0, 0x201, %o0 4003a708: 82 08 7d fe and %g1, -514, %g1 4003a70c: 82 12 00 01 or %o0, %g1, %g1 4003a710: 10 80 00 0f b 4003a74c 4003a714: c2 24 20 18 st %g1, [ %l0 + 0x18 ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4003a718: 40 00 17 f4 call 400406e8 <__errno> 4003a71c: b0 10 3f ff mov -1, %i0 4003a720: 10 80 00 05 b 4003a734 4003a724: 82 10 20 86 mov 0x86, %g1 ret = -1; break; default: errno = EINVAL; 4003a728: 40 00 17 f0 call 400406e8 <__errno> 4003a72c: b0 10 3f ff mov -1, %i0 4003a730: 82 10 20 16 mov 0x16, %g1 4003a734: c2 22 00 00 st %g1, [ %o0 ] 4003a738: 81 c7 e0 08 ret 4003a73c: 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) { 4003a740: 80 a6 20 00 cmp %i0, 0 4003a744: 06 80 00 0f bl 4003a780 4003a748: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 4003a74c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4003a750: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4003a754: 80 a0 60 00 cmp %g1, 0 4003a758: 02 bf ff f8 be 4003a738 4003a75c: 92 10 00 10 mov %l0, %o1 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4003a760: 9f c0 40 00 call %g1 4003a764: 90 10 00 19 mov %i1, %o0 if (err) { 4003a768: a0 92 20 00 orcc %o0, 0, %l0 4003a76c: 02 80 00 05 be 4003a780 4003a770: 01 00 00 00 nop errno = err; 4003a774: 40 00 17 dd call 400406e8 <__errno> <== NOT EXECUTED 4003a778: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4003a77c: 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; } 4003a780: 81 c7 e0 08 ret 4003a784: 81 e8 00 00 restore 4000d888 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d888: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d88c: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000d890: d0 00 62 c0 ld [ %g1 + 0x2c0 ], %o0 ! 4001d6c0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d894: a0 10 00 18 mov %i0, %l0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d898: 92 10 20 00 clr %o1 4000d89c: 94 10 20 00 clr %o2 4000d8a0: 7f ff e3 14 call 400064f0 4000d8a4: b0 10 3f fc mov -4, %i0 4000d8a8: 80 a2 20 00 cmp %o0, 0 4000d8ac: 12 80 00 f0 bne 4000dc6c 4000d8b0: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4000d8b4: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (pipe == NULL) { 4000d8b8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000d8bc: 32 80 00 5b bne,a 4000da28 <== NOT EXECUTED 4000d8c0: 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)); 4000d8c4: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED 4000d8c8: 7f ff f7 79 call 4000b6ac <== NOT EXECUTED 4000d8cc: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 4000d8d0: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 4000d8d4: 02 80 00 66 be 4000da6c <== NOT EXECUTED 4000d8d8: a2 10 00 12 mov %l2, %l1 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4000d8dc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d8e0: 40 00 09 f2 call 400100a8 <== NOT EXECUTED 4000d8e4: 94 10 20 34 mov 0x34, %o2 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4000d8e8: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4000d8ec: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED 4000d8f0: 7f ff f7 6f call 4000b6ac <== NOT EXECUTED 4000d8f4: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED if (! pipe->Buffer) 4000d8f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d8fc: 02 80 00 46 be 4000da14 <== NOT EXECUTED 4000d900: d0 24 80 00 st %o0, [ %l2 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4000d904: 27 10 00 74 sethi %hi(0x4001d000), %l3 <== NOT EXECUTED 4000d908: d0 4c e0 84 ldsb [ %l3 + 0x84 ], %o0 ! 4001d084 <== NOT EXECUTED 4000d90c: 29 14 12 5c sethi %hi(0x50497000), %l4 <== NOT EXECUTED 4000d910: 82 15 22 00 or %l4, 0x200, %g1 ! 50497200 <== NOT EXECUTED 4000d914: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d918: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000d91c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d920: 40 00 02 b1 call 4000e3e4 <== NOT EXECUTED 4000d924: 96 04 a0 2c add %l2, 0x2c, %o3 <== NOT EXECUTED 4000d928: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d92c: 32 80 00 38 bne,a 4000da0c <== NOT EXECUTED 4000d930: 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( 4000d934: d0 4c e0 84 ldsb [ %l3 + 0x84 ], %o0 <== NOT EXECUTED 4000d938: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 4000d93c: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 4000d940: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d944: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000d948: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d94c: 40 00 02 a6 call 4000e3e4 <== NOT EXECUTED 4000d950: 96 04 a0 30 add %l2, 0x30, %o3 <== NOT EXECUTED 4000d954: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d958: 12 80 00 2a bne 4000da00 <== NOT EXECUTED 4000d95c: 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( 4000d960: d0 4c e0 84 ldsb [ %l3 + 0x84 ], %o0 <== NOT EXECUTED 4000d964: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000d968: 90 12 00 14 or %o0, %l4, %o0 <== NOT EXECUTED 4000d96c: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000d970: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000d974: 7f ff e2 3d call 40006268 <== NOT EXECUTED 4000d978: 98 04 a0 28 add %l2, 0x28, %o4 <== NOT EXECUTED 4000d97c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d980: 12 80 00 1e bne 4000d9f8 <== NOT EXECUTED 4000d984: 29 10 00 78 sethi %hi(0x4001e000), %l4 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4000d988: d2 04 a0 2c ld [ %l2 + 0x2c ], %o1 <== NOT EXECUTED 4000d98c: b0 07 bf f8 add %fp, -8, %i0 <== NOT EXECUTED 4000d990: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 4000d994: 7f ff e8 e1 call 40007d18 <_Objects_Get> <== NOT EXECUTED 4000d998: 90 15 23 d0 or %l4, 0x3d0, %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 4000d99c: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 4000d9a0: 25 04 00 00 sethi %hi(0x10000000), %l2 <== NOT EXECUTED 4000d9a4: 82 10 40 12 or %g1, %l2, %g1 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4000d9a8: 7f ff eb 2a call 40008650 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000d9ac: c2 22 20 4c st %g1, [ %o0 + 0x4c ] <== NOT EXECUTED 4000d9b0: d2 04 60 30 ld [ %l1 + 0x30 ], %o1 <== NOT EXECUTED 4000d9b4: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 4000d9b8: 7f ff e8 d8 call 40007d18 <_Objects_Get> <== NOT EXECUTED 4000d9bc: 90 15 23 d0 or %l4, 0x3d0, %o0 <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4000d9c0: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 4000d9c4: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4000d9c8: 7f ff eb 22 call 40008650 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000d9cc: e4 22 20 4c st %l2, [ %o0 + 0x4c ] <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4000d9d0: c2 0c e0 84 ldub [ %l3 + 0x84 ], %g1 <== NOT EXECUTED 4000d9d4: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4000d9d8: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4000d9dc: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000d9e0: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 4000d9e4: 12 80 00 10 bne 4000da24 <== NOT EXECUTED 4000d9e8: c4 2c e0 84 stb %g2, [ %l3 + 0x84 ] <== NOT EXECUTED c = 'a'; 4000d9ec: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 4000d9f0: 10 80 00 0d b 4000da24 <== NOT EXECUTED 4000d9f4: c2 2c e0 84 stb %g1, [ %l3 + 0x84 ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4000d9f8: 40 00 02 a9 call 4000e49c <== NOT EXECUTED 4000d9fc: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4000da00: 40 00 02 a7 call 4000e49c <== NOT EXECUTED 4000da04: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4000da08: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED 4000da0c: 7f ff f5 c6 call 4000b124 <== NOT EXECUTED 4000da10: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 4000da14: 7f ff f5 c4 call 4000b124 <== NOT EXECUTED 4000da18: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000da1c: 10 80 00 15 b 4000da70 <== NOT EXECUTED 4000da20: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000da24: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000da28: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000da2c: 7f ff e2 b1 call 400064f0 <== NOT EXECUTED 4000da30: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000da34: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000da38: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000da3c: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000da40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000da44: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000da48: 12 80 00 09 bne 4000da6c <== NOT EXECUTED 4000da4c: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED if (err) 4000da50: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000da54: 22 80 00 06 be,a 4000da6c <== NOT EXECUTED 4000da58: e2 24 00 00 st %l1, [ %l0 ] <== NOT EXECUTED pipe_free(pipe); 4000da5c: 7f ff ff 3b call 4000d748 <== NOT EXECUTED 4000da60: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000da64: 10 80 00 03 b 4000da70 <== NOT EXECUTED 4000da68: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000da6c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000da70: 7f ff e2 e7 call 4000660c <== NOT EXECUTED 4000da74: d0 00 62 c0 ld [ %g1 + 0x2c0 ], %o0 ! 4001d6c0 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4000da78: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000da7c: 12 80 00 7c bne 4000dc6c <== NOT EXECUTED 4000da80: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000da84: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 4000da88: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000da8c: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000da90: 02 80 00 2e be 4000db48 <== NOT EXECUTED 4000da94: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED 4000da98: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000da9c: 02 80 00 56 be 4000dbf4 <== NOT EXECUTED 4000daa0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000daa4: 12 80 00 6a bne 4000dc4c <== NOT EXECUTED 4000daa8: 01 00 00 00 nop <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000daac: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000dab0: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dab4: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000dab8: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dabc: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 4000dac0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dac4: 12 80 00 05 bne 4000dad8 <== NOT EXECUTED 4000dac8: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000dacc: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000dad0: 40 00 02 8d call 4000e504 <== NOT EXECUTED 4000dad4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 4000dad8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000dadc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dae0: 12 80 00 5b bne 4000dc4c <== NOT EXECUTED 4000dae4: 01 00 00 00 nop <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4000dae8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 4000daec: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000daf0: 12 80 00 57 bne 4000dc4c <== NOT EXECUTED 4000daf4: 01 00 00 00 nop <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4000daf8: e4 04 60 24 ld [ %l1 + 0x24 ], %l2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4000dafc: 7f ff e2 c4 call 4000660c <== NOT EXECUTED 4000db00: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000db04: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000db08: 40 00 02 96 call 4000e560 <== NOT EXECUTED 4000db0c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000db10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000db14: 12 80 00 52 bne 4000dc5c <== NOT EXECUTED 4000db18: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4000db1c: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000db20: 7f ff e2 74 call 400064f0 <== NOT EXECUTED 4000db24: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000db28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000db2c: 32 80 00 4d bne,a 4000dc60 <== NOT EXECUTED 4000db30: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4000db34: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 <== NOT EXECUTED 4000db38: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000db3c: 02 bf ff f0 be 4000dafc <== NOT EXECUTED 4000db40: 01 00 00 00 nop <== NOT EXECUTED 4000db44: 30 80 00 42 b,a 4000dc4c <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4000db48: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 4000db4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db50: 32 80 00 07 bne,a 4000db6c <== NOT EXECUTED 4000db54: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000db58: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000db5c: 22 80 00 04 be,a 4000db6c <== NOT EXECUTED 4000db60: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000db64: 10 80 00 3f b 4000dc60 <== NOT EXECUTED 4000db68: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000db6c: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000db70: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000db74: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000db78: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 4000db7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db80: 12 80 00 05 bne 4000db94 <== NOT EXECUTED 4000db84: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000db88: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000db8c: 40 00 02 5e call 4000e504 <== NOT EXECUTED 4000db90: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Readers == 0) { 4000db94: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 4000db98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db9c: 12 80 00 2c bne 4000dc4c <== NOT EXECUTED 4000dba0: 01 00 00 00 nop <== NOT EXECUTED prevCounter = pipe->readerCounter; 4000dba4: e4 04 60 20 ld [ %l1 + 0x20 ], %l2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4000dba8: 7f ff e2 99 call 4000660c <== NOT EXECUTED 4000dbac: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000dbb0: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000dbb4: 40 00 02 6b call 4000e560 <== NOT EXECUTED 4000dbb8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000dbbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dbc0: 12 80 00 27 bne 4000dc5c <== NOT EXECUTED 4000dbc4: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4000dbc8: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000dbcc: 7f ff e2 49 call 400064f0 <== NOT EXECUTED 4000dbd0: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000dbd4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000dbd8: 32 80 00 22 bne,a 4000dc60 <== NOT EXECUTED 4000dbdc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4000dbe0: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 4000dbe4: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000dbe8: 02 bf ff f0 be 4000dba8 <== NOT EXECUTED 4000dbec: 01 00 00 00 nop <== NOT EXECUTED 4000dbf0: 30 80 00 17 b,a 4000dc4c <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000dbf4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000dbf8: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dbfc: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000dc00: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000dc04: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 4000dc08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dc0c: 12 80 00 05 bne 4000dc20 <== NOT EXECUTED 4000dc10: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000dc14: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000dc18: 40 00 02 3b call 4000e504 <== NOT EXECUTED 4000dc1c: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000dc20: 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 ++; 4000dc24: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000dc28: 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 ++; 4000dc2c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000dc30: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 4000dc34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000dc38: 12 80 00 05 bne 4000dc4c <== NOT EXECUTED 4000dc3c: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000dc40: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000dc44: 40 00 02 30 call 4000e504 <== NOT EXECUTED 4000dc48: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4000dc4c: 7f ff e2 70 call 4000660c <== NOT EXECUTED 4000dc50: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED return 0; 4000dc54: 81 c7 e0 08 ret <== NOT EXECUTED 4000dc58: 81 e8 00 00 restore <== NOT EXECUTED 4000dc5c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4000dc60: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000dc64: 7f ff fe c5 call 4000d778 <== NOT EXECUTED 4000dc68: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 4000dc6c: 81 c7 e0 08 ret 4000dc70: 81 e8 00 00 restore 4000b514 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000b514: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 4000b518: 05 10 01 a8 sethi %hi(0x4006a000), %g2 <== NOT EXECUTED 4000b51c: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 <== NOT EXECUTED 4000b520: 10 80 00 08 b 4000b540 <== NOT EXECUTED 4000b524: 84 10 a3 34 or %g2, 0x334, %g2 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 4000b528: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 <== NOT EXECUTED 4000b52c: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 4000b530: 32 80 00 04 bne,a 4000b540 <== NOT EXECUTED 4000b534: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000b538: 81 c3 e0 08 retl <== NOT EXECUTED 4000b53c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000b540: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000b544: 32 bf ff f9 bne,a 4000b528 <== NOT EXECUTED 4000b548: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED return true; } } return false; } 4000b54c: 81 c3 e0 08 retl <== NOT EXECUTED 4000b550: 90 10 20 00 clr %o0 <== NOT EXECUTED 400043f8 : long fpathconf( int fd, int name ) { 400043f8: 9d e3 bf a0 save %sp, -96, %sp long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 400043fc: 03 10 00 83 sethi %hi(0x40020c00), %g1 40004400: c2 00 63 74 ld [ %g1 + 0x374 ], %g1 ! 40020f74 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 10 ld [ %g1 + 0x110 ], %g1 ! 40021910 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 58 call 40012194 <__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 52 call 40012194 <__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 20 call 40012194 <__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 88 or %g1, 0x88, %g1 ! 4001d888 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 76 sethi %hi(0x4001d800), %g1 4000b14c: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 4001dbf0 <_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 58 ld [ %g1 + 0x158 ], %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 22 f0 ld [ %l0 + 0x2f0 ], %o0 ! 4001cef0 4000b19c: 40 00 06 86 call 4000cbb4 <_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 22 f0 ld [ %l0 + 0x2f0 ], %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 98 restore %i0, 0x398, %o0 <== NOT EXECUTED 4000b1c4: 81 c7 e0 08 ret 4000b1c8: 81 e8 00 00 restore 40028904 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 40028904: 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 40028908: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 4002890c: 82 10 63 48 or %g1, 0x348, %g1 ! 4006a348 <== NOT EXECUTED 40028910: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40028914: 02 80 00 18 be 40028974 <== NOT EXECUTED 40028918: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 4002891c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40028920: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028924: 22 80 00 09 be,a 40028948 <== NOT EXECUTED 40028928: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002892c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028930: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028934: 22 80 00 05 be,a 40028948 <== NOT EXECUTED 40028938: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4002893c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028940: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 40028944: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40028948: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002894c: 02 80 00 08 be 4002896c <== NOT EXECUTED 40028950: 01 00 00 00 nop <== NOT EXECUTED 40028954: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028958: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002895c: 02 80 00 04 be 4002896c <== NOT EXECUTED 40028960: 01 00 00 00 nop <== NOT EXECUTED 40028964: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028968: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 4002896c: 7f ff 7c ab call 40007c18 <== NOT EXECUTED 40028970: 81 e8 00 00 restore <== NOT EXECUTED 40028974: 81 c7 e0 08 ret <== NOT EXECUTED 40028978: 81 e8 00 00 restore <== NOT EXECUTED 4001b038 : int fstat( int fd, struct stat *sbuf ) { 4001b038: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 4001b03c: 80 a6 60 00 cmp %i1, 0 4001b040: 32 80 00 06 bne,a 4001b058 4001b044: 03 10 00 73 sethi %hi(0x4001cc00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 4001b048: 7f ff d1 9e call 4000f6c0 <__errno> 4001b04c: 01 00 00 00 nop 4001b050: 10 80 00 12 b 4001b098 4001b054: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 4001b058: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 4001b05c: 80 a6 00 01 cmp %i0, %g1 4001b060: 1a 80 00 0b bcc 4001b08c 4001b064: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b068: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 4001d878 4001b06c: 85 2e 20 06 sll %i0, 6, %g2 4001b070: b1 2e 20 03 sll %i0, 3, %i0 4001b074: b0 06 00 02 add %i0, %g2, %i0 4001b078: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 4001b07c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4001b080: 80 88 61 00 btst 0x100, %g1 4001b084: 32 80 00 08 bne,a 4001b0a4 4001b088: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 4001b08c: 7f ff d1 8d call 4000f6c0 <__errno> 4001b090: 01 00 00 00 nop 4001b094: 82 10 20 09 mov 9, %g1 ! 9 4001b098: c2 22 00 00 st %g1, [ %o0 ] 4001b09c: 10 80 00 15 b 4001b0f0 4001b0a0: 90 10 3f ff mov -1, %o0 rtems_libio_check_is_open(iop); if ( !iop->handlers ) 4001b0a4: 80 a0 60 00 cmp %g1, 0 4001b0a8: 02 bf ff f9 be 4001b08c 4001b0ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 4001b0b0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001b0b4: 80 a0 60 00 cmp %g1, 0 4001b0b8: 12 80 00 06 bne 4001b0d0 4001b0bc: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b0c0: 7f ff d1 80 call 4000f6c0 <__errno> <== NOT EXECUTED 4001b0c4: 01 00 00 00 nop <== NOT EXECUTED 4001b0c8: 10 bf ff f4 b 4001b098 <== NOT EXECUTED 4001b0cc: 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) ); 4001b0d0: 94 10 20 48 mov 0x48, %o2 4001b0d4: 7f ff d3 f5 call 400100a8 4001b0d8: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 4001b0dc: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4001b0e0: 90 06 20 1c add %i0, 0x1c, %o0 4001b0e4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4001b0e8: 9f c0 40 00 call %g1 4001b0ec: 92 10 00 19 mov %i1, %o1 } 4001b0f0: 81 c7 e0 08 ret 4001b0f4: 91 e8 00 08 restore %g0, %o0, %o0 400275a4 : #include int fsync( int fd ) { 400275a4: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400275a8: 03 10 01 98 sethi %hi(0x40066000), %g1 400275ac: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 40066134 400275b0: 80 a6 00 01 cmp %i0, %g1 400275b4: 1a 80 00 15 bcc 40027608 400275b8: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 400275bc: 03 10 01 a8 sethi %hi(0x4006a000), %g1 400275c0: d0 00 62 e8 ld [ %g1 + 0x2e8 ], %o0 ! 4006a2e8 400275c4: 83 2e 20 06 sll %i0, 6, %g1 400275c8: b1 2e 20 03 sll %i0, 3, %i0 400275cc: b0 06 00 01 add %i0, %g1, %i0 400275d0: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 400275d4: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400275d8: 80 88 61 00 btst 0x100, %g1 400275dc: 02 80 00 0b be 40027608 400275e0: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400275e4: 32 80 00 06 bne,a 400275fc 400275e8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 400275ec: 40 00 64 3f call 400406e8 <__errno> 400275f0: 01 00 00 00 nop 400275f4: 10 80 00 0f b 40027630 400275f8: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 400275fc: 80 a0 60 00 cmp %g1, 0 40027600: 32 80 00 06 bne,a 40027618 40027604: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 40027608: 40 00 64 38 call 400406e8 <__errno> <== NOT EXECUTED 4002760c: 01 00 00 00 nop <== NOT EXECUTED 40027610: 10 80 00 08 b 40027630 <== NOT EXECUTED 40027614: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 40027618: 80 a0 60 00 cmp %g1, 0 4002761c: 12 80 00 08 bne 4002763c 40027620: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40027624: 40 00 64 31 call 400406e8 <__errno> 40027628: 01 00 00 00 nop 4002762c: 82 10 20 86 mov 0x86, %g1 ! 86 40027630: c2 22 00 00 st %g1, [ %o0 ] 40027634: 10 80 00 04 b 40027644 40027638: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 4002763c: 9f c0 40 00 call %g1 40027640: 01 00 00 00 nop } 40027644: 81 c7 e0 08 ret 40027648: 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 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 4001cee4 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 78 ld [ %g1 + 0x78 ], %g1 ! 4001d878 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 2e call 4000f6c0 <__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 63 call 4000ffac 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 1c call 4000f6c0 <__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 15 call 4000f6c0 <__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 0d call 4000f6c0 <__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 4005aa2c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4005aa2c: 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 ); 4005aa30: 03 10 01 98 sethi %hi(0x40066000), %g1 4005aa34: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 40066134 4005aa38: 80 a6 00 01 cmp %i0, %g1 4005aa3c: 1a 80 00 08 bcc 4005aa5c 4005aa40: a0 10 20 00 clr %l0 4005aa44: 03 10 01 a8 sethi %hi(0x4006a000), %g1 4005aa48: e0 00 62 e8 ld [ %g1 + 0x2e8 ], %l0 ! 4006a2e8 4005aa4c: 83 2e 20 06 sll %i0, 6, %g1 4005aa50: b1 2e 20 03 sll %i0, 3, %i0 4005aa54: b0 06 00 01 add %i0, %g1, %i0 4005aa58: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4005aa5c: a2 07 bf ec add %fp, -20, %l1 4005aa60: 92 04 20 1c add %l0, 0x1c, %o1 4005aa64: 90 10 00 11 mov %l1, %o0 4005aa68: 7f ff a3 f3 call 40043a34 4005aa6c: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 4005aa70: c2 07 bf f8 ld [ %fp + -8 ], %g1 4005aa74: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4005aa78: 80 a0 60 00 cmp %g1, 0 4005aa7c: 02 80 00 11 be 4005aac0 4005aa80: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 4005aa84: 9f c0 40 00 call %g1 4005aa88: 90 10 00 11 mov %l1, %o0 4005aa8c: 80 a2 20 01 cmp %o0, 1 4005aa90: 22 80 00 08 be,a 4005aab0 4005aa94: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4005aa98: 7f ff 97 14 call 400406e8 <__errno> 4005aa9c: 01 00 00 00 nop 4005aaa0: 82 10 20 14 mov 0x14, %g1 ! 14 4005aaa4: c2 22 00 00 st %g1, [ %o0 ] 4005aaa8: 10 80 00 0d b 4005aadc 4005aaac: 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 ) 4005aab0: c2 00 60 08 ld [ %g1 + 8 ], %g1 4005aab4: 80 a0 60 00 cmp %g1, 0 4005aab8: 32 80 00 06 bne,a 4005aad0 4005aabc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4005aac0: 7f ff 97 0a call 400406e8 <__errno> <== NOT EXECUTED 4005aac4: 01 00 00 00 nop <== NOT EXECUTED 4005aac8: 10 bf ff f7 b 4005aaa4 <== NOT EXECUTED 4005aacc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 4005aad0: 92 10 00 19 mov %i1, %o1 4005aad4: 9f c0 40 00 call %g1 4005aad8: 94 10 00 1a mov %i2, %o2 } 4005aadc: 81 c7 e0 08 ret 4005aae0: 91 e8 00 08 restore %g0, %o0, %o0 40027758 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40027758: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4002775c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 40066428 <== NOT EXECUTED return _POSIX_types_Gid; } 40027760: 81 c3 e0 08 retl <== NOT EXECUTED 40027764: d0 10 60 32 lduh [ %g1 + 0x32 ], %o0 <== NOT EXECUTED 40027de4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027de4: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 40027de8: 7f ff ff b6 call 40027cc0 40027dec: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 40027df0: 11 10 01 6e sethi %hi(0x4005b800), %o0 40027df4: 13 10 01 97 sethi %hi(0x40065c00), %o1 40027df8: 90 12 21 68 or %o0, 0x168, %o0 40027dfc: 40 00 64 e2 call 40041184 40027e00: 92 12 60 10 or %o1, 0x10, %o1 40027e04: a0 92 20 00 orcc %o0, 0, %l0 40027e08: 12 80 00 08 bne 40027e28 40027e0c: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 40027e10: 40 00 62 36 call 400406e8 <__errno> <== NOT EXECUTED 40027e14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027e18: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40027e1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40027e20: 81 c7 e0 08 ret <== NOT EXECUTED 40027e24: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40027e28: 94 10 00 1b mov %i3, %o2 40027e2c: 96 10 00 1c mov %i4, %o3 40027e30: 7f ff fe ea call 400279d8 40027e34: 90 10 00 10 mov %l0, %o0 40027e38: 80 a2 20 00 cmp %o0, 0 40027e3c: 12 80 00 0a bne 40027e64 40027e40: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 40027e44: 40 00 62 29 call 400406e8 <__errno> <== NOT EXECUTED 40027e48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027e4c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40027e50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40027e54: 40 00 62 7d call 40040848 <== NOT EXECUTED 40027e58: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 40027e5c: 81 c7 e0 08 ret <== NOT EXECUTED 40027e60: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 40027e64: 22 80 00 07 be,a 40027e80 40027e68: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 40027e6c: d0 06 80 00 ld [ %i2 ], %o0 40027e70: 40 00 7b 5c call 40046be0 40027e74: 92 10 00 18 mov %i0, %o1 40027e78: 10 80 00 04 b 40027e88 40027e7c: 80 a0 00 08 cmp %g0, %o0 } else { match = (grp->gr_gid == gid); 40027e80: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40027e84: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40027e88: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 40027e8c: 80 a0 60 00 cmp %g1, 0 40027e90: 02 bf ff e6 be 40027e28 40027e94: 92 10 00 1a mov %i2, %o1 fclose(fp); 40027e98: 90 10 00 10 mov %l0, %o0 40027e9c: 40 00 62 6b call 40040848 40027ea0: b0 10 20 00 clr %i0 *result = grp; 40027ea4: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 40027ea8: 81 c7 e0 08 ret 40027eac: 81 e8 00 00 restore 40027b14 : return NULL; return p; } struct group *getgrent(void) { 40027b14: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 40027b18: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027b1c: d0 00 63 a4 ld [ %g1 + 0x3a4 ], %o0 ! 40069fa4 <== NOT EXECUTED 40027b20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027b24: 22 80 00 0c be,a 40027b54 <== NOT EXECUTED 40027b28: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 40027b2c: 31 10 01 a8 sethi %hi(0x4006a000), %i0 <== NOT EXECUTED 40027b30: 15 10 01 a7 sethi %hi(0x40069c00), %o2 <== NOT EXECUTED 40027b34: 92 16 20 70 or %i0, 0x70, %o1 <== NOT EXECUTED 40027b38: 94 12 a3 a8 or %o2, 0x3a8, %o2 <== NOT EXECUTED 40027b3c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027b40: 7f ff ff a6 call 400279d8 <== NOT EXECUTED 40027b44: b0 16 20 70 or %i0, 0x70, %i0 <== NOT EXECUTED 40027b48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027b4c: 22 80 00 02 be,a 40027b54 <== NOT EXECUTED 40027b50: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &grent; } 40027b54: 81 c7 e0 08 ret <== NOT EXECUTED 40027b58: 81 e8 00 00 restore <== NOT EXECUTED 40027ee4 : } struct group *getgrgid( gid_t gid ) { 40027ee4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 40027ee8: 13 10 01 a8 sethi %hi(0x4006a000), %o1 <== NOT EXECUTED 40027eec: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40027ef0: 92 12 60 70 or %o1, 0x70, %o1 <== NOT EXECUTED 40027ef4: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40027ef8: 15 10 01 a7 sethi %hi(0x40069c00), %o2 <== NOT EXECUTED 40027efc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027f00: 94 12 a3 a8 or %o2, 0x3a8, %o2 <== NOT EXECUTED 40027f04: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 40027f08: 7f ff ff ea call 40027eb0 <== NOT EXECUTED 40027f0c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40027f10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027f14: 22 80 00 02 be,a 40027f1c <== NOT EXECUTED 40027f18: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 40027f1c: 81 c7 e0 08 ret <== NOT EXECUTED 40027f20: 81 e8 00 00 restore <== NOT EXECUTED 40027eb0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027eb0: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40027eb4: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40027eb8: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40027ebc: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40027ec0: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40027ec4: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40027ec8: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 40027ecc: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 40027ed0: 90 10 20 00 clr %o0 <== NOT EXECUTED 40027ed4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40027ed8: 7f ff ff c3 call 40027de4 <== NOT EXECUTED 40027edc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40027ee0: 01 00 00 00 nop 40027fd8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40027fd8: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 40027fdc: 7f ff ff 39 call 40027cc0 40027fe0: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 40027fe4: 11 10 01 6e sethi %hi(0x4005b800), %o0 40027fe8: 13 10 01 97 sethi %hi(0x40065c00), %o1 40027fec: 90 12 20 b0 or %o0, 0xb0, %o0 40027ff0: 40 00 64 65 call 40041184 40027ff4: 92 12 60 10 or %o1, 0x10, %o1 40027ff8: a0 92 20 00 orcc %o0, 0, %l0 40027ffc: 12 80 00 08 bne 4002801c 40028000: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 40028004: 40 00 61 b9 call 400406e8 <__errno> <== NOT EXECUTED 40028008: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002800c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40028010: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028014: 81 c7 e0 08 ret <== NOT EXECUTED 40028018: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 4002801c: 94 10 00 1b mov %i3, %o2 40028020: 96 10 00 1c mov %i4, %o3 40028024: 7f ff fe ce call 40027b5c 40028028: 90 10 00 10 mov %l0, %o0 4002802c: 80 a2 20 00 cmp %o0, 0 40028030: 12 80 00 0a bne 40028058 40028034: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 40028038: 40 00 61 ac call 400406e8 <__errno> <== NOT EXECUTED 4002803c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028040: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40028044: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40028048: 40 00 62 00 call 40040848 <== NOT EXECUTED 4002804c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 40028050: 81 c7 e0 08 ret <== NOT EXECUTED 40028054: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 40028058: 22 80 00 07 be,a 40028074 4002805c: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 40028060: d0 06 80 00 ld [ %i2 ], %o0 40028064: 40 00 7a df call 40046be0 40028068: 92 10 00 18 mov %i0, %o1 4002806c: 10 80 00 04 b 4002807c 40028070: 80 a0 00 08 cmp %g0, %o0 } else { match = (pwd->pw_uid == uid); 40028074: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40028078: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4002807c: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 40028080: 80 a0 60 00 cmp %g1, 0 40028084: 02 bf ff e6 be 4002801c 40028088: 92 10 00 1a mov %i2, %o1 fclose(fp); 4002808c: 90 10 00 10 mov %l0, %o0 40028090: 40 00 61 ee call 40040848 40028094: b0 10 20 00 clr %i0 *result = pwd; 40028098: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4002809c: 81 c7 e0 08 ret 400280a0: 81 e8 00 00 restore 40027c78 : return NULL; return p; } struct passwd *getpwent(void) { 40027c78: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 40027c7c: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027c80: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 40069ebc <== NOT EXECUTED 40027c84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027c88: 22 80 00 0c be,a 40027cb8 <== NOT EXECUTED 40027c8c: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 40027c90: 31 10 01 a7 sethi %hi(0x40069c00), %i0 <== NOT EXECUTED 40027c94: 15 10 01 a7 sethi %hi(0x40069c00), %o2 <== NOT EXECUTED 40027c98: 92 16 23 88 or %i0, 0x388, %o1 <== NOT EXECUTED 40027c9c: 94 12 a2 c0 or %o2, 0x2c0, %o2 <== NOT EXECUTED 40027ca0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40027ca4: 7f ff ff ae call 40027b5c <== NOT EXECUTED 40027ca8: b0 16 23 88 or %i0, 0x388, %i0 <== NOT EXECUTED 40027cac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027cb0: 22 80 00 02 be,a 40027cb8 <== NOT EXECUTED 40027cb4: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &pwent; } 40027cb8: 81 c7 e0 08 ret <== NOT EXECUTED 40027cbc: 81 e8 00 00 restore <== NOT EXECUTED 400280d8 : } struct passwd *getpwuid( uid_t uid ) { 400280d8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 400280dc: 13 10 01 a7 sethi %hi(0x40069c00), %o1 <== NOT EXECUTED 400280e0: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 400280e4: 92 12 63 88 or %o1, 0x388, %o1 <== NOT EXECUTED 400280e8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 400280ec: 15 10 01 a7 sethi %hi(0x40069c00), %o2 <== NOT EXECUTED 400280f0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400280f4: 94 12 a2 c0 or %o2, 0x2c0, %o2 <== NOT EXECUTED 400280f8: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 400280fc: 7f ff ff ea call 400280a4 <== NOT EXECUTED 40028100: b0 10 20 00 clr %i0 <== NOT EXECUTED 40028104: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028108: 22 80 00 02 be,a 40028110 <== NOT EXECUTED 4002810c: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 40028110: 81 c7 e0 08 ret <== NOT EXECUTED 40028114: 81 e8 00 00 restore <== NOT EXECUTED 400280a4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 400280a4: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 400280a8: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 400280ac: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 400280b0: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 400280b4: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 400280b8: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 400280bc: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 400280c0: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 400280c4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400280c8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400280cc: 7f ff ff c3 call 40027fd8 <== NOT EXECUTED 400280d0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400280d4: 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 f6 call 4000f6c0 <__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 e8 call 4000c6ac <_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 79 call 40018d0c <.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 40007d4c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 40007d4c: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40007d50: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 40066428 <== NOT EXECUTED return _POSIX_types_Uid; } 40007d54: 81 c3 e0 08 retl <== NOT EXECUTED 40007d58: d0 10 60 30 lduh [ %g1 + 0x30 ], %o0 <== NOT EXECUTED 40014150 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40014150: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40014154: e0 06 40 00 ld [ %i1 ], %l0 40014158: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 4001415c: 82 04 20 54 add %l0, 0x54, %g1 40014160: 80 a0 80 01 cmp %g2, %g1 40014164: 22 80 00 06 be,a 4001417c 40014168: 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 ); 4001416c: 40 00 04 4a call 40015294 <__errno> 40014170: 01 00 00 00 nop 40014174: 10 80 00 0d b 400141a8 40014178: 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 ) 4001417c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40014180: 80 a0 40 10 cmp %g1, %l0 40014184: 02 80 00 06 be 4001419c 40014188: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4001418c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40014190: 80 a0 60 00 cmp %g1, 0 40014194: 22 80 00 08 be,a 400141b4 40014198: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 4001419c: 40 00 04 3e call 40015294 <__errno> 400141a0: 01 00 00 00 nop 400141a4: 82 10 20 10 mov 0x10, %g1 ! 10 400141a8: c2 22 00 00 st %g1, [ %o0 ] 400141ac: 81 c7 e0 08 ret 400141b0: 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 ) { 400141b4: 80 a0 60 00 cmp %g1, 0 400141b8: 22 80 00 06 be,a 400141d0 400141bc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 400141c0: 7f ff d3 44 call 40008ed0 <_Chain_Extract> 400141c4: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 400141c8: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400141cc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 400141d0: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400141d4: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 400141d8: 90 07 bf f8 add %fp, -8, %o0 400141dc: 7f ff c1 c9 call 40004900 400141e0: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 400141e4: 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) ) { 400141e8: 90 10 00 10 mov %l0, %o0 400141ec: 7f ff f2 16 call 40010a44 400141f0: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 400141f4: 80 a2 20 00 cmp %o0, 0 400141f8: 12 80 00 11 bne 4001423c 400141fc: 01 00 00 00 nop 40014200: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40014204: 80 a0 60 00 cmp %g1, 0 40014208: 12 80 00 0d bne 4001423c 4001420c: 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 ) 40014210: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 ! 40023340 40014214: c4 06 40 00 ld [ %i1 ], %g2 40014218: c6 00 60 04 ld [ %g1 + 4 ], %g3 4001421c: 80 a0 c0 02 cmp %g3, %g2 40014220: 22 80 00 02 be,a 40014228 40014224: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 40014228: 90 10 00 10 mov %l0, %o0 4001422c: 7f ff c1 8b call 40004858 40014230: b0 10 20 00 clr %i0 40014234: 81 c7 e0 08 ret 40014238: 81 e8 00 00 restore } return 0; } 4001423c: 81 c7 e0 08 ret 40014240: 91 e8 20 00 restore %g0, 0, %o0 40006f8c : int ioctl( int fd, ioctl_command_t command, ... ) { 40006f8c: 9d e3 bf 98 save %sp, -104, %sp va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40006f90: 03 10 00 8d sethi %hi(0x40023400), %g1 40006f94: c2 00 62 84 ld [ %g1 + 0x284 ], %g1 ! 40023684 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40006f98: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40006f9c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40006fa0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40006fa4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40006fa8: 80 a6 00 01 cmp %i0, %g1 40006fac: 1a 80 00 11 bcc 40006ff0 40006fb0: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 40006fb4: 03 10 00 90 sethi %hi(0x40024000), %g1 40006fb8: d0 00 60 f8 ld [ %g1 + 0xf8 ], %o0 ! 400240f8 40006fbc: 83 2e 20 06 sll %i0, 6, %g1 40006fc0: b1 2e 20 03 sll %i0, 3, %i0 40006fc4: b0 06 00 01 add %i0, %g1, %i0 40006fc8: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 40006fcc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 40006fd0: 80 88 61 00 btst 0x100, %g1 40006fd4: 02 80 00 07 be 40006ff0 40006fd8: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 40006fdc: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 40006fe0: c4 27 bf fc st %g2, [ %fp + -4 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 40006fe4: 80 a0 60 00 cmp %g1, 0 40006fe8: 12 80 00 06 bne 40007000 40006fec: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EBADF ); 40006ff0: 40 00 39 9f call 4001566c <__errno> 40006ff4: 01 00 00 00 nop 40006ff8: 10 80 00 09 b 4000701c 40006ffc: 82 10 20 09 mov 9, %g1 ! 9 if ( !iop->handlers->ioctl_h ) 40007000: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40007004: 80 a0 60 00 cmp %g1, 0 40007008: 12 80 00 08 bne 40007028 4000700c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40007010: 40 00 39 97 call 4001566c <__errno> <== NOT EXECUTED 40007014: 01 00 00 00 nop <== NOT EXECUTED 40007018: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000701c: c2 22 00 00 st %g1, [ %o0 ] 40007020: 10 80 00 04 b 40007030 40007024: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 40007028: 9f c0 40 00 call %g1 4000702c: 01 00 00 00 nop return rc; } 40007030: 81 c7 e0 08 ret 40007034: 91 e8 00 08 restore %g0, %o0, %o0 40004864 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40004864: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40004868: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 4000486c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004870: 02 80 00 03 be 4000487c <== NOT EXECUTED 40004874: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40004878: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 4000487c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004880: 02 80 00 0c be 400048b0 <== NOT EXECUTED 40004884: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED c = tolower (c); 40004888: 05 10 00 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED 4000488c: c4 00 a0 98 ld [ %g2 + 0x98 ], %g2 ! 4001d098 <__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 73 sethi %hi(0x4001cc00), %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 73 sethi %hi(0x4001cc00), %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 73 sethi %hi(0x4001cc00), %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 63 e8 ld [ %g1 + 0x3e8 ], %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 4000f04c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4000f04c: 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() ) 4000f050: 7f ff fb d5 call 4000dfa4 4000f054: 01 00 00 00 nop 4000f058: 80 a6 00 08 cmp %i0, %o0 4000f05c: 02 80 00 06 be 4000f074 4000f060: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 4000f064: 40 00 01 97 call 4000f6c0 <__errno> 4000f068: 01 00 00 00 nop 4000f06c: 10 80 00 07 b 4000f088 4000f070: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 4000f074: 12 80 00 08 bne 4000f094 4000f078: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 4000f07c: 40 00 01 91 call 4000f6c0 <__errno> 4000f080: 01 00 00 00 nop 4000f084: 82 10 20 16 mov 0x16, %g1 ! 16 4000f088: c2 22 00 00 st %g1, [ %o0 ] 4000f08c: 10 80 00 a5 b 4000f320 4000f090: 90 10 3f ff mov -1, %o0 if ( !is_valid_signo(sig) ) 4000f094: 80 a0 60 1f cmp %g1, 0x1f 4000f098: 18 bf ff f9 bgu 4000f07c 4000f09c: 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 ) 4000f0a0: 87 2e 60 04 sll %i1, 4, %g3 4000f0a4: 86 20 c0 02 sub %g3, %g2, %g3 4000f0a8: 05 10 00 77 sethi %hi(0x4001dc00), %g2 4000f0ac: 84 10 a3 e4 or %g2, 0x3e4, %g2 ! 4001dfe4 <_POSIX_signals_Vectors> 4000f0b0: 84 00 80 03 add %g2, %g3, %g2 4000f0b4: c4 00 a0 08 ld [ %g2 + 8 ], %g2 4000f0b8: 80 a0 a0 01 cmp %g2, 1 4000f0bc: 02 80 00 99 be 4000f320 4000f0c0: 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 ) ) 4000f0c4: 80 a6 60 04 cmp %i1, 4 4000f0c8: 02 80 00 06 be 4000f0e0 4000f0cc: 80 a6 60 08 cmp %i1, 8 4000f0d0: 02 80 00 04 be 4000f0e0 4000f0d4: 80 a6 60 0b cmp %i1, 0xb 4000f0d8: 12 80 00 08 bne 4000f0f8 4000f0dc: a0 10 20 01 mov 1, %l0 return pthread_kill( pthread_self(), sig ); 4000f0e0: 40 00 01 4f call 4000f61c 4000f0e4: 01 00 00 00 nop 4000f0e8: 40 00 01 11 call 4000f52c 4000f0ec: 92 10 00 19 mov %i1, %o1 4000f0f0: 81 c7 e0 08 ret 4000f0f4: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4000f0f8: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 4000f0fc: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 4000f100: 80 a6 a0 00 cmp %i2, 0 4000f104: 12 80 00 04 bne 4000f114 4000f108: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; 4000f10c: 10 80 00 04 b 4000f11c 4000f110: c0 27 bf fc clr [ %fp + -4 ] } else { siginfo->si_value = *value; 4000f114: c2 06 80 00 ld [ %i2 ], %g1 4000f118: c2 27 bf fc st %g1, [ %fp + -4 ] 4000f11c: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000f120: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 4001da50 <_Thread_Dispatch_disable_level> 4000f124: 84 00 a0 01 inc %g2 4000f128: c4 20 62 50 st %g2, [ %g1 + 0x250 ] /* * 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; 4000f12c: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000f130: c2 00 63 0c ld [ %g1 + 0x30c ], %g1 ! 4001db0c <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000f134: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 4000f138: c4 00 a0 c4 ld [ %g2 + 0xc4 ], %g2 4000f13c: 80 ac 00 02 andncc %l0, %g2, %g0 4000f140: 12 80 00 4e bne 4000f278 4000f144: 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 ; 4000f148: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000f14c: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 4001e170 <_POSIX_signals_Wait_queue> 4000f150: 10 80 00 0b b 4000f17c 4000f154: 86 10 e1 74 or %g3, 0x174, %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 ]; 4000f158: 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) 4000f15c: 80 8c 00 01 btst %l0, %g1 4000f160: 12 80 00 46 bne 4000f278 4000f164: 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) 4000f168: c8 01 20 c4 ld [ %g4 + 0xc4 ], %g4 4000f16c: 80 ac 00 04 andncc %l0, %g4, %g0 4000f170: 32 80 00 43 bne,a 4000f27c 4000f174: 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 ) { 4000f178: 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; 4000f17c: 80 a0 80 03 cmp %g2, %g3 4000f180: 32 bf ff f6 bne,a 4000f158 4000f184: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4000f188: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000f18c: c8 08 63 94 ldub [ %g1 + 0x394 ], %g4 ! 4001cf94 4000f190: 05 10 00 76 sethi %hi(0x4001d800), %g2 4000f194: 88 01 20 01 inc %g4 4000f198: 84 10 a1 b8 or %g2, 0x1b8, %g2 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4000f19c: 82 10 20 00 clr %g1 4000f1a0: 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) ) { 4000f1a4: 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 ] ) 4000f1a8: c6 00 80 00 ld [ %g2 ], %g3 4000f1ac: 80 a0 e0 00 cmp %g3, 0 4000f1b0: 22 80 00 2c be,a 4000f260 4000f1b4: 84 00 a0 04 add %g2, 4, %g2 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4000f1b8: c6 00 e0 04 ld [ %g3 + 4 ], %g3 if ( !the_info ) continue; #endif maximum = the_info->maximum; object_table = the_info->local_table; 4000f1bc: 9a 10 20 01 mov 1, %o5 4000f1c0: f4 00 e0 1c ld [ %g3 + 0x1c ], %i2 for ( index = 1 ; index <= maximum ; index++ ) { 4000f1c4: 10 80 00 23 b 4000f250 4000f1c8: de 10 e0 10 lduh [ %g3 + 0x10 ], %o7 the_thread = (Thread_Control *) object_table[ index ]; 4000f1cc: c6 06 80 03 ld [ %i2 + %g3 ], %g3 if ( !the_thread ) 4000f1d0: 80 a0 e0 00 cmp %g3, 0 4000f1d4: 02 80 00 1d be 4000f248 4000f1d8: 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 ) 4000f1dc: d8 00 e0 14 ld [ %g3 + 0x14 ], %o4 4000f1e0: 80 a3 00 04 cmp %o4, %g4 4000f1e4: 38 80 00 19 bgu,a 4000f248 4000f1e8: 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 ]; 4000f1ec: d4 00 e1 60 ld [ %g3 + 0x160 ], %o2 4000f1f0: d4 02 a0 c4 ld [ %o2 + 0xc4 ], %o2 4000f1f4: 80 ac 00 0a andncc %l0, %o2, %g0 4000f1f8: 22 80 00 14 be,a 4000f248 4000f1fc: 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 ) { 4000f200: 80 a3 00 04 cmp %o4, %g4 4000f204: 2a 80 00 11 bcs,a 4000f248 4000f208: 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 ) ) { 4000f20c: d2 00 60 10 ld [ %g1 + 0x10 ], %o1 4000f210: 80 a2 60 00 cmp %o1, 0 4000f214: 22 80 00 0d be,a 4000f248 4000f218: 98 10 00 04 mov %g4, %o4 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4000f21c: d4 00 e0 10 ld [ %g3 + 0x10 ], %o2 4000f220: 80 a2 a0 00 cmp %o2, 0 4000f224: 22 80 00 09 be,a 4000f248 4000f228: 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) ) { 4000f22c: 80 8a 40 0b btst %o1, %o3 4000f230: 32 80 00 06 bne,a 4000f248 4000f234: 98 10 00 04 mov %g4, %o4 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4000f238: 80 8a 80 0b btst %o2, %o3 4000f23c: 32 80 00 03 bne,a 4000f248 4000f240: 82 10 00 03 mov %g3, %g1 4000f244: 98 10 00 04 mov %g4, %o4 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4000f248: 9a 03 60 01 inc %o5 4000f24c: 88 10 00 0c mov %o4, %g4 4000f250: 80 a3 40 0f cmp %o5, %o7 4000f254: 28 bf ff de bleu,a 4000f1cc 4000f258: 87 2b 60 02 sll %o5, 2, %g3 4000f25c: 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++) { 4000f260: 80 a0 80 08 cmp %g2, %o0 4000f264: 32 bf ff d2 bne,a 4000f1ac 4000f268: c6 00 80 00 ld [ %g2 ], %g3 } } } } if ( interested ) { 4000f26c: 80 a0 60 00 cmp %g1, 0 4000f270: 02 80 00 0b be 4000f29c 4000f274: 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; 4000f278: 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 ) ) { 4000f27c: 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; 4000f280: 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 ) ) { 4000f284: 92 10 00 19 mov %i1, %o1 4000f288: 40 00 00 5d call 4000f3fc <_POSIX_signals_Unblock_thread> 4000f28c: 94 07 bf f4 add %fp, -12, %o2 4000f290: 80 8a 20 ff btst 0xff, %o0 4000f294: 12 80 00 20 bne 4000f314 4000f298: 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 ); 4000f29c: 40 00 00 47 call 4000f3b8 <_POSIX_signals_Set_process_signals> 4000f2a0: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4000f2a4: 83 2e 60 04 sll %i1, 4, %g1 4000f2a8: b3 2e 60 02 sll %i1, 2, %i1 4000f2ac: b2 20 40 19 sub %g1, %i1, %i1 4000f2b0: 03 10 00 77 sethi %hi(0x4001dc00), %g1 4000f2b4: 82 10 63 e4 or %g1, 0x3e4, %g1 ! 4001dfe4 <_POSIX_signals_Vectors> 4000f2b8: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000f2bc: 80 a0 60 02 cmp %g1, 2 4000f2c0: 12 80 00 15 bne 4000f314 4000f2c4: 11 10 00 78 sethi %hi(0x4001e000), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 4000f2c8: 7f ff f4 8e call 4000c500 <_Chain_Get> 4000f2cc: 90 12 21 64 or %o0, 0x164, %o0 ! 4001e164 <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4000f2d0: a0 92 20 00 orcc %o0, 0, %l0 4000f2d4: 12 80 00 08 bne 4000f2f4 4000f2d8: 92 07 bf f4 add %fp, -12, %o1 _Thread_Enable_dispatch(); 4000f2dc: 7f ff e4 dd call 40008650 <_Thread_Enable_dispatch> 4000f2e0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EAGAIN ); 4000f2e4: 40 00 00 f7 call 4000f6c0 <__errno> 4000f2e8: 01 00 00 00 nop 4000f2ec: 10 bf ff 67 b 4000f088 4000f2f0: 82 10 20 0b mov 0xb, %g1 ! b } psiginfo->Info = *siginfo; 4000f2f4: 90 04 20 08 add %l0, 8, %o0 4000f2f8: 40 00 03 2d call 4000ffac 4000f2fc: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4000f300: 11 10 00 78 sethi %hi(0x4001e000), %o0 4000f304: 92 10 00 10 mov %l0, %o1 4000f308: 90 12 21 b4 or %o0, 0x1b4, %o0 4000f30c: 7f ff de fd call 40006f00 <_Chain_Append> 4000f310: 90 02 00 19 add %o0, %i1, %o0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4000f314: 7f ff e4 cf call 40008650 <_Thread_Enable_dispatch> 4000f318: 01 00 00 00 nop 4000f31c: 90 10 20 00 clr %o0 ! 0 return 0; } 4000f320: b0 10 00 08 mov %o0, %i0 4000f324: 81 c7 e0 08 ret 4000f328: 81 e8 00 00 restore 4001b274 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 4001b274: 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())) 4001b278: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b27c: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 4001dbf0 <_System_state_Current> 4001b280: 80 a0 60 03 cmp %g1, 3 4001b284: 12 80 00 16 bne 4001b2dc 4001b288: 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) { 4001b28c: 23 10 00 74 sethi %hi(0x4001d000), %l1 4001b290: e0 00 62 c0 ld [ %g1 + 0x2c0 ], %l0 4001b294: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4001b298: 80 a0 40 10 cmp %g1, %l0 4001b29c: 22 80 00 06 be,a 4001b2b4 4001b2a0: 21 10 00 74 sethi %hi(0x4001d000), %l0 _wrapup_reent(_global_impure_ptr); 4001b2a4: 40 00 01 83 call 4001b8b0 <_wrapup_reent> 4001b2a8: 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; 4001b2ac: e0 24 60 a0 st %l0, [ %l1 + 0xa0 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 4001b2b0: 21 10 00 74 sethi %hi(0x4001d000), %l0 4001b2b4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 ! 4001d0a0 <_impure_ptr> 4001b2b8: 7f ff d1 5a call 4000f820 4001b2bc: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 4001b2c0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4001b2c4: 7f ff d1 57 call 4000f820 4001b2c8: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 4001b2cc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4001b2d0: f0 00 60 0c ld [ %g1 + 0xc ], %i0 4001b2d4: 7f ff d1 53 call 4000f820 4001b2d8: 81 e8 00 00 restore 4001b2dc: 81 c7 e0 08 ret <== NOT EXECUTED 4001b2e0: 81 e8 00 00 restore <== NOT EXECUTED 4002822c : int link( const char *existing, const char *new ) { 4002822c: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 40028230: 40 00 7c 6d call 400473e4 40028234: 90 10 00 18 mov %i0, %o0 40028238: 94 10 20 00 clr %o2 4002823c: 92 10 00 08 mov %o0, %o1 40028240: 96 07 bf e8 add %fp, -24, %o3 40028244: 90 10 00 18 mov %i0, %o0 40028248: 98 10 20 01 mov 1, %o4 4002824c: 7f ff 7e 4a call 40007b74 40028250: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 40028254: 80 a2 20 00 cmp %o0, 0 40028258: 12 80 00 8e bne 40028490 4002825c: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40028260: c2 4e 40 00 ldsb [ %i1 ], %g1 40028264: 80 a0 60 5c cmp %g1, 0x5c 40028268: 02 80 00 06 be 40028280 4002826c: 80 a0 60 2f cmp %g1, 0x2f 40028270: 02 80 00 04 be 40028280 40028274: 80 a0 60 00 cmp %g1, 0 40028278: 12 80 00 0a bne 400282a0 4002827c: 03 10 01 99 sethi %hi(0x40066400), %g1 40028280: 03 10 01 99 sethi %hi(0x40066400), %g1 40028284: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 40066428 40028288: 90 07 bf d4 add %fp, -44, %o0 4002828c: 92 02 60 18 add %o1, 0x18, %o1 40028290: 40 00 6d e9 call 40043a34 40028294: 94 10 20 14 mov 0x14, %o2 40028298: 10 80 00 08 b 400282b8 4002829c: 90 10 20 01 mov 1, %o0 400282a0: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 400282a4: 90 07 bf d4 add %fp, -44, %o0 400282a8: 92 02 60 04 add %o1, 4, %o1 400282ac: 40 00 6d e2 call 40043a34 400282b0: 94 10 20 14 mov 0x14, %o2 400282b4: 90 10 20 00 clr %o0 if ( !parent_loc.ops->evalformake_h ) { 400282b8: c2 07 bf e0 ld [ %fp + -32 ], %g1 400282bc: c2 00 60 04 ld [ %g1 + 4 ], %g1 400282c0: 80 a0 60 00 cmp %g1, 0 400282c4: 32 80 00 0b bne,a 400282f0 400282c8: 90 06 40 08 add %i1, %o0, %o0 rtems_filesystem_freenode( &existing_loc ); 400282cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400282d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400282d4: 02 80 00 51 be 40028418 <== NOT EXECUTED 400282d8: 01 00 00 00 nop <== NOT EXECUTED 400282dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400282e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400282e4: 12 80 00 4b bne 40028410 <== NOT EXECUTED 400282e8: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 400282ec: 30 80 00 4b b,a 40028418 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 400282f0: 94 07 bf fc add %fp, -4, %o2 400282f4: b2 07 bf d4 add %fp, -44, %i1 400282f8: 9f c0 40 00 call %g1 400282fc: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 40028300: a0 92 20 00 orcc %o0, 0, %l0 40028304: 02 80 00 11 be 40028348 40028308: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &existing_loc ); 4002830c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028310: 80 a0 60 00 cmp %g1, 0 40028314: 02 80 00 08 be 40028334 40028318: 01 00 00 00 nop 4002831c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028320: 80 a0 60 00 cmp %g1, 0 40028324: 02 80 00 04 be 40028334 40028328: 01 00 00 00 nop 4002832c: 9f c0 40 00 call %g1 40028330: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( result ); 40028334: 40 00 60 ed call 400406e8 <__errno> 40028338: b0 10 3f ff mov -1, %i0 4002833c: e0 22 00 00 st %l0, [ %o0 ] 40028340: 81 c7 e0 08 ret 40028344: 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 ) { 40028348: c4 07 bf e4 ld [ %fp + -28 ], %g2 4002834c: 80 a0 80 01 cmp %g2, %g1 40028350: 02 80 00 1a be 400283b8 40028354: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &existing_loc ); 40028358: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002835c: 80 a0 60 00 cmp %g1, 0 40028360: 22 80 00 09 be,a 40028384 40028364: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40028368: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002836c: 80 a0 60 00 cmp %g1, 0 40028370: 22 80 00 05 be,a 40028384 40028374: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40028378: 9f c0 40 00 call %g1 4002837c: 90 07 bf e8 add %fp, -24, %o0 rtems_filesystem_freenode( &parent_loc ); 40028380: c2 07 bf e0 ld [ %fp + -32 ], %g1 40028384: 80 a0 60 00 cmp %g1, 0 40028388: 02 80 00 08 be 400283a8 4002838c: 01 00 00 00 nop 40028390: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028394: 80 a0 60 00 cmp %g1, 0 40028398: 02 80 00 04 be 400283a8 4002839c: 01 00 00 00 nop 400283a0: 9f c0 40 00 call %g1 400283a4: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 400283a8: 40 00 60 d0 call 400406e8 <__errno> 400283ac: b0 10 3f ff mov -1, %i0 400283b0: 10 80 00 1d b 40028424 400283b4: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 400283b8: c2 00 60 08 ld [ %g1 + 8 ], %g1 400283bc: 80 a0 60 00 cmp %g1, 0 400283c0: 12 80 00 1c bne 40028430 400283c4: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &existing_loc ); 400283c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400283cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400283d0: 22 80 00 09 be,a 400283f4 <== NOT EXECUTED 400283d4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400283d8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400283dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400283e0: 22 80 00 05 be,a 400283f4 <== NOT EXECUTED 400283e4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400283e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400283ec: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 400283f0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 400283f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400283f8: 02 80 00 08 be 40028418 <== NOT EXECUTED 400283fc: 01 00 00 00 nop <== NOT EXECUTED 40028400: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028404: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028408: 02 80 00 04 be 40028418 <== NOT EXECUTED 4002840c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 40028410: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028414: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028418: 40 00 60 b4 call 400406e8 <__errno> <== NOT EXECUTED 4002841c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40028420: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028424: c2 22 00 00 st %g1, [ %o0 ] 40028428: 81 c7 e0 08 ret 4002842c: 81 e8 00 00 restore } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 40028430: 92 10 00 19 mov %i1, %o1 40028434: b2 07 bf e8 add %fp, -24, %i1 40028438: 9f c0 40 00 call %g1 4002843c: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 40028440: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028444: 80 a0 60 00 cmp %g1, 0 40028448: 02 80 00 08 be 40028468 4002844c: b0 10 00 08 mov %o0, %i0 40028450: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028454: 80 a0 60 00 cmp %g1, 0 40028458: 22 80 00 05 be,a 4002846c 4002845c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40028460: 9f c0 40 00 call %g1 40028464: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 40028468: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002846c: 80 a0 60 00 cmp %g1, 0 40028470: 02 80 00 08 be 40028490 40028474: 01 00 00 00 nop 40028478: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002847c: 80 a0 60 00 cmp %g1, 0 40028480: 02 80 00 04 be 40028490 40028484: 01 00 00 00 nop 40028488: 9f c0 40 00 call %g1 4002848c: 90 07 bf d4 add %fp, -44, %o0 return result; } 40028490: 81 c7 e0 08 ret 40028494: 81 e8 00 00 restore 4001b124 : off_t lseek( int fd, off_t offset, int whence ) { 4001b124: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001b128: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b12c: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 4001cee4 off_t lseek( int fd, off_t offset, int whence ) { 4001b130: 96 10 00 1b mov %i3, %o3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001b134: 80 a6 00 01 cmp %i0, %g1 off_t lseek( int fd, off_t offset, int whence ) { 4001b138: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001b13c: 1a 80 00 0c bcc 4001b16c 4001b140: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 4001b144: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b148: e0 00 60 78 ld [ %g1 + 0x78 ], %l0 ! 4001d878 4001b14c: 83 2e 20 06 sll %i0, 6, %g1 4001b150: b1 2e 20 03 sll %i0, 3, %i0 4001b154: b0 06 00 01 add %i0, %g1, %i0 4001b158: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 4001b15c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b160: 80 88 61 00 btst 0x100, %g1 4001b164: 32 80 00 06 bne,a 4001b17c 4001b168: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b16c: 7f ff d1 55 call 4000f6c0 <__errno> <== NOT EXECUTED 4001b170: 01 00 00 00 nop <== NOT EXECUTED 4001b174: 10 80 00 1e b 4001b1ec <== NOT EXECUTED 4001b178: 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 ) 4001b17c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001b180: 80 a0 60 00 cmp %g1, 0 4001b184: 12 80 00 06 bne 4001b19c 4001b188: 80 a6 e0 01 cmp %i3, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b18c: 7f ff d1 4d call 4000f6c0 <__errno> <== NOT EXECUTED 4001b190: 01 00 00 00 nop <== NOT EXECUTED 4001b194: 10 80 00 16 b 4001b1ec <== NOT EXECUTED 4001b198: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 4001b19c: 02 80 00 09 be 4001b1c0 4001b1a0: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 4001b1a4: 80 a6 e0 02 cmp %i3, 2 4001b1a8: 02 80 00 09 be 4001b1cc 4001b1ac: 80 a6 e0 00 cmp %i3, 0 4001b1b0: 12 80 00 0c bne 4001b1e0 4001b1b4: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; break; 4001b1b8: 10 80 00 12 b 4001b200 4001b1bc: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] case SEEK_CUR: iop->offset += offset; 4001b1c0: 9a 86 80 13 addcc %i2, %l3, %o5 4001b1c4: 10 80 00 05 b 4001b1d8 4001b1c8: 98 46 40 12 addx %i1, %l2, %o4 break; case SEEK_END: iop->offset = iop->size + offset; 4001b1cc: d8 1c 20 08 ldd [ %l0 + 8 ], %o4 4001b1d0: 9a 86 80 0d addcc %i2, %o5, %o5 4001b1d4: 98 46 40 0c addx %i1, %o4, %o4 break; 4001b1d8: 10 80 00 0a b 4001b200 4001b1dc: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] default: rtems_set_errno_and_return_minus_one( EINVAL ); 4001b1e0: 7f ff d1 38 call 4000f6c0 <__errno> 4001b1e4: 01 00 00 00 nop 4001b1e8: 82 10 20 16 mov 0x16, %g1 ! 16 4001b1ec: c2 22 00 00 st %g1, [ %o0 ] 4001b1f0: 11 3f ff ff sethi %hi(0xfffffc00), %o0 4001b1f4: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 4001b1f8: 10 80 00 0e b 4001b230 4001b1fc: 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 ); 4001b200: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b204: 92 10 00 02 mov %g2, %o1 4001b208: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001b20c: 94 10 00 03 mov %g3, %o2 4001b210: 9f c0 40 00 call %g1 4001b214: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 4001b218: 80 a2 3f ff cmp %o0, -1 4001b21c: 12 80 00 06 bne 4001b234 4001b220: b2 10 00 09 mov %o1, %i1 4001b224: 80 a2 7f ff cmp %o1, -1 4001b228: 22 80 00 03 be,a 4001b234 4001b22c: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 4001b230: b2 10 00 09 mov %o1, %i1 4001b234: 81 c7 e0 08 ret 4001b238: 91 e8 00 08 restore %g0, %o0, %o0 400285ec : int _STAT_NAME( const char *path, struct stat *buf ) { 400285ec: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 400285f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400285f4: 12 80 00 06 bne 4002860c <== NOT EXECUTED 400285f8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 400285fc: 40 00 60 3b call 400406e8 <__errno> <== NOT EXECUTED 40028600: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40028604: 10 80 00 20 b 40028684 <== NOT EXECUTED 40028608: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 4002860c: 40 00 7b 76 call 400473e4 <== NOT EXECUTED 40028610: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028614: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40028618: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4002861c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40028620: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028624: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40028628: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002862c: 7f ff 7d 52 call 40007b74 <== NOT EXECUTED 40028630: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 40028634: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028638: 12 80 00 14 bne 40028688 <== NOT EXECUTED 4002863c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 40028640: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40028644: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028648: 12 80 00 12 bne 40028690 <== NOT EXECUTED 4002864c: 92 10 20 00 clr %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40028650: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40028654: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028658: 02 80 00 08 be 40028678 <== NOT EXECUTED 4002865c: 01 00 00 00 nop <== NOT EXECUTED 40028660: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028668: 02 80 00 04 be 40028678 <== NOT EXECUTED 4002866c: 01 00 00 00 nop <== NOT EXECUTED 40028670: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028674: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028678: 40 00 60 1c call 400406e8 <__errno> <== NOT EXECUTED 4002867c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028680: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028684: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028688: 81 c7 e0 08 ret <== NOT EXECUTED 4002868c: 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) ); 40028690: 94 10 20 48 mov 0x48, %o2 <== NOT EXECUTED 40028694: 40 00 6d 7b call 40043c80 <== NOT EXECUTED 40028698: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 4002869c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400286a0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400286a4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 400286a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400286ac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 400286b0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400286b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400286b8: 02 bf ff f4 be 40028688 <== NOT EXECUTED 400286bc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400286c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400286c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400286c8: 02 80 00 04 be 400286d8 <== NOT EXECUTED 400286cc: 01 00 00 00 nop <== NOT EXECUTED 400286d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400286d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 400286d8: 81 c7 e0 08 ret <== NOT EXECUTED 400286dc: 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 88 or %g1, 0x88, %g1 ! 4001d888 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 76 sethi %hi(0x4001d800), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000b6d8: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 4001dbf0 <_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 62 f0 ld [ %g1 + 0x2f0 ], %o0 ! 4001cef0 4000b700: 92 10 00 10 mov %l0, %o1 4000b704: 94 10 20 00 clr %o2 4000b708: 40 00 05 1d call 4000cb7c <_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 5c ld [ %g1 + 0x15c ], %g1 ! 4001d55c 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 de call 4000f6c0 <__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 60 ld [ %g1 + 0x160 ], %g1 ! 4001d560 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 58 ld [ %g1 + 0x158 ], %g1 ! 4001d558 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 77 sethi %hi(0x4001dc00), %o0 <== NOT EXECUTED 4000b664: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 4001dfd8 <== 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 77 sethi %hi(0x4001dc00), %l0 rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 4000b680: 10 80 00 04 b 4000b690 4000b684: a0 14 23 d8 or %l0, 0x3d8, %l0 ! 4001dfd8 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 9c call 4000c500 <_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 400131e8 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 400131e8: 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) ) { 400131ec: 7f ff f6 16 call 40010a44 400131f0: 90 10 00 18 mov %i0, %o0 400131f4: 80 a2 20 00 cmp %o0, 0 400131f8: 12 80 00 13 bne 40013244 400131fc: 01 00 00 00 nop 40013200: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 40013204: 80 a0 60 00 cmp %g1, 0 40013208: 12 80 00 0f bne 40013244 4001320c: 03 10 00 8c sethi %hi(0x40023000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 40013210: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 ! 40023340 40013214: c4 00 60 04 ld [ %g1 + 4 ], %g2 40013218: 80 a0 80 18 cmp %g2, %i0 4001321c: 22 80 00 02 be,a 40013224 40013220: 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) 40013224: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013228: 80 a0 60 06 cmp %g1, 6 4001322c: 02 80 00 04 be 4001323c 40013230: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 40013234: 7f ff ff 8c call 40013064 40013238: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 4001323c: 7f ff c5 87 call 40004858 40013240: 90 10 00 18 mov %i0, %o0 } return 0; } 40013244: 81 c7 e0 08 ret 40013248: 91 e8 20 00 restore %g0, 0, %o0 40012f9c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40012f9c: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 40012fa0: 80 a6 20 00 cmp %i0, 0 40012fa4: 32 80 00 0a bne,a 40012fcc 40012fa8: e0 06 00 00 ld [ %i0 ], %l0 40012fac: 11 10 00 8a sethi %hi(0x40022800), %o0 <== NOT EXECUTED 40012fb0: 15 10 00 8a sethi %hi(0x40022800), %o2 <== NOT EXECUTED 40012fb4: 17 10 00 8a sethi %hi(0x40022800), %o3 <== NOT EXECUTED 40012fb8: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40012fbc: 94 12 a1 f8 or %o2, 0x1f8, %o2 <== NOT EXECUTED 40012fc0: 96 12 e0 e0 or %o3, 0xe0, %o3 <== NOT EXECUTED 40012fc4: 7f ff c5 2f call 40004480 <__assert_func> <== NOT EXECUTED 40012fc8: 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 40012fd0: a2 10 20 00 clr %l1 if ( b[i] ) { 40012fd4: 80 a2 20 00 cmp %o0, 0 40012fd8: 02 80 00 05 be 40012fec 40012fdc: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40012fe0: 7f ff ff 2a call 40012c88 40012fe4: 01 00 00 00 nop b[i] = 0; 40012fe8: 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 40012ff8: 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 ); 40012ffc: 7f ff ff 23 call 40012c88 40013000: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 40013004: c0 26 00 00 clr [ %i0 ] } 40013008: 81 c7 e0 08 ret 4001300c: 81 e8 00 00 restore 400134fc : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 400134fc: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40013500: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 40013504: 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 ) 40013508: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 4001350c: 80 a0 40 19 cmp %g1, %i1 40013510: 06 80 00 09 bl 40013534 40013514: 94 10 00 1a mov %i2, %o2 40013518: 80 a0 40 19 cmp %g1, %i1 4001351c: 32 80 00 0a bne,a 40013544 40013520: d2 24 20 50 st %o1, [ %l0 + 0x50 ] <== NOT EXECUTED 40013524: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40013528: 80 a0 40 1a cmp %g1, %i2 4001352c: 3a 80 00 06 bcc,a 40013544 40013530: d2 24 20 50 st %o1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 40013534: 7f ff ff 8f call 40013370 <== NOT EXECUTED 40013538: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001353c: 81 c7 e0 08 ret <== NOT EXECUTED 40013540: 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; 40013544: d4 24 20 54 st %o2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 40013548: d2 26 20 08 st %o1, [ %i0 + 8 ] 4001354c: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 40013550: 90 07 bf f8 add %fp, -8, %o0 40013554: 7f ff c4 eb call 40004900 40013558: 92 10 20 00 clr %o1 4001355c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40013560: 90 10 20 00 clr %o0 40013564: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 40013568: b0 10 00 08 mov %o0, %i0 4001356c: 81 c7 e0 08 ret 40013570: 81 e8 00 00 restore 40013574 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 40013574: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40013578: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 4001357c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40013580: 80 a0 60 06 cmp %g1, 6 40013584: 32 80 00 11 bne,a 400135c8 40013588: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 4001358c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40013590: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 <== NOT EXECUTED 40013594: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40013598: 14 80 00 09 bg 400135bc <== NOT EXECUTED 4001359c: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 <== NOT EXECUTED 400135a0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400135a4: 32 80 00 1a bne,a 4001360c <== NOT EXECUTED 400135a8: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 400135ac: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 <== NOT EXECUTED 400135b0: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 400135b4: 28 80 00 16 bleu,a 4001360c <== NOT EXECUTED 400135b8: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 400135bc: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 400135c0: 10 80 00 12 b 40013608 <== NOT EXECUTED 400135c4: 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 )) 400135c8: 90 10 00 10 mov %l0, %o0 400135cc: 92 10 00 02 mov %g2, %o1 400135d0: 7f ff ff 68 call 40013370 400135d4: 94 10 00 03 mov %g3, %o2 400135d8: 80 a2 20 00 cmp %o0, 0 400135dc: 22 80 00 0a be,a 40013604 400135e0: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 400135e4: 40 00 07 2c call 40015294 <__errno> <== NOT EXECUTED 400135e8: 01 00 00 00 nop <== NOT EXECUTED 400135ec: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 400135f0: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 400135f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400135f8: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 400135fc: 10 80 00 04 b 4001360c <== NOT EXECUTED 40013600: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 40013604: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 40013608: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 } 4001360c: b2 10 00 03 mov %g3, %i1 40013610: 81 c7 e0 08 ret 40013614: 91 e8 00 02 restore %g0, %g2, %o0 400138e0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400138e0: 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)) 400138e4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400138e8: 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)) 400138ec: 80 88 62 04 btst 0x204, %g1 400138f0: 02 80 00 19 be 40013954 400138f4: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 && (the_jnode->type == IMFS_LINEAR_FILE)) { 400138f8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400138fc: 80 a0 60 06 cmp %g1, 6 40013900: 32 80 00 16 bne,a 40013958 40013904: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 40013908: d8 04 20 54 ld [ %l0 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 4001390c: d6 04 20 58 ld [ %l0 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 40013910: 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; 40013914: 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; 40013918: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 4001391c: 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; 40013920: 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; 40013924: 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) 40013928: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 4001392c: 02 80 00 0a be 40013954 <== NOT EXECUTED 40013930: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 40013934: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40013938: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001393c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40013940: 7f ff ff 36 call 40013618 <== NOT EXECUTED 40013944: 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) 40013948: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4001394c: 02 80 00 0a be 40013974 <== NOT EXECUTED 40013950: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 40013954: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 40013958: 80 88 62 00 btst 0x200, %g1 4001395c: 02 80 00 04 be 4001396c 40013960: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 40013964: c4 3c 60 10 std %g2, [ %l1 + 0x10 ] iop->size = the_jnode->info.file.size; 40013968: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 4001396c: b0 10 20 00 clr %i0 40013970: c4 3c 60 08 std %g2, [ %l1 + 8 ] return 0; } 40013974: 81 c7 e0 08 ret 40013978: 81 e8 00 00 restore 4001324c : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4001324c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40013250: 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 ) { 40013254: c2 04 20 08 ld [ %l0 + 8 ], %g1 40013258: 80 a0 60 00 cmp %g1, 0 4001325c: 22 80 00 06 be,a 40013274 40013260: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 40013264: 7f ff d7 1b call 40008ed0 <_Chain_Extract> 40013268: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4001326c: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40013270: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40013274: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40013278: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4001327c: 90 07 bf f8 add %fp, -8, %o0 40013280: 7f ff c5 a0 call 40004900 40013284: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40013288: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 4001328c: 90 10 00 10 mov %l0, %o0 40013290: 7f ff ff d6 call 400131e8 40013294: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } 40013298: 81 c7 e0 08 ret 4001329c: 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 0c or %o1, 0x20c, %o1 4000a090: 94 12 a3 d0 or %o2, 0x3d0, %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 f2 call 4000f6c0 <__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 73 sethi %hi(0x4001cc00), %g1 40003324: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40003328: d2 00 63 f8 ld [ %g1 + 0x3f8 ], %o1 ! 4001cff8 4000332c: 90 07 bf e8 add %fp, -24, %o0 40003330: 92 02 60 18 add %o1, 0x18, %o1 40003334: 40 00 33 1e call 4000ffac 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 63 f8 ld [ %g1 + 0x3f8 ], %o1 40003348: 90 07 bf e8 add %fp, -24, %o0 4000334c: 92 02 60 04 add %o1, 4, %o1 40003350: 40 00 33 17 call 4000ffac 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 c2 call 4000f6c0 <__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 9c call 4000f6c0 <__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 48 call 4001059c <== 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 89 call 4000f6c0 <__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 12 call 40010510 <== 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 2d call 4001059c 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 61 call 4000f6c0 <__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 b8 ld [ %g1 + 0xb8 ], %g1 40003558: 84 10 a0 bc or %g2, 0xbc, %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 4e call 4000f6c0 <__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 4a call 4000f6c0 <__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 b8 or %o0, 0xb8, %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 00 call 4000fb24 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 2e call 4000f820 <== 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 5c ldsb [ %g1 + 0x5c ], %g2 ! 4002245c 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 5c stb %g2, [ %g1 + 0x5c ] status = rtems_io_register_name( 40003800: 90 12 22 10 or %o0, 0x210, %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 44 st %i0, [ %g1 + 0x344 ] } 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 ee call 4001059c 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 2b call 4000f6c0 <__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 ce call 4001059c 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 34 call 4000ffac 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 e7 call 4000f6c0 <__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 78 ld [ %g1 + 0x78 ], %g1 ! 4001d878 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 ce call 4000f6c0 <__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 c8 call 4000f6c0 <__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 78 ld [ %g1 + 0x78 ], %g1 ! 4001d878 <== 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 9f call 4000f6c0 <__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 78 ld [ %g1 + 0x78 ], %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 20 or %l0, 0x120, %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 20 or %l0, 0x120, %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 20 or %l0, 0x120, %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 18 or %o0, 0x18, %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 20 or %o0, 0x20, %o0 ! 4001c020 <__FUNCTION__.5794+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 98 ld [ %g1 + 0x98 ], %g1 ! 4001d098 <__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 98 ld [ %g2 + 0x98 ], %g2 ! 4001d098 <__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 4000eb70 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4000eb70: 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) 4000eb74: 23 10 00 71 sethi %hi(0x4001c400), %l1 4000eb78: a0 07 bf dc add %fp, -36, %l0 4000eb7c: 92 10 20 03 mov 3, %o1 4000eb80: 90 14 63 18 or %l1, 0x318, %o0 4000eb84: 94 10 20 07 mov 7, %o2 4000eb88: 96 10 00 10 mov %l0, %o3 4000eb8c: 7f ff d1 35 call 40003060 4000eb90: 98 10 20 01 mov 1, %o4 4000eb94: 80 a2 20 00 cmp %o0, 0 4000eb98: 02 80 00 10 be 4000ebd8 4000eb9c: c2 07 bf e8 ld [ %fp + -24 ], %g1 != 0) { if (errno != ENOENT) 4000eba0: 40 00 02 c8 call 4000f6c0 <__errno> 4000eba4: 01 00 00 00 nop 4000eba8: c2 02 00 00 ld [ %o0 ], %g1 4000ebac: 80 a0 60 02 cmp %g1, 2 4000ebb0: 32 80 00 59 bne,a 4000ed14 4000ebb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4000ebb8: 90 14 63 18 or %l1, 0x318, %o0 4000ebbc: 7f ff d1 be call 400032b4 4000ebc0: 92 10 23 ff mov 0x3ff, %o1 4000ebc4: 80 a2 20 00 cmp %o0, 0 4000ebc8: 02 80 00 0e be 4000ec00 4000ebcc: 03 10 00 75 sethi %hi(0x4001d400), %g1 } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4000ebd0: 81 c7 e0 08 ret <== NOT EXECUTED 4000ebd4: 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); 4000ebd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ebdc: 22 80 00 09 be,a 4000ec00 <== NOT EXECUTED 4000ebe0: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ebe4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001d41c <== NOT EXECUTED 4000ebe8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ebec: 22 80 00 05 be,a 4000ec00 <== NOT EXECUTED 4000ebf0: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ebf4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ebf8: 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 ++); 4000ebfc: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000ec00: c4 10 62 c6 lduh [ %g1 + 0x2c6 ], %g2 ! 4001d6c6 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ec04: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ec08: 95 28 a0 10 sll %g2, 0x10, %o2 4000ec0c: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ec10: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ec14: c4 30 62 c6 sth %g2, [ %g1 + 0x2c6 ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ec18: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 4000ec1c: 03 00 00 19 sethi %hi(0x6400), %g1 4000ec20: 84 10 a1 70 or %g2, 0x170, %g2 4000ec24: 82 10 62 6f or %g1, 0x26f, %g1 4000ec28: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ec2c: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000ec30: c4 3f bf f0 std %g2, [ %fp + -16 ] 4000ec34: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000ec38: 90 07 bf fa add %fp, -6, %o0 4000ec3c: 13 10 00 71 sethi %hi(0x4001c400), %o1 4000ec40: 40 00 05 8b call 4001026c 4000ec44: 92 12 63 20 or %o1, 0x320, %o1 ! 4001c720 <__FUNCTION__.5943+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4000ec48: 90 10 00 10 mov %l0, %o0 4000ec4c: 40 00 00 4b call 4000ed78 4000ec50: 92 10 21 80 mov 0x180, %o1 4000ec54: 80 a2 20 00 cmp %o0, 0 4000ec58: 02 80 00 05 be 4000ec6c 4000ec5c: 90 10 00 10 mov %l0, %o0 if (errno != EEXIST){ 4000ec60: 40 00 02 98 call 4000f6c0 <__errno> <== NOT EXECUTED 4000ec64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ec68: 30 80 00 2b b,a 4000ed14 <== 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); 4000ec6c: 7f ff d3 4b call 40003998 4000ec70: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 4000ec74: 80 a2 20 00 cmp %o0, 0 4000ec78: 16 80 00 07 bge 4000ec94 4000ec7c: d0 26 00 00 st %o0, [ %i0 ] err = errno; 4000ec80: 40 00 02 90 call 4000f6c0 <__errno> 4000ec84: 01 00 00 00 nop 4000ec88: 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); 4000ec8c: 10 80 00 1d b 4000ed00 4000ec90: 90 10 00 10 mov %l0, %o0 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4000ec94: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 4000ec98: c4 00 62 e4 ld [ %g1 + 0x2e4 ], %g2 ! 4001cee4 <== NOT EXECUTED 4000ec9c: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000eca0: 1a 80 00 08 bcc 4000ecc0 <== NOT EXECUTED 4000eca4: 82 10 20 00 clr %g1 <== NOT EXECUTED 4000eca8: 03 10 00 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 4000ecac: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 4001d878 <== NOT EXECUTED 4000ecb0: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4000ecb4: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 4000ecb8: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 4000ecbc: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000ecc0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000ecc4: 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; 4000ecc8: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000eccc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000ecd0: 7f ff d3 32 call 40003998 <== NOT EXECUTED 4000ecd4: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 4000ecd8: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 4000ecdc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ece0: 16 80 00 07 bge 4000ecfc <== NOT EXECUTED 4000ece4: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; 4000ece8: 40 00 02 76 call 4000f6c0 <__errno> <== NOT EXECUTED 4000ecec: 01 00 00 00 nop <== NOT EXECUTED 4000ecf0: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 4000ecf4: 7f ff f0 dd call 4000b068 <== NOT EXECUTED 4000ecf8: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED } unlink(fifopath); 4000ecfc: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4000ed00: 40 00 00 28 call 4000eda0 4000ed04: b0 10 3f ff mov -1, %i0 } rtems_set_errno_and_return_minus_one(err); 4000ed08: 40 00 02 6e call 4000f6c0 <__errno> 4000ed0c: 01 00 00 00 nop 4000ed10: e2 22 00 00 st %l1, [ %o0 ] } 4000ed14: 81 c7 e0 08 ret 4000ed18: 81 e8 00 00 restore 4000d748 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4000d748: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4000d74c: 40 00 03 54 call 4000e49c <== NOT EXECUTED 4000d750: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000d754: 40 00 03 52 call 4000e49c <== NOT EXECUTED 4000d758: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000d75c: 7f ff e3 37 call 40006438 <== NOT EXECUTED 4000d760: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000d764: 7f ff f6 70 call 4000b124 <== NOT EXECUTED 4000d768: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED free(pipe); 4000d76c: 7f ff f6 6e call 4000b124 <== NOT EXECUTED 4000d770: 81 e8 00 00 restore <== NOT EXECUTED 4000d774: 01 00 00 00 nop 4000d36c : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000d36c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 4000d370: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000d374: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 4000d378: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000d37c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000d380: 12 80 00 12 bne 4000d3c8 <== NOT EXECUTED 4000d384: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 4000d388: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000d38c: 02 80 00 0f be 4000d3c8 <== NOT EXECUTED 4000d390: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4000d394: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d398: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d39c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d3a0: 7f ff e4 54 call 400064f0 <== NOT EXECUTED 4000d3a4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d3a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d3ac: 12 80 00 07 bne 4000d3c8 <== NOT EXECUTED 4000d3b0: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000d3b4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d3b8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000d3bc: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d3c0: 7f ff e4 93 call 4000660c <== NOT EXECUTED 4000d3c4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 4000d3c8: 81 c7 e0 08 ret <== NOT EXECUTED 4000d3cc: 81 e8 00 00 restore <== NOT EXECUTED 4000d2f8 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4000d2f8: 81 c3 e0 08 retl <== NOT EXECUTED 4000d2fc: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED 4000d3d0 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000d3d0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000d3d4: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000d3d8: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000d3dc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d3e0: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d3e4: 7f ff e4 43 call 400064f0 <== NOT EXECUTED 4000d3e8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000d3ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d3f0: 02 80 00 54 be 4000d540 <== NOT EXECUTED 4000d3f4: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED 4000d3f8: 81 c7 e0 08 ret <== NOT EXECUTED 4000d3fc: 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) 4000d400: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d404: 02 80 00 53 be 4000d550 <== NOT EXECUTED 4000d408: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4000d40c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000d410: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d414: 22 80 00 04 be,a 4000d424 <== NOT EXECUTED 4000d418: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000d41c: 10 80 00 4d b 4000d550 <== NOT EXECUTED 4000d420: 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); 4000d424: 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 ++; 4000d428: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d42c: 7f ff e4 78 call 4000660c <== NOT EXECUTED 4000d430: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000d434: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d438: 40 00 04 4a call 4000e560 <== NOT EXECUTED 4000d43c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d440: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d444: 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)) 4000d448: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d44c: 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)) 4000d450: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d454: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d458: 7f ff e4 26 call 400064f0 <== NOT EXECUTED 4000d45c: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000d460: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d464: 22 80 00 04 be,a 4000d474 <== NOT EXECUTED 4000d468: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000d46c: 10 80 00 3b b 4000d558 <== NOT EXECUTED 4000d470: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4000d474: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4000d478: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000d47c: 12 80 00 35 bne 4000d550 <== NOT EXECUTED 4000d480: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4000d484: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000d488: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000d48c: 22 bf ff dd be,a 4000d400 <== NOT EXECUTED 4000d490: 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); 4000d494: 82 26 80 18 sub %i2, %i0, %g1 <== NOT EXECUTED 4000d498: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000d49c: 38 80 00 02 bgu,a 4000d4a4 <== NOT EXECUTED 4000d4a0: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4000d4a4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000d4a8: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000d4ac: 90 06 40 18 add %i1, %i0, %o0 <== NOT EXECUTED 4000d4b0: a4 24 80 01 sub %l2, %g1, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000d4b4: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d4b8: 04 80 00 0a ble 4000d4e0 <== NOT EXECUTED 4000d4bc: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4000d4c0: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000d4c4: 40 00 0a ba call 4000ffac <== NOT EXECUTED 4000d4c8: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4000d4cc: 90 06 00 12 add %i0, %l2, %o0 <== NOT EXECUTED 4000d4d0: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 4000d4d4: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000d4d8: 10 80 00 04 b 4000d4e8 <== NOT EXECUTED 4000d4dc: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4000d4e0: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000d4e4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000d4e8: 40 00 0a b1 call 4000ffac <== NOT EXECUTED 4000d4ec: 01 00 00 00 nop <== NOT EXECUTED pipe->Start += chunk; 4000d4f0: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000d4f4: 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; 4000d4f8: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000d4fc: 40 00 2e ae call 40018fb4 <.urem> <== NOT EXECUTED 4000d500: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000d504: 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; 4000d508: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000d50c: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4000d510: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d514: 12 80 00 03 bne 4000d520 <== NOT EXECUTED 4000d518: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 4000d51c: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 4000d520: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d524: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d528: 22 80 00 06 be,a 4000d540 <== NOT EXECUTED 4000d52c: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000d530: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d534: 40 00 03 f4 call 4000e504 <== NOT EXECUTED 4000d538: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 4000d53c: 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) { 4000d540: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000d544: 2a bf ff d1 bcs,a 4000d488 <== NOT EXECUTED 4000d548: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000d54c: a2 10 20 00 clr %l1 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4000d550: 7f ff e4 2f call 4000660c <== NOT EXECUTED 4000d554: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 4000d558: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d55c: 24 80 00 02 ble,a 4000d564 <== NOT EXECUTED 4000d560: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return read; return ret; } 4000d564: 81 c7 e0 08 ret <== NOT EXECUTED 4000d568: 81 e8 00 00 restore <== NOT EXECUTED 4000d778 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000d778: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 4000d77c: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4000d780: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d784: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d788: 7f ff e3 5a call 400064f0 <== NOT EXECUTED 4000d78c: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4000d790: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d794: 12 80 00 17 bne 4000d7f0 <== NOT EXECUTED 4000d798: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4000d79c: e2 06 60 18 ld [ %i1 + 0x18 ], %l1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4000d7a0: 80 8c 60 02 btst 2, %l1 <== NOT EXECUTED 4000d7a4: 02 80 00 05 be 4000d7b8 <== NOT EXECUTED 4000d7a8: a2 0c 60 06 and %l1, 6, %l1 <== NOT EXECUTED pipe->Readers --; 4000d7ac: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d7b0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d7b4: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4000d7b8: 80 8c 60 04 btst 4, %l1 <== NOT EXECUTED 4000d7bc: 02 80 00 06 be 4000d7d4 <== NOT EXECUTED 4000d7c0: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED pipe->Writers --; 4000d7c4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000d7c8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d7cc: c2 24 20 14 st %g1, [ %l0 + 0x14 ] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4000d7d0: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d7d4: d0 00 62 c0 ld [ %g1 + 0x2c0 ], %o0 ! 4001d6c0 <== NOT EXECUTED 4000d7d8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d7dc: 7f ff e3 45 call 400064f0 <== NOT EXECUTED 4000d7e0: 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) 4000d7e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d7e8: 02 80 00 04 be 4000d7f8 <== NOT EXECUTED 4000d7ec: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); 4000d7f0: 7f ff e4 e9 call 40006b94 <== NOT EXECUTED 4000d7f4: 01 00 00 00 nop <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d7f8: 7f ff e3 85 call 4000660c <== NOT EXECUTED 4000d7fc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4000d800: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d804: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d808: 12 80 00 0a bne 4000d830 <== NOT EXECUTED 4000d80c: 80 a4 60 04 cmp %l1, 4 <== NOT EXECUTED 4000d810: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 4000d814: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d818: 12 80 00 06 bne 4000d830 <== NOT EXECUTED 4000d81c: 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); 4000d820: 7f ff ff ca call 4000d748 <== NOT EXECUTED 4000d824: 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) { 4000d828: 10 80 00 12 b 4000d870 <== NOT EXECUTED 4000d82c: 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) 4000d830: 02 80 00 06 be 4000d848 <== NOT EXECUTED 4000d834: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d838: 12 80 00 05 bne 4000d84c <== NOT EXECUTED 4000d83c: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4000d840: 10 80 00 0a b 4000d868 <== NOT EXECUTED 4000d844: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4000d848: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED 4000d84c: 02 80 00 0a be 4000d874 <== NOT EXECUTED 4000d850: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d854: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000d858: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d85c: 12 80 00 06 bne 4000d874 <== NOT EXECUTED 4000d860: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000d864: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d868: 40 00 03 27 call 4000e504 <== NOT EXECUTED 4000d86c: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4000d870: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d874: d0 00 62 c0 ld [ %g1 + 0x2c0 ], %o0 ! 4001d6c0 <== NOT EXECUTED 4000d878: 7f ff e3 65 call 4000660c <== NOT EXECUTED 4000d87c: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000d880: 81 c7 e0 08 ret <== NOT EXECUTED 4000d884: 81 e8 00 00 restore <== NOT EXECUTED 4000d56c : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4000d56c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4000d570: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4000d574: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000d578: 02 80 00 72 be 4000d740 <== NOT EXECUTED 4000d57c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 4000d580: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000d584: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d588: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d58c: 7f ff e3 d9 call 400064f0 <== NOT EXECUTED 4000d590: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000d594: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d598: 12 80 00 6a bne 4000d740 <== NOT EXECUTED 4000d59c: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4000d5a0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d5a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d5a8: 02 80 00 5a be 4000d710 <== NOT EXECUTED 4000d5ac: 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; 4000d5b0: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 4000d5b4: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 4000d5b8: 08 80 00 04 bleu 4000d5c8 <== NOT EXECUTED 4000d5bc: a6 10 00 1a mov %i2, %l3 <== NOT EXECUTED 4000d5c0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED 4000d5c4: 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); 4000d5c8: 10 80 00 4e b 4000d700 <== NOT EXECUTED 4000d5cc: 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)) { 4000d5d0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d5d4: 22 80 00 04 be,a 4000d5e4 <== NOT EXECUTED 4000d5d8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d5dc: 10 80 00 4d b 4000d710 <== NOT EXECUTED 4000d5e0: 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); 4000d5e4: 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 ++; 4000d5e8: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000d5ec: 7f ff e4 08 call 4000660c <== NOT EXECUTED 4000d5f0: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000d5f4: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000d5f8: 40 00 03 da call 4000e560 <== NOT EXECUTED 4000d5fc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d600: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d604: 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)) 4000d608: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d60c: 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)) 4000d610: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000d614: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d618: 7f ff e3 b6 call 400064f0 <== NOT EXECUTED 4000d61c: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000d620: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d624: 22 80 00 04 be,a 4000d634 <== NOT EXECUTED 4000d628: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000d62c: 10 80 00 42 b 4000d734 <== NOT EXECUTED 4000d630: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) 4000d634: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4000d638: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000d63c: 12 80 00 35 bne 4000d710 <== NOT EXECUTED 4000d640: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4000d644: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d648: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d64c: 32 80 00 04 bne,a 4000d65c <== NOT EXECUTED 4000d650: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000d654: 10 80 00 2f b 4000d710 <== NOT EXECUTED 4000d658: 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) { 4000d65c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000d660: a2 24 80 01 sub %l2, %g1, %l1 <== NOT EXECUTED 4000d664: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 4000d668: 2a bf ff da bcs,a 4000d5d0 <== NOT EXECUTED 4000d66c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4000d670: 84 26 80 18 sub %i2, %i0, %g2 <== NOT EXECUTED 4000d674: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000d678: 38 80 00 02 bgu,a 4000d680 <== NOT EXECUTED 4000d67c: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4000d680: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 4000d684: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 4000d688: 40 00 2e 4b call 40018fb4 <.urem> <== NOT EXECUTED 4000d68c: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000d690: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000d694: a4 24 80 08 sub %l2, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000d698: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000d69c: 04 80 00 0a ble 4000d6c4 <== NOT EXECUTED 4000d6a0: 92 06 40 18 add %i1, %i0, %o1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4000d6a4: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000d6a8: 40 00 0a 41 call 4000ffac <== NOT EXECUTED 4000d6ac: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4000d6b0: 92 04 80 18 add %l2, %i0, %o1 <== NOT EXECUTED 4000d6b4: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4000d6b8: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000d6bc: 10 80 00 04 b 4000d6cc <== NOT EXECUTED 4000d6c0: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4000d6c4: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000d6c8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000d6cc: 40 00 0a 38 call 4000ffac <== NOT EXECUTED 4000d6d0: 01 00 00 00 nop <== NOT EXECUTED pipe->Length += chunk; 4000d6d4: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000d6d8: 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; 4000d6dc: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000d6e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d6e4: 02 80 00 05 be 4000d6f8 <== NOT EXECUTED 4000d6e8: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000d6ec: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000d6f0: 40 00 03 85 call 4000e504 <== NOT EXECUTED 4000d6f4: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 4000d6f8: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 4000d6fc: 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) { 4000d700: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000d704: 2a bf ff d6 bcs,a 4000d65c <== NOT EXECUTED 4000d708: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000d70c: 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); 4000d710: 7f ff e3 bf call 4000660c <== NOT EXECUTED 4000d714: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4000d718: 80 a4 7f e0 cmp %l1, -32 <== NOT EXECUTED 4000d71c: 12 80 00 07 bne 4000d738 <== NOT EXECUTED 4000d720: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED kill(getpid(), SIGPIPE); 4000d724: 40 00 02 20 call 4000dfa4 <== NOT EXECUTED 4000d728: 01 00 00 00 nop <== NOT EXECUTED 4000d72c: 40 00 02 9a call 4000e194 <== NOT EXECUTED 4000d730: 92 10 20 0d mov 0xd, %o1 ! d <== NOT EXECUTED #endif if (written > 0) 4000d734: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000d738: 24 80 00 02 ble,a 4000d740 <== NOT EXECUTED 4000d73c: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return written; return ret; } 4000d740: 81 c7 e0 08 ret <== NOT EXECUTED 4000d744: 81 e8 00 00 restore <== NOT EXECUTED 4001b304 : ssize_t read( int fd, void *buffer, size_t count ) { 4001b304: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b308: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b30c: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 4001cee4 ssize_t read( int fd, void *buffer, size_t count ) { 4001b310: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b314: 80 a6 00 01 cmp %i0, %g1 4001b318: 1a 80 00 0c bcc 4001b348 4001b31c: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001b320: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b324: e0 00 60 78 ld [ %g1 + 0x78 ], %l0 ! 4001d878 4001b328: 83 2e 20 06 sll %i0, 6, %g1 4001b32c: b1 2e 20 03 sll %i0, 3, %i0 4001b330: b0 06 00 01 add %i0, %g1, %i0 4001b334: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001b338: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b33c: 80 88 61 00 btst 0x100, %g1 4001b340: 12 80 00 06 bne 4001b358 4001b344: 80 a6 60 00 cmp %i1, 0 4001b348: 7f ff d0 de call 4000f6c0 <__errno> 4001b34c: 01 00 00 00 nop 4001b350: 10 80 00 14 b 4001b3a0 4001b354: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_buffer( buffer ); 4001b358: 02 80 00 07 be 4001b374 4001b35c: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001b360: 02 80 00 1c be 4001b3d0 4001b364: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001b368: 80 88 60 02 btst 2, %g1 4001b36c: 32 80 00 06 bne,a 4001b384 4001b370: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b374: 7f ff d0 d3 call 4000f6c0 <__errno> <== NOT EXECUTED 4001b378: 01 00 00 00 nop <== NOT EXECUTED 4001b37c: 10 80 00 09 b 4001b3a0 <== NOT EXECUTED 4001b380: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 4001b384: c2 00 60 08 ld [ %g1 + 8 ], %g1 4001b388: 80 a0 60 00 cmp %g1, 0 4001b38c: 12 80 00 08 bne 4001b3ac 4001b390: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b394: 7f ff d0 cb call 4000f6c0 <__errno> <== NOT EXECUTED 4001b398: 01 00 00 00 nop <== NOT EXECUTED 4001b39c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001b3a0: c2 22 00 00 st %g1, [ %o0 ] 4001b3a4: 10 80 00 0b b 4001b3d0 4001b3a8: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->read_h)( iop, buffer, count ); 4001b3ac: 9f c0 40 00 call %g1 4001b3b0: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001b3b4: 80 a2 20 00 cmp %o0, 0 4001b3b8: 04 80 00 06 ble 4001b3d0 4001b3bc: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 4001b3c0: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001b3c4: 86 83 40 08 addcc %o5, %o0, %g3 4001b3c8: 84 43 00 02 addx %o4, %g2, %g2 4001b3cc: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001b3d0: 81 c7 e0 08 ret 4001b3d4: 91 e8 00 08 restore %g0, %o0, %o0 40028b60 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 40028b60: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40028b64: 80 a6 60 00 cmp %i1, 0 40028b68: 12 80 00 06 bne 40028b80 40028b6c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 40028b70: 40 00 5e de call 400406e8 <__errno> <== NOT EXECUTED 40028b74: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40028b78: 10 80 00 32 b 40028c40 <== NOT EXECUTED 40028b7c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 40028b80: 40 00 7a 19 call 400473e4 40028b84: 90 10 00 18 mov %i0, %o0 40028b88: a0 07 bf ec add %fp, -20, %l0 40028b8c: 92 10 00 08 mov %o0, %o1 40028b90: 94 10 20 00 clr %o2 40028b94: 90 10 00 18 mov %i0, %o0 40028b98: 96 10 00 10 mov %l0, %o3 40028b9c: 98 10 20 00 clr %o4 40028ba0: 7f ff 7b f5 call 40007b74 40028ba4: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 40028ba8: 80 a2 20 00 cmp %o0, 0 40028bac: 12 80 00 26 bne 40028c44 40028bb0: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 40028bb4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40028bb8: 80 a0 60 00 cmp %g1, 0 40028bbc: 22 80 00 19 be,a 40028c20 40028bc0: 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 ){ 40028bc4: 9f c0 40 00 call %g1 40028bc8: 90 10 00 10 mov %l0, %o0 40028bcc: 80 a2 20 04 cmp %o0, 4 40028bd0: 02 80 00 0f be 40028c0c 40028bd4: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_freenode( &loc ); 40028bd8: 80 a0 a0 00 cmp %g2, 0 40028bdc: 02 80 00 08 be 40028bfc 40028be0: 01 00 00 00 nop 40028be4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40028be8: 80 a0 60 00 cmp %g1, 0 40028bec: 02 80 00 04 be 40028bfc 40028bf0: 01 00 00 00 nop 40028bf4: 9f c0 40 00 call %g1 40028bf8: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40028bfc: 40 00 5e bb call 400406e8 <__errno> 40028c00: b0 10 3f ff mov -1, %i0 40028c04: 10 80 00 0f b 40028c40 40028c08: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 40028c0c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 40028c10: 80 a0 60 00 cmp %g1, 0 40028c14: 12 80 00 0e bne 40028c4c 40028c18: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 40028c1c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40028c20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028c24: 02 80 00 04 be 40028c34 <== NOT EXECUTED 40028c28: 01 00 00 00 nop <== NOT EXECUTED 40028c2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028c30: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028c34: 40 00 5e ad call 400406e8 <__errno> <== NOT EXECUTED 40028c38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028c3c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028c40: c2 22 00 00 st %g1, [ %o0 ] 40028c44: 81 c7 e0 08 ret 40028c48: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 40028c4c: 94 10 00 1a mov %i2, %o2 40028c50: 9f c0 40 00 call %g1 40028c54: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40028c58: c2 07 bf f8 ld [ %fp + -8 ], %g1 40028c5c: 80 a0 60 00 cmp %g1, 0 40028c60: 02 bf ff f9 be 40028c44 40028c64: b0 10 00 08 mov %o0, %i0 40028c68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028c6c: 80 a0 60 00 cmp %g1, 0 40028c70: 02 80 00 04 be 40028c80 40028c74: 01 00 00 00 nop 40028c78: 9f c0 40 00 call %g1 40028c7c: 90 10 00 10 mov %l0, %o0 return result; } 40028c80: 81 c7 e0 08 ret 40028c84: 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 b4 ld [ %g1 + 0x2b4 ], %g1 ! 40021ab4 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 1c ld [ %g1 + 0x1c ], %l2 ! 40022c1c 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 c2 call 40011e18 <__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 b1 call 40011e18 <__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 9f call 40011e18 <__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 4001b45c : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001b45c: 9d e3 bf 98 save %sp, -104, %sp 4001b460: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b464: 82 10 60 88 or %g1, 0x88, %g1 ! 4001d888 4001b468: 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())) { 4001b46c: 05 10 00 76 sethi %hi(0x4001d800), %g2 4001b470: c4 00 a3 f0 ld [ %g2 + 0x3f0 ], %g2 ! 4001dbf0 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 4001b474: 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())) { 4001b478: 80 a0 a0 03 cmp %g2, 3 4001b47c: 12 80 00 0c bne 4001b4ac 4001b480: c6 20 60 10 st %g3, [ %g1 + 0x10 ] if (_Thread_Dispatch_disable_level > 0) 4001b484: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b488: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 4001da50 <_Thread_Dispatch_disable_level> 4001b48c: 80 a0 60 00 cmp %g1, 0 4001b490: 32 80 00 13 bne,a 4001b4dc 4001b494: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 4001b498: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b49c: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 4001dae8 <_ISR_Nest_level> 4001b4a0: 80 a0 60 00 cmp %g1, 0 4001b4a4: 32 80 00 0e bne,a 4001b4dc 4001b4a8: b0 10 20 00 clr %i0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 4001b4ac: 80 a6 20 00 cmp %i0, 0 4001b4b0: 12 80 00 06 bne 4001b4c8 4001b4b4: 80 a6 60 00 cmp %i1, 0 return malloc( size ); 4001b4b8: 7f ff c0 7d call 4000b6ac 4001b4bc: 90 10 00 19 mov %i1, %o0 4001b4c0: 81 c7 e0 08 ret 4001b4c4: 91 e8 00 08 restore %g0, %o0, %o0 if ( !size ) { 4001b4c8: 12 80 00 07 bne 4001b4e4 4001b4cc: 21 10 00 73 sethi %hi(0x4001cc00), %l0 free( ptr ); 4001b4d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001b4d4: 7f ff bf 14 call 4000b124 <== NOT EXECUTED 4001b4d8: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 4001b4dc: 81 c7 e0 08 ret <== NOT EXECUTED 4001b4e0: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 4001b4e4: d0 04 22 f0 ld [ %l0 + 0x2f0 ], %o0 4001b4e8: 92 10 00 18 mov %i0, %o1 4001b4ec: 40 00 00 60 call 4001b66c <_Protected_heap_Get_block_size> 4001b4f0: 94 07 bf fc add %fp, -4, %o2 4001b4f4: 80 8a 20 ff btst 0xff, %o0 4001b4f8: 12 80 00 08 bne 4001b518 4001b4fc: d0 04 22 f0 ld [ %l0 + 0x2f0 ], %o0 errno = EINVAL; 4001b500: 7f ff d0 70 call 4000f6c0 <__errno> 4001b504: b0 10 20 00 clr %i0 4001b508: 82 10 20 16 mov 0x16, %g1 4001b50c: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4001b510: 81 c7 e0 08 ret 4001b514: 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 ) ) { 4001b518: 92 10 00 18 mov %i0, %o1 4001b51c: 40 00 00 61 call 4001b6a0 <_Protected_heap_Resize_block> 4001b520: 94 10 00 19 mov %i1, %o2 4001b524: 80 8a 20 ff btst 0xff, %o0 4001b528: 12 80 00 1a bne 4001b590 4001b52c: 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 ); 4001b530: 7f ff c0 5f call 4000b6ac 4001b534: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001b538: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b53c: 82 10 60 88 or %g1, 0x88, %g1 ! 4001d888 4001b540: 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 ); 4001b544: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001b548: 84 00 bf ff add %g2, -1, %g2 if ( !new_area ) { 4001b54c: 80 a2 20 00 cmp %o0, 0 4001b550: 02 80 00 0f be 4001b58c 4001b554: c4 20 60 04 st %g2, [ %g1 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4001b558: c2 07 bf fc ld [ %fp + -4 ], %g1 4001b55c: 80 a6 40 01 cmp %i1, %g1 4001b560: 08 80 00 03 bleu 4001b56c 4001b564: 94 10 00 19 mov %i1, %o2 4001b568: 94 10 00 01 mov %g1, %o2 4001b56c: 92 10 00 18 mov %i0, %o1 4001b570: 7f ff d2 8f call 4000ffac 4001b574: 90 10 00 10 mov %l0, %o0 free( ptr ); 4001b578: 90 10 00 18 mov %i0, %o0 4001b57c: 7f ff be ea call 4000b124 4001b580: b0 10 00 10 mov %l0, %i0 return new_area; 4001b584: 81 c7 e0 08 ret 4001b588: 81 e8 00 00 restore 4001b58c: b0 10 20 00 clr %i0 } 4001b590: 81 c7 e0 08 ret 4001b594: 81 e8 00 00 restore 400090e0 : #include int rmdir( const char *pathname ) { 400090e0: 9d e3 bf 78 save %sp, -136, %sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 400090e4: 7f ff fa 56 call 40007a3c 400090e8: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 400090ec: a6 92 20 00 orcc %o0, 0, %l3 400090f0: 32 80 00 17 bne,a 4000914c 400090f4: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 400090f8: c2 4e 00 00 ldsb [ %i0 ], %g1 400090fc: 80 a0 60 5c cmp %g1, 0x5c 40009100: 02 80 00 06 be 40009118 40009104: 80 a0 60 2f cmp %g1, 0x2f 40009108: 02 80 00 04 be 40009118 4000910c: 80 a0 60 00 cmp %g1, 0 40009110: 12 80 00 07 bne 4000912c <== NOT EXECUTED 40009114: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40009118: 03 10 01 99 sethi %hi(0x40066400), %g1 4000911c: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 40066428 40009120: 90 07 bf ec add %fp, -20, %o0 40009124: 10 80 00 05 b 40009138 40009128: 92 02 60 18 add %o1, 0x18, %o1 4000912c: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 <== NOT EXECUTED 40009130: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 40009134: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 40009138: 94 10 20 14 mov 0x14, %o2 4000913c: 40 00 ea 3e call 40043a34 40009140: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40009144: 10 80 00 0b b 40009170 40009148: 94 10 20 14 mov 0x14, %o2 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 4000914c: 92 10 00 13 mov %l3, %o1 40009150: 94 10 20 02 mov 2, %o2 40009154: 96 07 bf ec add %fp, -20, %o3 40009158: 7f ff fa 87 call 40007b74 4000915c: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 40009160: 80 a2 20 00 cmp %o0, 0 40009164: 12 80 00 89 bne 40009388 40009168: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000916c: 94 10 20 14 mov 0x14, %o2 40009170: a0 07 bf d8 add %fp, -40, %l0 40009174: a4 07 bf ec add %fp, -20, %l2 40009178: 90 10 00 10 mov %l0, %o0 4000917c: 40 00 ea 2e call 40043a34 40009180: 92 10 00 12 mov %l2, %o1 name = pathname + parentpathlen; 40009184: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40009188: 40 00 f8 97 call 400473e4 4000918c: 90 10 00 18 mov %i0, %o0 40009190: 92 10 00 08 mov %o0, %o1 40009194: 7f ff fa 18 call 400079f4 40009198: 90 10 00 18 mov %i0, %o0 4000919c: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 400091a0: 40 00 f8 91 call 400473e4 400091a4: 90 10 00 18 mov %i0, %o0 400091a8: 94 10 20 00 clr %o2 400091ac: 92 10 00 08 mov %o0, %o1 400091b0: 96 10 00 10 mov %l0, %o3 400091b4: 90 10 00 18 mov %i0, %o0 400091b8: 7f ff fa 33 call 40007a84 400091bc: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 400091c0: 80 a2 20 00 cmp %o0, 0 400091c4: 02 80 00 11 be 40009208 400091c8: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 400091cc: 80 8c 60 ff btst 0xff, %l1 400091d0: 02 80 00 0c be 40009200 400091d4: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 400091d8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400091dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400091e0: 02 80 00 6b be 4000938c <== NOT EXECUTED 400091e4: 01 00 00 00 nop <== NOT EXECUTED 400091e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400091ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400091f0: 02 80 00 04 be 40009200 <== NOT EXECUTED 400091f4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400091f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400091fc: 01 00 00 00 nop <== NOT EXECUTED 40009200: 81 c7 e0 08 ret 40009204: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40009208: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000920c: 80 a0 60 00 cmp %g1, 0 40009210: 12 80 00 04 bne 40009220 40009214: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40009218: 10 80 00 2b b 400092c4 <== NOT EXECUTED 4000921c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 40009220: 9f c0 40 00 call %g1 40009224: 90 10 00 10 mov %l0, %o0 40009228: 80 a2 20 01 cmp %o0, 1 4000922c: 02 80 00 1d be 400092a0 40009230: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &loc ); 40009234: c2 07 bf e4 ld [ %fp + -28 ], %g1 40009238: 80 a0 60 00 cmp %g1, 0 4000923c: 02 80 00 09 be 40009260 40009240: 80 8c 60 ff btst 0xff, %l1 40009244: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009248: 80 a0 60 00 cmp %g1, 0 4000924c: 02 80 00 05 be 40009260 40009250: 80 8c 60 ff btst 0xff, %l1 40009254: 9f c0 40 00 call %g1 40009258: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000925c: 80 8c 60 ff btst 0xff, %l1 40009260: 02 80 00 0c be 40009290 40009264: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 40009268: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000926c: 80 a0 60 00 cmp %g1, 0 40009270: 02 80 00 08 be 40009290 40009274: 01 00 00 00 nop 40009278: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000927c: 80 a0 60 00 cmp %g1, 0 40009280: 02 80 00 04 be 40009290 40009284: 01 00 00 00 nop 40009288: 9f c0 40 00 call %g1 4000928c: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40009290: 40 00 dd 16 call 400406e8 <__errno> 40009294: b0 10 3f ff mov -1, %i0 40009298: 10 80 00 1f b 40009314 4000929c: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 400092a0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400092a4: 80 a0 60 00 cmp %g1, 0 400092a8: 12 80 00 1e bne 40009320 400092ac: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 400092b0: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 400092b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092b8: 02 80 00 09 be 400092dc <== NOT EXECUTED 400092bc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400092c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092c8: 02 80 00 05 be 400092dc <== NOT EXECUTED 400092cc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400092d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 400092d8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400092dc: 02 80 00 0b be 40009308 <== NOT EXECUTED 400092e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 400092e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092e8: 02 80 00 08 be 40009308 <== NOT EXECUTED 400092ec: 01 00 00 00 nop <== NOT EXECUTED 400092f0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400092f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400092f8: 02 80 00 04 be 40009308 <== NOT EXECUTED 400092fc: 01 00 00 00 nop <== NOT EXECUTED 40009300: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009304: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009308: 40 00 dc f8 call 400406e8 <__errno> <== NOT EXECUTED 4000930c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009310: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009314: c2 22 00 00 st %g1, [ %o0 ] 40009318: 81 c7 e0 08 ret 4000931c: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 40009320: 9f c0 40 00 call %g1 40009324: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 40009328: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000932c: 80 a0 60 00 cmp %g1, 0 40009330: 02 80 00 08 be 40009350 40009334: b0 10 00 08 mov %o0, %i0 40009338: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000933c: 80 a0 60 00 cmp %g1, 0 40009340: 02 80 00 05 be 40009354 40009344: 80 8c 60 ff btst 0xff, %l1 40009348: 9f c0 40 00 call %g1 4000934c: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40009350: 80 8c 60 ff btst 0xff, %l1 40009354: 02 bf ff ab be 40009200 40009358: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000935c: 80 a0 60 00 cmp %g1, 0 40009360: 02 80 00 0b be 4000938c 40009364: 01 00 00 00 nop 40009368: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000936c: 80 a0 60 00 cmp %g1, 0 40009370: 02 80 00 07 be 4000938c 40009374: 01 00 00 00 nop 40009378: 9f c0 40 00 call %g1 4000937c: 90 07 bf ec add %fp, -20, %o0 40009380: 81 c7 e0 08 ret 40009384: 81 e8 00 00 restore 40009388: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 4000938c: 81 c7 e0 08 ret <== NOT EXECUTED 40009390: 81 e8 00 00 restore <== NOT EXECUTED 40015748 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 40015748: 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; } 4001574c: 81 c3 e0 08 retl <== NOT EXECUTED 40015750: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 400286f0 <== NOT EXECUTED 40011da0 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40011da0: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40011da4: 90 10 00 18 mov %i0, %o0 40011da8: 40 00 00 0b call 40011dd4 40011dac: 92 10 00 19 mov %i1, %o1 if (nap) 40011db0: 80 a2 20 00 cmp %o0, 0 40011db4: 02 80 00 05 be 40011dc8 40011db8: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 40011dbc: f0 02 00 00 ld [ %o0 ], %i0 40011dc0: 81 c7 e0 08 ret 40011dc4: 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); 40011dc8: 40 00 0e 60 call 40015748 <== NOT EXECUTED 40011dcc: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40011dd0: 01 00 00 00 nop 4000ed50 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000ed50: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000ed54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ed58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ed5c: 40 00 02 39 call 4000f640 <== NOT EXECUTED 4000ed60: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000ed64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ed68: 32 80 00 02 bne,a 4000ed70 <== NOT EXECUTED 4000ed6c: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000ed70: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed74: 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 02 call 40010a64 <== 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 28 or %o0, 0x328, %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 70 or %o1, 0x170, %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 c4 or %l0, 0xc4, %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003bcc: b8 17 22 e8 or %i4, 0x2e8, %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 1c or %l6, 0x21c, %l6 /* * Print the information */ (*print)( context, 40003bd4: b6 16 e3 00 or %i3, 0x300, %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 24 or %i2, 0x224, %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 14 call 4001e0f4 <.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 d4 or %g1, 0xd4, %g1 ! 4002bcd4 <_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 68 fe call 4001e0f4 <.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 18 or %o1, 0x318, %o1 40003d1c: 81 c7 e0 08 ret 40003d20: 81 e8 00 00 restore 4000ed1c : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4000ed1c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000ed20: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 4000ed24: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ed28: 40 00 00 0a call 4000ed50 <== NOT EXECUTED 4000ed2c: 90 12 23 b4 or %o0, 0x3b4, %o0 <== NOT EXECUTED 4000ed30: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000ed34: 02 80 00 05 be 4000ed48 <== NOT EXECUTED 4000ed38: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000ed3c: 40 00 02 61 call 4000f6c0 <__errno> <== NOT EXECUTED 4000ed40: 01 00 00 00 nop <== NOT EXECUTED 4000ed44: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000ed48: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed4c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40008438 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 40008438: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 4000843c: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 40008440: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008444: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008448: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 4000844c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 40008450: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008454: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008458: 7f ff ff 7d call 4000824c <== NOT EXECUTED 4000845c: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40008460: 81 c7 e0 08 ret <== NOT EXECUTED 40008464: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003060 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 40003060: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 40003064: 80 a6 20 00 cmp %i0, 0 40003068: 12 80 00 06 bne 40003080 4000306c: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); 40003070: 40 00 31 94 call 4000f6c0 <__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 8e call 4000f6c0 <__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 73 sethi %hi(0x4001cc00), %g1 400030bc: 03 10 00 73 sethi %hi(0x4001cc00), %g1 400030c0: d2 00 63 f8 ld [ %g1 + 0x3f8 ], %o1 ! 4001cff8 400030c4: 90 10 00 1b mov %i3, %o0 400030c8: 92 02 60 18 add %o1, 0x18, %o1 400030cc: 40 00 33 b8 call 4000ffac 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 63 f8 ld [ %g1 + 0x3f8 ], %o1 400030e0: 90 10 00 1b mov %i3, %o0 400030e4: 92 02 60 04 add %o1, 4, %o1 400030e8: 40 00 33 b1 call 4000ffac 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 cf call 4000f6c0 <__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 c8 call 4000f6c0 <__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 a3 call 4000f6c0 <__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 73 sethi %hi(0x4001cc00), %l1 40002dd8: c2 04 63 f8 ld [ %l1 + 0x3f8 ], %g1 ! 4001cff8 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 6e sethi %hi(0x4001b800), %g1 40002dec: c2 00 63 fc ld [ %g1 + 0x3fc ], %g1 ! 4001bbfc 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 62 ec ld [ %g1 + 0x2ec ], %g1 ! 4001ceec 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 63 f8 ld [ %l1 + 0x3f8 ], %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 58 call 4000ffac 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 00 mov %l2, %o0 rtems_filesystem_root = loc; 40002e74: d0 04 63 f8 ld [ %l1 + 0x3f8 ], %o0 40002e78: 92 10 00 10 mov %l0, %o1 40002e7c: 94 10 20 14 mov 0x14, %o2 40002e80: 40 00 34 4b call 4000ffac 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 00 mov %l2, %o0 rtems_filesystem_current = loc; 40002ea0: d0 04 63 f8 ld [ %l1 + 0x3f8 ], %o0 40002ea4: 92 10 00 10 mov %l0, %o1 40002ea8: 94 10 20 14 mov 0x14, %o2 40002eac: 40 00 34 40 call 4000ffac 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 08 or %o0, 8, %o0 ! 4001c008 <__FUNCTION__.5794+0x240> if ( status != 0 ) 40002ec4: 80 a2 20 00 cmp %o0, 0 40002ec8: 02 80 00 04 be 40002ed8 40002ecc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 40002ed0: 10 bf ff d9 b 40002e34 <== NOT EXECUTED 40002ed4: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 40002ed8: 81 c7 e0 08 ret 40002edc: 81 e8 00 00 restore 4000b4fc : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4000b4fc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000b500: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 4000b504: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 4000b508: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4000b50c: 81 c3 e0 08 retl <== NOT EXECUTED 4000b510: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40002ee0 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 40002ee0: 82 10 00 08 mov %o0, %g1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 40002ee4: 10 80 00 03 b 40002ef0 40002ee8: 90 10 20 00 clr %o0 { pathname++; pathnamelen--; stripped++; 40002eec: 90 02 20 01 inc %o0 <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 40002ef0: 80 a2 40 08 cmp %o1, %o0 40002ef4: 02 80 00 0b be 40002f20 40002ef8: c4 08 40 08 ldub [ %g1 + %o0 ], %g2 40002efc: 85 28 a0 18 sll %g2, 0x18, %g2 40002f00: 85 38 a0 18 sra %g2, 0x18, %g2 40002f04: 80 a0 a0 00 cmp %g2, 0 40002f08: 02 80 00 06 be 40002f20 40002f0c: 80 a0 a0 5c cmp %g2, 0x5c 40002f10: 02 bf ff f7 be 40002eec 40002f14: 80 a0 a0 2f cmp %g2, 0x2f 40002f18: 22 bf ff f6 be,a 40002ef0 40002f1c: 90 02 20 01 inc %o0 pathname++; pathnamelen--; stripped++; } return stripped; } 40002f20: 81 c3 e0 08 retl 40002f24: 01 00 00 00 nop 40002c3c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40002c3c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 40002c40: 40 00 36 57 call 4001059c <== 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 8b call 4000f6c0 <__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 28 call 4001059c <== 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 80 ld [ %g1 + 0x80 ], %o0 ! 4001d880 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 7c ld [ %l0 + 0x7c ], %g1 ! 4001d87c 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 78 ld [ %g2 + 0x78 ], %g2 ! 4001d878 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 7c ld [ %l0 + 0x7c ], %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 be call 400100a8 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 7c st %l1, [ %l0 + 0x7c ] 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 80 ld [ %g1 + 0x80 ], %o0 ! 4001d880 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 22 e4 ld [ %l0 + 0x2e4 ], %o0 ! 4001cee4 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 78 st %o0, [ %g1 + 0x78 ] 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 22 e4 ld [ %l0 + 0x2e4 ], %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 7c st %o0, [ %g2 + 0x7c ] 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 80 or %o4, 0x80, %o4 ! 4001d880 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 62 e0 ld [ %g1 + 0x2e0 ], %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 40028a38 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 40028a38: 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); 40028a3c: 90 10 20 00 clr %o0 40028a40: 92 10 20 00 clr %o1 40028a44: 40 00 06 52 call 4002a38c 40028a48: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 40028a4c: b0 92 20 00 orcc %o0, 0, %i0 40028a50: 12 80 00 19 bne 40028ab4 40028a54: 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) { 40028a58: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 ! 40066428 40028a5c: 03 10 01 a8 sethi %hi(0x4006a000), %g1 40028a60: 82 10 63 48 or %g1, 0x348, %g1 ! 4006a348 40028a64: 80 a0 80 01 cmp %g2, %g1 40028a68: 12 80 00 15 bne 40028abc 40028a6c: a4 14 20 28 or %l0, 0x28, %l2 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 40028a70: 7f ff 7e 06 call 40008288 40028a74: 90 10 20 48 mov 0x48, %o0 if (!tmp) 40028a78: a2 92 20 00 orcc %o0, 0, %l1 40028a7c: 12 80 00 04 bne 40028a8c 40028a80: 92 10 00 12 mov %l2, %o1 40028a84: 81 c7 e0 08 ret <== NOT EXECUTED 40028a88: 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); 40028a8c: 90 10 20 00 clr %o0 40028a90: 15 10 00 a2 sethi %hi(0x40028800), %o2 40028a94: 40 00 07 3c call 4002a784 40028a98: 94 12 a1 04 or %o2, 0x104, %o2 ! 40028904 if (sc != RTEMS_SUCCESSFUL) { 40028a9c: 82 92 20 00 orcc %o0, 0, %g1 40028aa0: 22 80 00 07 be,a 40028abc 40028aa4: e2 24 20 28 st %l1, [ %l0 + 0x28 ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 40028aa8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40028aac: 7f ff 7c 5b call 40007c18 <== NOT EXECUTED 40028ab0: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return sc; 40028ab4: 81 c7 e0 08 ret <== NOT EXECUTED 40028ab8: 81 e8 00 00 restore <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 40028abc: 23 10 01 99 sethi %hi(0x40066400), %l1 40028ac0: e0 04 60 28 ld [ %l1 + 0x28 ], %l0 ! 40066428 40028ac4: 94 10 20 48 mov 0x48, %o2 40028ac8: 90 10 00 10 mov %l0, %o0 40028acc: 13 10 01 a8 sethi %hi(0x4006a000), %o1 40028ad0: 40 00 6b d9 call 40043a34 40028ad4: 92 12 63 48 or %o1, 0x348, %o1 ! 4006a348 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40028ad8: 03 10 01 a8 sethi %hi(0x4006a000), %g1 40028adc: d2 00 63 30 ld [ %g1 + 0x330 ], %o1 ! 4006a330 } 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 07 bf fc ld [ %fp + -4 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40028ae4: 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*/ 40028ae8: c2 24 00 00 st %g1, [ %l0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40028aec: 90 04 20 18 add %l0, 0x18, %o0 40028af0: 40 00 6b d1 call 40043a34 40028af4: 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); 40028af8: a0 07 bf e8 add %fp, -24, %l0 40028afc: 98 10 20 00 clr %o4 40028b00: 96 10 00 10 mov %l0, %o3 40028b04: 25 10 01 71 sethi %hi(0x4005c400), %l2 40028b08: 92 10 20 01 mov 1, %o1 40028b0c: 94 10 20 00 clr %o2 40028b10: 7f ff 7c 19 call 40007b74 40028b14: 90 14 a1 c8 or %l2, 0x1c8, %o0 rtems_filesystem_root = loc; 40028b18: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 40028b1c: 92 10 00 10 mov %l0, %o1 40028b20: 94 10 20 14 mov 0x14, %o2 40028b24: 40 00 6b c4 call 40043a34 40028b28: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40028b2c: 92 10 20 01 mov 1, %o1 40028b30: 94 10 20 00 clr %o2 40028b34: 90 14 a1 c8 or %l2, 0x1c8, %o0 40028b38: 96 10 00 10 mov %l0, %o3 40028b3c: 7f ff 7c 0e call 40007b74 40028b40: 98 10 20 00 clr %o4 rtems_filesystem_current = loc; 40028b44: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 40028b48: 92 10 00 10 mov %l0, %o1 40028b4c: 90 02 20 04 add %o0, 4, %o0 40028b50: 40 00 6b b9 call 40043a34 40028b54: 94 10 20 14 mov 0x14, %o2 return RTEMS_SUCCESSFUL; } 40028b58: 81 c7 e0 08 ret 40028b5c: 81 e8 00 00 restore 4002897c : * 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) { 4002897c: 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); 40028980: 90 10 20 00 clr %o0 <== NOT EXECUTED 40028984: 92 10 20 00 clr %o1 <== NOT EXECUTED 40028988: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 4002898c: 40 00 06 80 call 4002a38c <== NOT EXECUTED 40028990: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40028994: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028998: 12 80 00 26 bne 40028a30 <== NOT EXECUTED 4002899c: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 400289a0: 13 10 01 99 sethi %hi(0x40066400), %o1 <== NOT EXECUTED 400289a4: e0 02 60 28 ld [ %o1 + 0x28 ], %l0 ! 40066428 <== NOT EXECUTED 400289a8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400289ac: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 400289b0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400289b4: 12 80 00 09 bne 400289d8 <== NOT EXECUTED 400289b8: 92 12 60 28 or %o1, 0x28, %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); 400289bc: 40 00 07 9e call 4002a834 <== NOT EXECUTED 400289c0: 01 00 00 00 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400289c4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400289c8: 12 80 00 1a bne 40028a30 <== NOT EXECUTED 400289cc: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 400289d0: 7f ff ff cd call 40028904 <== NOT EXECUTED 400289d4: 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, 400289d8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400289dc: 21 10 01 99 sethi %hi(0x40066400), %l0 <== NOT EXECUTED 400289e0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 400289e4: a2 14 20 28 or %l0, 0x28, %l1 <== NOT EXECUTED 400289e8: 40 00 07 b9 call 4002a8cc <== NOT EXECUTED 400289ec: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 400289f0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400289f4: 12 80 00 0c bne 40028a24 <== NOT EXECUTED 400289f8: 07 10 01 a8 sethi %hi(0x4006a000), %g3 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 400289fc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40028a00: 15 10 00 a2 sethi %hi(0x40028800), %o2 <== NOT EXECUTED 40028a04: 40 00 07 60 call 4002a784 <== NOT EXECUTED 40028a08: 94 12 a1 04 or %o2, 0x104, %o2 ! 40028904 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40028a0c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40028a10: 12 80 00 05 bne 40028a24 <== NOT EXECUTED 40028a14: 07 10 01 a8 sethi %hi(0x4006a000), %g3 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40028a18: 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; 40028a1c: 10 80 00 05 b 40028a30 <== NOT EXECUTED 40028a20: c4 24 20 28 st %g2, [ %l0 + 0x28 ] <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 40028a24: 05 10 01 99 sethi %hi(0x40066400), %g2 <== NOT EXECUTED 40028a28: 86 10 e3 48 or %g3, 0x348, %g3 <== NOT EXECUTED 40028a2c: c6 20 a0 28 st %g3, [ %g2 + 0x28 ] <== NOT EXECUTED return sc; } 40028a30: 81 c7 e0 08 ret <== NOT EXECUTED 40028a34: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED 40008390 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 40008390: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 40008394: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED 40008398: d0 00 61 40 ld [ %g1 + 0x140 ], %o0 ! 40066140 <== NOT EXECUTED 4000839c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400083a0: 40 00 17 77 call 4000e17c <_Protected_heap_Get_block_size> <== NOT EXECUTED 400083a4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 400083a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 400083ac: 02 80 00 08 be 400083cc <== NOT EXECUTED 400083b0: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 400083b4: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 400083b8: 82 10 63 00 or %g1, 0x300, %g1 <== NOT EXECUTED 400083bc: c4 18 60 28 ldd [ %g1 + 0x28 ], %g2 <== NOT EXECUTED 400083c0: 86 80 c0 04 addcc %g3, %g4, %g3 <== NOT EXECUTED 400083c4: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 400083c8: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 400083cc: 81 c7 e0 08 ret <== NOT EXECUTED 400083d0: 81 e8 00 00 restore <== NOT EXECUTED 400083d4 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 400083d4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 400083d8: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 400083dc: 02 80 00 13 be 40008428 <== NOT EXECUTED 400083e0: 03 10 01 98 sethi %hi(0x40066000), %g1 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 400083e4: d0 00 61 40 ld [ %g1 + 0x140 ], %o0 ! 40066140 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 400083e8: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 400083ec: 40 00 17 64 call 4000e17c <_Protected_heap_Get_block_size> <== NOT EXECUTED 400083f0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 400083f4: 03 10 01 a8 sethi %hi(0x4006a000), %g1 <== NOT EXECUTED 400083f8: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED 400083fc: 82 10 63 00 or %g1, 0x300, %g1 <== NOT EXECUTED 40008400: d8 18 60 20 ldd [ %g1 + 0x20 ], %o4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008404: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40008408: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 4000840c: 9a 83 40 04 addcc %o5, %g4, %o5 <== NOT EXECUTED 40008410: 98 43 20 00 addx %o4, 0, %o4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 40008414: 84 23 40 02 sub %o5, %g2, %g2 <== NOT EXECUTED if (current_depth > s->max_depth) 40008418: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 4000841c: 08 80 00 03 bleu 40008428 <== NOT EXECUTED 40008420: d8 38 60 20 std %o4, [ %g1 + 0x20 ] <== NOT EXECUTED s->max_depth = current_depth; 40008424: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 40008428: 81 c7 e0 08 ret <== NOT EXECUTED 4000842c: 81 e8 00 00 restore <== NOT EXECUTED 40008430 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40008430: 11 10 01 a8 sethi %hi(0x4006a000), %o0 <== NOT EXECUTED 40008434: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008438: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 4000843c: 94 10 20 30 mov 0x30, %o2 <== NOT EXECUTED 40008440: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40008444: 40 00 ee 0f call 40043c80 <== NOT EXECUTED 40008448: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000844c: 01 00 00 00 nop 40010ca0 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40010ca0: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40010ca4: a0 96 20 00 orcc %i0, 0, %l0 40010ca8: 02 80 00 20 be 40010d28 40010cac: 03 10 00 90 sethi %hi(0x40024000), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40010cb0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 40024020 <_System_state_Current> 40010cb4: 80 a0 60 03 cmp %g1, 3 40010cb8: 12 80 00 07 bne 40010cd4 40010cbc: c0 24 00 00 clr [ %l0 ] 40010cc0: 7f ff cf 63 call 40004a4c 40010cc4: 01 00 00 00 nop 40010cc8: 80 8a 20 ff btst 0xff, %o0 40010ccc: 02 80 00 18 be 40010d2c 40010cd0: b0 10 20 16 mov 0x16, %i0 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 40010cd4: 7f ff cf 77 call 40004ab0 40010cd8: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 40010cdc: 03 10 00 8c sethi %hi(0x40023000), %g1 40010ce0: d0 00 62 50 ld [ %g1 + 0x250 ], %o0 ! 40023250 40010ce4: 94 10 00 19 mov %i1, %o2 40010ce8: 92 10 00 1a mov %i2, %o1 40010cec: 7f ff e4 c5 call 4000a000 <_Protected_heap_Allocate_aligned_with_boundary> 40010cf0: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40010cf4: b2 92 20 00 orcc %o0, 0, %i1 40010cf8: 02 80 00 0d be 40010d2c 40010cfc: 03 10 00 8e sethi %hi(0x40023800), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 40010d00: c2 00 60 d8 ld [ %g1 + 0xd8 ], %g1 ! 400238d8 40010d04: 80 a0 60 00 cmp %g1, 0 40010d08: 22 80 00 06 be,a 40010d20 40010d0c: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 40010d10: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40010d14: 9f c0 40 00 call %g1 <== NOT EXECUTED 40010d18: 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; 40010d1c: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 40010d20: 81 c7 e0 08 ret 40010d24: 91 e8 20 00 restore %g0, 0, %o0 40010d28: b0 10 20 16 mov 0x16, %i0 } 40010d2c: 81 c7 e0 08 ret 40010d30: 81 e8 00 00 restore 40008404 : void rtems_panic( const char *printf_format, ... ) { 40008404: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40008408: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 4000840c: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40008410: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40008414: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008418: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 4000841c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008420: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40008424: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008428: 7f ff ff 89 call 4000824c <== NOT EXECUTED 4000842c: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 40008430: 81 c7 e0 08 ret <== NOT EXECUTED 40008434: 81 e8 00 00 restore <== NOT EXECUTED 4000d300 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4000d300: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 4000d304: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000d308: c2 08 61 54 ldub [ %g1 + 0x154 ], %g1 ! 4001d554 4000d30c: 80 a0 60 00 cmp %g1, 0 4000d310: 02 80 00 15 be 4000d364 4000d314: 19 10 00 75 sethi %hi(0x4001d400), %o4 return; if (rtems_pipe_semaphore) 4000d318: c2 03 22 c0 ld [ %o4 + 0x2c0 ], %g1 ! 4001d6c0 <== NOT EXECUTED 4000d31c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d320: 12 80 00 11 bne 4000d364 <== NOT EXECUTED 4000d324: 98 13 22 c0 or %o4, 0x2c0, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4000d328: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 4000d32c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000d330: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 4000d334: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 4000d338: 7f ff e3 cc call 40006268 <== NOT EXECUTED 4000d33c: 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) 4000d340: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d344: 02 80 00 04 be 4000d354 <== NOT EXECUTED 4000d348: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4000d34c: 7f ff e6 12 call 40006b94 <== NOT EXECUTED 4000d350: 01 00 00 00 nop <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4000d354: 7f ff e2 a5 call 40005de8 <== NOT EXECUTED 4000d358: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 4000d35c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 4000d360: d0 30 62 c6 sth %o0, [ %g1 + 0x2c6 ] ! 4001d6c6 <== NOT EXECUTED 4000d364: 81 c7 e0 08 ret 4000d368: 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 61 7c ld [ %g1 + 0x17c ], %g1 ! 4006a57c <_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 62 a0 ld [ %g1 + 0x2a0 ], %g1 ! 400676a0 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 dd call 40043970 40006200: 92 12 62 d0 or %o1, 0x2d0, %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 61 7c ld [ %g1 + 0x17c ], %o0 ! 4006a57c <_Thread_Executing> <== NOT EXECUTED 40006228: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED 4000622c: 7f ff ff b7 call 40006108 <== NOT EXECUTED 40006230: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 40006234: 81 c7 e0 08 ret 40006238: 81 e8 00 00 restore 400060ec : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 400060ec: 13 10 00 23 sethi %hi(0x40008c00), %o1 <== NOT EXECUTED 400060f0: 90 10 20 00 clr %o0 <== NOT EXECUTED 400060f4: 92 12 62 84 or %o1, 0x284, %o1 <== NOT EXECUTED 400060f8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400060fc: 7f ff ff e6 call 40006094 <== NOT EXECUTED 40006100: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006104: 01 00 00 00 nop 40006094 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40006094: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED print_context = context; 40006098: 23 10 01 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 62 a4 st %i0, [ %l1 + 0x2a4 ] <== NOT EXECUTED print_handler = print; 400060a4: f2 24 22 a8 st %i1, [ %l0 + 0x2a8 ] <== 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 40 or %o1, 0x340, %o1 ! 4005c340 <== 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 58 or %o1, 0x358, %o1 ! 4005c358 <== 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 d1 call 4000d810 <== 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 62 a4 clr [ %l1 + 0x2a4 ] <== NOT EXECUTED print_handler = NULL; 400060e0: c0 24 22 a8 clr [ %l0 + 0x2a8 ] <== 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 c1 call 40043970 40006270: 92 12 62 d0 or %o1, 0x2d0, %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 a6 call 40010a2c <__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 18 call 4001380c 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 61 f0 ldd [ %g1 + 0x1f0 ], %o2 ! 40020df0 <_CPU_Trap_slot_template+0x14> 4000d3e4: 90 10 00 10 mov %l0, %o0 4000d3e8: 40 00 41 72 call 4001d9b0 <__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 8c call 40010a2c <__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 7d call 40010a2c <__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 dd call 400137c0 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 94 call 4001ced0 <__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 66 call 40010a2c <__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 4001e658 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e658: 9d e3 bf 98 save %sp, -104, %sp 4001e65c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e660: 80 a6 60 00 cmp %i1, 0 4001e664: 02 80 00 20 be 4001e6e4 4001e668: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e66c: 40 00 88 1f call 400406e8 <__errno> 4001e670: 01 00 00 00 nop 4001e674: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e678: 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 ); 4001e67c: 94 10 00 1b mov %i3, %o2 4001e680: 90 10 00 10 mov %l0, %o0 4001e684: 40 00 a7 cf call 400485c0 4001e688: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4001e68c: 80 a6 a0 00 cmp %i2, 0 4001e690: 02 80 00 04 be 4001e6a0 4001e694: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e698: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e69c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e6a0: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e6a4: 80 a0 40 10 cmp %g1, %l0 4001e6a8: 02 80 00 0f be 4001e6e4 4001e6ac: 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)) 4001e6b0: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4001e6b4: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4001e6b8: 80 a4 40 01 cmp %l1, %g1 4001e6bc: 32 80 00 09 bne,a 4001e6e0 4001e6c0: e2 26 40 00 st %l1, [ %i1 ] 4001e6c4: 40 00 88 09 call 400406e8 <__errno> 4001e6c8: b0 10 20 0a mov 0xa, %i0 4001e6cc: c2 02 00 00 ld [ %o0 ], %g1 4001e6d0: 80 a0 60 22 cmp %g1, 0x22 4001e6d4: 02 80 00 04 be 4001e6e4 4001e6d8: 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; 4001e6dc: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e6e0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e6e4: 81 c7 e0 08 ret 4001e6e8: 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 01 call 40010a2c <__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 18 fc call 40013a30 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 e8 call 40010a2c <__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 32 call 40010a2c <__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 36 call 40013a58 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 11 call 40010a2c <__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 4001e6ec : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e6ec: 9d e3 bf 98 save %sp, -104, %sp 4001e6f0: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e6f4: 80 a6 60 00 cmp %i1, 0 4001e6f8: 02 80 00 1e be 4001e770 4001e6fc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e700: 40 00 87 fa call 400406e8 <__errno> 4001e704: 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 ); 4001e708: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4001e70c: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e710: 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 ); 4001e714: 90 10 00 10 mov %l0, %o0 4001e718: 40 00 a8 e0 call 40048a98 4001e71c: 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 ) 4001e720: 80 a6 a0 00 cmp %i2, 0 4001e724: 02 80 00 04 be 4001e734 4001e728: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e72c: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e730: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e734: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e738: 80 a0 40 10 cmp %g1, %l0 4001e73c: 02 80 00 0d be 4001e770 4001e740: 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)) 4001e744: 80 a4 7f ff cmp %l1, -1 4001e748: 32 80 00 09 bne,a 4001e76c 4001e74c: e2 26 40 00 st %l1, [ %i1 ] 4001e750: 40 00 87 e6 call 400406e8 <__errno> <== NOT EXECUTED 4001e754: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 4001e758: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001e75c: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 4001e760: 02 80 00 04 be 4001e770 <== NOT EXECUTED 4001e764: 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; 4001e768: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e76c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e770: 81 c7 e0 08 ret 4001e774: 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 9d call 40010a2c <__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 ce call 40013f08 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 89 call 40010a2c <__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 4001e7dc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4001e7dc: 9d e3 bf 98 save %sp, -104, %sp 4001e7e0: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4001e7e4: 80 a6 60 00 cmp %i1, 0 4001e7e8: 02 80 00 1e be 4001e860 4001e7ec: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4001e7f0: 40 00 87 be call 400406e8 <__errno> 4001e7f4: 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 ); 4001e7f8: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4001e7fc: c0 22 00 00 clr [ %o0 ] *n = 0; 4001e800: 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 ); 4001e804: 90 10 00 10 mov %l0, %o0 4001e808: 40 00 a8 a4 call 40048a98 4001e80c: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4001e810: 80 a6 a0 00 cmp %i2, 0 4001e814: 02 80 00 04 be 4001e824 4001e818: a2 10 00 08 mov %o0, %l1 *endptr = end; 4001e81c: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e820: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4001e824: c2 07 bf fc ld [ %fp + -4 ], %g1 4001e828: 80 a0 40 10 cmp %g1, %l0 4001e82c: 02 80 00 0d be 4001e860 4001e830: 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)) 4001e834: 80 a4 7f ff cmp %l1, -1 4001e838: 32 80 00 09 bne,a 4001e85c 4001e83c: e2 26 40 00 st %l1, [ %i1 ] 4001e840: 40 00 87 aa call 400406e8 <__errno> 4001e844: b0 10 20 0a mov 0xa, %i0 4001e848: c2 02 00 00 ld [ %o0 ], %g1 4001e84c: 80 a0 60 22 cmp %g1, 0x22 4001e850: 02 80 00 04 be 4001e860 4001e854: 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; 4001e858: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4001e85c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4001e860: 81 c7 e0 08 ret 4001e864: 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 7a call 40010a2c <__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 b4 call 40013f30 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 61 call 40010a2c <__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 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 40003d38: d0 20 63 e8 st %o0, [ %g1 + 0x3e8 ] ! 4001cfe8 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40003d3c: 03 10 00 73 sethi %hi(0x4001cc00), %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 63 ec st %o1, [ %g1 + 0x3ec ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40003d48: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40003d4c: 81 c3 e0 08 retl <== NOT EXECUTED 40003d50: d4 20 63 f0 st %o2, [ %g1 + 0x3f0 ] ! 4001cff0 <== 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 c4 ld [ %g1 + 0xc4 ], %o0 ! 4001d8c4 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 b4 or %g1, 0x1b4, %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 c8 st %g1, [ %g2 + 0xc8 ] 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 cc st %g1, [ %g2 + 0xcc ] 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 c4 ld [ %g1 + 0xc4 ], %o0 ! 4001d8c4 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 68 ld [ %g1 + 0x268 ], %g1 ! 4001d668 <== 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 b4 or %l2, 0x1b4, %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 91 call 40018fb4 <.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 88 call 40018fb4 <.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 c4 ld [ %o4 + 0xc4 ], %g1 ! 4001d8c4 40003cf4: 80 a0 60 00 cmp %g1, 0 40003cf8: 12 80 00 0d bne 40003d2c 40003cfc: 98 13 20 c4 or %o4, 0xc4, %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 b4 or %g1, 0x1b4, %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 c9 call 4000ffac 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 c5 call 4000ffac 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 7c call 40018c1c <.umul> <== NOT EXECUTED 40005230: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40005234: 40 00 4e b4 call 40018d04 <.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 b4 or %g1, 0x1b4, %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 b4 or %g3, 0x1b4, %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 c4 ld [ %g1 + 0xc4 ], %o0 ! 4001d8c4 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 cc ld [ %g1 + 0xcc ], %l2 ! 4001d8cc 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 73 sethi %hi(0x4001cc00), %g1 400055bc: c2 00 63 ec ld [ %g1 + 0x3ec ], %g1 ! 4001cfec 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 c4 ld [ %g1 + 0xc4 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 400055f4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 400055f8: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 4001cff0 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 73 sethi %hi(0x4001cc00), %g1 40005628: 40 00 18 21 call 4000b6ac 4000562c: d0 00 63 e8 ld [ %g1 + 0x3e8 ], %o0 ! 4001cfe8 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 cc ld [ %g1 + 0xcc ], %g1 ! 4001d8cc 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 c8 ld [ %g1 + 0xc8 ], %g2 ! 4001d8c8 */ 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 cc st %l1, [ %g3 + 0xcc ] rtems_termios_ttyTail = tty; 400056ac: e2 20 60 c8 st %l1, [ %g1 + 0xc8 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400056b0: 27 10 00 73 sethi %hi(0x4001cc00), %l3 400056b4: d0 4c e3 f4 ldsb [ %l3 + 0x3f4 ], %o0 ! 4001cff4 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 e3 f4 ldsb [ %l3 + 0x3f4 ], %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 e3 f4 ldsb [ %l3 + 0x3f4 ], %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 19 call 4000ffac 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 e3 f4 ldsb [ %l3 + 0x3f4 ], %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 e3 f4 ldsb [ %l3 + 0x3f4 ], %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 73 sethi %hi(0x4001cc00), %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 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 400057e0: d0 48 63 f4 ldsb [ %g1 + 0x3f4 ], %o0 ! 4001cff4 <== 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 73 sethi %hi(0x4001cc00), %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 63 f4 ldub [ %g1 + 0x3f4 ], %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 63 f4 stb %g3, [ %g1 + 0x3f4 ] c = 'a'; 400058e4: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 400058e8: c4 28 63 f4 stb %g2, [ %g1 + 0x3f4 ] <== 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 c4 ld [ %g1 + 0xc4 ], %o0 ! 4001d8c4 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 21 call 40018fb4 <.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 b4 or %g2, 0x1b4, %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 73 sethi %hi(0x4001cc00), %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 73 sethi %hi(0x4001cc00), %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 e3 e8 or %l7, 0x3e8, %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 7c call 40018fb4 <.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 73 call 40018fb4 <.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 54 call 40018fb4 <.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 b4 or %l1, 0x1b4, %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 b4 or %g1, 0x1b4, %g1 40004ac8: 82 00 40 02 add %g1, %g2, %g1 40004acc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40004ad0: 80 a0 60 00 cmp %g1, 0 40004ad4: 02 80 00 09 be 40004af8 40004ad8: 92 10 00 11 mov %l1, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40004adc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004ae0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004ae4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40004ae8: 40 00 06 c9 call 4000660c <== NOT EXECUTED 40004aec: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 <== NOT EXECUTED return sc; 40004af0: 81 c7 e0 08 ret <== NOT EXECUTED 40004af4: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->termios.c_oflag & OPOST) { 40004af8: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 40004afc: d2 04 60 14 ld [ %l1 + 0x14 ], %o1 40004b00: 80 88 60 01 btst 1, %g1 40004b04: 02 80 00 0e be 40004b3c 40004b08: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 uint32_t count = args->count; 40004b0c: a6 10 00 09 mov %o1, %l3 char *buffer = args->buffer; while (count--) 40004b10: 10 80 00 06 b 40004b28 40004b14: a4 10 00 08 mov %o0, %l2 oproc (*buffer++, tty); 40004b18: a6 04 ff ff add %l3, -1, %l3 40004b1c: a4 04 a0 01 inc %l2 40004b20: 7f ff fe 3f call 4000441c 40004b24: 92 10 00 10 mov %l0, %o1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 40004b28: 80 a4 e0 00 cmp %l3, 0 40004b2c: 32 bf ff fb bne,a 40004b18 40004b30: d0 0c 80 00 ldub [ %l2 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 40004b34: 10 80 00 05 b 40004b48 40004b38: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 40004b3c: 7f ff fd ec call 400042ec <== NOT EXECUTED 40004b40: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40004b44: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 40004b48: c2 24 60 1c st %g1, [ %l1 + 0x1c ] } rtems_semaphore_release (tty->osem); 40004b4c: 40 00 06 b0 call 4000660c 40004b50: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 return sc; } 40004b54: 81 c7 e0 08 ret 40004b58: 81 e8 00 00 restore 4000824c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 4000824c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 40008250: 2b 08 00 00 sethi %hi(0x20000000), %l5 <== NOT EXECUTED 40008254: aa 8e 00 15 andcc %i0, %l5, %l5 <== NOT EXECUTED 40008258: 02 80 00 11 be 4000829c <== NOT EXECUTED 4000825c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40008260: 05 10 00 a4 sethi %hi(0x40029000), %g2 <== NOT EXECUTED 40008264: c2 00 a0 08 ld [ %g2 + 8 ], %g1 ! 40029008 <== NOT EXECUTED 40008268: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 4000826c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008270: 02 80 00 06 be 40008288 <== NOT EXECUTED 40008274: c6 20 a0 08 st %g3, [ %g2 + 8 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008278: 03 10 00 a4 sethi %hi(0x40029000), %g1 <== NOT EXECUTED 4000827c: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 400291f0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008280: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40008284: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40008288: 03 10 00 a4 sethi %hi(0x40029000), %g1 <== NOT EXECUTED 4000828c: c2 00 60 08 ld [ %g1 + 8 ], %g1 ! 40029008 <== NOT EXECUTED 40008290: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008294: 34 80 00 5a bg,a 400083fc <== NOT EXECUTED 40008298: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 4000829c: 03 10 00 a1 sethi %hi(0x40028400), %g1 <== NOT EXECUTED 400082a0: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 ! 40028730 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 400082a4: 27 1c 00 00 sethi %hi(0x70000000), %l3 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 400082a8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 400082ac: 40 00 39 c0 call 400169ac <== NOT EXECUTED 400082b0: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 400082b4: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 400082b8: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 400082bc: 02 80 00 05 be 400082d0 <== NOT EXECUTED 400082c0: a6 2c 00 13 andn %l0, %l3, %l3 <== NOT EXECUTED local_errno = errno; 400082c4: 40 00 38 b1 call 40016588 <__errno> <== NOT EXECUTED 400082c8: 01 00 00 00 nop <== NOT EXECUTED 400082cc: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 400082d0: 29 10 00 a1 sethi %hi(0x40028400), %l4 <== NOT EXECUTED 400082d4: c2 05 23 30 ld [ %l4 + 0x330 ], %g1 ! 40028730 <_impure_ptr> <== NOT EXECUTED 400082d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400082dc: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400082e0: 40 00 51 70 call 4001c8a0 <== NOT EXECUTED 400082e4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 400082e8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400082ec: 02 80 00 0c be 4000831c <== NOT EXECUTED 400082f0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 400082f4: c2 05 23 30 ld [ %l4 + 0x330 ], %g1 <== NOT EXECUTED 400082f8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400082fc: 7f ff ff cd call 40008230 <== NOT EXECUTED 40008300: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40008304: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008308: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 4000830c: 92 12 60 60 or %o1, 0x60, %o1 <== NOT EXECUTED 40008310: 40 00 3a 7b call 40016cfc <== NOT EXECUTED 40008314: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008318: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED if (local_errno) 4000831c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008320: 22 80 00 1c be,a 40008390 <== NOT EXECUTED 40008324: 27 10 00 a1 sethi %hi(0x40028400), %l3 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40008328: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000832c: 04 80 00 11 ble 40008370 <== NOT EXECUTED 40008330: 03 10 00 a1 sethi %hi(0x40028400), %g1 <== NOT EXECUTED 40008334: 40 00 3d c5 call 40017a48 <== NOT EXECUTED 40008338: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000833c: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40008340: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008344: 02 80 00 0b be 40008370 <== NOT EXECUTED 40008348: 03 10 00 a1 sethi %hi(0x40028400), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 4000834c: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 ! 40028730 <_impure_ptr> <== NOT EXECUTED 40008350: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008354: 40 00 3d bd call 40017a48 <== NOT EXECUTED 40008358: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 4000835c: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008360: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008364: 92 12 60 70 or %o1, 0x70, %o1 <== NOT EXECUTED 40008368: 10 80 00 07 b 40008384 <== NOT EXECUTED 4000836c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40008370: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 <== NOT EXECUTED 40008374: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008378: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 4000837c: 92 12 60 80 or %o1, 0x80, %o1 <== NOT EXECUTED 40008380: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40008384: 40 00 3a 5e call 40016cfc <== NOT EXECUTED 40008388: 27 10 00 a1 sethi %hi(0x40028400), %l3 <== NOT EXECUTED 4000838c: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40008390: c2 04 e3 30 ld [ %l3 + 0x330 ], %g1 <== NOT EXECUTED 40008394: 13 10 00 99 sethi %hi(0x40026400), %o1 <== NOT EXECUTED 40008398: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 4000839c: 40 00 3a 58 call 40016cfc <== NOT EXECUTED 400083a0: 92 12 63 78 or %o1, 0x378, %o1 <== NOT EXECUTED (void) fflush(stderr); 400083a4: c2 04 e3 30 ld [ %l3 + 0x330 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 400083a8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED (void) fflush(stderr); 400083ac: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400083b0: 40 00 39 7f call 400169ac <== NOT EXECUTED 400083b4: b0 06 00 12 add %i0, %l2, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 400083b8: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 400083bc: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 400083c0: 02 80 00 0f be 400083fc <== NOT EXECUTED 400083c4: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 400083c8: 22 80 00 08 be,a 400083e8 <== NOT EXECUTED 400083cc: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 400083d0: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 400083d4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400083d8: 40 00 00 18 call 40008438 <== NOT EXECUTED 400083dc: 92 12 60 98 or %o1, 0x98, %o1 <== NOT EXECUTED _exit(local_errno); 400083e0: 40 00 02 e8 call 40008f80 <_exit> <== NOT EXECUTED 400083e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 400083e8: 90 10 20 00 clr %o0 <== NOT EXECUTED 400083ec: 40 00 00 13 call 40008438 <== NOT EXECUTED 400083f0: 92 12 60 b0 or %o1, 0xb0, %o1 <== NOT EXECUTED abort(); 400083f4: 40 00 38 57 call 40016550 <== NOT EXECUTED 400083f8: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 400083fc: 81 c7 e0 08 ret <== NOT EXECUTED 40008400: 81 e8 00 00 restore <== NOT EXECUTED 400277dc : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400277dc: 9d e3 bf a0 save %sp, -96, %sp 400277e0: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400277e4: 2b 10 01 9b sethi %hi(0x40066c00), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 400277e8: 29 10 01 9b sethi %hi(0x40066c00), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400277ec: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400277f0: aa 15 60 58 or %l5, 0x58, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 400277f4: a8 15 20 48 or %l4, 0x48, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400277f8: a2 10 20 00 clr %l1 400277fc: a0 10 20 00 clr %l0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40027800: c2 06 20 04 ld [ %i0 + 4 ], %g1 40027804: 82 00 7f ff add %g1, -1, %g1 40027808: 80 a0 60 00 cmp %g1, 0 4002780c: 16 80 00 07 bge 40027828 40027810: c2 26 20 04 st %g1, [ %i0 + 4 ] 40027814: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 40027818: 40 00 79 84 call 40045e28 <__srget_r> <== NOT EXECUTED 4002781c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40027820: 10 80 00 06 b 40027838 <== NOT EXECUTED 40027824: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40027828: c2 06 00 00 ld [ %i0 ], %g1 4002782c: 84 00 60 01 add %g1, 1, %g2 40027830: e4 08 40 00 ldub [ %g1 ], %l2 40027834: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') 40027838: 80 a4 a0 3a cmp %l2, 0x3a 4002783c: 02 80 00 22 be 400278c4 40027840: 80 a4 60 00 cmp %l1, 0 break; if (sign == 0) { 40027844: 32 80 00 09 bne,a 40027868 40027848: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 4002784c: 80 a4 a0 2d cmp %l2, 0x2d 40027850: 12 80 00 05 bne 40027864 40027854: a2 10 20 01 mov 1, %l1 sign = -1; limit++; 40027858: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 4002785c: 10 bf ff e9 b 40027800 <== NOT EXECUTED 40027860: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 40027864: c2 05 00 00 ld [ %l4 ], %g1 40027868: 82 00 40 12 add %g1, %l2, %g1 4002786c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 40027870: 80 88 60 04 btst 4, %g1 40027874: 02 80 00 1c be 400278e4 40027878: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 4002787c: 40 00 c4 f9 call 40058c60 <.udiv> 40027880: 92 10 20 0a mov 0xa, %o1 40027884: 80 a4 00 08 cmp %l0, %o0 40027888: 18 80 00 17 bgu 400278e4 4002788c: 01 00 00 00 nop 40027890: 12 80 00 08 bne 400278b0 40027894: a4 04 bf d0 add %l2, -48, %l2 40027898: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4002789c: 40 00 c5 9d call 40058f10 <.urem> <== NOT EXECUTED 400278a0: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 400278a4: 80 a4 80 08 cmp %l2, %o0 <== NOT EXECUTED 400278a8: 18 80 00 0f bgu 400278e4 <== NOT EXECUTED 400278ac: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 400278b0: 83 2c 20 03 sll %l0, 3, %g1 400278b4: a1 2c 20 01 sll %l0, 1, %l0 400278b8: a0 04 00 01 add %l0, %g1, %l0 400278bc: 10 bf ff d1 b 40027800 400278c0: a0 04 80 10 add %l2, %l0, %l0 } if (sign == 0) 400278c4: 02 80 00 08 be 400278e4 400278c8: 90 10 00 11 mov %l1, %o0 return 0; *val = i * sign; 400278cc: 92 10 00 10 mov %l0, %o1 400278d0: 7f ff 6e 48 call 400031f0 <.umul> 400278d4: b0 10 20 01 mov 1, %i0 400278d8: d0 26 40 00 st %o0, [ %i1 ] return 1; 400278dc: 81 c7 e0 08 ret 400278e0: 81 e8 00 00 restore } 400278e4: 81 c7 e0 08 ret <== NOT EXECUTED 400278e8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400278ec : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 400278ec: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 400278f0: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 400278f4: 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; 400278f8: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 400278fc: a0 14 20 58 or %l0, 0x58, %l0 40027900: c2 06 20 04 ld [ %i0 + 4 ], %g1 40027904: 82 00 7f ff add %g1, -1, %g1 40027908: 80 a0 60 00 cmp %g1, 0 4002790c: 16 80 00 07 bge 40027928 40027910: c2 26 20 04 st %g1, [ %i0 + 4 ] 40027914: d0 04 00 00 ld [ %l0 ], %o0 40027918: 40 00 79 44 call 40045e28 <__srget_r> 4002791c: 92 10 00 18 mov %i0, %o1 if (c == ':') { 40027920: 10 80 00 07 b 4002793c 40027924: 80 a2 20 3a cmp %o0, 0x3a { int c; *name = *bufp; for (;;) { c = getc(fp); 40027928: c2 06 00 00 ld [ %i0 ], %g1 4002792c: 84 00 60 01 add %g1, 1, %g2 40027930: d0 08 40 00 ldub [ %g1 ], %o0 40027934: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') { 40027938: 80 a2 20 3a cmp %o0, 0x3a 4002793c: 12 80 00 07 bne 40027958 40027940: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 40027944: 80 a7 20 00 cmp %i4, 0 40027948: 22 80 00 1a be,a 400279b0 4002794c: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40027950: 81 c7 e0 08 ret <== NOT EXECUTED 40027954: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 40027958: 12 80 00 07 bne 40027974 4002795c: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) 40027960: 80 a7 20 00 cmp %i4, 0 40027964: 32 80 00 13 bne,a 400279b0 40027968: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 4002796c: 81 c7 e0 08 ret <== NOT EXECUTED 40027970: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 40027974: 22 80 00 17 be,a 400279d0 40027978: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 4002797c: c2 06 c0 00 ld [ %i3 ], %g1 40027980: 80 a0 60 01 cmp %g1, 1 40027984: 28 80 00 13 bleu,a 400279d0 40027988: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 4002798c: c2 06 80 00 ld [ %i2 ], %g1 40027990: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 40027994: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 40027998: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002799c: 84 00 a0 01 inc %g2 --(*nleft); 400279a0: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 400279a4: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); } 400279a8: 10 bf ff d6 b 40027900 400279ac: c2 26 c0 00 st %g1, [ %i3 ] **bufp = '\0'; 400279b0: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 400279b4: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 400279b8: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 400279bc: 84 00 a0 01 inc %g2 --(*nleft); 400279c0: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 400279c4: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 400279c8: c2 26 c0 00 st %g1, [ %i3 ] 400279cc: b0 10 20 01 mov 1, %i0 return 1; } 400279d0: 81 c7 e0 08 ret 400279d4: 81 e8 00 00 restore 400279d8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400279d8: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400279dc: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400279e0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 400279e4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400279e8: a2 07 a0 4c add %fp, 0x4c, %l1 400279ec: a0 07 a0 50 add %fp, 0x50, %l0 400279f0: 90 10 00 18 mov %i0, %o0 400279f4: 92 10 00 19 mov %i1, %o1 400279f8: 94 10 00 11 mov %l1, %o2 400279fc: 7f ff ff bc call 400278ec 40027a00: 96 10 00 10 mov %l0, %o3 40027a04: 80 a2 20 00 cmp %o0, 0 40027a08: 02 80 00 41 be 40027b0c 40027a0c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 40027a10: 92 06 60 04 add %i1, 4, %o1 40027a14: 94 10 00 11 mov %l1, %o2 40027a18: 96 10 00 10 mov %l0, %o3 40027a1c: 7f ff ff b4 call 400278ec 40027a20: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027a24: 80 a2 20 00 cmp %o0, 0 40027a28: 02 80 00 39 be 40027b0c 40027a2c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 40027a30: 7f ff ff 6b call 400277dc 40027a34: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027a38: 80 a2 20 00 cmp %o0, 0 40027a3c: 02 80 00 34 be 40027b0c 40027a40: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 40027a44: 94 10 00 11 mov %l1, %o2 40027a48: 96 10 00 10 mov %l0, %o3 40027a4c: 92 07 bf f8 add %fp, -8, %o1 40027a50: 7f ff ff a7 call 400278ec 40027a54: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40027a58: 80 a2 20 00 cmp %o0, 0 40027a5c: 02 80 00 2c be 40027b0c 40027a60: c2 07 bf fc ld [ %fp + -4 ], %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027a64: 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; 40027a68: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027a6c: 84 10 00 03 mov %g3, %g2 40027a70: 10 80 00 05 b 40027a84 40027a74: 82 10 20 01 mov 1, %g1 if(*cp == ',') memcount++; 40027a78: 88 19 20 2c xor %g4, 0x2c, %g4 40027a7c: 80 a0 00 04 cmp %g0, %g4 40027a80: 82 60 7f ff subx %g1, -1, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027a84: c8 48 80 00 ldsb [ %g2 ], %g4 40027a88: 80 a1 20 00 cmp %g4, 0 40027a8c: 12 bf ff fb bne 40027a78 40027a90: 84 00 a0 01 inc %g2 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 40027a94: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 40027a98: 83 28 60 02 sll %g1, 2, %g1 40027a9c: 82 00 60 13 add %g1, 0x13, %g1 40027aa0: 80 a0 80 01 cmp %g2, %g1 40027aa4: 0a 80 00 1a bcs 40027b0c 40027aa8: 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; 40027aac: 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); 40027ab0: 82 00 60 0f add %g1, 0xf, %g1 40027ab4: 82 08 7f f0 and %g1, -16, %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40027ab8: 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); 40027abc: c2 26 60 0c st %g1, [ %i1 + 0xc ] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40027ac0: 10 80 00 09 b 40027ae4 40027ac4: c2 07 bf f8 ld [ %fp + -8 ], %g1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 40027ac8: 32 80 00 08 bne,a 40027ae8 40027acc: 82 00 60 01 inc %g1 *cp = '\0'; 40027ad0: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 40027ad4: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 40027ad8: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 40027adc: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40027ae0: c2 21 00 03 st %g1, [ %g4 + %g3 ] <== NOT EXECUTED 40027ae4: 82 00 60 01 inc %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40027ae8: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 40027aec: 80 a0 e0 00 cmp %g3, 0 40027af0: 32 bf ff f6 bne,a 40027ac8 40027af4: 80 a0 e0 2c cmp %g3, 0x2c if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40027af8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 40027afc: 85 28 a0 02 sll %g2, 2, %g2 40027b00: c0 20 40 02 clr [ %g1 + %g2 ] return 1; 40027b04: 81 c7 e0 08 ret 40027b08: 91 e8 20 01 restore %g0, 1, %o0 } 40027b0c: 81 c7 e0 08 ret <== NOT EXECUTED 40027b10: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40027b5c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40027b5c: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027b60: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40027b64: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40027b68: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027b6c: a2 07 a0 4c add %fp, 0x4c, %l1 40027b70: a0 07 a0 50 add %fp, 0x50, %l0 40027b74: 90 10 00 18 mov %i0, %o0 40027b78: 92 10 00 19 mov %i1, %o1 40027b7c: 94 10 00 11 mov %l1, %o2 40027b80: 7f ff ff 5b call 400278ec 40027b84: 96 10 00 10 mov %l0, %o3 40027b88: 80 a2 20 00 cmp %o0, 0 40027b8c: 02 80 00 39 be 40027c70 40027b90: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 40027b94: 92 06 60 04 add %i1, 4, %o1 40027b98: 94 10 00 11 mov %l1, %o2 40027b9c: 96 10 00 10 mov %l0, %o3 40027ba0: 7f ff ff 53 call 400278ec 40027ba4: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027ba8: 80 a2 20 00 cmp %o0, 0 40027bac: 02 80 00 31 be 40027c70 40027bb0: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 40027bb4: 7f ff ff 0a call 400277dc 40027bb8: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027bbc: 80 a2 20 00 cmp %o0, 0 40027bc0: 02 80 00 2c be 40027c70 40027bc4: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 40027bc8: 7f ff ff 05 call 400277dc 40027bcc: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027bd0: 80 a2 20 00 cmp %o0, 0 40027bd4: 02 80 00 27 be 40027c70 40027bd8: 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) 40027bdc: 92 06 60 0c add %i1, 0xc, %o1 40027be0: 94 10 00 11 mov %l1, %o2 40027be4: 96 10 00 10 mov %l0, %o3 40027be8: 7f ff ff 41 call 400278ec 40027bec: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027bf0: 80 a2 20 00 cmp %o0, 0 40027bf4: 02 80 00 1f be 40027c70 40027bf8: 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) 40027bfc: 92 06 60 10 add %i1, 0x10, %o1 40027c00: 94 10 00 11 mov %l1, %o2 40027c04: 96 10 00 10 mov %l0, %o3 40027c08: 7f ff ff 39 call 400278ec 40027c0c: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027c10: 80 a2 20 00 cmp %o0, 0 40027c14: 02 80 00 17 be 40027c70 40027c18: 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) 40027c1c: 92 06 60 14 add %i1, 0x14, %o1 40027c20: 94 10 00 11 mov %l1, %o2 40027c24: 96 10 00 10 mov %l0, %o3 40027c28: 7f ff ff 31 call 400278ec 40027c2c: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027c30: 80 a2 20 00 cmp %o0, 0 40027c34: 02 80 00 0f be 40027c70 40027c38: 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)) 40027c3c: 94 10 00 11 mov %l1, %o2 40027c40: 96 10 00 10 mov %l0, %o3 40027c44: 92 06 60 18 add %i1, 0x18, %o1 40027c48: 7f ff ff 29 call 400278ec 40027c4c: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40027c50: 80 a2 20 00 cmp %o0, 0 40027c54: 02 80 00 07 be 40027c70 40027c58: 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; 40027c5c: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 40027c60: c2 07 bf f8 ld [ %fp + -8 ], %g1 40027c64: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 40027c68: 81 c7 e0 08 ret 40027c6c: 91 e8 20 01 restore %g0, 1, %o0 } 40027c70: 81 c7 e0 08 ret <== NOT EXECUTED 40027c74: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40027768 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40027768: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 4002776c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 40066428 <== NOT EXECUTED 40027770: d0 30 60 32 sth %o0, [ %g1 + 0x32 ] <== NOT EXECUTED return 0; } 40027774: 81 c3 e0 08 retl <== NOT EXECUTED 40027778: 90 10 20 00 clr %o0 <== NOT EXECUTED 40027d98 : return NULL; return &grent; } void setgrent(void) { 40027d98: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 40027d9c: 7f ff ff c9 call 40027cc0 <== NOT EXECUTED 40027da0: 01 00 00 00 nop <== NOT EXECUTED if (group_fp != NULL) 40027da4: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027da8: d0 00 63 a4 ld [ %g1 + 0x3a4 ], %o0 ! 40069fa4 <== NOT EXECUTED 40027dac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027db0: 22 80 00 05 be,a 40027dc4 <== NOT EXECUTED 40027db4: 11 10 01 6e sethi %hi(0x4005b800), %o0 <== NOT EXECUTED fclose(group_fp); 40027db8: 40 00 62 a4 call 40040848 <== NOT EXECUTED 40027dbc: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 40027dc0: 11 10 01 6e sethi %hi(0x4005b800), %o0 <== NOT EXECUTED 40027dc4: 13 10 01 97 sethi %hi(0x40065c00), %o1 <== NOT EXECUTED 40027dc8: 90 12 21 68 or %o0, 0x168, %o0 <== NOT EXECUTED 40027dcc: 40 00 64 ee call 40041184 <== NOT EXECUTED 40027dd0: 92 12 60 10 or %o1, 0x10, %o1 <== NOT EXECUTED 40027dd4: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027dd8: d0 20 63 a4 st %o0, [ %g1 + 0x3a4 ] ! 40069fa4 <== NOT EXECUTED } 40027ddc: 81 c7 e0 08 ret <== NOT EXECUTED 40027de0: 81 e8 00 00 restore <== NOT EXECUTED 40027f8c : return NULL; return &pwent; } void setpwent(void) { 40027f8c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 40027f90: 7f ff ff 4c call 40027cc0 <== NOT EXECUTED 40027f94: 01 00 00 00 nop <== NOT EXECUTED if (passwd_fp != NULL) 40027f98: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027f9c: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 40069ebc <== NOT EXECUTED 40027fa0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40027fa4: 22 80 00 05 be,a 40027fb8 <== NOT EXECUTED 40027fa8: 11 10 01 6e sethi %hi(0x4005b800), %o0 <== NOT EXECUTED fclose(passwd_fp); 40027fac: 40 00 62 27 call 40040848 <== NOT EXECUTED 40027fb0: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 40027fb4: 11 10 01 6e sethi %hi(0x4005b800), %o0 <== NOT EXECUTED 40027fb8: 13 10 01 97 sethi %hi(0x40065c00), %o1 <== NOT EXECUTED 40027fbc: 90 12 20 b0 or %o0, 0xb0, %o0 <== NOT EXECUTED 40027fc0: 40 00 64 71 call 40041184 <== NOT EXECUTED 40027fc4: 92 12 60 10 or %o1, 0x10, %o1 <== NOT EXECUTED 40027fc8: 03 10 01 a7 sethi %hi(0x40069c00), %g1 <== NOT EXECUTED 40027fcc: d0 20 62 bc st %o0, [ %g1 + 0x2bc ] ! 40069ebc <== NOT EXECUTED } 40027fd0: 81 c7 e0 08 ret <== NOT EXECUTED 40027fd4: 81 e8 00 00 restore <== NOT EXECUTED 40007d5c : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40007d5c: 03 10 01 99 sethi %hi(0x40066400), %g1 <== NOT EXECUTED 40007d60: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 40066428 <== NOT EXECUTED 40007d64: d0 30 60 30 sth %o0, [ %g1 + 0x30 ] <== NOT EXECUTED return 0; } 40007d68: 81 c3 e0 08 retl <== NOT EXECUTED 40007d6c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40004a40 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40004a40: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 40004a44: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004a48: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40004a4c: 02 80 00 0e be 40004a84 <== NOT EXECUTED 40004a50: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004a54: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED 40004a58: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004a5c: 40 00 06 a5 call 400064f0 <== NOT EXECUTED 40004a60: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40004a64: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40004a68: 7f ff ff 7f call 40004864 <== NOT EXECUTED 40004a6c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004a70: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40004a74: 40 00 06 e6 call 4000660c <== NOT EXECUTED 40004a78: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40004a7c: 81 c7 e0 08 ret <== NOT EXECUTED 40004a80: 81 e8 00 00 restore <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 40004a84: 7f ff ff 78 call 40004864 <== NOT EXECUTED 40004a88: 81 e8 00 00 restore <== NOT EXECUTED 40004a8c: 01 00 00 00 nop 40009394 : int _STAT_NAME( const char *path, struct stat *buf ) { 40009394: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40009398: 80 a6 60 00 cmp %i1, 0 4000939c: 12 80 00 06 bne 400093b4 400093a0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 400093a4: 40 00 dc d1 call 400406e8 <__errno> 400093a8: b0 10 3f ff mov -1, %i0 ! ffffffff 400093ac: 10 80 00 20 b 4000942c 400093b0: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, strlen( path ), 400093b4: 40 00 f8 0c call 400473e4 400093b8: 90 10 00 18 mov %i0, %o0 400093bc: a0 07 bf ec add %fp, -20, %l0 400093c0: 92 10 00 08 mov %o0, %o1 400093c4: 94 10 20 00 clr %o2 400093c8: 90 10 00 18 mov %i0, %o0 400093cc: 96 10 00 10 mov %l0, %o3 400093d0: 98 10 20 01 mov 1, %o4 400093d4: 7f ff f9 e8 call 40007b74 400093d8: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 400093dc: 80 a2 20 00 cmp %o0, 0 400093e0: 12 80 00 14 bne 40009430 400093e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 400093e8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 400093ec: 80 a0 60 00 cmp %g1, 0 400093f0: 12 80 00 12 bne 40009438 400093f4: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 400093f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400093fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009400: 02 80 00 08 be 40009420 <== NOT EXECUTED 40009404: 01 00 00 00 nop <== NOT EXECUTED 40009408: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000940c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009410: 02 80 00 04 be 40009420 <== NOT EXECUTED 40009414: 01 00 00 00 nop <== NOT EXECUTED 40009418: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000941c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009420: 40 00 dc b2 call 400406e8 <__errno> <== NOT EXECUTED 40009424: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009428: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000942c: c2 22 00 00 st %g1, [ %o0 ] 40009430: 81 c7 e0 08 ret 40009434: 81 e8 00 00 restore /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40009438: 94 10 20 48 mov 0x48, %o2 4000943c: 40 00 ea 11 call 40043c80 40009440: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 40009444: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009448: 92 10 00 19 mov %i1, %o1 4000944c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40009450: 9f c0 40 00 call %g1 40009454: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40009458: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000945c: 80 a0 60 00 cmp %g1, 0 40009460: 02 bf ff f4 be 40009430 40009464: b0 10 00 08 mov %o0, %i0 40009468: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000946c: 80 a0 60 00 cmp %g1, 0 40009470: 02 80 00 04 be 40009480 40009474: 01 00 00 00 nop 40009478: 9f c0 40 00 call %g1 4000947c: 90 10 00 10 mov %l0, %o0 return status; } 40009480: 81 c7 e0 08 ret 40009484: 81 e8 00 00 restore 40028d1c : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 40028d1c: 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 ) ) 40028d20: 40 00 79 b1 call 400473e4 <== NOT EXECUTED 40028d24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028d28: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40028d2c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40028d30: 94 10 20 00 clr %o2 <== NOT EXECUTED 40028d34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40028d38: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40028d3c: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40028d40: 7f ff 7b 8d call 40007b74 <== NOT EXECUTED 40028d44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028d48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40028d4c: 12 80 00 0b bne 40028d78 <== NOT EXECUTED 40028d50: 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; 40028d54: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 <== NOT EXECUTED 40028d58: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 40028d5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028d60: 12 80 00 08 bne 40028d80 <== NOT EXECUTED 40028d64: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028d68: 40 00 5e 60 call 400406e8 <__errno> <== NOT EXECUTED 40028d6c: 01 00 00 00 nop <== NOT EXECUTED 40028d70: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40028d74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028d78: 81 c7 e0 08 ret <== NOT EXECUTED 40028d7c: 81 e8 00 00 restore <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 40028d80: 94 10 20 38 mov 0x38, %o2 <== NOT EXECUTED 40028d84: 40 00 6b bf call 40043c80 <== NOT EXECUTED 40028d88: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 40028d8c: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 <== NOT EXECUTED 40028d90: 90 04 60 1c add %l1, 0x1c, %o0 <== NOT EXECUTED 40028d94: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 <== NOT EXECUTED 40028d98: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028d9c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40028da0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40028da4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028da8: 02 bf ff f4 be 40028d78 <== NOT EXECUTED 40028dac: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40028db0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40028db4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028db8: 02 80 00 04 be 40028dc8 <== NOT EXECUTED 40028dbc: 01 00 00 00 nop <== NOT EXECUTED 40028dc0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028dc4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return result; } 40028dc8: 81 c7 e0 08 ret <== NOT EXECUTED 40028dcc: 81 e8 00 00 restore <== NOT EXECUTED 40028dd0 : int symlink( const char *actualpath, const char *sympath ) { 40028dd0: 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 ); 40028dd4: c2 4e 40 00 ldsb [ %i1 ], %g1 40028dd8: 80 a0 60 5c cmp %g1, 0x5c 40028ddc: 02 80 00 07 be 40028df8 40028de0: a0 10 00 18 mov %i0, %l0 40028de4: 80 a0 60 2f cmp %g1, 0x2f 40028de8: 02 80 00 04 be 40028df8 40028dec: 80 a0 60 00 cmp %g1, 0 40028df0: 12 80 00 0a bne 40028e18 40028df4: 03 10 01 99 sethi %hi(0x40066400), %g1 40028df8: 03 10 01 99 sethi %hi(0x40066400), %g1 40028dfc: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 ! 40066428 40028e00: 90 07 bf e8 add %fp, -24, %o0 40028e04: 92 02 60 18 add %o1, 0x18, %o1 40028e08: 40 00 6b 0b call 40043a34 40028e0c: 94 10 20 14 mov 0x14, %o2 40028e10: 10 80 00 08 b 40028e30 40028e14: 90 10 20 01 mov 1, %o0 40028e18: d2 00 60 28 ld [ %g1 + 0x28 ], %o1 40028e1c: 90 07 bf e8 add %fp, -24, %o0 40028e20: 92 02 60 04 add %o1, 4, %o1 40028e24: 40 00 6b 04 call 40043a34 40028e28: 94 10 20 14 mov 0x14, %o2 40028e2c: 90 10 20 00 clr %o0 if ( !loc.ops->evalformake_h ) { 40028e30: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028e34: c2 00 60 04 ld [ %g1 + 4 ], %g1 40028e38: 80 a0 60 00 cmp %g1, 0 40028e3c: 02 80 00 14 be 40028e8c 40028e40: 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 ); 40028e44: 94 07 bf fc add %fp, -4, %o2 40028e48: b2 07 bf e8 add %fp, -24, %i1 if ( result != 0 ) 40028e4c: 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 ); 40028e50: 9f c0 40 00 call %g1 40028e54: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) 40028e58: 80 a2 20 00 cmp %o0, 0 40028e5c: 12 80 00 10 bne 40028e9c 40028e60: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 40028e64: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 40028e68: 80 a0 60 00 cmp %g1, 0 40028e6c: 12 80 00 0e bne 40028ea4 40028e70: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &loc ); 40028e74: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40028e78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028e7c: 02 80 00 04 be 40028e8c <== NOT EXECUTED 40028e80: 01 00 00 00 nop <== NOT EXECUTED 40028e84: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028e88: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028e8c: 40 00 5e 17 call 400406e8 <__errno> <== NOT EXECUTED 40028e90: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028e94: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028e98: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028e9c: 81 c7 e0 08 ret 40028ea0: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40028ea4: 92 10 00 10 mov %l0, %o1 40028ea8: 9f c0 40 00 call %g1 40028eac: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 40028eb0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40028eb4: 80 a0 60 00 cmp %g1, 0 40028eb8: 02 bf ff f9 be 40028e9c 40028ebc: b0 10 00 08 mov %o0, %i0 40028ec0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40028ec4: 80 a0 60 00 cmp %g1, 0 40028ec8: 02 80 00 04 be 40028ed8 40028ecc: 01 00 00 00 nop 40028ed0: 9f c0 40 00 call %g1 40028ed4: 90 10 00 19 mov %i1, %o0 return result; } 40028ed8: 81 c7 e0 08 ret 40028edc: 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 b9 call 40018000 <__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 70 call 400166f8 <== 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 6b call 400166f8 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 4000eda0 : #include int unlink( const char *path ) { 4000eda0: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4000eda4: 7f ff d0 61 call 40002f28 4000eda8: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 4000edac: a6 92 20 00 orcc %o0, 0, %l3 4000edb0: 32 80 00 17 bne,a 4000ee0c 4000edb4: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4000edb8: c2 4e 00 00 ldsb [ %i0 ], %g1 4000edbc: 80 a0 60 5c cmp %g1, 0x5c 4000edc0: 02 80 00 06 be 4000edd8 4000edc4: 80 a0 60 2f cmp %g1, 0x2f 4000edc8: 02 80 00 04 be 4000edd8 4000edcc: 80 a0 60 00 cmp %g1, 0 4000edd0: 12 80 00 07 bne 4000edec <== NOT EXECUTED 4000edd4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED 4000edd8: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000eddc: d2 00 63 f8 ld [ %g1 + 0x3f8 ], %o1 ! 4001cff8 4000ede0: 90 07 bf ec add %fp, -20, %o0 4000ede4: 10 80 00 05 b 4000edf8 4000ede8: 92 02 60 18 add %o1, 0x18, %o1 4000edec: d2 00 63 f8 ld [ %g1 + 0x3f8 ], %o1 <== NOT EXECUTED 4000edf0: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 4000edf4: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 4000edf8: 94 10 20 14 mov 0x14, %o2 4000edfc: 40 00 04 6c call 4000ffac 4000ee00: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ee04: 10 80 00 0b b 4000ee30 4000ee08: 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, 4000ee0c: 92 10 00 13 mov %l3, %o1 4000ee10: 94 10 20 02 mov 2, %o2 4000ee14: 96 07 bf ec add %fp, -20, %o3 4000ee18: 7f ff d0 92 call 40003060 4000ee1c: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4000ee20: 80 a2 20 00 cmp %o0, 0 4000ee24: 12 80 00 82 bne 4000f02c 4000ee28: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000ee2c: 94 10 20 14 mov 0x14, %o2 4000ee30: a0 07 bf d8 add %fp, -40, %l0 4000ee34: a4 07 bf ec add %fp, -20, %l2 4000ee38: 90 10 00 10 mov %l0, %o0 4000ee3c: 40 00 04 5c call 4000ffac 4000ee40: 92 10 00 12 mov %l2, %o1 name = path + parentpathlen; 4000ee44: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000ee48: 40 00 05 d5 call 4001059c 4000ee4c: 90 10 00 18 mov %i0, %o0 4000ee50: 92 10 00 08 mov %o0, %o1 4000ee54: 7f ff d0 23 call 40002ee0 4000ee58: 90 10 00 18 mov %i0, %o0 4000ee5c: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000ee60: 40 00 05 cf call 4001059c 4000ee64: 90 10 00 18 mov %i0, %o0 4000ee68: 94 10 20 00 clr %o2 4000ee6c: 92 10 00 08 mov %o0, %o1 4000ee70: 96 10 00 10 mov %l0, %o3 4000ee74: 90 10 00 18 mov %i0, %o0 4000ee78: 7f ff d0 3e call 40002f70 4000ee7c: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000ee80: 80 a2 20 00 cmp %o0, 0 4000ee84: 02 80 00 11 be 4000eec8 4000ee88: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 4000ee8c: 80 8c 60 ff btst 0xff, %l1 4000ee90: 02 80 00 0c be 4000eec0 4000ee94: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 4000ee98: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000ee9c: 80 a0 60 00 cmp %g1, 0 4000eea0: 02 80 00 64 be 4000f030 4000eea4: 01 00 00 00 nop 4000eea8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000eeac: 80 a0 60 00 cmp %g1, 0 4000eeb0: 02 80 00 04 be 4000eec0 4000eeb4: 90 10 00 12 mov %l2, %o0 4000eeb8: 9f c0 40 00 call %g1 4000eebc: 01 00 00 00 nop 4000eec0: 81 c7 e0 08 ret 4000eec4: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 4000eec8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000eecc: 80 a0 60 00 cmp %g1, 0 4000eed0: 22 80 00 26 be,a 4000ef68 4000eed4: 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 ) { 4000eed8: 9f c0 40 00 call %g1 4000eedc: 90 10 00 10 mov %l0, %o0 4000eee0: 80 a2 20 01 cmp %o0, 1 4000eee4: 12 80 00 1c bne 4000ef54 4000eee8: c4 07 bf e4 ld [ %fp + -28 ], %g2 rtems_filesystem_freenode( &loc ); 4000eeec: 80 a0 a0 00 cmp %g2, 0 4000eef0: 02 80 00 09 be 4000ef14 4000eef4: 80 8c 60 ff btst 0xff, %l1 4000eef8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000eefc: 80 a0 60 00 cmp %g1, 0 4000ef00: 02 80 00 05 be 4000ef14 4000ef04: 80 8c 60 ff btst 0xff, %l1 4000ef08: 9f c0 40 00 call %g1 4000ef0c: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000ef10: 80 8c 60 ff btst 0xff, %l1 4000ef14: 02 80 00 0c be 4000ef44 4000ef18: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 4000ef1c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000ef20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef24: 02 80 00 08 be 4000ef44 <== NOT EXECUTED 4000ef28: 01 00 00 00 nop <== NOT EXECUTED 4000ef2c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000ef30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef34: 02 80 00 04 be 4000ef44 <== NOT EXECUTED 4000ef38: 01 00 00 00 nop <== NOT EXECUTED 4000ef3c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ef40: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4000ef44: 40 00 01 df call 4000f6c0 <__errno> 4000ef48: b0 10 3f ff mov -1, %i0 4000ef4c: 10 80 00 1b b 4000efb8 4000ef50: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 4000ef54: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000ef58: 80 a0 60 00 cmp %g1, 0 4000ef5c: 12 80 00 1a bne 4000efc4 4000ef60: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 4000ef64: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000ef68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef6c: 02 80 00 05 be 4000ef80 <== NOT EXECUTED 4000ef70: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000ef74: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ef78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 4000ef7c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000ef80: 02 80 00 0b be 4000efac <== NOT EXECUTED 4000ef84: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4000ef88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef8c: 02 80 00 08 be 4000efac <== NOT EXECUTED 4000ef90: 01 00 00 00 nop <== NOT EXECUTED 4000ef94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000ef98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ef9c: 02 80 00 04 be 4000efac <== NOT EXECUTED 4000efa0: 01 00 00 00 nop <== NOT EXECUTED 4000efa4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000efa8: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000efac: 40 00 01 c5 call 4000f6c0 <__errno> <== NOT EXECUTED 4000efb0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000efb4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000efb8: c2 22 00 00 st %g1, [ %o0 ] 4000efbc: 81 c7 e0 08 ret 4000efc0: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4000efc4: 9f c0 40 00 call %g1 4000efc8: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 4000efcc: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000efd0: 80 a0 60 00 cmp %g1, 0 4000efd4: 02 80 00 08 be 4000eff4 4000efd8: b0 10 00 08 mov %o0, %i0 4000efdc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000efe0: 80 a0 60 00 cmp %g1, 0 4000efe4: 02 80 00 05 be 4000eff8 4000efe8: 80 8c 60 ff btst 0xff, %l1 4000efec: 9f c0 40 00 call %g1 4000eff0: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000eff4: 80 8c 60 ff btst 0xff, %l1 4000eff8: 02 bf ff b2 be 4000eec0 4000effc: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000f000: 80 a0 60 00 cmp %g1, 0 4000f004: 02 80 00 0b be 4000f030 4000f008: 01 00 00 00 nop 4000f00c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000f010: 80 a0 60 00 cmp %g1, 0 4000f014: 02 80 00 07 be 4000f030 4000f018: 01 00 00 00 nop 4000f01c: 9f c0 40 00 call %g1 4000f020: 90 07 bf ec add %fp, -20, %o0 4000f024: 81 c7 e0 08 ret 4000f028: 81 e8 00 00 restore 4000f02c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 4000f030: 81 c7 e0 08 ret <== NOT EXECUTED 4000f034: 81 e8 00 00 restore <== NOT EXECUTED 4000b554 : */ int unmount( const char *path ) { 4000b554: 9d e3 bf 88 save %sp, -120, %sp * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 4000b558: 40 00 ef a3 call 400473e4 4000b55c: 90 10 00 18 mov %i0, %o0 4000b560: a0 07 bf ec add %fp, -20, %l0 4000b564: 92 10 00 08 mov %o0, %o1 4000b568: 94 10 20 00 clr %o2 4000b56c: 90 10 00 18 mov %i0, %o0 4000b570: 96 10 00 10 mov %l0, %o3 4000b574: 7f ff f1 80 call 40007b74 4000b578: 98 10 20 01 mov 1, %o4 4000b57c: 80 a2 20 00 cmp %o0, 0 4000b580: 12 80 00 6a bne 4000b728 4000b584: e2 07 bf fc ld [ %fp + -4 ], %l1 return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 4000b588: c4 07 bf ec ld [ %fp + -20 ], %g2 4000b58c: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 4000b590: 80 a0 c0 02 cmp %g3, %g2 4000b594: 02 80 00 0f be 4000b5d0 4000b598: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 4000b59c: 80 a0 60 00 cmp %g1, 0 4000b5a0: 02 80 00 08 be 4000b5c0 4000b5a4: 01 00 00 00 nop 4000b5a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b5ac: 80 a0 60 00 cmp %g1, 0 4000b5b0: 02 80 00 04 be 4000b5c0 4000b5b4: 01 00 00 00 nop 4000b5b8: 9f c0 40 00 call %g1 4000b5bc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4000b5c0: 40 00 d4 4a call 400406e8 <__errno> 4000b5c4: 01 00 00 00 nop 4000b5c8: 10 80 00 21 b 4000b64c 4000b5cc: 82 10 20 0d mov 0xd, %g1 ! d /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4000b5d0: 80 a0 60 00 cmp %g1, 0 4000b5d4: 22 80 00 09 be,a 4000b5f8 4000b5d8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b5dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b5e0: 80 a0 60 00 cmp %g1, 0 4000b5e4: 22 80 00 05 be,a 4000b5f8 4000b5e8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b5ec: 9f c0 40 00 call %g1 4000b5f0: 90 10 00 10 mov %l0, %o0 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 4000b5f4: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b5f8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b5fc: 80 a0 60 00 cmp %g1, 0 4000b600: 02 80 00 07 be 4000b61c 4000b604: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 4000b608: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000b60c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000b610: 80 a0 60 00 cmp %g1, 0 4000b614: 32 80 00 06 bne,a 4000b62c 4000b618: 03 10 01 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 ); 4000b61c: 40 00 d4 33 call 400406e8 <__errno> <== NOT EXECUTED 4000b620: 01 00 00 00 nop <== NOT EXECUTED 4000b624: 10 80 00 0a b 4000b64c <== NOT EXECUTED 4000b628: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 4000b62c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b630: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000b634: 80 a0 40 11 cmp %g1, %l1 4000b638: 12 80 00 08 bne 4000b658 4000b63c: 03 10 01 a8 sethi %hi(0x4006a000), %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 4000b640: 40 00 d4 2a call 400406e8 <__errno> 4000b644: 01 00 00 00 nop 4000b648: 82 10 20 10 mov 0x10, %g1 ! 10 4000b64c: c2 22 00 00 st %g1, [ %o0 ] 4000b650: 81 c7 e0 08 ret 4000b654: 91 e8 3f ff restore %g0, -1, %o0 4000b658: 05 10 01 a8 sethi %hi(0x4006a000), %g2 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000b65c: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 4000b660: 10 80 00 07 b 4000b67c 4000b664: 84 10 a3 34 or %g2, 0x334, %g2 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 4000b668: c6 04 60 2c ld [ %l1 + 0x2c ], %g3 4000b66c: 80 a1 00 03 cmp %g4, %g3 4000b670: 02 bf ff f4 be 4000b640 4000b674: 01 00 00 00 nop * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 4000b678: c2 00 40 00 ld [ %g1 ], %g1 4000b67c: 80 a0 40 02 cmp %g1, %g2 4000b680: 32 bf ff fa bne,a 4000b668 4000b684: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 4000b688: 30 80 00 2a b,a 4000b730 * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 4000b68c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000b690: 9f c0 40 00 call %g1 4000b694: 90 10 00 11 mov %l1, %o0 4000b698: 80 a2 20 00 cmp %o0, 0 4000b69c: 12 80 00 23 bne 4000b728 4000b6a0: 01 00 00 00 nop * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 4000b6a4: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000b6a8: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4000b6ac: 9f c0 40 00 call %g1 4000b6b0: 90 10 00 11 mov %l1, %o0 4000b6b4: 80 a2 20 00 cmp %o0, 0 4000b6b8: 02 80 00 0b be 4000b6e4 4000b6bc: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 4000b6c0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000b6c4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 4000b6c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b6cc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000b6d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b6d4: 02 80 00 15 be 4000b728 <== NOT EXECUTED 4000b6d8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4000b6dc: 40 00 04 f2 call 4000caa4 <== NOT EXECUTED 4000b6e0: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4000b6e4: 40 00 05 d7 call 4000ce40 <_Chain_Extract> 4000b6e8: 90 10 00 11 mov %l1, %o0 /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 4000b6ec: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b6f0: 80 a0 60 00 cmp %g1, 0 4000b6f4: 02 80 00 09 be 4000b718 4000b6f8: 90 10 00 11 mov %l1, %o0 4000b6fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b700: 80 a0 60 00 cmp %g1, 0 4000b704: 02 80 00 05 be 4000b718 4000b708: 01 00 00 00 nop 4000b70c: 9f c0 40 00 call %g1 4000b710: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 4000b714: 90 10 00 11 mov %l1, %o0 4000b718: 7f ff f1 40 call 40007c18 4000b71c: b0 10 20 00 clr %i0 return 0; 4000b720: 81 c7 e0 08 ret 4000b724: 81 e8 00 00 restore } 4000b728: 81 c7 e0 08 ret 4000b72c: 91 e8 3f ff restore %g0, -1, %o0 * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 4000b730: 7f ff f1 f4 call 40007f00 4000b734: 90 10 00 11 mov %l1, %o0 4000b738: 80 a2 20 01 cmp %o0, 1 4000b73c: 32 bf ff d4 bne,a 4000b68c 4000b740: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000b744: 30 bf ff bf b,a 4000b640 40028f80 : int utime( const char *path, const struct utimbuf *times ) { 40028f80: 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 ) ) 40028f84: 40 00 79 18 call 400473e4 40028f88: 90 10 00 18 mov %i0, %o0 40028f8c: a0 07 bf ec add %fp, -20, %l0 40028f90: 92 10 00 08 mov %o0, %o1 40028f94: 94 10 20 00 clr %o2 40028f98: 90 10 00 18 mov %i0, %o0 40028f9c: 96 10 00 10 mov %l0, %o3 40028fa0: 98 10 20 01 mov 1, %o4 40028fa4: 7f ff 7a f4 call 40007b74 40028fa8: b0 10 3f ff mov -1, %i0 40028fac: 80 a2 20 00 cmp %o0, 0 40028fb0: 12 80 00 10 bne 40028ff0 40028fb4: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 40028fb8: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40028fbc: 80 a0 60 00 cmp %g1, 0 40028fc0: 32 80 00 0e bne,a 40028ff8 40028fc4: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 40028fc8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40028fcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40028fd0: 02 80 00 04 be 40028fe0 <== NOT EXECUTED 40028fd4: 01 00 00 00 nop <== NOT EXECUTED 40028fd8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40028fdc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40028fe0: 40 00 5d c2 call 400406e8 <__errno> <== NOT EXECUTED 40028fe4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40028fe8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40028fec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40028ff0: 81 c7 e0 08 ret 40028ff4: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40028ff8: d2 06 40 00 ld [ %i1 ], %o1 40028ffc: 9f c0 40 00 call %g1 40029000: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 40029004: c2 07 bf f8 ld [ %fp + -8 ], %g1 40029008: 80 a0 60 00 cmp %g1, 0 4002900c: 02 bf ff f9 be 40028ff0 40029010: b0 10 00 08 mov %o0, %i0 40029014: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40029018: 80 a0 60 00 cmp %g1, 0 4002901c: 02 80 00 04 be 4002902c 40029020: 01 00 00 00 nop 40029024: 9f c0 40 00 call %g1 40029028: 90 10 00 10 mov %l0, %o0 return result; } 4002902c: 81 c7 e0 08 ret 40029030: 81 e8 00 00 restore 4001b598 : ssize_t write( int fd, const void *buffer, size_t count ) { 4001b598: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b59c: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4001b5a0: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 4001cee4 ssize_t write( int fd, const void *buffer, size_t count ) { 4001b5a4: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001b5a8: 80 a6 00 01 cmp %i0, %g1 4001b5ac: 1a 80 00 0c bcc 4001b5dc 4001b5b0: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001b5b4: 03 10 00 76 sethi %hi(0x4001d800), %g1 4001b5b8: e0 00 60 78 ld [ %g1 + 0x78 ], %l0 ! 4001d878 4001b5bc: 83 2e 20 06 sll %i0, 6, %g1 4001b5c0: b1 2e 20 03 sll %i0, 3, %i0 4001b5c4: b0 06 00 01 add %i0, %g1, %i0 4001b5c8: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 4001b5cc: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001b5d0: 80 88 61 00 btst 0x100, %g1 4001b5d4: 12 80 00 06 bne 4001b5ec 4001b5d8: 80 a6 60 00 cmp %i1, 0 4001b5dc: 7f ff d0 39 call 4000f6c0 <__errno> <== NOT EXECUTED 4001b5e0: 01 00 00 00 nop <== NOT EXECUTED 4001b5e4: 10 80 00 14 b 4001b634 <== NOT EXECUTED 4001b5e8: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 4001b5ec: 02 80 00 07 be 4001b608 4001b5f0: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001b5f4: 02 80 00 1c be 4001b664 4001b5f8: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001b5fc: 80 88 60 04 btst 4, %g1 4001b600: 32 80 00 06 bne,a 4001b618 4001b604: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001b608: 7f ff d0 2e call 4000f6c0 <__errno> <== NOT EXECUTED 4001b60c: 01 00 00 00 nop <== NOT EXECUTED 4001b610: 10 80 00 09 b 4001b634 <== NOT EXECUTED 4001b614: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 4001b618: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4001b61c: 80 a0 60 00 cmp %g1, 0 4001b620: 12 80 00 08 bne 4001b640 4001b624: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b628: 7f ff d0 26 call 4000f6c0 <__errno> <== NOT EXECUTED 4001b62c: 01 00 00 00 nop <== NOT EXECUTED 4001b630: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001b634: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b638: 10 80 00 0b b 4001b664 <== NOT EXECUTED 4001b63c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 4001b640: 9f c0 40 00 call %g1 4001b644: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001b648: 80 a2 20 00 cmp %o0, 0 4001b64c: 04 80 00 06 ble 4001b664 4001b650: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 4001b654: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001b658: 86 83 40 08 addcc %o5, %o0, %g3 4001b65c: 84 43 00 02 addx %o4, %g2, %g2 4001b660: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 4001b664: 81 c7 e0 08 ret 4001b668: 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 b4 ld [ %g1 + 0x2b4 ], %g1 ! 40021ab4 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 1c ld [ %g1 + 0x1c ], %l2 ! 40022c1c 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 87 call 40011e18 <__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 76 call 40011e18 <__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 69 call 40011e18 <__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